/* BUNDEL Clearinghouse Foundry: Industrial Daylight Architecture
   - Typography: Saira Stencil One (foundry machinery-plate stencil) + Manrope (UI) + IBM Plex Mono (data)
   - World Presence: Continuous sunlit living ambient canvas (skylight shafts, turning gear silhouettes,
     gliding gantry shadows, magnetic vanes, drifting dust) + twin copper risers + riveted bay girders.
   - Palette: Sunlit Travertine (#F5F0E6), Warm Porcelain (#FFFDF8), Honed Limestone (#EAE2D2),
     Espresso Graphite (#181E1B), Warm Graphite (#4A544F), Burnished Terracotta Copper (#B84C14 / #A8410E),
     Verdigris Emerald (#0F6B4B), Kiln Vermilion (#B42B22). All WCAG AA verified. */

@font-face {
  font-family: 'Saira Stencil One';
  src: url('/fonts/saira-stencil-one-400.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope Variable';
  src: url('/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F7F3EA;
  --floor-bay: #EFE9DC;
  --floor-deep: #E5DCCB;
  --surface: #FFFDF8;
  --surface-2: #ECE5D8;
  --surface-3: #E0D7C5;
  --iron: #2D3530;
  --iron-2: #3F4943;
  --ink: #181E1B;
  --ink-2: #4A544F;
  --copper: #B84C14;
  --copper-bright: #A8410E;
  --copper-hover: #9C3C0C;
  --copper-tint: #FBECE2;
  --brass: #B88635;
  --mint: #0F6B4B;
  --mint-tint: #E4F4ED;
  --vermilion: #B42B22;
  --vermilion-tint: #FDECEB;
  --line: #D5CBB9;
  --line-strong: #768079;

  --f-display: 'Saira Stencil One', system-ui, sans-serif;
  --f-sans: 'Manrope Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;

  --max-w: 1320px;
  --header-h: 64px;
  --mobile-nav-h: 62px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100svh;
  overflow-x: clip;
}

/* Base interaction affordances (antislop R-39, R-32) */
[hidden] { display: none !important; }
a[href], button, summary, select, label[for], input[type="checkbox"], input[type="radio"], input[type="range"], [role="button"], [role="tab"] {
  cursor: pointer;
}
button:disabled, input:disabled, select:disabled, textarea:disabled, [aria-disabled="true"] {
  cursor: not-allowed;
}
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 200;
  background: var(--copper);
  color: var(--surface);
  padding: 12px 18px;
  font-weight: 700;
  border-radius: var(--r-sm);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--copper-bright); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.mono { font-family: var(--f-mono); }
.muted { color: var(--ink-2); }
.wrap { width: 100%; max-width: var(--max-w); margin: 0 auto; padding-inline: clamp(16px, 3.2vw, 40px); }

/* =========================================================================
   TOP UTILITY HEADER (Stamped Industrial Daylight Bar)
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--f-display);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  min-height: 44px;
}
.brand:hover { color: var(--copper-bright); }
.brand-mark { width: 30px; height: 30px; flex: none; display: inline-block; }

.primary-nav { display: flex; align-items: center; gap: 6px; }
.primary-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-sm);
  transition: color 180ms var(--ease), background-color 180ms var(--ease);
}
.primary-nav a:hover { color: var(--ink); background: var(--surface-2); }
.primary-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: inset 0 -2px 0 var(--copper);
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  min-height: 36px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); flex: none; }
.status-chip[data-tone="ok"] .status-dot { background: var(--mint); }
.status-chip[data-tone="warn"] .status-dot { background: var(--copper); }
.status-chip[data-tone="bad"] .status-dot { background: var(--vermilion); }

.menu-trigger {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-family: var(--f-sans);
  font-size: 0.88rem;
  font-weight: 700;
}
.menu-trigger:hover { background: var(--surface-2); }

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(24, 30, 27, 0.38);
  display: grid;
  place-items: end;
}
.nav-drawer-panel {
  width: min(320px, 86vw);
  height: 100%;
  background: var(--surface);
  border-left: 2px solid var(--line-strong);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: -12px 0 32px rgba(24, 30, 27, 0.14);
}
.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.nav-drawer-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.nav-drawer-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  border: 1px solid transparent;
}
.nav-drawer-links a:hover, .nav-drawer-links a[aria-current="page"] {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

/* Mobile bottom bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 253, 248, 0.97);
  border-top: 1px solid var(--line-strong);
  grid-template-columns: repeat(4, 1fr);
}
.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 2px;
}
.mobile-bottom-nav a[aria-current="page"] {
  color: var(--copper-bright);
  box-shadow: inset 0 2px 0 var(--copper);
}

/* =========================================================================
   BUTTONS & CHIPS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.78;
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-primary {
  background: var(--copper);
  border-color: var(--copper);
  color: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 0 #7E3109;
}
.btn-primary:hover:not(:disabled) { background: var(--copper-hover); border-color: var(--copper-hover); color: var(--surface); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink-2);
  box-shadow: none;
}
.btn-ghost { background: rgba(255, 253, 248, 0.9); border-color: var(--line-strong); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 0.85rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-xs);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}
.badge-sim { border-color: var(--copper); color: var(--copper-bright); background: var(--copper-tint); }
.badge-ok { border-color: var(--mint); color: var(--mint); background: var(--mint-tint); }
.badge-bad { border-color: var(--vermilion); color: var(--vermilion); background: var(--vermilion-tint); }
.badge-off { border-color: var(--line-strong); color: var(--ink-2); background: var(--surface-2); }

.token-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c, var(--copper));
  border: 1px solid rgba(24, 30, 27, 0.35);
  display: inline-block;
  flex: none;
}

/* =========================================================================
   CONTINUOUS LIVING FOUNDRY AMBIENT BACKGROUND CANVAS (Round 5 & 6)
   Fixed sunlit canvas behind every below-fold section all the way to footer.
   ========================================================================= */
.foundry-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* =========================================================================
   ACT I: FULL-VIEWPORT SUNLIT 3D DIORAMA STAGE
   ========================================================================= */
.stage-track {
  position: relative;
  z-index: 2;
  min-height: 220svh;
  background: var(--bg);
  border-bottom: 2px solid var(--iron);
}
.stage-sticky {
  position: sticky;
  top: var(--header-h);
  height: calc(100svh - var(--header-h));
  min-height: 620px;
  max-height: 980px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  background: var(--bg);
}
.canvas-shell { position: absolute; inset: 0; z-index: 1; }
#plant-canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }

.stage-sunlight {
  position: absolute;
  top: -260px;
  left: -260px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle, rgba(224, 152, 82, 0.16) 0%, rgba(15, 107, 75, 0.06) 45%, rgba(247, 243, 234, 0) 72%);
  will-change: transform;
}

