/* Dog Ideal Weight Calculator - shared styles */
:root {
  --bg: #fbf6ee; --surface: #ffffff; --surface-2: #f3ebdd; --text: #231a14; --muted: #5e5047;
  --border: #e2d6c3; --primary: #b4431a; --primary-hover: #8f3212; --on-primary: #ffffff;
  --accent: #0e5f63; --accent-soft: #dcefef; --success: #1f6b3a; --success-soft: #def2e4;
  --warn: #8a5a00; --warn-soft: #fff1cf; --danger: #a32020; --danger-soft: #fbe3e1;
  --over: #9a3a0f; --over-soft: #fde6d8; --focus: #0e5f63; --shadow: 0 1px 2px rgba(35,26,20,.06), 0 6px 18px rgba(35,26,20,.06);
  --r-s: 8px; --r-m: 12px; --r-l: 18px;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --font-head: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120e; --surface: #211a15; --surface-2: #2b221b; --text: #f5ece0; --muted: #c4b5a4;
    --border: #3d3228; --primary: #f08a5d; --primary-hover: #f6a07b; --on-primary: #1b0f08;
    --accent: #66c9c9; --accent-soft: #15383a; --success: #7bd493; --success-soft: #16301f;
    --warn: #f2c35a; --warn-soft: #3a2d0e; --danger: #ff9b94; --danger-soft: #3d1c1a;
    --over: #ffab80; --over-soft: #3d2316; --focus: #66c9c9; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 var(--s3); letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
p { margin: 0 0 var(--s4); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--primary); }
ul, ol { margin: 0 0 var(--s4); padding-left: 1.25rem; }
li { margin-bottom: var(--s2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }
.skip { position: absolute; left: .75rem; top: -4rem; background: var(--primary); color: var(--on-primary); padding: .75rem 1rem; border-radius: var(--r-s); z-index: 100; font-weight: 600; }
.skip:focus { top: .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: var(--s3); }
.lead { font-size: clamp(1.1rem, 1.02rem + .4vw, 1.3rem); color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .7rem 1.35rem; border-radius: 999px; border: 2px solid var(--primary); background: var(--primary); color: var(--on-primary); font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
.btn svg { width: 1.1rem; height: 1.1rem; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand svg { width: 2.4rem; height: 2.4rem; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; }
.brand-text i { font-style: normal; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--primary); font-weight: 700; margin-top: 3px; }
.menu-btn { display: none; width: 2.9rem; height: 2.9rem; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--r-m); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 1.4rem; height: 1.4rem; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.nav ul { list-style: none; display: flex; align-items: center; gap: var(--s2); margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .4rem .95rem; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--primary); border-radius: 0; }
.nav a.nav-cta { background: var(--primary); color: var(--on-primary); box-shadow: none; border-radius: 999px; }
.nav a.nav-cta:hover { background: var(--primary-hover); color: var(--on-primary); }
.nav a.nav-cta[aria-current="page"] { outline: 2px solid var(--text); outline-offset: 2px; }

@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
  .nav[data-open="true"] { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
  .nav ul { flex-direction: column; align-items: stretch; padding: var(--s3) 1.25rem var(--s5); gap: var(--s1); }
  .nav a { width: 100%; min-height: 3rem; border-radius: var(--r-m); padding-inline: 1rem; }
  .nav a[aria-current="page"] { box-shadow: none; background: var(--surface-2); }
  .nav a.nav-cta { justify-content: center; margin-top: var(--s2); }
}

/* Measuring tape motif */
.tape { height: 22px; background:
  repeating-linear-gradient(90deg, var(--muted) 0 1.5px, rgba(0,0,0,0) 1.5px 12px) 0 100% / 100% 9px no-repeat,
  repeating-linear-gradient(90deg, var(--muted) 0 1.5px, rgba(0,0,0,0) 1.5px 60px) 0 100% / 100% 18px no-repeat;
  opacity: .45; }

/* Sections */
.section { padding-block: clamp(2.75rem, 2rem + 4vw, 5rem); }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 40rem; margin-bottom: var(--s6); }
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Hero */
.hero { padding-block: clamp(2.25rem, 1.5rem + 4vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.hero-grid { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: var(--s8); } }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero .btn-row { margin-top: var(--s5); }
.hero-note { margin-top: var(--s4); font-size: .95rem; color: var(--muted); display: flex; gap: .5rem; align-items: center; }
.hero-note svg { width: 1.1rem; height: 1.1rem; color: var(--success); flex: none; }

/* Dog tag result card */
.tag-card { position: relative; background: var(--surface); border: 1.5px solid var(--border); border-radius: 28px 28px var(--r-l) var(--r-l); padding: var(--s6) var(--s5) var(--s5); box-shadow: var(--shadow); }
.tag-card::before { content: ""; position: absolute; top: 12px; left: 50%; width: 46px; height: 8px; margin-left: -23px; border-radius: 99px; background: var(--surface-2); border: 1.5px solid var(--border); }
.tag-label { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: var(--s3); }
.tag-label strong { color: var(--text); }

/* Status badges: icon + text, never color alone */
.badge { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border-radius: 999px; font-weight: 700; font-size: .95rem; border: 1.5px solid currentColor; }
.badge svg { width: 1rem; height: 1rem; }
.badge-ideal { color: var(--success); background: var(--success-soft); }
.badge-underweight { color: var(--warn); background: var(--warn-soft); }
.badge-overweight { color: var(--over); background: var(--over-soft); }
.badge-obese { color: var(--danger); background: var(--danger-soft); }

/* Gauge */
.gauge { width: 100%; height: auto; overflow: visible; }
.gauge text { font-family: var(--font-body); fill: var(--text); font-variant-numeric: tabular-nums; }
.g-track { fill: var(--surface-2); stroke: var(--border); }
.g-band { fill: var(--success-soft); stroke: var(--success); stroke-width: 2; }
.g-tick { stroke: var(--muted); stroke-width: 1.5; }
.g-pin { fill: var(--primary); }
.g-pin-text { fill: var(--on-primary) !important; font-weight: 700; }
.g-muted { fill: var(--muted) !important; }
.g-bandtext { fill: var(--success) !important; font-weight: 700; }

/* Cards, steps */
.grid { display: grid; gap: var(--s5); }
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-l); padding: var(--s5); }
.card h3 { margin-bottom: var(--s2); }
.card p:last-of-type { margin-bottom: 0; }
.ico { width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: var(--s3); }
.ico svg { width: 1.5rem; height: 1.5rem; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: var(--s5); }
.steps li { counter-increment: step; position: relative; padding-left: 4rem; margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2.9rem; height: 2.9rem; border-radius: 50% 50% 50% 8px; background: var(--primary); color: var(--on-primary); font: 700 1.25rem var(--font-head); display: grid; place-items: center; }
.steps h3 { margin-bottom: .25rem; }
.split { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: start; } }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--success); }
.checklist li::after { content: ""; position: absolute; left: .4rem; top: .5rem; width: .3rem; height: .55rem; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* FAQ */
.faq details { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-m); margin-bottom: var(--s3); }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: var(--s4); align-items: center; min-height: 3.25rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--primary); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq .ans { padding: 0 1.25rem 1.1rem; color: var(--muted); }
.faq .ans p:last-of-type { margin-bottom: 0; }

