/* ============================================================
   HELAX AI Docs — Premium WHITE theme (Apple / OpenAI inspired)
   HELAX AI N3 · Advanced Sinhala Intelligence · Built by NHB LK
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-soft-2: #eef2f8;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --text-dim: #475569;
  --muted: #94a3b8;
  --brand: #2563eb;
  --brand-2: #0ea5e9;
  --brand-3: #6366f1;
  --brand-soft: rgba(37, 99, 235, 0.08);
  --accent-lk: #f59e0b;
  --glow: rgba(37, 99, 235, 0.22);
  --radius: 22px;
  --radius-sm: 14px;
  --sidebar-w: 272px;
  --topbar-h: 68px;
  --max: 1140px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 30px 60px -24px rgba(15, 23, 42, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

code, pre, kbd { font-family: "JetBrains Mono", ui-monospace, monospace; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(37, 99, 235, 0.16); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.14); border-radius: 8px; border: 3px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,0.24); }

/* ============================================================
   Animated background (soft, light)
   ============================================================ */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(1100px 760px at 82% -8%, rgba(37,99,235,0.10), transparent 60%),
  radial-gradient(860px 680px at 8% 108%, rgba(14,165,233,0.09), transparent 60%),
  var(--bg); }
.bg-grid { position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(15,23,42,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 25%, transparent 78%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(72px); opacity: 0.4; animation: float 20s var(--ease) infinite; will-change: transform; transform: translateZ(0); }
.orb-1 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(37,99,235,0.45), transparent 70%); top: -130px; right: -70px; }
.orb-2 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(14,165,233,0.42), transparent 70%); bottom: -130px; left: -90px; animation-delay: -7s; }
.orb-3 { width: 340px; height: 340px; background: radial-gradient(circle, rgba(99,102,241,0.4), transparent 70%); top: 38%; left: 52%; animation-delay: -13s; opacity: 0.28; }
@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(36px, 26px) scale(1.06); }
  66% { transform: translate(-26px, 18px) scale(0.96); }
}
#particle-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); z-index: 200; }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 100;
  display: flex; align-items: center; gap: 18px; padding: 0 24px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }
.brand-mark { display: grid; place-items: center; }
.brand-mark img { width: 30px; height: 30px; object-fit: contain; display: block; }
.brand-accent { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); border: 1px solid rgba(37,99,235,0.2); }

.topbar-search { position: relative; flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px;
  padding: 10px 13px; border-radius: 13px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); transition: all .2s; }
.topbar-search:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
.topbar-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; }
.topbar-search input::placeholder { color: var(--muted); }
.topbar-search kbd { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #fff; border: 1px solid var(--border); color: var(--muted); box-shadow: var(--shadow-sm); }

.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--panel-solid);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 120; }
.search-results.open { display: block; }
.search-results a { display: flex; flex-direction: column; padding: 11px 15px; border-bottom: 1px solid var(--border); transition: background .15s; }
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a.active { background: var(--brand-soft); }
.search-results .sr-title { font-weight: 600; font-size: 14px; }
.search-results .sr-sub { font-size: 12px; color: var(--muted); }
.search-results .sr-empty { padding: 15px; color: var(--muted); font-size: 13px; }

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: none; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  width: 40px; height: 40px; border-radius: 11px; cursor: pointer; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg-soft-2); }

/* ---------- Buttons ---------- */
.primary-btn, .glass-btn, .ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: 13px; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .2s, background .2s; white-space: nowrap;
}
.primary-btn { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 24px -10px var(--glow); }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px var(--glow); }
.glass-btn { background: rgba(255,255,255,0.75); border-color: var(--border-strong); color: var(--text); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }
.glass-btn:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.ghost-btn { background: transparent; color: var(--text-dim); padding: 9px 13px; font-weight: 500; }
.ghost-btn:hover { color: var(--text); background: var(--bg-soft); }
.primary-btn.lg, .glass-btn.lg { padding: 14px 26px; font-size: 15px; border-radius: 15px; }
.primary-btn.block { width: 100%; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w); z-index: 90;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 26px 16px; overflow-y: auto;
  background: rgba(255,255,255,0.6); backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  transition: transform .3s var(--ease);
}
.nav-group { margin-bottom: 24px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); padding: 0 14px 9px; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border-radius: 12px; color: var(--text-dim);
  font-size: 14px; font-weight: 500; transition: all .18s var(--ease); position: relative; }
