/* Specktech — control-room theme. Single stylesheet shared by all pages. */

:root {
  /* colour */
  --bg: #0f1113;
  --panel: #171a1d;
  --panel-hi: #1e2226;
  --line: #2a2f34;
  --line-hi: #3a4148;
  --text: #e6e8ea;
  --dim: #9aa3ab;
  --steel: #7DA4CF;
  --steel-hi: #A9C4E2;
  --pass: #3ddc84;
  --reject: #ff5a4f;
  --ink: #0f1113;

  /* type */
  --f-display: "Big Shoulders Display", "Oswald", Impact, sans-serif;
  --f-body: "Chivo", "Segoe UI", sans-serif;
  --f-mono: "Chivo Mono", ui-monospace, Consolas, monospace;
  --t-label: 0.78rem;
  --t-sm: 0.9rem;
  --t-base: 1rem;
  --t-lg: clamp(1.05rem, 0.4vw + 1rem, 1.25rem);
  --t-h3: clamp(1.5rem, 1.2vw + 1.2rem, 2rem);
  --t-h2: clamp(2.3rem, 4.5vw + 0.8rem, 4.25rem);
  --t-h1: clamp(2.9rem, 8.5vw, 6.25rem);

  /* space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 128px);

  /* shape + motion */
  --r: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
  --max: 1200px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body.nav-lock { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 700; line-height: 1; }

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

::selection { background: var(--steel); color: var(--ink); }

/* ---------- layout helpers ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); position: relative; }
.section--panel { background: var(--panel); border-block: 1px solid var(--line); }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--steel);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--steel);
}

.section-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); max-width: 56rem; }
.section-head p { color: var(--dim); font-size: var(--t-lg); max-width: 46rem; }

.mono { font-family: var(--f-mono); }

/* corner-bracket frame (signature) */
.brackets { position: relative; --bk: var(--steel); --bk-len: 16px; }
.brackets::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--bk), var(--bk)) top left / var(--bk-len) 2px no-repeat,
    linear-gradient(var(--bk), var(--bk)) top left / 2px var(--bk-len) no-repeat,
    linear-gradient(var(--bk), var(--bk)) top right / var(--bk-len) 2px no-repeat,
    linear-gradient(var(--bk), var(--bk)) top right / 2px var(--bk-len) no-repeat,
    linear-gradient(var(--bk), var(--bk)) bottom left / var(--bk-len) 2px no-repeat,
    linear-gradient(var(--bk), var(--bk)) bottom left / 2px var(--bk-len) no-repeat,
    linear-gradient(var(--bk), var(--bk)) bottom right / var(--bk-len) 2px no-repeat,
    linear-gradient(var(--bk), var(--bk)) bottom right / 2px var(--bk-len) no-repeat;
}

.hazard {
  height: 12px;
  background: repeating-linear-gradient(-45deg, var(--steel) 0 12px, var(--ink) 12px 24px);
  border-block: 1px solid var(--line);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 2px solid var(--steel);
  border-radius: var(--r);
  background: var(--steel);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--steel-hi); border-color: var(--steel-hi); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-hi); }
.btn--ghost:hover { background: var(--panel-hi); border-color: var(--steel); color: var(--steel); }

.btn--sm { min-height: 44px; padding: 0 var(--s-4); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 19, 0.96);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 44px;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand-logo { display: block; width: auto; height: 30px; }
.site-footer .brand-logo { height: 38px; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); width: 100%; padding-bottom: var(--s-3); }
.nav__list { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  transition: color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--steel); }

.nav-toggle { display: none; }

/* with JS: mobile menu becomes a toggled panel */
html.js .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--s-3);
  background: transparent;
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
html.js .nav-toggle:hover { border-color: var(--steel); color: var(--steel); }
.nav-toggle__icon { position: relative; width: 18px; height: 12px; }
.nav-toggle__icon i,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle__icon::before { top: 0; }
.nav-toggle__icon i { top: 5px; }
.nav-toggle__icon::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon i { opacity: 0; }

