/* ==========================================================================
   YourSpec.dev: "engineering drawing set" one-pager
   Source of truth: DESIGN_SPEC.md (Rev B · Oct 2026)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #101418;
  --bg-alt: #0e1114;

  --text-heading: #e8ecef;
  --text-strong: #c6ced4;
  --text-body: #aeb7bf;
  --text-muted: #96a0a9;
  --text-secondary: #8b959e;
  /* Spec value is #5f6a73 (3.3:1 on --bg, fails WCAG AA for small text).
     #77828b is the nearest tone that passes AA (4.6:1). Set back to #5f6a73 for exact design parity. */
  --text-annotation: #77828b;

  --cyan: #33b7c7;
  --cyan-hover: #5fd0de;
  --amber: #e8a33d;
  --amber-hover: #f2bd66;
  --green: #4ade9b;
  --yellow: #e8c268;
  --dim-line: #3a444d;

  --line-08: rgba(255, 255, 255, 0.08);
  --line-10: rgba(255, 255, 255, 0.1);
  --line-12: rgba(255, 255, 255, 0.12);
  --line-14: rgba(255, 255, 255, 0.14);

  --grid-line: rgba(140, 160, 175, 0.06);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --content: 1160px;
  --pad-x: clamp(20px, 5vw, 48px);
  --pad-y: clamp(56px, 8vw, 96px);

  --ease: cubic-bezier(.2, .6, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-heading);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* backstop only; root causes are fixed below */
}

h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-hover); }

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

::selection { background: rgba(51, 183, 199, 0.35); }

[hidden] { display: none !important; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--amber);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
}
.skip-link:focus { top: 12px; color: var(--bg); }

/* Larger invisible hit area for small text links (keeps the visual layout unchanged). */
.hit { position: relative; }
.hit::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  top: 50%;
  height: max(100%, 44px);
  transform: translateY(-50%);
}

.wrap {
  max-width: calc(var(--content) + 2 * var(--pad-x));
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}

.section { border-top: 1px solid var(--line-08); scroll-margin-top: 70px; }
.section--alt { background: var(--bg-alt); }

.grid-bg { position: relative; overflow: hidden; }
.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.grid-bg > * { position: relative; }

/* ---------- Shared type ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--amber);
}

.microlabel {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--text-annotation);
}

.chip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  border-radius: 3px;
  white-space: nowrap;
}
.chip--amber { color: var(--bg); background: var(--amber); padding: 4px 10px; }
.chip--outline { color: var(--cyan); border: 1px solid rgba(51, 183, 199, 0.4); padding: 3px 8px; }
.chip--reserved { color: var(--amber); border: 1px solid rgba(232, 163, 61, 0.4); padding: 3px 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 4px;
  background: var(--amber);
  color: var(--bg);
  transition: box-shadow .25s, transform .25s;
}
.btn:hover { color: var(--bg); box-shadow: 0 0 26px rgba(232, 163, 61, 0.45); transform: translateY(-1px); }

.btn--block { display: block; text-align: center; font-size: 13.5px; padding: 12px 20px; }
.btn--block:hover { box-shadow: 0 0 22px rgba(232, 163, 61, 0.4); }

.btn--lg { font-size: 16px; padding: 16px 34px; }
.btn--lg:hover { box-shadow: 0 0 32px rgba(232, 163, 61, 0.5); transform: translateY(-2px); }

.link-amber {
  font-family: var(--font-mono);
  color: var(--amber);
}
.link-amber:hover { color: var(--amber-hover); }

/* ---------- Section header (DWG 002–005) ---------- */
.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--line-10);
  padding-bottom: 14px;
  margin-bottom: 42px;
}
.sheet-head__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; }
.sheet-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.4px;
}
.sheet-head--tight { margin-bottom: 16px; }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px var(--pad-x);
  background: rgba(16, 20, 24, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-08);
}
.nav__brand { display: flex; align-items: baseline; gap: 10px; color: var(--text-heading); min-width: 0; }
.nav__brand:hover { color: var(--text-heading); }
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.wordmark span { color: var(--cyan); }
.nav__tagline {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.8px;
  color: var(--text-annotation);
  white-space: nowrap;
}
.nav__right { display: flex; align-items: center; gap: 26px; }
.nav__links { display: flex; gap: 22px; font-family: var(--font-mono); font-size: 11.5px; }
.nav__links a { color: var(--text-secondary); white-space: nowrap; }
.nav__links a:hover { color: var(--text-heading); }
.nav__links a.nav__labs { color: var(--cyan); }
.nav__links a.nav__labs:hover { color: var(--cyan-hover); }
/* With the 4th nav link (LABS) the tagline would collide with the links below ~1000px. */
@media (max-width: 999.98px) { .nav__tagline { display: none; } }
.nav__cta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  color: var(--bg);
  background: var(--amber);
  padding: 9px 16px;
  border-radius: 4px;
  white-space: nowrap;
  transition: box-shadow .25s, transform .25s;
}
.nav__cta:hover { color: var(--bg); box-shadow: 0 0 22px rgba(232, 163, 61, 0.45); transform: translateY(-1px); }
.nav__cta-short { display: none; }

