/* Revana: one stylesheet for every page. Light first; dark via [data-theme="dark"] (system default, remembered toggle). */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eef2f7;
  --border: rgba(15, 23, 42, 0.085);
  --border-strong: rgba(15, 23, 42, 0.15);
  --text: #0f172a;
  --text-2: #334155;
  --muted: #5b6577;
  --faint: #8792a4;
  /* The palette: one colour each for makers, charts, feature icons and kinds. */
  --c-blue: #2563eb;
  --c-green: #059669;
  --c-amber: #d97706;
  --c-rose: #e11d48;
  --c-violet: #7c3aed;
  --c-cyan: #0891b2;
  --c-orange: #ea580c;
  --c-lime: #65a30d;
  --accent: var(--c-blue);
  --accent-strong: #1d4ed8;
  --accent-2: var(--c-green);
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-2-soft: rgba(5, 150, 105, 0.09);
  --on-accent: #ffffff;
  --ok: #059669;
  --bad: #e11d48;
  --warn: #b45309;
  --code-bg: #0d1117;
  --code-text: #e2e8f0;
  --tok-key: #7dd3fc;
  --tok-str: #86efac;
  --tok-num: #fcd34d;
  --tok-com: #64748b;
  --tok-kw: #f9a8d4;
  --grid-line: rgba(15, 23, 42, 0.04);
  --glow: 0 0 0 1px rgba(37, 99, 235, 0.16), 0 18px 44px -22px rgba(37, 99, 235, 0.32);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 32px -22px rgba(15, 23, 42, 0.2);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1200px;
  --gutter: 16px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c10;
  --bg-2: #0e1116;
  --surface: #11151b;
  --surface-2: #171c23;
  --surface-3: #1f252e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #eef1f5;
  --text-2: #c9cfd8;
  --muted: #8e97a6;
  --faint: #667080;
  --c-blue: #60a5fa;
  --c-green: #34d399;
  --c-amber: #fbbf24;
  --c-rose: #fb7185;
  --c-violet: #a78bfa;
  --c-cyan: #22d3ee;
  --c-orange: #fb923c;
  --c-lime: #a3e635;
  --accent-strong: #93c5fd;
  --accent-soft: rgba(96, 165, 250, 0.13);
  --accent-2-soft: rgba(52, 211, 153, 0.12);
  --on-accent: #0a0c10;
  --ok: #34d399;
  --bad: #fb7185;
  --warn: #fbbf24;
  --code-bg: #0b0e13;
  --grid-line: rgba(255, 255, 255, 0.035);
  --glow: 0 0 0 1px rgba(96, 165, 250, 0.22), 0 20px 56px -22px rgba(96, 165, 250, 0.35);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
code, pre, kbd { font-family: var(--mono); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.025em; line-height: 1.1; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark .bm-tile { fill: var(--text); } .brand-mark .bm-r { stroke: var(--bg); } .brand-mark .bm-dot { fill: var(--c-amber); }
.nav-links { display: flex; gap: 2px; margin-left: 8px; }
.nav-links a {
  padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px; width: 240px;
  height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--faint); transition: border-color .15s;
}
.nav-search:focus-within { border-color: var(--accent); }
.nav-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; color: var(--text); }
.nav-search input::placeholder { color: var(--faint); }
.nav-search kbd { font-size: 11px; padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--faint); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--muted);
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu-btn { display: none; }
.mobile-menu { display: none; }

@media (max-width: 960px) {
  .nav-search { display: none; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 760px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .menu-btn { display: inline-grid; }
  .mobile-menu[data-open="true"] {
    display: grid; gap: 2px; padding: 8px var(--gutter) 16px; border-top: 1px solid var(--border);
  }
  .mobile-menu a { padding: 11px 4px; color: var(--text-2); font-weight: 500; border-bottom: 1px solid var(--border); }
  .mobile-menu a:last-child { border-bottom: 0; }
}
@media (max-width: 380px) { .nav-actions .btn-primary { padding: 0 11px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 15px; border-radius: 10px; font-size: 14px; font-weight: 550;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--text) 84%, var(--c-blue)); box-shadow: var(--glow); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; }

