/* NextIndication
   Design tokens, layout and components. */

:root {
  --black: #000;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --paper: #f5f5f7;
  --white: #fff;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;
  --on-dark-3: #86868b;
  --card-dark: #161617;
  --card-dark-2: #1d1d1f;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(0, 0, 0, 0.08);

  --mint: #6ff2d4;
  --sky: #3fb4ff;
  --blue: #6c8cff;
  --amber: #ffb340;
  --grad: linear-gradient(92deg, #6ff2d4 0%, #3fb4ff 52%, #6c8cff 100%);
  --grad-ink: linear-gradient(92deg, #07917a 0%, #0a74d6 55%, #3f55d8 100%);
  --accent-ink: #0a74d6;
  --link-dark: #2997ff;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r-card: 28px;
  --nav-h: 52px;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--on-dark);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
img, canvas { max-width: 100%; }

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

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 10px;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- 3D canvas and labels ---------- */

#scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; pointer-events: none;
}
.no-webgl #scene { display: none; }
.no-webgl body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(63, 180, 255, 0.35), transparent 70%),
    radial-gradient(40% 40% at 30% 90%, rgba(111, 242, 212, 0.22), transparent 70%);
}

.scene-labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.scene-label {
  position: absolute; left: 0; top: 0; opacity: 0;
  font-size: 13px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap;
  color: var(--on-dark-2);
  display: flex; align-items: center; gap: 8px;
  will-change: transform, opacity;
}
.scene-label::before { content: ""; width: 18px; height: 1px; background: rgba(255, 255, 255, 0.35); }
.scene-label.below { flex-direction: column; gap: 6px; }
.scene-label.below::before { width: 1px; height: 12px; }
.scene-label b { color: var(--on-dark); font-weight: 600; }

main, .footer { position: relative; z-index: 2; }

/* ---------- Type ---------- */

