/* ToonFlick — site styles. No external requests, system fonts only. */

:root {
  --bg: #050a24;
  --bg-2: #08113a;
  --surface: rgba(120, 150, 255, 0.05);
  --surface-2: rgba(120, 150, 255, 0.09);
  --line: rgba(140, 170, 255, 0.16);
  --text: #e9eeff;
  --muted: #a3b0dd;
  --accent: #4d94ff;
  --accent-2: #8cc8ff;
  --glow: rgba(77, 148, 255, 0.45);
  --pink: #ff5aa8;
  --ink: #04102e;
  --radius: 4px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }

a { color: var(--accent-2); }
a:hover { color: #fff; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.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;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--ink); padding: 8px 14px; border-radius: 4px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Backdrop (splash-inspired waves, dots, plus signs) ---------- */

.backdrop {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 700px at 70% -10%, #0c1b66 0%, transparent 60%), var(--bg);
}
.waves { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.38; filter: blur(2px); }
.wave { transform-box: fill-box; transform-origin: center; }
.w1 { animation: drift 26s ease-in-out infinite alternate; }
.w2 { animation: drift 32s ease-in-out infinite alternate-reverse; }
.w3 { animation: drift 22s ease-in-out infinite alternate; opacity: 0.8; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(18px, -14px) scale(1.04); }
}

.spark, .plus { position: absolute; }
.spark {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2f6dff; box-shadow: 0 0 14px 3px rgba(47, 109, 255, 0.6);
  animation: twinkle 5s ease-in-out infinite;
}
.s1 { top: 14%; left: 8%; }
.s2 { top: 32%; left: 92%; width: 12px; height: 12px; animation-delay: -1.5s; }
.s3 { top: 70%; left: 5%; width: 6px; height: 6px; animation-delay: -3s; }
.s4 { top: 84%; left: 74%; animation-delay: -2s; }
.s5 { top: 52%; left: 48%; width: 5px; height: 5px; animation-delay: -4s; }
.plus { width: 14px; height: 14px; animation: twinkle 7s ease-in-out infinite; }
.plus::before, .plus::after {
  content: ""; position: absolute; background: #3d8bff; border-radius: 2px;
}
.plus::before { left: 6px; top: 0; width: 2px; height: 14px; }
.plus::after { top: 6px; left: 0; width: 14px; height: 2px; }
.p1 { top: 9%; left: 30%; }
.p2 { top: 22%; left: 78%; animation-delay: -2s; }
.p3 { top: 62%; left: 88%; animation-delay: -4s; }
.p4 { top: 90%; left: 22%; animation-delay: -5s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(5, 10, 36, 0.72);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 24px; min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: 0.02em; font-size: 18px;
}
.brand img { border-radius: 4px; }
nav { margin-left: auto; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--text); }

.lang { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; }
.lang span { opacity: 0.5; }
.lang button {
  font: inherit; color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 6px 8px; border-radius: 4px; letter-spacing: 0.06em;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { color: var(--text); background: var(--surface-2); }

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

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 56px; align-items: center;
  padding-top: 96px; padding-bottom: 110px;
}
.badge {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 4px 14px 4px 12px; background: var(--surface);
}
.badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px 2px var(--glow); animation: twinkle 2.4s ease-in-out infinite;
}
h1 {
  margin: 0; font-size: clamp(44px, 7vw, 84px); line-height: 1; font-weight: 300;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-shadow: 0 0 40px rgba(77, 148, 255, 0.35);
}
.pitch { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.5; margin: 24px 0 10px; max-width: 30ch; }
.hero-sub { color: var(--muted); margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 4px; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--ink); box-shadow: 0 6px 28px -8px var(--glow); }
.btn.primary:hover { background: var(--accent-2); color: var(--ink); }
.btn.ghost { color: var(--text); border: 1px solid var(--line); background: var(--surface); }
.btn.ghost:hover { background: var(--surface-2); }