.plant-labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.plant-tag {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--r-xs);
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(24, 30, 27, 0.1);
  will-change: transform;
}
.plant-tag[data-jammed="true"] { border-color: var(--vermilion); background: var(--vermilion-tint); color: var(--vermilion); }

.stage-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(96deg, rgba(247, 243, 234, 0.96) 0%, rgba(247, 243, 234, 0.84) 33%, rgba(247, 243, 234, 0.1) 58%, rgba(247, 243, 234, 0) 100%);
}

.stage-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 550px;
  padding: clamp(24px, 4vh, 48px) 0 24px;
  pointer-events: none;
}
.stage-content > * { pointer-events: auto; }

/* Foundry Machinery-Plate Stencil Headline (Saira Stencil One) */
.hero-title {
  margin: 0 0 16px;
  font-family: var(--f-display);
  font-size: clamp(2.55rem, 4.9vw, 4.35rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero-title em {
  font-style: normal;
  color: var(--copper-bright);
}
.hero-lede {
  margin: 0 0 22px;
  max-width: 44ch;
  font-size: clamp(0.98rem, 1.15vw, 1.08rem);
  color: var(--ink-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

.stage-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.preset-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.preset-btn:hover { background: var(--surface-2); border-color: var(--ink); }
.preset-btn[aria-pressed="true"] {
  background: var(--copper-tint);
  border-color: var(--copper);
  color: var(--copper-bright);
  box-shadow: inset 0 -2px 0 var(--copper);
}

.stage-status-line {
  margin: 12px 0 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  max-width: 52ch;
}

/* Corner icon cluster on hero stage (§D.11 + §D.13) */
.stage-corner-controls {
  position: absolute;
  right: clamp(14px, 2.2vw, 28px);
  bottom: 70px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-ctrl {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(24, 30, 27, 0.12);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 140ms var(--ease);
}
.icon-ctrl:hover { background: var(--surface-2); border-color: var(--copper); color: var(--copper-bright); }
.icon-ctrl:active { transform: translateY(1px); }
.icon-ctrl[aria-pressed="true"] { background: var(--copper-tint); border-color: var(--copper); color: var(--copper-bright); }

.stage-rail {
  position: relative;
  z-index: 4;
  background: rgba(255, 253, 248, 0.96);
  border-top: 1px solid var(--line-strong);
}
.stage-rail-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding-block: 6px;
}
.chapter-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.chapter-btn {
  min-height: 44px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  color: var(--ink-2);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 600;
}
.chapter-btn:hover { color: var(--ink); background: var(--surface-2); }
.chapter-btn[aria-pressed="true"] { color: var(--copper-bright); border-color: var(--copper); background: var(--copper-tint); }
.stage-hint { font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; }

/* =========================================================================
   CONTINUOUS PHYSICAL FOUNDRY HALL BELOW THE FOLD (Living Canvas Visible)
   Transparent over #foundry-bg-canvas so sweeping skylight shafts, turning
   gears, gliding plant shadows, magnetic vanes, and drifting dust stay
   visibly alive across every section all the way through the footer.
   ========================================================================= */
.foundry-hall {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* Twin vertical cylindrical copper feed risers running continuously down the foundry walls */
.conduit-riser {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, #8B3A10 0%, #DA7C42 36%, #F3B787 56%, #B44D18 82%, #6E2D0B 100%);
  box-shadow: 3px 0 10px rgba(34, 24, 14, 0.16), -1px 0 0 rgba(255, 253, 248, 0.4);
}
.conduit-riser-left { left: clamp(8px, 1.4vw, 22px); }
.conduit-riser-right { right: clamp(8px, 1.4vw, 22px); }
/* Periodic brass wall clamps along the copper risers */
.conduit-riser::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 180px,
    #39423D 180px 184px,
    #C99642 184px 194px,
    #39423D 194px 198px,
    transparent 198px 340px
  );
}

/* Structural riveted bronze girder bar separating every foundry bay */
.bay-beam {
  position: relative;
  z-index: 3;
  height: 36px;
  background: linear-gradient(180deg, #DED4C1 0%, #EAE2D3 45%, #D3C7B2 100%);
  border-top: 2px solid var(--iron);
  border-bottom: 2px solid #9D8F78;
  box-shadow: 0 6px 16px rgba(34, 28, 22, 0.08);
  display: flex;
  align-items: center;
}
.bay-beam-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.rivet-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rivet-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: radial-gradient(circle at 35% 35%, #F0D29C 0%, #B88635 65%, #5C4218 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.band {
  position: relative;
  z-index: 2;
  padding-block: clamp(40px, 5.5vw, 76px);
  background: transparent;
}
.band-recessed {
  background: linear-gradient(180deg, rgba(224, 213, 194, 0.28) 0%, rgba(244, 239, 228, 0.14) 52%, rgba(218, 206, 186, 0.30) 100%);
}
.band-alt { background: rgba(255, 253, 248, 0.72); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 2.8vw, 32px);
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--copper-bright);
  margin-bottom: 6px;
}
.section-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 3.4vw, 2.95rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-copy { margin: 8px 0 0; max-width: 64ch; color: var(--ink-2); }

/* =========================================================================
   STATION 00: LIVE AI BASKET COMPOSER STOREFRONT (DIRECTLY UNDER HERO)
   ========================================================================= */
.composer-console {
  background: rgba(255, 253, 248, 0.94);
  border: 2px solid var(--iron);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow:
    0 16px 38px rgba(34, 28, 22, 0.12),
    0 3px 0 #B84C14;
}
.composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr);
  align-items: stretch;
}
.composer-input {
  padding: clamp(20px, 2.5vw, 30px);
  background: linear-gradient(180deg, rgba(238, 231, 217, 0.85) 0%, rgba(248, 244, 235, 0.94) 100%);
  border-right: 2px solid var(--line);
  display: flex;
  flex-direction: column;
}
.composer-output {
  padding: clamp(20px, 2.5vw, 30px);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.composer-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--line);
}
.composer-draft-name {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  color: var(--ink);
}
.draft-leg-list {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.draft-leg-card {
  padding: 11px 13px;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--line);
  background: var(--bg);
}
.draft-leg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.draft-leg-sym {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.draft-leg-bar {
  height: 6px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
  margin-bottom: 7px;
}
.draft-leg-bar span { display: block; height: 100%; border-radius: 2px; }
.draft-leg-why {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.44;
  color: var(--ink-2);
}
.composer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1.5px dashed var(--line-strong);
}
.composer-custody {
  margin: 10px 0 0;
  font-family: var(--f-mono);
  font-size: 0.76rem;
  color: var(--ink-2);
}

