/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #E8ECF1;
  --ink: #0C1016;
  --ink-2: #485260;
  --ink-3: #6B7480;
  --rule: #D3D9E1;
  --grid: rgba(12, 16, 22, 0.07);

  --field: #1D5FE3;
  --money: #0B8752;
  --sales: #E5560B;
  --insight: #7636D6;
  --ring: #C28400;

  --halo: var(--surface);
  --shadow: 0 1px 2px rgba(12, 16, 22, 0.06), 0 8px 24px -8px rgba(12, 16, 22, 0.14);
  --shadow-lg: 0 2px 6px rgba(12, 16, 22, 0.08), 0 24px 60px -12px rgba(12, 16, 22, 0.28);

  --font: "Overpass", ui-sans-serif, system-ui, sans-serif;
  --mono: "Overpass Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0E13; --surface: #111821; --surface-2: #18212C;
    --ink: #E9EDF2; --ink-2: #A3ADBA; --ink-3: #8590A0;
    --rule: #243041; --grid: rgba(233, 237, 242, 0.06);
    --field: #5B92FF; --money: #2FC487; --sales: #FF7B35; --insight: #A77BFF; --ring: #E6AA2E;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 60px -12px rgba(0,0,0,.75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0E13; --surface: #111821; --surface-2: #18212C;
  --ink: #E9EDF2; --ink-2: #A3ADBA; --ink-3: #8590A0;
  --rule: #243041; --grid: rgba(233, 237, 242, 0.06);
  --field: #5B92FF; --money: #2FC487; --sales: #FF7B35; --insight: #A77BFF; --ring: #E6AA2E;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 60px -12px rgba(0,0,0,.75);
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font); font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
::selection { background: var(--sales); color: #fff; }
:focus-visible { outline: 3px solid var(--field); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--sales); }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; cursor: pointer; }
html { scrollbar-color: var(--ink-3) var(--bg); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--rule); border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ── Header ─────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.roundel { width: 28px; height: 28px; color: var(--ink); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2);
  padding: 10px 12px; border-radius: 8px; transition: color .2s var(--ease), background-color .2s var(--ease); }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.theme { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--surface); transition: border-color .2s; }
.theme:hover { border-color: var(--ink-3); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: none; }
  :root:not([data-theme="light"]) .theme .moon { display: inline; }
}

main > section { padding: clamp(72px, 10vw, 128px) var(--gutter) 0; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }

/* ── Hero ───────────────────────────────────────────────────────────── */
main > .hero { padding-top: clamp(32px, 5vw, 56px); }
.hero-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; }
.lede { font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--ink-2); max-width: 52ch; }
.lede strong { color: var(--ink); font-weight: 700; }
.where { margin-top: 14px; font-size: 15px; color: var(--ink-2); }
.where .dot-live { display: inline-block; margin-right: 8px; vertical-align: 1px; }
.where a { color: var(--ink); font-weight: 700; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--money); box-shadow: 0 0 0 3px color-mix(in srgb, var(--money) 22%, transparent); }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--money) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

.map-frame { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; }
.map-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.legend { display: flex; gap: 6px; flex-wrap: wrap; }
.map-actions { display: flex; gap: 6px; }
.chip-btn, .legend button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px 6px;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
  font-weight: 700; font-size: 14px; line-height: 1;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), opacity .2s, color .2s;
}
.legend button .sw { width: 22px; height: 6px; border-radius: 3px; background: var(--c); margin-top: -2px; }
.legend button.lg-ring .sw { width: 12px; height: 12px; border-radius: 50%; background: none; border: 3px solid var(--c); }
.legend button:hover, .chip-btn:hover { border-color: var(--ink-3); }
.legend button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.legend.isolating button[aria-pressed="false"] { opacity: .55; }
.chip-btn .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.chip-btn[aria-pressed="true"] .pulse { background: var(--money); box-shadow: 0 0 0 3px color-mix(in srgb, var(--money) 22%, transparent); }

.map-canvas { position: relative;
  background-image: radial-gradient(var(--grid) 1.2px, transparent 1.3px);
  background-size: 20px 20px; background-position: 10px 10px; }
#netmap { display: block; width: 100%; height: auto; overflow: visible; }

