/* Materials page */
.plastics { padding-bottom: 40px; }

/* Radar charts (SVG generated by tools/build.py) */
.radar { display: block; width: 100%; max-width: 480px; height: auto; margin: 0 auto; }
.radar__label { font-family: var(--font-sans); font-size: 13px; fill: var(--ink-600); }
.radar__val { font-family: var(--font-mono); font-weight: 600; fill: var(--blue-500); }

/* Score bars */
.bar { display: block; height: 6px; background: #e6eaf3; }
.bar > span { display: block; height: 100%; background: var(--blue-500); }

/* Picker + detail */
.mat { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.mat-list { flex: 0 1 280px; min-width: 240px; background: #fff; border: 1px solid #d6deef; }
.mat-list__group { padding: 14px 0 8px; border-bottom: 1px solid var(--ink-200); }
.mat-list__group:last-child { border-bottom: 0; }
.mat-list__label { padding: 0 18px 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #7a818c; }
.mat-list__item {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 18px; font-family: var(--font-sans); font-size: 13.5px; font-weight: 400; color: var(--ink-700);
  border-left: 3px solid transparent; transition: background 140ms ease;
}
.mat-list__item:hover { background: #f3f5fc; }
.mat-list__item:focus-visible { outline: 2px solid var(--blue-500); outline-offset: -2px; }
.mat-list__item .mono { font-size: 11.5px; color: #7a818c; }
.mat-list__item[aria-selected="true"] { font-weight: 600; color: var(--ink-900); background: var(--surface-lavender); border-left-color: var(--blue-500); }

.mat-select { display: none; flex: 1 1 100%; flex-direction: column; gap: 8px; }
.mat-select__label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #7a818c; }
.mat-select select {
  font-family: var(--font-sans); font-size: 15px; font-weight: 500; color: var(--ink-900);
  padding: 12px 14px; min-height: 50px; width: 100%; border: 1.5px solid var(--blue-500); border-radius: 5px; background: #fff;
}

.mat-detail { flex: 1 1 520px; min-width: 0; padding: clamp(20px, 3vw, 32px); scroll-margin-top: 80px; outline: none; }
.mat-panel__group { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--blue-500); text-transform: uppercase; margin-bottom: 10px; }
.mat-panel__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 22px; }
.mat-panel__head h3 { font-size: 26px; font-weight: 600; color: var(--ink-900); margin: 0; }
.mat-panel__chart { display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--ink-200); }
.mat-panel__radar { flex: 1 1 300px; min-width: 260px; }
.mat-bars { flex: 1 1 220px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.mat-bars > div { display: grid; grid-template-columns: 1fr auto; row-gap: 5px; }
.mat-bars dt { font-size: 13px; color: var(--ink-600); }
.mat-bars dd { margin: 0; font-size: 13px; color: var(--blue-900); }
.mat-bars .bar { grid-column: 1 / -1; }
.mat-panel__none { margin: 0 0 24px; padding: 16px 18px; background: var(--ink-50); border: 1px solid var(--ink-200); font-size: 13.5px; line-height: 1.6; color: var(--ink-600); }
.mat-panel__desc { display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.75; color: var(--ink-600); }
.mat-panel__desc p { margin: 0; text-wrap: pretty; }

/* Comparison */
.compare { scroll-margin-top: 80px; padding-top: 28px; padding-bottom: 76px; }
.compare__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 16px; }
.compare__head h3 { font-size: 20px; font-weight: 600; color: var(--ink-900); margin: 0; }
.compare__head .mono { font-size: 11px; letter-spacing: 0.08em; color: #7a818c; }

.cmp-table-wrap, .grade-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #d6deef; }
.cmp-table, .grade-table { width: 100%; border-collapse: collapse; }
.cmp-table { min-width: 820px; }
.cmp-table thead th, .grade-table thead th {
  background: var(--blue-900); font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: #cdd3e2; text-align: left; padding: 12px 8px;
}
.cmp-table thead th:first-child, .grade-table thead th:first-child { padding-left: 20px; }
.cmp-table thead th:last-child, .grade-table thead th:last-child { padding-right: 20px; }
.cmp-table tbody tr { border-top: 1px solid #e9ecf2; cursor: pointer; background: #fff; transition: background 140ms ease; }
.cmp-table tbody tr:hover { background: #f3f5fc; }
.cmp-table tbody tr.is-selected { background: var(--surface-lavender); }
.cmp-table tbody tr.is-selected th button { font-weight: 600; }
.cmp-table td, .cmp-table tbody th { padding: 11px 8px; text-align: left; font-weight: 400; }
.cmp-table tbody th { padding-left: 20px; width: 30%; }
.cmp-table tbody th button { all: unset; cursor: pointer; font-family: var(--font-sans); font-size: 13.5px; color: var(--ink-900); }
.cmp-table tbody th button:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.cmp-table td.mono { font-size: 12px; color: var(--ink-600); width: 70px; }
.cmp-table td:last-child { padding-right: 20px; }
.cmp-cell { display: flex; align-items: center; gap: 8px; }
.cmp-cell .bar { flex: 1; max-width: 56px; height: 5px; }
.cmp-cell .mono, .cmp-card__v .mono { font-size: 12px; color: var(--blue-900); min-width: 22px; }

.cmp-cards { display: none; background: #fff; border: 1px solid #d6deef; }
.cmp-card { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; padding: 14px 16px; border-bottom: 1px solid #e9ecf2; background: #fff; }
.cmp-card:last-child { border-bottom: 0; }
.cmp-card.is-selected { background: var(--surface-lavender); }
.cmp-card.is-selected .cmp-card__name { font-weight: 600; }
.cmp-card:focus-visible { outline: 2px solid var(--blue-500); outline-offset: -2px; }
.cmp-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.cmp-card__name { font-family: var(--font-sans); font-size: 14px; color: var(--ink-900); }
.cmp-card__head .mono { font-size: 12px; color: var(--ink-600); }
.cmp-card__cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cmp-card__cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cmp-card__k { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; color: #7a818c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-card__v { display: flex; align-items: center; gap: 6px; }
.cmp-card__v .bar { flex: 1; height: 4px; }
.cmp-card__v .mono { min-width: 0; }

/* Steels */
.metals__lede { margin-bottom: 28px; }
.steel__top { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: center; margin-bottom: 36px; }
.steel__text { flex: 1.3 1 400px; }
.steel__text h3 { font-size: 24px; font-weight: 600; color: var(--ink-900); margin: 0 0 14px; }
.steel__desc { display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.75; color: var(--ink-600); margin-bottom: 20px; }
.steel__desc p { margin: 0; text-wrap: pretty; }
.steel__chart { flex: 1 1 320px; background: #fff; border: 1px solid #d6deef; border-top: 3px solid var(--blue-500); padding: 20px; }
.steel__chart .label-mono { margin-bottom: 4px; }

.grade-table { min-width: 780px; }
.grade-table tbody tr { border-top: 1px solid #e9ecf2; }
.grade-table tbody th, .grade-table td { padding: 14px 10px; vertical-align: top; text-align: left; font-weight: 400; }
.grade-table tbody th { padding-left: 20px; width: 90px; font-size: 14px; font-weight: 500; color: var(--blue-900); }
.grade-table td:nth-child(2) { width: 190px; font-size: 12.5px; line-height: 1.6; color: var(--blue-900); }
.grade-table td:nth-child(3) { width: 170px; font-size: 12.5px; line-height: 1.6; }
.grade-table td:last-child { padding-right: 20px; font-size: 13.5px; line-height: 1.65; color: var(--ink-600); text-wrap: pretty; }

.grade-cards { display: none; flex-direction: column; gap: 12px; }
.grade-card { background: #fff; border: 1px solid #d6deef; border-top: 3px solid var(--blue-500); padding: 16px 18px; }
.grade-card__g { font-size: 17px; font-weight: 500; color: var(--blue-900); margin-bottom: 10px; }
.grade-card dl { margin: 0 0 12px; display: flex; flex-direction: column; border-top: 1px solid #e9ecf2; }
.grade-card dl > div { padding: 8px 0; border-bottom: 1px solid #e9ecf2; }
.grade-card dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #7a818c; margin-bottom: 3px; }
.grade-card dd { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--blue-900); }
.grade-card p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-600); text-wrap: pretty; }

.metals__foot { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; margin-top: 28px; }
.metals__foot p { flex: 1 1 480px; font-size: 13px; line-height: 1.7; color: var(--ink-600); margin: 0; text-wrap: pretty; }

/* Narrow: dropdown picker, card lists instead of tables */
@media (max-width: 719.98px) {
  .mat-list { display: none; }
  .mat-select { display: flex; }
  .cmp-table-wrap, .grade-table-wrap { display: none; }
  .cmp-cards { display: block; }
  .grade-cards { display: flex; }
}
