/* ToolRecall preview pages: shared design system. Linked by every preview page. */
:root {
  --bg: #06080D;
  --bg-2: #0A0D14;
  --surface: rgba(255,255,255,0.028);
  --surface-2: rgba(255,255,255,0.05);
  --surface-solid: #0D1119;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --text: #F1F5F9;
  --text-2: #B4BECD;
  --text-3: #7C8799;
  --text-4: #566174;
  --emerald: #10B981;
  --emerald-2: #34D399;
  --emerald-3: #6EE7B7;
  --cyan: #22D3EE;
  --violet: #A78BFA;
  --rose: #F43F5E;
  --rose-2: #FB7185;
  --amber: #FBBF24;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --max: 1180px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, video, svg { max-width: 100%; }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 0.08em 0.38em;
  border-radius: 5px;
  color: #E2E8F0;
  overflow-wrap: anywhere;
}
::selection { background: rgba(52,211,153,0.3); color: #fff; }
:focus-visible { outline: 2px solid var(--emerald-2); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ---------- Ambient background ---------- */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.ambient::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.orb-1 { width: 620px; height: 620px; top: -260px; left: -140px; background: radial-gradient(circle, rgba(16,185,129,0.45), transparent 65%); }
.orb-2 { width: 560px; height: 560px; top: -200px; right: -160px; background: radial-gradient(circle, rgba(34,211,238,0.28), transparent 65%); }
.orb-3 { width: 520px; height: 520px; top: 900px; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, rgba(167,139,250,0.14), transparent 65%); }

/* ---------- Nav ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 50; padding: 14px 0; transition: background .3s, border-color .3s, padding .3s; border-bottom: 1px solid transparent; }
.nav-wrap.scrolled { background: rgba(6,8,13,0.78); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); padding: 10px 0; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--emerald-2), var(--cyan));
  color: #04130D; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 800;
  box-shadow: 0 6px 22px -6px rgba(52,211,153,0.7), inset 0 1px 0 rgba(255,255,255,0.4);
}
.brand-version { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; color: var(--emerald-3); background: rgba(16,185,129,0.12); border: 1px solid rgba(52,211,153,0.25); padding: 2px 7px; border-radius: 999px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.nav-links a { display: block; padding: 7px 14px; font-size: 0.88rem; font-weight: 500; color: var(--text-2); text-decoration: none; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:hover { color: #fff; background: var(--surface-2); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; place-items: center; }
.mobile-drawer { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .mobile-drawer { display: grid; gap: 2px; max-height: 0; overflow: hidden; transition: max-height .35s var(--ease), margin .35s var(--ease); }
  .mobile-drawer.open { max-height: 420px; margin-top: 12px; }
  .mobile-drawer a { padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-weight: 500; background: var(--surface); border: 1px solid var(--line); }
  .mobile-drawer a + a { margin-top: 6px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 0.93rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn svg { flex-shrink: 0; }
.btn-primary { background: linear-gradient(135deg, #34D399, #10B981); color: #03120C; box-shadow: 0 10px 30px -10px rgba(16,185,129,0.8), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-primary:hover { box-shadow: 0 14px 38px -10px rgba(16,185,129,0.95), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.22); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 10px; }

/* ---------- Typography helpers ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--emerald-2); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.grad { background: linear-gradient(100deg, #6EE7B7 0%, #34D399 35%, #22D3EE 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.025em; margin: 0; }
.section { padding: 96px 0; position: relative; }
@media (max-width: 640px) { .section { padding: 64px 0; } }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.12; font-weight: 800; margin-bottom: 14px; }
.section-desc { color: var(--text-2); font-size: 1.05rem; margin: 0; }
.section-desc a, .inline-link { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(34,211,238,0.35); }
.section-desc a:hover, .inline-link:hover { border-bottom-color: var(--cyan); }

.card { background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 50px -30px rgba(0,0,0,0.8); }

    /* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; margin-top: 40px; color: var(--text-3); font-size: 0.86rem; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { text-decoration: none; color: var(--text-2); }
.footer-links a:hover { color: #fff; }
.footer small { display: block; margin-top: 6px; color: var(--text-4); font-size: 0.76rem; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: .08s; } .js .reveal-d2 { transition-delay: .16s; } .js .reveal-d3 { transition-delay: .24s; }
html:not(.js) .draw { stroke-dashoffset: 0; }
html:not(.js) .fade-svg { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .draw { stroke-dashoffset: 0 !important; animation: none !important; }
  .fade-svg { opacity: 1 !important; transition: none !important; }
}
  
/* ---------- Shared extras (used by benchmark / architecture pages) ---------- */
:root { --accent-cyan-glow: var(--cyan); --accent-emerald-glow: var(--emerald-2); --accent-amber-glow: var(--amber); --accent-rose-glow: var(--rose-2); --text-muted: var(--text-3); --text-secondary: var(--text-2); }
.nav-links a.active { color: #fff; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.mobile-drawer a.active { color: #fff; border-color: rgba(52,211,153,0.4); }
.hero-lead { font-size: 1.12rem; color: var(--text-2); max-width: 720px; margin: 0 0 30px; }
.hero-lead strong { color: var(--text); font-weight: 600; }
.gradient-hero-text { background: linear-gradient(100deg, #6EE7B7 0%, #34D399 35%, #22D3EE 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.pill-emerald { color: var(--emerald-3); background: rgba(16,185,129,0.12); border-color: rgba(52,211,153,0.3); }
.pill-amber { color: #FDE68A; background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.3); }
.pill-rose { color: #FDA4AF; background: rgba(244,63,94,0.12); border-color: rgba(244,63,94,0.3); }
main.container > section { padding: 72px 0; position: relative; }
main.container > section > .section-title { max-width: 860px; }
main.container > section > .section-desc { max-width: 780px; margin-bottom: 32px; }
.hero-section { padding-top: 64px !important; padding-bottom: 24px !important; }
.hero-h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); line-height: 1.07; font-weight: 800; letter-spacing: -0.035em; margin: 20px 0 20px; max-width: 900px; }
.surface-card { background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 50px -30px rgba(0,0,0,0.8); position: relative; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 36px; }
.stats-grid .surface-card::after { content: ""; position: absolute; width: 200px; height: 200px; right: -80px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(52,211,153,0.14), transparent 70%); pointer-events: none; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 10px; color: var(--emerald-2); }
.stat-num.cyan { color: var(--cyan); }
.stat-num.amber { color: var(--amber); }
.stat-label { color: var(--text-2); font-size: 0.9rem; }
.stat-label code { white-space: normal; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 6px; }
.jump a { font-size: 0.84rem; font-weight: 500; color: var(--text-2); text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); transition: color .2s, background .2s, border-color .2s; }
.jump a:hover { color: #fff; background: var(--surface-2); border-color: rgba(52,211,153,0.4); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)); box-shadow: 0 20px 50px -30px rgba(0,0,0,0.8); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); padding: 14px 16px; background: rgba(0,0,0,0.25); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); line-height: 1.5; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255,255,255,0.025); }
td strong { color: var(--text); font-weight: 600; }
td code { white-space: normal; }
td a { color: var(--cyan); text-decoration: none; }
td a:hover { text-decoration: underline; }
.num-good, .num-mid, .num-flat { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.num-good { color: var(--emerald-2); }
.num-mid { color: var(--amber); }
.num-flat { color: var(--text-3); }
.callout-note { margin-top: 20px; padding: 18px 22px; border-radius: 14px; background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.22); color: var(--text-2); font-size: 0.9rem; }
.callout-note strong { color: var(--text); }
.callout-note code { white-space: normal; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.grid-3 > * { min-width: 0; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.015em; margin: 16px 0 8px; }
.card-body { color: var(--text-2); font-size: 0.92rem; margin: 0; }
.card-body code { white-space: normal; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .table-wrap { border: 0; background: none; box-shadow: none; overflow: visible; }
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody tr { margin-bottom: 14px; padding: 10px 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
  td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 7px 14px; border: 0; overflow-wrap: anywhere; }
  .num-good, .num-mid, .num-flat { white-space: normal; }
  td::before { content: attr(data-label); font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-4); padding-top: 3px; }
}

/* ---------- Unified 2-Column Sidebar Layout (Docs, Architecture, Benchmarks) ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 48px;
}
.docs-sidebar {
  position: sticky;
  top: 96px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.docs-sidebar-group {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
  margin: 14px 0 6px 8px;
}
.docs-sidebar-group:first-child { margin-top: 0; }
.docs-sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .18s, background .18s, border-color .18s;
}
.docs-sidebar a:hover { color: #fff; background: var(--surface-2); }
.docs-sidebar a.active {
  color: var(--emerald-2);
  background: rgba(16,185,129,0.08);
  border-left-color: var(--emerald-2);
}
.docs-content { min-width: 0; }
.docs-content > section {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}
.docs-content > section:first-child { padding-top: 12px; }
.docs-content > section:last-child { border-bottom: 0; padding-bottom: 16px; }
.docs-content > section > .section-desc,
.docs-content > section > .section-lead { margin-bottom: 26px; }
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; }
  .docs-sidebar { display: none; }
}
@media (min-width: 961px) {
  .hero-section .jump { display: none; }
}