/* =========================================================================
   STATION 01: BOLTED CALIBRATION BENCH & PHYSICAL COPPER MANIFOLD
   ========================================================================= */
.bench-shell {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--iron);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow:
    0 14px 36px rgba(34, 28, 22, 0.11),
    0 3px 0 #C65D24;
}
.bench-flange {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(16px, 2.4vw, 26px);
  background: linear-gradient(180deg, #E8E0D0 0%, #DDD3C0 100%);
  border-bottom: 2px solid var(--iron);
}
.bench-flange-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}
/* Recessed sunlit Three.js 3D hardware stage bays */
.manifold-stage {
  background: #EAE2D2;
  border-bottom: 2px solid var(--iron);
  padding: 0;
  overflow: hidden;
}
.station-canvas {
  width: 100%;
  display: block;
}
.station-canvas-manifold { height: 276px; }
.station-canvas-interlock { height: 310px; }

.bench-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: stretch; }
.bench-left { padding: clamp(18px, 2.4vw, 28px); border-right: 2px solid var(--line); background: var(--surface); }
.bench-right { padding: clamp(18px, 2.4vw, 28px); background: linear-gradient(180deg, #F4EFE4 0%, #FFFDF8 100%); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }

.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 0.84rem; font-weight: 700; color: var(--ink); }
.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.9rem;
  box-shadow: inset 0 2px 4px rgba(24, 30, 27, 0.05);
}
.field select { padding-right: 30px; }
.field textarea { font-family: var(--f-sans); min-height: 92px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-2); opacity: 0.85; }
.field-hint { font-family: var(--f-mono); font-size: 0.76rem; color: var(--ink-2); min-height: 1.3em; }

