/* ------------------------------------------------------------------
   Muhammad Jawad - THE OPERATIONS DECK
   Dark-first engineering console: carbon ground, Fraunces display,
   JetBrains Mono telemetry, flare-orange actions, phosphor for live
   signals only. A "day shift" light theme derives from the same tokens.
------------------------------------------------------------------- */

:root {
  --paper: #0B0E14;          /* carbon ground */
  --panel: #11151E;
  --panel-tint: #0D111A;
  --ink: #E9ECF4;
  --slate: #8A93A6;
  --faint: #525D75;
  --line: #1E2534;
  --cobalt: #FF5C1F;         /* flare orange: actions, links */
  --cobalt-deep: #FF7B47;
  --cobalt-wash: #2A1610;
  --signal: #FFB02E;         /* amber: constraints, impact badges */
  --signal-wash: #211809;
  --good: #5FE0A8;           /* phosphor: live/agent/telemetry only */
  --good-wash: #0E2019;
  --dock: #0D111A;
  --dots: #161C29;
  --top-bg: rgba(11, 14, 20, 0.86);
  --float: rgba(32, 40, 60, 0.9);
  --float-line: #354261;
  --btn-ink: #14100A;        /* text on orange */
  --shadow: rgba(0, 0, 0, 0.7);
  --radius: 8px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", "Segoe UI", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

/* day shift */
:root[data-theme="light"] {
  --float: rgba(20, 24, 31, 0.96);
  --float-line: #2A3348;
  --paper: #F5F3EE;
  --panel: #FFFFFF;
  --panel-tint: #FAF8F3;
  --ink: #16191F;
  --slate: #5B6371;
  --faint: #98938A;
  --line: #E4DFD4;
  --cobalt: #E24A12;
  --cobalt-deep: #C03D0C;
  --cobalt-wash: #FBEAE2;
  --signal: #A05A00;
  --signal-wash: #F9EFDC;
  --good: #0E7A52;
  --good-wash: #E2F3EB;
  --dock: #14181F;
  --dots: #E6E1D6;
  --top-bg: rgba(245, 243, 238, 0.88);
  --btn-ink: #FFFFFF;
  --shadow: rgba(22, 25, 31, 0.25);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --paper: #F5F3EE; --panel: #FFFFFF; --panel-tint: #FAF8F3;
    --ink: #16191F; --slate: #5B6371; --faint: #98938A; --line: #E4DFD4;
    --cobalt: #E24A12; --cobalt-deep: #C03D0C; --cobalt-wash: #FBEAE2;
    --signal: #A05A00; --signal-wash: #F9EFDC;
    --good: #0E7A52; --good-wash: #E2F3EB;
    --dock: #14181F; --dots: #E6E1D6; --top-bg: rgba(245, 243, 238, 0.88);
    --float: rgba(20, 24, 31, 0.96); --float-line: #2A3348;
    --btn-ink: #FFFFFF; --shadow: rgba(22, 25, 31, 0.25);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* the hidden attribute always wins, even over display:flex components */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; }

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

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

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

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 26px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cobalt); color: var(--btn-ink); padding: 10px 18px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* mono telemetry labels: the structural device of the whole deck */
.field {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
}
.field::before { content: "// "; color: var(--faint); }

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

.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--top-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  display: flex; align-items: center; gap: 24px;
  height: 62px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 500; font-size: 14px; color: var(--ink);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--cobalt); }
.top nav { display: flex; gap: 22px; margin-left: auto; min-width: 0; }
.top nav a {
  color: var(--slate); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.top nav a:hover { color: var(--ink); text-decoration: none; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 10px 19px; border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--cobalt); color: var(--btn-ink); }
.btn-primary:hover { background: var(--cobalt-deep); color: var(--btn-ink); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--slate); text-decoration: none; }
.top .btn { padding: 7px 14px; }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--slate); }
.theme-icon {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--signal);
  box-shadow: inset -4px -3px 0 0 var(--panel);
}
:root[data-theme="light"] .theme-icon { box-shadow: none; }

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