/* ==========================================================================
   DWG 001: Hero
   ========================================================================== */
.hero .wrap {
  padding-bottom: clamp(56px, 8vw, 88px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(32px, 4vw, 56px);
}
.hero__copy { flex: 1 1 520px; min-width: 0; }
.hero .kicker { margin-bottom: 20px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.5px;
  max-width: 600px;
}
.hero h1 span { border-bottom: 3px solid var(--cyan); padding-bottom: 2px; }
.hero__lede { font-size: 15.5px; color: var(--text-muted); line-height: 1.65; margin-top: 22px; max-width: 470px; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }
.hero__textlink {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--dim-line);
  padding-bottom: 2px;
  transition: color .2s;
}
.hero__textlink:hover { color: var(--text-heading); }

/* SPEC strip */
.spec-strip {
  display: flex;
  margin-top: 46px;
  max-width: 562px;
  border: 1px solid var(--line-10);
  border-radius: 6px;
}
.spec-strip > div { flex: 1 1 183px; padding: 13px 16px; border-right: 1px solid var(--line-10); }
.spec-strip > div:last-child { border-right: 0; }
.spec-strip dt { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; color: var(--text-annotation); }
.spec-strip dd { font-size: 12.5px; color: var(--text-strong); margin-top: 4px; }

/* FIG. 1 */
.fig {
  flex: 0 1 414px;
  min-width: min(324px, 100%);
  position: relative;
  padding: 8px 34px 8px 0;
}
.fig__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--text-annotation);
}
.fig__head span:last-child { color: var(--amber); white-space: nowrap; }
.fig__stages { display: flex; flex-direction: column; }
.fig__box { border: 1px solid; border-radius: 5px; padding: 12px 16px; }
.fig__box b { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 11px; }
.fig__box span { display: block; font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; }
.fig__box--intake { border-color: rgba(51, 183, 199, 0.5); background: rgba(51, 183, 199, 0.06); }
.fig__box--intake b { color: var(--cyan); }
.fig__box--core { border-color: rgba(232, 163, 61, 0.55); background: rgba(232, 163, 61, 0.06); }
.fig__box--core b { color: var(--amber); }
.fig__box--call { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.03); }
.fig__box--call b { color: var(--text-heading); }
.fig__arrow { display: flex; justify-content: center; }
.fig__arrow svg { display: block; }
.flow { animation: dashflow 1.6s linear infinite; }

.dim { position: absolute; background: var(--dim-line); }
.dim--line { top: 40px; bottom: 8px; right: 10px; width: 1px; }
.dim--tick { right: 4px; width: 13px; height: 1px; }
.dim--top { top: 40px; }
.dim--bottom { bottom: 8px; }
.dim__label {
  position: absolute;
  top: 120px;
  right: -5px;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-annotation);
  white-space: nowrap;
}

