:root {
    --bg: #0f172a;
    --bg-2: #131c31;
    --panel: #1a2338;
    --card: #1e2942;
    --border: #2b3958;
    --text: #e5edff;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-2: #a78bfa;
    --gold: #fbbf24;
    --radius: 14px;
    --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: radial-gradient(1200px 600px at 80% -10%, #1b2a4a 0%, transparent 60%), var(--bg);
    color: var(--text);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }

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

code {
    font-family: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
}

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { color: var(--text); font-weight: 700; letter-spacing: .2px; }
.brand span { color: var(--accent); }
.brand em { color: var(--muted); font-style: normal; font-weight: 500; }
.top-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top-nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.top-nav a:hover { color: var(--text); text-decoration: none; }
.top-nav .ext { color: var(--accent); }

/* Hero */
.hero { padding: 64px 0 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--accent); margin: 0 0 12px; font-weight: 600; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; margin: 0 0 10px; }
.tagline { font-size: clamp(16px, 2.4vw, 20px); color: var(--accent-2); margin: 0 0 18px; font-weight: 500; }
.hero-facts { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); }
.hero-facts strong { color: var(--text); }
.lede { max-width: 780px; color: #cbd7f0; font-size: 17px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.btn {
    display: inline-block; padding: 11px 18px; border-radius: 10px;
    border: 1px solid var(--border); color: var(--text); background: var(--card);
    font-weight: 600; font-size: 14px; transition: .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06121f; border: none; }
.btn.ghost { background: transparent; }

.stat-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.stat-strip div {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 16px; font-size: 13px; color: var(--muted); min-width: 110px; flex: 1 1 auto;
}
.stat-strip span { display: block; font-size: 24px; color: var(--text); font-weight: 700; }

/* Panels */
.panel { padding: 40px 0; border-top: 1px solid var(--border); margin-top: 28px; }
.panel h2 { font-size: 26px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.panel h2 .count { font-size: 14px; color: var(--accent); background: #0b3a52; padding: 2px 10px; border-radius: 999px; }
.section-lede { color: var(--muted); margin: 0 0 22px; }
.hint { margin-top: 18px; padding: 12px 16px; border-left: 3px solid var(--gold); background: #241f10; border-radius: 8px; color: #fde9bf; }

.endpoint {
    display: inline-flex; align-items: center; gap: 12px; margin: 8px 0 24px;
    background: #071426; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.endpoint .method { background: var(--accent); color: #06121f; font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 6px; }
.endpoint code { color: var(--text); font-size: 15px; word-break: break-all; }

pre {
    background: #071426; border: 1px solid var(--border); border-radius: 12px;
    padding: 16px; overflow-x: auto; margin: 0 0 10px;
}
pre code { color: #cfe6ff; line-height: 1.5; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.two-col h3 { margin: 0 0 10px; font-size: 16px; }
.two-col h3 + ul { margin-bottom: 22px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; transition: .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin: 0 0 6px; font-size: 15px; }
.card h3 code { color: var(--accent); }
.card .card-title { color: var(--text); font-weight: 600; margin: 0 0 8px; font-size: 14px; }
.card p { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.card.flagship { border-color: var(--gold); background: linear-gradient(180deg, #241f10, var(--card)); }
.card.flagship h3 code { color: var(--gold); }
.card.template { border-style: dashed; }
.mime { font-size: 11px; color: var(--muted); background: var(--panel); padding: 1px 7px; border-radius: 5px; margin-left: 6px; }

.args { display: flex; flex-wrap: wrap; gap: 6px; }
.arg { font-size: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; color: var(--muted); }
.arg.req { color: var(--gold); border-color: #4a3d16; }

ul.tight { margin: 0; padding-left: 18px; }
ul.tight li { margin-bottom: 6px; color: #cbd7f0; }
ul.tight strong { color: var(--text); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 4px 18px;
}
.faq-item summary {
    cursor: pointer; list-style: none; padding: 14px 0; font-weight: 600; color: var(--text);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-item p { color: #cbd7f0; margin: 12px 0 16px; font-size: 15px; }

.muted { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 0 48px; color: var(--muted); font-size: 14px; }
.site-footer p { margin: 4px 0; }

@media (max-width: 720px) {
    .two-col { grid-template-columns: 1fr; }
    .hero { padding-top: 40px; }
}
