/* NameAnvil — design system
   Palette: daylight, deepslate, grass, dirt. Flat surfaces, hard pixel bevels, no soft shadows.
   Fonts: system stacks only (no web-font requests). */

:root {
  --bg: #eef4f1;
  --surface: #ffffff;
  --ink: #272c33;
  --muted: #566069;
  --line: #c9d5cf;
  --grass: #3f7d2e;
  --grass-dark: #2e5e21;
  --grass-soft: #e3efd9;
  --dirt: #7a5233;
  --dirt-soft: #f1e7dc;
  --soil: #2f2419;
  --gold: #f2b705;
  --sky: #bfddeb;
  --focus: #1a5fa8;
  --err: #a32d2d;
  --err-soft: #fbeaea;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 3px;
  --wrap: 1120px;
  --header-h: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; display: block; }
main:focus { outline: none; }
img, svg { max-width: 100%; }
a { color: var(--grass-dark); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--gold); color: var(--ink); }

.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; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--r); font-weight: 700; }
.skip:focus { top: 0.75rem; color: #fff; }

/* ---------- Type ---------- */
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font: 800 clamp(2rem, 5.4vw, 3.2rem)/1.08 var(--mono); letter-spacing: -0.03em; }
h2 { font: 800 clamp(1.45rem, 3.2vw, 1.95rem)/1.2 var(--sans); }
h3 { font: 700 1.15rem/1.3 var(--sans); }
p { margin: 0 0 1rem; max-width: 68ch; }
.lead { font-size: clamp(1.08rem, 2.2vw, 1.25rem); line-height: 1.55; color: #3a424b; max-width: 60ch; }
.muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: 0.95em; }
.tagchip { display: inline-block; font: 700 0.9rem/1.3 var(--mono); background: var(--ink); color: #fff; padding: 0.15rem 0.5rem; border-radius: 2px; text-shadow: 1px 1px 0 #4b515a; margin: 0 0.25rem 0.25rem 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.55rem 1.15rem;
  font: 700 1rem/1.2 var(--sans); text-decoration: none; text-align: center;
  color: var(--ink); background: var(--surface);
  border: 2px solid var(--ink); border-radius: var(--r); cursor: pointer;
  box-shadow: inset -3px -3px 0 rgba(39, 44, 51, 0.16), inset 3px 3px 0 rgba(255, 255, 255, 0.75);
  transition: background-color 0.12s;
}
.btn:hover { background: var(--grass-soft); color: var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: inset 3px 3px 0 rgba(39, 44, 51, 0.22); }
.btn-primary { background: var(--grass); color: #fff; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.25), inset 3px 3px 0 rgba(255, 255, 255, 0.28); }
.btn-primary:hover { background: var(--grass-dark); color: #fff; }
.btn-primary:active { box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.3); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-sm { min-height: 44px; padding: 0.3rem 0.85rem; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 2px solid var(--ink); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font: 800 1.35rem/1 var(--mono); letter-spacing: -0.04em; padding: 0.4rem 0; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.site-nav a { display: block; padding: 0.55rem 0.85rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--grass); font-weight: 800; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); cursor: pointer; padding: 0; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 20px; height: 3px; background: var(--ink); position: relative; content: ""; }
.menu-bars::before { position: absolute; top: -7px; left: 0; }
.menu-bars::after { position: absolute; top: 7px; left: 0; }
.menu-btn[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-bars::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .js .menu-btn { display: inline-flex; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 2px solid var(--ink); }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 1rem 1rem; width: min(100%, var(--wrap)); margin-inline: auto; }
  .js .site-nav a { padding: 0.85rem 0.5rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
  .js .site-nav a[aria-current="page"] { border-left-color: var(--grass); border-bottom-color: var(--line); }
  .no-js-fallback { display: block; }
  html:not(.js) .bar { flex-wrap: wrap; padding-bottom: 0.5rem; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

/* ---------- Breadcrumbs / page head ---------- */
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin: 0 0 1.1rem; padding: 0; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; content: "/" / ""; margin-right: 0.5rem; color: var(--line); font-weight: 700; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.page-head { padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(1rem, 2.5vw, 1.75rem); }
.page-head h1 { margin-bottom: 0.9rem; }
.page-head .lead { margin: 0; }

/* ---------- Scene + nametag (the signature element) ---------- */
.scene { position: relative; margin: 0; aspect-ratio: 320 / 140; background: var(--sky); border: 2px solid var(--ink); overflow: hidden; }
.scene-art { display: block; width: 100%; height: 100%; }
.s-sky { fill: #bfddeb; } .s-cloud { fill: #f4fafc; } .s-hill-far { fill: #9cc58a; } .s-hill-near { fill: #7eb467; }
.s-grass { fill: #4f9a38; } .s-grass-hi { fill: #6cb552; } .s-dirt { fill: #8a5d3a; } .s-dirt-dk { fill: #744b2d; } .s-dirt-lt { fill: #9c6c46; }
.s-post { fill: #5b3d27; } .s-frame { fill: #2f3238; } .s-glow { fill: #f2b705; } .s-glow-hi { fill: #ffe27a; }
.nametag {
  position: absolute; left: 50%; top: 12%; transform: translateX(-50%);
  max-width: 94%; padding: 0.12em 0.6em 0.16em;
  background: rgba(39, 44, 51, 0.8); color: #fff;
  font: 700 clamp(1rem, 4.6vw, 1.55rem)/1.3 var(--mono); letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 #3f434a; white-space: nowrap; overflow: hidden; text-overflow: clip;
}
.nametag.pop { animation: pop 0.24s steps(4); }
@keyframes pop { from { transform: translate(-50%, 7px); opacity: 0.35; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- Home hero ---------- */
.hero { padding: clamp(2rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3.25rem); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero h1 { margin-bottom: 1.1rem; }
.facts { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 0.35rem; font-weight: 600; }
.facts li { padding-left: 1.6rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0.1rem; top: 0.55em; width: 0.8rem; height: 0.8rem; background: var(--grass); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.25), inset 2px 2px 0 rgba(255, 255, 255, 0.35); }
.mini { background: var(--surface); border: 2px solid var(--ink); }
.mini .scene { border: 0; border-bottom: 2px solid var(--ink); }
.mini-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0.9rem; align-items: center; }
.mini-bar select { flex: 1 1 140px; }
.mini-foot { padding: 0 0.9rem 0.9rem; margin: 0; font-size: 0.95rem; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; } }

/* ---------- Generic sections ---------- */
.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section + .section { border-top: 2px solid var(--line); }
.section > .wrap > h2, .section-head h2 { margin-bottom: 0.75rem; }
.section-head { margin-bottom: 1.5rem; }
.section-head p { margin: 0; color: #3a424b; }

.style-rows { list-style: none; margin: 0; padding: 0; border: 2px solid var(--ink); background: var(--surface); }
.style-rows li + li { border-top: 2px solid var(--line); }
.style-rows a { display: grid; gap: 0.25rem 1.25rem; padding: 0.9rem 1rem; text-decoration: none; color: var(--ink); align-items: center; }
.style-rows a:hover { background: var(--grass-soft); }
.style-rows strong { font: 800 1.15rem/1.2 var(--sans); }
.style-rows .desc { color: #3a424b; font-size: 0.98rem; }
@media (min-width: 820px) { .style-rows a { grid-template-columns: 150px 1fr auto; } }

.defs { display: grid; gap: 1.5rem; margin: 0; }
.defs dt { font: 800 1.1rem/1.3 var(--sans); margin-bottom: 0.25rem; }
.defs dd { margin: 0; max-width: 60ch; }
@media (min-width: 820px) { .defs.cols { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

.cta-band { background: var(--grass-soft); border: 2px solid var(--ink); padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1rem; align-items: center; }
.cta-band h2 { font-size: clamp(1.3rem, 2.8vw, 1.7rem); }
.cta-band p { margin: 0.4rem 0 0; }
@media (min-width: 760px) { .cta-band { grid-template-columns: 1fr auto; } }

/* ---------- Tool ---------- */
.tool { display: grid; gap: 1.5rem; padding-bottom: 2rem; }
@media (min-width: 980px) { .tool { grid-template-columns: minmax(310px, 390px) 1fr; gap: 2rem; align-items: start; } }
.controls { background: var(--surface); border: 2px solid var(--ink); padding: 1.1rem; display: grid; gap: 1.1rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .label { font: 800 0.98rem/1.3 var(--sans); padding: 0; margin-bottom: 0.5rem; display: block; }
.hint { font-weight: 400; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-block; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0.4rem 0.9rem; font-weight: 700; font-size: 0.98rem; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); color: var(--ink); box-shadow: inset -3px -3px 0 rgba(39, 44, 51, 0.08); }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--grass); border-color: var(--ink); color: #fff; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.25), inset 3px 3px 0 rgba(255, 255, 255, 0.25); }
.chip input:checked + span::before { content: ""; width: 0.7rem; height: 0.4rem; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -2px); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.style-blurb { margin: 0.6rem 0 0; font-size: 0.95rem; color: #3a424b; min-height: 2.9em; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-height: 46px; padding: 0.55rem 0.75rem; font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r);
  box-shadow: inset 2px 2px 0 rgba(39, 44, 51, 0.1);
}
textarea { min-height: 150px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
input.invalid, textarea.invalid, select.invalid { border-color: var(--err); background-color: var(--err-soft); }
.field { display: grid; gap: 0.2rem; }
.field-row { display: grid; gap: 0.75rem; grid-template-columns: 1fr 1fr; }
.field small, .field-msg { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.field-msg.error { color: var(--err); font-weight: 600; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; min-height: 44px; padding: 0.25rem 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0.15rem 0 0; flex: none; accent-color: var(--grass); cursor: pointer; }
.check span { font-size: 0.98rem; line-height: 1.4; }

details.fine { border: 2px solid var(--line); }
details.fine > summary { list-style: none; cursor: pointer; min-height: 46px; padding: 0.6rem 0.9rem; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
details.fine > summary::-webkit-details-marker { display: none; }
details.fine > summary::after { content: "+"; font: 800 1.3rem/1 var(--mono); }
details.fine[open] > summary::after { content: "\2212"; }
details.fine[open] > summary { border-bottom: 2px solid var(--line); }
.fine-body { padding: 0.9rem; display: grid; gap: 0.9rem; }

.output { min-width: 0; }
.status { margin: 0.9rem 0 0.75rem; padding: 0; min-height: 1.6em; font-size: 0.95rem; color: var(--muted); max-width: none; }
.status.warn { color: #7a4a00; background: #fff4d6; border-left: 4px solid var(--gold); padding: 0.5rem 0.75rem; }
.status.error { color: var(--err); background: var(--err-soft); border-left: 4px solid var(--err); padding: 0.5rem 0.75rem; font-weight: 600; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); min-height: 300px; align-content: start; }
.name-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0.4rem; background: var(--surface); border: 2px solid var(--line); border-left-width: 6px; padding: 0.3rem 0.4rem 0.3rem 0.5rem; }
.name-row.current { border-color: var(--ink); border-left-color: var(--grass); }
.name-btn { background: none; border: 0; padding: 0.2rem 0.3rem; text-align: left; cursor: pointer; color: var(--ink); min-width: 0; min-height: 46px; display: flex; flex-direction: column; justify-content: center; border-radius: 2px; }
.name-btn:hover .nm { text-decoration: underline; text-decoration-thickness: 2px; }
.name-btn .nm { font: 700 1.08rem/1.25 var(--mono); overflow-wrap: anywhere; }
.name-btn .len { font-size: 0.78rem; color: var(--muted); line-height: 1.2; }
.row-btn { min-height: 44px; min-width: 64px; padding: 0 0.7rem; font: 700 0.88rem/1 var(--sans); color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); cursor: pointer; box-shadow: inset -2px -2px 0 rgba(39, 44, 51, 0.16), inset 2px 2px 0 rgba(255, 255, 255, 0.75); }
.row-btn:hover { background: var(--grass-soft); }
.row-btn:active { transform: translateY(1px); }
.row-btn.done { background: var(--grass); color: #fff; }
.row-btn[aria-pressed="true"] { background: var(--gold); }
.row-btn[aria-pressed="true"]:hover { background: #e0a900; }
@media (max-width: 440px) {
  .name-row { grid-template-columns: 1fr 1fr; }
  .name-btn { grid-column: 1 / -1; }
}
.result-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.favs { margin-top: 1.5rem; border: 2px solid var(--ink); background: var(--surface); padding: 1rem; }
.favs h2 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.favs p { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--muted); }
.fav-list { list-style: none; margin: 0 0 0.9rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fav-list li { display: inline-flex; align-items: stretch; border: 2px solid var(--ink); background: var(--ink); }
.fav-list .tagchip { margin: 0; padding: 0.35rem 0.7rem; background: transparent; color: #fff; border: 0; min-width: 0; font-size: 0.95rem; cursor: pointer; }
.fav-list .tagchip:hover { background: #3b424b; }
.fav-list button { min-width: 44px; min-height: 44px; border: 0; background: var(--surface); color: var(--ink); font: 800 1.1rem/1 var(--sans); cursor: pointer; border-left: 2px solid var(--ink); }
.fav-list button:hover { background: var(--err-soft); }
.fav-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.toast { position: fixed; left: 50%; bottom: 1.25rem; z-index: 60; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 0.65rem 1rem; border-left: 6px solid var(--grass); font-weight: 600; font-size: 0.95rem; max-width: calc(100vw - 2rem); transition: opacity 0.15s, transform 0.15s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tool page content ---------- */
.prose { max-width: 70ch; overflow-wrap: anywhere; }
.prose h2 { margin: 2.2rem 0 0.8rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.6rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.1rem; max-width: 66ch; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--grass-dark); font-weight: 800; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1rem; min-height: 2.2rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; background: var(--grass); color: #fff; font: 800 1rem/1 var(--mono); border: 2px solid var(--ink); }
.callout { border: 2px solid var(--ink); border-left-width: 8px; border-left-color: var(--gold); background: #fffbe9; padding: 0.9rem 1rem; margin: 1.25rem 0; max-width: 70ch; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { font-weight: 800; }
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 2px solid var(--ink); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
th, td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 2px solid var(--line); vertical-align: top; }
thead th { background: var(--grass-soft); border-bottom: 2px solid var(--ink); font-weight: 800; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 700; }
.two-col { display: grid; gap: 2rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 3rem; } }

.faq details { border-bottom: 2px solid var(--line); }
.faq details:first-of-type { border-top: 2px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1rem 2.5rem 1rem 0; font: 700 1.08rem/1.4 var(--sans); position: relative; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.85rem; font: 800 1.4rem/1 var(--mono); color: var(--grass-dark); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 1.1rem; max-width: 66ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Grid children may shrink, so wide tables scroll inside their own wrapper instead of the page */
.doc-grid > *, .two-col > *, .tool > *, .hero-grid > *, .foot-grid > * { min-width: 0; }

/* ---------- Content pages (about, legal, contact) ---------- */
.doc { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.doc .prose h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); padding-top: 0.3rem; }
.updated { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.5rem; }
.doc-grid { display: grid; gap: 2rem; }
@media (min-width: 980px) { .doc-grid { grid-template-columns: 1fr 260px; gap: 3.5rem; align-items: start; } }
.toc { border: 2px solid var(--line); background: var(--surface); padding: 1rem 1.1rem; font-size: 0.95rem; }
.toc h2 { font: 800 1rem/1.3 var(--sans); margin: 0 0 0.5rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.3rem; }
@media (min-width: 980px) { .toc { position: sticky; top: calc(var(--header-h) + 1.25rem); } }
.contact-box { border: 2px solid var(--ink); background: var(--surface); padding: 1.25rem; display: grid; gap: 1rem; }
.form-alert { padding: 0.75rem 1rem; border-left: 5px solid var(--grass); background: var(--grass-soft); font-weight: 600; margin: 0; max-width: none; }
.form-alert.error { border-left-color: var(--err); background: var(--err-soft); color: var(--err); }
.notfound { padding: clamp(3rem, 9vw, 6rem) 0; }
.notfound .scene { max-width: 520px; margin: 0 0 2rem; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--soil); color: #ece3d8; border-top: 8px solid var(--grass); margin-top: 3rem; }
.site-footer a { color: #ece3d8; text-underline-offset: 0.2em; }
.site-footer a:hover { color: #fff; text-decoration-thickness: 3px; }
.foot-grid { display: grid; gap: 2rem; padding: 2.5rem 0 2rem; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; } }
.foot-brand .brand { color: #fff; }
.foot-brand .brand:hover { color: #fff; }
.foot-brand p { color: #d5c9bb; font-size: 0.95rem; margin: 0.9rem 0 0; max-width: 42ch; }
.site-footer h2 { font: 800 1rem/1.3 var(--sans); margin-bottom: 0.7rem; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.site-footer li a { display: inline-block; padding: 0.4rem 0; text-decoration: none; }
.site-footer li a:hover { text-decoration: underline; }
.foot-base { border-top: 1px solid #5a4a3a; padding: 1.1rem 0 1.6rem; font-size: 0.88rem; color: #cbbfb1; }
.foot-base p { margin: 0 0 0.4rem; max-width: none; }

/* ---------- Motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .menu-btn, .toast, .skip, .controls { display: none !important; }
  body { background: #fff; font-size: 11pt; }
}
