/* ============================================================
   IMVEST — Company Overview
   Dual-mode experience: scroll site  ⇄  fullscreen present deck
   ============================================================ */

/* ---------- Fonts (Google) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --bg:       #09333F;
  --bg-deep:  #04161c;
  --ink:      #EAF3F3;
  --ink-soft: rgba(234,243,243,0.86);
  --ink-dim:  rgba(234,243,243,0.60);
  --teal:     #5BC5CC;
  --teal-2:   #7BD2D2;
  --line:     rgba(123,210,210,0.16);
  --line-2:   rgba(123,210,210,0.45);
  --glow:     rgba(91,197,204,0.42);
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --pad: clamp(24px, 5vw, 96px);
}

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

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(180deg, #0a3844 0%, #072832 55%, #05202a 100%) fixed;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(91,197,204,0.3); color: #fff; }

/* ---------- Animations ---------- */
@keyframes imvBlink   { 0%,55%{opacity:1} 56%,100%{opacity:.18} }
@keyframes imvRise    { from { opacity:0; transform: translateY(28px); } to { opacity:1; transform:none; } }
@keyframes imvScrollDot { 0%{transform:translateY(0);opacity:0} 30%{opacity:1} 80%{opacity:1} 100%{transform:translateY(16px);opacity:0} }
@keyframes imvDash    { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: no-preference) {
  [data-blink] { animation: imvBlink 1.5s steps(1,end) infinite; }
}

/* Rise-in reveal — armed by JS via .reveal / .in classes */
[data-rise] { opacity: 1; }
.js [data-rise] { opacity: 0; }
.js [data-rise].in {
  animation: imvRise .85s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: calc(var(--d, 0) * 90ms);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-rise] { opacity: 1 !important; animation: none !important; }
  [data-blink] { animation: none !important; }
  .scrollcue .mouse::after { animation: none !important; }
}

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

/* ============================================================
   SCROLL MODE (default)
   ============================================================ */
/* one continuous background field behind everything (scroll-driven line chart) */
.bgfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.deck { position: relative; z-index: 1; }   /* natural, free scrolling — no snap */

.slide {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  background: transparent;          /* sections float over the continuous field */
  color: var(--ink);
  display: flex;
  flex-direction: column;
  padding: clamp(48px, 6vh, 60px) var(--pad) clamp(44px, 5vh, 56px);
}

/* background canvas */
.slide__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* corner ticks */
.slide::before, .slide::after {
  content: ""; position: absolute; width: 24px; height: 24px;
  z-index: 2; pointer-events: none;
}
.slide::before { top: 28px; left: 28px; border-left: 2px solid var(--line-2); border-top: 2px solid var(--line-2); }
.slide::after  { bottom: 28px; right: 28px; border-right: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); }

.slide > *:not(.slide__bg) { position: relative; z-index: 2; }

/* ---------- Header row ---------- */
.slide__top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.slide__logo { height: 32px; width: auto; }
/* clean header lockup: bars mark + IMVEST wordmark in the site font */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { height: 26px; width: auto; display: block; filter: drop-shadow(0 0 10px rgba(91,197,204,0.25)); }
.brand__name {
  font-family: var(--sans); font-weight: 700; font-size: clamp(19px, 1.5vw, 23px);
  letter-spacing: .04em; color: var(--ink); line-height: 1;
}
.status {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: clamp(13px,1.1vw,16px);
  letter-spacing: .1em; color: var(--teal);
}
.status .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 12px var(--teal); flex: none;
}
.status .sep { color: rgba(123,210,210,.35); }
.status .meta { color: rgba(234,243,243,.55); }

/* ---------- Body ---------- */
.slide__body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.slide--cover .slide__body,
.slide--close .slide__body { justify-content: center; }

.eyebrow {
  font-family: var(--mono); font-size: clamp(13px,1.1vw,16px);
  letter-spacing: .1em; color: var(--teal); margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px;
}
.eyebrow .n { font-weight: 500; }
.eyebrow .lbl { color: rgba(123,210,210,.62); }