.hero-media { margin: 0; }
.video-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
  box-shadow: 0 30px 80px -30px rgba(29, 85, 230, 0.6), 0 0 0 6px rgba(120, 150, 255, 0.04);
  aspect-ratio: 16 / 9;
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.video-toggle {
  position: absolute; right: 12px; bottom: 12px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(5, 10, 36, 0.65); color: #fff; cursor: pointer;
  opacity: 0.75; transition: opacity 0.15s ease;
}
.video-toggle:hover, .video-toggle:focus-visible { opacity: 1; }
.video-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.video-toggle .i-play { display: none; }
.video-toggle[aria-pressed="true"] .i-play { display: block; }
.video-toggle[aria-pressed="true"] .i-pause { display: none; }
.hero-media figcaption, .caption, .shot figcaption {
  color: var(--muted); font-size: 14px; margin-top: 12px;
}

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

section { scroll-margin-top: 80px; }
.section-head { margin-bottom: 44px; }
.eyebrow {
  margin: 0 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.15; font-weight: 400; letter-spacing: -0.01em; }
h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; line-height: 1.3; }

.features, .screens { padding-block: 70px; }

.cards {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px 24px;
}
.card p { margin: 0 0 12px; color: var(--muted); }
.card ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; }
.card li { margin: 4px 0; }
.card li::marker { color: var(--accent); }

/* ---------- Animated SVG illustrations ---------- */

.viz {
  width: 100%; height: auto; aspect-ratio: 3 / 2; margin: -4px 0 14px;
  border-radius: 4px; background: rgba(3, 7, 26, 0.55); border: 1px solid rgba(140, 170, 255, 0.08);
  overflow: hidden;
}
.viz-wide { aspect-ratio: 4 / 1; }

