/* ================================================================
   Sub2API Marketing — Instrument / Control Room
   Shared stylesheet · index · pricing · docs
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
  --ink:         #0a0e14;
  --surface-1:   #0f141c;
  --surface-2:   #151b25;
  --surface-3:   #1b222e;
  --line:        #232b37;
  --grid:        rgba(255,255,255,.022);
  --text:        #e6edf3;
  --text-dim:    #8a96a6;
  --text-faint:  #56616f;
  --accent:      #9ef01a;
  --accent-ink:  #0a0e14;
  --accent-dim:  rgba(158,240,26,.13);
  --accent-glow: rgba(158,240,26,.32);
  --warn:        #f5b13d;
  --down:        #ff5b5b;
  --info:        #4cc9e0;
  --radius:      5px;
  --font-sans:   "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:   "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --nav-h:       60px;
  --max-w:       1120px;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  min-height: 100vh;
}

/* atmospheric glow */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(62vw 48vh at 10% -6%, var(--accent-dim), transparent 60%),
    radial-gradient(52vw 52vh at 100% 0%, rgba(76,201,224,.04), transparent 55%);
}

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

::selection { background: var(--accent-dim); color: var(--text); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

img, svg { display: block; }

/* ── Layout helpers ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
}
.rel { position: relative; z-index: 1; }

/* ================================================================
   NAVIGATION
   ================================================================ */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface-1), transparent 8%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  height: 100%;
  display: flex; align-items: center; gap: 8px;
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none !important; color: inherit;
  flex-shrink: 0; margin-right: 8px;
}
.nav-logo:hover .logo-mark { box-shadow: 0 0 0 1px var(--accent), 0 0 22px var(--accent-glow); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 5px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--accent), 0 0 14px var(--accent-glow);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  transition: box-shadow .2s;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-weight: 800; font-size: 14px; letter-spacing: .05em; color: var(--text); }
.logo-sub  { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-faint); letter-spacing: .22em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  padding: 6px 12px; border-radius: var(--radius);
  text-decoration: none !important;
  transition: color .14s, background .14s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); }

.nav-spacer { flex: 1; }
.nav-auth { display: flex; align-items: center; gap: 8px; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none !important;
  transition: filter .14s, box-shadow .14s, background .14s, color .14s, border-color .14s, transform .1s;
  white-space: nowrap; line-height: 1;
  user-select: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn-primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 0 0 1px var(--accent), 0 0 22px var(--accent-glow);
}
.btn-ghost {
  background: var(--surface-2); color: var(--text-dim); border-color: var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); background: var(--surface-3); }

.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-sm { padding: 5px 10px; font-size: 11px; font-weight: 600; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center; justify-content: center;
  padding: 64px 0 80px; position: relative; z-index: 1;
}
.hero-inner {
  text-align: center;
  max-width: 820px; width: 100%;
  margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px);
}