/* CTA band */
.cta-band { background: var(--accent); color: #fff; border-radius: var(--r-l); padding: clamp(1.75rem, 1rem + 3vw, 3.5rem); display: grid; gap: var(--s4); }
.cta-band h2 { color: #fff; margin-bottom: 0; }
.cta-band p { color: #e6f3f3; margin: 0; max-width: 36rem; }
.cta-band .btn { background: #fff; color: #0b4a4d; border-color: #fff; justify-self: start; }
.cta-band .btn:hover { background: #e6f3f3; color: #0b4a4d; }
@media (prefers-color-scheme: dark) { .cta-band { background: #0f4a4d; } }

/* Breadcrumbs, page header */
.crumbs { padding-top: var(--s5); font-size: .92rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; color: var(--muted); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--muted); }
.page-head { padding-block: var(--s5) var(--s6); }
.page-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); }
.updated { font-size: .92rem; color: var(--muted); }
.prose { max-width: 46rem; }
.prose h2 { margin-top: var(--s7); font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
.prose h3 { margin-top: var(--s5); }
.prose li { margin-bottom: var(--s2); }

/* Forms */
.field { margin-bottom: var(--s4); }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: .35rem; padding: 0; }
.hint { display: block; font-size: .9rem; color: var(--muted); margin-top: .3rem; }
.control { width: 100%; min-height: 2.9rem; padding: .6rem .85rem; border: 1.5px solid var(--muted); border-radius: var(--r-s); background: var(--surface); color: var(--text); font: inherit; }
.control:hover { border-color: var(--text); }
textarea.control { min-height: 9rem; resize: vertical; }
select.control { appearance: none; padding-right: 2.4rem; background-image: linear-gradient(45deg, rgba(0,0,0,0) 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, rgba(0,0,0,0) 50%); background-position: calc(100% - 1.15rem) 52%, calc(100% - .8rem) 52%; background-size: .35rem .35rem; background-repeat: no-repeat; }
.control[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.control:disabled { opacity: .75; background: var(--surface-2); }
.err { display: none; color: var(--danger); font-weight: 600; font-size: .92rem; margin-top: .35rem; }
.err.show { display: flex; gap: .4rem; align-items: flex-start; }
.err.show::before { content: "!"; flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; border-radius: 50%; background: var(--danger); color: var(--surface); font-size: .75rem; line-height: 1.15rem; text-align: center; font-weight: 800; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); min-width: 0; }
.row2 { display: grid; gap: var(--s3); grid-template-columns: 1fr 1fr; }
.weight-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s3); align-items: start; }
.seg { display: inline-flex; border: 1.5px solid var(--muted); border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { margin: 0; min-height: 2.75rem; min-width: 3.4rem; display: grid; place-items: center; padding: 0 .9rem; cursor: pointer; font-weight: 700; }
.seg input:checked + label { background: var(--text); color: var(--bg); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: -3px; }
.seg-wide label { min-width: 5rem; flex: 1; }
.seg-wide { display: flex; width: 100%; }

/* Body condition score dial */
.bcs { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.bcs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bcs label { margin: 0; min-height: 3rem; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); font: 700 1.1rem var(--font-head); cursor: pointer; position: relative; font-variant-numeric: tabular-nums; }
.bcs label:hover { border-color: var(--text); }
.bcs input:checked + label { background: var(--text); color: var(--bg); border-color: var(--text); }
.bcs input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.bcs .z1 label { border-bottom: 4px solid var(--warn); }
.bcs .z2 label { border-bottom: 4px solid var(--success); }
.bcs .z3 label { border-bottom: 4px solid var(--over); }
.bcs .z4 label { border-bottom: 4px solid var(--danger); }
.bcs span.cell { display: contents; }
.bcs-legend { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: .35rem; gap: 4px; }
.bcs-legend span { text-align: center; }
.bcs-desc { margin-top: var(--s3); padding: var(--s3) var(--s4); background: var(--surface-2); border-radius: var(--r-s); font-size: .95rem; min-height: 4.2rem; border-left: 4px solid var(--accent); }

/* Tool layout */
.tool-grid { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 960px) { .tool-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } .result-col { position: sticky; top: 5.5rem; } }
.panel { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-l); padding: clamp(1.1rem, .8rem + 1.5vw, 2rem); box-shadow: var(--shadow); }
.panel h2 { font-size: 1.4rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.result-panel { min-height: 30rem; }
.result-empty { display: grid; place-items: center; text-align: center; min-height: 24rem; color: var(--muted); padding: var(--s5); }
.result-empty svg { width: 4.5rem; height: 4.5rem; margin-inline: auto; margin-bottom: var(--s3); color: var(--border); }
.result-head { margin-bottom: var(--s4); }
.big { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.1rem, 1.5rem + 3vw, 3.2rem); line-height: 1.05; font-variant-numeric: tabular-nums; margin: var(--s2) 0; }
.big small { font-size: .45em; font-weight: 600; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin: var(--s4) 0; }
.stat { background: var(--surface-2); border-radius: var(--r-m); padding: var(--s3) var(--s4); }
.stat dt { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat dd { margin: 0; font: 700 1.25rem var(--font-head); font-variant-numeric: tabular-nums; }
.explain { font-size: .98rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: var(--s4); margin-top: var(--s4); }
.alert { display: flex; gap: .65rem; padding: var(--s3) var(--s4); border-radius: var(--r-m); margin: var(--s3) 0; font-size: .96rem; border: 1.5px solid; }
.alert svg { width: 1.2rem; height: 1.2rem; flex: none; margin-top: .2rem; }
.alert-urgent { background: var(--danger-soft); border-color: var(--danger); color: var(--text); }
.alert-urgent svg { color: var(--danger); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn); color: var(--text); }
.alert-warn svg { color: var(--warn); }
.alert-info { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.alert-info svg { color: var(--accent); }
.alert-ok { background: var(--success-soft); border-color: var(--success); color: var(--text); }
.alert-ok svg { color: var(--success); }
.result-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.notice { font-size: .9rem; color: var(--muted); margin-top: var(--s3); }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--border); border-radius: var(--r-m); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: .98rem; }
th, td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; }
tbody tr:last-of-type td { border-bottom: 0; }
.formula { background: var(--surface-2); border-left: 4px solid var(--primary); border-radius: var(--r-s); padding: var(--s4); font-variant-numeric: tabular-nums; overflow-x: auto; }
.formula code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; white-space: pre-wrap; }
.example { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-m); padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
.example h3 { margin-bottom: var(--s2); }

