/* ae — site styles */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

:root {
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --card: #ffffff;
  --card-2: #f7f9fc;
  --fg: #0c1117;
  --muted: #55606f;
  --border: #e4e9f0;
  --border-strong: #d3dae4;
  --accent: #0d9488;
  --accent-2: #0284c7;
  --accent-soft: rgba(13,148,136,.10);
  --code-bg: #f6f8fb;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 12px 30px -12px rgba(16,24,40,.18);
  --radius: 16px;
  --maxw: 1120px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="dark"] {
  --bg: #0a0c10;
  --bg-soft: #0d1117;
  --card: #10151d;
  --card-2: #131a24;
  --fg: #e9edf3;
  --muted: #96a1b2;
  --border: #1d2530;
  --border-strong: #2a3543;
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --accent-soft: rgba(45,212,191,.12);
  --code-bg: #0b0f16;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 20px 50px -20px rgba(0,0,0,.7);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--mono); }
::selection { background: var(--accent-soft); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #04110f; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in oklab, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
.nav__inner { max-width: var(--maxw); margin-inline: auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { font-family: var(--mono); font-weight: 700; font-size: 20px; letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__tag { font-size: 12px; color: var(--muted); letter-spacing: .02em; padding-left: 10px; border-left: 1px solid var(--border); }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { font-size: 14px; color: var(--muted); padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s; }
.nav__links a:hover { color: var(--fg); background: var(--bg-soft); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s; }
.icon-btn:hover { color: var(--fg); border-color: var(--border-strong); }
.i-moon { display: none; }
html[data-theme="dark"] .i-sun { display: none; }
html[data-theme="dark"] .i-moon { display: block; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; padding: 10px 16px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04120f; font-weight: 650; }
html[data-theme="dark"] .btn--primary { color: #05120f; }
.btn--outline { border-color: var(--border-strong); color: var(--fg); background: var(--card); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost { color: var(--muted); border-color: var(--border); background: transparent; }
.btn--ghost:hover { color: var(--fg); border-color: var(--border-strong); background: var(--bg-soft); }

/* HERO */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero__glow { position: absolute; inset: -30% 20% auto 50%; height: 520px; transform: translateX(-30%);
  background: radial-gradient(60% 60% at 50% 40%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%); filter: blur(30px); pointer-events: none; }
.hero__inner { position: relative; padding-top: 84px; padding-bottom: 72px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 999px; background: var(--card); margin: 0 0 26px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero__title { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 750; margin: 0 0 22px; }
.hero__title .grad { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lede { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 720px; margin: 0 auto 30px; }
.hero__lede strong { color: var(--fg); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 30px; }
.install { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  background: var(--code-bg); border-radius: 12px; box-shadow: var(--shadow); }
.install__prompt { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.install code { font-size: 13px; color: var(--fg); overflow-x: auto; white-space: nowrap; }
.copy { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; flex: none; transition: color .15s, border-color .15s; }
.copy:hover { color: var(--accent); border-color: var(--accent); }
.copy.ok { color: var(--accent); border-color: var(--accent); }
.hero__meta { font-size: 12.5px; color: var(--muted); margin: 18px 0 0; }

/* GLANCE */
.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: -1px;
  border-bottom: 1px solid var(--border); }
.stat { padding: 32px 20px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat__num { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 750; letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__num span { font-size: .5em; margin-left: 2px; }
.stat__label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* SECTIONS */
.section { padding-top: 84px; padding-bottom: 24px; }
.section__head { max-width: 760px; margin-bottom: 40px; }
.kicker { font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.section__head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 720; }
.section__sub { color: var(--muted); font-size: 1.03rem; margin: 0; }
.section__sub a { color: var(--accent); border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.card__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent) 24%, transparent); }
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.02rem; margin: 0 0 8px; letter-spacing: -.01em; }
.card p { font-size: 14px; color: var(--muted); margin: 0; }
.card code { font-size: .88em; background: var(--bg-soft); padding: 1px 5px; border-radius: 5px; color: var(--fg); border: 1px solid var(--border); }

/* CODE */
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.code-card { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.code-card--wide { grid-column: span 1; }
.code-card__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--card-2); }
.code-card__bar .lang { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.code-card pre { margin: 0; padding: 18px 18px; overflow-x: auto; }
.code-card code { font-size: 13px; line-height: 1.7; color: var(--fg); }
.cm { color: var(--muted); font-style: italic; }
.kw { color: var(--accent-2); }
.fn { color: var(--accent); }
.ty { color: #b594ff; }
html[data-theme="light"] .ty { color: #7c3aed; }
.nm { color: #e0b341; }
html[data-theme="light"] .nm { color: #b45309; }
.st { color: #86d67a; }
html[data-theme="light"] .st { color: #15803d; }

/* BENCHMARKS */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 22px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.bench-cap { font-size: 12.5px; color: var(--muted); margin: -8px 0 22px; line-height: 1.5; }
.bench-cap code { font-family: var(--mono); font-size: .92em; background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; }
.legend-item .swatch { width: 11px; height: 11px; border-radius: 3px; }
.legend-item.is-ae { color: var(--fg); font-weight: 600; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.chart-card--wide { grid-column: 1 / -1; }
.chart-card__head { margin-bottom: 18px; }
.chart-card__title { font-size: 1.02rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.chart-card__note { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 12px; }
.bar-row__label { font-family: var(--mono); font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.bar-row.is-ae .bar-row__label { color: var(--fg); font-weight: 650; }
.bar-row__label .swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.bar-track { position: relative; height: 14px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; width: 0; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.bar-row__val { font-family: var(--mono); font-size: 12.5px; color: var(--fg); min-width: 62px; text-align: right; }
.bar-fill.is-ae { box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 50%, transparent), 0 0 18px -4px var(--accent); }
.skeleton { height: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--bg-soft) 25%, var(--card-2) 37%, var(--bg-soft) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.chart-pending { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; padding: 8px 0 2px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bench-foot { font-size: 12.5px; color: var(--muted); margin: 20px 0 0; }

/* SCOPE */
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.scope-col { border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; background: var(--card); }
.scope-col h3 { margin: 0 0 14px; font-size: 1.02rem; display: flex; align-items: center; gap: 9px; }
.scope-col h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.scope-col--yes h3::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.scope-col--no h3::before { background: #e0803a; box-shadow: 0 0 0 4px rgba(224,128,58,.14); }
.scope-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.scope-col li { position: relative; padding-left: 22px; font-size: 14px; color: var(--muted); }
.scope-col li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.scope-col--yes li::before { content: "✓"; color: var(--accent); }
.scope-col--no li::before { content: "—"; color: #e0803a; }
.scope-col code { font-size: .88em; color: var(--fg); background: var(--bg-soft); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--border); }
.scope-col strong { color: var(--fg); }

/* START */
.start-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; align-items: stretch; }
.start-aside { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.start-aside h3 { margin: 0 0 14px; font-size: 1.02rem; }
.repo-link { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; color: var(--accent); padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; width: 100%; transition: border-color .15s; }
.repo-link:hover { border-color: var(--accent); }
.aside-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--muted); }
.aside-list code { font-size: .9em; color: var(--fg); }

/* FOOTER */
.footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 34px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: space-between; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.footer__brand .brand__mark { font-size: 17px; }
.footer__links { display: flex; gap: 18px; font-size: 14px; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--fg); }
.footer__meta { font-size: 12.5px; color: var(--muted); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .bar-fill { transition: none; } }

/* RESPONSIVE */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .charts, .code-grid, .scope-grid, .start-grid { grid-template-columns: 1fr; }
  .glance { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .cards { grid-template-columns: 1fr; }
  .hero__inner { padding-top: 60px; padding-bottom: 56px; }
  .brand__tag { display: none; }
  .install code { font-size: 12px; }
  .bar-row { grid-template-columns: 62px 1fr auto; }
}