.nav-link .nav-ico { font-size: 13px; width: 18px; text-align: center; color: var(--brand); opacity: 0.85; }
.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-link.active .nav-ico { opacity: 1; }
.nav-link.active::before { content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--brand), var(--brand-2)); }
.nav-link.hidden { display: none; }

.sidebar-foot { padding: 14px; font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.22); color: #059669; font-weight: 600; margin-bottom: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.muted { color: var(--muted); }

.sidebar-scrim { position: fixed; inset: 0; background: rgba(15,23,42,0.35); z-index: 85; opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(2px); }
.sidebar-scrim.show { opacity: 1; pointer-events: auto; }

/* ============================================================
   Content layout
   ============================================================ */
.content { margin-left: var(--sidebar-w); padding-top: var(--topbar-h); min-height: 100vh; }
.page { display: none; max-width: var(--max); margin: 0 auto; padding: 52px 44px 96px; animation: pageIn .32s var(--ease); will-change: opacity, transform; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }

/* Lazy-render off-screen sections to keep paint/layout cheap */
.section { margin-top: 88px; content-visibility: auto; contain-intrinsic-size: auto 480px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.section-sub { font-size: 17px; color: var(--text-dim); }
.page-head { padding-top: 14px; }
.page-title { font-size: clamp(38px, 6vw, 58px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 16px 0; }
.page-lead { font-size: 19px; color: var(--text-dim); max-width: 740px; }
.prose { font-size: 16.5px; color: var(--text-dim); max-width: 780px; margin-bottom: 24px; }
.prose code, .page-lead code { background: var(--bg-soft-2); padding: 2px 7px; border-radius: 7px; font-size: 0.9em; color: var(--brand); }
.center { text-align: center; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand);
  padding: 7px 14px; border-radius: 999px; background: var(--brand-soft); border: 1px solid rgba(37,99,235,0.18); }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.lk-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #b45309;
  padding: 8px 16px; border-radius: 999px; background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(245,158,11,0.05));
  border: 1px solid rgba(245,158,11,0.3); }

.gradient-text { background: linear-gradient(120deg, var(--brand), var(--brand-2) 55%, var(--brand-3));
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============================================================
   Hero
   ============================================================ */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding-top: 26px; }
.hero-title { font-size: clamp(46px, 8vw, 84px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; margin-top: 22px; }
.hero-sub { font-size: clamp(19px, 2.5vw, 26px); color: var(--text); font-weight: 600; margin-top: 16px; letter-spacing: -0.02em; }
.hero-desc { font-size: 17.5px; color: var(--text-dim); max-width: 580px; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-trust { display: flex; align-items: center; gap: 18px; margin-top: 30px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }

/* Hero illustration */
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art-card { width: 100%; border-radius: 28px; padding: 30px; background: var(--panel);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); position: relative; overflow: hidden; }
.hero-art-card::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(420px circle at 80% 10%, rgba(37,99,235,0.12), transparent 60%); pointer-events: none; }
.hero-art svg { width: 100%; height: auto; display: block; }
.float-chip { position: absolute; padding: 9px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; animation: bob 5s var(--ease) infinite; }
.float-chip .fc-emoji { font-size: 16px; }
.float-chip.c1 { top: 8%; left: -6%; } .float-chip.c2 { bottom: 14%; right: -6%; animation-delay: -2.5s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.node-pulse { transform-box: fill-box; transform-origin: center; animation: nodePulse 3.4s var(--ease) infinite; }
.node-pulse:nth-child(2n) { animation-delay: -1.1s; } .node-pulse:nth-child(3n) { animation-delay: -2.2s; }
@keyframes nodePulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ============================================================
   Cards
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 20px; }
.cap-grid { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.feature-card { display: block; padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(10px); position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.feature-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgba(37,99,235,0.08), transparent 55%);
  opacity: 0; transition: opacity .3s; pointer-events: none; }
.feature-card:hover { transform: translateY(-6px); border-color: rgba(37,99,235,0.25); box-shadow: var(--shadow-lg); }
.feature-card:hover::after { opacity: 1; }
.fc-ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; margin-bottom: 18px; }
.grad-a { background: linear-gradient(135deg, rgba(37,99,235,0.14), rgba(37,99,235,0.04)); border: 1px solid rgba(37,99,235,0.18); }
.grad-b { background: linear-gradient(135deg, rgba(14,165,233,0.14), rgba(14,165,233,0.04)); border: 1px solid rgba(14,165,233,0.18); }
.grad-c { background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(99,102,241,0.04)); border: 1px solid rgba(99,102,241,0.18); }
.grad-d { background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(245,158,11,0.04)); border: 1px solid rgba(245,158,11,0.2); }
.feature-card h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.feature-card p { font-size: 14.5px; color: var(--text-dim); }
.card-link { display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--brand); }