/* map primitives */
.track { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; transition: opacity .35s var(--ease); }
.track-casing { fill: none; stroke: var(--surface); stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; }
.stn { cursor: pointer; outline: none; }
.stn .mk { fill: var(--surface); stroke-width: 4; transition: r .25s var(--ease); }
.stn .core { transition: r .25s var(--ease); }
.stn .lbl { font: 600 13.5px/1 var(--font); fill: var(--ink); paint-order: stroke; stroke: var(--halo); stroke-width: 5px; stroke-linejoin: round; letter-spacing: -0.005em; }
.stn.feat .lbl { font-weight: 800; }
.stn .hit { fill: transparent; }
.stn:hover .mk, .stn:focus-visible .mk, .stn.on .mk { r: 10; }
.stn:focus-visible .ring-focus { stroke: var(--field); stroke-width: 3; fill: none; opacity: 1; }
.stn .ring-focus { opacity: 0; }
.hub .pill { fill: var(--ink); stroke: var(--surface); stroke-width: 3; transition: transform .25s var(--ease); }
.hub .hl { font: 800 13px/1 var(--font); fill: var(--bg); letter-spacing: 0.01em; }
.hub:hover .pill, .hub:focus-visible .pill, .hub.on .pill { fill: var(--sales); }
.hub:focus-visible .pill { stroke: var(--field); }
.packet { pointer-events: none; }
#netmap.dim .track, #netmap.dim .packet-g { opacity: .13; }
#netmap.dim .track.hot, #netmap.dim .packet-g.hot { opacity: 1; }
#netmap.dim .stn { opacity: .28; transition: opacity .3s var(--ease); }
#netmap.dim .stn.hot { opacity: 1; }
.cart-t { font: 800 22px/1 var(--font); fill: var(--ink); letter-spacing: -0.02em; }
.cart-s { font: 500 13px/1 var(--font); fill: var(--ink-2); }
.cart-m { font: 600 11.5px/1 var(--mono); fill: var(--ink-3); letter-spacing: 0.04em; }

.tip { position: absolute; z-index: 5; max-width: 300px; pointer-events: none;
  background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 12px 9px;
  font-size: 13.5px; line-height: 1.45; box-shadow: var(--shadow-lg);
  transform: translate(-50%, calc(-100% - 16px)); }
.tip b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.tip small { display: block; margin-top: 6px; font: 600 11.5px/1 var(--mono); opacity: .75; }

/* draw-in */
.drawing .track { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.6s var(--ease) forwards; animation-delay: var(--d); }
.drawing .stn, .drawing .cart { opacity: 0; animation: pop .6s var(--ease) forwards; animation-delay: var(--d); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Mobile strip map */
.strip { display: none; }
.strip-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 14px; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.strip-tabs::-webkit-scrollbar { display: none; }
.strip-tabs button { flex: none; min-height: 40px; padding: 8px 14px 6px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); font-weight: 700; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.strip-tabs button .sw { width: 16px; height: 6px; border-radius: 3px; background: var(--c); }
.strip-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.strip-list { list-style: none; margin: 0; padding: 8px 14px 16px; position: relative; }
.strip-list li { position: relative; }
.strip-list li::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 7px; background: var(--c); }
.strip-list li:first-child::before { top: 50%; }
.strip-list li:last-child::before { bottom: 50%; }
.strip-list button { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 10px 6px; border: 0; background: none; text-align: left; border-radius: 10px; }
.strip-list button:hover { background: var(--surface-2); }
.strip-list .m { flex: none; width: 31px; height: 20px; display: grid; place-items: center; }
.strip-list .m i { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 4px solid var(--c); }
.strip-list .feat .m i { background: var(--c); box-shadow: inset 0 0 0 3px var(--surface); }
.strip-list .hubrow .m i { width: 30px; height: 18px; border-radius: 9px; background: var(--ink); border: 3px solid var(--surface); }
.strip-list .t { display: flex; flex-direction: column; gap: 2px; }
.strip-list .t b { font-size: 16px; line-height: 1.25; }
.strip-list .t small { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }

/* ── Section heads ──────────────────────────────────────────────────── */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: end; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); font-weight: 900; }
.section-head p { color: var(--ink-2); max-width: 54ch; font-size: 1.05rem; }
.section-head em { font-style: normal; font-weight: 800; color: var(--ink); }

