/* Spine Sight AI — site styles */

@font-face {
  font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-var.woff2") format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/jbmono-var.woff2") format("woff2-variations");
}

:root {
  --bg: #0b0e12; --bg-2: #0e1217; --panel: #131820; --panel-2: #19202a;
  --line: #222a35; --line-2: #2f3947;
  --text: #e8ecf1; --muted: #9aa5b3; --faint: #7f8b9a;
  --accent: #4fb3c9; --accent-2: #2d7f92; --accent-ink: #06171c;
  --g0: #3fb57a; --g1: #e3c23c; --g2: #ee8a2f; --g3: #e04b4b; --g4: #9a7fe0;
  --series-treat: #3fa9c0; --series-placebo: #66707d;
  --r: 16px; --r-sm: 10px;
  --sans: "Inter Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono Variable", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --pad: clamp(18px, 4vw, 32px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--sans); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--pad); }
.wrap.narrow { max-width: 860px; }

h1 { font-size: clamp(2.35rem, 5.2vw, 4.1rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 620; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(1.75rem, 3.3vw, 2.7rem); line-height: 1.1; letter-spacing: -0.028em; font-weight: 600; text-wrap: balance; }
h3 { font-size: 1.05rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.005em; }
.h-lg { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.h-lg.gap { margin-top: 40px; }
.eyebrow { font: 500 0.76rem/1.4 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.eyebrow.ok { color: var(--g0); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 34em; line-height: 1.55; }
.sub { font-size: clamp(1.02rem, 1.35vw, 1.15rem); color: var(--muted); max-width: 44em; line-height: 1.6; }
.muted { color: var(--muted); }
.fine { font-size: 0.8rem; line-height: 1.55; color: var(--faint); }
a.ref { font: 500 0.66em/1 var(--mono); vertical-align: super; margin-left: 2px; color: var(--accent); }
a.ref + a.ref::before { content: ","; color: var(--faint); margin-right: 1px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.98rem;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 0 0 0 rgba(79,179,201,0);
}
.btn:hover { text-decoration: none; background: #6cc6da; box-shadow: 0 8px 28px -8px rgba(79,179,201,.55); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--panel-2); box-shadow: none; }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

/* ───── nav ───── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11,14,18,.78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.015em; font-size: 1.06rem; }
.brand:hover { text-decoration: none; }
.brand .logo { color: var(--accent); flex: none; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) { color: var(--muted); font-size: 0.93rem; padding: 8px 12px; border-radius: 8px; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-links .btn { margin-left: 10px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; background: transparent; border: 1px solid var(--line-2); cursor: pointer; position: relative; }
.nav-toggle i, .nav-toggle i::before, .nav-toggle i::after { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px; content: ""; transition: transform .2s, opacity .2s; }
.nav-toggle i { top: 21px; } .nav-toggle i::before { left: 0; right: 0; top: -6px; } .nav-toggle i::after { left: 0; right: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] i { background: transparent; }
.nav-toggle[aria-expanded="true"] i::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i::after { transform: translateY(-6px) rotate(-45deg); }

/* ───── hero ───── */
.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 900px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 420px at 78% 34%, rgba(79,179,201,.17), transparent 70%),
    radial-gradient(520px 380px at 12% 8%, rgba(79,179,201,.07), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 0%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy .lede { margin-top: 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.ticks { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; color: var(--muted); font-size: 0.95rem; }
.ticks li { display: flex; align-items: center; gap: 9px; }
.ticks li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: rgba(63,181,122,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.600 2.600L13 6.500' fill='none' stroke='%233fb57a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.ticks-col { flex-direction: column; gap: 12px; margin-top: 34px; }

.hero-visual { display: flex; align-items: flex-end; justify-content: center; position: relative; }
.scan { position: relative; flex: none; width: min(330px, 58vw); }
.scan-frame { position: relative; aspect-ratio: 752 / 1348; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 6px rgba(255,255,255,.02); }
.scan-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-top { clip-path: inset(0 0 0 0); transition: opacity .35s ease; }
.scan.off .scan-top, .scan.off .pin { opacity: 0; }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); box-shadow: 0 0 18px 4px rgba(79,179,201,.6); opacity: 0; }
.pin { position: absolute; left: var(--x); top: var(--y); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; background: var(--c); box-shadow: 0 0 0 0 var(--c); transition: opacity .3s, transform .2s; }
.pin.hot { transform: scale(1.35); animation: ping 1.1s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 70%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
.g0 { --c: var(--g0); } .g1 { --c: var(--g1); } .g2 { --c: var(--g2); } .g3 { --c: var(--g3); } .g4 { --c: var(--g4); }

.js .scan.play .scan-top { animation: sweep 2.4s cubic-bezier(.45,.05,.35,1) .5s both; }
.js .scan.play .scan-line { animation: sweepline 2.4s cubic-bezier(.45,.05,.35,1) .5s both; }
.js .scan.play .pin { animation: pinin .4s ease both; animation-delay: calc(.5s + var(--t) * 2.4s); }
@keyframes sweep { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sweepline { 0% { top: 0; opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes pinin { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.pin[data-level="T8"] { --t: .06; } .pin[data-level="T12"] { --t: .43; } .pin[data-level="L1"] { --t: .52; } .pin[data-level="L2"] { --t: .6; } .pin[data-level="L4"] { --t: .8; }

.switch { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 0.86rem; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--accent-2); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 3px; }

.findings { position: relative; z-index: 2; width: 268px; flex: none; margin: 0 0 54px -44px; background: rgba(19,24,32,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px 18px 16px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.85); }
.findings-head { display: flex; align-items: baseline; gap: 10px; font-size: 0.82rem; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.findings-head b { color: var(--text); font-size: 0.95rem; }
.findings-sum { font-size: 0.9rem; color: var(--muted); margin: 12px 0 6px; }
.findings-sum strong { color: var(--text); font-size: 1.05rem; }
.findings-list li { display: grid; grid-template-columns: 34px auto 1fr; align-items: center; gap: 8px; padding: 7px 8px; margin-inline: -8px; border-radius: 8px; font-size: 0.84rem; cursor: default; transition: background .15s; }
.findings-list li:hover, .findings-list li.hot { background: var(--panel-2); }
.findings-list b { font: 600 0.84rem var(--mono); }
.findings-list i { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 9px 2px 8px; font-size: 0.78rem; color: var(--text); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.findings-note { font-size: 0.72rem; line-height: 1.45; color: var(--faint); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

.statband { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 7vw, 84px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.statband > div { padding: 28px 26px 30px; border-left: 1px solid var(--line); }
.statband > div:first-child { border-left: 0; padding-left: 0; }
.statband dt { font-size: 0.95rem; color: var(--muted); }
.statband dt b { font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 620; letter-spacing: -0.035em; color: var(--text); line-height: 1.1; }
.statband dd { margin-top: 8px; font-size: 0.92rem; line-height: 1.5; color: var(--muted); }

/* ───── sections ───── */
.sec { padding: clamp(72px, 10vw, 132px) 0; position: relative; }
.sec-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.sec-head { max-width: 820px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head .sub { margin-top: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split + .split { margin-top: clamp(56px, 8vw, 104px); }
.split-rev > :first-child { order: 2; }
.stack > * + * { margin-top: 18px; }
.stack p { color: var(--muted); }
.stack p.eyebrow { color: var(--accent); margin-bottom: 0; }
.stack p.eyebrow.ok { color: var(--g0); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 3vw, 32px); }

/* charts */
.chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin-bottom: 24px; }
.chart figcaption h3 { font-size: 1rem; max-width: 30em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); display: inline-block; }
.sw-placebo { --c: var(--series-placebo); } .sw-treat { --c: var(--series-treat); }

.meter-row { display: grid; grid-template-columns: 132px 1fr 62px; align-items: center; gap: 16px; padding: 14px 0; }
.meter-row + .meter-row { border-top: 1px solid var(--line); }
.meter-lab b { display: block; font-size: 0.95rem; font-weight: 600; }
.meter-lab span { font-size: 0.8rem; color: var(--muted); }
.meter { height: 14px; border-radius: 4px; background: rgba(224,75,75,.16); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--w); background: var(--g3); border-radius: 0 4px 4px 0; transform-origin: left; }
.meter-val { font-size: 1.6rem; font-weight: 620; letter-spacing: -0.03em; text-align: right; }
.chart .fine { margin-top: 18px; }

.trial { padding: 14px 0; }
.trial + .trial { border-top: 1px solid var(--line); }
.trial-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.trial-head b { font-size: 0.95rem; }
.trial-head span { font-size: 0.8rem; color: var(--muted); }
.trial-head em { margin-left: auto; font: 500 0.78rem var(--mono); font-style: normal; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted); padding: 3px 0; }
.bar { display: flex; align-items: center; gap: 8px; }
.bar i { display: block; height: 14px; width: calc((100% - 56px) * var(--w)); border-radius: 0 4px 4px 0; transform-origin: left; }
.bar i.placebo { background: var(--series-placebo); } .bar i.treat { background: var(--series-treat); }
.bar b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; font-size: 0.86rem; }
.js .reveal .meter i, .js .reveal .bar i { transform: scaleX(0); }
.js .reveal.in .meter i, .js .reveal.in .bar i { transform: scaleX(1); transition: transform 1s cubic-bezier(.2,.7,.2,1) .25s; }

.risks { margin-top: 26px !important; border-top: 1px solid var(--line); }
.risks li { display: grid; grid-template-columns: 104px 1fr; gap: 18px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.risks b { font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 620; letter-spacing: -0.035em; }
.risks span { color: var(--muted); font-size: 0.98rem; }

/* ───── product tour ───── */
.tour-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.tour-tabs button { display: flex; align-items: baseline; justify-content: center; gap: 9px; background: transparent; border: 1px solid transparent; border-radius: 9px; padding: 12px 10px; cursor: pointer; color: var(--muted); font-size: 0.93rem; font-weight: 550; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.tour-tabs button:hover { color: var(--text); background: rgba(255,255,255,.03); }
.tour-tabs .n { font: 500 0.72rem var(--mono); color: var(--faint); }
.tour-tabs button[aria-selected="true"] { background: var(--panel-2); border-color: var(--line-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.tour-tabs button[aria-selected="true"] .n { color: var(--accent); }
.tour-panel { margin-top: clamp(26px, 3.5vw, 40px); }
.tour-text { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px 48px; align-items: start; margin-bottom: clamp(22px, 3vw, 32px); }
.tour-text p { color: var(--muted); }
.frame { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #0f1216; box-shadow: 0 40px 100px -40px rgba(0,0,0,.9); }
.frame-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #151a21; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c3541; }
.frame-bar span { margin-left: 10px; font: 500 0.74rem var(--mono); color: var(--faint); }
.frame-body { aspect-ratio: 16 / 9; display: grid; place-items: center; background: #0f1216; min-height: 0; }
.frame-body img { max-width: 100%; max-height: 100%; width: auto; height: auto; min-height: 0; object-fit: contain; }
.frame-body:not(.duo):not(.stackv) img { -webkit-mask-image: linear-gradient(#000 88%, transparent); mask-image: linear-gradient(#000 88%, transparent); }
.frame-body.duo { grid-template-columns: auto auto; justify-content: center; align-items: center; gap: clamp(16px, 4vw, 56px); padding: clamp(12px, 2.4vw, 28px); grid-template-rows: minmax(0, 1fr); }
.frame-body.duo img { border-radius: 10px; border: 1px solid var(--line); }
.frame-body.stackv { grid-template-rows: auto minmax(0, 1fr); gap: clamp(12px, 2vw, 24px); padding: clamp(12px, 2.4vw, 28px); }
.frame-body.stackv img:last-child { border-radius: 10px; border: 1px solid var(--line); }
.w346 { max-width: min(346px, 100%) !important; } .w374 { max-width: min(374px, 100%) !important; } .w414 { max-width: min(414px, 100%) !important; }
[data-zoom] { cursor: zoom-in; }
.frame-cap { font-size: 0.8rem; color: var(--faint); margin-top: 14px; }
.cap-narrow { display: none; }
.legend-grades { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(32px, 4vw, 48px); }
.legend-grades li { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 16px 8px 12px; font-size: 0.86rem; }
.legend-grades span { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }

/* ───── flow ───── */
.flow-zone { position: relative; border: 1.5px dashed var(--line-2); border-radius: 22px; padding: clamp(44px, 5vw, 60px) clamp(18px, 3vw, 36px) clamp(22px, 3vw, 30px); background: linear-gradient(180deg, rgba(79,179,201,.035), transparent 60%); }
.zone-tag, .zone-out { position: absolute; top: -13px; background: var(--bg); padding: 2px 12px; font: 500 0.74rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.zone-tag { left: 24px; color: var(--accent); }
.zone-out { right: 24px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 0.84rem; }
.flow { display: grid; grid-template-columns: 1fr 1fr 1.45fr 1fr 1fr; gap: 34px; align-items: center; }
.flow > li { position: relative; display: flex; flex-direction: column; }
.flow > li:not(:last-child)::after { content: ""; position: absolute; right: -27px; top: 50%; width: 20px; height: 12px; margin-top: -6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M0 6h17M12 1l5 5-5 5' fill='none' stroke='%234fb3c9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.node { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.node > svg { width: 30px; height: 30px; color: var(--muted); margin-bottom: 8px; }
.node b { font-size: 0.98rem; }
.node span { font-size: 0.84rem; line-height: 1.45; color: var(--muted); }
.flow .link { position: absolute; left: 0; right: 0; top: 100%; font: 500 0.7rem/1.4 var(--mono); font-style: normal; color: var(--accent); margin-top: 10px; text-align: center; }
.core .node { border-color: var(--accent-2); background: linear-gradient(180deg, rgba(79,179,201,.11), rgba(79,179,201,.03)), var(--panel); box-shadow: 0 0 60px -20px rgba(79,179,201,.35); }
.core .node > svg { color: var(--accent); }
.core-steps { margin-top: 6px; counter-reset: s; width: 100%; }
.core-steps li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 0.84rem; line-height: 1.4; color: var(--text); padding: 7px 0; border-top: 1px solid rgba(79,179,201,.18); }
.core-steps li::before { content: counter(s); font: 500 0.72rem/1.6 var(--mono); color: var(--accent); }
.loop { display: flex; gap: 12px; align-items: flex-start; margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line-2); font-size: 0.92rem; color: var(--muted); max-width: 62em; }
.loop svg { flex: none; color: var(--accent); margin-top: 3px; }

.measure { margin-top: clamp(64px, 9vw, 112px); }
.diagram figcaption { margin-bottom: 6px; }
.vert { width: 100%; height: auto; font-family: var(--sans); }
.scale { position: relative; margin-top: 46px; }
.scale-bar { display: flex; gap: 2px; height: 14px; }
.scale-bar i { display: block; width: var(--w); background: var(--c); }
.scale-bar i:first-child { border-radius: 4px 0 0 4px; } .scale-bar i:last-child { border-radius: 0 4px 4px 0; }
.scale-mark { position: absolute; left: var(--at); bottom: 100%; transform: translateX(-50%); margin-bottom: 6px; padding-bottom: 10px; text-align: center; white-space: nowrap; font-size: 0.76rem; color: var(--muted); line-height: 1.25; }
.scale-mark b { display: block; font-weight: 500; }
.scale-mark span { font: 600 0.95rem var(--mono); color: var(--text); }
.scale-mark::after { content: ""; position: absolute; left: 50%; bottom: -20px; width: 2px; height: 28px; margin-left: -1px; background: #fff; border-radius: 2px; }
.scale-ticks { position: relative; height: 22px; margin-top: 6px; font: 500 0.72rem var(--mono); color: var(--faint); }
.scale-ticks span { position: absolute; left: var(--at); transform: translateX(-50%); }
.scale-ticks span:first-child { transform: none; } .scale-ticks span:last-child { transform: translateX(-100%); }
.legend-scale { margin-top: 8px; }
.diagram .fine { margin-top: 16px; }

.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: clamp(56px, 8vw, 96px); }
.pillar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px; }
.pillar svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 18px; }
.pillar p { margin-top: 10px; font-size: 0.93rem; color: var(--muted); line-height: 1.55; }

/* ───── evidence ───── */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 24px; }
.kpi b { display: block; font-size: clamp(2.2rem, 3.6vw, 3.1rem); font-weight: 620; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.kpi h3 { margin-top: 14px; }
.kpi p { margin-top: 8px; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.evidence-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin-top: clamp(40px, 5vw, 64px); padding-top: clamp(32px, 4vw, 44px); border-top: 1px solid var(--line); }
.evidence-notes h3 { font: 500 0.76rem/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.evidence-notes p { font-size: 0.93rem; color: var(--muted); line-height: 1.6; }

/* ───── savings ───── */
.costs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.cost { padding: 28px 24px; border-left: 1px solid var(--line); }
.cost:first-child { border-left: 0; }
.cost b { display: block; font-size: clamp(1.55rem, 2.5vw, 2.15rem); font-weight: 620; letter-spacing: -0.035em; line-height: 1.1; }
.cost p { margin-top: 10px; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.savings-split { margin-top: clamp(48px, 7vw, 88px); align-items: start; }
.nocost { margin-top: 22px !important; }
.nocost li, .facts li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.97rem; }
.nocost li b { color: var(--text); font-weight: 600; }
.nocost li::before { content: ""; position: absolute; left: 0; top: 14px; width: 20px; height: 20px; border-radius: 50%; background: rgba(63,181,122,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.600 2.600L13 6.500' fill='none' stroke='%233fb57a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.facts { margin-top: 22px !important; }
.facts li::before { content: ""; position: absolute; left: 6px; top: 23px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.calc h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
.calc-intro { font-size: 0.92rem; color: var(--muted); margin: 8px 0 22px; }
.field { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: baseline; padding: 12px 0; }
.field label { font-size: 0.92rem; color: var(--text); }
.field output { font: 600 0.98rem var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.field input[type="range"] { grid-column: 1 / -1; }
.field small { grid-column: 1 / -1; font-size: 0.78rem; color: var(--faint); line-height: 1.5; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--line-2) var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.assume { margin: 8px 0 4px; border-block: 1px solid var(--line); }
.assume summary { cursor: pointer; padding: 14px 0; font-size: 0.9rem; color: var(--muted); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.assume summary::-webkit-details-marker { display: none; }
.assume summary::after { content: "+"; font: 400 1.2rem var(--mono); color: var(--accent); }
.assume[open] summary::after { content: "–"; }
.assume .fine { padding: 6px 0 16px; }
.funnel { margin-top: 22px; display: grid; gap: 10px; }
.funnel li { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: baseline; font-size: 0.88rem; color: var(--muted); }
.funnel b { font: 600 0.95rem var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.funnel i { grid-column: 1 / -1; height: 8px; border-radius: 0 4px 4px 0; background: var(--line-2); width: var(--w); min-width: 3px; transition: width .35s ease; }
.funnel li.hl { color: var(--text); }
.funnel li.hl i { background: var(--accent); }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0 16px; }
.calc-out > div { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 18px; }
.calc-out b { display: block; font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 620; letter-spacing: -0.035em; line-height: 1.1; }
.calc-out > div:last-child b { color: var(--accent); }
.calc-out span { display: block; margin-top: 6px; font-size: 0.84rem; color: var(--muted); line-height: 1.4; }

/* ───── faq ───── */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font-size: 1.1rem; font-weight: 550; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq summary:hover { color: var(--accent); }
.faq p { padding: 0 40px 24px 0; color: var(--muted); max-width: 46em; }

/* ───── contact ───── */
.contact { background: radial-gradient(700px 400px at 20% 0%, rgba(79,179,201,.1), transparent 70%); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact .sub { margin-top: 20px; }
.person { display: flex; align-items: center; gap: 14px; margin-top: 34px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(79,179,201,.16); color: var(--accent); font: 600 0.9rem var(--mono); flex: none; }
.person b { display: block; font-size: 1rem; }
.person a { font-size: 0.93rem; }
.copy { margin-left: auto; background: transparent; border: 1px solid var(--line-2); color: var(--muted); border-radius: 999px; font-size: 0.8rem; padding: 7px 14px; cursor: pointer; }
.copy:hover { color: var(--text); border-color: var(--accent-2); }
.form { display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f { display: grid; gap: 7px; }
.f label { font-size: 0.86rem; color: var(--muted); }
.f input, .f select, .f textarea { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.f textarea { resize: vertical; min-height: 120px; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,179,201,.2); }
.f .bad { border-color: var(--g3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-status { font-size: 0.9rem; color: var(--muted); flex: 1; min-width: 200px; }
.form-status.ok { color: var(--g0); } .form-status.err { color: #f08a8a; }

/* ───── references & footer ───── */
.refs { border-top: 1px solid var(--line); padding: 8px 0; background: var(--bg-2); }
.refs summary { cursor: pointer; padding: 18px 0; font: 500 0.78rem var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.refs summary:hover { color: var(--text); }
.refs ol { list-style: decimal; padding: 0 0 28px 22px; display: grid; gap: 10px; font-size: 0.84rem; line-height: 1.55; color: var(--muted); max-width: 78em; }
.refs li { padding-left: 6px; scroll-margin-top: 100px; }
.refs li:target { color: var(--text); }
.refs li::marker { font-family: var(--mono); color: var(--faint); }
.foot { border-top: 1px solid var(--line); padding: 48px 0 56px; }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: start; }
.tagline { margin-top: 12px; color: var(--muted); font-size: 0.98rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; max-width: 460px; }
.foot-nav a { color: var(--muted); font-size: 0.92rem; }
.foot-nav a:hover { color: var(--text); }
.foot-note { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.82rem; line-height: 1.7; color: var(--faint); }

/* ───── lightbox ───── */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(4,6,8,.88); backdrop-filter: blur(4px); }
.lightbox img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 10px; border: 1px solid var(--line-2); }
.lb-close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; z-index: 2; }

/* ───── reveal ───── */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }

/* ───── responsive ───── */
@media (max-width: 1080px) {
  .flow { grid-template-columns: 1fr; gap: 30px; max-width: 520px; margin-inline: auto; }
  .flow > li:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -25px; margin: 0 0 0 -10px; transform: rotate(90deg); }
  .flow .link { position: static; margin-top: 8px; }
  .node { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .node > svg { margin: 0; }
  .node span, .core-steps { flex-basis: 100%; }
  .pillars, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .costs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost:nth-child(3) { border-left: 0; }
  .cost:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; padding: 10px var(--pad) 20px; background: rgba(11,14,18,.98); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links .btn { margin: 16px 0 0; }
  .hero-grid, .split, .contact-grid, .tour-text { grid-template-columns: minmax(0, 1fr); }
  .split-rev > :first-child { order: 0; }
  .hero-visual { margin-top: 12px; }
  .statband { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statband > div { padding: 22px 18px; }
  .statband > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .statband > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tour-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tabs button { flex: none; padding-inline: 16px; }
  .evidence-notes { grid-template-columns: minmax(0, 1fr); }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .foot-nav { justify-content: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-visual { flex-direction: column; align-items: center; }
  .scan { width: min(300px, 78vw); }
  .findings { width: min(340px, 100%); margin: -70px 0 0; }
  .pillars, .kpis, .costs, .row2, .calc-out { grid-template-columns: minmax(0, 1fr); }
  .cost { border-left: 0; }
  .cost + .cost { border-top: 1px solid var(--line); }
  .meter-row { grid-template-columns: 1fr auto; }
  .meter-row .meter { grid-column: 1 / -1; order: 3; }
  .risks li { grid-template-columns: 84px 1fr; gap: 12px; }
  .frame-body.duo, .frame-body.stackv { aspect-ratio: auto; }
  .frame-body.duo { grid-template-columns: minmax(0, 346fr) minmax(0, 374fr); align-items: start; }
  .frame-bar { height: 30px; }
  .frame-body:not(.duo):not(.stackv) { display: block; place-items: start; aspect-ratio: auto; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .frame-body:not(.duo):not(.stackv) img { width: 210%; max-width: none; max-height: none; -webkit-mask-image: none; mask-image: none; }
  .cap-wide { display: none; } .cap-narrow { display: inline; }
  .zone-out { position: static; display: flex; background: transparent; padding: 0; margin-bottom: 18px; }
  .flow-zone { padding-top: 30px; }
  .faq p { padding-right: 0; }
  .copy { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal .meter i, .js .reveal .bar i { transform: none; }
}
@media print {
  .nav, .lightbox, .nav-toggle { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
