/* Prose pages (fde.html, approach.html) — text-led, quiet chrome */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--amber);
  color: #191305;
  padding: 0.6rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}
.skip-link:focus { left: 0; }



.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 5rem) var(--pad) 2rem;
}
.prose-head { margin-bottom: 3rem; }
.prose h1 {
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0.9rem 0 1rem;
}
.byline {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}
.lede {
  font-size: 1.2rem;
  color: var(--ink-dim);
  line-height: 1.7;
  margin-top: 1rem;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: 1.6rem;
  margin: 2.6rem 0 0.9rem;
}
.prose p { color: var(--ink-dim); margin-bottom: 1.1rem; }
.prose p em { color: var(--ink); }
.prose a { color: var(--amber); }

.thesis-close {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--ink);
  border-left: 2px solid var(--amber);
  padding-left: 1.2rem;
  margin-top: 2.4rem;
}

.sources {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line-faint);
  padding-top: 1.4rem;
}
.sources-head { font-size: 0.66rem; letter-spacing: 0.16em; color: var(--ink-faint); margin-bottom: 0.7rem; }
.sources ul { list-style: none; }
.sources li { margin-bottom: 0.4rem; font-size: 0.72rem; }
.sources a { color: var(--ink-dim); }
.sources a:hover { color: var(--amber); }

.phases > div { margin-bottom: 1.6rem; }
.phases dt {
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.phases dt .mono { color: var(--amber); font-size: 0.78rem; letter-spacing: 0.1em; }
.phases dd { color: var(--ink-dim); }

.artifact {
  border: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 1.4rem 1.6rem;
  margin: 1.4rem 0 1.8rem;
}
.artifact-label {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--amber);
  margin-bottom: 1rem;
}
.artifact-list { list-style: none; }
.artifact-list li {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line-faint);
}
.artifact-list li:last-child { border-bottom: none; }

.page-cta {
  max-width: 720px;
  margin: 3rem auto 0;
  border-top: 1px solid var(--line-faint);
  padding: 3rem 0 4rem;
  text-align: center;
}
.page-cta-line {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin-bottom: 0.7rem;
}
.page-cta-body { color: var(--ink-dim); margin-bottom: 1.8rem; }
.contact-email {
  margin-top: 1.1rem;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}



/* ---------- visual blocks for prose pages ---------- */
.prose-wide { max-width: 860px; }

.figure { margin: 2rem 0 2.4rem; }
.figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}
.figure figcaption {
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  color: var(--ink-faint);
  margin-top: 0.7rem;
}

/* manual vs floor */
.versus {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
  margin: 1.8rem 0 2rem;
}
.versus-col {
  border: 1px solid var(--line-faint);
  background: var(--bg-raised);
  padding: 1.2rem 1.3rem;
}
.versus-real { border-color: var(--line); }
.versus-head {
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}
.versus-real .versus-head { color: var(--amber); }
.versus ul { list-style: none; }
.versus li {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line-faint);
}
.versus li:last-child { border-bottom: none; }
.versus .v-amber { color: var(--amber); }
.versus .v-note { color: var(--ink-faint); font-size: 0.62rem; }
@media (max-width: 640px) { .versus { grid-template-columns: 1fr; } }

/* handoff diagram */
.handoff {
  border: 1px solid var(--line-faint);
  background: var(--bg-raised);
  padding: 1.6rem 1.5rem;
  margin: 1.8rem 0 2rem;
  text-align: center;
}
.handoff-head {
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}
.handoff-chain {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.h-node {
  border: 1px solid var(--line);
  padding: 0.5rem 0.8rem;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.h-amber { border-color: var(--amber); color: var(--amber); }
.handoff-loss {
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  color: var(--ink-faint);
  margin: 0.8rem 0 1.4rem;
}
.handoff-win { color: var(--amber); margin-bottom: 0; }

/* pull quote */
.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink);
  border-left: 2px solid var(--amber);
  padding-left: 1.2rem;
  margin: 1.8rem 0;
}