h1.title {
  font-size: clamp(40px, 6.4vw, 80px); line-height: 1.04; font-weight: 600;
  letter-spacing: -.02em; text-shadow: 0 0 44px rgba(91,197,204,.28);
  max-width: 16ch;
}
h2.title {
  font-size: clamp(34px, 5vw, 58px); line-height: 1.05; font-weight: 600;
  letter-spacing: -.015em; margin-top: 18px;
}
.lead { font-size: clamp(22px,2.6vw,38px); line-height: 1.3; color: var(--ink-soft); }

/* ---------- Bullets (cover) ---------- */
.bullets { margin-top: 34px; display: flex; flex-direction: column; gap: clamp(14px,2vh,20px); }
.bullet { display: flex; align-items: center; gap: 16px; }
.bullet .sq { width: 11px; height: 11px; background: var(--teal); box-shadow: 0 0 12px var(--teal); flex: none; }
.bullet span { font-size: clamp(20px,2.1vw,31px); line-height: 1.2; color: var(--ink-soft); }

/* cover hero mark — subtle backdrop element, not a focal point */
.hero-mark {
  position: absolute; top: 44%; right: clamp(20px,7vw,110px);
  transform: translateY(-50%); height: clamp(150px,24vw,280px); width: auto;
  z-index: 1; pointer-events: none; filter: drop-shadow(0 0 32px rgba(91,197,204,0.25));
  opacity: .28;
}
@media (max-width: 900px){ .hero-mark { opacity: .16; right: -30px; } }

/* ---------- Two-column rows (who we are / infra) ---------- */
.cols { display: flex; gap: clamp(40px,7vw,110px); margin-top: 28px; flex: 1; }
.col-side { width: clamp(280px,30vw,520px); flex: none; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.col-main { flex: 1; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--line); }
/* stack the two columns on phones/tablets so the right-column text isn't crushed */
@media (max-width: 820px){
  .cols { flex-direction: column; gap: clamp(24px,4vh,40px); }
  .col-side { width: 100%; justify-content: flex-start; gap: 22px; }
  .col-main { justify-content: flex-start; border-bottom: none; }
}
/* declutter the header status on small phones — keep just the LIVE dot + label */
@media (max-width: 640px){
  .status .sep, .status .meta { display: none; }
  .status { font-size: 13px; }
}

.row {
  display: flex; gap: 24px; padding: clamp(20px,3vh,32px) 0;
  border-top: 1px solid var(--line);
}
.row .sq { width: 10px; height: 10px; background: var(--teal); box-shadow: 0 0 12px var(--teal); flex: none; margin-top: 12px; }
.row p { font-size: clamp(22px,2.3vw,33px); line-height: 1.35; color: var(--ink-soft); max-width: 760px; }

.namecard .rule { width: 64px; height: 1px; background: var(--line-2); margin-bottom: 20px; }
.namecard .nm { font-size: clamp(22px,2.1vw,30px); font-weight: 600; }
.namecard .rl { font-family: var(--mono); font-size: clamp(15px,1.4vw,24px); color: rgba(123,210,210,.7); margin-top: 8px; }

/* big stat */
.bignum {
  font-family: var(--mono); font-weight: 500; letter-spacing: -.03em;
  color: var(--teal); text-shadow: 0 0 40px var(--glow);
  font-size: clamp(72px,11vw,150px); line-height: .9;
}
.bignum + .cap { font-size: clamp(20px,2vw,30px); line-height: 1.35; color: var(--ink-soft); margin-top: 24px; max-width: 26ch; }

/* ---------- Pipeline ---------- */
.pipe { display: flex; align-items: flex-start; margin-top: clamp(40px,6vh,78px); flex-wrap: wrap; gap: 18px 0; }
.pipe__node { flex: 1 1 180px; min-width: 160px; }
.pipe__node .bar { width: 40px; height: 3px; background: var(--teal); box-shadow: 0 0 10px var(--teal); margin-bottom: 22px; }
.pipe__node .idx { font-family: var(--mono); font-size: clamp(15px,1.3vw,24px); color: rgba(123,210,210,.55); margin-bottom: 14px; }
.pipe__node .nm { font-size: clamp(24px,2.6vw,36px); font-weight: 600; line-height: 1.1; }
.pipe__node .ds { font-size: clamp(16px,1.5vw,24px); line-height: 1.35; color: var(--ink-dim); margin-top: 14px; max-width: 280px; }
.pipe__arrow { flex: none; width: 64px; text-align: center; font-family: var(--mono); font-size: clamp(22px,2.4vw,34px); color: var(--teal); padding-top: 28px; }
@media (max-width: 760px){ .pipe__arrow { display:none; } .pipe__node{ flex-basis: 45%; } }

