/* Sidequark landing — AlterLab-grade dark theme, 100% original.
   System stacks only, no external fonts. All paths relative. */

:root {
  --ground: #0a0a0c;
  --chrome: #101014;
  --ink: #f2f0eb;
  --muted: #a8a29a;
  --faint: #7d7870;
  --surface: #131318;
  --surface-2: #1a1a21;
  --line: rgb(255 255 255 / 0.09);
  --line-soft: rgb(255 255 255 / 0.055);
  --accent: #2e9bd6;
  --accent-2: #a78bfa;
  --accent-warm: #ff8a5c;
  --accent-pink: #f472b6;
  --ok: #34d399;
  --radius-card: 16px;
  --radius-pill: 999px;
  --radius-control: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, sans-serif;
  --font-serif: ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgb(46 155 214 / 0.35); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr, .skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 16px; z-index: 99;
}
.skip:focus { left: 8px; top: 8px; }

/* ambient background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--ground); }
.bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.glow-a { width: 640px; height: 420px; left: 8%; top: -120px; background: radial-gradient(closest-side, rgb(46 155 214 / 0.35), transparent); }
.glow-b { width: 720px; height: 460px; right: -8%; top: 22%; background: radial-gradient(closest-side, rgb(167 139 250 / 0.28), transparent); }
.glow-c { width: 620px; height: 420px; left: -10%; bottom: -140px; background: radial-gradient(closest-side, rgb(255 138 92 / 0.20), transparent); }
.grain {
  position: absolute; inset: 0; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* trial banner */
.banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #0e2417; color: #b7f4d4; font-size: 0.85rem;
  padding: 8px 48px 8px 16px; position: relative; border-bottom: 1px solid rgb(52 211 153 / 0.25);
}
.banner p { margin: 0; }
.banner a { color: #fff; font-weight: 700; }
.banner-x { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font-size: 1.2rem; cursor: pointer; opacity: 0.7; }
.banner-x:hover { opacity: 1; }
.banner[hidden] { display: none; }

/* type */
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0.4em 0 0.35em; font-weight: 750; }
h1 em.accent {
  font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: -0.02em;
  background: linear-gradient(92deg, var(--accent-warm), var(--accent-pink) 45%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.08em;
}
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 0.45em; font-weight: 720; }
.sub { color: var(--muted); max-width: 64ch; margin: 0 0 1.8em; font-size: 1.05rem; }
.micro { color: var(--faint); font-size: 0.86rem; }
.kicker { color: var(--accent); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 0.7em; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.9rem; margin: 0 0 0.4em; }
.eyebrow .rule { display: inline-block; width: 34px; height: 2px; background: var(--accent-warm); border-radius: 2px; }
.block { padding: 84px 24px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(10 10 12 / 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.25s, background 0.25s; }
.nav.scrolled { border-bottom-color: var(--line-soft); background: rgb(10 10 12 / 0.88); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.nav-links { display: flex; gap: 22px; margin-left: 14px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.94rem; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius-control); font-size: 1.2rem; padding: 2px 10px; cursor: pointer; }
.mobile-menu { flex-direction: column; padding: 8px 24px 16px; gap: 4px; }
.mobile-menu[hidden] { display: none !important; }
.mobile-menu:not([hidden]) { display: flex; }
.mobile-menu a { color: var(--muted); text-decoration: none; padding: 10px 0; border-top: 1px solid var(--line-soft); }

/* buttons — pill like AlterLab */
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border-radius: var(--radius-pill); padding: 10px 22px; font-size: 0.95rem; font-weight: 650; border: 1px solid var(--line); transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.btn.solid { background: #f2f0eb; border-color: transparent; color: #111; box-shadow: 0 8px 30px rgb(255 255 255 / 0.08); }
.btn.solid:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgb(255 255 255 / 0.14); }
.btn.ghost { color: var(--ink); background: rgb(255 255 255 / 0.04); }
.btn.ghost:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.16); }
.btn.big { padding: 14px 28px; font-size: 1.02rem; }

/* hero */
.hero { padding-top: 64px; padding-bottom: 40px; text-align: left; }
.lede { color: var(--muted); font-size: 1.18rem; max-width: 62ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.7em 0 0.9em; }