/* ── Tabs ───────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.tabs button { min-height: 44px; padding: 10px 16px 8px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s; }
.tabs button:hover { border-color: var(--ink-3); }
.tabs button .sw { width: 16px; height: 6px; border-radius: 3px; background: var(--c); }
.tabs button .n { font: 600 12px/1 var(--mono); color: var(--ink-3); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs button[aria-selected="true"] .n { color: inherit; opacity: .7; }

/* ── Case studies ───────────────────────────────────────────────────── */
.cases { display: flex; flex-direction: column; gap: clamp(56px, 7vw, 96px); }
.case { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.case:nth-child(even) .shot { order: 2; }
.case[hidden] { display: none; }
.case-text { padding-top: 4px; }
.case-line { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px/1 var(--mono); color: var(--ink-2); letter-spacing: .03em; margin-bottom: 14px; }
.case-line i { width: 22px; height: 6px; border-radius: 3px; background: var(--c); }
.case h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 900; margin-bottom: 12px; }
.case .blurb { font-size: 1.07rem; color: var(--ink-2); margin-bottom: 22px; }
.case h4 { margin: 20px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.case ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.case li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.case li::before { content: ""; position: absolute; left: 0; top: .48em; width: 10px; height: 10px; border-radius: 50%; border: 3px solid var(--c); background: var(--surface); }
.case .problem { color: var(--ink-2); font-size: 15.5px; }
.result { margin-top: 22px; padding: 16px 18px 14px; border-radius: 12px; background: color-mix(in srgb, var(--c) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--rule)); font-weight: 600; font-size: 16px; line-height: 1.5; color: var(--ink); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding: 0; list-style: none; }
.stack li { font: 600 12.5px/1 var(--mono); color: var(--ink-2); padding: 7px 9px 6px; border-radius: 6px; background: var(--surface-2); }
.stack li::before { display: none; }
.case ul.stack { flex-direction: row; gap: 6px; }
.case .stack li { padding: 7px 9px 6px; }
.onmap { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px 8px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); font-weight: 700; font-size: 14.5px; transition: border-color .2s; }
.onmap:hover { border-color: var(--ink-3); }
.onmap svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* screenshot frame */
.shot { position: sticky; top: 92px; margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.shot-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.shot-bar .dots { display: flex; gap: 6px; }
.shot-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.shot-bar .url { flex: 1; font: 600 12px/1 var(--mono); color: var(--ink-3); background: var(--surface-2); border-radius: 6px; padding: 7px 10px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shot img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: cover; object-position: top; background: var(--surface-2); }
.shot > figcaption { position: absolute; z-index: 2; right: 12px; bottom: 12px; font: 600 11.5px/1 var(--mono); color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 9px 6px; }
.slide-tabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.slide-tabs::-webkit-scrollbar { display: none; }
.slide-tabs button { flex: none; min-height: 30px; padding: 6px 12px 4px; border-radius: 6px; border: 0; background: var(--surface-2); color: var(--ink-2); font: 700 12.5px/1 var(--font); transition: background-color .2s var(--ease), color .2s var(--ease); }
.slide-tabs button:hover { color: var(--ink); }
.slide-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.slide-stage { position: relative; display: grid; background: var(--surface-2); }
.slide-stage img { grid-area: 1 / 1; opacity: 0; transition: opacity .6s var(--ease); }
.slide-stage img.on { opacity: 1; }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule); background: color-mix(in srgb, var(--surface) 88%, transparent); opacity: 0; transition: opacity .25s var(--ease); }
.slide-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.slide-nav.prev { left: 12px; } .slide-nav.next { right: 12px; }
.shot.slides:hover .slide-nav, .slide-nav:focus-visible { opacity: 1; }
@media (hover: none) { .slide-nav { opacity: 1; } }
.slide-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.slide-progress i { display: block; height: 100%; background: var(--c, var(--ink)); transform-origin: left; transform: scaleX(0); }
.sketch { position: relative; color: var(--c); background: color-mix(in srgb, var(--c) 5%, var(--surface)); }
.sketch svg { display: block; width: 100%; height: auto; }
.sketch > figcaption { border-style: dashed; }