/* Footer */
.site-footer { margin-top: var(--s8); background: var(--surface-2); border-top: 1px solid var(--border); padding-top: var(--s7); }
.foot-grid { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .1rem; }
.site-footer li a { display: inline-block; padding: .4rem 0; color: var(--text); text-decoration: none; min-height: 2.25rem; }
.site-footer li a:hover { color: var(--primary); text-decoration: underline; }
.foot-brand p { color: var(--muted); max-width: 22rem; margin-top: var(--s3); }
.copy { border-top: 1px solid var(--border); margin-top: var(--s6); padding-block: var(--s4); font-size: .9rem; color: var(--muted); }

/* 404 */
.notfound { text-align: center; padding-block: var(--s8); }
.notfound .big { font-size: clamp(4rem, 3rem + 8vw, 8rem); color: var(--primary); }
.notfound .btn-row { justify-content: center; margin-top: var(--s5); }

@media (max-width: 480px) {
  .bcs { gap: 3px; }
  .bcs label { min-height: 3.1rem; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .bcs-legend { font-size: .7rem; }
}
@media (min-width: 1600px) { html { font-size: 112.5%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .form-col, .result-actions, .skip, .tape, .no-print, .crumbs, .below-tool { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .tool-grid { display: block; }
  .panel { box-shadow: none; border: 1px solid #999; }
  .print-head { display: block !important; }
}
.print-head { display: none; margin-bottom: var(--s4); }
[hidden] { display: none !important; }
.split > *, .hero-grid > *, .tool-grid > *, .grid > *, .foot-grid > * { min-width: 0; }
.keybox { background: var(--accent-soft); border-left: 5px solid var(--accent); border-radius: var(--r-m); padding: var(--s4) var(--s5); margin: 0 0 var(--s5); }
.keybox p:last-of-type { margin-bottom: 0; }
.keybox strong.kb-title { display: block; font-family: var(--font-head); margin-bottom: .25rem; }
.toc { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-m); padding: var(--s4) var(--s5); margin: 0 0 var(--s6); }
.toc h2 { font-size: 1rem; margin-bottom: var(--s2); font-family: var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; columns: 2 16rem; column-gap: var(--s6); }
.toc li { margin-bottom: .3rem; break-inside: avoid; }
.section-tight { padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }
.compact table { min-width: 36rem; font-size: .95rem; }
.small { font-size: .92rem; }

.next-steps { background: var(--accent-soft); border-radius: var(--r-m); padding: var(--s4) var(--s5); margin-top: var(--s4); }
.next-steps ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.next-steps li { margin-bottom: .3rem; }
.quick { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-l); padding: var(--s4) var(--s5); transition: transform .15s ease, border-color .15s ease; }
.quick:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--text); }
.quick b { display: block; font-family: var(--font-head); font-size: 1.1rem; margin-bottom: .2rem; }
.quick span { color: var(--muted); font-size: .95rem; }
.defs dt { font-family: var(--font-head); font-weight: 700; margin-top: var(--s4); }
.defs dd { margin: .2rem 0 0; color: var(--muted); }