html.js .nav {
  display: none;
  position: fixed;
  inset: 68px 0 0 0;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: var(--s-4);
  padding: var(--s-5) var(--gutter) var(--s-7);
  background: var(--bg);
  overflow-y: auto;
}
html.js .nav.is-open { display: flex; }
html.js .nav__list { flex-direction: column; gap: 0; }
html.js .nav__link { width: 100%; min-height: 56px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
html.js .nav .btn { width: 100%; }

@media (min-width: 1100px) {
  .site-header__bar { flex-wrap: nowrap; }
  .nav, html.js .nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    width: auto;
    padding: 0;
    background: none;
    overflow: visible;
    gap: var(--s-5);
  }
  html.js .nav__list { flex-direction: row; gap: 0 var(--s-4); }
  html.js .nav__link { width: auto; min-height: 44px; border: 0; font-size: 0.78rem; }
  html.js .nav .btn { width: auto; }
  html.js .nav-toggle { display: none; }
}

/* ---------- reveal on scroll ---------- */

[data-reveal] { transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
html.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(16px); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; }
  html.js [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
}

.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;
}

.link {
  color: var(--steel);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur) var(--ease);
}
.link:hover { color: var(--steel-hi); text-decoration-thickness: 2px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 96px);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(154, 163, 171, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(154, 163, 171, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  overflow: hidden;
}

.hero__inner { display: grid; gap: var(--s-7); align-items: center; }
.hero__copy { display: grid; gap: var(--s-5); justify-items: start; }
.hero h1 { font-size: var(--t-h1); line-height: 0.88; max-width: 12ch; }
.hero__sub { font-size: var(--t-lg); color: var(--dim); max-width: 36rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero__note { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.06em; color: var(--dim); }

@media (min-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-8); }
}

/* inspection HUD */

.hud {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: var(--s-4);
  display: grid;
  gap: var(--s-3);
  min-width: 0;
}
.hud__top {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}
.hud__live { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text); }
.hud__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--reject); animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 0% { opacity: 1; } 100% { opacity: 0.25; } }