/* Terminal window */
.terminal {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 28px 64px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.025), 0 0 80px rgba(158,240,26,.06);
  margin-bottom: 52px; text-align: left;
  max-width: 640px; margin-left: auto; margin-right: auto;
}
.terminal-bar {
  height: 38px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; padding: 0 14px;
}
.t-dot { width: 10px; height: 10px; border-radius: 99px; flex-shrink: 0; }
.t-dot.r { background: #ff5f57; }
.t-dot.y { background: #febc2e; }
.t-dot.g { background: #28c840; }
.terminal-title {
  flex: 1; text-align: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  letter-spacing: .04em;
}

.terminal-body {
  padding: 18px 20px 20px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75;
  color: var(--text-dim); min-height: 200px;
}
.t-line { display: block; }
.t-prompt  { color: var(--accent); }
.t-cmd     { color: var(--text); }
.t-flag    { color: var(--info); }
.t-str     { color: #e2a66a; }
.t-comment { color: var(--text-faint); }
.t-status  { color: var(--accent); }
.t-dim     { color: var(--text-faint); }
.t-response { color: var(--text-dim); }
.t-blank   { display: block; height: .5em; }

/* Block-level fade-in for terminal stages */
.t-block {
  opacity: 0;
  animation: fadeIn .35s ease forwards;
  animation-delay: var(--d, 0s);
}

/* Blinking cursor */
.cursor-blink {
  display: inline-block; width: 6px; height: 14px;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1.05s step-end infinite;
  margin-left: 1px;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* Hero text */
.hero-title {
  font-size: clamp(36px, 5.5vw, 58px); font-weight: 800;
  letter-spacing: -.015em; line-height: 1.07;
  color: var(--text); margin-bottom: 18px;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(14px, 1.6vw, 17px); color: var(--text-dim);
  margin-bottom: 36px; line-height: 1.72;
  max-width: 500px; margin-left: auto; margin-right: auto;
}
.hero-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}
.hero-note {
  margin-top: 20px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); letter-spacing: .06em;
}

/* ================================================================
   SECTION
   ================================================================ */
.section { position: relative; z-index: 1; }
.section-inner { padding: 80px 0; }
.section-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px; display: block;
}
.section-label::before { content: "// "; }
.section-title {
  font-size: clamp(24px, 3vw, 36px); font-weight: 800;
  letter-spacing: .01em; line-height: 1.2;
  margin-bottom: 14px; color: var(--text);
}
.section-sub {
  font-size: 15px; color: var(--text-dim); max-width: 520px; line-height: 1.7;
}

/* ================================================================
   FEATURES
   ================================================================ */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px; margin-top: 48px;
}
.feature-card {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px;
  position: relative; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.feature-card:hover {
  border-color: color-mix(in oklab, var(--accent), var(--line) 70%);
  box-shadow: 0 0 0 1px var(--accent-dim);
}
/* corner tick */
.feature-card::after {
  content: ""; position: absolute; top: 10px; right: 10px;
  width: 9px; height: 9px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line);
}
.feature-cmd {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  letter-spacing: .04em; margin-bottom: 16px;
}
.feature-cmd::before { content: "$ "; color: var(--text-faint); }
.feature-title {
  font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px;
}
.feature-desc { font-size: 13px; color: var(--text-dim); line-height: 1.68; }

/* ================================================================
   MODEL LIST (command-line style)
   ================================================================ */
.model-terminal {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.model-terminal-header {
  padding: 11px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px;
  display: flex; align-items: center; gap: 8px;
}
.mth-prompt { color: var(--text-faint); }
.mth-cmd    { color: var(--text); }
.mth-arg    { color: var(--accent); }

.model-row {
  display: grid;
  grid-template-columns: auto 1fr 100px 90px 80px;
  align-items: center; gap: 0;
  padding: 11px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px;
  transition: background .1s; position: relative;
  cursor: default;
}
.model-row:last-child { border-bottom: 0; }
.model-row:hover { background: var(--surface-2); }
.model-row:hover::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.mr-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); margin-right: 14px; flex-shrink: 0; }
.mr-dot.live { animation: dotPulse 2s infinite; }
.mr-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-provider { color: var(--text-faint); font-size: 11px; }
.mr-ctx { color: var(--info); text-align: right; font-size: 11px; }
.mr-status { text-align: right; color: var(--accent); font-size: 10px; letter-spacing: .08em; }

/* ================================================================
   STATS BAR
   ================================================================ */
.stats-bar {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--surface-1); position: relative; z-index: 1;
}
.stats-inner {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
}
.stat-item {
  padding: 36px 24px; text-align: center;
  border-right: 1px solid var(--line);
}
.stat-item:last-child { border-right: 0; }
.stat-number {
  font-family: var(--font-mono); font-weight: 600;
  font-size: clamp(30px, 3.5vw, 46px);
  color: var(--text); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 8px;
}
.stat-accent { color: var(--accent); }
.stat-label {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-faint);
  letter-spacing: .2em; text-transform: uppercase;
}

/* ================================================================
   PROVIDER STRIP
   ================================================================ */