.cta-band { text-align: center; padding: 64px 28px; border-radius: 28px; margin-top: 96px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; box-shadow: var(--shadow-lg); }
.cta-band::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(500px circle at 20% 0%, rgba(255,255,255,0.18), transparent 55%); }
.cta-band h2 { font-size: clamp(28px, 4vw, 36px); font-weight: 800; letter-spacing: -0.03em; position: relative; }
.cta-band p { color: rgba(255,255,255,0.9); margin-top: 10px; position: relative; }
.cta-band .hero-actions { justify-content: center; position: relative; }
.cta-band .glass-btn { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); color: #fff; }
.cta-band .glass-btn:hover { background: rgba(255,255,255,0.26); }
.cta-band .primary-btn { background: #fff; color: var(--brand); }

/* ---------- Info cards ---------- */
.info-grid { margin-top: 36px; }
.info-card { padding: 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.info-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.info-value { font-size: 21px; font-weight: 700; margin-top: 6px; display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.status-card .info-value { color: #059669; }

/* ============================================================
   Statistics (animated progress)
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.stat-card { padding: 26px 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); transition: transform .25s var(--ease), box-shadow .25s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.stat-label { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.stat-pct { font-size: 22px; font-weight: 800; background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.progress-track { height: 9px; border-radius: 999px; background: var(--bg-soft-2); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 1.4s var(--ease); }

/* ============================================================
   Internal-link cards + FAQ accordion (SEO)
   ============================================================ */
.link-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.link-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px);
  text-decoration: none; color: var(--text); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.link-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(37,99,235,0.3); }
.link-card .lc-ico { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(14,165,233,0.1)); color: var(--brand); font-weight: 700; }
.link-card strong { display: block; font-size: 15px; }
.link-card .lc-sub { display: block; font-size: 13px; color: var(--text-dim); margin-top: 2px; }

.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 22px; font-weight: 700; transition: transform .25s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; color: var(--text-dim); line-height: 1.7; margin: 0; }

/* ============================================================
   HELAX S Mini — input/output flow, benchmark, comparison
   ============================================================ */
.io-flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; }
.io-box { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); }
.io-out { background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(14,165,233,0.05)); border-color: rgba(37,99,235,0.2); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.io-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.io-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.io-langs span { padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600; }
.io-out-big { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.io-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--brand); font-size: 26px; font-weight: 800; }
.io-chip { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--brand); color: #fff; white-space: nowrap; box-shadow: var(--shadow-sm); }

.bench-card { padding: 26px 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); transition: transform .25s var(--ease), box-shadow .25s; }
.bench-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.bench-card .stat-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.bench-card .stat-label { font-size: 15px; font-weight: 600; }
.bench-card .stat-pct { font-size: 22px; font-weight: 800; background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.compare-table th:not(:first-child), .compare-table td:not(:first-child) { text-align: center; }
.compare-table td:first-child { font-weight: 600; }
.compare-table th:last-child { color: var(--brand); }

@media (max-width: 760px) {
  .io-flow { grid-template-columns: 1fr; }
  .io-arrow { transform: rotate(90deg); }
}

/* ============================================================
   Reasoning flow
   ============================================================ */
.reason-flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; justify-content: center; }
.reason-node { flex: 1; min-width: 134px; padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  text-align: center; box-shadow: var(--shadow-sm); transition: all .25s var(--ease); cursor: default; }
.reason-node:hover { transform: translateY(-6px) scale(1.03); border-color: rgba(37,99,235,0.3); box-shadow: var(--shadow); }
.rn-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; margin-bottom: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; }
.reason-node h4 { font-size: 15px; } .reason-node p { font-size: 12px; color: var(--muted); }
.reason-arrow { display: grid; place-items: center; color: var(--brand); font-size: 22px; }