.eyebrow {
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: -0.012em;
  margin-bottom: 14px;
}
.eyebrow .num { opacity: 0.7; margin-right: 12px; font-variant-numeric: tabular-nums; }
.eyebrow.accent { color: var(--accent-ink); }

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.grad-ink {
  background: var(--grad-ink);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.hero-title {
  font-size: clamp(46px, 9.4vw, 124px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-wrap: balance;
}
.display {
  font-size: clamp(36px, 5.8vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}
.display-2 {
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 700;
  text-wrap: balance;
}
.lead {
  font-size: clamp(18px, 1.65vw, 23px);
  line-height: 1.42;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: var(--on-dark-3);
  text-wrap: pretty;
}
.lead strong { color: var(--on-dark); font-weight: 600; }
.light .lead { color: var(--ink-2); }
.light .lead strong { color: var(--ink); }

.fineprint { font-size: 13px; line-height: 1.4; color: var(--on-dark-3); margin-top: 22px; }
.light .fineprint { color: var(--ink-2); }
.center { text-align: center; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 980px;
  font-size: 17px; font-weight: 500; letter-spacing: -0.012em; white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--white); color: var(--black); }
.btn-primary:hover { background: #e8e8ed; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08); }
.btn-small { min-height: 34px; padding: 0 16px; font-size: 14px; background: var(--white); color: var(--black); }
.btn-small:hover { background: #e8e8ed; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  font-size: 17px; font-weight: 500; color: var(--link-dark); cursor: pointer;
}
.link-arrow svg { width: 7px; height: 12px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Nav ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s, border-color 0.4s, color 0.4s;
  color: var(--on-dark);
}
.nav.scrolled { border-bottom-color: var(--line-dark); }
.nav[data-theme="light"] { background: rgba(251, 251, 253, 0.78); color: var(--ink); }
.nav[data-theme="light"].scrolled { border-bottom-color: var(--line-light); }

.nav-inner {
  width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto;
  height: var(--nav-h); display: flex; align-items: center; gap: 28px;
}
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.logo-mark { width: 22px; height: 22px; }
.logo-word { font-size: 18px; font-weight: 500; letter-spacing: -0.025em; }
.logo-word b { font-weight: 700; }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  font-size: 13px; font-weight: 400; letter-spacing: -0.005em; opacity: 0.82;
  padding: 14px 0; cursor: pointer; transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

.nav[data-theme="light"] .btn-small { background: var(--ink); color: var(--white); }
.nav[data-theme="light"] .btn-small:hover { background: #000; }

.nav-toggle { display: none; width: 44px; height: 44px; position: relative; margin-right: -10px; }
.nav-toggle span {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

.mobile-menu { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; justify-content: center; text-align: center;
  padding: calc(var(--nav-h) + clamp(44px, 9.5vh, 120px)) var(--gutter) 120px;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 100% at 50% 100%, rgba(63, 180, 255, 0.2), rgba(63, 180, 255, 0.05) 55%, transparent 75%);
}
.hero-inner { position: relative; width: min(1040px, 100%); will-change: transform, opacity; }
.hero-sub {
  font-size: clamp(18px, 1.9vw, 25px); line-height: 1.38; font-weight: 500; letter-spacing: -0.016em;
  color: var(--on-dark-2); max-width: 720px; margin: 26px auto 0; text-wrap: pretty;
}
.hero-sub strong { color: var(--on-dark); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; margin-top: 34px; }

.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hero-title .w > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; animation-delay: calc(120ms + var(--i) * 85ms); }
.js .hero-fade { opacity: 0; transform: translateY(18px); animation: fadeUp 1s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { transform: none; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; width: 26px; height: 42px; margin-left: -13px;
  border: 1.5px solid rgba(255, 255, 255, 0.35); border-radius: 14px;
}
.hero-scroll span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px;
  background: var(--white); animation: wheel 1.9s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Scroll story ---------- */

.story { position: relative; }
.js .story { height: 500vh; }
.js .story-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.story-shade { display: none; }
.story-wrap { position: relative; height: 100%; }

.story-panel { padding: 60px 0; max-width: 520px; }
.js .story-panel {
  position: absolute; left: 0; top: 50%; width: min(480px, 44%); padding: 0;
  opacity: var(--o, 0);
  transform: translate3d(0, calc(-50% + var(--y, 0px)), 0);
  will-change: opacity, transform;
}
.story-panel .lead { margin-top: 22px; }

.story-dots { display: none; }
.js .story-dots {
  display: flex; flex-direction: column; gap: 12px;
  position: absolute; right: clamp(16px, 3vw, 40px); top: 50%; transform: translateY(-50%);
}
.story-dots li { width: 6px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.28); transition: height 0.5s var(--ease), background-color 0.5s; }
.story-dots li.on { height: 26px; background: var(--white); }

/* ---------- Sections ---------- */

.section { padding: clamp(96px, 13vw, 168px) 0; position: relative; }
.section.light { background: var(--white); color: var(--ink); }
.section.light.alt { background: var(--paper); }
.section.dark { background: var(--black); color: var(--on-dark); }

.section-head { max-width: 860px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head.center { margin-inline: auto; }
.section-head .lead { margin-top: 24px; max-width: 720px; }
.section-head.center .lead { margin-inline: auto; }
.section-head.row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

/* reveal */
.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 30px, 0);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Bento ---------- */

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.bento-item { min-width: 0; display: flex; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }

.card {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: 28px;
  min-height: 300px; padding: clamp(28px, 3vw, 44px);
  background: var(--white); color: var(--ink);
  border-radius: var(--r-card); overflow: hidden;
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  transform-style: preserve-3d;
}
.card.tilting { transition: transform 0.08s linear, box-shadow 0.6s var(--ease); }
.card:hover { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.28); }
.card-dark { background: var(--black); color: var(--on-dark); }
.card-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(63, 180, 255, 0.22), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, rgba(111, 242, 212, 0.14), transparent 70%);
}
.card-glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.5), transparent 60%);
  mix-blend-mode: soft-light;
}
.card-dark .card-glare { background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.16), transparent 60%); mix-blend-mode: normal; }
.card.tilting .card-glare { opacity: 1; }

