:root {
  color-scheme: dark;
  accent-color: var(--accent-fill);
  --bg: #1f2124;
  --bar: #25272a;
  --surface: #2a2b2e;
  --surface-2: #323438;
  --line: rgba(var(--wash), 0.14);
  --line-strong: rgba(var(--wash), 0.22);
  --text: #e6e6e6;
  --text-2: #c4c7cc;
  --text-3: #9aa0a6;
  --accent: #7b93f0;
  --accent-soft: rgba(123, 147, 240, 0.14);
  --accent-fill: #4a6ae6;
  --accent-fill-hover: #5b79ec;
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.1);
  --amber: #fbbf24;
  --coral: #f87171;
  --wash: 255, 255, 255;
  --glass: 31, 33, 36;
  --sans: "Geist", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 16px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --r-control: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img, svg { display: block; }
pre { margin: 0; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
.dim { color: var(--text-3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 12px; border-radius: 8px; background: #fff; color: #000; font-weight: 500;
}
.skip-link:focus { top: 12px; }

/* Backdrop: diagonal grainy light slabs (drawn by a shader in landing.js) over a deep base.
   ::before is a static CSS poster of the same slabs: it is what you see before the shader starts,
   and what stays when WebGL is missing or too slow. ::after eases the bottom edge into the page colour. */
.backdrop {
  --backdrop-fade: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, 0.8) 54%, rgba(0, 0, 0, 0.52) 66%, rgba(0, 0, 0, 0.27) 78%, rgba(0, 0, 0, 0.1) 89%, transparent 100%);
  position: absolute; top: 0; left: 0; right: 0; height: 1040px; z-index: 0; pointer-events: none; overflow: hidden; contain: strict;
  background:
    radial-gradient(ellipse 62% 50% at 50% 34%, rgba(7, 8, 14, 0.82), transparent 78%),
    radial-gradient(ellipse 44% 36% at 64% -4%, rgba(123, 147, 240, 0.17), transparent 72%),
    radial-gradient(ellipse 40% 30% at 50% 32%, rgba(104, 106, 240, 0.16), transparent 72%);
}
.backdrop::before {
  content: ""; position: absolute; inset: -10% -5%;
  background:
    radial-gradient(ellipse 46% 36% at 50% 34%, rgba(7, 8, 14, 0.85), transparent 80%),
    repeating-linear-gradient(50deg, transparent 0 70px, rgba(98, 104, 224, 0.36) 70px 135px, transparent 135px 215px);
  filter: blur(14px);
  -webkit-mask-image: var(--backdrop-fade);
  mask-image: var(--backdrop-fade);
  transition: opacity 1.2s ease, visibility 0s;
}
.backdrop.is-live::before { opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s 1.2s; }
.backdrop canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease;
  -webkit-mask-image: var(--backdrop-fade);
  mask-image: var(--backdrop-fade);
}
.backdrop.is-live canvas { opacity: 1; }
/* Faint hovering motes above the shader slabs */
.backdrop canvas.backdrop-motes { opacity: 0; transition: opacity 1.8s ease 0.4s; }
.backdrop.has-motes canvas.backdrop-motes { opacity: 1; }
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(20, 21, 29, 0.3) 62%, rgba(20, 21, 29, 0.64) 77%, rgba(20, 21, 29, 0.9) 91%, var(--bg) 100%);
}
@media (max-width: 720px) {
  .backdrop::before { opacity: 0.6; }
  /* Phones: the hero copy sat straight on the high-contrast diagonal slabs and was hard to read. The slabs get
     quieter, and the copy gets its own page-coloured fade behind it (a soft mask, no hard edge). */
  .backdrop.is-live canvas { opacity: 0.55; }
  .backdrop.has-motes canvas.backdrop-motes { opacity: 0.5; }
  .hero-copy { position: relative; isolation: isolate; }
  .hero-copy::before {
    content: ""; position: absolute; z-index: -1; inset: -28px -20px -20px;
    background: radial-gradient(ellipse 72% 70% at 50% 46%, var(--bg) 52%, transparent 100%);
    opacity: 0.88; pointer-events: none;
  }
}
/* Wide screens: poster leans right too, like the shader */
@media (min-width: 900px) {
  .backdrop::before {
    background:
      linear-gradient(90deg, rgba(20, 21, 29, 0.8) 0%, rgba(20, 21, 29, 0.55) 35%, transparent 70%),
      radial-gradient(ellipse 46% 36% at 50% 34%, rgba(7, 8, 14, 0.85), transparent 80%),
      repeating-linear-gradient(50deg, transparent 0 70px, rgba(98, 104, 224, 0.36) 70px 135px, transparent 135px 215px);
  }
}