/* ============================================================
   Coding
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: 36px; align-items: start; }
.lang-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-chip { padding: 9px 17px; border-radius: 999px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 600; font-family: "JetBrains Mono", monospace; transition: all .2s var(--ease); }
.lang-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }

.code-editor, .code-block { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); background: #0f172a; box-shadow: var(--shadow-lg); }
.ce-bar { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.ce-tabs { display: flex; gap: 6px; }
.ce-tab { font-size: 12px; padding: 5px 12px; border-radius: 8px; color: #94a3b8; font-family: "JetBrains Mono", monospace; }
.ce-tab.active { background: rgba(37,99,235,0.22); color: #93c5fd; }
.ce-lang { font-size: 12px; color: #38bdf8; }
.ce-body { padding: 20px; font-size: 13.5px; line-height: 1.75; overflow-x: auto; min-height: 250px; color: #e2e8f0; }

.code-block { margin-bottom: 18px; }
.cb-bar { display: flex; align-items: center; justify-content: space-between; padding: 9px 15px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cb-lang { font-size: 12px; color: #38bdf8; font-family: "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .05em; }
.copy-btn { font-size: 12px; padding: 5px 13px; border-radius: 9px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: #cbd5e1; cursor: pointer; transition: all .2s; }
.copy-btn:hover { background: rgba(37,99,235,0.3); color: #fff; }
.copy-btn.copied { background: rgba(16,185,129,0.25); color: #6ee7b7; border-color: rgba(16,185,129,0.4); }
.code-block pre { padding: 18px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: #e2e8f0; }

/* Syntax tokens (dark code surfaces) */
.tok-key { color: #c792ea; } .tok-str { color: #c3e88d; } .tok-num { color: #f78c6c; }
.tok-com { color: #64748b; font-style: italic; } .tok-fn { color: #82aaff; } .tok-punc { color: #89ddff; }
.tok-bool { color: #ff9cac; } .tok-prop { color: #ffcb6b; }

/* ---------- Endpoints ---------- */
.endpoint { border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); backdrop-filter: blur(10px); margin-bottom: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.ep-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.ep-head code { font-size: 15px; font-weight: 600; color: var(--text); }
.ep-head p { font-size: 13px; color: var(--text-dim); margin-left: auto; }
.method { font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 8px; letter-spacing: .05em; }
.method.post { background: rgba(16,185,129,0.14); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.ep-body { padding: 20px 22px; }

/* ---------- Tables ---------- */
.doc-table { width: 100%; border-collapse: collapse; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-sm); }
.doc-table th, .doc-table td { text-align: left; padding: 13px 17px; font-size: 14px; border-bottom: 1px solid var(--border); }
.doc-table th { color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--bg-soft); }
.doc-table tr:last-child td { border-bottom: none; }
.doc-table td code { color: var(--brand); }

/* ============================================================
   Architecture
   ============================================================ */
.arch { position: relative; max-width: 540px; margin: 36px auto 0; }
.arch-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.arch-layers { display: flex; flex-direction: column; gap: 13px; position: relative; z-index: 2; }
.arch-layer { display: flex; align-items: center; gap: 17px; padding: 17px 21px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); cursor: pointer;
  transition: all .25s var(--ease); }
.arch-layer:hover, .arch-layer:focus { transform: translateX(8px); border-color: rgba(37,99,235,0.3); box-shadow: var(--shadow); outline: none; }
.al-idx { font-family: "JetBrains Mono", monospace; font-weight: 700; color: var(--brand); font-size: 15px;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); border: 1px solid rgba(37,99,235,0.18); }
.arch-layer h4 { font-size: 16px; } .arch-layer p { font-size: 13px; color: var(--muted); }

/* ============================================================
   Playground
   ============================================================ */
.pg { display: grid; grid-template-columns: 224px 1fr 244px; gap: 18px; margin-top: 36px; height: 620px; }
.pg-history, .pg-settings { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); overflow-y: auto; }
.pg-h-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; margin: 16px 0 8px; }
.pg-history-list { display: flex; flex-direction: column; gap: 6px; }
.pg-hist-item { padding: 10px 12px; border-radius: 11px; font-size: 13px; color: var(--text-dim); cursor: pointer; border: 1px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .15s; }
.pg-hist-item:hover { background: var(--bg-soft); }
.pg-hist-item.active { background: var(--brand-soft); color: var(--brand); border-color: rgba(37,99,235,0.2); }