.card-copy { position: relative; }
.card-kicker { font-size: 15px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.card-kicker.accent { color: var(--accent-ink); }
.card h3 { font-size: clamp(24px, 2.5vw, 34px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
.card-copy p:not(.card-kicker) { margin-top: 12px; font-size: 17px; line-height: 1.45; color: var(--ink-2); max-width: 520px; }
.card-dark .card-copy p:not(.card-kicker) { color: var(--on-dark-2); }
.card-icon { width: 36px; height: 36px; color: var(--accent-ink); margin-bottom: 22px; }

.chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chips li {
  font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 980px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--on-dark);
}

/* mini funnel */
.viz { position: relative; }
.viz-funnel { display: grid; gap: 7px; }
.vf-row { height: 30px; display: grid; grid-template-columns: 132px 1fr; align-items: center; }
.vf-row i {
  grid-column: 2; grid-row: 1; justify-self: center; display: block; height: 100%; width: var(--w); transform: scaleX(0);
  border-radius: 8px; background: var(--grad); opacity: 0.9;
  transition: transform 1.3s var(--ease); transition-delay: calc(var(--n, 0) * 110ms + 250ms);
}
.vf-row:nth-child(1) { --n: 0; } .vf-row:nth-child(2) { --n: 1; } .vf-row:nth-child(3) { --n: 2; } .vf-row:nth-child(4) { --n: 3; } .vf-row:nth-child(5) { --n: 4; }
.vf-row:nth-child(2) i { opacity: 0.74; } .vf-row:nth-child(3) i { opacity: 0.6; } .vf-row:nth-child(4) i { opacity: 0.48; } .vf-row:nth-child(5) i { opacity: 1; }
.vf-row span {
  grid-column: 1; grid-row: 1; font-size: 13px; font-weight: 500; color: var(--on-dark-2);
  opacity: 0; transition: opacity 0.8s; transition-delay: calc(var(--n, 0) * 110ms + 500ms);
}
.in .vf-row i { transform: none; }
.in .vf-row span { opacity: 1; }

/* mini ranking */
.viz-rank { display: grid; gap: 12px; margin-top: auto; }
.vr-row { position: relative; display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.vr-row i {
  display: block; height: 12px; width: var(--w); border-radius: 12px; background: #d2d2d7;
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); transition-delay: calc(var(--n, 0) * 100ms + 250ms);
}
.vr-row:nth-child(1) { --n: 0; } .vr-row:nth-child(2) { --n: 1; } .vr-row:nth-child(3) { --n: 2; } .vr-row:nth-child(4) { --n: 3; }
.vr-row.is-next { color: var(--ink); }
.vr-row.is-next i { background: var(--grad-ink); }
.vr-row em {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 980px; background: var(--ink); color: var(--white);
  opacity: 0; transition: opacity 0.6s 1.1s;
}
.in .vr-row i { transform: none; }
.in .vr-row em { opacity: 1; }

/* mini path */
.viz-path svg { width: 100%; height: auto; overflow: visible; }
.viz-path circle { fill: var(--on-dark); }
.viz-path .vp-flag { fill: var(--amber); }
.viz-path .vp-ring { fill: none; stroke: var(--amber); stroke-width: 2; transform-origin: 340px 45px; animation: ping 2s var(--ease) infinite; }
.viz-path .vp-flow { stroke-dasharray: 60 640; stroke-dashoffset: 700; animation: flow 4.5s linear infinite; }
.paused, .paused * { animation-play-state: paused !important; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2.8); opacity: 0; } }
@keyframes flow { to { stroke-dashoffset: 0; } }

/* ---------- Live model ---------- */

.model-card {
  display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 0;
  background: var(--card-dark); border-radius: var(--r-card); overflow: hidden;
  border: 1px solid var(--line-dark);
}
.model-controls { padding: clamp(24px, 3vw, 40px); border-right: 1px solid var(--line-dark); display: flex; flex-direction: column; gap: 30px; }
.model-controls legend { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--on-dark-3); margin-bottom: 18px; }
.slider { display: block; margin-bottom: 20px; cursor: pointer; }
.slider:last-child { margin-bottom: 0; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--on-dark-2); margin-bottom: 4px; }
.slider-top output { font-size: 17px; font-weight: 600; color: var(--on-dark); font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; display: block;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--sky) 0, var(--sky) var(--fill, 50%), rgba(255, 255, 255, 0.16) var(--fill, 50%));
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--sky); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%;
  background: var(--white); border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--ease);
}
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--white); border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(63, 180, 255, 0.5); }