/* ---------- common bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 550;
  color: var(--text-2); padding: 5px 12px 5px 6px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface);
}
.eyebrow .dot { width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; background: var(--accent-2-soft); }
.eyebrow .dot::after { content: ""; width: 6px; height: 6px; border-radius: 9px; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); }
.section-head p { color: var(--muted); max-width: 560px; margin-top: 10px; }
.kicker { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 14px; }
.grad-text {
  background: linear-gradient(100deg, var(--accent-strong) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px;
  font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); white-space: nowrap;
}
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
}
.badge-video { color: var(--accent-strong); background: var(--accent-soft); }
.badge-image { color: var(--accent-2); background: var(--accent-2-soft); }
.badge-sample { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13.5px;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  background: color-mix(in srgb, var(--warn) 8%, transparent); color: var(--text-2);
}
.notice strong { color: var(--text); }

/* ---------- hero (centered, OpenRouter-style) ---------- */
.hero { position: relative; padding: 76px 0 40px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -220px; width: min(1200px, 160vw); height: 640px; transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 22% 45%, color-mix(in srgb, var(--c-blue) 20%, transparent), transparent 70%),
    radial-gradient(closest-side at 45% 30%, color-mix(in srgb, var(--c-green) 15%, transparent), transparent 70%),
    radial-gradient(closest-side at 65% 50%, color-mix(in srgb, var(--c-amber) 16%, transparent), transparent 70%),
    radial-gradient(closest-side at 82% 35%, color-mix(in srgb, var(--c-rose) 15%, transparent), transparent 70%);
  filter: blur(18px); pointer-events: none;
}
.hero-c { text-align: center; }
.hero h1 { font-size: clamp(38px, 7vw, 76px); font-weight: 650; letter-spacing: -0.045em; line-height: 1.02; margin: 22px auto 20px; max-width: 920px; }
.hero-lede { font-size: clamp(16px, 1.8vw, 19px); color: var(--muted); max-width: 600px; line-height: 1.55; margin: 0 auto; }
.hero-cta { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.announce {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--text-2); border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 80%, transparent); transition: border-color .15s;
}
.announce:hover { border-color: var(--border-strong); }
.announce .tag { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #fff; background: linear-gradient(90deg, var(--c-blue), var(--c-green)); }
.announce svg { width: 14px; height: 14px; color: var(--faint); }
.hero-box {
  margin: 34px auto 0; display: flex; align-items: center; gap: 12px; max-width: 660px; height: 60px; padding: 0 8px 0 20px;
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s; text-align: left;
}
.hero-box:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.hero-box > svg { width: 19px; height: 19px; color: var(--faint); flex: none; }
.hero-box input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; }
.hero-box input::placeholder { color: var(--faint); }
.hero-box .go { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; display: grid; place-items: center; cursor: pointer; background: var(--text); color: var(--bg); }
.hero-box .go svg { width: 18px; height: 18px; }
.hero-chips { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hero-chips .chip { height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface); }
.hero-chips .chip:hover { color: var(--text); border-color: var(--border-strong); }
.logo-cloud { margin: 48px auto 0; max-width: 980px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.logo-cloud a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; color: var(--muted); transition: color .15s; }
.logo-cloud a:hover { color: var(--text); }
.logo-cloud .maker-logo { width: 26px; height: 26px; border-radius: 7px; }
@media (max-width: 600px) {
  .hero { padding: 52px 0 28px; }
  .hero-box { height: 54px; padding-left: 14px; }
  .hero-box .go { width: 40px; height: 40px; }
  .logo-cloud { gap: 10px 16px; margin-top: 36px; }
  .logo-cloud a { font-size: 13px; }
}