.hud__scene { width: 100%; height: auto; background: #0b0d0e; border: 1px solid var(--line); }

.belt { animation: belt 7s linear infinite; }
@keyframes belt { from { transform: translateX(0); } to { transform: translateX(600px); } }

.hud__roi { animation: roi 1.6s ease-in-out infinite alternate; }
@keyframes roi { from { opacity: 0.55; } to { opacity: 1; } }

.hud.is-paused .belt,
.hud.is-paused .hud__roi,
.hud.is-paused .hud__dot { animation-play-state: paused; }

.hud__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hud__stats > div { background: var(--panel); padding: var(--s-3) var(--s-4); display: grid; gap: 2px; }
.hud__stats dt { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.hud__stats dd { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.hud__stats dd small { font-family: var(--f-mono); font-weight: 400; font-size: 0.7rem; color: var(--dim); letter-spacing: 0.04em; }
.hud__stats .is-pass { color: var(--pass); }
.hud__stats .is-reject { color: var(--reject); }

@media (min-width: 520px) {
  .hud__stats { grid-template-columns: repeat(4, 1fr); }
}

.hud__ticker { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.hud__ticker .p, .hud__ticker .r { width: 8px; height: 14px; background: var(--pass); opacity: 0.8; }
.hud__ticker .r { background: var(--reject); opacity: 1; }
.hud__ticker em { margin-left: var(--s-2); font-style: normal; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  .belt, .hud__roi, .hud__dot { animation: none; }
}

/* ---------- spec strip ---------- */

.specs { background: var(--bg); border-bottom: 1px solid var(--line); padding-block: var(--s-7); }
.specs__label {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: var(--steel);
  margin-bottom: var(--s-5);
}
.specs__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.specs__grid > div { background: var(--bg); padding: var(--s-5) var(--s-4); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--s-2); }
.specs__grid > div:last-child { grid-column: 1 / -1; }
.specs__grid dt { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.specs__grid dd { display: flex; align-items: baseline; gap: var(--s-2); }
.specs__num { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; }
.specs__unit { font-family: var(--f-mono); font-size: 0.9rem; color: var(--steel); }
.specs__foot { margin-top: var(--s-4); font-size: var(--t-sm); color: var(--dim); max-width: 46rem; }

@media (min-width: 900px) {
  .specs__grid { grid-template-columns: repeat(5, 1fr); }
  .specs__grid > div:last-child { grid-column: auto; }
}

/* ---------- how it works ---------- */

.how { display: grid; gap: var(--s-7); }
@media (min-width: 1000px) {
  .how { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-8); align-items: start; }
}

.steps { display: grid; gap: 0; counter-reset: none; }
.steps li { display: grid; grid-template-columns: 64px 1fr; column-gap: var(--s-4); padding-block: var(--s-5); border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps__num { grid-row: span 2; font-family: var(--f-display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--steel); }
.steps p { color: var(--dim); margin-top: var(--s-2); max-width: 34rem; }

.schematic { background: var(--bg); border: 1px solid var(--line); padding: var(--s-4); }
.schematic__scroll { overflow-x: auto; }
.schematic svg { width: 100%; min-width: 500px; height: auto; }
.schematic figcaption { margin-top: var(--s-3); font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--dim); }

/* ---------- defects ---------- */

.defects { display: grid; grid-template-columns: 1fr; gap: var(--s-6) var(--s-5); }
@media (min-width: 560px) { .defects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .defects { grid-template-columns: repeat(4, 1fr); } }

.defects li { display: grid; gap: var(--s-2); align-content: start; }
.defects__pic { --bk-len: 12px; width: 96px; height: 96px; margin-bottom: var(--s-3); background: var(--panel); border: 1px solid var(--line); padding: var(--s-2); }
.defects__pic svg { width: 100%; height: 100%; }
.defects h3 { font-size: 1.6rem; }
.defects p { color: var(--dim); font-size: var(--t-sm); }

/* ---------- industries ---------- */

.industries { border-top: 1px solid var(--line-hi); }
.industries li { display: grid; gap: var(--s-2) var(--s-5); padding-block: var(--s-5); border-bottom: 1px solid var(--line); transition: background var(--dur) var(--ease); }
.industries li:hover { background: var(--panel-hi); }
.industries__idx { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.14em; color: var(--steel); }
.industries p { color: var(--dim); max-width: 40rem; }
.note { margin-top: var(--s-5); padding: var(--s-4); border-left: 3px solid var(--steel); background: var(--bg); font-size: var(--t-sm); color: var(--dim); max-width: 46rem; }

@media (min-width: 800px) {
  .industries li { grid-template-columns: 56px minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: baseline; padding-inline: var(--s-3); }
}

/* ---------- data sheet ---------- */

.datasheet { background: var(--panel); border: 1px solid var(--line); }
.datasheet table { width: 100%; border-collapse: collapse; }
.datasheet th, .datasheet td { padding: var(--s-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.datasheet tbody tr:last-child > * { border-bottom: 0; }
.datasheet thead th { font-family: var(--f-mono); font-size: var(--t-label); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); background: var(--bg); }
.datasheet tbody th { width: 34%; font-family: var(--f-mono); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; color: var(--text); }
.datasheet td { color: var(--dim); }
@media (max-width: 479px) {
  .datasheet th, .datasheet td { padding: var(--s-3); }
  .datasheet tbody th { width: 38%; font-size: 0.74rem; }
  .datasheet td { font-size: var(--t-sm); }
}

/* ---------- pilot ---------- */

.pilot { display: grid; gap: var(--s-7); }
@media (min-width: 1000px) {
  .pilot { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); gap: var(--s-8); align-items: start; }
  .price { position: sticky; top: 100px; }
}

.timeline { position: relative; display: grid; gap: var(--s-6); padding-left: var(--s-6); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line-hi); }
.timeline li { position: relative; display: grid; gap: var(--s-2); }
.timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--s-6) + 1px); top: 4px; width: 14px; height: 14px; background: var(--bg); border: 2px solid var(--steel); }
.timeline__wk { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); }
.timeline p { color: var(--dim); max-width: 40rem; }
.timeline .timeline__out { color: var(--text); font-size: var(--t-sm); }

.price { background: var(--bg); border: 1px solid var(--line); padding: var(--s-6) var(--s-5); display: grid; gap: var(--s-4); justify-items: start; }
.price__amt { font-family: var(--f-display); font-weight: 800; font-size: clamp(3.4rem, 8vw, 5rem); line-height: 0.9; text-transform: uppercase; }
.price__amt span, .price__amt small { font-family: var(--f-mono); font-weight: 400; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--dim); }
.price__list { display: grid; gap: var(--s-3); color: var(--dim); font-size: var(--t-sm); }
.price__list li { padding-left: var(--s-5); position: relative; }
.price__list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 12px; height: 2px; background: var(--steel); }