.notes {
  display: flex; gap: clamp(40px,6vw,80px); flex-wrap: wrap;
  margin-top: auto; padding-top: 44px; border-top: 1px solid var(--line);
}
.note { display: flex; gap: 18px; align-items: flex-start; }
.note .sq { width: 10px; height: 10px; background: var(--teal); box-shadow: 0 0 12px var(--teal); flex: none; margin-top: 11px; }
.note p { font-size: clamp(20px,2vw,30px); line-height: 1.35; color: var(--ink-soft); max-width: 560px; }

/* ---------- Risk grid ---------- */
.riskgrid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; flex: 1; align-content: center; }
.riskgrid .cell { border-top: 1px solid var(--line); padding: clamp(28px,4.5vh,44px) clamp(28px,4vw,70px) clamp(28px,4.5vh,44px) 0; }
.riskgrid .cell:nth-child(even) { border-left: 1px solid var(--line); padding-right: 0; padding-left: clamp(28px,4vw,70px); }
.riskgrid .cell .hd { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.riskgrid .cell .sq { width: 10px; height: 10px; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.riskgrid .cell .n { font-family: var(--mono); font-size: clamp(15px,1.3vw,24px); color: rgba(123,210,210,.55); }
.riskgrid .cell p { font-size: clamp(22px,2.3vw,33px); line-height: 1.3; font-weight: 500; max-width: 560px; }
@media (max-width: 760px){
  .riskgrid { grid-template-columns: 1fr; }
  .riskgrid .cell, .riskgrid .cell:nth-child(even){ border-left: none; padding: 26px 0; }
}

/* ---------- Process list ---------- */
.steps { border-bottom: 1px solid var(--line); }
.step { display: flex; align-items: baseline; gap: clamp(24px,4vw,48px); padding: clamp(20px,3vh,28px) 0; border-top: 1px solid var(--line); }
.step .n { font-family: var(--mono); font-size: clamp(22px,2.2vw,30px); font-weight: 500; color: var(--teal); flex: none; width: 56px; }
.step p { font-size: clamp(24px,2.6vw,36px); line-height: 1.3; font-weight: 500; }

.metrics { margin-top: clamp(30px,5vh,50px); padding-top: 44px; border-top: 1px solid var(--line); display: flex; gap: clamp(48px,8vw,96px); flex-wrap: wrap; }
.metric .v { font-family: var(--mono); font-size: clamp(40px,5vw,62px); font-weight: 500; line-height: 1; letter-spacing: -.02em; color: var(--teal); text-shadow: 0 0 28px rgba(91,197,204,.4); }
.metric .k { font-size: clamp(18px,1.7vw,26px); line-height: 1.35; color: var(--ink-dim); margin-top: 14px; }

/* ---------- Close / next steps ---------- */
.slide--close .slide__body { max-width: 1320px; }
.cta-list { display: flex; flex-direction: column; gap: clamp(22px,3vh,30px); margin-top: 12px; }
.cta-item { display: flex; gap: 22px; align-items: center; }
.cta-item .sq { width: 12px; height: 12px; background: var(--teal); box-shadow: 0 0 12px var(--teal); flex: none; }
.cta-item p { font-size: clamp(22px,2.3vw,33px); line-height: 1.3; color: var(--ink-soft); }

.team-block { margin-top: clamp(36px,5vh,56px); }
.team-block .hr { height: 1px; background: rgba(123,210,210,.2); margin-bottom: 26px; }
.team-foot { display: flex; justify-content: space-between; align-items: center; gap: 48px; flex-wrap: wrap; }
.team-grid { display: grid; grid-template-columns: auto auto; column-gap: clamp(40px,6vw,90px); row-gap: 28px; }
.member { display: flex; align-items: center; gap: 16px; }
.member img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line-2); flex: none;
  filter: grayscale(.2) contrast(1.05);
}
.member .nm { font-size: clamp(20px,2vw,30px); font-weight: 600; }
.member .rl { font-family: var(--mono); font-size: clamp(14px,1.3vw,24px); color: rgba(123,210,210,.7); margin-top: 6px; max-width: 30ch; }
.email-link {
  font-family: var(--mono); font-size: clamp(22px,2.2vw,30px); color: var(--teal);
  text-decoration: none; white-space: nowrap; text-shadow: 0 0 18px var(--glow);
  border-bottom: 1px solid transparent; transition: border-color .2s, color .2s;
}
.email-link:hover { color: var(--teal-2); border-color: var(--teal-2); }
@media (max-width:700px){ .team-grid{ grid-template-columns:1fr; } }