.provider-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; margin-top: 40px;
}
.provider-badge {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-1);
  color: var(--text-dim);
}
.pb-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--text-faint); flex-shrink: 0; }
.pb-anthropic .pb-dot { background: #d4855a; box-shadow: 0 0 6px rgba(212,133,90,.4); }
.pb-google    .pb-dot { background: var(--info); box-shadow: 0 0 6px rgba(76,201,224,.4); }
.pb-openai    .pb-dot { background: #8b9cf4; box-shadow: 0 0 6px rgba(139,156,244,.4); }
.pb-deepseek  .pb-dot { background: #a27eed; box-shadow: 0 0 6px rgba(162,126,237,.4); }

/* ================================================================
   CTA SECTION
   ================================================================ */
.cta-section {
  background: var(--surface-1); border-top: 1px solid var(--line);
  position: relative; z-index: 1; overflow: hidden;
}
.cta-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70vw 100% at 50% 120%, var(--accent-dim), transparent 70%);
}
.cta-inner {
  text-align: center; padding: 80px clamp(16px, 3vw, 40px);
  max-width: var(--max-w); margin: 0 auto; position: relative;
}
.cta-mono {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  letter-spacing: .06em; margin-bottom: 20px;
}
.cta-mono .accent { color: var(--accent); }
.cta-title {
  font-size: clamp(28px, 3.5vw, 42px); font-weight: 800;
  letter-spacing: .01em; color: var(--text); margin-bottom: 14px;
}
.cta-sub { font-size: 15px; color: var(--text-dim); margin-bottom: 32px; }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer { border-top: 1px solid var(--line); position: relative; z-index: 1; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 20px clamp(16px, 3vw, 40px);
  max-width: var(--max-w); margin: 0 auto;
}
.footer-left {
  display: flex; align-items: center; gap: 16px;
}
.footer-brand {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-faint); display: flex; align-items: center; gap: 7px;
}
.footer-links {
  display: flex; align-items: center; gap: 18px;
}
.footer-links a {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint);
  text-decoration: none !important; transition: color .14s;
}
.footer-links a:hover { color: var(--text-dim); }
.footer-copy {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint);
}

/* ================================================================
   PAGE HEADER (pricing/docs)
   ================================================================ */
.page-header { padding: 48px 0 36px; position: relative; z-index: 1; }
.page-pre {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  line-height: 1.9; margin-bottom: 20px; display: block;
}
.page-pre .c { color: var(--text-faint); }
.page-pre .acc { color: var(--accent); }
.page-title {
  font-size: clamp(28px, 3.5vw, 40px); font-weight: 800;
  color: var(--text); margin-bottom: 8px;
}
.page-sub { font-size: 14px; color: var(--text-dim); }

/* ================================================================
   PRICING PAGE
   ================================================================ */
.pricing-controls {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 0;
  position: relative; z-index: 1;
}

/* Currency toggle */
.currency-toggle {
  display: inline-flex; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; background: var(--surface-2);
}
.cur-btn {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; padding: 6px 14px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-dim); transition: background .14s, color .14s;
  outline: none;
}
.cur-btn.active { background: var(--accent); color: var(--accent-ink); }

/* Provider tabs */
.provider-tabs {
  display: flex; border-bottom: 1px solid var(--line);
  margin-bottom: 0; position: relative; z-index: 1;
}
.ptab {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; padding: 10px 16px;
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; cursor: pointer; color: var(--text-faint);
  transition: color .14s, border-color .14s; outline: none;
}
.ptab:hover { color: var(--text-dim); }
.ptab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Pricing table */
.pricing-wrap {
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden; background: var(--surface-1);
  position: relative; z-index: 1;
}
.pricing-table { width: 100%; border-collapse: collapse; }
.pricing-table thead th {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--text-faint);
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  padding: 10px 16px; text-align: left; white-space: nowrap;
}
.pricing-table thead th.r { text-align: right; }
.pricing-table tbody tr {
  border-bottom: 1px solid var(--line); position: relative; transition: background .1s;
}
.pricing-table tbody tr.hidden { display: none; }
.pricing-table tbody tr:last-child { border-bottom: 0; }
.pricing-table tbody tr:hover { background: var(--surface-2); }
.pricing-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.pricing-table td { padding: 14px 16px; font-size: 13px; vertical-align: middle; }
.pricing-table td.r {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  text-align: right; color: var(--text-dim);
}

