/* Resin calculator. Design notes in DESIGN.md: a graduated mixing cup on a
   workbench. Graphite on frosted acrylic, amber for part A, steel blue for part B. */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-semi-condensed-700-latin.woff2") format("woff2");
}

:root {
  --bg: #eef2f3;
  --surface: #ffffff;
  --surface-2: #f6f8f8;
  --line: #d5dde0;
  --line-strong: #aebbc1;
  --control-line: #7f8d94;
  --ink: #171c1f;
  --text: #2e373c;
  --muted: #56626a;
  --amber: #9a5408;
  --amber-soft: #fbf3e6;
  --on-amber: #ffffff;
  --steel: #3d5f78;
  --steel-soft: #e8f0f5;
  --warn: #b23a1e;
  --warn-soft: #fcebe6;
  --focus: #1d6fd6;
  --cup-a: #d88a2b;
  --cup-b: #6f93ae;
  --shadow: 0 1px 2px rgb(23 28 31 / 0.06), 0 8px 24px rgb(23 28 31 / 0.06);
  --display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121516;
    --surface: #1a1e20;
    --surface-2: #202528;
    --line: #2c3337;
    --line-strong: #444e54;
    --control-line: #6c7980;
    --ink: #edf1f2;
    --text: #c9d1d5;
    --muted: #97a3aa;
    --amber: #f2a64a;
    --amber-soft: #2e2416;
    --on-amber: #1b1206;
    --steel: #93b8d4;
    --steel-soft: #1c2a35;
    --warn: #ff9b7f;
    --warn-soft: #3a211b;
    --focus: #7fb2ff;
    --cup-a: #c98329;
    --cup-b: #6a8ea8;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121516;
  --surface: #1a1e20;
  --surface-2: #202528;
  --line: #2c3337;
  --line-strong: #444e54;
  --control-line: #6c7980;
  --ink: #edf1f2;
  --text: #c9d1d5;
  --muted: #97a3aa;
  --amber: #f2a64a;
  --amber-soft: #2e2416;
  --on-amber: #1b1206;
  --steel: #93b8d4;
  --steel-soft: #1c2a35;
  --warn: #ff9b7f;
  --warn-soft: #3a211b;
  --focus: #7fb2ff;
  --cup-a: #c98329;
  --cup-b: #6a8ea8;
  --shadow: none;
  color-scheme: dark;
}