/* ---------- Footer row ---------- */
.slide__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: clamp(13px,1.1vw,16px);
  color: rgba(123,210,210,.62); letter-spacing: .06em;
}

/* ---------- Scroll cue (cover only, scroll mode) ---------- */
.scrollcue {
  position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: rgba(123,210,210,.55);
}
.scrollcue .mouse { width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 12px; position: relative; }
.scrollcue .mouse::after {
  content: ""; position: absolute; left: 50%; top: 7px; transform: translateX(-50%);
  width: 3px; height: 7px; border-radius: 2px; background: var(--teal);
  animation: imvScrollDot 1.6s ease-in-out infinite;
}

/* ============================================================
   GLOBAL CHROME — mode toggle + progress + nav dots
   ============================================================ */
.chrome { position: fixed; z-index: 50; }

/* progress bar (scroll mode) */
.progress {
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  transform-origin: 0 50%; transform: scaleX(0);
  box-shadow: 0 0 14px var(--glow);
  transition: transform .1s linear;
}

/* present toggle */
.mode-toggle {
  top: 18px; right: 18px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 14px; letter-spacing: .08em;
  color: var(--teal); background: rgba(9,51,63,.7); backdrop-filter: blur(8px);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 9px 16px; cursor: pointer; user-select: none;
  transition: background .2s, border-color .2s, color .2s;
}
.mode-toggle:hover { background: rgba(9,51,63,.95); border-color: var(--teal); }
.mode-toggle svg { width: 12px; height: 12px; }

/* nav dots (right rail) */
.navdots {
  right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
}
.navdots button {
  width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; padding: 0;
  transition: background .2s, transform .2s, box-shadow .2s; position: relative;
}
.navdots button:hover { transform: scale(1.25); }
.navdots button.active { background: var(--teal); box-shadow: 0 0 12px var(--teal); border-color: var(--teal); }
.navdots button::after {
  content: attr(data-label); position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-soft);
  white-space: nowrap; background: rgba(9,51,63,.92); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .18s;
}
.navdots button:hover::after { opacity: 1; }
@media (max-width: 760px){ .navdots { display: none; } }

/* arrow hint (present mode) */
.present-hint {
  bottom: 20px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 13px; letter-spacing: .12em;
  color: rgba(123,210,210,.55); display: none; align-items: center; gap: 10px;
}
.present-hint kbd {
  font-family: var(--mono); border: 1px solid var(--line-2); border-radius: 5px;
  padding: 2px 8px; color: var(--teal); background: rgba(9,51,63,.6);
}

/* ============================================================
   PRESENT MODE — fixed fullscreen one-slide deck
   ============================================================ */