/* Machined weight scale */
.sum-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ruler-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--ink-2);
  margin-bottom: 5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.sum-bar {
  display: flex;
  height: 12px;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--surface-2);
  border: 1.5px solid var(--iron);
  margin-bottom: 16px;
  gap: 2px;
}
.sum-bar span { height: 100%; display: block; transition: width 220ms var(--ease); }
.sum-val { font-family: var(--f-mono); font-weight: 600; font-size: 0.92rem; color: var(--mint); }
.sum-val.bad { color: var(--vermilion); }

/* Machined fader slots */
.leg-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.leg-row {
  display: grid;
  grid-template-columns: minmax(145px, 1.05fr) minmax(0, 1.2fr) 86px 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-xs);
  background: linear-gradient(180deg, #F3EDE0 0%, #EAE2D1 100%);
  border: 1.5px solid #B8AD99;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.leg-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.leg-sym { font-family: var(--f-mono); font-weight: 600; font-size: 0.92rem; display: block; color: var(--ink); }
.leg-slice { font-family: var(--f-mono); font-size: 0.74rem; color: var(--copper-bright); font-weight: 600; margin-left: 4px; }
.leg-name { display: block; font-size: 0.75rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-range { width: 100%; accent-color: var(--copper); min-height: 44px; }
.leg-pct { display: flex; align-items: center; gap: 4px; font-family: var(--f-mono); font-size: 0.88rem; }
.leg-pct input {
  width: 58px;
  min-height: 44px;
  padding: 6px 8px;
  text-align: right;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.88rem;
}
.leg-rm {
  width: 44px;
  height: 44px;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.leg-rm:hover:not(:disabled) { color: var(--vermilion); border-color: var(--vermilion); background: var(--vermilion-tint); }

/* Canonical stock allowlist keys */
.picker-label { font-size: 0.84rem; font-weight: 700; color: var(--ink-2); margin: 0 0 10px; }
.picker-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 2px 0 #C8BDA9;
}
.pick-btn:hover:not(:disabled) { background: var(--copper-tint); border-color: var(--copper); }
.pick-btn:disabled { opacity: 0.45; background: var(--surface-2); box-shadow: none; }

/* Pneumatic Specification Slot (Right wing) */
.pneumatic-slot {
  padding: clamp(18px, 2.4vw, 28px);
  background: linear-gradient(180deg, #EAE2D2 0%, #F5F0E5 32%, #EFE8D9 100%);
  display: flex;
  flex-direction: column;
}
.slot-bezel {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #1E2421 0%, #39423D 100%);
  border: 2px solid #B84C14;
  margin-bottom: 16px;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5), 0 2px 0 rgba(255, 255, 255, 0.6);
}
.panel-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.45rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  color: var(--ink);
}
.prompt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.prompt-chip {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  box-shadow: 0 2px 0 #C8BDA9;
}
.prompt-chip:hover { background: var(--copper-tint); border-color: var(--copper); color: var(--copper-bright); }

.trace-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-family: var(--f-mono); font-size: 0.8rem; }
.trace-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--r-xs); background: var(--surface); border: 1px solid var(--line); }
.trace-list li.ok { border-color: var(--mint); background: var(--mint-tint); }
.trace-list li.bad { border-color: var(--vermilion); background: var(--vermilion-tint); }