.page { position: relative; z-index: 1; overflow-x: clip; } /* the section glows are wider than the page */
main, .site-footer { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(37, 39, 42, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.wordmark img { width: 24px; height: 24px; border-radius: 6px; }
.nav-links { display: flex; gap: 4px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a {
  padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--text-2);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(var(--wash), 0.06); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.language-button {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-control); background: rgba(var(--wash), 0.03);
  font-size: 13px; font-family: var(--mono); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.language-button:hover { border-color: var(--line-strong); background: rgba(var(--wash), 0.06); }
.language-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6; }
.nav-cta {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-control);
  background: var(--accent-fill); color: #fff; font-size: 14px; font-weight: 500; transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-fill-hover); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: var(--r-control);
  font-size: 15px; font-weight: 500; border: 1px solid transparent;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--accent-fill); color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -10px rgba(74, 106, 230, 0.7);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--accent-fill-hover); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -10px rgba(74, 106, 230, 0.8); }
.btn-ghost { background: rgba(var(--glass), 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(var(--wash), 0.08); }

/* Shared bits */
.mini-top, .kicker, .label {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}
.label { font-family: var(--sans); letter-spacing: 0.06em; font-weight: 500; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--text-2);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { color: var(--green); background: var(--green-soft); border-color: rgba(62, 207, 142, 0.25); }
.pill-green i { box-shadow: 0 0 8px var(--green); animation: pulse 2.4s ease-in-out infinite; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 13px; color: var(--text-2); background: rgba(var(--wash), 0.06); border: 1px solid var(--line);
  white-space: nowrap;
}
.tag-accent { color: #b4c2f7; background: var(--accent-soft); border-color: rgba(123, 147, 240, 0.3); }
.tag-green { color: var(--green); background: var(--green-soft); border-color: rgba(62, 207, 142, 0.25); }
kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  font-family: var(--mono); font-size: 11px; color: var(--text-2);
  background: linear-gradient(180deg, rgba(var(--wash), 0.09), rgba(var(--wash), 0.03));
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px;
}
.rank {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  font-size: 11px; color: var(--text-2); background: rgba(var(--wash), 0.06); border: 1px solid var(--line);
}

/* Hero */
.hero {
  display: grid; justify-items: center; gap: clamp(48px, 7vw, 88px); text-align: center;
  padding: clamp(72px, 11vw, 150px) 0 clamp(72px, 11vw, 150px);
}
.hero-copy { display: flex; flex-direction: column; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 14px 0 10px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(var(--glass), 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 13px; font-weight: 500;
}
.badge i { width: 1px; height: 12px; background: var(--line-strong); }
.badge-dim { color: var(--text-2); font-weight: 400; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2.4s ease-in-out infinite; }
.hero-title {
  margin-top: 26px; font-size: clamp(44px, 8vw, 96px); line-height: 1; text-shadow: 0 2px 40px rgba(6, 7, 14, 0.5); letter-spacing: -0.045em; font-weight: 600;
}
.hero-title span { display: block; }
.hero-title .grad, .grad { display: inline-block; }
.hero-title .grad { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.grad {
  background: linear-gradient(100deg, #fff 10%, #b4bbff 55%, #7b86f2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { margin-top: 22px; text-shadow: 0 1px 2px rgba(6, 7, 20, 0.5), 0 2px 24px rgba(6, 7, 20, 0.7); font-size: clamp(18px, 2vw, 22px); font-weight: 500; letter-spacing: -0.015em; }
.hero-intro { margin-top: 12px; max-width: 560px; color: #dfe1f5; font-size: 16px; text-shadow: 0 1px 2px rgba(6, 7, 20, 0.55), 0 2px 28px rgba(6, 7, 20, 0.8); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.hero-facts a { display: block; padding: 12px 18px; transition: color 0.15s; }
.hero-facts li:hover { border-color: var(--line-strong); }
.hero-facts li:hover a { color: #fff; }
.hero-facts li {
  padding: 0; border: 1px solid var(--line-strong); border-radius: 12px;
  font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--text); background: rgba(var(--glass), 0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* These sit on the animated backdrop; a live blur behind them is redone every shader frame (costly on weak GPUs).
   A denser tint reads the same. :where() keeps specificity low so the :hover backgrounds still win. */
:where(.backdrop ~ .page) :is(.badge, .btn-ghost, .hero-facts li, .home-card) {
  -webkit-backdrop-filter: none; backdrop-filter: none; background-color: rgba(var(--glass), 0.74);
}

/* Console mockup */
.console { position: relative; width: min(820px, 100%); text-align: left; }
.console::before {
  content: ""; position: absolute; inset: -40px -20px; z-index: -1;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(123, 147, 240, 0.22), transparent 70%);
  filter: blur(20px);
}
.console-window {
  border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, rgba(50, 52, 56, 0.84), rgba(42, 43, 46, 0.92));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 40px 80px -24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(var(--wash), 0.07);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.console-bar {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: rgba(var(--wash), 0.04);
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(var(--wash), 0.14); }
.console-title { flex: 1; text-align: center; font-size: 13px; color: var(--text-3); }
.console-body { display: grid; gap: 10px; padding: 14px; }
.countdown-card {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 18px;
  border: 1px solid rgba(123, 147, 240, 0.28); border-radius: 14px;
  background: linear-gradient(135deg, rgba(123, 147, 240, 0.14), rgba(123, 147, 240, 0.03));
}
.countdown {
  margin-top: 4px; font-size: clamp(34px, 4.4vw, 46px); line-height: 1; font-weight: 500; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.countdown-meta { display: grid; gap: 2px; text-align: right; font-size: 13px; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--wash), 0.05); }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.queue { display: grid; }
.queue-row {
  display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 12px;
  padding: 11px 14px; font-size: 14px;
}
.queue-row + .queue-row { border-top: 1px solid var(--line); }
.queue-row.is-first { background: linear-gradient(90deg, rgba(123, 147, 240, 0.1), transparent); }
.queue-name { font-weight: 500; }
.queue-room { font-size: 13px; color: var(--text-3); }
.setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.setting {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--wash), 0.05); min-width: 0;
}
.setting-text { display: grid; min-width: 0; line-height: 1.3; }
.setting-text b { font-size: 13px; font-weight: 500; }
.setting-text small { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setting-icon {
  display: grid; place-items: center; flex: none; width: 28px; height: 18px; color: var(--green);
}
.setting-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.setting-icon:has(path[d^="M4 6"]) { color: var(--text-2); }
.toggle { position: relative; flex: none; width: 28px; height: 16px; border-radius: 999px; background: rgba(var(--wash), 0.12); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(12px); }
.log {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(20, 21, 23, 0.35);
  font-size: 13px; line-height: 1.8; color: var(--text-2); overflow: hidden;
}
.log p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-ok { color: var(--green); }
/* The console mock sits on a translucent panel over the shader, so --text-3 only reached 3.99:1 here; --text-2 clears 4.5:1 in both themes. */
.log .dim, .console .dim { color: var(--text-2); }

/* Section heads */
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 { margin-top: 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; }
.section-sub { margin-top: 12px; color: var(--text-2); }
.kicker { color: var(--accent); }

/* Steps */
/* PRIME section */
.prime {
  position: relative; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(32px, 5vw, 64px) 0 clamp(64px, 9vw, 112px);
}
.prime::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -80px; width: min(1500px, 150%); height: 860px; transform: translateX(-50%); pointer-events: none;
  background:
    radial-gradient(ellipse 36% 46% at 74% 50%, rgba(123, 147, 240, 0.2), transparent 70%),
    radial-gradient(ellipse 30% 40% at 20% 30%, rgba(80, 190, 255, 0.07), transparent 70%);
}
.prime-copy h2 { margin-top: 12px; font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 600; }
.prime-copy h2 span { display: block; }
.prime-copy h2 span:last-child { color: var(--accent); }
.prime-lede { margin-top: 18px; font-size: clamp(17px, 1.8vw, 20px); font-weight: 500; letter-spacing: -0.015em; }
.prime-intro { margin-top: 10px; max-width: 480px; color: var(--text-2); }
.prime .step-list { display: grid; gap: 0; margin-top: 26px; border-top: 1px solid var(--line); }
.prime .step { display: grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.prime .step-index { padding-top: 3px; font-size: 13px; color: var(--accent); }
.prime .step h3 { font-size: 16px; letter-spacing: -0.015em; font-weight: 600; }
.prime .step p { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.prime .hero-actions { justify-content: flex-start; margin-top: 26px; }
.prime .console { width: 100%; }

/* Bento */
.toolkit { position: relative; padding-bottom: clamp(56px, 8vw, 96px); }
.toolkit::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -120px; width: min(1400px, 140%); height: 700px; transform: translateX(-50%);
  background:
    radial-gradient(ellipse 40% 50% at 20% 40%, rgba(123, 147, 240, 0.14), transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 60%, rgba(255, 99, 99, 0.09), transparent 70%);
  pointer-events: none;
}
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.card {
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--wash), 0.075), rgba(var(--wash), 0.035));
  box-shadow: inset 0 1px 0 rgba(var(--wash), 0.06);
  transition: border-color 0.2s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(123, 147, 240, 0.12), transparent 60%);
}
.card:hover { border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-index { font-size: 11px; color: var(--text-3); }
.card-label { flex: 1; font-size: 11px; letter-spacing: 0.08em; color: var(--text-2); }
.card h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; }
.card p { color: var(--text-2); font-size: 14px; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px;
  font-size: 14px; font-weight: 500; color: var(--text); width: fit-content;
}
.card-link span[aria-hidden] { color: var(--accent); transition: transform 0.15s; }
.card-link:hover span[aria-hidden] { transform: translateX(3px); }
.mini {
  margin-top: auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(20, 21, 23, 0.3);
}

.c-chat { grid-column: span 2; }
.chat-mini { display: grid; gap: 10px; }
.bubble { padding: 10px 12px; border-radius: 10px; background: rgba(var(--wash), 0.05); font-size: 13px; color: var(--text); }
.bubble-user { justify-self: end; background: var(--accent-soft); border: 1px solid rgba(123, 147, 240, 0.28); }
.equation { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(20, 21, 23, 0.4); font-size: 13px; color: #b4c2f7; overflow-x: auto; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 13px; color: var(--text-2);
}
.chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.c-review, .c-write { grid-column: span 2; }
.review-mini { display: grid; gap: 4px; }
.review-topic { font-size: 15px; font-weight: 500; color: var(--text) !important; }
.review-score { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.review-score b { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; }
.review-score span { font-size: 13px; color: var(--text-3); }
.score-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
.score-bar i { height: 5px; border-radius: 3px; background: rgba(var(--wash), 0.1); }
.score-bar i.hit { background: var(--green); }
.write-mini { display: grid; gap: 8px; font-size: 13px; }
.write-mini s { color: var(--text-3); text-decoration-color: rgba(245, 165, 36, 0.8); }
.diff-old { color: var(--text-2) !important; font-size: 13px !important; }
.diff-new { color: var(--text) !important; font-size: 13px !important; padding-top: 8px; border-top: 1px solid var(--line); }
.diff-new::before { content: "→ "; color: var(--green); }

.c-spaces, .c-ide { grid-column: span 3; }
.search-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px;
  font-size: 13px; color: var(--text);
}
.search-row svg { width: 14px; height: 14px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.search-row span { flex: 1; }
.hit-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(var(--wash), 0.04); font-size: 13px; }
.hit-row b { flex: 1; font-weight: 500; }
.file { padding: 2px 6px; border-radius: 5px; background: rgba(245, 90, 90, 0.15); color: #ff8a8a; font-size: 11px; }
.ide-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.blocks { display: grid; gap: 4px; align-content: start; }
.block { padding: 6px 10px; border-radius: 6px; font-size: 13px; font-weight: 500; color: #fff; }
.b1 { background: #2563eb; border-radius: 6px 6px 2px 2px; width: fit-content; }
.b2 { background: #7c3aed; margin-left: 12px; width: fit-content; }
.code { font-size: 13px; line-height: 1.7; color: var(--text-2); padding: 8px 10px; border-radius: 8px; background: rgba(20, 21, 23, 0.35); overflow-x: auto; }
.c-key { color: #ff7ab2; } .c-fn { color: #7bd88f; } .c-num { color: #f5a524; } .c-str { color: #a5d6ff; }
.approval {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(245, 165, 36, 0.3); background: rgba(245, 165, 36, 0.08);
  font-size: 13px; color: #ffd28a;
}
.approval > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.approval i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: none; }
.keys { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }

.c-api { grid-column: span 6; }
.c-api-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; }
.c-api-grid > div { display: flex; flex-direction: column; gap: 10px; }
.api-code { padding: 16px 18px; font-size: 13px; line-height: 1.8; border: 1px solid var(--line); }

/* Family */
/* Overview */
.overview { padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); }
.overview .section-head { max-width: 760px; }
.overview .hero-actions { justify-content: flex-start; }
.overview-links { margin-top: 20px; font-size: 14px; color: var(--text-3); }
.overview-links a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.overview-links a:hover { color: var(--text); }
.overview-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 clamp(24px, 3vw, 36px); padding: 0; list-style: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--wash), 0.03); overflow: hidden;
}
.overview-grid li { padding: 22px 22px 26px; }
.overview-grid li + li { border-left: 1px solid var(--line); }
.overview-index { display: block; margin-bottom: 14px; font-size: 11px; letter-spacing: 0.08em; color: var(--accent); }
.overview-grid h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.overview-grid p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
@media (max-width: 1020px) {
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid li:nth-child(3) { border-left: 0; }
  .overview-grid li:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-grid li + li { border-left: 0; border-top: 1px solid var(--line); }
}