/* ── Method ─────────────────────────────────────────────────────────── */
.calc { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: 32px; }
.calc-controls { display: flex; flex-direction: column; gap: 26px; }
.field { display: flex; flex-direction: column; gap: 12px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 15.5px; }
.field-label output { font: 600 18px/1 var(--mono); color: var(--ink); }
.calc-note { font-size: 14px; color: var(--ink-2); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--ink) var(--p, 50%), var(--surface-2) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--surface-2); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--surface); border: 5px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 5px solid var(--ink); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--field); outline-offset: 2px; }

.calc-out { display: flex; flex-direction: column; gap: 22px; }
.run-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.run-head span { font-weight: 700; font-size: 16px; }
.run-head b { font: 600 clamp(28px, 3.4vw, 40px)/1 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
#run-ai .run-head b { color: var(--sales); }
#run-wat .run-head b { color: var(--money); }
.pips { display: flex; align-items: center; gap: 0; margin-bottom: 10px; height: 22px; }
.pips i { flex: 1; height: 6px; background: var(--rule); position: relative; }
.pips i::after { content: ""; position: absolute; right: -9px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); border-radius: 50%; background: var(--surface); border: 4px solid var(--rule); z-index: 1; box-sizing: border-box; }
.pips i.ai { background: var(--sales); }
.pips i.ai::after { border-color: var(--sales); }
.pips i.tool { background: var(--money); }
.pips i.tool::after { border-color: var(--money); background: var(--money); box-shadow: inset 0 0 0 3px var(--surface); }
.pips i:last-child { margin-right: 9px; }
.bar { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; width: 100%; transform-origin: left center; transform: scaleX(.5); transition: transform .5s var(--ease); }
#b-ai { background: var(--sales); }
#b-wat { background: var(--money); }
.calc-verdict { font-size: 15.5px; color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 16px; }
.calc-verdict b { color: var(--ink); }

.wat { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; }
.wat::before { content: ""; position: absolute; left: 9px; right: 9px; top: 9px; height: 7px; background: var(--ink); border-radius: 4px; }
.wat li { position: relative; padding: 40px 24px 0 0; display: flex; flex-direction: column; gap: 6px; }
.wat li::before { content: ""; position: absolute; left: 0; top: 0; width: 25px; height: 25px; border-radius: 50%; background: var(--surface); border: 5px solid var(--ink); box-sizing: border-box; }
.wat b { font-size: 1.25rem; font-weight: 900; }
.wat span { color: var(--ink-2); font-size: 15.5px; max-width: 34ch; }

/* ── Side tracks ────────────────────────────────────────────────────── */
.side-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.side-item { padding: 22px 24px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.side-item + .side-item { padding-left: 24px; border-left: 1px solid var(--rule); }
.side-item .kind { font: 600 12px/1 var(--mono); color: var(--ink-3); letter-spacing: .04em; }
.side-item h3 { font-size: 1.4rem; font-weight: 800; }
.side-item p { color: var(--ink-2); font-size: 15.5px; }

/* ── Route ──────────────────────────────────────────────────────────── */
.route-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.route-line li { position: relative; padding: 46px 20px 0 0; }
.route-line li::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 8px; background: var(--c, var(--ink)); }
.route-line li:first-child::before { left: 12px; }
.route-line li.next::before { background: repeating-linear-gradient(90deg, var(--ink-3) 0 10px, transparent 10px 18px); right: auto; width: 60%; }
.route-line li::after { content: ""; position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 6px solid var(--c, var(--ink)); box-sizing: border-box; }
.route-line li.now::after { background: var(--c); box-shadow: inset 0 0 0 4px var(--surface); }
.route-line li.next::after { border-style: dashed; border-color: var(--ink-3); }
.route-line .when { font: 600 13px/1 var(--mono); color: var(--ink-3); }
.route-line h3 { font-size: 1.15rem; font-weight: 800; margin: 8px 0 4px; line-height: 1.2; }
.route-line .org { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.route-line p { font-size: 15px; color: var(--ink-2); }
.route-line .next a { font-weight: 800; color: var(--ink); }

/* ── Toolbox ────────────────────────────────────────────────────────── */
.tool-groups { margin: 0; display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); border-top: 2px solid var(--ink); }
.tool-groups dt, .tool-groups dd { padding: 16px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.tool-groups dt { font-weight: 800; font-size: 16px; padding-top: 20px; }
.tool-groups dd { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-groups dd span { font-size: 15px; font-weight: 600; padding: 8px 12px 6px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); }

/* ── Contact ────────────────────────────────────────────────────────── */
main > .contact { padding-bottom: clamp(72px, 10vw, 120px); }
.contact h2 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-weight: 900; letter-spacing: -0.04em; max-width: 14ch; }
.contact > p { margin-top: 18px; color: var(--ink-2); font-size: 1.1rem; max-width: 56ch; }
.contact-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 24px 12px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; font-weight: 800; font-size: 16px; text-decoration: none; transition: transform .2s var(--ease), background-color .2s, color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--sales); border-color: var(--sales); color: #0C1016; }
.copied { font: 600 13px/1 var(--mono); color: var(--money); }