.draft-box { margin-top: 16px; padding: 16px; border-radius: var(--r-xs); background: var(--surface); border: 1.5px solid var(--copper); }
.draft-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.draft-list li { display: grid; grid-template-columns: 12px 58px 46px 1fr; gap: 8px; align-items: baseline; font-size: 0.88rem; }

/* Tables & Notices */
.table-wrap { width: 100%; overflow-x: auto; border: 1.5px solid var(--iron); border-radius: var(--r-xs); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-family: var(--f-mono); font-size: 0.76rem; color: var(--ink); font-weight: 600; background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .r { text-align: right; font-family: var(--f-mono); white-space: nowrap; }
.route-sub { font-family: var(--f-mono); font-size: 0.76rem; color: var(--ink-2); margin-top: 2px; }
.quote-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px; font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-2); }
.buy-dock { margin-top: 20px; padding-top: 18px; border-top: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.notice-box { padding: 14px 16px; border-radius: var(--r-xs); border: 1.5px solid var(--line-strong); background: var(--bg); font-size: 0.9rem; color: var(--ink-2); }
.notice-box strong { color: var(--ink); }
.notice-box[data-tone="bad"] { border-color: var(--vermilion); color: var(--ink); background: var(--vermilion-tint); }
.notice-box[data-tone="sim"] { border-color: var(--copper); color: var(--ink); background: var(--copper-tint); }

/* =========================================================================
   STATION 02: BOLTED ATOMIC INTERLOCK & ROUTING ENGINE
   ========================================================================= */
.interlock-board {
  background: var(--surface);
  border: 2px solid var(--iron);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(34, 28, 22, 0.11), 0 3px 0 #39423D;
}
.interlock-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px clamp(16px, 2.4vw, 28px);
  background: linear-gradient(180deg, #E8E0D0 0%, #DDD3C0 100%);
  border-bottom: 2px solid var(--iron);
}
.interlock-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-xs);
  background: var(--iron);
  gap: 4px;
}
.interlock-switch button {
  min-height: 44px;
  padding: 6px 14px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #DDD5C7;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 600;
}
.interlock-switch button[aria-pressed="true"][data-fault="normal"] {
  background: var(--mint-tint);
  color: var(--mint);
  box-shadow: inset 0 0 0 1.5px var(--mint);
}
.interlock-switch button[aria-pressed="true"][data-fault="jam"] {
  background: var(--vermilion-tint);
  color: var(--vermilion);
  box-shadow: inset 0 0 0 1.5px var(--vermilion);
}
.interlock-canvas {
  padding: 0;
  background: #EAE2D2;
  border-bottom: 2px solid var(--iron);
  overflow: hidden;
}
.interlock-lower { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.breaker-rack { padding: clamp(18px, 2.4vw, 28px); border-right: 2px solid var(--line); background: var(--surface); }
.breaker-grid { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.breaker-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.breaker-row:last-child { border-bottom: 0; }
/* Physical recessed hardware breaker rocker */
.breaker-rocker {
  width: 24px;
  height: 30px;
  border-radius: 3px;
  background: #39423D;
  border: 1.5px solid #181E1B;
  padding: 3px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: 2px;
}
.breaker-rocker[data-on="true"] { justify-content: flex-start; }
.breaker-rocker i {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 2px;
  background: #9FA6A1;
}
.breaker-rocker[data-on="true"] i {
  background: #23A372;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.plaque-wing {
  padding: clamp(18px, 2.4vw, 28px);
  background: linear-gradient(180deg, #F5E6D6 0%, #EEDAC5 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.plaque-engraved {
  border: 2px solid var(--copper);
  border-radius: var(--r-xs);
  padding: 18px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: inset 0 0 0 3px rgba(184, 76, 20, 0.08);
}
.plaque-engraved h3 {
  margin: 0 0 8px;
  font-family: var(--f-display);
  font-size: 1.38rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--copper-bright);
}
.plaque-engraved p { margin: 0 0 10px; font-size: 0.92rem; color: var(--ink); }
.plaque-engraved p:last-child { margin-bottom: 0; }

/* =========================================================================
   STATION 03: CAST-IRON & BRASS RECEIPT PRESS DECK
   ========================================================================= */
.press-deck {
  background: var(--surface);
  border: 2px solid var(--iron);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(34, 28, 22, 0.11), 0 3px 0 #0F6B4B;
}
.press-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: stretch; }
.press-left {
  padding: clamp(20px, 2.6vw, 30px);
  background: linear-gradient(180deg, #E7DFCE 0%, #F2ECE0 100%);
  border-right: 2px solid var(--line);
}
/* Brass cutter throat feeding the perforated clearing slip */
.press-throat {
  height: 16px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #2D3530 0%, #181E1B 100%);
  border: 2px solid #B88635;
  border-bottom: 3px solid #B84C14;
  margin-inline: -4px;
}
.paper-slip {
  position: relative;
  background: #FFFDF8;
  border: 1.5px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 var(--r-xs) var(--r-xs);
  padding: 20px 20px 22px;
  box-shadow: 0 10px 24px rgba(24, 30, 27, 0.1);
}
.paper-slip-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1.5px dashed var(--line-strong);
}
.slip-stamp {
  display: inline-block;
  padding: 3px 8px;
  border: 1.5px solid var(--copper);
  color: var(--copper-bright);
  background: var(--copper-tint);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.slip-lines { list-style: none; margin: 14px 0; padding: 0; font-family: var(--f-mono); font-size: 0.82rem; }
.slip-lines li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dotted var(--line); }
.slip-lines li:last-child { border-bottom: 0; }

.spindle-panel { padding: clamp(20px, 2.6vw, 30px); background: var(--surface); }
.spindle-empty {
  padding: 20px;
  border-radius: var(--r-xs);
  background: var(--bg);
  border: 1.5px dashed var(--line-strong);
}

/* Shared Secondary Page Components */
.workbench-grid { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.panel {
  background: var(--surface);
  border: 2px solid var(--iron);
  border-radius: var(--r-sm);
  padding: clamp(18px, 2.5vw, 28px);
  box-shadow: 0 8px 24px rgba(24, 30, 27, 0.07);
}
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1.5px solid var(--line); }

.receipt-ledger { display: flex; flex-direction: column; gap: 12px; }
.receipt-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--r-xs);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  text-decoration: none;
  color: var(--ink);
}
.receipt-row:hover { background: var(--surface-2); border-color: var(--copper); color: var(--ink); }
.core-stack { display: flex; height: 16px; border-radius: var(--r-xs); overflow: hidden; border: 1.5px solid var(--iron); background: var(--bg); }
.core-stack span { display: block; height: 100%; }

