/* Home page v2. Layout: a full-bleed ink hero carrying a live WebGL notebook (sources
   stream in, Studio artifacts orbit out) with a JetBrains Mono telemetry strip, then a
   recreated NotebookLM workspace that plays KastorFlow's four journeys, then animated
   tool tiles on the light canvas. Indigo stays the only action colour. */

:root {
  --nl-bg: #f8f9fb;
  --nl-card: #ffffff;
  --nl-line: #e4e6ec;
  --src-chatgpt: #10a37f;
  --src-youtube: #e5484d;
  --src-pdf: #d97706;
  --src-web: #3b82f6;
  --src-x: #8a909c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --nl-bg: #12141b; --nl-card: #191c25; --nl-line: #272b37; }
}
:root[data-theme="dark"] { --nl-bg: #12141b; --nl-card: #191c25; --nl-line: #272b37; }

/* ---------- hero */
.x-hero { position: relative; background: var(--ink); color: var(--ink-text); overflow: hidden; isolation: isolate; }
.x-hero canvas#stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.x-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, var(--ink) 0%, rgba(9,10,16,.82) 32%, rgba(9,10,16,0) 58%); }
@media (max-width: 900px) { .x-hero::before { background: linear-gradient(180deg, var(--ink) 0%, rgba(9,10,16,.85) 45%, rgba(9,10,16,0) 75%); } }
.x-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 140px; z-index: -1; background: linear-gradient(to bottom, transparent, var(--ink)); pointer-events: none; }
.x-hero-inner { min-height: min(900px, 100svh); padding-block: 140px 56px; display: grid; grid-template-rows: 1fr auto; gap: var(--s-10); }
.x-stage-space { display: none; }
@media (max-width: 900px) { .x-hero-inner { grid-template-rows: auto; gap: var(--s-6); } .x-stage-space { display: block; height: 360px; } }
.x-hero-copy { display: grid; gap: var(--s-6); align-content: center; max-width: 620px; }
.x-hero .eyebrow { color: var(--glow); }
.x-hero h1 { color: #fff; font-size: clamp(2.75rem, 1.2rem + 6.2vw, 6rem); line-height: .96; letter-spacing: -0.045em; font-weight: 700; }
.x-hero h1 .line { display: block; }
.x-hero h1 .soft { color: transparent; -webkit-text-stroke: 1.5px rgba(238, 240, 247, .55); }
.x-hero .lead { color: #b9bfd0; max-width: 34em; }
.x-hero .fineprint { color: var(--ink-dim); }
.x-hero .btn-secondary { background: transparent; color: var(--ink-text); border-color: rgba(255,255,255,.28); }
.x-hero .btn-secondary:hover { background: rgba(255,255,255,.08); }
.x-hero .btn-primary { box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 10px 40px -10px var(--glow); }
.x-hero .hosts span { background: rgba(255,255,255,.04); border-color: var(--ink-line); color: var(--ink-dim); }

.telemetry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink-line); border-radius: var(--radius-lg); background: rgba(16, 18, 27, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-family: var(--font-mono); overflow: hidden; }
.telemetry > div { padding: var(--s-4) var(--s-5); border-left: 1px solid var(--ink-line); display: grid; gap: 2px; min-width: 0; }
.telemetry > div:first-child { border-left: 0; }
.telemetry .k { font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); display: flex; align-items: center; gap: 6px; }
.telemetry .v { font-size: 1.5rem; color: #fff; font-variant-numeric: tabular-nums; }
.telemetry .v small { font-size: .75rem; color: var(--ink-dim); margin-left: 6px; }
.telemetry .live { width: 7px; height: 7px; border-radius: 50%; background: #5cc79a; box-shadow: 0 0 0 0 rgba(92,199,154,.6); }
@media (prefers-reduced-motion: no-preference) { .telemetry .live { animation: ping 1.8s infinite; } }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(92,199,154,0); } 100% { box-shadow: 0 0 0 0 rgba(92,199,154,0); } }
.telemetry .bump { animation: bump .5s ease-out; }
@keyframes bump { 0% { color: var(--glow); transform: translateY(-2px); } 100% { color: #fff; transform: none; } }
@media (max-width: 760px) {
  .telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telemetry > div:nth-child(3) { border-left: 0; }
  .telemetry > div:nth-child(n+3) { border-top: 1px solid var(--ink-line); }
  .x-hero-inner { padding-top: 112px; }
}

/* ---------- source strip on ink */
.x-strip { background: var(--ink); color: var(--ink-dim); padding-block: 0 var(--s-16); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee ul { display: flex; gap: var(--s-3); width: max-content; list-style: none; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) { .marquee ul { animation: slide 38s linear infinite; } }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee li { display: inline-flex; align-items: center; gap: var(--s-2); border: 1px solid var(--ink-line); border-radius: 999px; padding: 8px 16px; color: #cfd3e0; font-weight: 500; white-space: nowrap; background: rgba(255,255,255,.02); }
.marquee li i { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--glow)); }
.x-strip .label { text-align: center; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--s-5); }

/* ---------- demo */
.demo-sec { padding-block: clamp(64px, 9vw, 120px); }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.chapters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
@media (max-width: 760px) { .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chapter { align-content: start; text-align: left; font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: var(--radius-lg); padding: var(--s-4); cursor: pointer; display: grid; gap: var(--s-2); }
.chapter:hover { background: var(--subtle); }
.chapter[aria-selected="true"] { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.chapter .t { display: flex; gap: var(--s-2); align-items: center; font-weight: 600; color: var(--heading); }
.chapter .t b { font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; color: var(--accent); }
.chapter p { font-size: var(--fs-small); color: var(--text-2); }
.chapter:not([aria-selected="true"]) p { opacity: .7; }
@media (max-width: 760px) { .chapter p { display: none; } }
.chapter .prog { margin-top: auto; }
.chapter .prog { height: 2px; background: var(--fill); border-radius: 2px; overflow: hidden; }
.chapter .prog i { display: block; height: 100%; width: 0; background: var(--accent); }

.win { border: 1px solid var(--border); border-radius: 14px; background: var(--nl-bg); box-shadow: 0 30px 80px -30px rgba(20, 22, 40, .35), var(--shadow); overflow: hidden; min-width: 0; }
.win-bar { display: flex; align-items: center; gap: var(--s-3); padding: 10px 14px; border-bottom: 1px solid var(--nl-line); background: var(--nl-card); }
.win-bar .dots { display: flex; gap: 6px; } .win-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.win-bar .url { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: .75rem; color: var(--text-2); background: var(--nl-bg); border-radius: 6px; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-bar .kf { width: 22px; height: 22px; border-radius: 6px; }
.win-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr) minmax(0, 1fr) 290px; gap: 12px; padding: 12px; height: 500px; position: relative; }
@media (max-width: 1100px) { .win-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 220px; } .col-chat { display: none; } }
@media (max-width: 680px) { .win-body { grid-template-columns: minmax(0, 1fr); height: auto; } .col-studio { display: none; } }
.col { background: var(--nl-card); border: 1px solid var(--nl-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow: hidden; }
.col h4 { margin: 0 0 2px; font-size: .8125rem; font-weight: 600; color: var(--heading); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.col h4 .n { font-family: var(--font-mono); font-weight: 500; color: var(--text-2); font-size: .6875rem; }
.src { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; align-items: start; padding: 8px 9px; border-radius: 8px; font-size: .8125rem; line-height: 1.35; transition: background-color .6s; }
.src .ic { width: 20px; height: 20px; border-radius: 5px; background: var(--c); display: grid; place-items: center; color: #fff; font-size: 9px; font-weight: 700; font-family: var(--font-mono); }
.src .nm { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.src .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.src .tags span { font-size: .625rem; padding: 0 6px; border-radius: 4px; border: 1px solid var(--accent-border); background: var(--accent-subtle); color: var(--accent); font-family: var(--font-mono); }
.src.new { background: var(--accent-subtle); }
.src.enter { animation: srcIn .55s cubic-bezier(.2, .8, .2, 1.2) both; }
@keyframes srcIn { from { opacity: 0; transform: translateY(-8px) scale(.96); } }
.pop { animation: popIn .4s cubic-bezier(.2, .8, .2, 1.4) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.6); } }
.hud-btn { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .6875rem; font-weight: 600; color: var(--accent); border: 1px dashed var(--accent-border); border-radius: 8px; padding: 6px 8px; background: var(--accent-subtle); }
.chat-q { align-self: flex-end; background: var(--heading); color: var(--bg); font-size: .75rem; padding: 8px 10px; border-radius: 12px 12px 2px 12px; max-width: 85%; }
.chat-a { font-size: .75rem; color: var(--text); line-height: 1.5; }
.chat-a sup { font-family: var(--font-mono); color: var(--accent); }
.skel { height: 7px; border-radius: 4px; background: var(--fill); }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st { font-size: .6875rem; border: 1px solid var(--nl-line); border-radius: 8px; padding: 8px; color: var(--text-2); display: grid; gap: 4px; position: relative; overflow: hidden; transition: border-color .3s, color .3s, background-color .3s; }
.st b { color: var(--text); font-weight: 600; }
.st.run::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: runbar 1.1s linear both; }
@keyframes runbar { from { transform: scaleX(0); } }
.st.done { border-color: var(--accent-border); background: var(--accent-subtle); color: var(--accent); }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; }
.wave i { flex: 1; background: var(--accent); border-radius: 2px; height: calc(var(--h) * 1%); opacity: .85; }
@media (prefers-reduced-motion: no-preference) { .playing .wave i { animation: eq 1s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1s); } }
@keyframes eq { to { height: calc(var(--h2) * 1%); } }

