/* ==========================================================================
   XDM website — single stylesheet, no framework.
   Tokens first; light theme is default, dark via prefers-color-scheme or [data-theme].
   ========================================================================== */

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --brand: #5b5bf6;
  --brand-2: #3b82f6;
  --brand-3: #22d3ee;
  --accent: #ff4d8d;
  --grad: linear-gradient(120deg, #6c5cff 0%, #3b82f6 50%, #22d3ee 100%);
  --grad-warm: linear-gradient(120deg, #ff4d8d 0%, #8b5cf6 100%);

  --bg: #f6f7fb;
  --bg-alt: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --border: #e3e6ef;
  --text: #151827;
  --text-2: #464c63;
  --muted: #6b7189;
  --link: #4b4ae6;
  --code-bg: #f0f1f8;
  --ok: #12a37a;
  --warn: #c98a06;
  --err: #e5484d;

  --hero-bg: #0a0c18;
  --hero-text: #eef0ff;
  --hero-muted: #a3a8c3;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, .06), 0 2px 8px rgba(20, 24, 40, .05);
  --shadow: 0 8px 30px rgba(20, 24, 40, .08), 0 2px 6px rgba(20, 24, 40, .05);
  --shadow-lg: 0 30px 80px rgba(20, 24, 60, .18);
  --header-h: 68px;
  --container: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d18;
    --bg-alt: #10132a;
    --surface: #131729;
    --surface-2: #171b30;
    --border: #252a44;
    --text: #e9ebf7;
    --text-2: #c2c6dc;
    --muted: #8e93b0;
    --link: #8f8dff;
    --code-bg: #1b2038;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d18;
  --bg-alt: #10132a;
  --surface: #131729;
  --surface-2: #171b30;
  --border: #252a44;
  --text: #e9ebf7;
  --text-2: #c2c6dc;
  --muted: #8e93b0;
  --link: #8f8dff;
  --code-bg: #1b2038;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .86em; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 28px; } }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { color: #fff; background: var(--grad); box-shadow: 0 8px 24px rgba(91, 91, 246, .35); }
.btn-primary:hover { box-shadow: 0 12px 32px rgba(91, 91, 246, .45); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-dark-ghost { color: #fff; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); }
.btn-dark-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-sm { padding: .55em 1.05em; font-size: .92rem; }
.btn-lg { padding: 1em 1.8em; font-size: 1.06rem; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.brand-text span { font-size: .72rem; color: var(--muted); font-weight: 500; letter-spacing: .01em; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .95rem;
  padding: 8px 12px; border-radius: 10px; transition: background .15s, color .15s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--brand); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.nav-toggle { display: none; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-grid; }
  .header-cta { display: none; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 2px;
    padding: 12px 16px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .18s, transform .18s, visibility .18s;
  }
  .main-nav a { padding: 12px 14px; font-size: 1.02rem; }
  .nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 420px) { .brand-text span { display: none; } }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--hero-text); background: var(--hero-bg);
  padding: clamp(56px, 9vw, 110px) 0 0;
  isolation: isolate;
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .55;
}
.hero::before { width: 620px; height: 620px; left: -160px; top: -220px; background: #5b4bff; }
.hero::after { width: 560px; height: 560px; right: -180px; top: 40px; background: #0ea5e9; opacity: .4; }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}
.hero-inner { text-align: center; max-width: 900px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 6vw, 4.3rem); line-height: 1.04; margin-bottom: .35em; }
.grad-text { background: linear-gradient(100deg, #a5b4ff 0%, #67e8f9 50%, #f0abfc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--hero-muted); font-size: clamp(1.05rem, 1.8vw, 1.25rem); max-width: 680px; margin: 0 auto 1.8em; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 22px; color: var(--hero-muted); font-size: .9rem; }
.hero-badges span { display: inline-flex; align-items: center; gap: 6px; }
.hero-badges svg { color: #67e8f9; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; margin-bottom: 22px;
  border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: #dfe3ff; font-size: .88rem; font-weight: 500; text-decoration: none;
}
.pill b { background: var(--grad-warm); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; }
.pill:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.hero-shot { position: relative; margin: clamp(40px, 6vw, 70px) auto 0; max-width: 1120px; }
.hero-shot img { display: block; width: 100%; height: auto; border-radius: 22px 22px 0 0; }
.hero-shot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(to bottom, transparent, var(--hero-bg)); pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section--muted { background: var(--bg-alt); }
.section--tight { padding: clamp(36px, 5vw, 60px) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
.eyebrow--error { color: var(--err); }
.section-title-sm { font-size: 1.35rem; margin-bottom: 20px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { text-align: center; padding: 22px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat strong { display: block; font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 20px; }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid--3, .card-grid--2, .card-grid--4 { grid-template-columns: 1fr; } }
.card {
  position: relative; display: block; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  color: var(--text); text-decoration: none;
}
.card h3 { margin: 0 0 .4em; font-size: 1.1rem; }
.card p { margin: 0; color: var(--text-2); font-size: .97rem; line-height: 1.6; }
.card--link { transition: transform .18s ease, box-shadow .2s ease, border-color .2s; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); text-decoration: none; }
.card--link::after {
  content: "→"; position: absolute; right: 20px; top: 20px; color: var(--muted); transition: transform .18s, color .18s;
}
.card--link:hover::after { transform: translateX(3px); color: var(--brand); }
.card-kicker { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  color: #fff; background: var(--grad); box-shadow: 0 8px 20px rgba(91, 91, 246, .28);
}
.card-icon--warm { background: var(--grad-warm); box-shadow: 0 8px 20px rgba(255, 77, 141, .25); }
.card-icon--teal { background: linear-gradient(120deg, #10b981, #22d3ee); box-shadow: 0 8px 20px rgba(16, 185, 129, .25); }
.card-icon--amber { background: linear-gradient(120deg, #f59e0b, #ef4444); box-shadow: 0 8px 20px rgba(245, 158, 11, .25); }

/* ---------- Feature showcase (alternating rows) ---------- */
.showcase { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.showcase + .showcase { margin-top: clamp(56px, 8vw, 110px); }
.showcase--flip .showcase-media { order: -1; }
.showcase-media img { display: block; width: 100%; height: auto; }
.showcase ul { padding: 0; margin: 18px 0 24px; list-style: none; }
.showcase li { position: relative; padding-left: 30px; margin: 10px 0; color: var(--text-2); }
.showcase li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.3-4.3 1.4-1.4 2.9 2.9 6-6 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.3-4.3 1.4-1.4 2.9 2.9 6-6 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase--flip .showcase-media { order: 0; }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; margin-bottom: 14px;
  font-weight: 800; color: #fff; background: var(--grad);
}
.step p { color: var(--text-2); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px);
  color: #fff; background: radial-gradient(circle at 15% 20%, #6c5cff 0, transparent 50%), radial-gradient(circle at 85% 80%, #0ea5e9 0, transparent 55%), #10122a;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin: 0 0 .3em; }
.cta-band p { color: #c9cdf0; margin: 0; max-width: 560px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden; padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 4vw, 48px);
  background: radial-gradient(900px 300px at 10% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
              radial-gradient(700px 260px at 95% 0%, color-mix(in srgb, var(--brand-3) 14%, transparent), transparent 70%),
              var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { max-width: 880px; }
.page-hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 760px; margin-bottom: 14px; }
.page-hero--center { text-align: center; }
.page-hero--center h1, .page-hero--center .lead { margin-left: auto; margin-right: auto; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--link); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .9rem; margin: 0; }
.error-quote {
  display: inline-block; font-family: var(--mono); font-size: .92rem; color: var(--text);
  background: color-mix(in srgb, var(--err) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--err) 35%, var(--border));
  border-left: 4px solid var(--err); padding: 10px 14px; border-radius: 10px; margin: 0 0 18px; max-width: 760px;
}

/* ---------- Article layout ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding-top: 44px; padding-bottom: 72px; }
.article-aside { position: relative; }
.toc-card, .aside-card { position: sticky; top: calc(var(--header-h) + 20px); }
.aside-card { position: static; margin-top: 22px; }
.toc-card, .aside-card { padding: 18px 18px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.toc-title { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc a, .aside-list a { display: block; color: var(--text-2); text-decoration: none; font-size: .92rem; line-height: 1.4; padding: 6px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.toc a:hover, .aside-list a:hover { background: var(--bg-alt); color: var(--text); }
.toc a.active { color: var(--brand); border-left-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.toc a.lvl-3 { padding-left: 22px; font-size: .87rem; }
.toc-top { display: inline-block; margin-top: 10px; font-size: .85rem; color: var(--muted); text-decoration: none; }
.aside-list { list-style: none; margin: 0; padding: 0; }
.aside-list a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.article-layout--plain { grid-template-columns: minmax(0, 1fr); }
.lead-p { font-size: 1.1rem; }
@media (max-width: 1020px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-aside { display: none; }
}

/* ---------- Prose ---------- */
.prose { min-width: 0; max-width: 760px; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin: 2em 0 .6em; padding-top: .2em; }
.prose > :first-child { margin-top: 0; }
.prose h3 { font-size: 1.22rem; margin: 1.7em 0 .5em; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose ol.steps-list { list-style: none; counter-reset: s; padding: 0; }
.prose ol.steps-list > li { counter-increment: s; position: relative; padding-left: 46px; margin: 18px 0; }
.prose ol.steps-list > li::before {
  content: counter(s); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .88rem; color: #fff; background: var(--grad);
}
.prose code { background: var(--code-bg); padding: .15em .45em; border-radius: 6px; color: var(--text); }
.prose pre { background: #0f1226; color: #e6e8ff; padding: 18px 20px; border-radius: 12px; overflow-x: auto; font-size: .9rem; line-height: 1.55; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose kbd { display: inline-block; padding: .1em .5em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--text); font-size: .82em; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--brand); background: var(--surface); border-radius: 0 12px 12px 0; }
.prose blockquote p:last-child { margin: 0; }
.prose img { border-radius: 12px; }
.prose figure { margin: 1.8em 0; }
.prose figure img { display: block; width: 100%; }
.prose figcaption { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 10px; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 700; color: var(--text); background: var(--surface-2); white-space: nowrap; }
.prose td { color: var(--text-2); }
.ui { font-weight: 600; color: var(--text); background: var(--code-bg); padding: .08em .45em; border-radius: 6px; white-space: nowrap; font-size: .95em; }

/* Callouts */
.callout { margin: 1.8em 0; padding: 18px 20px 4px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.callout > :first-child { margin-top: 0; }
.callout-title { font-size: 1.05rem !important; margin: 0 0 .5em !important; padding: 0 !important; }
.callout--tip { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.callout--warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.callout--note { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.callout--help { margin-top: 3em; background: var(--bg-alt); }

/* Pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.pager-link { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; }
.pager-link span { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.pager-link--next { text-align: right; grid-column: 2; }
.pager-link:hover { border-color: var(--brand); text-decoration: none; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-link--next { grid-column: 1; } }

/* ---------- Hub pages ---------- */
.hub-group + .hub-group { margin-top: clamp(48px, 6vw, 72px); }
.hub-group-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hub-group-head h2 { margin: 0; }
.hub-group-head p { margin: 4px 0 0; color: var(--muted); }
.error-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.error-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--err); margin-top: 8px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 18%, transparent); }
.search-box { position: relative; max-width: 560px; margin: 22px 0 0; }
.page-hero--center .search-box { margin-left: auto; margin-right: auto; }
.search-box input {
  width: 100%; padding: 14px 18px 14px 46px; font: 500 1rem var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.search-box svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.no-results { display: none; color: var(--muted); margin-top: 16px; }

/* ---------- Download page ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-card { display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.dl-card h3 { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; margin-bottom: 6px; }
.dl-card .os-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-alt); color: var(--text); }
.dl-card p { color: var(--muted); font-size: .94rem; }
.dl-card .btn { margin-top: auto; }
.dl-links { list-style: none; padding: 0; margin: 0 0 20px; }
.dl-links li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .95rem; display: flex; justify-content: space-between; gap: 12px; }
.dl-links li:last-child { border-bottom: 0; }
.dl-links span { color: var(--muted); }
.soon-banner {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
  padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg); color: #fff;
  background: radial-gradient(circle at 0% 0%, #6c5cff 0, transparent 55%), radial-gradient(circle at 100% 100%, #0ea5e9 0, transparent 55%), #0f1129;
}
.soon-banner h2 { color: #fff; }
.soon-banner p, .soon-banner li { color: #cfd3f5; }
.soon-banner ul { margin: 0 0 20px; padding-left: 1.2em; }
.soon-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--grad-warm); color: #fff; margin-bottom: 14px; }
.soon-banner img { display: block; width: 100%; height: auto; }
@media (max-width: 860px) { .soon-banner { grid-template-columns: 1fr; } }
.version-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); font-size: .95rem; }
.version-table th, .version-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.version-table th { background: var(--surface-2); font-weight: 700; }
.version-table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.tag--brand { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-list details { border: 1px solid var(--border); background: var(--surface); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.faq-list summary { cursor: pointer; list-style: none; padding: 18px 54px 18px 22px; font-weight: 650; position: relative; color: var(--text); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list .faq-a { padding: 0 22px 8px; color: var(--text-2); }
.faq-list .faq-a p, .faq-list .faq-a li { color: var(--text-2); }

/* ---------- Screenshot frames (CSS effects on top of the processed images) ---------- */
.shot { position: relative; }
.shot img { border-radius: 18px; }
.shot--tilt { perspective: 1600px; }
.shot--tilt img { transform: rotateY(-9deg) rotateX(4deg); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.shot--tilt:hover img { transform: rotateY(-3deg) rotateX(1deg); }
.shot--tilt-left img { transform: rotateY(9deg) rotateX(4deg); }
.shot--tilt-left:hover img { transform: rotateY(3deg) rotateX(1deg); }
@media (prefers-reduced-motion: reduce) { .shot--tilt img, .shot--tilt-left img { transform: none !important; } }

/* ---------- Footer ---------- */
.site-footer { background: #090b16; color: #b5b9d3; padding: 64px 0 28px; margin-top: 0; }
.site-footer a { color: #d7daf0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { color: #fff; }
.site-footer .brand-text span { color: #8d92b3; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-grid h3 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 8px 0; font-size: .94rem; }
.footer-brand p { font-size: .94rem; margin-top: 14px; max-width: 320px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid #1d2140; margin-top: 44px; padding-top: 22px; font-size: .86rem; color: #7d82a3; }
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-lg { margin-top: clamp(40px, 6vw, 64px); }
.muted { color: var(--muted); }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Download hub ---------- */
.os-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 760px; margin: 26px auto 0; }
.os-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .2s; }
.os-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow); text-decoration: none; }
.os-card strong { font-size: 1.1rem; }
.os-card span:last-child { font-size: .85rem; color: var(--muted); }
.os-card-icon { color: var(--brand); margin-bottom: 4px; }
.os-card.is-detected { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
@media (max-width: 560px) { .os-picker { grid-template-columns: 1fr; } .os-card { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 14px 18px; } .os-card span:last-child { margin-left: auto; } .os-card-icon { margin: 0; } }
.detected-card { display: inline-grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center; text-align: left; margin: 8px auto 0; padding: 18px 24px; border-radius: 18px; background: var(--grad); color: #fff; text-decoration: none; box-shadow: 0 14px 34px rgba(91, 91, 246, .35); }
.detected-card:hover { text-decoration: none; transform: translateY(-1px); }
.detected-card .detected-label { grid-column: 1; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.detected-card strong { grid-column: 1; font-size: 1.25rem; }
.detected-card [data-detected-arch] { grid-column: 1; opacity: .9; font-size: .92rem; }
.detected-card .detected-go { grid-column: 2; grid-row: 1 / span 3; font-weight: 700; }
.avail-table td { vertical-align: middle; }
.prose--wide { max-width: 860px; margin: 0 auto; padding: 8px 0 56px; }

/* ---------- Per-OS download panel ---------- */
.dl-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 32px); }
.dl-panel-head h2 { font-size: 1.25rem; margin-bottom: 14px; }
.arch-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.arch-tab { position: relative; flex: 1 1 220px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.arch-tab strong { display: block; font-size: 1.02rem; }
.arch-tab span { display: block; font-size: .85rem; color: var(--muted); }
.arch-tab[aria-selected="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.arch-detected { position: absolute; top: -10px; right: 12px; font-style: normal; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #fff; }
.js .arch-panel { display: none; }
.js .arch-panel.is-active { display: block; }
.arch-panel + .arch-panel { margin-top: 28px; }
.js .arch-panel + .arch-panel { margin-top: 0; }
.arch-panel-title { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.js .arch-panel-title { display: none; }
.rel-block { border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.rel-block--available { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.rel-block--coming-soon { background: var(--surface-2); }
.rel-head h4 { margin: 0 0 4px; font-size: 1.12rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rel-head p { margin: 0 0 12px; color: var(--muted); font-size: .94rem; }
.rel-version { font-weight: 500; color: var(--muted); font-size: .95rem; }
.tag--ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px dashed var(--border); }
.file-info { display: flex; flex-direction: column; min-width: 0; }
.file-kind { font-weight: 650; }
.file-name { font-family: var(--mono); font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.file-distros { font-size: .85rem; color: var(--text-2); }
.arch-note { margin: 6px 0 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); color: var(--text-2); font-size: .94rem; }
.dl-panel-foot { margin: 16px 0 0; font-size: .86rem; color: var(--muted); }

/* ---------- Download started ---------- */
.start-hero { padding-bottom: 36px; }
.start-spinner { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%; border: 5px solid color-mix(in srgb, var(--brand) 20%, transparent); border-top-color: var(--brand); animation: spin 1s linear infinite; }
.start-status.is-done .start-spinner { animation: none; border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5 9.5 17 19 7' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/60% no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .start-spinner { animation: none; } }
.start-fallback { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }

/* ---------- Browser cards & extension pages ---------- */
.browser-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 18px 0; text-align: left; }
.browser-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.browser-card:hover { border-color: var(--bc); transform: translateY(-2px); }
.browser-card.is-yours { border-color: var(--bc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc) 20%, transparent); }
.browser-card-text { display: flex; flex-direction: column; line-height: 1.3; }
.browser-card-text span { font-size: .84rem; color: var(--muted); }
.browser-yours { position: absolute; top: -9px; right: 10px; font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--bc); color: #fff; }
.browser-dot { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--bc); color: #fff; font-weight: 800; font-size: 1.05rem; }
.browser-dot--lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.7rem; box-shadow: 0 12px 30px color-mix(in srgb, var(--bc) 40%, transparent); }
.ext-panel { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; padding: clamp(20px, 3vw, 34px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.ext-panel-main { display: flex; gap: 20px; align-items: flex-start; }
.ext-panel h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: .25em; }
.ext-panel .lead { margin: 0; }
.ext-cta { text-align: center; }
.ext-cta .btn { background: var(--bc); box-shadow: 0 10px 26px color-mix(in srgb, var(--bc) 40%, transparent); }
.ext-cta-note { margin: 10px 0 0; font-size: .82rem; color: var(--muted); max-width: 240px; }
.ext-mismatch { grid-column: 1 / -1; margin: 0; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--text-2); font-size: .94rem; }
@media (max-width: 760px) { .ext-panel { grid-template-columns: 1fr; } .ext-cta { text-align: left; } }
.ext-next { margin-top: 8px; padding: 6px 22px 4px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: box-shadow .3s, border-color .3s; }
.ext-next h2 { margin-top: .8em; }
.ext-next.is-highlighted { border-color: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.page-extension .page-hero { padding-bottom: 36px; }
@media (max-width: 560px) { .browser-dot--lg { width: 48px; height: 48px; font-size: 1.3rem; } .ext-panel-main { gap: 14px; } }
.shot--framed img { border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.welcome-logo { display: block; margin: 0 auto 14px; filter: drop-shadow(0 12px 24px rgba(37, 99, 235, .35)); }

/* GitHub link in the main nav */
.main-nav .nav-github { display: inline-flex; align-items: center; gap: 6px; }
.main-nav .nav-github svg { flex: none; }
.btn svg { flex: none; }
.main-nav a { white-space: nowrap; }
@media (max-width: 1180px) and (min-width: 921px) {
  .brand-text span { display: none; }
  .header-inner { gap: 14px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 9px; font-size: .92rem; }
}

/* ==========================================================================
   Motion. Everything below is decorative and switched off for reduced motion.
   ========================================================================== */
@keyframes drift-a { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(120px, 60px) scale(1.15); } }
@keyframes drift-b { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-140px, 40px) scale(.9); } }
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes rise-big { from { opacity: 0; transform: translateY(70px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes sweep { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(220%) skewX(-20deg); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pulse, #5b5bf6) 45%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
@keyframes spin-border { to { --angle: 360deg; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-6deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* Hero: drifting glows, shimmering headline, staggered entrance, rising screenshot. */
.hero::before { animation: drift-a 18s ease-in-out infinite; }
.hero::after { animation: drift-b 22s ease-in-out infinite; }
.grad-text { background-size: 200% auto; animation: shimmer 6s linear infinite; background-image: linear-gradient(100deg, #a5b4ff 0%, #67e8f9 25%, #f0abfc 50%, #a5b4ff 75%, #67e8f9 100%); }
.hero-inner > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-inner > :nth-child(1) { animation-delay: .05s; }
.hero-inner > :nth-child(2) { animation-delay: .15s; }
.hero-inner > :nth-child(3) { animation-delay: .28s; }
.hero-inner > :nth-child(4) { animation-delay: .4s; }
.hero-inner > :nth-child(5) { animation-delay: .5s; }
.hero-inner > .hero-shot { animation: rise-big 1.1s .55s cubic-bezier(.2, .7, .2, 1) backwards; transition: transform .25s ease-out; }
.hero-shot img { transition: transform .4s ease; }
.hero-shot { transform-style: preserve-3d; will-change: transform; }
.page-hero h1, .page-hero .lead, .page-hero .eyebrow, .page-hero .breadcrumb, .page-hero .search-box,
.page-hero .os-picker, .page-hero .detected-card, .page-hero .browser-cards { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.page-hero .eyebrow { animation-delay: .05s; }
.page-hero h1 { animation-delay: .1s; }
.page-hero .lead { animation-delay: .2s; }
.page-hero .search-box, .page-hero .detected-card { animation-delay: .3s; }
.page-hero .os-picker, .page-hero .browser-cards { animation-delay: .4s; }

/* Primary buttons: a light sweep every few seconds. */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: sweep 4.5s ease-in-out infinite;
}
.header-cta::after { animation-delay: 1.5s; }

/* Cards: cursor-following glow (set by site.js), icon pop on hover. */
.card--link { background-image: radial-gradient(420px circle at var(--mx, -500px) var(--my, -500px), color-mix(in srgb, var(--brand) 11%, transparent), transparent 60%); }
.card--link:hover .card-icon { animation: pop .5s ease; }
.os-card:hover .os-card-icon, .browser-card:hover .browser-dot { animation: pop .5s ease; }

/* Feature cards on the home page: animated gradient border on hover. */
#features .card--link { border: 1px solid transparent; background:
  radial-gradient(420px circle at var(--mx, -500px) var(--my, -500px), color-mix(in srgb, var(--brand) 11%, transparent), transparent 60%) padding-box,
  linear-gradient(var(--surface), var(--surface)) padding-box,
  conic-gradient(from var(--angle), var(--border), var(--border)) border-box; }
#features .card--link:hover { background:
  radial-gradient(420px circle at var(--mx, -500px) var(--my, -500px), color-mix(in srgb, var(--brand) 11%, transparent), transparent 60%) padding-box,
  linear-gradient(var(--surface), var(--surface)) padding-box,
  conic-gradient(from var(--angle), #6c5cff, #22d3ee, #ff4d8d, #6c5cff) border-box;
  animation: spin-border 3s linear infinite; }

/* Staggered reveal: site.js gives each revealed grid item its index. */
.js .reveal { transition-delay: calc(var(--i, 0) * 80ms); }

/* Screenshots float gently. */
.shot--tilt img { animation: float 7s ease-in-out infinite; }
.showcase:nth-of-type(2) .shot--tilt img { animation-delay: -2.3s; }
.showcase:nth-of-type(3) .shot--tilt img { animation-delay: -4.6s; }
.soon-banner .shot img { animation: float 8s ease-in-out infinite; }

/* Stats: count-up handled in site.js; slight pop when they land. */
.stat strong { display: block; transition: transform .3s; }
.stat.counted strong { animation: pop .6s ease; }

/* Attention pulses on the main actions of download and extension pages. */
.page-hero .detected-card { --pulse: #5b5bf6; animation: rise .7s .3s both, pulse-ring 2.4s 1.2s ease-out infinite; }
.ext-cta .btn { --pulse: var(--bc); animation: pulse-ring 2.4s 1s ease-out infinite; }
.arch-panel.is-active { animation: fade-in .35s ease both; }
.file-row { transition: background-color .2s; border-radius: 10px; }
.file-row:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }

/* Reading progress bar on articles. */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--grad); pointer-events: none; }

/* Header gains a shadow once the page scrolls. */
.site-header { transition: box-shadow .25s, background-color .25s; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(10, 12, 30, .12); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .read-progress { display: none; }
}

/* ---------- Lightweight band (home) ---------- */
.light-band { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
  padding: clamp(28px, 4vw, 52px); border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: radial-gradient(600px 300px at 100% 0%, color-mix(in srgb, var(--brand-3) 14%, transparent), transparent 70%),
              radial-gradient(500px 260px at 0% 100%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%), var(--surface); }
.light-copy h2 { margin-bottom: .45em; }
.light-copy p { color: var(--text-2); }
.light-points { list-style: none; padding: 0; margin: 18px 0 0; }
.light-points li { position: relative; padding-left: 28px; margin: 10px 0; color: var(--text-2); }
.light-points li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 4px; background: var(--grad); }
.light-meter { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.meter-ring { position: relative; width: min(240px, 60vw); aspect-ratio: 1; }
.meter-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.meter-track { fill: none; stroke: var(--bg-alt); stroke-width: 10; }
.meter-fill { fill: none; stroke: var(--brand-2); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.6s cubic-bezier(.2, .7, .2, 1); }
.light-band.in .meter-fill, .no-js .meter-fill { stroke-dashoffset: 290; }
.meter-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.meter-label strong { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.meter-label span { color: var(--muted); font-size: .9rem; }
.meter-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.meter-tags span { font-size: .8rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
@media (max-width: 860px) { .light-band { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .meter-fill { stroke-dashoffset: 290; } }
.stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.stat span { display: block; line-height: 1.4; }