/* playground card */
.play {
  margin: 46px 0 0; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.02));
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgb(0 0 0 / 0.5);
  transition: transform 0.2s ease-out; will-change: transform;
}
.play-head { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2a31; border: 1px solid var(--line); display: block; }
.tabs { display: flex; gap: 8px; }
.tab { background: transparent; border: 1px solid transparent; color: var(--faint); border-radius: var(--radius-pill); padding: 6px 14px; font-size: 0.85rem; cursor: pointer; }
.tab.on { background: rgb(255 255 255 / 0.08); color: var(--ink); border-color: var(--line); }
.nosign { margin-left: auto; color: var(--faint); font-size: 0.8rem; }
.urlbar { display: flex; align-items: center; gap: 10px; margin: 14px; padding: 10px 10px 10px 16px; border-radius: 12px; background: rgb(0 0 0 / 0.45); border: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 0.86rem; }
.urlbar code { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #d8d4cc; }
.caret { width: 8px; height: 18px; background: var(--accent); animation: blink 1.1s steps(1) infinite; border-radius: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.play-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; padding: 0 14px 14px; }
.term-live, .out { background: rgb(0 0 0 / 0.5); border: 1px solid var(--line-soft); border-radius: 12px; padding: 18px; min-height: 220px; }
.term-live pre { margin: 0; font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.9; color: var(--ink); white-space: pre-wrap; }
.term-live .c { color: var(--ok); } .term-live .d { color: var(--faint); }
.term-live .hl { color: #7dd3fc; } .term-live .ok { color: var(--ok); } .term-live .mut { color: var(--faint); }
.out-tabs { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); margin-bottom: 12px; }
.out-tabs .on { background: rgb(255 255 255 / 0.08); color: var(--ink); padding: 4px 10px; border-radius: 7px; }
.ok-right { margin-left: auto; color: var(--ok); }
.out-title { font-family: var(--font-mono); font-size: 0.95rem; margin: 0 0 6px; }
.out-sub { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.stat { background: rgb(255 255 255 / 0.03); border: 1px solid var(--line-soft); border-radius: 14px; padding: 18px; text-align: left; }
.stat strong { display: block; font-size: 1.6rem; letter-spacing: -0.02em; }
.stat > span:last-child { color: var(--muted); font-size: 0.88rem; }

/* trust strip + marquee */
.strip { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: rgb(255 255 255 / 0.015); overflow: hidden; }
.strip .wrap { padding-top: 26px; padding-bottom: 26px; }
.strip-label { color: var(--faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 14px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; color: var(--muted); font-weight: 700; font-size: 1.15rem; white-space: nowrap; width: max-content; animation: scroll 26s linear infinite; }
.marquee-track li { padding-right: 56px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* try / terminal */
.try-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.try-step { background: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015)); border: 1px solid var(--line-soft); border-radius: var(--radius-card); padding: 22px; transition: border-color 0.2s, transform 0.2s; }
.try-step:hover { border-color: rgb(46 155 214 / 0.4); transform: translateY(-2px); }
.try-step code { font-family: var(--font-mono); color: #7dd3fc; font-size: 0.9rem; }
.try-step p { color: var(--muted); margin: 0.6em 0 0; font-size: 0.95rem; }
.term { background: #08080a; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px; overflow-x: auto; box-shadow: 0 20px 60px rgb(0 0 0 / 0.45); }
.term pre { margin: 0; font-family: var(--font-mono); font-size: 0.88rem; line-height: 1.9; color: var(--ink); }
.term .c { color: var(--ok); } .term .d { color: var(--faint); }
.term.tall pre { line-height: 2; }

/* flow bento */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.flow.five { grid-template-columns: repeat(5, 1fr); }
.flow li { background: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015)); border: 1px solid var(--line-soft); border-radius: var(--radius-card); padding: 22px; counter-increment: step; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.flow li:hover { border-color: rgb(167 139 250 / 0.45); transform: translateY(-2px); box-shadow: 0 16px 40px rgb(167 139 250 / 0.12); }
.flow li::before { content: "0" counter(step); font-family: var(--font-mono); color: var(--accent-2); font-size: 0.8rem; }
.flow strong { display: block; margin: 10px 0 6px; font-size: 1.05rem; }
.flow span:last-child { color: var(--muted); font-size: 0.92rem; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-card); padding: 24px; overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(320px 200px at var(--mx, 50%) var(--my, 0%), rgb(46 155 214 / 0.14), transparent 70%); opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.card:hover { border-color: rgb(46 155 214 / 0.4); transform: translateY(-2px); }
.card:hover::after { opacity: 1; }
.card h3 { margin: 0 0 8px; font-size: 1.06rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.card a { color: var(--accent); }
/* ---------- founder note ---------- */
.founder { display: flex; gap: 22px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-card); padding: 26px; }
.founder-photo { position: relative; flex: none; width: 80px; height: 80px; border-radius: 50%; overflow: hidden; background: #1a1a1f; color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; border: 1px solid var(--line); }
.founder-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.founder-note p { color: var(--muted); margin: 0 0 0.9em; }
.founder-note p:first-child { color: var(--ink); font-size: 1.05rem; }
.founder-sign { color: var(--ink) !important; font-weight: 650; }
.founder-sign span { color: var(--faint); font-weight: 400; font-size: 0.88rem; }
@media (max-width: 600px) { .founder { flex-direction: column; } }

/* tables */
.usetable { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; background: rgb(255 255 255 / 0.015); }
.urow { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; padding: 17px 22px; border-top: 1px solid var(--line-soft); }
.urow:first-child { border-top: 0; }
.uhead { background: rgb(255 255 255 / 0.04); font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.urow span:nth-child(2) { color: var(--muted); }
.art { font-family: var(--font-mono); color: var(--ok); }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); background: rgb(255 255 255 / 0.015); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 0.94rem; }
.cmp th, .cmp td { padding: 15px 20px; text-align: left; border-top: 1px solid var(--line-soft); }
.cmp thead th { border-top: 0; background: rgb(255 255 255 / 0.04); font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cmp tbody th { color: var(--ink); }
.cmp td { color: var(--muted); }
.cmp td strong { color: var(--ink); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 30px 26px; position: relative; display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.plan:hover { transform: translateY(-3px); }
.plan.hot { border-color: rgb(46 155 214 / 0.6); background: linear-gradient(180deg, rgb(46 155 214 / 0.12), var(--surface) 55%); box-shadow: 0 24px 70px rgb(46 155 214 / 0.16); }
.plan .flag { position: absolute; top: -13px; left: 26px; background: #f2f0eb; color: #111; font-size: 0.72rem; font-weight: 800; padding: 3px 12px; border-radius: 20px; margin: 0; }
.plan h3 { margin: 0; }
.price { font-size: 2.4rem; font-weight: 780; margin: 0.3em 0 0; letter-spacing: -0.03em; }
.price span { font-size: 1rem; font-weight: 400; color: var(--faint); }
.byok { font-family: var(--font-mono); font-size: 0.8rem; color: #7dd3fc; margin: 0.2em 0 1em; }
.plan ul { list-style: none; margin: 0 0 1.7em; padding: 0; color: var(--muted); font-size: 0.94rem; display: flex; flex-direction: column; gap: 9px; }
.plan ul li::before { content: "✓ "; color: var(--ok); }
.plan .btn { margin-top: auto; text-align: center; justify-content: center; }

/* docs */
.docs-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 8px; }
.doclinks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.doclinks a { display: block; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-card); padding: 17px 19px; color: var(--ink); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.doclinks a:hover { border-color: var(--accent); transform: translateX(2px); }

/* faq */
.faq details { border: 1px solid var(--line-soft); border-radius: var(--radius-card); background: rgb(255 255 255 / 0.02); margin-bottom: 10px; padding: 0; overflow: hidden; transition: border-color 0.2s; }
.faq details[open] { border-color: rgb(46 155 214 / 0.4); }
.faq summary { font-weight: 650; cursor: pointer; padding: 18px 22px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; color: var(--accent); }
.faq p { color: var(--muted); margin: 0; padding: 0 22px 20px; }

/* final cta */
.cta { text-align: center; border-top: 1px solid var(--line-soft); }
.cta .sub { margin-left: auto; margin-right: auto; }
.cta .hero-cta { justify-content: center; }

/* footer */
footer { border-top: 1px solid var(--line-soft); background: rgb(0 0 0 / 0.35); }
.foot { padding-top: 44px; padding-bottom: 44px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; margin: 16px 0; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.foot nav a:hover { color: var(--ink); }
.foot-brand p { color: var(--faint); font-size: 0.9rem; max-width: 48ch; }
.copy { color: var(--faint); font-size: 0.82rem; }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .menu-btn { display: block; }
  .try-grid, .cards, .plans, .docs-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow.five { grid-template-columns: 1fr 1fr; }
  .play-body { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .urow { grid-template-columns: 1fr; gap: 4px; }
  .uhead { display: none; }
  .block { padding: 60px 24px; }
  h1 { letter-spacing: -0.028em; }
}
@media (max-width: 600px) {
  .flow, .flow.five { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .caret { animation: none; }
}

/* ---------- light mode (same tokens, AlterLab-style) ---------- */
[data-theme="light"] {
  --ground: #f6f4ee;
  --chrome: #ffffff;
  --ink: #17150f;
  --muted: #6b675c;
  --faint: #a39d8d;
  --surface: #ffffff;
  --surface-2: #efebe0;
  --line: rgb(23 21 15 / 0.13);
  --line-soft: rgb(23 21 15 / 0.07);
  --accent: #1c7fb8;
  --accent-2: #6d5bd0;
  --accent-warm: #e06428;
  --accent-pink: #d1487f;
  --ok: #178a4c;
}
[data-theme="light"] body { background: var(--ground); color: var(--ink); }
[data-theme="light"] ::selection { background: rgb(28 127 184 / 0.25); }
[data-theme="light"] .bg { opacity: 0.5; }
[data-theme="light"] .grain { opacity: 0.05; }
/* chrome */
[data-theme="light"] .nav { background: rgb(246 244 238 / 0.82); }
[data-theme="light"] .nav.scrolled { background: rgb(246 244 238 / 0.94); }
[data-theme="light"] .nav-links a { color: var(--muted); }
[data-theme="light"] .nav-links a:hover { color: var(--ink); }
[data-theme="light"] .menu-btn { color: var(--ink); border-color: var(--line); }
/* buttons: dark pill becomes the solid, ghost stays subtle */
[data-theme="light"] .btn.solid { background: #17150f; color: #f6f4ee; box-shadow: 0 8px 30px rgb(23 21 15 / 0.16); }
[data-theme="light"] .btn.solid:hover { box-shadow: 0 12px 34px rgb(23 21 15 / 0.22); }
[data-theme="light"] .btn.ghost { background: rgb(23 21 15 / 0.04); }
[data-theme="light"] .btn.ghost:hover { background: rgb(23 21 15 / 0.07); border-color: rgb(23 21 15 / 0.16); }
/* surfaces */
[data-theme="light"] .stat { background: var(--surface); }
[data-theme="light"] .try-step { background: linear-gradient(180deg, #fff, var(--surface-2)); }
[data-theme="light"] .flow li { background: linear-gradient(180deg, #fff, var(--surface-2)); }
[data-theme="light"] .card { background: var(--surface); }
[data-theme="light"] .plan { background: var(--surface); }
[data-theme="light"] .plan .flag { background: #17150f; color: #f6f4ee; }
[data-theme="light"] .plan.hot { box-shadow: 0 24px 70px rgb(28 127 184 / 0.16); }
[data-theme="light"] .docs-grid .doclinks a { background: var(--surface); }
[data-theme="light"] .strip { background: rgb(23 21 15 / 0.02); }
[data-theme="light"] .tablewrap, [data-theme="light"] .usetable { background: var(--surface); }
[data-theme="light"] .uhead { background: rgb(23 21 15 / 0.04); }
[data-theme="light"] .cmp thead th { background: rgb(23 21 15 / 0.04); }
[data-theme="light"] .faq details { background: var(--surface); }
[data-theme="light"] .faq summary::after { color: var(--faint); }
[data-theme="light"] footer { background: rgb(23 21 15 / 0.03); }
/* terminals stay dark screens in both modes */
[data-theme="light"] .play, [data-theme="light"] .term, [data-theme="light"] .demo-log { box-shadow: 0 20px 60px rgb(23 21 15 / 0.25); }
/* demo cards go light */
/* code accents readable on light */
[data-theme="light"] .try-step code, [data-theme="light"] .byok { color: #0e6ea3; }
/* theme toggle */
.theme-btn { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius-control); font-size: 1.05rem; line-height: 1; padding: 5px 10px; cursor: pointer; }
.theme-btn:hover { border-color: var(--accent); }

/* ---------- dashboard demo (fake interactive product tour) ---------- */
.demo { margin: 46px 0 0; border-radius: 18px; overflow: hidden; background: var(--chrome); border: 1px solid var(--line); box-shadow: 0 30px 80px rgb(0 0 0 / 0.5); }
.demo-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.demo-head .brand { pointer-events: none; }
.demo-tabs { display: flex; gap: 8px; margin-left: 8px; }
.demo-body { display: grid; grid-template-columns: 190px 1fr; min-height: 340px; }
.demo-side { border-right: 1px solid var(--line-soft); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.demo-side button { background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: 10px; padding: 9px 12px; font-size: 0.88rem; text-align: left; cursor: pointer; }
.demo-side button.on { background: rgb(255 255 255 / 0.07); color: var(--ink); border-color: var(--line); }
.demo-side button.dim { filter: blur(3px); opacity: 0.55; pointer-events: none; user-select: none; }
/* ---------- demo output previews ---------- */
.shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 12px; background: var(--surface); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a3a41; flex: none; }
.shot-bar span { margin-left: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint); background: rgb(127 127 127 / 0.12); padding: 2px 10px; border-radius: 6px; }
.shot-page { padding: 14px; display: grid; gap: 10px; }
.shot-nav { display: flex; align-items: center; gap: 8px; }
.shot-nav i { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); opacity: 0.85; flex: none; }
.shot-nav b { height: 8px; width: 52px; border-radius: 4px; background: var(--muted); opacity: 0.5; }
.shot-nav b.n2 { width: 38px; }
.shot-nav u { margin-left: auto; height: 16px; width: 64px; border-radius: 8px; background: var(--accent); text-decoration: none; }
.shot-hero b { display: block; height: 14px; border-radius: 4px; background: var(--ink); opacity: 0.85; margin-bottom: 8px; }
.shot-hero b.short { width: 55%; }
.shot-hero u { display: block; height: 22px; width: 110px; border-radius: 11px; background: var(--ink); opacity: 0.9; text-decoration: none; }
.shot-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shot-cards i { height: 64px; border-radius: 8px; background: rgb(127 127 127 / 0.08); border: 1px solid var(--line-soft); display: block; }
.shot-cards i.hot { border-color: rgb(46 155 214 / 0.55); box-shadow: inset 0 0 18px rgb(46 155 214 / 0.18); }
.shot-screen { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(120% 120% at 20% 10%, rgb(46 155 214 / 0.28), transparent 55%), radial-gradient(120% 120% at 85% 90%, rgb(167 139 250 / 0.25), transparent 55%), #0b0b0e; display: flex; align-items: center; justify-content: center; }
.shot-play { width: 54px; height: 54px; border-radius: 50%; background: rgb(242 240 235 / 0.94); color: #111; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.shot-cap { position: absolute; left: 12px; bottom: 34px; font-size: 0.8rem; color: #f2f0eb; text-shadow: 0 1px 8px #000; }
.shot-time { position: absolute; right: 12px; bottom: 12px; font-family: var(--font-mono); font-size: 0.7rem; color: #f2f0eb; background: rgb(0 0 0 / 0.65); padding: 2px 8px; border-radius: 6px; }
.shot-track { height: 4px; background: rgb(255 255 255 / 0.12); }
.shot-track i { display: block; height: 100%; width: 100%; background: var(--accent); }
.shot-list { list-style: none; margin: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.shot-list em { font-style: normal; color: var(--faint); }
.shot-list .ok { color: var(--ok); }
@media (max-width: 600px) { .shot-cards { grid-template-columns: 1fr 1fr; } }
.demo-main { padding: 18px; background: rgb(0 0 0 / 0.30); min-height: 340px; }
.demo-pane { display: none; }
.demo-pane.on { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.demo-ws { border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: rgb(255 255 255 / 0.02); }
.demo-ws h4 { margin: 0 0 4px; font-size: 1rem; }
.demo-ws p { margin: 0; color: var(--muted); font-size: 0.87rem; }
.demo-ws .go { float: right; }
.demo-runline { display: flex; gap: 10px; align-items: center; margin: 4px 0 14px; }
.demo-log { font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.9; background: rgb(0 0 0 / 0.5); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 18px; min-height: 150px; }
.demo-log .mut { color: var(--faint); }
.demo-log .ok { color: var(--ok); }
.demo-log .hl { color: #7dd3fc; }
.demo-log .blinking { display: inline-block; width: 8px; height: 16px; background: var(--accent); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
.demo-brief { border: 1px solid rgb(52 211 153 / 0.35); background: rgb(52 211 153 / 0.06); border-radius: 12px; padding: 14px 18px; margin-top: 12px; }
.demo-brief h4 { margin: 0 0 6px; font-size: 0.95rem; }
.demo-brief p { margin: 0.3em 0; color: var(--muted); font-size: 0.88rem; }
.demo-brief p strong { color: var(--ink); }
@media (max-width: 720px) { .demo-body { grid-template-columns: 1fr; } .demo-side { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line-soft); overflow-x: auto; } }

/* ---------- flowchart (2 workspace lanes, guided highlight) ---------- */
.org { margin: 46px 0 0; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.02)); border: 1px solid var(--line); box-shadow: 0 30px 80px rgb(0 0 0 / 0.5); }
.org-head { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.org-title { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.org-stage { padding: 16px 18px 18px; }
.fllegend { max-width: 1060px; margin: 0 auto 8px; display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; justify-content: center; font-size: 0.84rem; color: var(--muted); }
.fleg { display: inline-flex; align-items: center; gap: 9px; }
.fleg-ic { display: inline-flex; background: #1a1a1f; border-radius: 8px; padding: 3px; flex: none; }
.fleg strong { color: var(--ink); }
.flegsrc { max-width: 1060px; margin: 0 auto 12px; text-align: center; font-size: 0.74rem; color: var(--faint); }
.flegsrc a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.flegsrc a:hover { color: var(--ink); }
.flwrap { max-width: 1060px; margin: 0 auto; overflow-x: auto; }
.flsvg { display: block; width: 100%; min-width: 760px; height: auto; }
.flsvg text { font-family: var(--font-sans); }
.snode { fill: var(--surface); stroke: var(--faint); stroke-width: 2; transition: stroke 0.3s, filter 0.3s; }
.sframe { fill: rgb(255 255 255 / 0.015); stroke: var(--faint); stroke-width: 1.5; stroke-dasharray: 9 7; }
.pframe { fill: none; stroke: var(--faint); stroke-width: 1.25px; }
.swstitle { fill: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.fchipbg { fill: #1a1a1f; }
.sg { opacity: 0.38; transition: opacity 0.35s; }
.sbox { fill: var(--surface); stroke: var(--faint); stroke-width: 2; }
.sg[data-beat], .srail[data-beat] { cursor: pointer; }
.sg[data-beat]:focus-visible, .srail[data-beat]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sg.on { opacity: 1; }
.sg.on .snode { stroke: var(--accent); filter: drop-shadow(0 0 9px rgb(46 155 214 / 0.45)); }
.st { fill: var(--ink); font-size: 17px; font-weight: 650; }
.ss { fill: #b8b3a8; font-size: 13px; }
.slabel { fill: #8f8a80; font-family: var(--font-mono); font-size: 12px; paint-order: stroke; stroke: var(--ground); stroke-width: 4px; }
.se { stroke: var(--faint); stroke-width: 2; fill: none; }
.se.on { stroke: var(--accent); stroke-dasharray: 7 6; animation: se-flow 0.6s linear infinite; filter: drop-shadow(0 0 5px rgb(46 155 214 / 0.6)); }
@keyframes se-flow { to { stroke-dashoffset: -26; } }
.srail { stroke: var(--faint); stroke-width: 1.5; fill: none; opacity: 0.7; cursor: pointer; }
.srail.on { stroke: var(--accent); stroke-dasharray: 7 6; animation: se-flow 0.6s linear infinite; opacity: 1; filter: drop-shadow(0 0 5px rgb(46 155 214 / 0.6)); }
.srail:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fl-arr { fill: #9a958c; }
[data-theme="light"] .org { background: linear-gradient(180deg, #fff, var(--surface-2)); }
[data-theme="light"] .ss { fill: #57534a; }
[data-theme="light"] .slabel { fill: #6b675c; stroke: #f6f4ee; }
@media (prefers-reduced-motion: reduce) {
  .se.on, .srail.on { animation: none; }
}