/* ==========================================================================
   DWG 002: Principles
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 24px 20px;
  border: 1px solid var(--line-10);
  border-radius: 8px;
  background: var(--bg-alt);
  transition: border-color .25s;
}
.card:hover { border-color: rgba(51, 183, 199, 0.45); }
.card h3 {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: var(--cyan);
}
.card p { font-size: 14px; line-height: 1.7; color: var(--text-body); }
.card .card__stamp {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line-10);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
  color: var(--text-annotation);
}

/* ==========================================================================
   DWG 003: Tools
   ========================================================================== */
.tools__intro { margin-bottom: 40px; font-size: 14.5px; line-height: 1.65; color: var(--text-secondary); max-width: 560px; }

.triage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 183, 199, 0.3);
  border-radius: 10px;
  background: var(--bg);
}
.triage__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-08);
}
.triage__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.tool-id { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; color: var(--text-annotation); }
.triage__title h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--text-heading); }

.triage__body { display: flex; flex-wrap: wrap; }
.pipeline {
  flex: 1 1 665px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
  padding: 22px;
  border-right: 1px solid var(--line-08);
}
.pipe-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pipe-col__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--text-annotation);
}
.pipe-col__note { font-family: var(--font-mono); font-size: 9px; line-height: 1.6; color: var(--text-annotation); }

.dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2.2s ease-in-out infinite;
}
.dot--lg { width: 6px; height: 6px; }

.inbox { display: flex; flex-direction: column; gap: 8px; }
.req {
  border: 1px solid var(--line-08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 9px 12px;
  animation: rowcycle 9s ease-in-out infinite;
}
.req:nth-child(1) { border-color: rgba(51, 183, 199, 0.5); background: rgba(51, 183, 199, 0.06); border-left: 3px solid var(--cyan); }
.req:nth-child(2) { animation-delay: 3s; }
.req:nth-child(3) { animation-delay: 6s; }
.req b { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--text-heading); }
.req span { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.checks {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line-08);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
}
.checks li { display: flex; justify-content: space-between; gap: 8px; color: var(--text-secondary); }
.checks .ok { color: var(--green); }
.checks .verdict {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-12);
  color: var(--text-heading);
}
.verdict-chip { color: var(--bg); background: var(--green); padding: 1px 8px; border-radius: 3px; white-space: nowrap; }

.routed { display: flex; flex-direction: column; gap: 8px; }
.routed li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.routed li span:last-child { color: var(--text-heading); }
.routed .r-quote { border-color: rgba(74, 222, 155, 0.35); }
.routed .r-quote span:first-child { color: var(--green); }
.routed .r-review { border-color: rgba(232, 194, 104, 0.35); }
.routed .r-review span:first-child { color: var(--yellow); }
.routed .r-hold { border-color: rgba(255, 255, 255, 0.16); }
.routed .r-hold span:first-child { color: var(--text-muted); }

.specsheet { flex: 1 1 304px; display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.kv { display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; line-height: 1.55; }
.kv > div { display: flex; gap: 10px; }
.kv dt { flex: 0 0 76px; padding-top: 2px; font-family: var(--font-mono); font-size: 10px; color: var(--text-annotation); }
.kv dd { color: var(--text-strong); min-width: 0; }
.kv .status { color: var(--yellow); }
.specsheet__foot { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line-12); }
.specsheet__foot p { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); }
.specsheet__foot a {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  border-bottom: 1px solid rgba(232, 163, 61, 0.5);
  padding-bottom: 2px;
}

/* Slots */
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.slot {
  --accent: var(--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 232px;
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  transition: border-color .25s;
}
.slot:hover { border-color: rgba(51, 183, 199, 0.5); }
.slot--reserved { --accent: var(--amber); border-color: rgba(232, 163, 61, 0.4); }
.slot--reserved:hover { border-color: rgba(232, 163, 61, 0.8); }
.slot::before, .slot::after { content: ''; position: absolute; width: 14px; height: 14px; }
.slot::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-radius: 2px 0 0 0; }
.slot::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); border-radius: 0 0 2px 0; }
.slot__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slot h3 { margin-top: 6px; font-family: var(--font-display); font-weight: 600; font-size: 15.5px; color: var(--text-strong); }
.slot--reserved h3 { color: var(--text-heading); }
.slot p { font-size: 12.5px; line-height: 1.65; color: var(--text-secondary); }
.slot .slot__status { margin-top: auto; font-family: var(--font-mono); font-size: 9px; color: var(--text-annotation); }
.slot .link-amber { margin-top: auto; align-self: flex-start; font-size: 10.5px; }