.receipt-hero { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px; align-items: start; }
.big-core { width: 112px; height: 280px; border-radius: var(--r-sm); border: 2px solid var(--iron); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); }
.big-core span { display: flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: 0.78rem; font-weight: 600; color: #181E1B; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55); }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.meta-grid > div { padding: 14px; border-radius: var(--r-xs); background: var(--surface); border: 1.5px solid var(--line); }
.meta-grid dt { font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-2); margin-bottom: 4px; }
.meta-grid dd { margin: 0; font-family: var(--f-mono); font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }

.prose-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.prose-toc { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--iron); padding-left: 14px; }
.prose-toc a { display: flex; align-items: center; min-height: 44px; font-size: 0.88rem; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.prose-toc a:hover { color: var(--copper-bright); }
.prose h2 { font-family: var(--f-display); font-size: clamp(1.55rem, 2.5vw, 2.05rem); font-weight: 400; text-transform: uppercase; margin: 36px 0 12px; color: var(--ink); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); max-width: 68ch; }
.prose strong { color: var(--ink); }
.prose code { font-family: var(--f-mono); font-size: 0.88em; padding: 1px 5px; border-radius: var(--r-xs); background: var(--surface-2); color: var(--ink); }

.seg-group { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-btn { min-height: 44px; padding: 8px 16px; border-radius: var(--r-xs); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 700; }
.seg-btn[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); color: var(--surface); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 40px 0 56px;
  background: linear-gradient(180deg, rgba(233, 225, 210, 0.56) 0%, rgba(239, 233, 220, 0.52) 100%);
  border-top: 2px solid var(--iron);
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; font-size: 0.9rem; font-weight: 700; }
.footer-links a:hover { color: var(--copper-bright); }