.hero {
  position: relative;
  padding: 76px 0 70px;
  /* dot grid, not ruled lines: texture that can never cut through text or buttons */
  background-image: radial-gradient(var(--dots) 1px, transparent 1.4px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 380;
  font-size: clamp(46px, 6.4vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.015em;
  margin: 20px 0 24px;
}
.hero h1 em {
  font-style: italic; font-weight: 430; color: var(--cobalt);
}
.hero-sub {
  font-size: 17.5px; color: var(--slate); max-width: 54ch;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; align-items: center; }
.hero-ctas .btn { font-size: 15px; padding: 13px 24px; }
.hero-loc { margin-top: 22px; font-size: 13px; color: var(--faint); max-width: 54ch; font-family: var(--font-mono); }

/* evidence ledger */
.ledger {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 24px 50px -30px var(--shadow);
}
.ledger > .field { display: block; margin-bottom: 12px; }
.ledger-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ledger-tile {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel-tint); padding: 12px 12px 10px;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.ledger-tile:hover {
  border-color: var(--cobalt);
  text-decoration: none; transform: translateY(-1px);
}
.ledger-tile .n {
  font-family: var(--font-display); font-weight: 500;
  font-size: 26px; letter-spacing: -0.01em; line-height: 1.05;
  color: var(--ink);
}
.ledger-tile:first-child .n { color: var(--signal); }
.ledger-tile .l { font-size: 11.5px; line-height: 1.4; color: var(--slate); }
.ledger-tile .src {
  font-family: var(--font-mono); font-size: 8.5px;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--faint); margin-top: 3px;
}
.ledger-note { margin-top: 12px; font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); }

/* ---------------- sections ---------------- */

section { padding: 82px 0; }
section + section { border-top: 1px solid var(--line); }

.sec-head { margin-bottom: 36px; max-width: 72ch; }
.sec-head h2 {
  font-family: var(--font-display);
  font-weight: 420;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 14px 0 12px;
}
.sec-head p { color: var(--slate); font-size: 16.5px; }

/* ---------------- proof navigator ---------------- */

.nav-band { padding: 0; border-bottom: 1px solid var(--line); }
.nav-band:has(.nav-strip[hidden]):has(.route-panel[hidden]) { display: none; }
.nav-strip { padding: 24px 0 20px; }
.nav-strip > .field { display: block; margin-bottom: 12px; }
.intent-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.intent-chip {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); border-radius: 20px; padding: 8px 16px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.intent-chip:hover { border-color: var(--cobalt); }
.intent-chip.active { background: var(--cobalt); border-color: var(--cobalt); color: var(--btn-ink); }

.route-panel, .route-brief {
  background: var(--panel); border: 1px solid var(--cobalt);
  border-radius: var(--radius); padding: 20px 22px;
  margin: 0 0 26px;
  box-shadow: 0 20px 44px -30px var(--shadow);
}
.route-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.route-level { font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; margin-top: 4px; }
.route-mins { font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--slate); letter-spacing: 0.06em; }
.route-clear { padding: 6px 12px; font-size: 13px; }
.route-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.route-row {
  display: flex; align-items: baseline; gap: 12px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel-tint); padding: 10px 14px; font-size: 14.5px;
}
.route-row > div { flex: 1; min-width: 0; }
.route-n {
  font-family: var(--font-mono); font-size: 11px; color: var(--good);
  border: 1px solid var(--good); border-radius: 50%;
  width: 22px; height: 22px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  align-self: center;
}
.route-row b a { color: var(--ink); }
.route-row b a:hover { color: var(--cobalt); text-decoration: none; }
.route-why { display: block; color: var(--slate); font-size: 13.5px; }
/* doubled selector outranks the generic `.chips { margin-top: auto }` rule,
   which was collapsing this margin to zero */