/* toolkit trio */
.toolkit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 1.6rem 0 1.8rem;
}
.tk-cell {
  border-left: 1px solid var(--line-faint);
  padding: 0.3rem 1.2rem 0.5rem;
}
.tk-no { color: var(--amber); font-size: 0.68rem; letter-spacing: 0.12em; }
.tk-cell h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: 1.2rem;
  margin: 0.45rem 0 0.5rem;
  color: var(--ink);
}
.tk-cell p { font-size: 0.86rem; margin-bottom: 0; }

/* workflow flow diagram */
.flow {
  border: 1px solid var(--line-faint);
  background: var(--bg-raised);
  padding: 1.6rem 1.5rem;
  margin: 1.8rem 0 2.2rem;
}
.flow-label {
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  margin-bottom: 0.9rem;
}
.flow-label-after { margin-top: 1.8rem; color: var(--amber); }
.flow-sub { color: var(--ink-faint); letter-spacing: 0.1em; }
.flow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
}
.f-node {
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--ink-dim);
  flex: 1 1 0;
  min-width: 110px;
}
.f-node em { display: block; font-style: normal; color: var(--ink-faint); font-size: 0.62rem; }
.f-bad { border-style: dashed; color: var(--ink-faint); }
.f-model { border-color: var(--amber-bright); color: var(--amber-bright); }
.f-gate { border-color: var(--amber); color: var(--amber); }
.flow-note {
  margin-top: 1.1rem;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

/* split bar */
.splitbar { margin: 1.6rem 0 2.2rem; }
.sb-track {
  display: flex;
  height: 44px;
  border: 1px solid var(--line);
}
.sb-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sb-seg span { font-size: 0.6rem; letter-spacing: 0.1em; white-space: nowrap; }
.sb-soft { background: #23262271; color: var(--ink-dim); }
.sb-model { background: color-mix(in srgb, var(--amber) 24%, transparent); color: var(--amber-bright); }
.sb-gate {
  margin-top: 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  color: var(--amber);
}

/* phase track */
.phasetrack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0 2.2rem;
}
.pt-bar {
  height: 8px;
  margin-bottom: 0.7rem;
  position: relative;
  background: var(--line-faint);
}
.pt-bar span {
  position: absolute;
  top: 12px;
  left: 0;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.pt-bar-sprint::after, .pt-bar-build::after, .pt-bar-operate::after, .pt-bar-handback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amber);
}
.pt-bar-sprint::after { width: 22%; }
.pt-bar-build::after { width: 62%; }
.pt-bar-operate::after { width: 84%; opacity: 0.55; }
.pt-bar-handback::after { width: 100%; opacity: 0.3; }
.pt-name { font-size: 0.66rem; letter-spacing: 0.13em; color: var(--amber); margin-top: 1.4rem; }
.pt-cell h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: 1.25rem;
  margin: 0.4rem 0 0.5rem;
  color: var(--ink);
}
.pt-cell p { font-size: 0.86rem; margin-bottom: 0; }

/* embedded machines stage */
.machines-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  overflow: hidden;
  background: radial-gradient(ellipse 75% 60% at 50% 45%, #1c1e17 0%, var(--bg) 80%);
  margin: 1.6rem 0 0.5rem;
}
.machines-stage img,
.machines-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#machines-canvas { opacity: 0; transition: opacity 600ms ease; cursor: grab; }
.machines-stage.is-live #machines-canvas { opacity: 1; }
.machines-stage.is-live #machines-fallback { opacity: 0; transition: opacity 600ms ease; }
.machines-toggle {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  z-index: 2;
}
.mt-btn {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 0.55rem 0.9rem;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--ink-dim);
  border: 1px solid var(--line);
  cursor: pointer;
}
.mt-btn { transition: color 160ms ease, border-color 160ms ease; }
.mt-btn:hover { color: var(--ink); border-color: var(--ink-dim); }
.mt-btn.is-on { color: var(--amber); border-color: var(--amber); }
.machines-note { font-size: 0.6rem; letter-spacing: 0.13em; color: var(--ink-faint); margin-bottom: 1.6rem; }

