/* ===========================================================================
   Ground Control - design system
   Dark mission-control console. One gold brand accent (doubles as the
   ESCALATE / attention state). Emerald = HANDLE, slate = DROP: genuine
   semantic status colors, not decoration. Radius lock: panels 12, controls 8,
   badges pill. Space Grotesk (display) / Manrope (ui) / JetBrains Mono (data).
   =========================================================================== */

:root {
  /* surfaces */
  --bg:        #0a0c0f;
  --bg-2:      #0d1014;
  --surface:   #11151b;
  --raised:    #161b22;
  --raised-2:  #1b2129;
  --line:      rgba(255,255,255,.075);
  --line-2:    rgba(255,255,255,.13);

  /* text */
  --fg:        #e8ebef;
  --muted:     #9aa3ae;
  --faint:     #636b76;

  /* brand accent (also = attention / ESCALATE) */
  --gold:      #f5b53d;
  --gold-ink:  #1c1402;          /* text on gold */
  --gold-dim:  rgba(245,181,61,.14);
  --gold-line: rgba(245,181,61,.34);

  /* semantic route states */
  --go:        #45cf90;          /* HANDLE */
  --go-dim:    rgba(69,207,144,.13);
  --go-line:   rgba(69,207,144,.32);
  --inert:     #79838f;          /* DROP  */
  --inert-dim: rgba(121,131,143,.13);

  /* radius lock */
  --r-panel: 14px;
  --r-card:  12px;
  --r-ctl:   8px;

  --maxw: 1240px;
  --ease: cubic-bezier(.16,1,.3,1);

  --font-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --font-ui: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* atmospheric background: warm vignette + faint instrument grid. CSS only. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(245,181,61,.07), transparent 60%),
    radial-gradient(1100px 700px at 8% 6%, rgba(69,207,144,.04), transparent 62%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(1200px 800px at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(1200px 800px at 50% 0%, #000 30%, transparent 78%);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; margin: 0; }

.mono { font-family: var(--font-mono); }
.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---- eyebrow (rationed) ------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-ui); font-weight: 600; font-size: 14.5px;
  padding: 11px 18px; border-radius: var(--r-ctl);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--gold-ink); }
.btn-primary:hover { background: #ffc658; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--gold-line); color: #fff; }
.btn .arr { font-size: 17px; line-height: 1; transition: transform .15s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---- badges (pill, semantic) ------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px 3px 8px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.handle   { color: var(--go);    border-color: var(--go-line);   background: var(--go-dim); }
.badge.escalate { color: var(--gold);  border-color: var(--gold-line); background: var(--gold-dim); }
.badge.drop     { color: var(--inert); border-color: var(--line-2);    background: var(--inert-dim); }

/* status chips for service lifecycle */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted); background: var(--bg-2);
}
.chip b { color: var(--fg); font-weight: 600; }
.chip.REQUESTED { color: var(--go); border-color: var(--go-line); }
.chip.CONFIRMED { color: var(--go); border-color: var(--go-line); background: var(--go-dim); }
.chip.TBC, .chip.FLAGGED, .chip\.INBOUND-PENDING { color: var(--gold); border-color: var(--gold-line); }
.chip.NOT-CONTACTED, .chip.DROPPED { color: var(--inert); }

/* =========================================================================
   LANDING
   ========================================================================= */

/* nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: 66px; display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(10,12,15,.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav .shell { display: flex; align-items: center; gap: 26px; width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mk {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: radial-gradient(circle at 32% 30%, #ffd277, var(--gold) 55%, #c98718);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 0 0 4px rgba(245,181,61,.08);
  position: relative;
}
.brand .mk::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    linear-gradient(transparent 46%, rgba(28,20,2,.85) 46%, rgba(28,20,2,.85) 54%, transparent 54%),
    linear-gradient(90deg, transparent 46%, rgba(28,20,2,.85) 46%, rgba(28,20,2,.85) 54%, transparent 54%);
}
.brand .nm { font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; font-size: 15.5px; white-space: nowrap; }
.brand .sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.nav .links { display: flex; gap: 22px; margin-left: auto; }
.nav .links a { font-size: 14px; color: var(--muted); transition: color .2s; }
.nav .links a:hover { color: var(--fg); }
.nav .cta { margin-left: 26px; }
.nav .cta .cta-short { display: none; }
@media (max-width: 860px) { .nav .links { display: none; } .nav .cta { margin-left: auto; } }
@media (max-width: 560px) {
  .nav .shell { gap: 12px; }
  .nav .cta { padding: 9px 14px; }
  .nav .cta .cta-full { display: none; }
  .nav .cta .cta-short { display: inline; }
}

/* hero: asymmetric split */
.hero { padding: 78px 0 30px; }
.hero .shell { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero .shell > * { min-width: 0; }   /* let the artifact column shrink instead of widening the page on mobile */
.hero h1 {
  font-size: clamp(38px, 5.4vw, 66px); line-height: 1.07; font-weight: 600;
  letter-spacing: -.03em; margin: 0 0 22px; padding-bottom: .04em;
}
.hero h1 .em { color: var(--gold); font-style: italic; padding-right: .04em; } /* italic descender clearance */
.hero p.lede { font-size: 18.5px; color: var(--muted); max-width: 52ch; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 13px; flex-wrap: wrap; }
@media (max-width: 940px) {
  .hero .shell { grid-template-columns: 1fr; gap: 38px; }
  .hero { padding: 52px 0 20px; }
}

/* hero artifact: a real rendered decision card (the product's actual output) */
.artifact {
  border: 1px solid var(--line-2); border-radius: var(--r-panel);
  background: linear-gradient(180deg, var(--raised), var(--surface));
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
}
.artifact .top {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 15px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.artifact .top .lights { display: flex; gap: 6px; }
.artifact .top .lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.artifact .top .ttl { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); letter-spacing: .04em; }
.artifact .body { padding: 18px 18px 20px; }
.artifact .hdr { font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 7px 14px; margin-bottom: 14px; }
.artifact .hdr b { color: var(--fg); }
.artifact .sum { font-size: 14.5px; color: var(--fg); margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.artifact .doing { display: grid; gap: 9px; }
.artifact .doing .row { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.artifact .doing .row .leg { font-family: var(--font-mono); font-size: 11px; color: var(--gold); min-width: 46px; }
.artifact .doing .row .who { color: var(--fg); }
.artifact .doing .row .em { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-left: auto; white-space: nowrap; }
.artifact .doing .row .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .artifact .doing .row .em { display: none; } }

/* stat band */
.statband { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 40px; }
.statband .shell { display: grid; grid-template-columns: repeat(6, 1fr); }
.statband .s { padding: 24px 20px; border-left: 1px solid var(--line); }
.statband .s:first-child { border-left: none; }
.statband .s .n { font-family: var(--font-mono); font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: var(--fg); }
.statband .s .n .u { font-size: 14px; color: var(--faint); }
.statband .s .l { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.statband .s.go .n { color: var(--go); }
.statband .s.at .n { color: var(--gold); }
@media (max-width: 900px) {
  .statband .shell { grid-template-columns: repeat(3, 1fr); }
  .statband .s:nth-child(4) { border-left: none; }
  .statband .s { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) { .statband .shell { grid-template-columns: repeat(2,1fr); } }

/* sections */
section.band { padding: 96px 0; }
.sec-head { max-width: 64ch; margin-bottom: 46px; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.06; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 16px 0 0; }

/* problem: teaching layout (two labelled scope groups) */
.problem .intro { font-size: 18px; color: var(--muted); max-width: 62ch; margin: 16px 0 0; }
.problem .stops { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 34px 0; }
.problem .grp { border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 22px 24px; background: var(--surface); }
.problem .grp .gl { margin-bottom: 16px; }
.problem .grp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.problem .grp li { font-size: 15px; font-weight: 600; }
.problem .grp li span { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.problem .pain { font-size: 16.5px; color: var(--muted); max-width: 70ch; margin: 0; }
.problem .pain b { color: var(--fg); font-weight: 600; }
@media (max-width: 760px) { .problem .stops { grid-template-columns: 1fr; } }

/* process: time comparison + the four moves as a pipeline */
.process .timebar { margin: 4px 0 38px; }
.process .track {
  height: 13px; border-radius: 999px; background: var(--inert-dim);
  border: 1px solid var(--line-2); overflow: hidden;
}
.process .track .gc {
  display: block; height: 100%; width: 2.6%; min-width: 16px;
  background: linear-gradient(90deg, #ffd277, var(--gold));
  border-radius: 999px; box-shadow: 0 0 16px rgba(245,181,61,.55);
  transform-origin: left;
}
.in .track .gc { animation: growbar .9s var(--ease) both; }
@keyframes growbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.process .tlabels { display: flex; justify-content: space-between; gap: 18px; margin-top: 13px; }
.process .tlabels .t { font-size: 13.5px; color: var(--muted); }
.process .tlabels .t b { font-family: var(--font-mono); font-weight: 600; margin-right: 8px; }
.process .tlabels .t.gc b { color: var(--gold); }
.process .tlabels .t.hand { text-align: right; }
.process .tlabels .t.hand b { color: var(--fg); }

.steps-pipe {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-panel);
  overflow: hidden; background: var(--surface);
}
.steps-pipe .step { padding: 24px 22px; border-left: 1px solid var(--line); }
.steps-pipe .step:first-child { border-left: none; }
.steps-pipe .sn {
  font-family: var(--font-mono); font-size: 12px; color: var(--gold);
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  border: 1px solid var(--gold-line); background: var(--gold-dim); margin-bottom: 16px;
}
.steps-pipe .sc h3 { font-size: 17px; margin: 0 0 8px; }
.steps-pipe .sc p { color: var(--muted); font-size: 13.5px; margin: 0; }
.steps-pipe .art {
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
  margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (prefers-reduced-motion: reduce) { .in .track .gc { animation: none; } }
@media (max-width: 900px) {
  .steps-pipe { grid-template-columns: 1fr 1fr; }
  .steps-pipe .step:nth-child(3) { border-left: none; }
  .steps-pipe .step:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .steps-pipe { grid-template-columns: 1fr; }
  .steps-pipe .step { border-left: none; border-top: 1px solid var(--line); }
  .steps-pipe .step:first-child { border-top: none; }
  .process .tlabels { flex-direction: column; gap: 6px; }
  .process .tlabels .t.hand { text-align: left; }
}

/* proof: compact verified strip (eval, de-emphasized) */
.proof .proofbar {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: center;
  border: 1px solid var(--line-2); border-radius: var(--r-panel);
  background: var(--surface); padding: 24px 26px;
}
.proof .proofbar .pl { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.proof .proofbar .pl p { color: var(--muted); font-size: 14.5px; margin: 0; max-width: 58ch; }
.proof .proofbar .pcmd {
  font-family: var(--font-mono); background: #0c0f13;
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px;
}
.proof .proofbar .pcmd .cmd { color: var(--fg); font-size: 11.5px; line-height: 1.5; word-break: break-all; }
.proof .proofbar .pcmd .cmd .pr0 { color: var(--gold); }
.proof .proofbar .pcmd .res { font-size: 12px; color: var(--muted); margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.proof .proofbar .pcmd .res .ok { color: var(--go); font-weight: 600; }
.proof .proofbar .pcmd .res b { color: var(--fg); }
@media (max-width: 760px) { .proof .proofbar { grid-template-columns: 1fr; } }

/* trust boundary: defense-in-depth, three layers as a divided list */
.trust .layers { display: grid; gap: 0; margin-top: 6px; }
.trust .ly { display: grid; grid-template-columns: 92px 1fr auto; gap: 28px; align-items: start; padding: 26px 0; border-top: 1px solid var(--line); }
.trust .ly:first-child { border-top: none; padding-top: 6px; }
.trust .lyk { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.trust .lyt { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 62ch; }
.trust .lyt b { color: var(--fg); font-weight: 600; }
.trust .lyt .mono { font-family: var(--font-mono); font-size: 13px; color: var(--fg); }
.trust .lyr { justify-self: end; padding-top: 3px; }
.trust .trust-foot { margin-top: 24px; color: var(--muted); font-size: 15.5px; max-width: 74ch; }
.trust .trust-foot a { color: var(--gold); border-bottom: 1px solid var(--gold-line); }
.trust .trust-foot a:hover { border-bottom-color: var(--gold); }
@media (max-width: 760px) {
  .trust .ly { grid-template-columns: 1fr; gap: 9px; padding: 22px 0; }
  .trust .lyr { justify-self: start; }
}

/* method: editorial lead + numbered points */
.method .method-body { max-width: 820px; }
.method .grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 54px; align-items: start; }
.method .lead { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.32; font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }
.method .lead .hl { color: var(--gold); }
.method .points { display: grid; gap: 20px; margin-top: 30px; }
.method .points .pt { display: grid; grid-template-columns: 38px 1fr; gap: 14px; }
.method .points .pt .k { font-family: var(--font-mono); color: var(--gold); font-size: 13px; padding-top: 2px; }
.method .points .pt .t b { color: var(--fg); }
.method .points .pt .t span { color: var(--muted); display: block; font-size: 14.5px; }
.onerule {
  border: 1px solid var(--gold-line); border-radius: var(--r-card);
  background: var(--gold-dim); padding: 26px 24px; position: sticky; top: 90px;
}
.onerule .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.onerule .r { font-family: var(--font-display); font-size: 21px; line-height: 1.32; margin: 14px 0 0; }
.onerule .r b { color: var(--gold); }
@media (max-width: 900px) { .method .grid { grid-template-columns: 1fr; gap: 32px; } .onerule { position: static; } }

/* spine flow */
.spine-flow { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; background: var(--surface); }
.spine-step {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 20px; align-items: center;
  padding: 20px 24px; border-top: 1px solid var(--line); position: relative;
  opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.spine-step:first-child { border-top: none; }
.in .spine-step { opacity: 1; transform: none; }
.spine-step .sid { font-family: var(--font-mono); font-size: 13px; color: var(--gold); display: flex; align-items: center; gap: 10px; }
.spine-step .sid .num { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--gold-line); background: var(--gold-dim); font-size: 12px; }
.spine-step .ttl { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.spine-step .job { color: var(--muted); font-size: 14px; }
.spine-step .branch { font-family: var(--font-mono); font-size: 11px; color: var(--faint); text-align: right; }
.spine-step .branch b { color: var(--gold); }
@media (max-width: 760px) {
  .spine-step { grid-template-columns: 64px 1fr; row-gap: 4px; }
  .spine-step .branch { grid-column: 1 / -1; text-align: left; }
}
.spine-out { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 16px; }
.spine-out .o { border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 16px 18px; }
.spine-out .o .h { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.spine-out .o p { color: var(--muted); font-size: 13.5px; margin: 0; }
@media (max-width: 760px) { .spine-out { grid-template-columns: 1fr; } }

/* routes bento (asymmetric) */
.routes-bento { display: grid; grid-template-columns: 1.5fr 1fr; grid-auto-rows: 1fr; gap: 16px; }
.rtile {
  border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 26px 24px;
  background: var(--surface); display: flex; flex-direction: column; min-height: 200px;
  opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.in .rtile { opacity: 1; transform: none; }
.rtile.big { grid-row: span 2; background: linear-gradient(180deg, var(--raised), var(--surface)); }
.rtile .rt-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rtile h3 { font-size: 22px; }
.rtile p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.rtile .produces { margin-top: auto; display: grid; gap: 8px; }
.rtile .produces .pr { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; }
.rtile .produces .pr .mono { color: var(--gold); font-size: 11.5px; min-width: 78px; }
.rtile .ex { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { .routes-bento { grid-template-columns: 1fr; } .rtile.big { grid-row: auto; } }

/* cta band */
.ctaband { padding: 90px 0; border-top: 1px solid var(--line); }
.ctaband .box {
  border: 1px solid var(--gold-line); border-radius: var(--r-panel);
  background: radial-gradient(700px 300px at 80% 0%, rgba(245,181,61,.1), transparent 60%), var(--surface);
  padding: 54px 48px; display: grid; grid-template-columns: 1.4fr auto; gap: 30px; align-items: center;
}
.ctaband h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.08; }
.ctaband p { color: var(--muted); margin: 14px 0 0; font-size: 16.5px; max-width: 52ch; }
@media (max-width: 760px) { .ctaband .box { grid-template-columns: 1fr; padding: 34px 26px; } }

/* footer */
footer.foot { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--faint); }
footer.foot .shell { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; justify-content: space-between; }
footer.foot .l { font-size: 13px; }
footer.foot .l b { color: var(--muted); font-weight: 600; }
footer.foot .meta { font-family: var(--font-mono); font-size: 11.5px; }

/* reveal base */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .spine-step, .rtile { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =========================================================================
   CONSOLE
   ========================================================================= */
body.console-page { overflow: hidden; height: 100dvh; }
.console-page::after { display: none; }

.cwrap { display: flex; flex-direction: column; height: 100dvh; }

/* top ribbon */
.cbar { height: 56px; flex: none; display: flex; align-items: center; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.cbar .brand .nm { font-size: 14px; }
.cbar .seg { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 3px; }
.cbar .seg button { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; border: 0; padding: 6px 14px; border-radius: 6px; cursor: pointer; transition: .2s; }
.cbar .seg button.on { background: var(--raised-2); color: var(--fg); }
.cbar .ribbon { margin-left: auto; display: flex; gap: 18px; align-items: center; font-family: var(--font-mono); font-size: 12px; }
.cbar .ribbon .m { display: flex; align-items: baseline; gap: 6px; color: var(--faint); }
.cbar .ribbon .m b { font-size: 14px; color: var(--fg); }
.cbar .ribbon .m.go b { color: var(--go); }
.cbar .ribbon .m.at b { color: var(--gold); }
.cbar .home { color: var(--faint); font-size: 12.5px; }
.cbar .home:hover { color: var(--fg); }
@media (max-width: 720px) { .cbar .ribbon .m:nth-child(n+3) { display: none; } }

/* pipeline 3-pane */
.pipe { flex: 1; display: grid; grid-template-columns: 320px 1fr 1fr; min-height: 0; }
.pane { min-height: 0; overflow-y: auto; }
.pane.inbox { border-right: 1px solid var(--line); }
.pane.center { border-right: 1px solid var(--line); }
.pane-h { position: sticky; top: 0; z-index: 5; background: rgba(13,16,20,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.pane-h .t { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.pane-h .ct { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

/* inbox filters + list */
.filters { display: flex; gap: 6px; padding: 10px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.filters button { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; transition: .15s; }
.filters button.on { color: var(--fg); border-color: var(--line-2); background: var(--raised); }
.filters button.on[data-f="HANDLE"] { color: var(--go); border-color: var(--go-line); }
.filters button.on[data-f="ESCALATE"] { color: var(--gold); border-color: var(--gold-line); }

.mailrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; border-left: 2px solid transparent; }
.mailrow:hover { background: var(--bg-2); }
.mailrow.sel { background: var(--raised); border-left-color: var(--gold); }
.mailrow .op { font-weight: 600; font-size: 13.5px; }
.mailrow .subj { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailrow .reg { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.mailrow .rdot { width: 7px; height: 7px; border-radius: 50%; align-self: center; }
.rdot.HANDLE { background: var(--go); } .rdot.ESCALATE { background: var(--gold); } .rdot.DROP { background: var(--inert); }

/* center: inbound + decision tree + operation */
.block { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.block .bh { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.mailhead { display: grid; gap: 3px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.mailhead b { color: var(--fg); }
.mailbody { white-space: pre-wrap; font-size: 13px; line-height: 1.6; color: var(--fg); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 14px 16px; max-height: 220px; overflow: auto; }

/* decision tree */
.dtree { display: grid; gap: 0; }
.dnode { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 7px 0; position: relative; }
.dnode .rail { display: flex; flex-direction: column; align-items: center; }
.dnode .rail .mk { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--faint); flex: none; z-index: 2; }
.dnode .rail .ln { width: 2px; flex: 1; background: var(--line); margin: 3px 0; }
.dnode:last-child .rail .ln { display: none; }
.dnode .c .st { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.dnode .c .jb { color: var(--muted); font-size: 12.5px; }
.dnode.pass .rail .mk { border-color: var(--go-line); color: var(--go); background: var(--go-dim); }
.dnode.pass .rail .ln { background: var(--go-line); }
.dnode.stop .rail .mk { border-color: var(--gold-line); color: var(--gold-ink); background: var(--gold); }
.dnode.stop .c .st { color: var(--gold); }
.dnode .c .out { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin-top: 5px; padding-left: 11px; border-left: 2px solid var(--line-2); line-height: 1.5; }
.dnode .c .out .lbl {
  display: inline-block; font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--line-2); border-radius: 4px;
  padding: 1px 5px; margin-right: 8px; vertical-align: 1px;
}
.dnode.pass .c .out { border-left-color: var(--go-line); }
.dnode.pass .c .out .lbl { color: var(--go); border-color: var(--go-line); }
.dnode.stop .c .out { border-left-color: var(--gold-line); color: var(--gold); }
.dnode.stop .c .out .lbl { color: var(--gold); border-color: var(--gold-line); }
.dnode.stop .reason { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: 6px; }

/* flags-for-a-human block */
.tflags { display: grid; gap: 8px; }
.tflags .f { display: grid; grid-template-columns: 16px 1fr; gap: 9px; font-size: 13px; color: var(--muted); align-items: start; }
.tflags .f .b { font-family: var(--font-mono); color: var(--gold); font-weight: 600; text-align: center; }
.dnode.skip { opacity: .42; }
.dnode.stop .rail .mk { animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(245,181,61,.4); } 50% { box-shadow: 0 0 0 6px rgba(245,181,61,0); } }
@media (prefers-reduced-motion: reduce) { .dnode.stop .rail .mk { animation: none; } }

.outcome { margin-top: 14px; border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 14px 16px; background: var(--bg-2); }
.outcome .oh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.outcome .od { font-size: 13px; color: var(--muted); }

/* operation / trip record */
.trip { font-family: var(--font-mono); font-size: 12px; line-height: 1.7; white-space: pre-wrap; color: var(--fg); }
.svc-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }

/* right: outbox */
.pane.outbox .empty { padding: 40px 24px; color: var(--faint); font-size: 13.5px; text-align: center; }
.manifest { display: grid; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.manifest .m { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: baseline; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.manifest .m:last-child { border-bottom: none; }
.manifest .m .leg { font-family: var(--font-mono); font-size: 11px; color: var(--gold); }
.manifest .m .who b { color: var(--fg); } .manifest .m .who span { color: var(--muted); }
.manifest .m .to { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }

.draft { border-bottom: 1px solid var(--line); }
.draft summary { list-style: none; cursor: pointer; padding: 13px 18px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.draft summary::-webkit-details-marker { display: none; }
.draft summary .ix { font-family: var(--font-mono); font-size: 11px; color: var(--gold); }
.draft summary .lb { font-weight: 600; }
.draft summary .to { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }
.draft summary .car { color: var(--faint); transition: transform .2s; }
.draft[open] summary .car { transform: rotate(90deg); }
.draft .dbody { white-space: pre-wrap; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55; color: var(--muted); background: var(--bg-2); border-top: 1px solid var(--line); padding: 14px 18px; max-height: 360px; overflow: auto; }

/* staged emails: one ordered list (recipient + address + status + body) */
.staged-h { padding: 18px 18px 6px; display: flex; flex-direction: column; gap: 3px; }
.staged-h { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--fg); }
.staged-h span { font-family: var(--font-ui); font-weight: 400; font-size: 12px; color: var(--muted); }
.semail { border-bottom: 1px solid var(--line); }
.semail summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 26px 1fr 16px; gap: 11px; align-items: center; padding: 12px 18px; }
.semail summary::-webkit-details-marker { display: none; }
.semail:hover summary { background: var(--bg-2); }
.semail .n { font-family: var(--font-mono); font-size: 11px; color: var(--gold); }
.semail .meta { min-width: 0; }
.semail .r1 { display: flex; align-items: center; gap: 8px; }
.semail .r1 b { font-size: 13.5px; font-weight: 600; }
.semail .stat { font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.semail .stat.REQUESTED, .semail .stat.DRAFTED, .semail .stat.CONFIRMED { color: var(--go); border-color: var(--go-line); }
.semail .stat.TBC { color: var(--gold); border-color: var(--gold-line); }
.semail .r2 { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.semail .r2 i { color: var(--gold); font-style: normal; }
.semail .car { color: var(--faint); transition: transform .2s; }
.semail[open] .car { transform: rotate(90deg); }
.semail .dbody { white-space: pre-wrap; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55; color: var(--muted); background: var(--bg-2); border-top: 1px solid var(--line); padding: 14px 18px; max-height: 340px; overflow: auto; }
.notemail { padding: 14px 18px 18px; }
.notemail .nh { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 9px; }
.notemail .nm { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); padding: 3px 0; }

.escflag { white-space: pre-wrap; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55; color: var(--gold); background: var(--gold-dim); border: 1px solid var(--gold-line); border-radius: var(--r-card); padding: 16px 18px; margin: 16px 18px; }
.routeto { margin: 0 18px 18px; font-size: 13px; color: var(--muted); }
.routeto b { font-family: var(--font-mono); color: var(--gold); }

/* status board */
.board { flex: 1; overflow-y: auto; }
.board-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; }
.board-grid > div { padding: 24px 26px; }
.board-grid .left { border-right: 1px solid var(--line); }
.board h3 { font-size: 17px; margin-bottom: 16px; }
.board .sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 28px 0 14px; }
.board .sub:first-child { margin-top: 0; }

.optable { width: 100%; border-collapse: collapse; font-size: 13px; }
.optable th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.optable td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.optable td.ref { font-family: var(--font-mono); color: var(--gold); font-size: 12px; }
.optable td.op b { font-weight: 600; }
.optable tr:hover td { background: var(--bg-2); }

.reasonbars { display: grid; gap: 9px; }
.reasonbars .rb { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.reasonbars .rb .nm { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.reasonbars .rb .ct { font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.reasonbars .rb .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.reasonbars .rb .bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }

.logfeed { display: grid; gap: 0; }
.logentry { padding: 13px 0; border-bottom: 1px solid var(--line); }
.logentry .lh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.logentry .lh .ref { font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.logentry .lh .op { font-weight: 600; font-size: 13px; }
.logentry .lh .dt { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-left: auto; }
.logentry .sp { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.logentry .fl { font-size: 12px; color: var(--faint); margin-top: 5px; }

.miniband { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; margin-bottom: 6px; }
.miniband .m { padding: 16px 16px; border-left: 1px solid var(--line); }
.miniband .m:first-child { border-left: none; }
.miniband .m .n { font-family: var(--font-mono); font-size: 24px; font-weight: 600; }
.miniband .m .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.miniband .m.go .n { color: var(--go); } .miniband .m.at .n { color: var(--gold); }

@media (max-width: 1040px) {
  .pipe { grid-template-columns: 280px 1fr; }
  .pane.outbox { display: none; }
}
@media (max-width: 720px) {
  body.console-page { overflow: auto; height: auto; }
  .cwrap { height: auto; }
  .pipe { grid-template-columns: 1fr; }
  .pane.inbox { max-height: 40vh; }
  .board-grid { grid-template-columns: 1fr; }
  .board-grid .left { border-right: none; border-bottom: 1px solid var(--line); }
}

/* ===========================================================================
   Human approval gate (trust boundary, Layer 3) — drafts are staged, never
   sent. Pending = gold (attention), released = emerald, held = slate.
   =========================================================================== */
.approval {
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  padding: 12px 14px;
  margin: 12px 14px 4px;
}
.approval.pending  { border-color: var(--gold-line); background: var(--gold-dim); }
.approval.approved { border-color: var(--go-line);   background: var(--go-dim); }
.approval.rejected { border-color: var(--line-2);    background: var(--inert-dim); }
.approval .ah { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.approval .al {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.approval .as {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 600; letter-spacing: .05em;
}
.approval.pending  .as { color: var(--gold); }
.approval.approved .as { color: var(--go); }
.approval.rejected .as { color: var(--inert); }
.approval .ad { font-size: 12.5px; color: var(--muted); margin: 8px 0 10px; line-height: 1.5; }
.approval .ab { display: flex; gap: 8px; flex-wrap: wrap; }
.appr-btn {
  font: 600 12px Manrope, system-ui, sans-serif;
  padding: 7px 13px; border-radius: var(--r-ctl); cursor: pointer;
  border: 1px solid var(--line-2); background: var(--raised); color: var(--fg);
  transition: filter .12s ease;
}
.appr-btn:hover { filter: brightness(1.2); }
.appr-btn.ok { border-color: var(--go-line);   background: var(--go-dim);   color: var(--go); }
.appr-btn.no { border-color: var(--gold-line); background: var(--gold-dim); color: var(--gold); }
.appr-btn.rs { color: var(--muted); }

/* inbox: per-mail approval chip next to the route dot */
.mailrow .apch { width: 7px; height: 7px; border-radius: 2px; align-self: center; }
.apch.pending  { background: var(--gold); }
.apch.approved { background: var(--go); }
.apch.rejected { background: var(--inert); }

/* approvable cases show the Operation in the Outbox (above the Approve bar);
   this center-pane copy only appears when the outbox pane is collapsed */
.op-fallback { display: none; }
@media (max-width: 1040px) { .op-fallback { display: block; } }