body.present { overflow: hidden; }
body.present .deck { scroll-snap-type: none; }
body.present .slide {
  display: none;
  position: fixed; inset: 0; height: 100vh; height: 100svh; min-height: 0;
  border-bottom: none;
}
body.present .slide.show { display: flex; animation: imvShow .5s ease both; }
@keyframes imvShow { from { opacity: 0; transform: scale(.992); } to { opacity: 1; transform: none; } }
/* keep the body within its flex allocation so JS auto-fit can scale tall slides */
body.present .slide__body { min-height: 0; }
/* neutralise vertical flex-grow in present so content height is measurable/scaleable */
body.present .riskgrid { flex: none; align-content: start; }
body.present .cols { flex: none; }
body.present .col-main { border-bottom: none; }
body.present .scrollcue { display: none; }
body.present .progress { display: none; }
body.present .present-hint { display: flex; }
body.present .mode-toggle .lbl-enter { display: none; }
.mode-toggle .lbl-exit { display: none; }
body.present .mode-toggle .lbl-exit { display: inline; }

/* On small screens, present mode still works but hides the rail */
@media (max-width: 760px){ body.present .navdots { display: none; } }

/* ============================================================
   INTERACTIONS — living terminal layer
   ============================================================ */

/* ---- site-wide quiet on circuit-breaker halt ---- */
body.imv-quiet [data-blink] { animation: none !important; opacity: .18; transition: opacity .25s; }
.status .meta.hot { color: var(--teal); text-shadow: 0 0 12px var(--glow); }

/* ---- status-dot system tooltip ---- */
.status { position: relative; }
.status::after {
  content: attr(data-detail); position: absolute; top: calc(100% + 10px); right: 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--ink-soft);
  background: rgba(9,51,63,.96); border: 1px solid var(--line); padding: 6px 12px; border-radius: 7px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 6;
}
.status[data-detail]:hover::after { opacity: 1; }
@media (max-width: 760px){ .status::after { display: none; } }

/* ---- tactile row / cell / step hover ---- */
.row, .cell, .step { position: relative; }
.row::after, .cell::after, .step::after {
  content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--teal), transparent);
  transform: scaleX(0); transform-origin: 0 50%; box-shadow: 0 0 8px var(--glow);
  transition: transform .38s cubic-bezier(.2,.7,.2,1); pointer-events: none;
}
.row:hover::after, .cell:hover::after, .step:hover::after { transform: scaleX(1); }
.row:hover p, .cell:hover p, .step:hover p { color: var(--ink); }
.row:hover .sq, .cell:hover .sq { box-shadow: 0 0 18px var(--teal); }
.step:hover .n { color: var(--teal-2); text-shadow: 0 0 12px var(--glow); }
@media (prefers-reduced-motion: reduce){ .row::after,.cell::after,.step::after{ transition: none; display:none; } }