/* commitments plate on prose pages */
.plate-page { margin: 1.6rem 0 1.4rem; }

/* fix: .prose a's amber was overriding button label colors */
.prose .btn-primary, .page-cta .btn-primary { color: #191305; }
.prose .btn-primary:hover { color: #191305; }

/* ============================================================
   POP layer for prose pages
   ============================================================ */

/* headline scale + block rise */
.prose h1 { font-size: clamp(2.8rem, 5.6vw, 4.6rem); }
.prose h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-top: 3.2rem; }
.lede { font-size: 1.35rem; }
.prose p { font-size: 1.1rem; }
.pull { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.thesis-close { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.page-cta-line { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
/* specificity: .prose p must not flatten the closing statement */
.prose .page-cta-line {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 0.7rem;
}
.prose .contact-email { font-size: 0.74rem; letter-spacing: 0.08em; }
.prose-wide .page-cta { max-width: 860px; }
.js .lines.is-in-late .line-mask > span { animation: line-up 850ms 100ms cubic-bezier(0.22, 0.75, 0.2, 1) forwards; }

/* full-bleed breakouts (resolve against their prose container) */
.figure-bleed, .flow-bleed, .phasetrack {
  margin-inline: min(0px, calc((100% - min(1080px, 100vw - 2 * var(--pad))) / 2));
}

/* figures: cinematic settle */
.figure { position: relative; overflow: hidden; }
.js .figure.reveal img { transform: scale(1.045); transition: transform 1400ms cubic-bezier(0.22, 0.7, 0.25, 1); }
.js .figure.reveal.is-in img { transform: scale(1); }


/* handoff + generic child stagger */
.js .handoff .handoff-chain > *,
.js .reveal-stagger-inherit > *,
.js .stagger-lines > li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.js .is-in .handoff-chain > *,
.js .is-in .reveal-stagger-inherit > *,
.js .is-in .stagger-lines > li { opacity: 1; transform: none; }
.js .is-in .handoff-chain > *:nth-child(2), .js .is-in .reveal-stagger-inherit > *:nth-child(2), .js .is-in .stagger-lines > li:nth-child(2) { transition-delay: 90ms; }
.js .is-in .handoff-chain > *:nth-child(3), .js .is-in .reveal-stagger-inherit > *:nth-child(3), .js .is-in .stagger-lines > li:nth-child(3) { transition-delay: 180ms; }
.js .is-in .handoff-chain > *:nth-child(4), .js .is-in .reveal-stagger-inherit > *:nth-child(4), .js .is-in .stagger-lines > li:nth-child(4) { transition-delay: 270ms; }
.js .is-in .handoff-chain > *:nth-child(5), .js .is-in .reveal-stagger-inherit > *:nth-child(5), .js .is-in .stagger-lines > li:nth-child(5) { transition-delay: 360ms; }
.js .is-in .handoff-chain > *:nth-child(6), .js .is-in .reveal-stagger-inherit > *:nth-child(6), .js .is-in .stagger-lines > li:nth-child(6) { transition-delay: 450ms; }
.js .is-in .handoff-chain > *:nth-child(7), .js .is-in .reveal-stagger-inherit > *:nth-child(7), .js .is-in .stagger-lines > li:nth-child(7) { transition-delay: 540ms; }
.js .is-in .handoff-chain > *:nth-child(8), .js .is-in .reveal-stagger-inherit > *:nth-child(8), .js .is-in .stagger-lines > li:nth-child(8) { transition-delay: 630ms; }
.js .is-in .handoff-chain > *:nth-child(9), .js .is-in .reveal-stagger-inherit > *:nth-child(9), .js .is-in .stagger-lines > li:nth-child(9) { transition-delay: 720ms; }

/* the flow diagram: the concrete example, made luminous */
.flow { padding: 2.2rem 2rem; }
.flow-label { font-size: 0.78rem; }
.f-node { font-size: 0.74rem; padding: 0.75rem 0.85rem; }
.f-node em { font-size: 0.66rem; }
.flow-note { font-size: 0.68rem; }
.f-model {
  border-color: var(--amber-bright);
  color: var(--amber-bright);
  box-shadow: 0 0 24px rgba(255, 196, 107, 0.14), inset 0 0 14px rgba(255, 196, 107, 0.05);
}
.f-gate {
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 24px rgba(242, 163, 60, 0.16), inset 0 0 14px rgba(242, 163, 60, 0.05);
}
.f-bad { opacity: 0.75; }
/* the rebuilt row runs: an amber pulse travels the line */
.flow-live { position: relative; padding-bottom: 14px; }
.flow-live::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: var(--line-faint);
}
.flow-live::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow: 0 0 12px 3px rgba(255, 196, 107, 0.45);
  animation: flow-pulse 4.2s linear infinite;
}
@keyframes flow-pulse {
  0% { left: 0%; opacity: 0; }
  6% { opacity: 1; }
  94% { opacity: 1; }
  100% { left: calc(100% - 7px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .flow-live::after { animation: none; opacity: 0; } }

/* splitbar: proportions animate in */
.sb-soft { width: 85%; }
.sb-model { width: 15%; }
.js .splitbar .sb-seg { width: 0; transition: width 1000ms cubic-bezier(0.22, 0.75, 0.2, 1); overflow: hidden; }
.js .splitbar.is-in .sb-soft { width: 85%; }
.js .splitbar.is-in .sb-model { width: 15%; transition-delay: 150ms; }

/* phase bars: fills draw themselves */
.js .phasetrack .pt-bar::after { width: 0; transition: width 900ms cubic-bezier(0.22, 0.75, 0.2, 1) 250ms; }
.js .phasetrack.is-in .pt-bar-sprint::after { width: 22%; }
.js .phasetrack.is-in .pt-bar-build::after { width: 62%; transition-delay: 360ms; }
.js .phasetrack.is-in .pt-bar-operate::after { width: 84%; transition-delay: 470ms; }
.js .phasetrack.is-in .pt-bar-handback::after { width: 100%; transition-delay: 580ms; }

/* ghost numerals on cells */
.tk-cell, .pt-cell { position: relative; }
.ghost-sm { font-size: clamp(3.6rem, 6vw, 5.5rem); top: -1.4rem; }

/* versus: floor column glows */
.versus-real {
  border-color: rgba(242, 163, 60, 0.35);
  box-shadow: 0 0 30px rgba(242, 163, 60, 0.07), inset 0 0 20px rgba(242, 163, 60, 0.03);
}
.versus li { font-size: 0.8rem; }
.versus .v-note { font-size: 0.68rem; }
.h-node { font-size: 0.74rem; padding: 0.6rem 0.9rem; }
.handoff-loss { font-size: 0.68rem; }

/* ============================================================
   INSTRUMENT PANEL FAMILY — machined diagrams (matches the plaque)
   .panel = surface / .chip = beveled node / .flowlink = groove with current
   ============================================================ */

.panel {
  position: relative;
  border: 1px solid rgba(237, 232, 220, 0.16);
  background:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px),
    linear-gradient(158deg, #23261d 0%, #171a12 55%, #12140d 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.06),
    inset -1px -1px 0 rgba(0, 0, 0, 0.5),
    0 16px 44px rgba(0, 0, 0, 0.4);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle 4.5px at 13px 13px, #383c30 40%, #0b0c08 55%, transparent 63%),
    radial-gradient(circle 4.5px at calc(100% - 13px) 13px, #383c30 40%, #0b0c08 55%, transparent 63%),
    radial-gradient(circle 4.5px at 13px calc(100% - 13px), #383c30 40%, #0b0c08 55%, transparent 63%),
    radial-gradient(circle 4.5px at calc(100% - 13px) calc(100% - 13px), #383c30 40%, #0b0c08 55%, transparent 63%);
}

/* beveled metal chips: keycap depth instead of outlined boxes */
.chip {
  border: none !important;
  border-radius: 4px;
  background: linear-gradient(180deg, #31362b 0%, #23271e 55%, #191c14 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 5px 12px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(0, 0, 0, 0.8);
  color: #c9c4b4 !important;
}
.chip em { color: #837f70 !important; }
.chip-dull {
  background: linear-gradient(180deg, #262a21 0%, #1b1e16 55%, #14160f 100%);
  color: #7d7a6c !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -2px 4px rgba(0, 0, 0, 0.55),
    0 3px 8px rgba(0, 0, 0, 0.45);
  opacity: 1 !important;
}
.chip-dull em { color: #5a584c !important; }
.chip-amber {
  background: linear-gradient(180deg, #3a3323 0%, #2b2517 55%, #1d1910 100%);
  color: var(--amber-bright) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, 0.22),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(242, 163, 60, 0.18),
    0 5px 14px rgba(0, 0, 0, 0.55);
  text-shadow: 0 0 12px rgba(255, 196, 107, 0.4);
}
.chip-amber em { color: rgba(255, 196, 107, 0.66) !important; text-shadow: none; }

/* groove connectors between chips */
.flowlink {
  position: relative;
  flex: 1 0 22px;
  max-width: 44px;
  height: 4px;
  align-self: center;
  border-radius: 2px;
  background: linear-gradient(180deg, #0c0d09, #1e2118);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.04);
}
.flowlink-live { overflow: hidden; }
.flowlink-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 196, 107, 0.9) 45%, rgba(255, 235, 200, 1) 50%, rgba(255, 196, 107, 0.9) 55%, transparent 100%);
  background-size: 240% 100%;
  animation: link-current 2.6s linear infinite;
  opacity: 0.85;
}
@keyframes link-current {
  from { background-position: 130% 0; }
  to { background-position: -130% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flowlink-live::after { animation: none; opacity: 0.4; background-position: 50% 0; }
}

/* the flow diagram adopts the panel */
.flow { border: none; background: none; box-shadow: none; padding: 0; }
.flow .flow-inner { padding: 2.2rem 2rem 2rem; }
.flow-row { gap: 0.6rem; }
.flow-row .f-node { min-width: 128px; }
.flow-live { padding-bottom: 0; }
.flow-live::before, .flow-live::after { display: none; }
.flow-label { margin-bottom: 1.1rem; }
.flow-label-after { margin-top: 2.1rem; }

/* gauge: physical channel with brushed amber fill */
.gauge-track {
  position: relative;
  height: 52px;
  border-radius: 5px;
  border: none;
  background: linear-gradient(180deg, #0d0e0a, #191c13);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.75), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.gauge-track::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(237, 232, 220, 0.07) calc(10% - 1px) 10%);
}
.gauge-fill {
  border-radius: 4px 0 0 4px;
  background:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #6b5a33 0%, #4a3d1f 60%, #35300e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 235, 190, 0.25), inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}
.gauge-fill span { color: #ffe9c4; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.gauge-model {
  border-radius: 0;
  background:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #d99a3e 0%, #a5701f 60%, #7c5312 100%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.35), 0 0 26px rgba(242, 163, 60, 0.3);
}
.gauge-model span { color: #241a05; text-shadow: 0 1px 0 rgba(255, 230, 180, 0.4); }

/* paper vs metal: the manual is literally a sheet of paper */
.paper {
  background:
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(60, 50, 30, 0.06) 26px 27px),
    linear-gradient(160deg, #ece7d8 0%, #ddd7c4 100%);
  border: none;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 12px 30px rgba(0, 0, 0, 0.45);
  transform: rotate(-0.8deg);
  color: #3a362a;
}
.paper .versus-head { color: #7a7460; border-bottom: 2px solid rgba(58, 54, 42, 0.15); padding-bottom: 0.5rem; }
.paper li { color: #4a4534 !important; border-bottom: 1px dashed rgba(60, 54, 42, 0.28) !important; }
.paper::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 74px;
  height: 16px;
  transform: translateX(-50%) rotate(1.4deg);
  background: rgba(205, 196, 168, 0.55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.versus { align-items: start; }
.versus-col { position: relative; }
.versus-real.panel { transform: rotate(0.4deg); }
.versus-real .versus-head { color: var(--amber); }
.versus-real li { border-bottom-color: rgba(0, 0, 0, 0.4); }

/* phase bars become grooves with lit fill */
.pt-bar {
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(180deg, #0d0e0a, #1a1d14);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.04);
}
.pt-bar::after {
  border-radius: 3px;
  background: linear-gradient(180deg, #e2a747 0%, #a5701f 70%, #7c5312 100%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.4), 0 0 14px rgba(242, 163, 60, 0.35);
  opacity: 1;
}
.pt-bar-operate::after { background: linear-gradient(180deg, #a5804a 0%, #6d5526 70%, #4a3a15 100%); }
.pt-bar-handback::after { background: linear-gradient(180deg, #6b5a3a 0%, #453a20 70%, #2e2712 100%); }

/* handoff adopts panel + chips */
.handoff { border: none; background: none; box-shadow: none; padding: 0; }
.handoff .handoff-inner { padding: 2rem 1.8rem 1.8rem; }
.h-node {
  border: none;
  border-radius: 4px;
  background: linear-gradient(180deg, #262a21 0%, #1b1e16 55%, #14160f 100%);
  color: #8d8a7b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -2px 4px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.45);
}
.h-amber {
  background: linear-gradient(180deg, #3a3323 0%, #2b2517 55%, #1d1910 100%);
  color: var(--amber-bright);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.22), inset 0 -2px 4px rgba(0, 0, 0, 0.5), 0 0 24px rgba(242, 163, 60, 0.2), 0 5px 14px rgba(0, 0, 0, 0.55);
  text-shadow: 0 0 12px rgba(255, 196, 107, 0.4);
}

/* specificity fixes: prose p was overriding diagram annotations */
.prose .flow-label { font-size: 0.8rem; letter-spacing: 0.16em; color: var(--ink-dim); margin-bottom: 1.1rem; }
.prose .flow-label-after { color: var(--amber); margin-top: 2.1rem; }
.prose .flow-sub { color: var(--ink-faint); }
.prose .flow-note { font-size: 0.66rem; letter-spacing: 0.13em; color: var(--ink-faint); margin-top: 1.3rem; }
.prose .handoff-head { font-size: 0.7rem; }
.prose .handoff-loss { font-size: 0.66rem; }
.prose .sb-gate { font-size: 0.7rem; }

.handoff-chain { gap: 0.55rem; }
.handoff-chain .flowlink { flex: 0 1 34px; }
.handoff-head { display: none; }

/* ---------- mobile: diagrams reflow vertically ---------- */
@media (max-width: 640px) {
  /* flow chips stack; grooves turn vertical and keep their current */
  .flow-row { flex-direction: column; align-items: stretch; }
  .flow-row .flowlink {
    flex: 0 0 20px;
    width: 4px;
    max-width: 4px;
    height: 20px;
    align-self: center;
    background: linear-gradient(90deg, #0c0d09, #1e2118);
  }
  .flow-row .flowlink-live::after {
    background: linear-gradient(180deg, transparent 0%, rgba(255, 196, 107, 0.9) 45%, rgba(255, 235, 200, 1) 50%, rgba(255, 196, 107, 0.9) 55%, transparent 100%);
    background-size: 100% 240%;
    animation-name: link-current-v;
  }
  /* gauge labels step outside the track so neither clips */
  .splitbar .sb-track { overflow: visible; }
  .js .splitbar .sb-seg, .splitbar .sb-seg { overflow: visible; position: relative; }
  .splitbar .sb-seg span { position: absolute; top: calc(100% + 8px); }
  .splitbar .sb-soft span { left: 2px; }
  .splitbar .sb-model span { right: 0; color: var(--amber-bright); text-shadow: none; }
  .prose .sb-gate, .sb-gate { margin-top: 2.5rem; }
}
@keyframes link-current-v {
  from { background-position: 0 130%; }
  to { background-position: 0 -130%; }
}