.route-skills.route-skills { margin: 16px 0 4px; }
.route-gap { margin-top: 12px; font-size: 14px; color: var(--slate); }
.route-gap .gapx { color: var(--signal); font-weight: 700; }
.route-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.route-note { margin-top: 12px; font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; }
.route-dim { opacity: 0.3; }
.route-dim:hover { opacity: 1; }
.brief-logistics { margin-top: 12px; font-size: 14px; color: var(--slate); }
.route-brief { margin-top: 26px; }
.route-brief .pitch-box { margin-top: 14px; }

/* guided evidence mode */
.guide-panel {
  border: 1px solid var(--good); border-left: 3px solid var(--good);
  background: var(--panel); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px;
  grid-column: 1 / -1;
}
.guide-panel > .field { display: block; margin-bottom: 6px; color: var(--good); }
.guide-panel > .field::before { color: var(--good); }
.guide-row { margin-top: 12px; }
.guide-row .field { display: block; margin-bottom: 2px; }
.guide-row p { font-size: 14.5px; }
.guide-why { border-top: 1px dashed var(--line); padding-top: 12px; }
.guide-why p { color: var(--ink); font-weight: 500; }

.guide-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 16px; z-index: 85;
  display: flex; align-items: center; gap: 16px;
  background: var(--float, var(--dock)); color: #E9ECF4;
  backdrop-filter: blur(14px);
  border: 1px solid var(--float-line, var(--line));
  border-radius: 12px; padding: 10px 16px;
  width: min(680px, calc(100vw - 24px));
  box-shadow: 0 26px 54px -18px var(--shadow);
}
.guide-label { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.guide-dots { display: flex; gap: 7px; align-items: center; }
.guide-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid #55627C; background: transparent; cursor: pointer; padding: 0;
}
.guide-dot.on { background: var(--good); border-color: var(--good); }
.guide-dot.brief { border-radius: 3px; }
.guide-ctrl { display: flex; gap: 8px; }
.guide-ctrl .btn { padding: 6px 12px; font-size: 13px; }
.guide-ctrl .btn-ghost { color: #E9ECF4; border-color: #2A3348; }
.guide-ctrl .btn-ghost:hover { border-color: #E9ECF4; }
.guide-ctrl .btn[disabled] { opacity: 0.4; cursor: default; }

/* voice tour — "live presenter" pill top-center, minimal controls bottom-center */
.tour-cta { position: relative; }
.tour-cta-icon { font-size: 11px; }

/* tiny animated equalizer: says "this speaks" at a glance */
/* bars grow from the vertical center so the icon always sits balanced */
.eq { display: inline-flex; align-items: center; gap: 2.5px; height: 14px; }
.eq i { width: 3px; height: 6px; border-radius: 2px; background: currentColor; animation: eq-bounce 1.15s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: 0.22s; height: 11px; }
.eq i:nth-child(3) { animation-delay: 0.48s; height: 8px; }
@keyframes eq-bounce { 50% { height: 14px; } }

/* one-shot nudge: gentle ring + a caption bubble, once per session */
.tour-cta.nudge { animation: cta-ring 1.7s ease-out 2; }
@keyframes cta-ring {
  25% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--cobalt) 28%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cobalt) 0%, transparent); }
}
.tour-cta.nudge::after {
  content: "3\00BD-minute spoken tour \2014 press play";
  position: absolute; left: 0; bottom: calc(100% + 12px);
  background: var(--float); color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 12px; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 14px 30px -14px var(--shadow);
  animation: nudge-in 0.35s ease-out;
}
@keyframes nudge-in { from { opacity: 0; transform: translateY(5px); } }

/* floating tour shortcut: round icon button stacked above the chat fab */
.tour-float {
  position: fixed; right: 22px; bottom: 92px; z-index: 90;
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px;
  background: var(--dock); color: #F2F4F9;
  border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; box-shadow: 0 20px 44px -14px var(--shadow);
  transition: transform 0.15s;
}
.tour-float:hover { transform: translateY(-2px); }
.tour-float { padding: 0; line-height: 1; }
/* scale the whole icon so bars and their animation grow together,
   and centering stays exact on both axes */