.model-cell { display: flex; align-items: flex-start; gap: 10px; }
.mc-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); flex-shrink: 0; margin-top: 5px; }
.mc-dot.warn { background: var(--warn); }
.mc-info {}
.mc-name { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); display: block; }
.mc-alias { font-size: 11px; color: var(--text-faint); display: block; margin-top: 1px; }

.pbadge {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 3px; border: 1px solid transparent; white-space: nowrap;
  display: inline-block;
}
.pb-a { color: #d4855a; background: rgba(212,133,90,.1); border-color: rgba(212,133,90,.22); }
.pb-g { color: var(--info); background: rgba(76,201,224,.1); border-color: rgba(76,201,224,.22); }
.pb-o { color: #8b9cf4; background: rgba(139,156,244,.1); border-color: rgba(139,156,244,.22); }
.pb-d { color: #a27eed; background: rgba(162,126,237,.1); border-color: rgba(162,126,237,.22); }

.feat-cell { display: flex; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.feat-tag {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px;
  background: var(--surface-3); border: 1px solid var(--line);
  color: var(--text-faint); cursor: default;
}
.feat-tag.vis { color: #8b9cf4; background: rgba(139,156,244,.08); border-color: rgba(139,156,244,.2); }
.feat-tag.fn  { color: var(--info); background: rgba(76,201,224,.08); border-color: rgba(76,201,224,.2); }
.feat-tag.thi { color: var(--warn); background: rgba(245,177,61,.08); border-color: rgba(245,177,61,.2); }
.feat-tag.cac { color: var(--accent); background: var(--accent-dim); border-color: rgba(158,240,26,.25); }

.price-cny { display: none; }

/* ================================================================
   DOCS PAGE
   ================================================================ */
.docs-outer { position: relative; z-index: 1; display: flex; min-height: calc(100vh - var(--nav-h)); }

/* TOC sidebar */
.docs-toc {
  width: 240px; flex-shrink: 0;
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto; border-right: 1px solid var(--line);
  padding: 28px 0;
  background: linear-gradient(180deg, var(--surface-1), color-mix(in oklab, var(--surface-1), var(--ink) 35%));
}
.toc-head {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--text-faint);
  padding: 4px 20px 4px; margin: 14px 0 4px; display: block;
}
.toc-head:first-child { margin-top: 0; }
.toc-a {
  display: block; padding: 6px 20px;
  font-size: 12.5px; font-weight: 500; color: var(--text-dim);
  text-decoration: none !important; position: relative;
  transition: color .14s, background .12s;
}
.toc-a:hover { color: var(--text); background: color-mix(in oklab, var(--surface-2), transparent 50%); }
.toc-a.active { color: var(--accent); }
.toc-a.active::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 2px; border-radius: 2px; background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}
.toc-a.sub { padding-left: 32px; font-size: 12px; color: var(--text-faint); }
.toc-a.sub:hover { color: var(--text-dim); }
.toc-a.sub.active { color: var(--accent); }

/* Docs content */
.docs-content {
  flex: 1; min-width: 0;
  padding: 44px clamp(24px, 4vw, 64px) 80px;
}
.docs-content .container { max-width: 720px; }

.doc-section { margin-bottom: 60px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.doc-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px; display: block;
}
.doc-tag::before { content: "// "; }
.doc-h2 {
  font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 14px; line-height: 1.2;
}
.doc-h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin: 28px 0 10px; display: flex; align-items: center; gap: 10px;
}
.step-num {
  width: 22px; height: 22px; border-radius: 4px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}
.doc-p { font-size: 13.5px; color: var(--text-dim); line-height: 1.78; margin-bottom: 14px; }
.doc-p a { color: var(--accent); border-bottom: 1px solid var(--accent-dim); }
.doc-p a:hover { border-bottom-color: var(--accent); }
.doc-p code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 3px; padding: 1px 5px; color: var(--text-dim);
}

/* Step card */
.step-card {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 14px 0;
}
.step-card-head {
  padding: 9px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint);
  display: flex; align-items: center; gap: 8px;
}
.step-card-head .acc { color: var(--accent); }
.step-card-body {
  padding: 14px 16px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.85; color: var(--text-dim);
}
.sc-p  { color: var(--text-faint); }
.sc-c  { color: var(--accent); }
.sc-k  { color: var(--info); }
.sc-v  { color: #e2a66a; }
.sc-cm { color: var(--text-faint); font-style: italic; }

/* Code block */
.code-block {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 14px 0;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.code-lang {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint);
}
.copy-btn {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 3px;
  background: var(--surface-3); border: 1px solid var(--line);
  color: var(--text-faint); cursor: pointer;
  transition: color .14s, border-color .14s; outline: none;
}
.copy-btn:hover { color: var(--text); border-color: var(--text-faint); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }
pre {
  padding: 16px 18px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.78;
  color: var(--text-dim); background: transparent; margin: 0;
  -webkit-overflow-scrolling: touch;
}
pre .kw   { color: #c792ea; }
pre .str  { color: #e2a66a; }
pre .cm   { color: var(--text-faint); font-style: italic; }
pre .fn   { color: var(--info); }
pre .var  { color: #82aaff; }
pre .hl   { color: var(--accent); font-weight: 600; }
pre .flag { color: var(--info); }
pre .num  { color: #f78c6c; }

/* Info box */
.info-box {
  border-left: 3px solid var(--accent); background: var(--accent-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px; margin: 16px 0;
  font-size: 13.5px; color: var(--text-dim); line-height: 1.68;
}
.info-box strong { color: var(--text); }

/* Model table (docs) */
.model-ref-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.model-ref-table th {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-faint); padding: 8px 12px; text-align: left;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.model-ref-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text-dim); }
.model-ref-table tr:last-child td { border-bottom: 0; }
.model-ref-table .mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--text); }
.model-ref-table tr:hover td { background: var(--surface-2); }

/* FAQ */
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 8px;
}
.faq-q {
  padding: 13px 16px; font-weight: 600; font-size: 13.5px;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  user-select: none; background: var(--surface-1); transition: background .12s; list-style: none;
}
.faq-q:hover { background: var(--surface-2); }
.faq-q::after { content: "+"; font-family: var(--font-mono); color: var(--text-faint); font-size: 16px; flex-shrink: 0; transition: color .14s; }
.faq-item.open .faq-q { background: var(--surface-2); }
.faq-item.open .faq-q::after { content: "−"; color: var(--accent); }
.faq-a {
  display: none; padding: 12px 16px 16px;
  font-size: 13.5px; color: var(--text-dim); line-height: 1.72;
  border-top: 1px solid var(--line); background: var(--surface-1);
}
.faq-item.open .faq-a { display: block; }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 5px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.animate { opacity: 0; animation: fadeIn .42s ease both; }
.d1  { animation-delay: .08s; }
.d2  { animation-delay: .16s; }
.d3  { animation-delay: .24s; }
.d4  { animation-delay: .32s; }
.d5  { animation-delay: .40s; }
.d6  { animation-delay: .48s; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
/* Two-column halves layout used in homepage model section */
.grid-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

@media (max-width: 900px) {
  .docs-toc { display: none; }
  .stats-inner { grid-template-columns: 1fr; }
  .stat-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-item:last-child { border-bottom: 0; }
  .grid-halves { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .model-row { grid-template-columns: auto 1fr 80px; }
  .mr-ctx, .mr-status { display: none; }
  .pricing-table .ctx-col, .pricing-table .feat-col { display: none; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 30px; }
  .terminal { border-radius: 6px; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