/* draw */
.stroke-main { fill: none; stroke: #eaf2ff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.stroke-soft { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; opacity: 0.7; }
.draw-on {
  fill: none; stroke: var(--accent-2); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawon 3s linear infinite;
}
@keyframes drawon {
  0% { stroke-dashoffset: 1; }
  60%, 85% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.pen { fill: #fff; filter: drop-shadow(0 0 4px var(--accent)); }

/* rig */
.bone { fill: rgba(77, 148, 255, 0.35); stroke: var(--accent-2); stroke-width: 1.5; stroke-linejoin: round; }
.joint { fill: var(--bg); stroke: var(--accent-2); stroke-width: 1.5; }
.joint.root { fill: var(--accent); }
.ik-target { fill: none; stroke: var(--pink); stroke-width: 1.8; }
.pole { stroke: #f2c14e; stroke-width: 1.2; stroke-dasharray: 3 4; fill: none; }
.pole-dot { fill: none; stroke: #f2c14e; stroke-width: 1.5; }

/* animate */
.ground { stroke: rgba(140, 170, 255, 0.3); stroke-width: 1.5; }
.motion-path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; opacity: 0.8; }
.onion { fill: none; stroke: var(--accent-2); stroke-width: 1.2; opacity: 0.35; }
.keys path { fill: #f2c14e; }
.ball { fill: #f6f8ff; filter: drop-shadow(0 0 6px rgba(140, 200, 255, 0.7)); }

/* mouth */
.face { fill: #f7c9a0; stroke: #1b1d2b; stroke-width: 2.5; }
.eye { fill: #1b1d2b; }
.mouth { fill: #6b1f3a; stroke: #1b1d2b; stroke-width: 2.5; stroke-linejoin: round; }
.wave-bars rect {
  fill: var(--accent); transform-box: fill-box; transform-origin: center;
  animation: bar 0.9s ease-in-out infinite;
}
.wave-bars rect:nth-child(2) { animation-delay: -0.2s; }
.wave-bars rect:nth-child(3) { animation-delay: -0.5s; }
.wave-bars rect:nth-child(4) { animation-delay: -0.1s; }
.wave-bars rect:nth-child(5) { animation-delay: -0.7s; }
.wave-bars rect:nth-child(6) { animation-delay: -0.35s; }
.wave-bars rect:nth-child(7) { animation-delay: -0.6s; }
@keyframes bar {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}
.strip rect { fill: rgba(140, 170, 255, 0.12); stroke: rgba(140, 170, 255, 0.3); stroke-width: 1; }
.strip .strip-sel { fill: none; stroke: var(--pink); stroke-width: 2; }

/* camera */
.sky { fill: #2c2a5c; }
.moon { fill: #fff3c4; }
.star { fill: #fff; }
.hill { fill: #3d3a7c; }
.house { fill: #6c5a92; stroke: #1b1d2b; stroke-width: 1.5; }
.window { fill: #ffdf86; }
.ground-dark { fill: #24333b; }
.shake { animation: shake 1.6s linear infinite; }
@keyframes shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  10%  { transform: translate(-2.5px, 1.5px) rotate(-0.6deg); }
  20%  { transform: translate(2px, -2px) rotate(0.4deg); }
  30%  { transform: translate(-1.5px, -1px) rotate(0.2deg); }
  40%  { transform: translate(3px, 1.5px) rotate(-0.4deg); }
  50%  { transform: translate(-2px, 2px) rotate(0.6deg); }
  60%  { transform: translate(1px, -2.5px) rotate(-0.2deg); }
  70%  { transform: translate(-3px, 0.5px) rotate(0.3deg); }
  80%  { transform: translate(2px, 1px) rotate(-0.5deg); }
  90%  { transform: translate(-1px, -1.5px) rotate(0.2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.shake { transform-origin: 120px 80px; }
.cam-frame path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.cam-frame .cross { stroke-width: 1.2; opacity: 0.7; }
.rec { fill: #ff4d6d; animation: twinkle 1.2s steps(2, jump-none) infinite; }

/* output */
.film-bg { fill: #0b1236; stroke: rgba(140, 170, 255, 0.25); }
.holes rect { fill: rgba(140, 170, 255, 0.35); }
.frames rect { fill: #2c2a5c; }
.frame-balls circle { fill: #f6f8ff; }
.bar-bg { fill: rgba(140, 170, 255, 0.15); }
.bar {
  fill: var(--accent); transform-box: fill-box; transform-origin: left center;
  animation: render 3.2s cubic-bezier(.5, 0, .3, 1) infinite;
}
@keyframes render {
  0% { transform: scaleX(0); }
  75%, 100% { transform: scaleX(1); }
}
.chips text { fill: var(--accent-2); font: 600 13px var(--font); letter-spacing: 0.04em; }
.film .frames rect { animation: lit 3.2s linear infinite; }
.film .frames rect:nth-child(2) { animation-delay: 0.6s; }
.film .frames rect:nth-child(3) { animation-delay: 1.2s; }
.film .frames rect:nth-child(4) { animation-delay: 1.8s; }
@keyframes lit {
  0%, 100% { fill: #2c2a5c; }
  12% { fill: #3d55c8; }
  30% { fill: #2c2a5c; }
}

/* mcp band */
.hood {
  margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); padding: 24px;
}
.hood .viz { margin: 0 0 22px; }
.hood-text { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.hood-text p { margin: 0; color: var(--muted); }
.lane { fill: none; stroke: rgba(140, 170, 255, 0.22); stroke-width: 1.5; stroke-dasharray: 3 6; }
.packet { fill: var(--accent-2); filter: drop-shadow(0 0 5px var(--accent)); }
.packet.alt { fill: #fff; }
.packet.back { fill: var(--pink); filter: drop-shadow(0 0 5px rgba(255, 90, 168, 0.7)); }
.node { fill: #0b1748; stroke: var(--accent); stroke-width: 1.5; }
.node-label { fill: var(--text); font: 600 18px var(--font); letter-spacing: 0.08em; }
.app-ball { fill: #eaf2ff; }
.app-arc { fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-dasharray: 1 4; stroke-linecap: round; }
.mcp-tag { fill: var(--accent); }
.mcp-label { fill: var(--ink); font: 700 13px var(--font); letter-spacing: 0.1em; }

/* ---------- Gallery ---------- */

.gallery {
  display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.shot { margin: 0; }
.shot.wide { grid-column: 1 / -1; }
.zoom {
  display: block; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.9);
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: zoom-in;
}
.zoom:hover { transform: translateY(-2px); border-color: rgba(140, 170, 255, 0.4); }
.zoom.light { background: #fff; }
.zoom img { width: 100%; }

.frames-strip { margin-top: 44px; }
.frames-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.frames-list img { border-radius: 4px; border: 1px solid var(--line); width: 100%; }

/* ---------- Status ---------- */

.status { padding-block: 70px 110px; }
.status-card {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 44px; align-items: center;
  border: 1px solid var(--line); border-radius: 4px; padding: 32px;
  background: radial-gradient(600px 300px at 0% 0%, rgba(29, 85, 230, 0.25), transparent 70%), var(--surface);
}
.splash { width: 100%; border-radius: 4px; border: 1px solid var(--line); }
.status-card p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 18px; }

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

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-inner p { margin: 0; }
.brand-small { font-weight: 650; letter-spacing: 0.04em; margin-right: 6px; }
.muted { color: var(--muted); }

/* ---------- Lightbox ---------- */

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1600px, 94vw); max-height: 92vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(2, 5, 18, 0.88); backdrop-filter: blur(4px); }
.lightbox img { max-width: 94vw; max-height: 88vh; width: auto; border-radius: 4px; border: 1px solid var(--line); }
.lightbox form { position: absolute; top: -18px; right: -10px; margin: 0; }
.lb-close {
  width: 40px; height: 40px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
}

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

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; padding-bottom: 70px; }
  .pitch { max-width: none; }
  .status-card { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .header-inner { gap: 12px; }
  .nav-links { display: none; }
  .lang { margin-left: auto; }
  .gallery { grid-template-columns: 1fr; gap: 22px; }
  .frames-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hood-text { grid-template-columns: 1fr; gap: 18px; }
  .viz-wide { aspect-ratio: 3 / 1; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .status-card { padding: 20px; }
  .features, .screens { padding-block: 50px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .draw-on { stroke-dashoffset: 0; }
  .bar { transform: none; }
}

/* ---------- Features page ---------- */

.nav-links a[aria-current="page"] { color: var(--text); }
.more { margin: 28px 0 0; text-align: center; }
.more a { font-weight: 600; text-decoration: none; }
.more a:hover { text-decoration: underline; }

.page-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 40px; align-items: end; padding-top: 64px; padding-bottom: 40px;
}
.back { margin: 0 0 28px; font-size: 15px; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--text); }
.page-title {
  font-size: clamp(36px, 5.5vw, 60px); font-weight: 300; letter-spacing: 0.02em;
  text-transform: none; line-height: 1.1;
}
.page-hero .pitch { margin-bottom: 0; }

.accent { width: 100%; height: auto; }
.acc-track { stroke: rgba(140, 170, 255, 0.3); stroke-width: 1.5; }
.acc-keys path { fill: #f2c14e; }
.acc-path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.acc-ball { fill: #f6f8ff; filter: drop-shadow(0 0 6px rgba(140, 200, 255, 0.7)); }

.doc {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px;
  padding-bottom: 100px; align-items: start;
}
.toc { position: sticky; top: 88px; font-size: 14px; }
.toc-title {
  margin: 0 0 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none; line-height: 1.4;
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--accent); }

.panel { padding: 8px 0 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.panel:last-of-type { border-bottom: 0; margin-bottom: 0; }
.panel h2 { font-size: clamp(26px, 3.2vw, 34px); }
.panel .num { color: var(--accent); font-size: 0.55em; letter-spacing: 0.1em; vertical-align: 0.35em; margin-right: 6px; }
.purpose { color: var(--muted); font-size: 18px; margin: 8px 0 22px; }
.panel h3 { font-size: 16px; margin: 22px 0 6px; color: var(--accent-2); letter-spacing: 0.02em; }
.panel h3:first-child { margin-top: 0; }
.panel ul { margin: 0; padding-left: 18px; line-height: 1.65; }
.panel li { margin: 5px 0; }
.panel li::marker { color: var(--accent); }
.note { color: var(--muted); font-size: 15px; margin: 22px 0 0; }

.panel-body {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start;
}
.panel-shot { margin: 0; }
.panel-shot figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.panel-shot.wide { margin-top: 28px; }
.panel-body .panel-shot { max-width: 340px; }
.panel-body .panel-shot .zoom { display: inline-block; }


ul.keys { list-style: none; padding: 0; columns: 2 260px; column-gap: 32px; }
ul.keys li { break-inside: avoid; display: flex; gap: 10px; align-items: baseline; margin: 0 0 8px; }
kbd {
  flex: none; display: inline-block; min-width: 24px; text-align: center;
  font: 600 12px/1 ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  padding: 5px 6px; border-radius: 4px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px;
}

.accent-ai { max-width: 300px; }
.page-end { margin: 8px 0 0; }

@media (max-width: 900px) {
  .page-hero { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .page-hero .accent { max-width: 320px; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .doc > * { min-width: 0; }
  .toc {
    top: 64px; z-index: 10; margin-inline: -20px; padding: 10px 20px;
    background: rgba(5, 10, 36, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .toc-title { display: none; }
  .toc ol { display: flex; gap: 6px; overflow-x: auto; border: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .toc ol::-webkit-scrollbar { display: none; }
  .toc li { flex: none; }
  .toc a {
    border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; margin: 0; white-space: nowrap;
  }
  .toc a.active { border-color: var(--accent); background: var(--surface-2); }
  .panel { scroll-margin-top: 130px; }
}
@media (max-width: 680px) {
  .panel-body { grid-template-columns: 1fr; gap: 22px; }
  .panel-body .panel-shot { max-width: 100%; }
  .purpose { font-size: 17px; }
  .panel { padding-bottom: 40px; margin-bottom: 40px; }
}

/* ---------- Footer nav, version ---------- */

.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a, .version-link { color: var(--muted); text-decoration: none; }
.footer-nav a:hover, .version-link:hover { color: var(--text); text-decoration: underline; }
.status-card p.version-line { font-size: 15px; margin-top: 18px; }
.version-line strong { color: var(--text); font-weight: 600; }

/* ---------- Changelog timeline ---------- */

.changelog { padding-bottom: 110px; }
.releases { list-style: none; margin: 0; padding: 0; position: relative; max-width: 780px; }
.releases::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(77, 148, 255, 0.12));
}
.release { position: relative; padding: 0 0 52px 44px; }
.release:last-child { padding-bottom: 0; }
.release .node {
  position: absolute; left: 1px; top: 12px; width: 14px; height: 14px;
  background: var(--bg); border: 2px solid var(--accent); border-radius: 2px; transform: rotate(45deg);
}
.release.current .node { background: var(--accent); box-shadow: 0 0 14px 2px var(--glow); }
.rel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 10px; }
.release h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 500; }
.release .ver { color: var(--accent-2); font-variant-numeric: tabular-nums; margin-right: 6px; }
.rel-meta { margin: 0; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.tag {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
  background: var(--accent); border-radius: 4px; padding: 1px 8px; font-weight: 600;
}
.release ul { margin: 0; padding-left: 18px; line-height: 1.65; }
.release li { margin: 5px 0; }
.release li::marker { color: var(--accent); }

@media (max-width: 680px) {
  .release { padding-left: 36px; padding-bottom: 40px; }
}

/* ---------- Performance ---------- */

.perf { padding-block: 70px; }
.perf-text { color: var(--muted); max-width: 62ch; margin: 16px 0 0; }
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0;
  background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
}
.stats > div { background: var(--bg-2); padding: 22px 20px; }
.stats dt {
  font-size: clamp(26px, 3.2vw, 38px); font-weight: 300; line-height: 1.15; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.stats > div:first-child dt { color: var(--accent-2); }
.stats dd { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.budget {
  margin: 22px 0 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 4px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.budget-title { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.meters { display: grid; gap: 10px; }
.meter-row {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 4.5rem; gap: 14px; align-items: center;
}
.meter-label { color: var(--text); font-size: 14px; }
.meter-value { color: var(--accent-2); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.meter { width: 100%; height: 14px; overflow: visible; }
.meter-track { fill: rgba(140, 170, 255, 0.1); }
.meter-fill { fill: var(--accent); transform-box: fill-box; transform-origin: left center; }
.budget-row .meter-fill { fill: none; stroke: rgba(140, 170, 255, 0.45); stroke-width: 1; stroke-dasharray: 3 3; }
.budget-row .meter-value, .budget-row .meter-label { color: var(--muted); }
.perf.will-animate .meter-row:not(.budget-row) .meter-fill { transform: scaleX(0); }
.perf.in-view .meter-row:not(.budget-row) .meter-fill { animation: meter-grow 1.6s cubic-bezier(.2, .7, .2, 1) both; }
.perf.in-view .meter-row:nth-child(2) .meter-fill { animation-delay: 0.25s; }
@keyframes meter-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.perf-context { margin: 16px 0 0; color: var(--muted); font-size: 15px; }
.fineprint { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; opacity: 0.85; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .perf { padding-block: 50px; }
  .meter-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .meter-row .meter { grid-column: 1 / -1; grid-row: 2; }
  .budget { padding: 18px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .meter-fill { transform: none !important; }
}

/* ---------- Roadmap ---------- */

.rm-note { color: var(--muted); font-size: 14px; max-width: 62ch; margin: 14px 0 0; }
.rm-link { margin: 18px 0 0; font-size: 15px; }
.rm-link a { text-decoration: none; font-weight: 600; }
.rm-link a:hover { text-decoration: underline; }
.roadmap { padding-bottom: 110px; }
.roadmap .releases { max-width: none; }
.legend {
  display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center;
  margin: 0 0 40px; padding: 14px 16px; font-size: 14px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
}
.legend-item { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.track-tag, .state {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; line-height: 1.5; vertical-align: 0.1em; white-space: nowrap;
}
.track-tag.char { color: #ffd1e6; background: rgba(255, 90, 168, 0.16); border: 1px solid rgba(255, 90, 168, 0.45); }
.track-tag.studio { color: #cfe6ff; background: rgba(77, 148, 255, 0.16); border: 1px solid rgba(77, 148, 255, 0.5); }
.track-tag.fx { color: #e6dcff; background: rgba(160, 120, 255, 0.16); border: 1px solid rgba(160, 120, 255, 0.5); }
.track-tag.ai { color: #cffff7; background: rgba(70, 210, 190, 0.14); border: 1px solid rgba(70, 210, 190, 0.5); }
.track-tag.both { color: #fff1c9; background: rgba(242, 193, 78, 0.14); border: 1px solid rgba(242, 193, 78, 0.5); }
.state.done { color: var(--ink); background: #7ee0a1; }
.state.partly { color: #fff1c9; border: 1px solid rgba(242, 193, 78, 0.6); }
.state.planned { color: var(--muted); border: 1px solid var(--line); }
.state-note { color: var(--muted); font-size: 13px; }

.roadmap .release.today .node { background: #7ee0a1; border-color: #7ee0a1; }
.roadmap .release.current .node { background: var(--accent); box-shadow: 0 0 14px 2px var(--glow); }
.today-text { margin: 0; color: var(--muted); max-width: 70ch; }
.today-link { margin: 8px 0 0; font-size: 15px; }
.today-link a { text-decoration: none; font-weight: 600; }
.today-link a:hover { text-decoration: underline; }
.roadmap .release li { margin: 7px 0; }

.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.track {
  border: 1px solid var(--line); border-radius: 4px; padding: 16px 18px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.track.both { grid-column: 1 / -1; }
/* The AI & cloud card takes its own full row under the other tracks. */
.track.ai { grid-column: 1 / -1 !important; }
/* With a third track, the Look & effects card spans the row in the two-column layout
   and joins a three-column row on wide screens. */
.track.fx { grid-column: 1 / -1; }
@media (min-width: 1080px) {
  .tracks:has(> .track.fx) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tracks:has(> .track.fx) > .track.fx { grid-column: auto; }
}
.track h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 1.5; }
.track ul { font-size: 15px; }

@media (max-width: 900px) {
  .tracks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .track { padding: 14px; }
  .legend { gap: 10px 16px; }
}