/* ---- playable pipeline ---- */
.pipe__node { cursor: pointer; outline: none; transition: transform .2s; }
.pipe__node:focus-visible { box-shadow: 0 0 0 1px var(--teal); border-radius: 6px; }
.pipe__node .bar { transition: width .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.pipe__node.lit .bar { width: clamp(60px, 9vw, 96px); box-shadow: 0 0 18px var(--teal); }
.pipe__node.lit .nm { color: #fff; }
.pipe__node .sub {
  font-family: var(--mono); font-size: clamp(13px,1.3vw,17px); color: var(--teal);
  letter-spacing: .02em; margin-top: 14px; opacity: 0; transform: translateY(4px);
  transition: opacity .3s, transform .3s; min-height: 1.1em;
}
.pipe__node.lit .sub { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .pipe__node .sub, .pipe__node.lit .sub { transition: none; } }

.notes { align-items: flex-start; }
.inject {
  flex: 0 0 auto; align-self: center; order: -1; margin-right: 8px;
  display: inline-flex; align-items: center; gap: 12px; white-space: nowrap;
  font-family: var(--mono); font-size: clamp(14px,1.4vw,18px); letter-spacing: .08em;
  color: var(--teal); background: rgba(91,197,204,.08); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 13px 24px; cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .1s;
}
.inject:hover { background: rgba(91,197,204,.16); border-color: var(--teal); box-shadow: 0 0 24px rgba(91,197,204,.28); }
.inject:active { transform: scale(.97); }
.inject:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(91,197,204,.25); }
.inject__pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.inject.fired .inject__pulse { animation: imvPing .6s ease-out; }
@keyframes imvPing { 0%{ transform: scale(1); opacity: 1; } 100%{ transform: scale(2.6); opacity: 0; } }

/* ---- risk desk + kill switch + log ---- */
.risk-desk {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  margin: clamp(16px,2.5vh,24px) 0 12px; padding: 14px 20px;
  border: 1px solid var(--line); background: rgba(91,197,204,.04); border-radius: 10px;
}
.rd-pos { display: flex; align-items: center; gap: clamp(12px,1.8vw,26px); flex-wrap: wrap;
  font-family: var(--mono); font-size: clamp(13px,1.3vw,18px); }
.rd-sym { color: var(--teal); letter-spacing: .06em; }
.rd-fld { color: var(--ink-dim); letter-spacing: .03em; }
.rd-fld b { color: var(--ink); font-weight: 500; margin-left: 6px; }
.rd-fld b.up { color: var(--teal); } .rd-fld b.down { color: #D6847C; }

.killswitch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; background: transparent; border: 0;
  padding: 4px; font-family: var(--mono); font-size: clamp(13px,1.3vw,17px); letter-spacing: .08em; color: var(--ink-soft); }
.ks-state { min-width: 64px; text-align: right; color: var(--teal); transition: color .25s; }
.killswitch[aria-checked="false"] .ks-state { color: #F5B45A; }
.ks-track { width: 56px; height: 28px; border-radius: 999px; background: rgba(91,197,204,.18);
  border: 1px solid var(--teal); position: relative; transition: background .25s, border-color .25s; flex: none; }
.ks-thumb { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 12px var(--teal); transition: transform .25s, background .25s, box-shadow .25s; }
.killswitch[aria-checked="false"] .ks-track { background: rgba(245,180,90,.2); border-color: #F5B45A; }
.killswitch[aria-checked="false"] .ks-thumb { transform: translateX(28px); background: #F5B45A; box-shadow: 0 0 14px #F5B45A; }
.ks-hint { color: var(--ink-dim); }
.killswitch:hover .ks-track { background: rgba(91,197,204,.3); }
.killswitch:focus-visible { outline: none; }
.killswitch:focus-visible .ks-track { box-shadow: 0 0 0 3px rgba(91,197,204,.3); }

.risk-log { display: flex; align-items: center; gap: 12px; font-family: var(--mono);
  font-size: clamp(13px,1.3vw,17px); color: var(--ink-dim); letter-spacing: .04em; margin-bottom: clamp(14px,2.5vh,22px); }
.rl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); flex: none; }
.risk-log.halted { color: #F5B45A; }
.risk-log.halted .rl-dot { background: #F5B45A; box-shadow: 0 0 12px #F5B45A; }

/* ---- risk arming gauges ---- */
.gauge { width: clamp(86px,9vw,118px); height: 40px; margin-left: auto; overflow: visible; flex: none; }
.gauge .g-track { stroke: rgba(123,210,210,.18); stroke-width: 2; fill: none; }
.gauge .g-draw { stroke: var(--teal); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 260; stroke-dashoffset: 260; filter: drop-shadow(0 0 4px rgba(91,197,204,.5)); }
.gauge.armed .g-draw { transition: stroke-dashoffset .7s cubic-bezier(.3,.7,.2,1); stroke-dashoffset: 0; }
.gauge .g-flat, .gauge .g-ceil, .gauge .g-halt { stroke-width: 2; opacity: 0; transition: opacity .3s .5s; }
.gauge .g-flat, .gauge .g-ceil { stroke: var(--teal); }
.gauge .g-halt { stroke: #F5B45A; }
.gauge.armed .g-flat, .gauge.armed .g-ceil, .gauge.armed .g-halt { opacity: 1; }
.gauge[data-g="cap"].armed .g-ceil { animation: imvFlash .45s ease .55s 1; }
@keyframes imvFlash { 50%{ stroke: #fff; filter: drop-shadow(0 0 6px #fff); } }
@media (prefers-reduced-motion: reduce){ .gauge .g-draw{ transition:none; stroke-dashoffset:0; } .gauge .g-flat,.gauge .g-ceil,.gauge .g-halt{ opacity:1; transition:none; } .gauge[data-g="cap"].armed .g-ceil{ animation:none; } }
@media (max-width: 760px){ .gauge { display: none; } }

/* ---- CI test grid ---- */
.cigrid { display: grid; grid-template-columns: repeat(var(--cols,28), 1fr); gap: 3px;
  margin: clamp(18px,3vh,26px) 0 14px; max-width: 380px; }
.cigrid i { aspect-ratio: 1 / 1; border-radius: 1px; background: rgba(123,210,210,.1);
  transition: background .25s ease, box-shadow .25s ease; }
.cigrid i.pass { background: var(--teal); box-shadow: 0 0 5px rgba(91,197,204,.5); }
.cigrid i.retry { background: #F5B45A; box-shadow: 0 0 6px rgba(245,180,90,.6); }
.ci-status { font-family: var(--mono); font-size: clamp(13px,1.3vw,17px); color: var(--teal);
  letter-spacing: .04em; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; cursor: default; }
.ci-status .ci-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.cigrid { cursor: pointer; }

/* ---- self-drawing equity curve ---- */
.equity { position: relative; margin-top: clamp(18px,3.5vh,36px); }
.equity__canvas { display: block; width: 100%; height: clamp(84px,15vh,140px); }
.equity__labels { display: flex; justify-content: space-between; font-family: var(--mono);
  font-size: clamp(12px,1.1vw,15px); letter-spacing: .08em; color: var(--ink-dim); margin-top: 8px; padding: 0 4px; }
.equity__labels .eq-lv { color: rgba(123,210,210,.58); transition: color .3s, text-shadow .3s; }
.equity__labels .eq-lv.on { color: var(--teal); text-shadow: 0 0 12px var(--glow); }
.equity + .metrics { margin-top: clamp(16px,2.5vh,28px); }

/* ---- present-mode HUD ---- */
.hud { top: 16px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: rgba(123,210,210,.7);
  background: rgba(9,51,63,.6); backdrop-filter: blur(8px); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; }
body.present .hud { display: flex; }
.hud__mkt { color: var(--teal); } .hud__mkt.closed { color: var(--ink-dim); }
.hud__sym { color: var(--ink-soft); } .hud__sep { color: rgba(123,210,210,.3); }
@media (max-width: 760px){ body.present .hud { display: none; } }

/* ---- help overlay ---- */
.help-toggle { right: 18px; bottom: 18px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(9,51,63,.7); backdrop-filter: blur(8px);
  color: var(--teal); font-family: var(--mono); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s, transform .15s; }
.help-toggle:hover { background: rgba(9,51,63,.95); border-color: var(--teal); }
body.present .help-toggle { display: none; }

.help-overlay { inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(4,22,28,.78); backdrop-filter: blur(6px); }
.help-overlay[hidden] { display: none; }
.help-card { width: min(440px, 90vw); background: #0b2a33; border: 1px solid var(--line-2);
  border-radius: 14px; padding: 24px; font-family: var(--mono); box-shadow: 0 30px 80px rgba(0,0,0,.5);
  animation: imvRise .3s ease both; }
.help-card__top { display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; letter-spacing: .12em; color: var(--teal); margin-bottom: 18px; }
.help-card__top button { background: transparent; border: 1px solid var(--line-2); color: var(--ink-dim);
  border-radius: 6px; padding: 4px 10px; font-family: var(--mono); font-size: 12px; cursor: pointer; }
.help-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.help-list li { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.help-list kbd { font-family: var(--mono); border: 1px solid var(--line-2); border-radius: 5px;
  padding: 2px 7px; color: var(--teal); background: rgba(91,197,204,.08); font-size: 12px; min-width: 22px; text-align: center; }
.help-list li span { margin-left: 8px; color: var(--ink-dim); }
.help-card__foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; line-height: 1.7; color: var(--ink-dim); }
.help-card__foot b { color: var(--teal); }

/* magnetic targets keep a smooth return */
.mode-toggle, .email-link, .help-toggle { transition: background .2s, border-color .2s, color .2s, transform .18s cubic-bezier(.2,.7,.2,1); }