.segmented {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 3px; margin-top: auto;
}
.segmented button {
  position: relative; z-index: 1; min-height: 44px; font-size: 14px; font-weight: 500; color: var(--on-dark-2);
  border-radius: 9px; transition: color 0.3s;
}
.segmented button[aria-checked="true"] { color: var(--black); }
.segmented-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 9px;
  background: var(--white); transform: translateX(calc(var(--i, 1) * 100%)); transition: transform 0.45s var(--ease);
}

.model-output { padding: clamp(24px, 3vw, 40px); min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-label { font-size: 13px; line-height: 1.25; color: var(--on-dark-3); min-height: 2.5em; }
.kpi-value { font-size: clamp(24px, 2.7vw, 38px); line-height: 1; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }

.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); font-size: 12px; fill: var(--on-dark-3); font-variant-numeric: tabular-nums; }
.chart .c-grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.chart .c-line { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.4s, stroke-width 0.4s; }
.chart .c-line.on { stroke: url(#fcStroke); stroke-width: 3.5; }
.chart .c-area { fill: url(#fcFill); }
.chart .c-tag { font-size: 12px; font-weight: 600; fill: var(--on-dark-3); transition: fill 0.4s; }
.chart .c-tag.on { fill: var(--on-dark); }
.chart .c-peak { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .c-dot { fill: var(--white); }

.mfunnel { display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line-dark); }
.mf-row { display: grid; grid-template-columns: 150px 1fr 72px; align-items: center; gap: 14px; font-size: 14px; color: var(--on-dark-2); }
.mf-track { height: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.mf-track i { display: block; height: 100%; width: 0; min-width: 6px; border-radius: 10px; background: var(--grad); transition: width 0.7s var(--ease); }
.mf-val { text-align: right; font-weight: 600; color: var(--on-dark); font-variant-numeric: tabular-nums; }

/* ---------- Journey ---------- */

.journey-card {
  background: var(--black); color: var(--on-dark); border-radius: var(--r-card); overflow: hidden;
  padding: clamp(20px, 3vw, 40px);
}
.journey-stage { position: relative; width: 100%; height: clamp(230px, 26vw, 310px); }
#journey-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.journey-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; font-size: 13px; color: var(--on-dark-2); margin-top: 6px; }
.journey-legend span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-flow { background: #e8e8ed; } .dot-flag { background: var(--amber); } .dot-done { background: var(--mint); }
.journey-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.jk { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.jk-num { font-size: clamp(30px, 4vw, 52px); line-height: 1; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.jk-num.warn { color: var(--amber); } .jk-num.good { color: var(--mint); }
.jk-label { font-size: 13px; color: var(--on-dark-3); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); margin-top: clamp(56px, 7vw, 96px); }
.features h3 { font-size: 24px; letter-spacing: -0.025em; font-weight: 700; }
.features p { margin-top: 10px; font-size: 17px; line-height: 1.47; color: var(--ink-2); }

/* ---------- CTA ---------- */

.cta {
  min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: 120px var(--gutter);
}
.cta-inner { width: min(920px, 100%); }
.cta-title { font-size: clamp(42px, 7.6vw, 104px); }

/* ---------- Footer ---------- */

.footer { background: var(--black); border-top: 1px solid var(--line-dark); padding: 44px 0 36px; color: var(--on-dark-3); font-size: 13px; line-height: 1.5; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; color: var(--on-dark); }
.footer-tag { color: var(--on-dark-2); font-size: 14px; }
.footer-notes { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line-dark); display: grid; gap: 8px; max-width: 820px; }
.footer-bottom { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .nav-links { gap: 20px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .model-card { grid-template-columns: 1fr; }
  .model-controls { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .model-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; }
  .segmented { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .nav-links, .nav .btn-small { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .mobile-menu:not([hidden]) {
    display: grid; padding: 8px var(--gutter) 28px;
    border-top: 1px solid var(--line-dark);
  }
  .nav[data-theme="light"] .mobile-menu { border-top-color: var(--line-light); }
  .mobile-menu a { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; padding: 12px 0; min-height: 44px; }
  .nav.open { background: rgba(0, 0, 0, 0.92); }
  .nav.open[data-theme="light"] { background: rgba(251, 251, 253, 0.96); }

  .scene-labels { display: none; }

  .js .story-panel { top: auto; bottom: 9vh; width: 100%; max-width: 560px; transform: translate3d(0, var(--y, 0px), 0); }
  .js .story-shade { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82) 45%, #000 100%); pointer-events: none; }
  .js .story-dots { flex-direction: row; top: auto; bottom: 4vh; right: 50%; transform: translateX(50%); }
  .story-dots li.on { height: 6px; width: 26px; }
  .story-dots li { transition: width 0.5s var(--ease), background-color 0.5s; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 44px 20px; }
  .pillars, .features { grid-template-columns: 1fr; }
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; }
  .card { min-height: 0; }
  .section-head.row { align-items: flex-start; flex-direction: column; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; }
  .kpi-label { min-height: 0; }
  .journey-kpis { grid-template-columns: repeat(2, 1fr); gap: 26px 16px; }
  .mf-row { grid-template-columns: 118px 1fr 60px; gap: 10px; font-size: 13px; }
}

@media (max-width: 560px) {
  .model-controls { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .offer { padding: 28px; min-height: 400px; }
  .offer h3 { font-size: 28px; }
  .hero-cta { flex-direction: column; gap: 6px; }
  .vf-row { grid-template-columns: 112px 1fr; }
  .vf-row span { font-size: 12px; }
}

@media (hover: none) {
  .card:hover { box-shadow: none; }
  .offer:hover { transform: none; }
}

@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; transition-delay: 0ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero-title .w > span { transform: none; }
  .js .hero-fade { opacity: 1; transform: none; }
  .hero-scroll { display: none; }
}

/* ================= Two-practice homepage ================= */

.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; }
html:not(.js) .js-only { display: none !important; }
.anchor-alias { position: absolute; top: 0; left: 0; width: 0; height: 0; }
section:focus { outline: none; }
.cta { position: relative; }

/* ---------- Opening ---------- */
.hero { padding-top: calc(var(--nav-h) + clamp(26px, 7vh, 96px)); padding-bottom: 80px; }
.hero-title { font-size: clamp(34px, 5.6vw, 78px); line-height: 1.03; letter-spacing: -0.04em; }
.hero-title.cta-title { font-size: clamp(42px, 7.6vw, 104px); }
.hero .hero-sub { max-width: 810px; margin-top: clamp(14px, 2.4vh, 26px); font-size: clamp(17px, 1.6vw, 22px); }
.hero .hero-cta { margin-top: clamp(18px, 3vh, 32px); }
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 34px; margin-top: clamp(6px, 1.2vh, 14px); }

/* ---------- Experience transition ---------- */
.js .story { height: 230vh; }
.story-panel.exp-panel { max-width: 720px; }
.js .story-panel.exp-panel { width: min(580px, 47%); }
.exp-line {
  font-size: clamp(25px, 2.9vw, 42px); line-height: 1.14; letter-spacing: -0.03em; font-weight: 600;
  color: var(--on-dark-3); text-wrap: pretty;
}
.exp-a, .exp-b { color: var(--on-dark); }
.exp-a { opacity: var(--a, 1); }
.exp-b { opacity: var(--b, 1); }
.exp-line strong {
  font-weight: 700; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Service cards ---------- */
.span-6 { grid-column: span 6; }
.card h3 { font-size: clamp(22px, 2.2vw, 30px); }
.card-copy p:not(.card-kicker) { max-width: none; }
.card .viz { margin-top: auto; }

.mini-funnel { display: grid; gap: 7px; }
.mnf-row { display: grid; grid-template-columns: 172px 1fr 54px; align-items: center; gap: 12px; font-size: 12.5px; font-weight: 500; color: var(--on-dark-2); }
.mnf-row i {
  display: block; height: 14px; width: var(--w); min-width: 4px; border-radius: 7px; background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s var(--ease); transition-delay: calc(var(--n, 0) * 80ms + 250ms);
}
.mnf-row b { text-align: right; font-weight: 600; color: var(--on-dark); font-variant-numeric: tabular-nums; }
.mnf-row:nth-child(2) { --n: 1; } .mnf-row:nth-child(3) { --n: 2; } .mnf-row:nth-child(4) { --n: 3; }
.mnf-row:nth-child(5) { --n: 4; } .mnf-row:nth-child(6) { --n: 5; } .mnf-row:nth-child(7) { --n: 6; }
.in .mnf-row i { transform: none; }
html:not(.js) .mnf-row i, html:not(.js) .vr-row i { transform: none; }
html:not(.js) .vr-row em { opacity: 1; }

/* ---------- Worked examples: shared ---------- */
#model-title, #journey-title { font-size: clamp(31px, 4.6vw, 60px); }
.disclosure {
  display: inline-block; margin-top: 22px; padding: 10px 16px; border-radius: 14px;
  font-size: 14px; line-height: 1.45; font-weight: 500;
}
.dark .disclosure { color: var(--on-dark-2); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-dark); }
.light .disclosure { color: #424245; background: rgba(0, 0, 0, 0.045); border: 1px solid var(--line-light); }

.prose { max-width: 780px; }
.prose p { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.55; text-wrap: pretty; }
.dark .prose p { color: var(--on-dark-2); }
.light .prose p { color: #424245; }
.prose p + p { margin-top: 1em; }
.prose-2 { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 48px; }
.prose-2 p + p { margin-top: 0; }
.prose, .fc, .compare, .pathway, .worklist-wrap { margin-top: clamp(28px, 3.6vw, 48px); }
.section-head + .prose { margin-top: 0; }
.section .fineprint { max-width: 780px; }

.tag, .fc-hyp {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 980px; background: rgba(255, 255, 255, 0.1); color: var(--on-dark-2);
}

/* ---------- Forecast panel ---------- */
.fc { background: var(--card-dark); border: 1px solid var(--line-dark); border-radius: var(--r-card); overflow: hidden; }
.fc-top { display: grid; grid-template-columns: minmax(320px, 0.82fr) 1.3fr; }
.fc-left, .fc-right { padding: clamp(22px, 2.8vw, 36px); display: flex; flex-direction: column; min-width: 0; }
.fc-left { gap: 26px; border-right: 1px solid var(--line-dark); }
.fc-right { gap: 22px; }
.fc-head { display: flex; align-items: center; gap: 10px; }
.fc-head .segmented { flex: 1; margin-top: 0; }
.segmented-thumb { transition: transform 0.45s var(--ease), opacity 0.3s; }
.segmented.is-custom .segmented-thumb { opacity: 0; }
.fc-reset { min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--link-dark); white-space: nowrap; transition: background-color 0.2s, opacity 0.2s; }
.fc-reset:not(:disabled):hover { background: rgba(255, 255, 255, 0.08); }
.fc-reset:disabled { opacity: 0.35; cursor: default; }
.fc-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; line-height: 1.35; font-weight: 600; color: var(--on-dark-3); }
.fc .mfunnel { border-top: 0; padding-top: 14px; }
.fc .mf-row { grid-template-columns: minmax(196px, 1.7fr) 1fr 58px; }
.fc .mf-label { line-height: 1.25; }
.fc-coverage { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line-dark); }
.fc-help { font-size: 13px; line-height: 1.4; color: var(--on-dark-3); }
.fc-coverage .fc-help { margin: 2px 0 16px; }
.btn-ghost { min-height: 44px; padding: 0 20px; font-size: 15px; background: rgba(255, 255, 255, 0.1); color: var(--on-dark); }
.btn-ghost:not(:disabled):hover { background: rgba(255, 255, 255, 0.18); }
.btn-ghost:disabled { opacity: 0.4; cursor: default; }

.kpis-6 { grid-template-columns: repeat(3, 1fr); gap: 20px 18px; }
.kpis-6 .kpi-label { min-height: 0; }
.kpis-6 .kpi-value { font-size: clamp(22px, 2.2vw, 32px); }
.kpi-note { font-size: 12px; color: var(--on-dark-3); }

.chart .c-base { stroke: rgba(255, 255, 255, 0.5); stroke-dasharray: 5 5; transition: opacity 0.3s; }
.chart .c-tag { transition: opacity 0.3s, fill 0.4s; }
.chart .c-entry { stroke: rgba(255, 179, 64, 0.75); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .c-entry-tag { fill: var(--amber); font-size: 11.5px; font-weight: 600; }
.chart .c-axis-title { font-size: 12px; fill: var(--on-dark-3); }

.fc-groups { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-dark); }
.fc-group { padding: 0 clamp(18px, 2.2vw, 28px); border-right: 1px solid var(--line-dark); min-width: 0; }
.fc-group:last-child { border-right: 0; }
.fc-group summary {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; font-size: 15px; font-weight: 600; list-style: none; color: var(--on-dark);
}
.fc-group summary::-webkit-details-marker { display: none; }
.fc-group summary::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.3s var(--ease); opacity: 0.7;
}
.fc-group[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.fc-group-body { padding: 4px 0 24px; }

/* ---------- Fixed comparison ---------- */
.table-scroll { overflow-x: auto; }
.compare-table { width: 100%; max-width: 780px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.compare-table caption { caption-side: top; text-align: left; padding-bottom: 14px; font-size: 16px; font-weight: 600; color: var(--on-dark); }
.compare-table caption .tag { margin-left: 10px; vertical-align: middle; }
.compare-table th, .compare-table td { padding: 13px 0 13px 16px; border-top: 1px solid var(--line-dark); text-align: right; font-size: 16px; }
.compare-table thead th, .compare-table thead td { border-top: 0; padding-top: 0; font-size: 13px; font-weight: 600; color: var(--on-dark-3); }
.compare-table th[scope="row"] { padding-left: 0; text-align: left; font-weight: 500; color: var(--on-dark-2); }
.compare-table td { font-weight: 600; color: var(--on-dark); }
.compare-table .total td { font-size: 20px; letter-spacing: -0.02em; }

/* ---------- Patient journey pathway ---------- */
.pathway { padding: clamp(22px, 3vw, 38px) clamp(18px, 2.8vw, 40px); }
.pathway-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.pw-main { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 2; }
.pw-flow { fill: none; stroke: url(#lg); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 90 1100; stroke-dashoffset: 1190; animation: pwflow 6.5s linear infinite; }
@keyframes pwflow { to { stroke-dashoffset: 0; } }
.pw-branch { fill: none; stroke: rgba(255, 255, 255, 0.36); stroke-width: 2; stroke-dasharray: 5 6; }
.pw-step, .pw-case { transition: opacity 0.25s; }
.pw-step circle { fill: var(--on-dark); }
.pw-step text { fill: var(--on-dark-2); font-size: 14px; font-weight: 500; }
.pw-note { fill: var(--on-dark-3); font-size: 12px; }
.pw-step .pw-hot { fill: var(--amber); }
.pw-step .pw-ring { fill: none; stroke: var(--amber); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ping 2.4s var(--ease) infinite; }
.pw-case line { stroke: rgba(255, 179, 64, 0.6); stroke-width: 1.5; }
.pw-case circle { fill: var(--amber); }
.pw-letter { fill: #1d1d1f; font-size: 14px; font-weight: 700; }
.pw-why { fill: var(--on-dark); font-size: 12.5px; font-weight: 500; }
.pathway.has-active .pw-case:not(.active), .pathway.has-active .pw-step[data-case]:not(.active) { opacity: 0.32; }

.case-badge {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--amber); color: #1d1d1f; font-size: 13px; font-weight: 700; line-height: 1;
}
.pathway-list { list-style: none; margin: 0; padding: 0; }
.pathway-list > li { position: relative; padding: 0 0 22px 34px; font-size: 16px; line-height: 1.4; font-weight: 500; color: var(--on-dark); }
.pathway-list > li::before { content: ""; position: absolute; left: 5px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--on-dark); }
.pathway-list > li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: -2px; width: 2px; background: rgba(255, 255, 255, 0.22); }
.pathway-list > li:last-child { padding-bottom: 0; }
.pathway-list > li:last-child::after { display: none; }
.pathway-list > li.is-case::before { background: var(--amber); }
.pathway-list .is-case { font-weight: 400; color: var(--on-dark-2); }
.pathway-list .case-badge { margin-right: 10px; vertical-align: middle; }
.pathway-list strong { font-weight: 500; color: var(--on-dark); }
.pathway-list ul { list-style: none; margin: 12px 0 0; padding: 0; }
.pathway-list ul li { padding: 12px 14px; border: 1px dashed rgba(255, 255, 255, 0.32); border-radius: 14px; font-size: 15px; }
@media (min-width: 821px) {
  .pathway-list { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}

/* ---------- Worklist ---------- */
.worklist { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border-radius: var(--r-card); overflow: hidden; }
.worklist th, .worklist td { padding: 20px 22px; text-align: left; vertical-align: top; font-size: 16px; line-height: 1.45; border-top: 1px solid var(--line-light); }
.worklist thead th { border-top: 0; padding-top: 18px; padding-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.worklist tbody th { width: 76px; }
.worklist td { color: #424245; }
.worklist td:nth-child(2) { width: 19%; font-weight: 600; color: var(--ink); }
.worklist tbody tr { transition: background-color 0.25s; }
.worklist tbody tr:hover, .worklist tbody tr.active { background: #fff7e8; }
.worklist tbody tr:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -3px; border-radius: 0; }

/* ---------- Contact ---------- */
.btn-mail { min-height: 54px; padding: 0 30px; font-size: clamp(16px, 1.6vw, 19px); -webkit-user-select: all; user-select: all; }
.footer-top > span { color: var(--on-dark-2); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .fc-top { grid-template-columns: 1fr; }
  .fc-left { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .fc-groups { grid-template-columns: 1fr 1fr; }
  .fc-group:nth-child(2n) { border-right: 0; }
  .fc-group:nth-child(n + 3) { border-top: 1px solid var(--line-dark); }
  .prose-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .span-6 { grid-column: span 12; }
  .hero { padding-top: calc(var(--nav-h) + 24px); padding-bottom: 60px; }
  .hero-links { flex-direction: column; align-items: center; }
  .js .story { height: 210vh; }
  .js .story-panel.exp-panel { width: 100%; }
  .exp-line { font-size: clamp(23px, 6.2vw, 30px); }
  .kpis-6 { grid-template-columns: repeat(2, 1fr); }
  .fc .mf-row { grid-template-columns: minmax(120px, 1.25fr) 1fr 52px; }
  .mnf-row { grid-template-columns: 138px 1fr 50px; gap: 10px; font-size: 12px; }
  .pathway-svg { display: none; }

  .worklist, .worklist tbody, .worklist tr, .worklist th, .worklist td { display: block; }
  .worklist { background: none; border-radius: 0; overflow: visible; }
  .worklist thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .worklist tbody tr { background: var(--white); border-radius: 22px; padding: 20px; margin-bottom: 14px; }
  .worklist tbody th, .worklist td { width: auto; padding: 0; border: 0; }
  .worklist td:nth-child(2) { width: auto; }
  .worklist td { margin-top: 14px; }
  .worklist td::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-2); }
}
@media (max-width: 560px) {
  .fc-groups { grid-template-columns: 1fr; }
  .fc-group { border-right: 0; border-top: 1px solid var(--line-dark); }
  .fc-group:first-child { border-top: 0; }
  .fc-head { flex-direction: column; align-items: stretch; }
  .fc-reset { align-self: flex-start; }
  .compare-table th, .compare-table td { font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-flow, .pw-ring { display: none; }
  .exp-a, .exp-b { opacity: 1; }
}