/* ---------- FAQ ---------- */

.faq__list { border-top: 1px solid var(--line-hi); max-width: 56rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: var(--s-3) var(--s-7) var(--s-3) 0;
  font-weight: 700;
  font-size: var(--t-lg);
  cursor: pointer;
  list-style: none;
  transition: color var(--dur) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--steel); }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--steel);
  transition: transform var(--dur) var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details > p { padding: 0 var(--s-7) var(--s-5) 0; color: var(--dim); max-width: 44rem; }

/* ---------- contact ---------- */

.contact { display: grid; gap: var(--s-7); }
@media (min-width: 1000px) { .contact { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-8); align-items: start; } }
.contact__intro { display: grid; gap: var(--s-4); }
.contact__intro p:not(.eyebrow) { color: var(--dim); font-size: var(--t-lg); }

.form { background: var(--bg); border: 1px solid var(--line); padding: var(--s-5); display: grid; gap: var(--s-5); }
@media (min-width: 640px) {
  .form { grid-template-columns: 1fr 1fr; padding: var(--s-6); }
  .field--wide, .form__actions, .form__status { grid-column: 1 / -1; }
}
.field { display: grid; gap: var(--s-2); align-content: start; min-width: 0; }
.field label { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--s-3) var(--s-4);
  background: var(--panel);
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  color: var(--text);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.field textarea { resize: vertical; min-height: 128px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%), linear-gradient(135deg, var(--steel) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: var(--s-7); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--dim); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--steel); outline-offset: 1px; border-color: var(--steel); }
.field [aria-invalid="true"] { border-color: var(--reject); }
.field__err { font-size: var(--t-sm); color: #ff8a82; }
.field__err::before { content: "ERR "; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; }

.form__actions { display: grid; gap: var(--s-3); justify-items: start; }
.form__hint { font-size: var(--t-sm); color: var(--dim); max-width: 34rem; }
.form__status { padding: var(--s-4); border-left: 3px solid var(--pass); background: var(--panel); font-size: var(--t-sm); }
.form__status:empty { padding: 0; border: 0; margin: 0; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding-block: var(--s-7); }
.site-footer__inner { display: grid; gap: var(--s-5); align-items: start; }
.site-footer__tag { color: var(--dim); font-size: var(--t-sm); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--f-mono); font-size: 0.82rem; color: var(--text); text-decoration-color: var(--line-hi); text-underline-offset: 4px; transition: color var(--dur) var(--ease); }
.site-footer__links a:hover { color: var(--steel); text-decoration-color: var(--steel); }
.site-footer__copy { font-family: var(--f-mono); font-size: var(--t-label); color: var(--dim); }
@media (min-width: 800px) {
  .site-footer__inner { grid-template-columns: 1fr auto auto; align-items: center; gap: var(--s-7); }
}

/* ---------- legal + 404 ---------- */

.legal { padding-block: clamp(40px, 7vw, 88px) var(--section); }
.legal__inner { max-width: 70ch; }
.legal h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); margin-block: var(--s-4); }
.legal__updated { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.08em; color: var(--dim); margin-bottom: var(--s-6); }
.legal h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: var(--s-7) 0 var(--s-3); color: var(--steel); }
.legal p, .legal li { color: var(--text); margin-bottom: var(--s-3); }
.legal ul { padding-left: var(--s-5); list-style: square; margin-bottom: var(--s-4); }
.legal li::marker { color: var(--steel); }
.legal a { color: var(--steel); text-underline-offset: 3px; }

.lost { min-height: 70vh; display: grid; align-items: center; padding-block: var(--s-8); background-image: linear-gradient(to right, rgba(154,163,171,0.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(154,163,171,0.07) 1px, transparent 1px); background-size: 48px 48px; }
.lost__inner { display: grid; gap: var(--s-5); justify-items: start; }
.lost__code { font-family: var(--f-display); font-weight: 800; font-size: clamp(6rem, 28vw, 15rem); line-height: 0.85; color: var(--reject); }
.lost__box { display: inline-block; padding: var(--s-2) var(--s-3); background: var(--steel); color: var(--ink); font-family: var(--f-mono); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em; }
.lost p { color: var(--dim); max-width: 34rem; font-size: var(--t-lg); }
.lost h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