/* Public intro pages (AP CSA practice, Test Study) */
.doc { padding-top: clamp(24px, 4vw, 48px); }
.doc-hero { padding: clamp(24px, 5vw, 56px) 0 clamp(36px, 6vw, 72px); max-width: 860px; }
.doc-hero h1 { margin-top: 12px; font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 600; }
.doc-lede { margin-top: 18px; max-width: 640px; font-size: clamp(16px, 2vw, 19px); color: var(--text-2); }
.doc-hero .hero-actions, .doc-hero .hero-facts { justify-content: flex-start; margin-top: 24px; }
.doc-hero .hero-facts span { display: block; padding: 10px 16px; font-size: 14px; }
.doc-section { padding: 0 0 clamp(40px, 6vw, 72px); }
.doc-section h2 { margin-top: 10px; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 600; }
.doc-section > .step-list, .doc-section > .overview-grid, .doc-section > .doc-two, .doc-section > .doc-text, .doc-section > .faq { margin-top: clamp(20px, 3vw, 32px); }
.doc-text { max-width: 720px; color: var(--text-2); }
.doc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.doc-steps .step { align-items: flex-start; }
.doc-steps p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.doc-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.doc-two h3 { font-size: 19px; font-weight: 600; }
.doc-two p { margin-top: 10px; color: var(--text-2); }
.doc-two code, .faq code { font-family: var(--mono); font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: rgba(var(--wash), 0.07); color: var(--text); }
.doc-note { font-size: 14px; color: var(--text-3) !important; }
.doc-code { font-size: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.unit-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.unit-grid li:nth-child(5n + 1) { border-left: 0; }
.unit-grid li:nth-child(n + 6) { border-top: 1px solid var(--line); }
.unit-grid h3 { font-size: 15px; }
.plain-list { margin-top: 10px; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.plain-list li { padding: 0 !important; border: 0 !important; }
.plain-list a { color: inherit; text-decoration: underline; text-decoration-color: rgba(128, 128, 128, 0.45); text-underline-offset: 3px; }
.plain-list a:hover { color: var(--accent, #2b4fd8); text-decoration-color: currentColor; }
.plain-list .tag { margin-left: 4px; font-size: 11px; padding: 1px 6px; }
.faq { max-width: 760px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq details + details { border-top: 1px solid var(--line); }
/* Flex row (not a float) so the "+" stays on the question's first line when the text wraps on a phone. */
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 500; list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--text-3); font-family: var(--mono); }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { background: rgba(var(--wash), 0.04); }
.faq details p { padding: 0 20px 18px; color: var(--text-2); font-size: 15px; }
@media (max-width: 1020px) {
  .doc-steps { grid-template-columns: 1fr; }
  .doc-two { grid-template-columns: 1fr; }
  .unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit-grid li:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .unit-grid li:nth-child(even) { border-left: 1px solid var(--line); }
  .unit-grid li:nth-child(-n + 2) { border-top: 0; }
}
@media (max-width: 560px) {
  .unit-grid { grid-template-columns: 1fr; }
  .unit-grid li:nth-child(even) { border-left: 0; }
  .unit-grid li:nth-child(2) { border-top: 1px solid var(--line); }
}

.family { padding-bottom: clamp(56px, 8vw, 96px); }
.family-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.family-list a {
  display: grid; grid-template-columns: 36px minmax(120px, 0.6fr) 1fr 20px; align-items: center; gap: 16px;
  padding: 16px 20px; transition: background 0.15s;
}
.family-list a + a { border-top: 1px solid var(--line); }
.family-list a:hover { background: rgba(var(--wash), 0.04); }
.family-code {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; font-size: 11px; color: var(--text-2);
  border: 1px solid var(--line-strong); background: rgba(var(--wash), 0.04);
}
.family-list b { font-weight: 500; }
.family-list em { font-style: normal; color: var(--text-2); font-size: 14px; }
.family-list i { font-style: normal; color: var(--text-3); text-align: right; }

/* Final CTA */
.final-cta {
  position: relative; margin-bottom: clamp(48px, 7vw, 88px); padding: clamp(40px, 7vw, 80px) 24px; text-align: center; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 20px;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(123, 147, 240, 0.22), transparent 70%), rgba(var(--wash), 0.04);
}
.final-cta h2 { font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 600; }
.final-cta .hero-actions { justify-content: center; }

/* Footer */
.site-footer {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px;
  padding: 28px 0 40px; border-top: 1px solid var(--line);
}
.footer-brand { display: grid; gap: 6px; }
.footer-brand p { color: var(--text-3); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 14px; color: var(--text-2); }
/* 40px tall tap targets (the text alone was 18px). */
.site-footer nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; }
.site-footer nav a:hover { color: var(--text); }
.footer-stamp { font-size: 13px; color: var(--text-3); }

/* Motion */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.reveal-1 { animation-delay: 0.02s; } .reveal-2 { animation-delay: 0.08s; } .reveal-3 { animation-delay: 0.15s; } .reveal-4 { animation-delay: 0.22s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .status-dot, .pill-green i { animation: none; }
  * { transition: none !important; }
}

/* Chinese gets slightly looser rhythm */
:lang(zh-CN) .hero-title, :lang(zh-CN) .section-head h2, :lang(zh-CN) .final-cta h2 { letter-spacing: -0.01em; line-height: 1.15; }
:lang(zh-CN) .kicker, :lang(zh-CN) .card-label, :lang(zh-CN) .label { letter-spacing: 0.02em; }

/* Responsive */
@media (max-width: 1020px) {
  .prime { grid-template-columns: 1fr; }
  .prime .console { max-width: 640px; }
  .setting-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-api, .c-chat { grid-column: span 2; }
  .c-review, .c-write { grid-column: span 1; }
  .c-spaces, .c-ide { grid-column: span 2; }
}
@media (max-width: 720px) {
  .bento { grid-template-columns: 1fr; }
  .c-api, .c-chat, .c-review, .c-write, .c-spaces, .c-ide { grid-column: span 1; }
  .c-api-grid, .ide-mini { grid-template-columns: 1fr; }
  .family-list a { grid-template-columns: 32px 1fr 20px; }
  .family-list em { display: none; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  .site-footer nav a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .setting-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .nav-cta { padding: 0 12px; }
}

/* Home */
.nav-quiet { padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--text-2); transition: color 0.15s, background 0.15s; }
.nav-quiet:hover { color: var(--text); background: rgba(var(--wash), 0.06); }
.home { padding: clamp(56px, 10vw, 120px) 0 clamp(56px, 8vw, 96px); text-align: center; }
.home-title { margin: 0; font-size: clamp(40px, 7vw, 72px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.05; }
.home-sub { margin: 14px 0 0; color: var(--text); text-shadow: 0 1px 14px rgba(var(--glass), 0.9); font-size: clamp(15px, 2vw, 18px); }
.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(32px, 6vw, 56px); text-align: left; }
.home-card {
  position: relative; display: grid; grid-template-columns: 36px 1fr auto; grid-template-areas: "code name arrow" "desc desc desc";
  align-items: center; gap: 10px 14px; padding: 20px; min-height: 128px; align-content: start;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(var(--glass), 0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.home-card:hover { transform: translateY(-2px); border-color: rgba(123, 147, 240, 0.55); background: rgba(24, 26, 48, 0.7); }
.home-card .family-code { grid-area: code; }
.home-card b { grid-area: name; font-size: 18px; font-weight: 550; letter-spacing: -0.01em; }
.home-card em { grid-area: desc; font-style: normal; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.home-card i { grid-area: arrow; font-style: normal; color: var(--text-3); transition: color 0.15s, transform 0.15s; }
.home-card:hover i { color: var(--text); transform: translateX(2px); }
.home-last { display: none; position: absolute; top: -9px; right: 14px; padding: 2px 8px; border-radius: 999px; font-size: 11px; letter-spacing: 0.04em; background: var(--accent-fill); color: #fff; }
.home-card.is-last { border-color: rgba(123, 147, 240, 0.6); }
.home-card.is-last .home-last { display: inline-block; }
@media (max-width: 1020px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .home-grid { grid-template-columns: 1fr; gap: 12px; } .home-card { min-height: 0; } }
[data-auth][hidden] { display: none !important; }
.nav-email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-family: var(--mono); color: var(--text-2); }
@media (max-width: 720px) { .nav-hide-sm { display: none; } .nav-actions { gap: 4px; } .nav-quiet { padding: 6px 8px; } }

/* Theme button (sun in dark, moon in light: shows where a click goes) */
.theme-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-control); background: rgba(var(--wash), 0.03); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.theme-button:hover { border-color: var(--line-strong); background: rgba(var(--wash), 0.06); }
.theme-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; }
.theme-button .i-moon { display: none; }
:root[data-theme="light"] .theme-button .i-sun { display: none; }
:root[data-theme="light"] .theme-button .i-moon { display: block; }

/* Light theme: family paper, ink and blue (docs/ui-tokens.md). Dark stays the default without JS. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf9f5;
  --surface: #ffffff;
  --line: rgba(20, 20, 19, 0.1);
  --line-strong: rgba(20, 20, 19, 0.18);
  --text: #141413;
  --text-2: #4f4e4a;
  --text-3: #6b6a65;
  --bar: #f3f1ea;
  --surface-2: #f3f1ea;
  --accent: #2b4fd8;
  --accent-soft: rgba(43, 79, 216, 0.09);
  --accent-fill: #2b4fd8;
  --accent-fill-hover: #2341b5;
  --green: #15803d;
  --green-soft: rgba(21, 128, 61, 0.1);
  --amber: #b45309;
  --coral: #c0392b;
  --wash: 20, 20, 19;
  --glass: 255, 255, 255;
}
:root[data-theme="light"] body { background: linear-gradient(180deg, #f3f1ea 0%, var(--bg) 900px, #f6f5ef 100%); }
:root[data-theme="light"] .skip-link { background: #141413; color: #fff; }

/* Backdrop: pale blue slabs on paper. The shader is told (uLight); this is the still poster. */
:root[data-theme="light"] .backdrop {
  --backdrop-fade: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, 0.8) 54%, rgba(0, 0, 0, 0.52) 66%, rgba(0, 0, 0, 0.27) 78%, rgba(0, 0, 0, 0.1) 89%, transparent 100%);
  background:
    radial-gradient(ellipse 62% 50% at 50% 34%, rgba(250, 249, 245, 0.7), transparent 78%),
    radial-gradient(ellipse 44% 36% at 64% -4%, rgba(43, 79, 216, 0.1), transparent 72%),
    radial-gradient(ellipse 40% 30% at 50% 32%, rgba(98, 118, 232, 0.1), transparent 72%);
}
:root[data-theme="light"] .backdrop::before {
  background:
    radial-gradient(ellipse 46% 36% at 50% 34%, rgba(250, 249, 245, 0.9), transparent 80%),
    repeating-linear-gradient(50deg, transparent 0 70px, rgba(43, 79, 216, 0.2) 70px 135px, transparent 135px 215px);
}
@media (min-width: 900px) {
  :root[data-theme="light"] .backdrop::before {
    background:
      linear-gradient(90deg, rgba(250, 249, 245, 0.85) 0%, rgba(250, 249, 245, 0.55) 35%, transparent 70%),
      radial-gradient(ellipse 46% 36% at 50% 34%, rgba(250, 249, 245, 0.9), transparent 80%),
      repeating-linear-gradient(50deg, transparent 0 70px, rgba(43, 79, 216, 0.2) 70px 135px, transparent 135px 215px);
  }
}
:root[data-theme="light"] .backdrop::after {
  background: linear-gradient(180deg, transparent 48%, rgba(250, 249, 245, 0.3) 62%, rgba(250, 249, 245, 0.64) 77%, rgba(250, 249, 245, 0.9) 91%, var(--bg) 100%);
}