/* ==========================================================================
   DWG 004: Approach
   ========================================================================== */
.approach { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(28px, 4vw, 48px); }
.steps { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; }
.step { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line-08); }
.step:last-child { border-bottom: 0; }
.step__num { flex: 0 0 34px; padding-top: 2px; font-family: var(--font-mono); font-size: 12px; color: var(--cyan); }
.step__body { min-width: 0; }
.step__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.step .chip--amber { padding: 2px 8px; }
.step p { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); max-width: 460px; }

.audit {
  flex: 1 1 322px;
  max-width: 432px;
  overflow: hidden;
  border: 1px solid rgba(51, 183, 199, 0.3);
  border-radius: 10px;
  background: var(--bg-alt);
}
.audit__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-08);
}
.audit__head h3 { font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: 1.5px; color: var(--text-secondary); }
.audit__body { display: flex; flex-direction: column; gap: 11px; padding: 18px; }
.audit .kv { gap: 11px; line-height: 1.6; }
.audit .kv > div { gap: 12px; }
.audit .kv dt { flex-basis: 88px; }
.audit .btn--block { margin-top: 8px; }

/* ==========================================================================
   DWG 005: Engineer
   ========================================================================== */
.engineer { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(28px, 5vw, 64px); }
.engineer__quote { flex: 1 1 340px; min-width: 0; }
.engineer__quote blockquote {
  max-width: 420px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.3px;
  color: var(--text-heading);
}
.engineer__quote figcaption {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--text-annotation);
}
.engineer__body {
  flex: 1 1 400px;
  min-width: 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-body);
}
.engineer__body p:last-of-type { color: var(--text-strong); }
.engineer__labs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line-10);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}
.engineer__labs a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .5px; }

/* ==========================================================================
   DWG 006: Start here
   ========================================================================== */
.book { --grid-line: rgba(140, 160, 175, 0.05); }
.book .wrap {
  padding-top: clamp(64px, 9vw, 110px);
  padding-bottom: clamp(64px, 9vw, 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.book .kicker { margin-bottom: 18px; }
.book h2 {
  max-width: 640px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.book__sub { margin-top: 20px; max-width: 460px; font-size: 15px; line-height: 1.65; color: var(--text-muted); }
.book__cta { margin-top: 32px; }
.book .microlabel { margin-top: 16px; font-size: 10px; }

/* ---------- Contact form (Formspree) ---------- */
.contact {
  width: 100%;
  max-width: 620px;
  margin-top: 44px;
  text-align: left;
  border: 1px solid var(--line-14);
  border-radius: 4px;
  background: var(--bg-alt);
}
.contact__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-14);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}
.contact__body { padding: 20px 16px 18px; display: grid; gap: 16px; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--text-annotation);
}
.field input, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-14);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text-heading);
  font: 15px/1.5 var(--font-body);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-annotation); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.contact__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.contact .btn { border: 0; cursor: pointer; min-height: 44px; }