.panel-kf { background: var(--ink-2); color: var(--ink-text); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-family: var(--font-mono); font-size: .6875rem; min-width: 0; overflow: hidden; border: 1px solid var(--ink-3); }
.panel-kf .ph { display: flex; align-items: center; gap: 6px; color: var(--ink-dim); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; }
.panel-kf .ph img { width: 16px; height: 16px; border-radius: 4px; }
.panel-kf .ph .live { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #5cc79a; }
.job { border: 1px solid var(--ink-3); border-radius: 8px; padding: 8px; display: grid; gap: 6px; background: rgba(255,255,255,.02); }
.job .l { display: flex; justify-content: space-between; gap: 6px; }
.job .l span:first-child { color: var(--glow); }
.job .l .ok { color: #5cc79a; }
.job .bar { height: 3px; background: var(--ink-3); border-radius: 2px; overflow: hidden; }
.job .bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--glow); transition: width .4s linear; }
.job .sub { color: var(--ink-dim); }
.kbar { border: 1px solid var(--glow); border-radius: 8px; padding: 7px 8px; display: flex; gap: 6px; align-items: center; color: #fff; }
.kbar .caret { width: 1px; height: 12px; background: #fff; }
@media (prefers-reduced-motion: no-preference) { .kbar .caret { animation: blink 1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }
.kres { display: grid; gap: 4px; }
.kres div { padding: 5px 6px; border-radius: 6px; color: #cfd3e0; display: flex; justify-content: space-between; gap: 6px; }
.kres div:first-child { background: rgba(125,135,238,.16); color: #fff; }
.kres em { font-style: normal; color: var(--ink-dim); }
.rule { display: grid; gap: 0; }
.rule .step { border: 1px solid var(--ink-3); border-radius: 8px; padding: 7px 8px; display: flex; justify-content: space-between; gap: 6px; transition: border-color .3s, background-color .3s; }
.rule .step.on { border-color: var(--glow); background: rgba(125,135,238,.12); }
.rule .step em { font-style: normal; color: var(--ink-dim); }
.rule .wire { height: 12px; width: 1px; margin-left: 14px; background: var(--ink-3); }
.approve { display: inline-flex; align-self: flex-start; gap: 6px; border-radius: 6px; padding: 4px 8px; background: #5e6ad2; color: #fff; }

.flyer { position: absolute; z-index: 5; width: 230px; background: var(--nl-card); border: 1px solid var(--nl-line); border-radius: 12px; box-shadow: 0 20px 50px -20px rgba(20,22,40,.45); padding: 12px; display: grid; gap: 8px; font-size: .75rem; pointer-events: none; transition: transform .9s cubic-bezier(.6, 0, .2, 1), opacity .9s; }
.flyer .who { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--heading); }
.flyer .who i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.flyer .save { justify-self: start; display: inline-flex; gap: 6px; align-items: center; background: var(--accent-solid); color: #fff; border-radius: 6px; padding: 5px 9px; font-weight: 600; font-size: .6875rem; transition: transform .15s; }
.flyer .save.press { transform: scale(.92); }

/* ---------- problem → fix */
.pf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 1000px) { .pf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pf { grid-template-columns: minmax(0, 1fr); } }
.pf-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.pf-before { padding: var(--s-5); display: grid; gap: var(--s-2); border-bottom: 1px dashed var(--border-strong); background: var(--subtle); }
.pf-before .k, .pf-after .k { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; }
.pf-before .k { color: var(--text-2); }
.pf-before p { color: var(--text-2); font-size: var(--fs-small); }
.pf-before .big { font-family: var(--font-mono); font-size: 1.75rem; color: var(--heading); text-decoration: line-through; text-decoration-color: var(--danger, #d0433b); text-decoration-thickness: 2px; }
.pf-after { padding: var(--s-5); display: grid; gap: var(--s-2); align-content: start; }
.pf-after .k { color: var(--accent); }
.pf-after h3 { font-size: 1.0625rem; }
.pf-after p { color: var(--text-2); font-size: var(--fs-small); }

/* ---------- bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-4); }
.tile { grid-column: span 2; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: var(--s-6); display: grid; gap: var(--s-3); align-content: start; min-width: 0; overflow: hidden; position: relative; }
.tile.w3 { grid-column: span 3; } .tile.w4 { grid-column: span 4; }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile, .tile.w3, .tile.w4 { grid-column: span 1; } .tile.w4 { grid-column: span 2; } }
@media (max-width: 620px) { .bento { grid-template-columns: minmax(0, 1fr); } .tile.w4 { grid-column: span 1; } }
.tile h3 { font-size: 1.125rem; display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.tile p { color: var(--text-2); font-size: var(--fs-small); }
.viz { margin-top: var(--s-2); border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: var(--s-4); min-height: 168px; display: grid; gap: var(--s-2); align-content: start; font-size: .8125rem; position: relative; overflow: hidden; }
.viz.ink { background: var(--ink-2); border-color: var(--ink-3); color: var(--ink-text); font-family: var(--font-mono); font-size: .75rem; }

/* research build */
.typer { font-family: var(--font-mono); font-size: .8125rem; border: 1px solid var(--border-control); border-radius: 8px; padding: 8px 10px; background: var(--surface); display: flex; gap: 2px; }
.typer .caret { width: 1px; background: var(--text); }
@media (prefers-reduced-motion: no-preference) { .typer .caret { animation: blink 1s steps(1) infinite; } }
.found { display: grid; gap: 6px; }
.found div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.found div span:last-child { font-family: var(--font-mono); font-size: .6875rem; color: var(--text-2); }
/* generate all */
.gen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gen div { border: 1px solid var(--border); border-radius: 8px; padding: 10px 8px; font-size: .75rem; background: var(--surface); color: var(--text-2); display: grid; gap: 6px; }
.gen div i { height: 3px; border-radius: 2px; background: var(--fill); overflow: hidden; display: block; }
.gen div i::after { content: ''; display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  .gen div i::after { animation: genfill 6s infinite; animation-delay: calc(var(--i) * .45s); }
  .gen div { animation: genon 6s infinite; animation-delay: calc(var(--i) * .45s); }
}
@media (prefers-reduced-motion: reduce) { .gen div i::after { transform: none; } }
@keyframes genfill { 0% { transform: scaleX(0); } 14%, 88% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes genon { 0%, 13% { color: var(--text-2); border-color: var(--border); } 15%, 88% { color: var(--accent); border-color: var(--accent-border); } 100% { color: var(--text-2); } }
/* podcast */
.pod { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.pod .art { width: 64px; height: 64px; border-radius: 10px; background: var(--accent-solid); display: grid; place-items: center; }
.pod .art img { width: 46px; height: 46px; }
.pod .meta { display: grid; gap: 4px; min-width: 0; }
.pod .meta b { color: #fff; font-family: var(--font-ui); font-size: .875rem; }
.pod .feed { color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz.ink .wave i { background: var(--glow); }
.eps { display: grid; gap: 4px; margin-top: 4px; }
.eps div { display: flex; justify-content: space-between; color: #cfd3e0; padding: 4px 0; border-top: 1px solid var(--ink-3); }
.eps em { font-style: normal; color: #5cc79a; }
/* automation dominoes */
.dom { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 10px; }
.dom .node { border: 1px solid var(--ink-3); border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,.03); white-space: nowrap; }
.dom .node em { display: block; font-style: normal; color: var(--ink-dim); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; }
.dom .pipe { width: 28px; height: 2px; background: var(--ink-3); position: relative; overflow: hidden; }
.dom .pipe::after { content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: var(--glow); }
@media (prefers-reduced-motion: no-preference) {
  .dom .pipe::after { animation: flow 2.4s linear infinite; animation-delay: calc(var(--i) * .6s); }
  .dom .node { animation: lit 2.4s infinite; animation-delay: calc(var(--i) * .6s); }
}
@keyframes flow { 0% { left: -40%; } 50%, 100% { left: 110%; } }
@keyframes lit { 0%, 40% { border-color: var(--ink-3); } 20% { border-color: var(--glow); box-shadow: 0 0 18px -4px var(--glow); } }
.counts { display: flex; gap: var(--s-6); margin-top: var(--s-3); color: var(--ink-dim); }
.counts b { color: #fff; font-size: 1.25rem; font-weight: 500; display: block; }
/* search */
.ksearch { display: grid; gap: 6px; }
.ksearch .box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--accent); border-radius: 8px; padding: 8px 10px; background: var(--surface); font-family: var(--font-mono); font-size: .8125rem; box-shadow: 0 0 0 3px var(--accent-subtle); }
.ksearch .box kbd { margin-left: auto; }
.ksearch .r { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 6px; }
.ksearch .r:first-of-type { background: var(--accent-subtle); }
.ksearch .r span:last-child { color: var(--text-2); font-size: .75rem; }
.ksearch mark { background: none; color: var(--accent); font-weight: 600; }
/* tags */
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud span { font-size: .75rem; border-radius: 6px; padding: 3px 8px; border: 1px solid var(--border); background: var(--surface); }
.tagcloud span.ai { border-color: var(--accent-border); background: var(--accent-subtle); color: var(--accent); }
.tagcloud span.ai::before { content: 'AI · '; font-family: var(--font-mono); font-size: .625rem; }
@media (prefers-reduced-motion: no-preference) { .tagcloud span.ai { animation: popIn .5s both; animation-delay: calc(var(--i) * .25s); } }
/* integrations */
.ints { display: flex; flex-wrap: wrap; gap: 8px; }
.ints span { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: .8125rem; background: var(--surface); }
.ints span i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- numbers band */
.band { background: var(--ink); color: var(--ink-text); padding-block: clamp(56px, 8vw, 96px); }
.band h2 { color: #fff; }
.band .lead { color: #b9bfd0; }
.nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink-line); margin-top: var(--s-10); }
@media (max-width: 860px) { .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nums div { padding: var(--s-6) var(--s-4) 0 0; display: grid; gap: var(--s-1); }
.nums b { font-family: var(--font-mono); font-weight: 400; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); color: #fff; letter-spacing: -0.03em; }
.nums span { color: var(--ink-dim); font-size: var(--fs-small); }

/* ---------- closing */
.finale { background: var(--ink); color: var(--ink-text); padding-block: clamp(64px, 9vw, 120px); position: relative; overflow: hidden; }
.finale .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-10); align-items: center; }
@media (max-width: 760px) { .finale .wrap { grid-template-columns: minmax(0, 1fr); } }
.finale h2 { color: #fff; font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem); letter-spacing: -0.04em; }
.finale p { color: #b9bfd0; }
.finale .mascot { width: clamp(140px, 18vw, 220px); filter: drop-shadow(0 20px 40px rgba(94,106,210,.45)); }
@media (prefers-reduced-motion: no-preference) { .finale .mascot { animation: bob 5s ease-in-out infinite; } }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }

.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.pre { transform: translateY(28px); }

/* ---------- hero features theater: list of heroes + an ink stage that plays each one */
.heroes-sec { padding-block: clamp(64px, 9vw, 120px); background: var(--ink); color: var(--ink-text); position: relative; overflow: hidden; }
.heroes-sec .section-head h2 { color: #fff; }
.heroes-sec .section-head .lead { color: #b9bfd0; }
.heroes-sec .eyebrow { color: var(--glow); }
.theater { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-6); align-items: stretch; }
@media (max-width: 980px) { .theater { grid-template-columns: minmax(0, 1fr); } }
.hero-list { display: grid; gap: 4px; align-content: start; }
@media (max-width: 980px) { .hero-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.hl-item { position: relative; overflow: hidden; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; font: inherit; color: #cfd3e0; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 9px 10px; cursor: pointer; min-height: 44px; }
.hl-item:hover { background: rgba(255,255,255,.04); color: #fff; }
.hl-item[aria-selected="true"] { background: rgba(125,135,238,.12); border-color: rgba(125,135,238,.45); color: #fff; }
.hl-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--glow); }
.hl-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hl-item[aria-selected="true"] .hl-ic { background: var(--accent-solid); color: #fff; }
.hl-n { font-weight: 600; font-size: .9375rem; min-width: 0; }
.hl-p { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .04em; color: var(--ink-dim); border: 1px solid var(--ink-line); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.hl-p.pp { color: #d8dcff; border-color: rgba(125,135,238,.5); }
.hl-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--glow); }

.stage-wrap { border: 1px solid var(--ink-line); border-radius: 18px; background: radial-gradient(120% 90% at 85% 0%, rgba(94,106,210,.22), transparent 60%), var(--ink-2); min-height: 560px; display: grid; overflow: hidden; min-width: 0; }
.hpanel { display: grid; grid-template-rows: auto 1fr; gap: var(--s-4); padding: clamp(20px, 3vw, 32px); min-width: 0; }
.hpanel[hidden] { display: none; }
.hp-copy { display: grid; gap: var(--s-2); max-width: 62ch; }
.hp-copy h3 { color: #fff; font-size: clamp(1.375rem, 1rem + 1.2vw, 1.875rem); letter-spacing: -0.025em; }
.hp-copy p { color: #b9bfd0; }
.hp-copy ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-mono); font-size: .75rem; color: var(--ink-dim); }
.hp-copy li::before { content: '› '; color: var(--glow); }
.scene { position: relative; border: 1px solid var(--ink-line); border-radius: 14px; background: rgba(9,10,16,.55); min-height: 330px; overflow: hidden; font-family: var(--font-mono); font-size: .75rem; color: #cfd3e0; }

/* shared scene atoms */
.sc-pad { position: absolute; inset: 0; padding: 18px; display: grid; gap: 10px; align-content: start; }
.sc-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sc-k { color: var(--ink-dim); text-transform: uppercase; letter-spacing: .1em; font-size: .625rem; }
.sc-card { border: 1px solid var(--ink-line); border-radius: 10px; background: rgba(255,255,255,.03); padding: 10px 12px; min-width: 0; }
.sc-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ink-line); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.sc-chip.ai { border-color: rgba(125,135,238,.6); color: #d8dcff; background: rgba(125,135,238,.12); }
.sc-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--glow)); flex: none; }
.sc-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; flex: 1; min-width: 40px; }
.sc-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--c, var(--glow)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.sc-in { animation: scIn .45s cubic-bezier(.2,.8,.2,1.2) both; }
@keyframes scIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.sc-fade { transition: opacity .5s, transform .5s; }
.sc-ok { color: #5cc79a; } .sc-warn { color: #f0b45c; } .sc-bad { color: #f07a72; } .sc-acc { color: var(--glow); }
.sc-big { font-size: 1.75rem; color: #fff; letter-spacing: -0.02em; }
.sc-type::after { content: ''; display: inline-block; width: 1px; height: 1em; background: #fff; margin-left: 2px; vertical-align: -2px; }
@media (prefers-reduced-motion: no-preference) { .sc-type::after { animation: blink 1s steps(1) infinite; } }
.sc-scan { position: absolute; left: 0; right: 0; height: 40px; background: linear-gradient(180deg, transparent, rgba(125,135,238,.18), transparent); pointer-events: none; }
.sc-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-svg text { font-family: var(--font-mono); font-size: 11px; fill: #cfd3e0; }
.thumb { width: 64px; aspect-ratio: 16/9; border-radius: 4px; background: linear-gradient(135deg, var(--c1, #2b3290), var(--c2, #171a26)); border: 1px solid var(--ink-line); position: relative; flex: none; }
.thumb::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-40%,-50%); border-left: 8px solid rgba(255,255,255,.8); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.thumb b { position: absolute; right: 3px; bottom: 2px; font-size: 8px; font-weight: 400; color: #fff; background: rgba(0,0,0,.6); padding: 0 3px; border-radius: 2px; }
.pdfpage { background: #f4f5fa; color: #14161a; border-radius: 4px; padding: 6px; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; font-size: .625rem; line-height: 1.4; }
.pdfpage .shot { aspect-ratio: 16/9; border-radius: 3px; background: linear-gradient(135deg, #3b45c4, #1c2170); position: relative; }
.pdfpage .shot::before { content: ''; position: absolute; left: 12%; right: 30%; top: 25%; height: 6px; border-radius: 2px; background: rgba(255,255,255,.7); box-shadow: 0 10px 0 rgba(255,255,255,.4), 0 18px 0 rgba(255,255,255,.4); }