/* router visual */
.router {
  position: relative; padding: 18px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow), var(--glow);
}
.router-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.router-top .dots { display: flex; gap: 6px; }
.router-top .dots i { width: 10px; height: 10px; border-radius: 9px; background: var(--surface-3); }
.router-top .label { font: 500 12px var(--mono); color: var(--faint); }
.req {
  font: 13px/1.6 var(--mono); padding: 14px 16px; border-radius: 12px; background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--border); overflow: hidden; white-space: pre; min-height: 132px;
}
.req .k { color: var(--tok-key); } .req .s { color: var(--tok-str); } .req .n { color: var(--tok-num); } .req .c { color: var(--tok-com); }
.flow { position: relative; display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.flow-hub {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(100deg, var(--accent-soft), var(--accent-2-soft)); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-2);
}
.flow-hub b { color: var(--text); font-weight: 600; }
.flow-hub .spin { width: 16px; height: 16px; border-radius: 99px; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 1s linear infinite; flex: none; }
.flow-hub.done .spin { animation: none; border-color: var(--ok); background: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }
.route {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13px; transition: border-color .3s, background .3s, opacity .3s;
}
.route .rn { font: 500 11px var(--mono); color: var(--faint); width: 54px; }
.route .bar { height: 4px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.route .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1.1s cubic-bezier(.4,0,.2,1); }
.route .rp { font: 500 12.5px var(--mono); color: var(--text-2); }
.route .st { font: 500 11px var(--mono); width: 70px; text-align: right; color: var(--faint); }
.route[data-state="trying"] { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.route[data-state="trying"] .bar i { width: 70%; }
.route[data-state="failed"] { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.route[data-state="failed"] .bar i { width: 100%; background: var(--bad); opacity: .6; }
.route[data-state="failed"] .st { color: var(--bad); }
.route[data-state="ok"] { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--surface-2)); }
.route[data-state="ok"] .bar i { width: 100%; background: var(--ok); }
.route[data-state="ok"] .st { color: var(--ok); }
.route[data-state="skipped"] { opacity: .45; }
.bill {
  margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-strong); font-size: 13px; color: var(--muted);
}
.bill b { font: 600 15px var(--mono); color: var(--text); }
.bill .ok { color: var(--ok); }
@media (max-width: 480px) {
  .router { padding: 12px; }
  .req { font-size: 11.5px; padding: 12px; min-height: 120px; }
  .route { grid-template-columns: auto 1fr auto; gap: 10px; padding: 9px 11px; }
  .route .bar { display: none; }
  .route .rn { width: auto; }
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { padding: 24px 24px 22px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat .v { font: 600 clamp(26px, 3.2vw, 34px)/1 var(--font); letter-spacing: -0.03em; }
.stat .l { margin-top: 10px; color: var(--muted); font-size: 13.5px; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 18px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- featured strip ---------- */
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin;
}
@media (min-width: 1100px) { .strip { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; } }
.mcard {
  scroll-snap-align: start; position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s, transform .2s, box-shadow .2s; min-height: 200px; overflow: hidden;
}
.mcard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 45%);
}
.mcard:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.mcard:hover::before { opacity: 1; }
.mcard .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mcard .maker { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.mcard h3 { font-size: 19px; }
.mcard .desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard .foot { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.price-from { font-size: 12px; color: var(--faint); }
.price-from b { display: block; font: 600 17px var(--mono); color: var(--text); letter-spacing: -0.01em; margin-top: 2px; }
.price-from b small { font: 500 12px var(--font); color: var(--muted); margin-left: 3px; }
.routes-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.routes-pill .pips { display: inline-flex; gap: 3px; }
.routes-pill .pips i { width: 6px; height: 12px; border-radius: 2px; background: var(--accent-2); opacity: .9; }
.routes-pill .pips i:nth-child(2) { background: var(--c-blue); } .routes-pill .pips i:nth-child(3) { background: var(--c-amber); }
.routes-pill .pips i:nth-child(4) { background: var(--c-rose); } .routes-pill .pips i:nth-child(5) { background: var(--c-violet); } .routes-pill .pips i:nth-child(6) { background: var(--c-cyan); }
.maker-logo {
  width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; flex: none;
  font: 700 10.5px var(--font); color: #fff; letter-spacing: 0;
}
.maker-logo.has-logo { background: var(--surface); border: 1px solid var(--border); }
.maker-logo img { width: 72%; height: 72%; }
/* Single-colour marks are drawn as a mask so they follow the theme's text colour. */
.maker-logo i { width: 70%; height: 70%; background: var(--text); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step; }
.step { padding: 24px; position: relative; overflow: hidden; }
.step .num {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font: 600 14px var(--mono);
  background: var(--accent-soft); color: var(--accent-strong); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.step h3 { font-size: 18px; margin: 18px 0 8px; }
.step p { color: var(--muted); font-size: 14px; }
.step .mini { margin-top: 18px; font: 12.5px/1.5 var(--mono); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); overflow-x: auto; white-space: nowrap; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--surface); padding: 26px; }
.feature .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-strong); }
.feature .ic svg { width: 18px; height: 18px; }
.feature h3 { font-size: 16px; margin: 16px 0 6px; letter-spacing: -0.01em; }
.feature p { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } .feature { padding: 22px 18px; } }