.tour-float .eq { height: 14px; transform: scale(1.35); transform-origin: center; }
.tour-float .eq i { background: var(--cobalt); width: 3px; }
body.tour-on .tour-float { display: none; }
.tour-cta-note {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 400;
  letter-spacing: 0.07em; text-transform: uppercase; opacity: 0.8;
  margin-left: 6px;
}

.tour-pill {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: 74px; z-index: 88;
  background: var(--float, var(--dock)); color: #E9ECF4;
  backdrop-filter: blur(14px);
  border: 1px solid var(--float-line, var(--line));
  border-radius: 26px; padding: 9px 20px 9px 12px;
  max-width: calc(100vw - 24px);
  box-shadow: 0 18px 44px -16px var(--shadow);
  text-align: center;
}
.tour-pill-head {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: nowrap; white-space: nowrap;
}
.tour-pill-label { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.tour-pill-step { font-family: var(--font-mono); font-size: 10px; color: #7C879D; letter-spacing: 0.08em; white-space: nowrap; }

/* the presenter icon: equalizer bars, the same "this speaks" motif as the
   play button and the floating shortcut; bars dance only while speaking */
.tour-speak { height: 18px; flex-shrink: 0; }
.tour-speak i {
  background: var(--cobalt); width: 3.5px;
  animation-play-state: paused;
}
.tour-speak i:nth-child(2) { background: var(--signal); height: 13px; }
.tour-speak i:nth-child(3) { background: var(--good); height: 9px; animation-delay: 0.34s; }
.tour-speak i:nth-child(4) { background: var(--signal); height: 12px; animation-delay: 0.62s; }
.speaking .tour-speak i { animation-play-state: running; }

#tour-caption {
  font-size: 12.5px; line-height: 1.45; color: #B9C1D2;
  margin-top: 5px; max-height: 3em; overflow-y: auto;
}

.tour-controls {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 20px; z-index: 89;
  display: flex; align-items: center; gap: 6px;
  background: var(--float, var(--dock)); border: 1px solid var(--float-line, var(--line));
  backdrop-filter: blur(14px);
  border-radius: 26px; padding: 7px 10px;
  box-shadow: 0 20px 44px -14px var(--shadow);
}
.tour-controls button {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: transparent; color: #E9ECF4;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; font-family: var(--font-body); font-weight: 600;
  transition: background 0.15s;
}
.tour-controls button:hover { background: rgba(255,255,255,0.08); }
.tour-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.ico-stop { width: 12px; height: 12px; background: currentColor; border-radius: 2px; display: inline-block; }
.ico-pause { width: 12px; height: 13px; display: inline-block; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.ico-play {
  width: 0; height: 0; display: inline-block; margin-left: 3px;
  border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}

/* floating elements never collide: the chat bubble yields while the tour runs */
body.tour-on .chat-fab { display: none; }

/* decision explorations */
.decision {
  border: 1px dashed var(--signal); border-radius: 8px;
  background: var(--signal-wash); padding: 14px 16px; margin-top: 16px;
}
.decision > .field { color: var(--signal); }
.decision > .field::before { color: var(--signal); }
.decision-scenario { font-size: 14.5px; margin-top: 6px; }
.decision-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.decision-opt {
  text-align: left; font-family: var(--font-body); font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel); color: var(--ink);
  padding: 9px 13px; cursor: pointer;
  transition: border-color 0.15s;
}
.decision-opt:hover { border-color: var(--signal); }
.decision-opt.chosen { border-color: var(--signal); box-shadow: inset 3px 0 0 var(--signal); }
.decision-discussion {
  border-left: 3px solid var(--line); margin: 2px 0 4px 12px; padding: 4px 12px;
  font-size: 14px; color: var(--slate);
}
.decision-resolution { margin-top: 12px; border-top: 1px dashed var(--signal); padding-top: 10px; }
.decision-resolution p { font-size: 14px; }

/* ---------------- role lenses ---------------- */

.lens-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
  margin-bottom: 26px;
}
.lens-btn {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--slate); border-radius: 20px; padding: 6px 15px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.lens-btn:hover { border-color: var(--cobalt); color: var(--ink); }
.lens-btn.active {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}
.lens-status { font-size: 12.5px; color: var(--faint); margin-left: 6px; font-family: var(--font-mono); }
.lens-hidden { display: none !important; }