/* ---------- base ---------- */
[hidden] { display: none !important; }
html { scroll-padding-top: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(154 84 8 / 0.15);
}
h1, h2, h3 {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 2.9rem); }
h2 { font-size: clamp(1.55rem, 1.3rem + 1vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p, li { text-wrap: pretty; }
a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
strong { color: var(--ink); font-weight: 600; }
.num, .lead-value, .parts td, .data td { font-variant-numeric: tabular-nums lining-nums; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
}
.mark { width: 28px; height: 28px; flex: none; }
.mark-cup { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.mark-a { fill: var(--cup-a); }
.mark-line { stroke: var(--steel); stroke-width: 2; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--amber); }
.theme-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.theme-toggle button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle button svg { width: 16px; height: 16px; }
.theme-toggle button:hover { color: var(--ink); }
.theme-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- intro ---------- */
.intro { padding: 28px 0 20px; max-width: 760px; }
.intro p { margin-top: 10px; font-size: 1.08rem; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

/* ---------- the tool ---------- */
.tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 48px;
}
.calc { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .calc { grid-template-columns: minmax(0, 1fr) 430px; }
  .results { border-left: 1px solid var(--line); }
}
.inputs { padding: 8px 24px 24px; }
.group { border: 0; padding: 0; margin: 0; }
.group + .group { border-top: 1px solid var(--line); margin-top: 8px; }
.group legend {
  float: left;
  width: 100%;
  padding: 18px 0 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
}
.group legend + * { clear: both; }

/* shape tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile-box {
  display: grid;
  justify-items: start;
  gap: 2px;
  height: 100%;
  padding: 10px 12px 12px;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.tile-art {
  width: 48px;
  height: 36px;
  margin-bottom: 4px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.tile-art .faint { opacity: 0.45; }
.tile-name { color: var(--ink); font-weight: 600; line-height: 1.25; }
.tile-hint { color: var(--muted); font-size: 0.85rem; line-height: 1.3; }
.tile:hover .tile-box { border-color: var(--ink); }
.tile input:checked + .tile-box { border: 2px solid var(--amber); padding: 9px 11px 11px; background: var(--amber-soft); }
.tile input:checked + .tile-box .tile-art { stroke: var(--amber); }
.tile input:focus-visible + .tile-box { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 520px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-box { padding: 8px 10px 10px; }
  .tile input:checked + .tile-box { padding: 7px 9px 9px; }
  .tile-art { width: 40px; height: 30px; margin-bottom: 2px; }
}

/* fields */
.field { margin-bottom: 14px; }
.field > label, .label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 0.92rem; font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.field-trio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
@media (min-width: 480px) { .field-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.input-unit { display: flex; align-items: stretch; }
input[type="text"], select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
select { font-size: 1rem; cursor: pointer; }
select option { background: var(--surface); color: var(--ink); }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.unit-tag {
  display: grid;
  place-items: center;
  min-width: 48px;
  padding: 0 10px;
  border: 1px solid var(--control-line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}
.input-unit:not(:has(.unit-tag)) input { border-radius: 8px; }
input[aria-invalid="true"] { border-color: var(--warn); border-width: 2px; padding: 7px 11px; }
input:focus-visible, select:focus-visible { outline-offset: 1px; border-radius: 8px; }
.help { margin-top: 5px; color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.help-block { margin: -4px 0 10px; }
.error { margin-top: 5px; color: var(--warn); font-size: 0.88rem; font-weight: 600; line-height: 1.4; }

/* segmented radios */
.segs { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--control-line); border-radius: 9px; padding: 3px; gap: 3px; background: var(--surface-2); }
.segs-wide { display: flex; }
.segs-wide .seg { flex: 1; }
.seg { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.seg:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }

/* depth chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--control-line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--amber); background: var(--amber-soft); color: var(--ink); }
@media (pointer: coarse) {
  .chip { min-height: 44px; padding: 0 14px; }
  .field-inline select { min-height: 44px; }
  .brand { min-height: 44px; }
  .site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .crumbs a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .working summary { min-height: 44px; }
  .seg span { min-height: 44px; }
  .theme-toggle button { width: 44px; height: 44px; }
}

/* phone summary under the measurements */
.quick {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 6px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.quick strong { color: inherit; font: 700 1.2rem var(--display); }
.quick span { font-size: 0.92rem; }
.quick .quick-go { margin-left: auto; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; }
.quick.is-stale { opacity: 0.5; }
@media (min-width: 960px) { .quick { display: none; } }

/* resin type, extra and density */
.more { margin: 4px 0 6px; border: 1px solid var(--line); border-radius: 10px; }
.more summary { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-height: 48px; padding: 8px 14px; cursor: pointer; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; color: var(--amber); font: 700 1.3rem var(--display); width: 14px; }
.more[open] summary::before { content: "–"; }
.more-title { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.more-values { color: var(--muted); font-size: 0.88rem; }
.more summary:hover .more-title { color: var(--amber); }
.more-body { padding: 4px 14px 2px; border-top: 1px solid var(--line); }
.more-body > .field:first-child { margin-top: 12px; }

/* ---------- results ---------- */
.results { padding: 8px 24px 24px; background: var(--surface-2); border-radius: 0 0 14px 14px; border-top: 1px solid var(--line); }
@media (min-width: 960px) {
  .results { border-top: 0; border-radius: 0 14px 14px 0; }
  .results-sticky { position: sticky; top: 16px; }
}
.results-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0 6px; }
.results-title { font-size: 1.3rem; }
.field-inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.field-inline label { margin: 0; font-size: 0.88rem; color: var(--muted); }
.field-inline select { width: auto; min-height: 40px; padding: 6px 10px; font-size: 0.95rem; }

.output { transition: opacity 0.15s; }
.output.is-stale { opacity: 0.45; }
.stale-note { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 0.9rem; font-weight: 600; }
.empty { padding: 24px 0; color: var(--muted); }

.lead { padding: 10px 0 6px; }
.lead-label { color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.lead-value { overflow-wrap: anywhere; color: var(--ink); font-family: var(--display); font-weight: 700; line-height: 1; margin-top: 4px; }
.lead-num { font-size: clamp(2.8rem, 2.2rem + 2vw, 3.6rem); letter-spacing: -0.01em; }
.lead-unit { font-size: 1.6rem; color: var(--text); }
.lead-sub { margin-top: 8px; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.mix { display: grid; gap: 4px; margin-top: 8px; }
.cup { margin: 0; }
.cup svg { width: 100%; max-width: 340px; height: auto; overflow: visible; }
.cup-wall { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.cup-a { fill: var(--cup-a); }
.cup-b { fill: var(--cup-b); }
.cup-join { stroke: var(--surface); stroke-width: 1.5; stroke-dasharray: 3 3; }
.cup-tick { stroke: var(--line-strong); stroke-width: 1.4; }
.cup-mark { stroke: var(--ink); stroke-width: 2; }
.cup-step { fill: var(--muted); font: 700 14px var(--display); }
.cup-label { fill: var(--text); font: 400 14px var(--body); }
.cup-num { fill: var(--ink); font-weight: 600; }
.cup-tag { fill: #171c1f; font: 700 18px var(--display); }
.cup-note-unused { margin: 4px 0 -4px; padding: 6px 10px; border-radius: 6px; background: var(--steel-soft); color: var(--ink); font-size: 0.88rem; font-weight: 600; justify-self: start; }

.parts { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.parts th, .parts td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; }
.parts thead th, .parts .col-head { color: var(--muted); font-size: 0.85rem; font-weight: 600; padding-top: 0; }
.parts td.num, .parts .col-head { text-align: right; padding-left: 12px; }
.parts tbody th { font-weight: 400; color: var(--text); }
.parts td { color: var(--ink); font-weight: 600; }
.parts .part-total th, .parts .part-total td { border-bottom: 0; font-weight: 600; color: var(--ink); }
.swatch { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 3px; vertical-align: -1px; background: transparent; }
.part-a .swatch { background: var(--cup-a); }
.part-b .swatch { background: var(--cup-b); }
.part-total .swatch { border: 1.5px solid var(--line-strong); }

.depth { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 0.93rem; line-height: 1.5; }
.depth p + p { margin-top: 6px; }
.depth-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.depth-title::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.depth-warn { border-color: var(--warn); background: var(--warn-soft); }
.depth-warn .depth-title::before { background: var(--warn); border-radius: 2px; transform: rotate(45deg); }
.depth-warn .depth-title { color: var(--warn); }

.also { margin-top: 14px; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.also-label { font-weight: 600; color: var(--text); }
.also-note { display: block; }
.also-item { white-space: nowrap; }
.parts-note { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: var(--steel-soft); color: var(--ink); font-size: 0.88rem; line-height: 1.45; }
.working { margin-top: 12px; font-size: 0.9rem; }
.working summary { cursor: pointer; color: var(--amber); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.working summary:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.working ol { margin-top: 6px; padding-left: 20px; color: var(--text); }
.working li + li { margin-top: 4px; }

.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: 600 0.98rem var(--body);
  text-decoration: none;
  cursor: pointer;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--amber); color: var(--on-amber); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; border-color: var(--control-line); color: var(--ink); }
.btn-quiet:hover { background: var(--surface); }
.toast { flex-basis: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 0.92rem; }
.toast[hidden] { display: none; }
.toast-undo:hover { background: rgb(255 255 255 / 0.12); }
.toast-undo { margin-left: auto; min-height: 36px; padding: 0 12px; border: 1px solid currentColor; border-radius: 6px; background: transparent; color: inherit; font-weight: 600; cursor: pointer; }

/* ---------- content ---------- */
.content { max-width: 760px; margin: 0 auto; padding: 0 20px 56px; }
.content > section, .content > .faq, .content > .related { margin-top: 44px; }
.content > section:first-child { margin-top: 0; }
.content h2 { margin-bottom: 12px; }
.content h3 { margin: 22px 0 8px; }
.content p, .content li, .intro p { max-width: 36em; }
.content .link-list li, .content .formulas li, .content .example-title { max-width: none; }
.content .steps + p, .content p + p, .content p + ul, .content ul + p, .content .table-wrap + p, .content p + .table-wrap { margin-top: 12px; }
.content ul, .content ol { padding-left: 22px; }
.content li + li { margin-top: 6px; }
.band { padding: 26px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.formulas { list-style: none; padding: 0 !important; margin: 14px 0; display: grid; gap: 6px; }
.formulas li { margin: 0 !important; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; min-height: 28px; }
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: 700 0.95rem var(--display);
}
.example { margin: 16px 0; padding: 14px 18px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.example-title { margin: 0 -18px 10px; padding: 0 18px 10px; border-bottom: 1px dashed var(--line-strong); color: var(--amber); font-weight: 600; }
.example ol { margin-top: 4px; }
.example p + ol, .example ol + p { margin-top: 10px; }

.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.band .table-wrap { border: 0; background: transparent; margin-left: -4px; margin-right: -4px; }
.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data caption { caption-side: top; text-align: left; padding: 10px 14px 0; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.data th, .data td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data thead th { color: var(--muted); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.data .num { text-align: right; white-space: nowrap; }
.data tbody th { color: var(--ink); font-weight: 600; }
.data tbody tr:last-child th, .data tbody tr:last-child td { border-bottom: 0; }
.data.text-cols td.num { text-align: left; white-space: normal; }
.data.text-cols td:nth-child(2), .data.text-cols td:nth-child(3) { white-space: nowrap; }
.data.nowrap-first tbody th { white-space: nowrap; }
.data.text-last td:last-child { text-align: left; white-space: normal; }

.link-list { list-style: none; padding: 0 !important; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 14px; }
.link-list li { margin: 0 !important; }
.link-list a { display: grid; gap: 2px; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; }
.link-list a:hover { border-color: var(--amber); }
.link-title { color: var(--ink); font-weight: 600; }
.link-note { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 0; color: var(--ink); font-weight: 600; cursor: pointer; list-style: none; }
.faq summary:hover { color: var(--amber); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--amber); font: 700 1.4rem var(--display); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 16px; }

/* ---------- legal, 404, footer ---------- */
.legal-body, .not-found { padding-top: 36px; }
.legal-body h1, .not-found h1 { margin-bottom: 8px; }
.legal-body h2 { margin: 28px 0 8px; font-size: 1.4rem; }
.legal-body ul { padding-left: 22px; }
.legal-body p + p { margin-top: 10px; }
.not-found p { margin-top: 12px; }
.not-found .btn { margin: 8px 0 18px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 26px 0 30px; font-size: 0.92rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.footer-row p { margin-top: 8px; color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; align-items: flex-start; }
.site-footer nav a { color: var(--text); font-weight: 600; }

@media (max-width: 640px) {
  .nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .inputs, .results { padding-left: 16px; padding-right: 16px; }
  .wrap { padding: 0 16px; }
  .content { padding: 0 16px 48px; }
  .band { padding: 20px 14px; }
  .intro { padding-top: 22px; }
  .tool { border-radius: 12px; margin-left: -4px; margin-right: -4px; }
}
@media (max-width: 380px) {
  .field-pair { grid-template-columns: minmax(0, 1fr); }
}