/* ---------- code block / tabs ---------- */
.code-split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .code-split { grid-template-columns: 1fr; gap: 28px; } }
.code-split ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.code-split li { display: flex; gap: 12px; color: var(--text-2); font-size: 14.5px; }
.code-split li svg { width: 18px; height: 18px; color: var(--accent-2); flex: none; margin-top: 3px; }
.codebox { border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--code-bg); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.codebox-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 8px; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.02); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 30px; padding: 0 12px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  font: 500 13px var(--font); color: #94a3b8; white-space: nowrap;
}
.tab:hover { color: #e6e6f0; }
.tab[aria-selected="true"] { color: #f2f2f8; background: rgba(255,255,255,.08); }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1); background: transparent; color: #a8a8bf; cursor: pointer; font-size: 12.5px; flex: none;
}
.copy-btn:hover { color: #fff; border-color: rgba(255,255,255,.2); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.copied { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.codebox pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 13px; line-height: 1.65; color: var(--code-text); tab-size: 2; }
.codebox pre code { font-family: var(--mono); }
.tok-k { color: var(--tok-key); } .tok-s { color: var(--tok-str); } .tok-n { color: var(--tok-num); } .tok-c { color: var(--tok-com); font-style: italic; } .tok-w { color: var(--tok-kw); }
@media (max-width: 480px) { .codebox pre { font-size: 12px; padding: 14px; } }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; padding: 56px 40px; border-radius: 22px; text-align: center;
  border: 1px solid var(--border-strong); background: var(--surface); isolation: isolate;
}
.cta-band::before {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background: conic-gradient(from 180deg at 50% 50%, transparent, color-mix(in srgb, var(--c-blue) 12%, transparent), color-mix(in srgb, var(--c-green) 12%, transparent), color-mix(in srgb, var(--c-amber) 12%, transparent), transparent 70%);
  animation: rotate 18s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.04em; }
.cta-band p { color: var(--muted); margin: 14px auto 26px; max-width: 520px; }
.cta-band .hero-cta { justify-content: center; margin: 0; }
@media (max-width: 600px) { .cta-band { padding: 40px 20px; } }

/* ---------- landing sections ---------- */
.section-head.center { justify-content: center; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 550; color: var(--accent); }
.link-arrow svg { width: 15px; height: 15px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }
.kicker[style*="--c"] { color: var(--c); }

.fm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fm-grid .skeleton { min-height: 190px; border-radius: var(--radius); }
.fm {
  display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); transition: border-color .2s, transform .2s, box-shadow .2s; min-width: 0;
}
.fm:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.fm-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fm-top .maker-logo { width: 40px; height: 40px; border-radius: 11px; font-size: 15px; }
.fm-top h3 { font-size: 17px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-top small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.fm-top .badge { margin-left: auto; }
.fm .desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fm-stats { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); padding-top: 14px; }
.fm-stats div + div { border-left: 1px solid var(--border); padding-left: 12px; }
.fm-stats b { display: block; font: 600 15px var(--mono); letter-spacing: -0.01em; }
.fm-stats span { font-size: 12px; color: var(--faint); }
@media (max-width: 960px) { .fm-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .fm-grid { grid-template-columns: 1fr; } }

.bigstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.bigstats div { padding: 18px 8px; }
.bigstats b { display: block; font: 650 clamp(32px, 4.6vw, 52px)/1 var(--font); letter-spacing: -0.04em; }
.bigstats b::after { content: ""; display: block; width: 28px; height: 4px; border-radius: 4px; margin: 14px auto 0; background: var(--c); }
.bigstats span { display: block; margin-top: 12px; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .bigstats { grid-template-columns: 1fr 1fr; } }