/* ---------------- fit check ---------------- */

#fit { background: var(--panel-tint); }
.fit-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 34px; align-items: start;
}
.fit-input-panel, .fit-report {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.fit-input-panel textarea {
  width: 100%; min-height: 300px; resize: vertical;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55;
  color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px;
  padding: 14px; background: var(--panel-tint);
  margin-top: 12px;
}
.fit-input-panel textarea:focus { outline: 2px solid var(--cobalt); outline-offset: -1px; }
.fit-actions { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.fit-note { font-size: 13px; color: var(--faint); margin-top: 12px; }
.noscript-note {
  margin-top: 20px; font-size: 14px; color: var(--slate);
  border: 1px dashed var(--line); border-radius: 8px; padding: 12px 16px;
}

.fit-report { min-height: 380px; }
.fit-empty {
  height: 100%; min-height: 330px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--faint); gap: 10px; padding: 20px;
}
.fit-empty .glyph { font-size: 34px; color: var(--cobalt); }

.score-row { display: flex; align-items: center; gap: 18px; margin: 14px 0 6px; }
.score-dial {
  font-family: var(--font-display); font-weight: 500;
  font-size: 52px; letter-spacing: -0.02em; line-height: 1;
}
.score-verdict { font-weight: 600; font-size: 17px; }
.score-verdict .field { display: block; margin-bottom: 3px; }
.score-bar {
  height: 6px; background: var(--line); border-radius: 3px;
  overflow: hidden; margin: 10px 0 8px;
}
.score-bar div {
  height: 100%; background: var(--cobalt); border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.score-note { font-size: 13px; color: var(--faint); margin-bottom: 14px; }

.fit-block { margin-top: 20px; }
.fit-block > .field { display: block; margin-bottom: 10px; }
.fit-small { margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.match-list { display: flex; flex-direction: column; gap: 7px; }
.match-item {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 14.5px; line-height: 1.45;
}
.match-item .tick { color: var(--good); font-weight: 700; flex-shrink: 0; }
.match-item .gapx { color: var(--signal); font-weight: 700; flex-shrink: 0; }
.match-item .unrec { color: var(--faint); font-weight: 700; flex-shrink: 0; font-family: var(--font-mono); }
.match-item .ev { color: var(--slate); }
.match-item .ev a { color: var(--cobalt); }

.fit-projects { display: flex; flex-direction: column; gap: 10px; }
.fit-proj {
  display: flex; justify-content: space-between; gap: 14px;
  border: 1px solid var(--line); border-radius: 7px;
  padding: 10px 14px; font-size: 14.5px;
  background: var(--panel-tint);
}
.fit-proj b { font-weight: 600; }
.fit-proj b a { color: var(--ink); }
.fit-proj b a:hover { color: var(--cobalt); text-decoration: none; }
.fit-proj .why { color: var(--slate); }

.pitch-box {
  border: 1px solid var(--line); border-left: 3px solid var(--cobalt);
  background: var(--panel-tint);
  border-radius: 7px; padding: 14px 16px;
  font-size: 14.5px; color: var(--ink);
}
.copy-pitch { margin-top: 10px; }

/* ---------------- systems / projects ---------------- */

.proj-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.proj-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 25px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.proj-card:hover {
  border-color: var(--faint);
  box-shadow: 0 18px 38px -26px var(--shadow);
}
.proj-card.dimmed { opacity: 0.28; }
.proj-card.flash, .more-item.flash {
  animation: flash-border 2.2s ease-out;
}
@keyframes flash-border {
  0% { border-color: var(--good); box-shadow: 0 0 0 3px var(--good-wash); }
  70% { border-color: var(--good); box-shadow: 0 0 0 3px var(--good-wash); }
  100% { border-color: var(--line); box-shadow: none; }
}

/* AI spotlight: held on whatever the presenter or concierge is describing.
   Bounded boxes breathe with the accent; full sections get a quiet side-bar
   so the treatment never shouts. */
.ai-focus {
  border-color: var(--cobalt) !important;
  box-shadow: 0 0 0 1px var(--cobalt),
    0 10px 44px -12px color-mix(in srgb, var(--cobalt) 45%, transparent);
  animation: ai-breathe 2.8s ease-in-out infinite;
}
@keyframes ai-breathe {
  50% {
    box-shadow: 0 0 0 1px var(--cobalt),
      0 10px 60px -8px color-mix(in srgb, var(--cobalt) 70%, transparent);
  }
}
.ai-focus-section {
  box-shadow: inset 3px 0 0 var(--cobalt);
  background-image: linear-gradient(90deg,
    color-mix(in srgb, var(--cobalt) 6%, transparent), transparent 320px);
}
.proj-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.proj-card h3 {
  font-family: var(--font-display); font-weight: 480;
  font-size: 25px; letter-spacing: -0.01em;
}
.proj-card h3 a { color: var(--ink); }
.proj-card h3 a:hover { color: var(--cobalt); text-decoration: none; }
.proj-impact {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--signal); background: var(--signal-wash);
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.proj-role { font-size: 13px; color: var(--slate); font-family: var(--font-mono); }
.proj-tagline { font-size: 15px; }
.proj-conf { font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.conf-badge {
  display: inline-block;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate); border: 1px dashed var(--faint);
  border-radius: 4px; padding: 1px 7px; margin-right: 6px;
}
.proj-constraint {
  border-left: 3px solid var(--signal);
  background: var(--signal-wash);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
}
.proj-constraint .field { display: block; margin-bottom: 3px; color: var(--signal); }
.proj-constraint .field::before { color: var(--signal); }
.proj-constraint p { font-size: 14px; line-height: 1.5; }
.proj-flow {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--slate);
  background: var(--panel-tint); border: 1px dashed var(--line);
  border-radius: 6px; padding: 8px 11px;
  overflow-x: auto; white-space: nowrap;
}
.proj-flow .arr { color: var(--good); padding: 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.chip {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--slate); border: 1px solid var(--line);
  padding: 2.5px 9px; border-radius: 20px; background: var(--panel);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chip.hl { color: var(--cobalt); border-color: var(--cobalt); background: var(--cobalt-wash); }
.proj-card details { font-size: 14.5px; color: var(--slate); }
.proj-card summary {
  cursor: pointer; color: var(--cobalt); font-weight: 500;
  font-size: 13.5px; list-style: none; user-select: none;
}
.proj-card summary::-webkit-details-marker { display: none; }
.proj-card summary::after { content: " +"; }
.proj-card details[open] summary::after { content: " \2212"; }
.proj-card details p { margin-top: 8px; }

.more-systems { margin-top: 44px; }
.more-systems > .field { display: block; margin-bottom: 16px; }
.more-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.more-item {
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel); padding: 12px 15px;
  font-size: 13.5px; transition: opacity 0.2s;
  display: flex; flex-direction: column; gap: 2px;
}
.more-item.dimmed { opacity: 0.28; }
.more-item b { font-weight: 600; font-size: 14.5px; }
.more-item span { color: var(--slate); }
.more-item .more-role { font-size: 11px; color: var(--faint); font-family: var(--font-mono); }

/* ---------------- approach ---------------- */

.approach-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.approach-item {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.approach-item h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 480;
  letter-spacing: -0.01em; margin: 8px 0 8px;
}
.approach-item p { color: var(--slate); font-size: 15px; }

/* ---------------- experience ---------------- */

.xp { border-left: 1px solid var(--line); margin-left: 6px; padding-left: 30px; display: flex; flex-direction: column; gap: 34px; }
.xp-item { position: relative; max-width: 76ch; }
.xp-item::before {
  content: ""; position: absolute; left: -36px; top: 8px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--cobalt);
}
.xp-item.minor::before { border-color: var(--faint); }
.xp-item h3 { font-family: var(--font-display); font-size: 23px; font-weight: 480; letter-spacing: -0.01em; }
.xp-meta { font-size: 12.5px; color: var(--slate); margin: 4px 0 10px; font-family: var(--font-mono); }
.xp-item ul { padding-left: 20px; color: var(--ink); }
.xp-item li { margin: 6px 0; font-size: 15.5px; }
.xp-item li::marker { color: var(--cobalt); }

/* ---------------- stack ---------------- */

.stack-groups { display: flex; flex-direction: column; gap: 26px; }
.stack-group .field { display: block; margin-bottom: 12px; }
.stack-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-chip {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 7px; padding: 7px 13px;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}
button.skill-chip { cursor: pointer; }
button.skill-chip:hover { border-color: var(--cobalt); }
.skill-chip.active { background: var(--cobalt); border-color: var(--cobalt); color: var(--btn-ink); }
.skill-chip .pips { display: inline-flex; gap: 2.5px; }
.skill-chip .pip {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--line);
}
.skill-chip .pip.on { background: var(--cobalt); }
.skill-chip.active .pip { background: rgba(0,0,0,0.3); }
.skill-chip.active .pip.on { background: var(--btn-ink); }
.stack-hint { margin-top: 22px; font-size: 14px; color: var(--faint); }
.stack-hint b { color: var(--slate); }