/* Nav and buttons */
:root[data-theme="light"] .site-nav { background: rgba(250, 249, 245, 0.78); }
:root[data-theme="light"] .btn-primary {
  box-shadow: 0 1px 2px rgba(20, 20, 19, 0.12), 0 8px 24px -10px rgba(43, 79, 216, 0.55);
}
:root[data-theme="light"] .btn-primary:hover { box-shadow: 0 1px 2px rgba(20, 20, 19, 0.14), 0 12px 28px -10px rgba(43, 79, 216, 0.65); }
:root[data-theme="light"] .btn-ghost:hover { background: #fff; }
:root[data-theme="light"] .theme-button svg { opacity: 0.85; }

/* Hero: ink on paper, no dark text shadows */
:root[data-theme="light"] .hero-title { text-shadow: 0 0 36px rgba(250, 249, 245, 0.85); }
:root[data-theme="light"] .hero-title .grad { color: var(--text); -webkit-text-fill-color: var(--text); }
:root[data-theme="light"] .grad { background: linear-gradient(100deg, #141413 10%, #2b4fd8 70%, #2341b5 100%); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="light"] .hero-lede { text-shadow: 0 0 24px rgba(250, 249, 245, 0.9); }
:root[data-theme="light"] .hero-intro { color: var(--text-2); text-shadow: 0 0 24px rgba(250, 249, 245, 0.9); }
:root[data-theme="light"] .hero-facts li { color: var(--text); box-shadow: 0 1px 2px rgba(20, 20, 19, 0.04); }
:root[data-theme="light"] .hero-facts li:hover a { color: var(--accent); }
:root[data-theme="light"] .home-sub { color: var(--text-2); text-shadow: 0 0 20px rgba(250, 249, 245, 0.9); }
:root[data-theme="light"] .badge, :root[data-theme="light"] .btn-ghost { box-shadow: 0 1px 2px rgba(20, 20, 19, 0.04); }
:root[data-theme="light"] .pill-green i, :root[data-theme="light"] .status-dot { box-shadow: 0 0 6px rgba(20, 128, 74, 0.45); }

/* Tags, small chips, code colours */
:root[data-theme="light"] .tag-accent { color: #2341b5; border-color: rgba(43, 79, 216, 0.28); }
:root[data-theme="light"] .tag-green, :root[data-theme="light"] .pill-green { border-color: rgba(20, 128, 74, 0.25); }
:root[data-theme="light"] .c-key { color: #c2255c; }
:root[data-theme="light"] .c-fn { color: #1f7a3b; }
:root[data-theme="light"] .c-num { color: #8f4a00; }
:root[data-theme="light"] .c-str { color: #0b62b8; }
:root[data-theme="light"] .file { background: rgba(217, 63, 63, 0.1); color: #b42318; }
:root[data-theme="light"] .pill-green, :root[data-theme="light"] .tag-green { color: #166534; }
:root[data-theme="light"] .approval { border-color: rgba(184, 110, 0, 0.3); background: rgba(184, 110, 0, 0.07); color: #7a4a00; }
:root[data-theme="light"] .block { color: #fff; }
:root[data-theme="light"] .toggle { background: rgba(20, 20, 19, 0.16); }
:root[data-theme="light"] .toggle.on { background: var(--accent); }
:root[data-theme="light"] .write-mini s { text-decoration-color: rgba(184, 110, 0, 0.8); }
:root[data-theme="light"] .score-bar i { background: rgba(20, 20, 19, 0.1); }
:root[data-theme="light"] .score-bar i.hit { background: var(--green); }

/* Surfaces */
:root[data-theme="light"] .mini,
:root[data-theme="light"] .equation,
:root[data-theme="light"] .code,
:root[data-theme="light"] .log { background: rgba(20, 20, 19, 0.035); }
:root[data-theme="light"] .equation { color: var(--accent); }
:root[data-theme="light"] .console-window {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 249, 245, 0.92));
  box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.04), 0 30px 60px -28px rgba(20, 20, 19, 0.28), inset 0 1px 0 #fff;
}
:root[data-theme="light"] .console::before { background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(43, 79, 216, 0.12), transparent 70%); }
:root[data-theme="light"] .dots i { background: rgba(20, 20, 19, 0.16); }
:root[data-theme="light"] .countdown-card { border-color: rgba(43, 79, 216, 0.25); background: linear-gradient(135deg, rgba(43, 79, 216, 0.09), rgba(43, 79, 216, 0.02)); }
:root[data-theme="light"] .panel, :root[data-theme="light"] .setting { background: #fff; }
:root[data-theme="light"] .queue-row.is-first { background: linear-gradient(90deg, rgba(43, 79, 216, 0.07), transparent); }
:root[data-theme="light"] .card { background: #fff; box-shadow: 0 1px 2px rgba(20, 20, 19, 0.04); }
:root[data-theme="light"] .card::before { background: radial-gradient(360px circle at var(--mx) var(--my), rgba(43, 79, 216, 0.07), transparent 60%); }
:root[data-theme="light"] .bubble { background: rgba(20, 20, 19, 0.04); }
:root[data-theme="light"] .bubble-user { border-color: rgba(43, 79, 216, 0.25); }
:root[data-theme="light"] .hit-row { background: rgba(20, 20, 19, 0.035); }
:root[data-theme="light"] .overview-grid, :root[data-theme="light"] .family-list, :root[data-theme="light"] .faq { background: #fff; }
:root[data-theme="light"] .final-cta {
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(43, 79, 216, 0.12), transparent 70%), #fff;
}
:root[data-theme="light"] .prime::before {
  background:
    radial-gradient(ellipse 36% 46% at 74% 50%, rgba(43, 79, 216, 0.09), transparent 70%),
    radial-gradient(ellipse 30% 40% at 20% 30%, rgba(80, 160, 255, 0.07), transparent 70%);
}
:root[data-theme="light"] .toolkit::before {
  background:
    radial-gradient(ellipse 40% 50% at 20% 40%, rgba(43, 79, 216, 0.07), transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 60%, rgba(217, 63, 63, 0.04), transparent 70%);
}
:root[data-theme="light"] .home-card { box-shadow: 0 1px 2px rgba(20, 20, 19, 0.04); }
:root[data-theme="light"] .home-card:hover { border-color: rgba(43, 79, 216, 0.5); background: #fff; }
:root[data-theme="light"] .home-card.is-last { border-color: rgba(43, 79, 216, 0.55); }

/* Quiet tour link under the hero facts */
.hero-tour { margin-top: 22px; font-size: 14px; }
.hero-tour a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: color 0.15s, text-decoration-color 0.15s; }
.hero-tour a:hover { color: var(--text); text-decoration-color: var(--accent); }
:root[data-theme="light"] .hero-tour a { text-shadow: 0 0 18px rgba(250, 249, 245, 0.9); }
:root:not([data-theme="light"]) .hero-tour a { text-shadow: 0 1px 2px rgba(6, 7, 20, 0.55), 0 2px 20px rgba(6, 7, 20, 0.7); }

/* Touch targets: every standalone link on these pages is at least 40px tall (2026-11-04 review). */
.card-link, .hero-tour a, .overview-links a, .site-footer .wordmark { display: inline-flex; align-items: center; min-height: 40px; }

/* AP CSA / Test Study: on wide screens the hero gets a product mock card on the right, in the landing page's
   card + mini-UI style, so the first screen isn't half empty (2026-11-04 review). Phones keep the text only. */
.doc-mock { display: none; }
@media (min-width: 960px) {
  .doc-hero.has-mock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 48px; align-items: center; max-width: none; }
  .doc-mock { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
}
.mock-mini { display: grid; gap: 10px; }
.mock-run { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); }
.mock-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--accent-fill); color: #fff; font-size: 13px; font-weight: 600; }
.mock-tests, .mock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.mock-tests li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(var(--wash), 0.04); color: var(--text); }
.mock-tests li::before { content: "✓"; font-weight: 700; color: var(--green); }
.mock-tests li.bad::before { content: "✗"; color: var(--coral); }
.mock-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(var(--wash), 0.04); }
.mock-list li:first-child { border: 1px solid var(--line-strong); }
.mock-list b { font-weight: 500; color: var(--text); }
.mock-list span { color: var(--text-3); font-size: 12px; white-space: nowrap; }