.toast {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 120;
  max-width: min(380px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--r-xs);
  background: var(--ink);
  border: 1.5px solid var(--copper);
  color: var(--surface);
  font-size: 0.9rem;
  box-shadow: 0 12px 28px rgba(24, 30, 27, 0.22);
}

/* =========================================================================
   RESPONSIVE BREAKPOINTS (3-state: Desktop >1060px, Tablet 680-1060px, Mobile <680px)
   ========================================================================= */
@media (max-width: 1060px) {
  .workbench-grid,
  .prose-layout,
  .composer-grid,
  .bench-body,
  .interlock-lower,
  .press-grid { grid-template-columns: 1fr; }
  .composer-input, .bench-left, .breaker-rack, .press-left { border-right: 0; border-bottom: 2px solid var(--line); }
  .conduit-riser { display: none; }
  .prose-toc { position: static; flex-direction: row; flex-wrap: wrap; border-left: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
  .stage-scrim { background: linear-gradient(180deg, rgba(247, 243, 234, 0.16) 0%, rgba(247, 243, 234, 0.88) 58%, rgba(247, 243, 234, 0.97) 100%); }
}

@media (max-width: 680px) {
  body { padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px)); }
  .primary-nav { display: none; }
  .menu-trigger { display: inline-flex; }
  .mobile-bottom-nav { display: grid; }
  .status-chip { font-size: 0.72rem; padding: 6px 8px; }
  .stage-sunlight { display: none; }

  /* Mobile 390px Framed Hero: fits ALL 4 presets cleanly ABOVE the 62px bottom nav! (Round 3 Point 4) */
  .stage-track { min-height: auto; }
  .stage-sticky { position: static; height: auto; min-height: auto; max-height: none; display: flex; flex-direction: column; }
  .canvas-shell { position: relative; width: 100%; height: 292px; border-bottom: 2px solid var(--iron); background: var(--bg); }
  .plant-tag { font-size: 0.64rem; padding: 2px 6px; gap: 4px; }
  .plant-tag .token-dot { width: 8px; height: 8px; }
  .stage-corner-controls { right: 10px; bottom: 10px; }
  .stage-scrim { display: none; }
  .stage-content { max-width: none; padding: 14px 0 16px; }
  .hero-title { font-size: 2.02rem; margin-bottom: 10px; line-height: 1.02; }
  .hero-lede { font-size: 0.92rem; line-height: 1.44; margin-bottom: 14px; }
  .hero-actions { gap: 8px; margin-bottom: 10px; }
  .hero-actions .btn { padding: 8px 14px; font-size: 0.86rem; }
  .stage-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    margin-bottom: 8px;
  }
  .preset-btn { padding: 6px 10px; font-size: 0.82rem; min-height: 44px; text-align: center; }
  .stage-status-line { margin-top: 8px; font-size: 0.74rem; }
  .stage-rail-inner { flex-direction: column; align-items: flex-start; padding-block: 8px; gap: 6px; }
  .stage-hint { white-space: normal; }

  .field-row { grid-template-columns: 1fr; }
  .station-canvas-manifold { height: 224px; }
  .station-canvas-interlock { height: 248px; }
  .leg-row {
    grid-template-columns: 1fr 78px 44px;
    grid-template-areas:
      "meta pct rm"
      "range range range";
    gap: 8px 10px;
  }
  .leg-meta { grid-area: meta; }
  .leg-pct { grid-area: pct; }
  .leg-rm { grid-area: rm; }
  .leg-range { grid-area: range; }

  .hide-s { display: none; }
  .receipt-row { grid-template-columns: 1fr; gap: 8px; }
  .receipt-hero { grid-template-columns: 1fr; }
  .big-core { width: 100%; height: 48px; flex-direction: row; }
  .toast { bottom: calc(var(--mobile-nav-h) + 12px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage-sunlight { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