/* ---------------- credentials ---------------- */

.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cred-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.cred-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 480; margin: 10px 0 6px; }
.cred-card p { color: var(--slate); font-size: 15px; }
.cred-card p b { color: var(--ink); }

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

footer {
  background: var(--dock); color: #B9C1D2;
  border-top: 1px solid var(--line);
  padding: 72px 0 40px; margin-top: 0;
}
footer .field { color: #7C879D; }
footer .field::before { color: #55627C; }
footer h2 {
  font-family: var(--font-display); color: #F2F4F9; font-weight: 420;
  font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -0.01em;
  margin: 14px 0 10px;
}
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 44px; align-items: start; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.foot-links .btn-ghost { color: #F2F4F9; border-color: #2A3348; }
.foot-links .btn-ghost:hover { border-color: #F2F4F9; }
.foot-links .btn-primary { background: var(--cobalt); color: var(--btn-ink); }
.foot-links .btn-primary:hover { background: var(--cobalt-deep); }

.clocks { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.clock-row {
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--font-mono); font-size: 13px;
  border-bottom: 1px dashed #2A3348; padding-bottom: 9px;
}
.clock-row .city { color: #7C879D; }
.clock-row .t { color: #F2F4F9; }
.clock-row.me .city, .clock-row.me .t { color: var(--good); }
.clock-note { margin-top: 14px; font-size: 13.5px; color: #7C879D; }
.foot-note { margin-top: 46px; font-size: 12px; color: #55627C; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); }
.foot-note a { color: #7C879D; }

/* ---------------- chat dock ---------------- */

.chat-fab { display: none; }
.js .chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px;
  background: var(--dock); color: #F2F4F9;
  border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; box-shadow: 0 20px 44px -14px var(--shadow);
  transition: transform 0.15s;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab .fab-ico { display: block; }
.chat-fab .pulse {
  position: absolute; top: 3px; right: 3px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--good);
  border: 2px solid var(--dock);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.chat-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: min(400px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 60px));
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 34px 74px -22px var(--shadow);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-head {
  background: var(--dock); color: #F2F4F9;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
}
.chat-head .t { font-weight: 600; font-size: 15px; }
.chat-head .s { font-size: 10.5px; color: var(--good); font-family: var(--font-mono); letter-spacing: 0.06em; }
.chat-close {
  margin-left: auto; background: none; border: none; color: #7C879D;
  font-size: 20px; cursor: pointer; line-height: 1;
}
.chat-close:hover { color: #F2F4F9; }
.chat-log {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--panel-tint);
}
.msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.msg.bot { background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--cobalt); color: var(--btn-ink); border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-sources { font-size: 12.5px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 10px; background: var(--panel-tint); }
.chat-chip {
  font-size: 12.5px; font-family: var(--font-body);
  border: 1px solid var(--line); background: var(--panel);
  color: var(--cobalt); border-radius: 20px; padding: 5px 12px; cursor: pointer;
}
.chat-chip:hover { border-color: var(--cobalt); }
.chat-form {
  display: flex; gap: 10px; padding: 12px 14px;
  border-top: 1px solid var(--line); background: var(--panel);
}
.chat-form input {
  flex: 1; border: 1px solid var(--line); border-radius: 7px;
  padding: 10px 13px; font-size: 14px; font-family: var(--font-body);
  background: var(--panel-tint); color: var(--ink);
}
.chat-form input:focus { outline: 2px solid var(--cobalt); outline-offset: -1px; }
.chat-form button {
  background: var(--cobalt); color: var(--btn-ink); border: none; border-radius: 7px;
  padding: 0 16px; font-size: 15px; cursor: pointer; font-weight: 600;
}
.chat-form button:hover { background: var(--cobalt-deep); }
#chat-mic {
  background: var(--panel-tint); color: var(--ink);
  border: 1px solid var(--line); padding: 0 12px; font-size: 15px;
}
#chat-mic:hover { background: var(--panel-tint); border-color: var(--cobalt); }
#chat-mic.listening {
  background: var(--good); border-color: var(--good); color: #0B0E14;
  animation: pulse 1.4s ease-in-out infinite;
}
#chat-mic.speaking { background: var(--signal-wash); border-color: var(--signal); }

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

/* scroll reveals only ever hide content when JS is running */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chat-fab .pulse { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .score-bar div { transition: none; }
  .proj-card.flash, .more-item.flash { animation: none; border-color: var(--good); }
  .ai-focus { animation: none; }
  .eq i { animation: none; }
  .tour-cta.nudge { animation: none; }
  .ledger-tile:hover { transform: none; }
  .speaking .tour-speak i { animation: none; }
}

/* ---------------- responsive ---------------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .fit-grid { grid-template-columns: minmax(0, 1fr); }
  .proj-grid { grid-template-columns: minmax(0, 1fr); }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cred-grid { grid-template-columns: minmax(0, 1fr); }
  .approach-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }

  /* nav stays available: compact scrollable row, no JS required */
  .top-in { gap: 14px; }
  .top nav {
    gap: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 4px 2px;
  }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { font-size: 13.5px; }
}
@media (max-width: 640px) {
  .top-resume { display: none; }
  .ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .more-grid { grid-template-columns: minmax(0, 1fr); }
  section { padding: 56px 0; }
  .hero { padding: 52px 0; }
  .brand { font-size: 13px; }
  .guide-label { display: none; }
  .guide-bar { gap: 10px; justify-content: space-between; }
  .tour-cta-note { display: none; }
  .tour-pill { top: 68px; }
  .route-head { flex-direction: column; }
  .route-row { flex-wrap: wrap; }
  .route-row > div { flex: 1 1 200px; }

  /* narrow screens: badges and pipeline strips must never widen the page */
  .proj-top { flex-wrap: wrap; }
  .proj-impact { white-space: normal; line-height: 1.35; }
  .proj-flow { max-width: 100%; }
  .proj-card, .more-item, .guide-panel, .decision, .route-panel, .route-brief { min-width: 0; }
  .chips { min-width: 0; }
  .chip { white-space: normal; }
}
@media (max-width: 360px) {
  .ledger-grid { grid-template-columns: minmax(0, 1fr); }
}