.contact .btn:disabled { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.contact__status { font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; color: var(--text-muted); }
.contact__status[data-state="ok"] { color: var(--green); }
.contact__status[data-state="err"] { color: var(--amber); }
.contact__fallback { margin-top: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; color: var(--text-muted); }
@media (max-width: 560px) { .contact__row { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer: title block
   ========================================================================== */
.footer { border-top: 1px solid var(--line-12); }
.footer .wrap { padding-top: clamp(28px, 4vw, 44px); padding-bottom: clamp(28px, 4vw, 44px); }
.titleblock { border: 1px solid var(--line-14); border-radius: 4px; overflow: hidden; }
.titleblock__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-14);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}
/* Cells draw their own right + bottom borders; the -1px margins tuck the outermost
   ones under the frame, so wrapped rows never leave stray seams. */
.titleblock__cells { display: flex; flex-wrap: wrap; margin: 0 -1px -1px 0; }
.titleblock__cells > div {
  flex: 0 0 calc(100% / 7);
  min-width: 150px;
  padding: 10px 16px;
  border-right: 1px solid var(--line-14);
  border-bottom: 1px solid var(--line-14);
}
.titleblock__cells > div:last-child { flex: 1 0 150px; }
.titleblock dt { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 1px; color: var(--text-annotation); }
.titleblock dd { margin-top: 3px; font-family: var(--font-mono); font-size: 11px; color: var(--text-strong); }
.titleblock .approved { color: var(--amber); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.footer__bottom span { color: var(--text-annotation); }
.footer__bottom a { color: var(--text-secondary); }
.footer__bottom a:hover { color: var(--text-heading); }

/* ==========================================================================
   404
   ========================================================================== */
.notfound {
  min-height: calc(100vh - 70px);
  min-height: calc(100svh - 70px);
  display: flex;
  align-items: center;
}
.notfound .wrap { width: 100%; }
.notfound h1 {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.5px;
}
.notfound p:not(.kicker) { margin-top: 22px; max-width: 470px; font-size: 15.5px; line-height: 1.65; color: var(--text-muted); }
.notfound .btn { margin-top: 30px; }

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes dashflow { to { stroke-dashoffset: -24; } }
@keyframes rowcycle {
  0%, 3% { border-color: rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); }
  8%, 26% { border-color: rgba(51, 183, 199, 0.5); background: rgba(51, 183, 199, 0.06); }
  34%, 100% { border-color: rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); }
}

/* Scroll-reveal: hidden state only when main.js has added .js to <html>. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .7s var(--ease) var(--reveal-delay, 0ms),
    transform .7s var(--ease) var(--reveal-delay, 0ms),
    border-color .25s;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="90"] { --reveal-delay: 90ms; }
[data-reveal-delay="100"] { --reveal-delay: 100ms; }
[data-reveal-delay="120"] { --reveal-delay: 120ms; }
[data-reveal-delay="180"] { --reveal-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Triage card: once the spec sheet drops below the pipeline (card inner < 969px),
   swap the pipeline's right border for a top border on the spec sheet. */
@media (max-width: 1066.98px) {
  .pipeline { border-right: 0; }
  .specsheet { border-top: 1px solid var(--line-08); }
}

@media (max-width: 820px) {
  .nav { padding-top: 11px; padding-bottom: 11px; }
  .nav__brand { min-height: 44px; align-items: center; }
  .nav__links, .nav__tagline { display: none; }
  .nav__cta { display: inline-flex; align-items: center; min-height: 44px; }
  .audit .btn--block { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .btn { min-height: 44px; }
}

@media (max-width: 640px) {
  .titleblock__cells > div { flex: 1 1 50%; }
  .titleblock__cells > div:last-child { flex-basis: 100%; }
}

/* SPEC strip stacks: bottom borders replace right borders. */
@media (max-width: 520px) {
  .spec-strip { flex-direction: column; }
  .spec-strip > div { flex: none; border-right: 0; border-bottom: 1px solid var(--line-10); }
  .spec-strip > div:last-child { border-bottom: 0; }
}

/* Small screens: no text below 11px (the 8.5–10.5px mono labels are bumped up). */
@media (max-width: 480px) {
  .microlabel, .book .microlabel, .pipe-col__label, .pipe-col__note, .chip, .fig__head, .dim__label,
  .spec-strip dt, .slot .slot__status, .slot .link-amber, .titleblock dt, .tool-id, .card h3,
  .card .card__stamp, .kv dt, .audit__head h3, .footer__bottom, .titleblock__top,
  .checks, .routed li, .engineer__quote figcaption { font-size: 11px; }
  .fig__head { letter-spacing: 1px; }
}

@media (max-width: 380px) {
  .nav { gap: 12px; }
  .nav__cta-full { display: none; }
  .nav__cta-short { display: inline; }
}