.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.s3 { display: block; padding: 18px 18px 24px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); transition: border-color .2s, transform .2s; }
.s3:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); transform: translateY(-2px); }
.s3 .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; margin-top: 20px; font: 600 13px var(--mono); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.s3 h3 { font-size: 19px; margin: 12px 0 6px; }
.s3 p { color: var(--muted); font-size: 14px; }
.ill {
  height: 150px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%), var(--surface-2);
  border: 1px solid var(--border); overflow: hidden;
}
.ill-signup .g-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); font-size: 14px; font-weight: 550; box-shadow: var(--shadow); }
.ill-signup .g-btn svg { width: 18px; height: 18px; }
.ill-signup .e-row { font-size: 12.5px; color: var(--faint); }
.ill-credits { flex-direction: row; flex-wrap: wrap; align-content: center; gap: 8px; }
.ill-credits span { padding: 6px 12px; border-radius: 9px; font: 600 13px var(--mono); background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.ill-credits span.on { border-color: var(--c); color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 15%, transparent); }
.ill-key code { padding: 10px 14px; border-radius: 10px; font-size: 13px; background: var(--code-bg); color: var(--code-text); max-width: 100%; overflow: hidden; white-space: nowrap; }
.ill-key .copied { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--c); }
.ill-key .copied svg { width: 14px; height: 14px; }
@media (max-width: 860px) { .steps3 { grid-template-columns: 1fr; } }

.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rank, .share { padding: 20px; min-width: 0; }
.share { margin-top: 14px; }
.rank-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.rank-head h3 { font-size: 16px; letter-spacing: -0.01em; }
.rank-head span { font-size: 12.5px; color: var(--faint); }
.rank ol { list-style: none; margin: 0; padding: 0; }
.rank li a { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--border); border-radius: 8px; transition: background .15s; }
.rank li:first-child a { border-top: 0; }
.rank li a:hover { background: var(--surface-2); }
.rank .rn { font: 500 12.5px var(--mono); color: var(--faint); text-align: right; }
.rank .nm { min-width: 0; }
.rank .nm b { display: block; font-size: 14.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .nm small { font-size: 12.5px; color: var(--muted); }
.rank .pr { font: 600 14px var(--mono); }
.share-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; gap: 2px; margin: 6px 0 16px; }
.share-bar i { display: block; height: 100%; min-width: 4px; }
.share-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.share-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.share-legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.share-legend em { font: 500 12.5px var(--mono); font-style: normal; color: var(--faint); }
@media (max-width: 860px) { .rank-grid { grid-template-columns: 1fr; } }

.avail { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.avail h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; color: var(--text-2); font-size: 14.5px; }
.ticks li svg { width: 18px; height: 18px; color: var(--c-green); flex: none; margin-top: 3px; }
@media (max-width: 900px) { .avail { grid-template-columns: 1fr; gap: 28px; } }

.feat4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.f4 { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.f4 .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.f4 .ic svg { width: 20px; height: 20px; }
.f4 h3 { font-size: 16px; margin: 18px 0 6px; letter-spacing: -0.01em; }
.f4 p { color: var(--muted); font-size: 14px; }
@media (max-width: 960px) { .feat4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feat4 { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 40px; margin-top: 40px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 13px; color: var(--text); margin-bottom: 12px; letter-spacing: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--text); }
.footer-grid .blurb { max-width: 320px; margin-top: 12px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- page header (inner pages) ---------- */
.page-head { padding: 56px 0 28px; position: relative; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 48px); letter-spacing: -0.04em; }
.page-head p { color: var(--muted); margin-top: 12px; max-width: 640px; font-size: 16px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--faint); margin-bottom: 16px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }

/* ---------- models directory ---------- */
.dir { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding-bottom: 40px; }
.filters { position: sticky; top: 84px; align-self: start; display: grid; gap: 22px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 4px; }
.fgroup h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { height: 30px; border: 0; background: none; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.25); border: 1px solid var(--border); }
.checks { display: grid; gap: 2px; }
.check {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--text-2); user-select: none;
}
.check:hover { background: var(--surface-2); }
.check input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; flex: none; cursor: pointer; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 8px; height: 5px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check .cnt { margin-left: auto; font: 12px var(--mono); color: var(--faint); }
.dir-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.searchbox {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface); transition: border-color .15s;
}
.searchbox:focus-within { border-color: var(--accent); }
.searchbox svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 14.5px; }
.select {
  height: 42px; padding: 0 34px 0 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; color: var(--text); appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select option { background: var(--surface); color: var(--text); }
.dir-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin-bottom: 10px; flex-wrap: wrap; }
.clear-btn { border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 13px; padding: 0; }
.mlist { display: grid; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.mrow {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 20px; padding: 18px 20px; border-top: 1px solid var(--border);
  transition: background .15s; position: relative;
}
.mrow:first-child { border-top: 0; }
.mrow:hover { background: var(--surface-2); }
.mrow .title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mrow h3 { font-size: 16px; letter-spacing: -0.01em; }
.mrow h3 a::after { content: ""; position: absolute; inset: 0; }
.mrow .id { font: 12.5px var(--mono); color: var(--faint); }
.mrow .desc { color: var(--muted); font-size: 13.5px; margin-top: 6px; max-width: 720px; }
.mrow .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mrow .meta .sep { color: var(--faint); font-size: 12px; align-self: center; }
.mrow .side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mrow .side .price-from b { font-size: 16px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.filters-toggle { display: none; }
@media (max-width: 860px) {
  .dir { grid-template-columns: 1fr; gap: 0; }
  .filters { position: static; max-height: none; overflow: visible; display: none; padding: 16px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .filters[data-open="true"] { display: grid; }
  .filters-toggle { display: inline-flex; height: 42px; border-radius: 11px; }
  .mrow { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .mrow .side { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
}

/* ---------- model page ---------- */
.mhead { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.mhead .left { min-width: 0; }
.mhead .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.idcopy {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); font: 13px var(--mono); color: var(--text-2); cursor: pointer;
}
.idcopy:hover { border-color: var(--border-strong); }
.idcopy svg { width: 14px; height: 14px; color: var(--faint); }
.mgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding: 28px 0 40px; }
.mgrid > * { min-width: 0; }
.panel { padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel h2 small { font: 500 12px var(--font); color: var(--faint); letter-spacing: 0; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 0; font-size: 14px; }
.kv > div { padding: 11px 0; border-top: 1px solid var(--border); }
.kv > div:nth-child(-n+2) { border-top: 0; }
.kv .k { color: var(--muted); }
.kv .v { display: flex; gap: 6px; flex-wrap: wrap; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 0 12px 10px 0; }
.ptable td { padding: 12px 12px 12px 0; border-top: 1px solid var(--border); }
.ptable td.p, .ptable th.p { text-align: right; padding-right: 0; }
.ptable td.p { font: 500 14px var(--mono); }
.ptable .lowest { color: var(--ok); font: 500 11px var(--mono); margin-left: 6px; }
.ptable-wrap { overflow-x: auto; }
.route-viz { display: grid; gap: 8px; margin-top: 4px; }
.route-viz .r { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.route-viz .r b { font: 500 12px var(--mono); color: var(--text-2); }
.route-viz .r span { color: var(--muted); margin-left: auto; font-size: 12.5px; }
.route-viz .r i { width: 8px; height: 8px; border-radius: 9px; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.est { display: grid; gap: 12px; }
.est label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.est .select { height: 38px; width: 100%; }
.est-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 4px; }
.est-total b { font: 600 24px var(--mono); letter-spacing: -0.02em; }
.est-total span { color: var(--muted); font-size: 13px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.switch input { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; cursor: pointer; margin: 0; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 20px; background: var(--text); transition: transform .2s; }
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(16px); background: #fff; }
.sticky-col { position: sticky; top: 84px; }
.related { display: grid; gap: 8px; }
.related a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); font-size: 13.5px; transition: border-color .15s, background .15s; }
.related a:hover { border-color: var(--border-strong); background: var(--surface-2); }
.related a span { color: var(--muted); font: 12.5px var(--mono); white-space: nowrap; }
@media (max-width: 980px) {
  .mgrid { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
}
@media (max-width: 520px) {
  .panel { padding: 18px 16px; }
  .kv { grid-template-columns: 110px 1fr; }
}

/* ---------- pricing ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.principle { padding: 24px; }
.principle .big { font: 600 30px/1 var(--font); letter-spacing: -0.03em; margin-bottom: 14px; }
.principle h3 { font-size: 16px; margin-bottom: 6px; }
.principle p { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }
.packs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.pack {
  padding: 20px 16px; text-align: center; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s, transform .2s, box-shadow .2s; display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.pack:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--glow); }
.pack .amt { font: 600 26px/1.1 var(--font); letter-spacing: -0.03em; }
.pack .sub { font-size: 12.5px; color: var(--muted); }
.pack.pop { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.pack .tag { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-strong); height: 14px; }
@media (max-width: 960px) { .packs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .packs { grid-template-columns: repeat(2, 1fr); } }
.timeline { display: grid; gap: 0; position: relative; }
.tl { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--border); }
.tl:first-child { border-top: 0; }
.tl .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font: 600 12px var(--mono); }
.tl .ic.n { background: var(--accent-soft); color: var(--accent-strong); }
.tl .ic.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.tl .ic.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tl h4 { font-size: 14.5px; letter-spacing: -0.01em; margin-bottom: 3px; }
.tl p { font-size: 13.5px; color: var(--muted); }
.tl .amt { font: 500 13.5px var(--mono); color: var(--text-2); white-space: nowrap; }
.tl .amt.ok { color: var(--ok); }
.tl .amt.zero { color: var(--faint); text-decoration: line-through; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.ftable-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.ftable-scroll { overflow-x: auto; }
.ftable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.ftable th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.ftable td { padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: top; }
.ftable tr:first-child td { border-top: 0; }
.ftable tbody tr:hover td { background: var(--surface-2); }
.ftable .mname { font-weight: 550; }
.ftable .mname small { display: block; font: 12px var(--mono); color: var(--faint); font-weight: 400; margin-top: 2px; }
.ftable .unit { color: var(--muted); white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ppill { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; font-size: 12.5px; white-space: nowrap; }
.ppill span { padding: 3px 7px; color: var(--muted); background: var(--surface-2); }
.ppill b { padding: 3px 8px; font: 500 12.5px var(--mono); }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 550; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font: 400 20px/1 var(--font); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 16px; color: var(--muted); font-size: 14.5px; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 40px; }
.toc { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; font-size: 14px; }
.toc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 14px 0 8px; }
.toc h4:first-child { margin-top: 0; }
.toc a { padding: 5px 10px; border-radius: 7px; color: var(--muted); border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a.active { color: var(--text); border-left-color: var(--accent); background: var(--surface-2); border-radius: 0 7px 7px 0; }
.prose { max-width: 780px; }
.prose h1 { font-size: clamp(32px, 4.4vw, 44px); letter-spacing: -0.04em; margin-bottom: 14px; }
.prose h2 { font-size: 24px; margin: 56px 0 14px; padding-top: 8px; }
.prose h3 { font-size: 17px; margin: 28px 0 10px; letter-spacing: -0.01em; }
.prose p { color: var(--text-2); margin: 12px 0; }
.prose ul, .prose ol { color: var(--text-2); padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose :not(pre) > code { font-size: .88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.prose .codebox { margin: 16px 0; }
.prose .lead { font-size: 17px; color: var(--muted); }
.endpoint { display: flex; align-items: center; gap: 10px; font: 14px var(--mono); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); margin: 14px 0; flex-wrap: wrap; word-break: break-all; }
.method { font: 600 11.5px var(--mono); padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
.method.post { background: var(--accent-soft); color: var(--accent-strong); }
.method.get { background: var(--accent-2-soft); color: var(--accent-2); }
.dtable-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--border); border-radius: 12px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.dtable th { text-align: left; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 11px 14px; background: var(--surface-2); }
.dtable td { padding: 11px 14px; border-top: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
.dtable td:first-child { white-space: nowrap; }
.dtable code { font-size: 12.5px; }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .toc { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
  .toc h4 { display: none; }
  .toc a { white-space: nowrap; border: 1px solid var(--border); border-radius: 8px; }
  .toc a.active { border-color: var(--accent); border-radius: 8px; }
}

/* ---------- misc ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 13.5px; font-weight: 500;
  transition: opacity .2s, transform .2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.center-msg { text-align: center; padding-top: 120px; padding-bottom: 120px; }
.center-msg h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.04em; }
.center-msg p { color: var(--muted); margin: 14px auto 28px; max-width: 480px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- account: sign-in + dashboard ---------- */
.auth-box { max-width: 520px; }
.auth-box .notice { margin: 0 0 18px; text-align: left; }
.google-btn { gap: 10px; min-width: 260px; justify-content: center; }
.google-btn svg { background: #fff; border-radius: 50%; padding: 2px; width: 22px; height: 22px; }
.auth-fine { margin-top: 18px; font-size: 13px; color: var(--faint); }
.dash { padding-bottom: 72px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash .notice { margin-bottom: 16px; }
.dash-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.dash-grid .panel + .panel, .two-col .panel + .panel { margin-top: 0; }
@media (min-width: 900px) { .dash-grid { grid-template-columns: 1fr 1.4fr; } .dash-wide { grid-column: 1 / -1; } }
.dash-stats { display: grid; gap: 14px; }
.dash-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.dash-stats .l { color: var(--muted); font-size: 14px; }
.dash-stats b { font: 600 20px var(--mono); }
.dash-small { font-size: 13px; margin-top: 14px; }
.key-form { display: flex; gap: 8px; flex-wrap: wrap; }
.key-form input { flex: 1 1 200px; min-width: 0; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font: inherit; }
.key-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.new-key { margin-top: 14px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent-soft); }
.new-key p { font-size: 14px; margin-bottom: 8px; }
.new-key-row { display: flex; gap: 8px; align-items: center; }
.new-key-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 13px var(--mono); }
.key-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.key-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.key-list li .meta { color: var(--faint); font-size: 12px; display: block; margin-top: 2px; }
.key-list li.revoked { opacity: .55; }
.key-list button { flex: none; }
.dash-table { overflow-x: auto; }
.dash-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th, .dash-table td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dash-table th { color: var(--faint); font-weight: 500; font-size: 12px; }
.dash-table td.mono { font-family: var(--mono); }
.legal { padding-top: 40px; padding-bottom: 72px; }
.legal h2 { margin-top: 40px; }

/* ---------- email sign-in + provider application ---------- */
.email-signin[hidden], .email-sent[hidden], .email-msg[hidden], .provider-form[hidden], .provider-done[hidden], .provider-msg[hidden] { display: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 22px auto 16px; max-width: 380px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.email-signin { display: flex; flex-direction: column; gap: 10px; max-width: 380px; margin: 0 auto; text-align: left; }
.email-signin input, .provider-form input, .provider-form textarea {
  width: 100%; min-width: 0; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
.email-signin input { height: 46px; padding: 0 14px; }
.email-signin input:focus, .provider-form input:focus, .provider-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.email-signin .btn { width: 100%; justify-content: center; }
.email-signin .btn:disabled, .provider-form .btn:disabled { opacity: .6; cursor: progress; }
.email-msg, .provider-msg { margin: 0; font-size: 13.5px; color: var(--bad); }
.email-sent {
  display: flex; gap: 12px; align-items: flex-start; max-width: 420px; margin: 0 auto; padding: 14px 16px; text-align: left;
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text-2);
  border: 1px solid color-mix(in srgb, var(--c-green) 35%, transparent); background: var(--accent-2-soft);
}
.email-sent svg { flex: none; color: var(--c-green); margin-top: 1px; }
.email-sent strong { color: var(--text); }
.email-sent b { color: var(--text); overflow-wrap: anywhere; }
.email-sent button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; display: inline; }
.provider-wrap { padding-bottom: 72px; }
.provider-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .provider-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.provider-form, .provider-done { display: grid; gap: 14px; }
.provider-grid .panel + .panel { margin-top: 0; }
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field em { font-style: normal; color: var(--c-rose); }
.provider-form input { height: 42px; padding: 0 12px; }
.provider-form textarea { padding: 10px 12px; resize: vertical; min-height: 84px; line-height: 1.5; }
.provider-form ::placeholder, .email-signin ::placeholder { color: var(--faint); }
.provider-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.provider-done h2 { font-size: 20px; margin: 0; }
.provider-done p { color: var(--muted); margin: 0; }
.provider-done .btn { justify-self: start; }
.provider-aside { padding: 4px 4px 0; }
.provider-aside h2 { font-size: 17px; margin-bottom: 12px; }
.provider-aside ul { margin: 0 0 16px; padding-left: 18px; display: grid; gap: 10px; color: var(--muted); font-size: 14.5px; }
.provider-aside b { color: var(--text); font-weight: 600; }
.provider-aside .muted { font-size: 14px; }

/* ---------- top-up ---------- */
.topup { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.topup-l { display: block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.topup-packs { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.topup-packs .btn { width: 100%; justify-content: center; font-family: var(--mono); font-weight: 600; }
.topup-packs .btn:disabled { opacity: 0.55; cursor: progress; }
@media (max-width: 380px) { .topup-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