.pg-main { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); overflow: hidden; }
.pg-chat { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.pg-msg { display: flex; gap: 12px; max-width: 90%; animation: msgIn .3s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pg-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.pg-avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.pg-msg.user .pg-avatar { background: var(--bg-soft-2); color: var(--text-dim); }
.pg-msg.ai .pg-avatar { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.pg-bubble { padding: 13px 16px; border-radius: 15px; font-size: 14.5px; line-height: 1.6; }
.pg-msg.user .pg-bubble { background: var(--brand); color: #fff; }
.pg-msg.ai .pg-bubble { background: var(--bg-soft); border: 1px solid var(--border); }
.pg-empty { margin: auto; text-align: center; color: var(--muted); }
.pg-empty .fc-ico { margin: 0 auto 14px; }
.pg-empty h3 { color: var(--text); margin-bottom: 4px; }
.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 1px; border-radius: 50%; background: var(--brand); animation: typing 1.2s infinite; }
.typing span:nth-child(2){ animation-delay: .2s; } .typing span:nth-child(3){ animation-delay: .4s; }
@keyframes typing { 0%,60%,100%{ transform: translateY(0); opacity:.4;} 30%{ transform: translateY(-5px); opacity:1;} }

.pg-input { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--border); }
.pg-input textarea { flex: 1; resize: none; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 13px;
  color: var(--text); padding: 12px 15px; font-size: 14.5px; font-family: inherit; outline: none; max-height: 120px; }
.pg-input textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }

.pg-field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; font-size: 13px; color: var(--text-dim); }
.pg-field span { display: flex; justify-content: space-between; }
.pg-field strong { color: var(--brand); }
.pg-field input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 4px; background: var(--bg-soft-2); outline: none; }
.pg-field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg,var(--brand),var(--brand-2)); cursor: pointer; box-shadow: var(--shadow-sm); }
.pg-field input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: none; border-radius: 50%; background: var(--brand); cursor: pointer; }
.pg-field input[type=number] { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 11px; color: var(--text); padding: 10px 12px; font-size: 14px; outline: none; }
.pg-field input[type=number]:focus { border-color: var(--brand); background: #fff; }
.pg-usage { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.usage-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dim); padding: 5px 0; }
.usage-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font-weight: 700; color: var(--text); }
.usage-row strong { color: var(--brand); font-family: "JetBrains Mono", monospace; }

/* ============================================================
   Timeline
   ============================================================ */
.timeline { position: relative; max-width: 740px; margin: 44px auto 0; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--brand), var(--brand-2), transparent); }
.tl-item { position: relative; margin-bottom: 28px; }
.tl-dot { position: absolute; left: -32px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,0.12); }
.tl-card { padding: 22px 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); transition: all .25s var(--ease); }
.tl-card:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.tl-card h3 { font-size: 18px; margin: 8px 0; } .tl-card p { font-size: 14px; color: var(--text-dim); }
.tag { font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.tag.stable { background: rgba(16,185,129,0.14); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.tag.beta { background: rgba(14,165,233,0.14); color: #0284c7; border: 1px solid rgba(14,165,233,0.3); }
.tag.alpha { background: rgba(245,158,11,0.14); color: #b45309; border: 1px solid rgba(245,158,11,0.3); }

/* ============================================================
   Footer & misc
   ============================================================ */
.footer { margin-top: 100px; border-top: 1px solid var(--border); padding: 44px; max-width: var(--max); margin-left: auto; margin-right: auto; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 22px; }
.footer-inner .brand-text { font-weight: 800; font-size: 18px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 14px; } .footer-links a:hover { color: var(--brand); }
.footer-copy { margin-top: 26px; font-size: 13px; }

.to-top { position: fixed; bottom: 26px; right: 26px; width: 48px; height: 48px; border-radius: 14px; z-index: 95;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: none; font-size: 20px; cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .3s var(--ease); box-shadow: var(--shadow); }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .two-col { grid-template-columns: 1fr; }
  .pg { grid-template-columns: 1fr 244px; }
  .pg-history { display: none; }
}
@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); background: #fff; }
  .sidebar.open { transform: none; }
  .content { margin-left: 0; }
  .icon-btn { display: inline-flex; }
  .topbar-search { max-width: none; }
  .topbar-right .ghost-btn { display: none; }
  .reason-arrow { transform: rotate(90deg); }
  .reason-flow { flex-direction: column; align-items: stretch; }
  .pg { grid-template-columns: 1fr; height: auto; }
  .pg-settings { order: -1; }
  .pg-main { height: 480px; }
  .hero-art .float-chip.c1 { left: 2%; } .hero-art .float-chip.c2 { right: 2%; }
}
@media (max-width: 560px) {
  .page { padding: 30px 20px 64px; }
  .topbar { padding: 0 16px; }
  .topbar-cta { display: none; }
  .ep-head p { margin-left: 0; flex-basis: 100%; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .progress-fill { transition: none; }
}
