/* ARCADE: the portfolio as a claw machine, drawn like a late-NES action game:
   night-purple backdrop, black-outlined pixel art, neon red and cyan, gold for the prize. */
:root {
  --bg: #eef0ff;
  --panel: #ffffff;
  --panel-2: #fff3f8;
  --text: #1a1430;
  --ink: #1a1430;
  --muted: #6f6a92;
  --line: rgba(26, 20, 48, 0.12);
  --line-strong: rgba(26, 20, 48, 0.35);
  --signal: #ff4f8b;
  --cyan: #2fb3a0;
  --gold: #ffc21a;
  --pixel: "Press Start 2P", "IBM Plex Mono", monospace;
  --display: "Press Start 2P", "IBM Plex Mono", monospace;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(14px, 2.6vw, 36px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rail: 64px;
  --floor: 34px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 13px/1.6 var(--mono);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
::selection { background: var(--signal); color: #fff; }

/* pixel panel: hard 2px border with notched corners and a hard drop shadow */
.px-panel {
  background: var(--panel);
  border: 2px solid #1a1430;
  box-shadow: inset 0 0 0 2px #ffd6e6, 4px 4px 0 #1a1430;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}

/* ---------- the machine ---------- */
.machine { position: fixed; inset: 0; touch-action: none; cursor: crosshair; background: var(--bg); }
.bg, .rig { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.bg { z-index: 0; }
.rig { z-index: 3; }
.pit { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.prize {
  position: absolute; left: 0; top: 0;
  width: var(--s, 104px); height: var(--s, 104px);
  margin: 0; padding: 0; border: 0; background: none;
  pointer-events: auto; cursor: pointer; will-change: transform;
}
.prize img { width: 100%; height: 100%; image-rendering: pixelated; display: block; pointer-events: none;
  filter: drop-shadow(0 3px 0 rgba(26, 20, 48, 0.18)); transition: transform 0.18s steps(3); }
.prize:hover img, .prize:focus-visible img { transform: translateY(calc(var(--s) * -0.06)); filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 5px rgba(255, 79, 139, 0.75)); }
.prize.held img { transform: none; }
.prize.show img { transform: none; filter: drop-shadow(0 0 14px rgba(255, 194, 26, 0.95)); }
.prize.show { z-index: 30 !important; }
.prize.show.shake { animation: shake 0.08s steps(1) infinite; }
@keyframes shake {
  0% { translate: 0 0; } 25% { translate: -4px 2px; } 50% { translate: 4px -2px; } 75% { translate: -2px -4px; } 100% { translate: 2px 2px; }
}

/* golden reveal: lives inside the pit, one layer under the prize, so the rays pour out from behind it */
.fx { position: fixed; z-index: 25; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s var(--ease); }
.fx.on { opacity: 1; }
.rays, .glow { position: absolute; left: 0; top: 0; translate: -50% -50%; border-radius: 50%; }
.rays {
  width: 170vmax; height: 170vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 40, 1) 0deg 6deg, rgba(255, 236, 140, 0.55) 6deg 8deg, rgba(255, 214, 40, 0) 8deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 0, #000 6%, rgba(0, 0, 0, 0.75) 18%, transparent 52%);
          mask: radial-gradient(circle, #000 0, #000 6%, rgba(0, 0, 0, 0.75) 18%, transparent 52%);
  animation: spin 9s linear infinite;
  scale: 0.2; transition: scale 1.2s var(--ease);
}
.rays-2 {   /* a second, finer fan turning the other way so the light shimmers */
  background: repeating-conic-gradient(from 4deg, rgba(255, 248, 200, 0.9) 0deg 2deg, rgba(255, 248, 200, 0) 2deg 11deg);
  -webkit-mask: radial-gradient(circle, #000 0, rgba(0, 0, 0, 0.6) 14%, transparent 38%);
          mask: radial-gradient(circle, #000 0, rgba(0, 0, 0, 0.6) 14%, transparent 38%);
  animation: spin 14s linear infinite reverse;
}
.fx.on .rays { scale: 1; }
.glow { width: 420px; height: 420px; background: radial-gradient(circle, rgba(255, 252, 225, 1), rgba(255, 216, 60, 0.85) 30%, rgba(255, 170, 0, 0.35) 52%, rgba(255, 140, 0, 0) 72%); }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- readout, hint ---------- */

.readout {
  position: fixed; z-index: 10; right: var(--gutter); top: calc(var(--rail) + 22px);
  width: 236px; padding: 12px 14px; font-size: 11px; line-height: 1.55;
}
.readout p { margin: 0 0 8px; color: var(--muted); }
.rd-name { display: inline-block; margin-bottom: 6px; font: 400 13px/1.3 var(--pixel); letter-spacing: 0.02em; color: var(--text); text-shadow: 2px 2px 0 var(--signal); }
.readout b { font: 400 11px/1.4 var(--pixel); color: var(--text); display: block; margin-bottom: 6px; letter-spacing: 0.02em; }
.readout dl { margin: 0; border-top: 2px dotted var(--line-strong); padding-top: 8px; }
.readout dl div { display: grid; grid-template-columns: 56px 1fr; gap: 6px; }
.readout dt { font: 400 8px/2 var(--pixel); color: var(--cyan); }
.readout dd { margin: 0; overflow-wrap: anywhere; }
.readout a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.readout a:hover { color: var(--signal); border-color: var(--signal); }

.hint { position: fixed; z-index: 10; left: var(--gutter); right: var(--gutter); bottom: 10px; margin: 0;
  font: 400 9px/1 var(--pixel); letter-spacing: 0.04em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px; color: var(--text); pointer-events: none; white-space: nowrap; overflow: hidden; }
.led { flex: none; width: 8px; height: 8px; background: var(--signal); box-shadow: 0 0 8px var(--signal); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ---------- index drawer ---------- */
.drawer { position: fixed; z-index: 20; left: 0; top: 0; bottom: 0; display: flex; translate: calc(-1 * min(360px, 86vw)) 0; transition: translate 0.4s var(--ease); }
.drawer.open { translate: 0 0; }
@media (hover: hover) { .drawer:hover, .drawer:focus-within { translate: 0 0; } }
.ix {
  order: 0; width: min(360px, 86vw); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border-right: 2px solid var(--ink); box-shadow: inset -2px 0 0 #ffd6e6, 4px 0 0 rgba(26,20,48,0.25);
  padding: 80px 14px 40px;
}
.tab {
  order: 1; align-self: center; width: 34px; height: 156px; margin-left: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--signal); color: #fff; border: 2px solid var(--ink); border-left: 0; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}
.tab-txt { writing-mode: vertical-rl; rotate: 180deg; font: 400 9px var(--pixel); letter-spacing: 0.1em; text-transform: uppercase; }
.tab-arrow { font: 400 12px var(--pixel); animation: nudge 0.9s steps(2) infinite; }
.drawer.open .tab-arrow, .drawer:hover .tab-arrow { rotate: 180deg; animation: none; }
@keyframes nudge { 50% { translate: 4px 0; } }
.ix-head { margin: 0 4px 18px; font: 400 14px/1.3 var(--pixel); text-transform: uppercase; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ix-head span, .ix-g span { font: 400 10px var(--mono); color: var(--muted); }
.ix-g { margin: 20px 4px 6px; font: 400 8px var(--pixel); color: var(--cyan); text-transform: uppercase; display: flex; justify-content: space-between; border-bottom: 2px solid var(--line-strong); padding-bottom: 8px; }
.ix ul { list-style: none; margin: 0; padding: 0; }
.ix-row {
  width: 100%; display: grid; grid-template-columns: 52px 26px 1fr auto; gap: 10px; align-items: center;
  padding: 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer;
}
.ix-row img { width: 52px; height: 52px; image-rendering: pixelated; }
.ix-n { font: 400 8px var(--pixel); color: var(--muted); }
.ix-t { font-size: 12px; line-height: 1.3; }
.ix-y { font-size: 10px; color: var(--muted); }
.ix-row:hover { background: rgba(255, 79, 139, 0.12); }
.ix-row:hover .ix-t { color: var(--signal); }

/* ---------- project window ---------- */
.win {
  --bg: #0e0b1f; --panel: #151230; --panel-2: #1c1840; --text: #ece9ff; --ink: #ece9ff; --muted: #8f89b8;
  --line: rgba(190, 180, 255, 0.16); --line-strong: rgba(190, 180, 255, 0.4); --signal: #ff4f8b; --cyan: #5ff2d6;
  color: var(--text);
  position: fixed; z-index: 40; left: 50%; top: 50%;
  width: min(1100px, calc(100vw - 24px)); height: min(88vh, calc(100dvh - 24px));
  translate: -50% -50%;
  display: flex; flex-direction: column;
  background: var(--bg); border: 2px solid #000;
  box-shadow: inset 0 0 0 2px #3a3470, 6px 6px 0 #1a1430, 0 0 0 9999px rgba(40, 30, 80, 0.35);
  transform-origin: var(--ox, 50%) var(--oy, 50%);
  transition: transform 0.45s var(--ease), opacity 0.35s var(--ease);
}
.win[hidden] { display: none; }
.win.closed { transform: scale(0.04); opacity: 0; }
.win-bar { flex: none; display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 8px 0 16px; border-bottom: 2px solid #000; background: var(--panel-2); box-shadow: inset 0 -2px 0 #3a3470; }
.win-led { flex: none; width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.win-title { flex: 1; min-width: 0; font: 400 11px/1 var(--pixel); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-x { flex: none; width: 34px; height: 34px; border: 2px solid #000; background: var(--signal); color: #fff; font: 400 14px/1 var(--pixel); cursor: pointer; display: grid; place-items: center; box-shadow: 2px 2px 0 #000; }
.win-x:hover { background: var(--text); color: var(--bg); }
.win-x:active { translate: 2px 2px; box-shadow: none; }
.win-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 0 60px; scrollbar-color: var(--signal) var(--panel); }
.win-load { padding: 60px; font: 400 12px var(--pixel); text-transform: uppercase; color: var(--muted); }

.pj-hero { margin: 0; aspect-ratio: 16 / 8; overflow: hidden; background: #000; border-bottom: 2px solid #000; }
.pj-hero img { width: 100%; height: 100%; object-fit: contain; display: block; }   /* whole product, never cropped */
.pj-hero img[src$=".svg"] { object-fit: contain; background: #0a0c0f; }
.pj-head { padding: 26px var(--gutter) 0; }
.pj-n { margin: 0 0 14px; font: 400 8px/1.6 var(--pixel); text-transform: uppercase; color: var(--cyan); }
.pj-title { margin: 0; font: 400 clamp(20px, 3.6vw, 40px)/1.15 var(--pixel); text-transform: uppercase; text-shadow: 3px 3px 0 var(--signal); }
.pj-info { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 60px); padding: 28px var(--gutter) 0; }
.spec { margin: 0; border-top: 2px solid var(--line-strong); }
.spec div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.spec dt { font: 400 8px/2 var(--pixel); color: var(--muted); }
.spec dd { margin: 0; }
.pj-desc p { margin: 0 0 1em; font-size: 14px; line-height: 1.75; max-width: 66ch; color: rgba(236, 233, 255, 0.88); }
.pj-desc p:first-child { font-size: 16px; line-height: 1.6; color: var(--text); }
.cs-wrap { padding-top: 10px; }
.pj-gal { padding: 0 var(--gutter); margin-top: clamp(56px, 9vh, 100px); }
.gal { columns: 2 300px; column-gap: 14px; }
.gal a { display: block; margin: 0 0 14px; break-inside: avoid; border: 2px solid #000; box-shadow: 4px 4px 0 #000; background: #000; }
.gal img { width: 100%; height: auto; display: block; }

/* pixel-font sizing for the shared case-study sections (that font runs wide) */
.win .win-body .cs-title { font: 400 clamp(13px, 1.6vw, 18px)/1.4 var(--pixel); color: var(--text); }
.win .win-body .stat dd { font: 400 clamp(16px, 2vw, 24px)/1.2 var(--pixel); color: var(--gold); }
.win .win-body .chart-head h3 { font: 400 11px/1.6 var(--pixel); }
.win .win-body .gate-id { font: 400 13px/1 var(--pixel); }
.win .win-body .sp-key b { font: 400 15px/1 var(--pixel); }
.win .win-body .quote p { font: 400 15px/1.7 var(--mono); }
.win .win-body .plan-n { font: 400 16px/1 var(--pixel); }
.win .win-body .role-text p:first-child { font: 500 16px/1.6 var(--mono); }
.win .win-body .sw h3 span { font: 400 20px/1 var(--pixel); }
.win .win-body .chart { background: var(--panel); border-color: var(--line-strong); }
.win .win-body .chart-body { --g1: #ece9ff; --c1: #8f89b8; --c2: #5b5690; --c3: #3a3570; }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  :root { --rail: 52px; }
      .readout { top: calc(var(--rail) + 14px); width: auto; max-width: 64vw; padding: 8px 10px; font-size: 10px; }
  .readout > p:not(:first-child), .readout dl div:nth-child(n+3) { display: none; }
  .readout b { font-size: 9px; }
  .hint { font-size: 7px; }
  .pj-info { grid-template-columns: 1fr; }
  .tab { height: 120px; width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .rays { animation: none; }
  .prize.show.shake { animation: none; }
  .tab-arrow, .led { animation: none; }
}


/* ---- case-study sections (generated from the main site's style.css) ---- */
.win-body {
.stats { margin: clamp(56px, 9vh, 100px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); max-width: 1100px; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 12px; padding: 22px 20px 0 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat dd { margin: 0; font: 300 clamp(30px, 3.6vw, 56px)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat dt { font-size: 12px; line-height: 1.5; color: var(--muted); max-width: 24ch; }
/* ============ case studies (product launches) ============ */
.cs { padding: 0 var(--gutter); }
.cs-stats { margin-top: clamp(48px, 8vh, 90px); }
.cs-block { margin-top: clamp(72px, 12vh, 140px); }
.cs-title {
  margin: 0 0 clamp(24px, 3vw, 40px); padding-bottom: 18px; border-bottom: 1px solid var(--line);
  font: 400 clamp(22px, 2.6vw, 36px)/1.05 var(--display); letter-spacing: -0.01em; text-transform: uppercase;
}
.cs-intro { max-width: 64ch; margin: -8px 0 clamp(28px, 4vw, 48px); color: rgba(233,235,238,0.82); }
.cs-intro p { margin: 0 0 1em; }
.gal-title { margin-bottom: clamp(16px, 2.4vw, 36px); }

/* overview */
.brief { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 80px); }
.brief div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.brief dt { font-size: 12px; color: var(--muted); padding-top: 3px; }
.brief dt::before { content: "+ "; color: var(--signal); }
.brief dd { margin: 0; font-size: 14px; line-height: 1.7; }
.brief dd p { margin: 0 0 0.6em; }
.brief dd p:last-child { margin: 0; }

/* stage gates */
.gates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.gates::before, .gates::after { content: ""; position: absolute; left: 0; top: 7px; height: 1px; }
.gates::before { right: 0; background: var(--line-strong); }
.gates::after { width: calc(var(--done) / 6 * 100%); background: var(--signal); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease) 0.2s; }
.is-in .gates::after, .no-js .gates::after, .gates.is-in::after { transform: scaleX(1); }
.gate { position: relative; padding: 30px 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.gate::before { content: ""; position: absolute; left: 0; top: 2px; width: 11px; height: 11px; border: 1px solid var(--line-strong); background: var(--bg); transform: rotate(45deg); }
.gate.done::before { background: var(--signal); border-color: var(--signal); }
.gate.next::before { border-color: var(--text); }
.gate-id { font: 400 clamp(18px, 1.8vw, 26px)/1 var(--display); }
.gate.todo .gate-id, .gate.todo .gate-name { color: var(--muted); }
.gate-name { font-size: 13px; }
.gate-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* chart grid */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.chart { margin: 0; padding: clamp(18px, 2.2vw, 30px); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)); position: relative; min-width: 0; }
.chart::before, .chart::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--line-strong); }
.chart::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.chart::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.chart.wide { grid-column: 1 / -1; }
.chart-head { margin-bottom: 22px; }
.chart-n { display: block; font-size: 11px; color: var(--signal); margin-bottom: 10px; }
.chart-head h3 { margin: 0; font: 400 clamp(16px, 1.35vw, 20px)/1.25 var(--display); letter-spacing: -0.005em; text-wrap: balance; }
.chart-head p { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: rgba(233,235,238,0.75); max-width: 62ch; }
.chart-note { margin: 18px 0 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.chart-body { --c0: var(--text); --c1: #8f96a0; --c2: #555c65; --c3: #3a4048; }

/* animated fills: grow when the panel is revealed */
.hb-fill, .vb-bar, .sp-bar i, .st-bar i { transition: transform 1.2s var(--ease); transition-delay: calc(0.25s + var(--i, 0) * 70ms); }
.js .chart:not(.is-in) .hb-fill, .js .chart:not(.is-in) .sp-bar i, .js .chart:not(.is-in) .st-bar i { transform: scaleX(0); }
.js .chart:not(.is-in) .vb-bar { transform: scaleY(0); }
.hb-fill, .sp-bar i, .st-bar i { transform-origin: left; }
.vb-bar { transform-origin: bottom; }

/* horizontal bars */
.hb { display: grid; gap: 12px; }
.hb-row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 14px; align-items: center; font-size: 12px; }
.hb-label { color: rgba(233,235,238,0.85); }
.hb-track { height: 10px; background: rgba(255,255,255,0.05); position: relative; }
.hb-fill { position: absolute; inset: 0 auto 0 0; background: var(--c1); }
.hb-row.hi .hb-fill { background: var(--signal); }
.hb-row.hi .hb-label, .hb-row.hi .hb-val { color: var(--text); }
.hb-val { min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* vertical bars */
.vb { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(6px, 1.2vw, 16px); align-items: end; height: 230px; padding-top: 22px; border-bottom: 1px solid var(--line-strong); }
.vb-col { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.vb-bars { flex: 1; display: flex; align-items: flex-end; gap: 3px; }
.vb-bar { flex: 1; height: var(--h); background: var(--c1); position: relative; min-height: 1px; }
.vb-bar.s0 { background: var(--c1); } .vb-bar.s1 { background: var(--c2); } .vb-bar.s2 { background: var(--c3); }
.vb-bar.hi, .vb-col.hi .vb-bar { background: var(--signal); }
.vb-bar.empty { background: none; }
.vb-bar b { position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); font-weight: 400; font-size: 11px; white-space: nowrap; color: rgba(233,235,238,0.85); font-variant-numeric: tabular-nums; }
.vb-label { order: 2; margin-top: 10px; margin-bottom: -34px; height: 28px; font-size: 11px; line-height: 1.25; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.chart.t-bar .chart-body { padding-bottom: 34px; }

/* legend */
.legend { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 11px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 3px; background: var(--c1); }
.legend .s0 i { background: var(--c0); } .legend .s1 i { background: var(--c1); } .legend .s2 i { background: var(--c2); }
.chart.t-bar .legend .s0 i { background: var(--c1); } .chart.t-bar .legend .s1 i { background: var(--c2); }
.legend .hi i { background: var(--signal) !important; }
.legend .dashed i { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; color: var(--text); }
.legend.seg .s0 i { background: var(--g0); } .legend.seg .s1 i { background: var(--g1); } .legend.seg .s2 i { background: var(--g2); }
.legend.seg .s3 i { background: var(--g3); } .legend.seg .s4 i { background: var(--g4); }

/* line chart */
.lc-plot { position: relative; height: 220px; margin: 18px 12px 0; }
.lc-grid i { position: absolute; left: -12px; right: -12px; height: 1px; background: var(--line); }
.lc svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ln { fill: none; stroke: var(--c1); stroke-width: 1.5; }
.ln.s0 { stroke: var(--c0); } .ln.s1 { stroke: var(--c1); } .ln.s2 { stroke: var(--c2); }
.ln.hi { stroke: var(--signal); stroke-width: 2; }
.ln.dashed { stroke-dasharray: 5 4; }
.lc svg { clip-path: inset(0 0 0 0); transition: clip-path 1.8s var(--ease) 0.2s; }
.js .chart:not(.is-in) .lc svg { clip-path: inset(0 100% 0 0); }
.dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--c1); transition: opacity 0.6s var(--ease); transition-delay: calc(0.6s + var(--i) * 80ms); }
.dot.s0 { border-color: var(--c0); } .dot.hi { border-color: var(--signal); }
.dot b { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-weight: 400; font-size: 10.5px; color: rgba(233,235,238,0.8); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dot.s1 b { top: 10px; bottom: auto; color: var(--muted); }
.js .chart:not(.is-in) .dot { opacity: 0; }
.lc-x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 14px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.lc-x span:first-child { text-align: left; } .lc-x span:last-child { text-align: right; }

/* 100% splits and stacked rows */
.chart-body { --g0: var(--signal); --g1: #e9ebee; --g2: #a9afb7; --g3: #6d747d; --g4: #464c54; --g5: #2c3137; }
.sp-bar, .st-bar { display: flex; gap: 2px; height: 34px; }
.sp-bar i, .st-bar i { display: block; min-width: 2px; }
.g0 { --g: var(--g0); } .g1 { --g: var(--g1); } .g2 { --g: var(--g2); } .g3 { --g: var(--g3); } .g4 { --g: var(--g4); } .g5 { --g: var(--g5); }
.sp-bar i, .st-bar i { background: var(--g); }
.sp-key { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px 20px; }
.sp-key li { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.sp-key b { font: 300 clamp(24px, 2.4vw, 34px)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sp-key span { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.sp-key span i { flex: none; width: 8px; height: 8px; background: var(--g); transform: translateY(-1px); }
.st { display: grid; gap: 16px; }
.st-row { display: grid; gap: 8px; }
.st-label { font-size: 13px; color: rgba(233,235,238,0.88); }
.st-bar { height: 26px; }
.st-bar i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; color: #000; font-variant-numeric: tabular-nums; overflow: hidden; }
.st-bar i.g3, .st-bar i.g4, .st-bar i.g5 { color: var(--text); }

/* table */
.tb-wrap { overflow-x: auto; margin: 0 calc(-1 * clamp(18px, 2.2vw, 30px)); padding: 0 clamp(18px, 2.2vw, 30px); }
.tb { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 520px; }
.tb th, .tb td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tb thead th { color: var(--muted); font-weight: 400; border-bottom-color: var(--line-strong); }
.tb tbody th { font-weight: 400; color: var(--text); }
.tb td { color: rgba(233,235,238,0.8); }
.tb .hi, .tb tr.hi th, .tb tr.hi td { color: var(--signal); }

/* word cloud */
.wd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; line-height: 1.1; }
.wd span { font: 300 calc(13px + var(--w) * 30px)/1.1 var(--display); letter-spacing: -0.01em; color: color-mix(in srgb, var(--text) calc(35% + var(--w) * 65%), transparent); text-transform: lowercase; }
.wd span.hi { color: var(--signal); }

/* quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 3vw, 44px); }
.quote { margin: 0; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.quote p { margin: 0; font: 300 clamp(18px, 1.7vw, 24px)/1.4 var(--display); letter-spacing: -0.01em; }
.quote p::before { content: "\201C"; color: var(--signal); }
.quote p::after { content: "\201D"; color: var(--signal); }
.quote footer { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* SWOT */
.swot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sw { padding: clamp(18px, 2.2vw, 30px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sw h3 { margin: 0 0 14px; display: flex; align-items: baseline; gap: 12px; font: 400 12px/1 var(--mono); color: var(--muted); }
.sw h3 span { font: 300 34px/1 var(--display); color: var(--text); }
.sw-strengths h3 span, .sw-opportunities h3 span { color: var(--signal); }
.sw ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.sw li { font-size: 13px; line-height: 1.6; padding-left: 16px; position: relative; }
.sw li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 6px; height: 1px; background: var(--muted); }

/* my role + stakeholders */
.role { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.role-text p { margin: 0 0 1em; font-size: 15px; line-height: 1.75; color: rgba(233,235,238,0.88); max-width: 62ch; }
.role-text p:first-child { font: 300 clamp(18px, 1.6vw, 22px)/1.5 var(--display); letter-spacing: -0.01em; color: var(--text); }
.sh-head { margin: 0 0 6px; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sh-list { margin: 0; }
.sh-list div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sh-list dt { font-size: 12px; color: var(--signal); padding-top: 2px; }
.sh-list dd { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(233,235,238,0.86); }

/* recovery plan */
.plan { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); border-top: 1px solid var(--line-strong); }
.plan li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 22px clamp(14px, 2vw, 26px) 26px 0; border-bottom: 1px solid var(--line); }
.plan-n { font: 300 30px/1 var(--display); color: var(--signal); }
.plan h3 { margin: 4px 0 10px; font: 500 14px/1.4 var(--mono); color: var(--text); }
.plan p { margin: 0 0 0.6em; font-size: 13px; line-height: 1.65; color: rgba(233,235,238,0.84); }

/* challenges and resolutions */
.cr { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.cr li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 48px); padding: 22px 0; border-bottom: 1px solid var(--line); }
.cr-n { font: 400 12px/1.6 var(--mono); color: var(--muted); }
.cr-k { display: block; margin-bottom: 8px; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cr-r .cr-k { color: var(--signal); }
.cr p { margin: 0 0 0.6em; font-size: 13.5px; line-height: 1.7; }
.cr-c p { color: rgba(233,235,238,0.72); }

@media (max-width: 900px) {
  .brief { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .swot { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; }
  .cr li { grid-template-columns: 40px minmax(0, 1fr); }
  .cr-r { grid-column: 2; }
  .gates { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .gates::before, .gates::after { display: none; }
  .gate { border-top: 1px solid var(--line); padding-top: 26px; }
  .gate::before { top: -6px; }
}
@media (max-width: 560px) {
  .brief div { grid-template-columns: 1fr; gap: 6px; }
  .sh-list div { grid-template-columns: 1fr; gap: 4px; }
  .cr li { grid-template-columns: 1fr; gap: 12px; }
  .cr-r { grid-column: auto; }
  .hb-row { grid-template-columns: 1fr auto; }
  .hb-label { grid-column: 1 / -1; }
  .gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vb { height: 190px; }
  .vb-bar b { font-size: 9.5px; }
}

}