/* ── Drawer ─────────────────────────────────────────────────────────── */
.drawer { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(460px, 100vw);
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(104%); transition: transform .45s var(--ease); display: block; }
.drawer[hidden] { display: none; }
.drawer.open { transform: none; }
.drawer-inner { height: 100%; overflow-y: auto; padding: 22px 24px 40px; outline: none; overscroll-behavior: contain; }
.d-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.d-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); }
.d-close:hover { border-color: var(--ink-3); }
.d-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.drawer h2 { font-size: 1.9rem; font-weight: 900; margin-bottom: 12px; }
.drawer .shot { position: relative; top: auto; margin: 4px 0 20px; box-shadow: var(--shadow); }
.drawer .blurb { color: var(--ink-2); font-size: 1.02rem; }
.drawer .case-line { margin: 0; }
.d-lines { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.d-lines span { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; padding: 6px 10px 4px; border-radius: 999px; border: 1px solid var(--rule); }
.d-lines i { width: 14px; height: 5px; border-radius: 3px; background: var(--c); }
.d-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); }
.d-nav button { min-height: 44px; padding: 10px 14px 8px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); font-weight: 700; font-size: 14px; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-nav button:hover { border-color: var(--ink-3); }
.d-nav button:disabled { opacity: .4; cursor: default; }
.d-more { display: inline-flex; margin-top: 18px; font-weight: 800; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--rule); padding: 24px var(--gutter) 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }

/* ── Reveal ─────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-head, .section-head { grid-template-columns: 1fr; align-items: start; gap: 16px; }
  .case, .case:nth-child(even) { grid-template-columns: 1fr; }
  .case:nth-child(even) .shot { order: 0; }
  .shot { position: relative; top: auto; }
  .calc { grid-template-columns: 1fr; padding: 22px; }
  .route-line { grid-template-columns: 1fr; }
  .route-line li { padding: 0 0 30px 52px; }
  .route-line li::before { left: 11px !important; right: auto; top: 0; bottom: 0; width: 8px; height: auto; }
  .route-line li:first-child::before { top: 14px; }
  .route-line li.next::before { width: 8px; height: 30px; background: repeating-linear-gradient(180deg, var(--ink-3) 0 8px, transparent 8px 14px); }
  .route-line li:nth-last-child(2)::before { bottom: 0; }
  .side-list { grid-template-columns: 1fr; }
  .side-item, .side-item + .side-item { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .theme { margin-left: auto; }
  .map-bar { display: none; }
  .map-canvas { display: none; }
  .strip { display: block; }
  .wat { grid-template-columns: 1fr; gap: 24px; }
  .wat::before { left: 9px; right: auto; top: 9px; bottom: 9px; width: 7px; height: auto; }
  .wat li { padding: 0 0 0 44px; }
  .tool-groups { grid-template-columns: 1fr; }
  .tool-groups dt { border-bottom: 0; padding-bottom: 0; }
  .drawer { width: 100vw; top: auto; height: 88vh; border-left: 0; border-top: 1px solid var(--rule); border-radius: 18px 18px 0 0; transform: translateY(104%); }
  .drawer.open { transform: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; }
  .shot-bar .dots { display: none; }
  .shot > figcaption { font-size: 10px; padding: 5px 7px 4px; right: 8px; bottom: 8px; }
  .slide-tabs button { min-height: 28px; padding: 5px 9px 3px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
