/* Aetherium download site. Clean "browser download page" look; Aetherium's cyan → violet → pink accent. */
:root {
    --bg: #ffffff;
    --bg-tint: #f6f7fb;
    --surface: #ffffff;
    --text: #1f1f1f;
    --muted: #5f6368;
    --line: #e3e5ea;
    --blue: #1a73e8;
    --blue-hover: #1765cc;
    --blue-soft: #e8f0fe;
    --green: #137333;
    --green-soft: #e6f4ea;
    --amber: #a05a00;
    --amber-soft: #fef3e0;
    --red: #c5221f;
    --red-soft: #fce8e6;
    --grad: linear-gradient(90deg, #22c9e6 0%, #7b6cf6 50%, #e45fd6 100%);
    --radius: 16px;
    --shadow: 0 1px 2px rgba(60, 64, 67, .12), 0 2px 8px rgba(60, 64, 67, .08);
    --shadow-lg: 0 12px 40px rgba(60, 64, 67, .18);
    --font: "Google Sans", "Segoe UI Variable Display", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
    --mono: "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121317;
        --bg-tint: #1a1c22;
        --surface: #1e2027;
        --text: #e8eaed;
        --muted: #9aa0a6;
        --line: #33363f;
        --blue: #8ab4f8;
        --blue-hover: #aecbfa;
        --blue-soft: #1f2a3d;
        --green: #81c995;
        --green-soft: #1d3326;
        --amber: #fdd663;
        --amber-soft: #3a3020;
        --red: #f28b82;
        --red-soft: #3c2322;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
        --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-tint); padding: .1em .35em; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 500; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.3rem; font-weight: 500; }
.brand:hover { text-decoration: none; }
.brand small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); padding: 8px 14px; border-radius: 999px; font-size: .95rem; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--bg-tint); text-decoration: none; }

/* ---------- buttons, chips ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: 1px solid transparent; border-radius: 999px; padding: 10px 24px;
    font: 500 1rem/1.2 var(--font); cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--blue); color: #fff; }
@media (prefers-color-scheme: dark) { .btn--primary { color: #0b1a33; } }
.btn--primary:hover { background: var(--blue-hover); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--line); }
.btn--ghost:hover { background: var(--blue-soft); }
.btn--danger { background: var(--red); color: #fff; }
.btn--lg { padding: 16px 34px; font-size: 1.15rem; }
.btn--lg:hover { transform: translateY(-1px); }
.btn--sm { padding: 8px 18px; font-size: .9rem; }
.btn--xs { padding: 4px 10px; font-size: .8rem; }
.btn.is-disabled { opacity: .55; cursor: default; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--bg-tint); color: var(--muted); border: 1px solid var(--line); vertical-align: middle; }
.chip--blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.chip--green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.chip--amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.chip--red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.link-arrow::after { content: " →"; }
.link-back { display: inline-block; margin-bottom: 14px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; text-align: center; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, #7b6cf6 14%, transparent), transparent 70%); }
.hero__emblem { filter: drop-shadow(0 8px 24px rgba(123, 108, 246, .35)); }
.hero__title { font-size: clamp(2.3rem, 5.5vw, 4.2rem); max-width: 900px; margin: 18px auto 18px; font-weight: 500; letter-spacing: -.025em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { max-width: 680px; margin: 0 auto 32px; font-size: 1.15rem; color: var(--muted); }
.hero__cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dl-meta { margin: 0; color: var(--muted); font-size: .9rem; }

/* fake browser window */
.window { margin: 56px auto 0; max-width: 1000px; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); text-align: left; }
.window__tabs { display: flex; align-items: flex-end; gap: 2px; padding: 8px 12px 0; background: var(--bg-tint); }
.window__dots { display: flex; gap: 6px; margin: 0 10px 10px 2px; }
.window__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.window__tab { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); padding: 7px 16px; border-radius: 10px 10px 0 0; width: 170px; white-space: nowrap; overflow: hidden; }
.window__tab img { width: 14px; height: 14px; }
.window__tab.is-active { background: var(--surface); color: var(--text); }
.window__bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.window__nav { color: var(--muted); font-size: .85rem; letter-spacing: 4px; }
.window__omnibox { flex: 1; background: var(--bg-tint); border-radius: 999px; padding: 6px 16px; font-size: .8rem; color: var(--muted); }
.window__agent { color: #7b6cf6; }
.window__view { position: relative; aspect-ratio: 16 / 8; overflow: hidden; }
.window__view picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.window__ntp { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 9%; }
.window__ntp img { width: min(46%, 380px); filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .25)); }
.window__search { width: min(60%, 520px); background: rgba(255, 255, 255, .92); color: #5f6368; border-radius: 999px; padding: 12px 22px; font-size: .9rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section--tight { padding: 36px 0 80px; }
.section--tint { background: var(--bg-tint); }
.section__title { font-size: clamp(1.8rem, 3.6vw, 2.7rem); text-align: center; }
.section__title--left { text-align: left; }
.section__lead { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 640px; }
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature h3 { font-size: 1.2rem; margin-top: 16px; }
.feature p { color: var(--muted); margin: 0; }
.feature__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: var(--grad); }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.update-demo { box-shadow: var(--shadow-lg); max-width: 400px; justify-self: center; }
.update-demo__head { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.update-demo p { color: var(--muted); }
.update-demo__actions { display: flex; gap: 10px; }
.platform h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.platform--yours { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.platform__file { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 -14px; border-radius: 10px; color: var(--text); }
.platform__file:hover { background: var(--blue-soft); text-decoration: none; }
.platform__file small { display: block; color: var(--muted); font-size: .8rem; }

/* ---------- promo video ---------- */
.section--video { padding-top: 40px; }
.video-frame { max-width: 1000px; margin: 0 auto; border-radius: 18px; overflow: hidden; background: #05030d; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.video-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #05030d; }

/* ---------- releases ---------- */
.page-head { padding: 56px 0 24px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.lead { font-size: 1.25rem; margin: 0 0 6px; }
.tabs { display: flex; gap: 6px; margin-top: 22px; }
.tabs a { padding: 8px 18px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); }
.tabs a.is-active { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.tabs a:hover { text-decoration: none; }
.timeline { display: flex; flex-direction: column; gap: 16px; }
.release { display: grid; grid-template-columns: 150px 1fr; gap: 24px; }
.release__side { display: flex; flex-direction: column; gap: 4px; }
.release__version { font-size: 1.6rem; font-weight: 500; color: var(--text); }
.release__side time { color: var(--muted); font-size: .9rem; }
.release__chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.release h2 { font-size: 1.25rem; margin-bottom: 6px; }
.release h2 a { color: var(--text); }
.release__files { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.file-pill { padding: 5px 12px; border-radius: 999px; background: var(--blue-soft); font-size: .85rem; }
.empty { text-align: center; padding: 48px; }
.release-page { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.prose h2 { font-size: 1.35rem; margin-top: 1.2em; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin: .25em 0; }
.downloads { position: sticky; top: 84px; }
.downloads h2 { font-size: 1.2rem; }
.dl-row { border-top: 1px solid var(--line); padding: 12px 0; }
.dl-row__main { display: flex; flex-direction: column; color: var(--text); }
.dl-row__main span { color: var(--muted); font-size: .85rem; }
.dl-row__main:hover strong { color: var(--blue); }
.dl-row__hash summary { cursor: pointer; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.dl-row__hash code { display: block; margin: 6px 0; font-size: .72rem; word-break: break-all; }
.prevnext { display: flex; justify-content: space-between; margin-top: 28px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.pager .is-disabled { color: var(--muted); opacity: .5; }

/* ---------- help center ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.docs-hero { text-align: center; padding: 56px 0 36px; background: radial-gradient(900px 360px at 50% -10%, color-mix(in srgb, #22c9e6 14%, transparent), transparent 70%); }
.docs-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 14px 0 8px; }
.docs-search { display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 26px auto 0; padding: 0 20px; height: 56px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--muted); }
.docs-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.docs-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: 400 1.05rem var(--font); }
.docs-group { margin-bottom: 40px; }
.docs-group__title { font-size: 1.3rem; margin-bottom: 16px; }
.docs-card { display: flex; flex-direction: column; color: var(--text); transition: box-shadow .15s, border-color .15s; }
.docs-card:hover { text-decoration: none; border-color: var(--blue); box-shadow: var(--shadow); }
.docs-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.docs-card p { color: var(--muted); margin: 0 0 12px; flex: 1; }
.docs-card .link-arrow { color: var(--blue); font-size: .9rem; }
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding-top: 36px; padding-bottom: 80px; }
.docs-nav { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: .92rem; }
.docs-nav__home { display: inline-block; margin-bottom: 12px; }
.docs-nav__details > summary { display: none; }
.docs-nav__group { margin: 18px 0 6px; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li a { display: block; padding: 6px 12px; border-radius: 999px; color: var(--text); }
.docs-nav li a:hover { background: var(--bg-tint); text-decoration: none; }
.docs-nav li a.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.docs-crumb { color: var(--muted); font-size: .9rem; margin: 0 0 6px; }
.docs-article h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.docs-prose { max-width: 760px; margin-top: 26px; }
.docs-prose h2 { font-size: 1.45rem; margin: 2em 0 .6em; padding-top: .4em; border-top: 1px solid var(--line); }
.docs-prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.docs-prose h3 { font-size: 1.12rem; margin: 1.5em 0 .4em; }
.docs-prose ol, .docs-prose ul { padding-left: 1.4em; }
.docs-prose li { margin: .35em 0; }
.docs-prose ol.steps { list-style: none; counter-reset: step; padding-left: 0; }
.docs-prose ol.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin: 14px 0; min-height: 30px; }
.docs-prose ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: .9rem; }
.docs-prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .93rem; }
.docs-prose th, .docs-prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-prose th { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.docs-prose .ui { font-weight: 600; }
.docs-prose .col-42 { width: 42%; }
.docs-prose .col-30 { width: 30%; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font: 500 .82em/1.6 var(--mono); text-align: center; color: var(--text); }
.kbd-combo { white-space: nowrap; }
.kbd-plus { color: var(--muted); margin: 0 2px; font-size: .8em; }
.callout { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 12px; margin: 1.2em 0; border-left: 4px solid var(--blue); background: var(--blue-soft); }
.callout strong { font-size: .85rem; letter-spacing: .02em; }
.callout--note { border-left-color: var(--green); background: var(--green-soft); }
.callout--warn { border-left-color: var(--amber); background: var(--amber-soft); }
.callout > div > :first-child { margin-top: 0; }
.callout > div > :last-child { margin-bottom: 0; }
.docs-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; max-width: 760px; }
.docs-prevnext a { display: flex; flex-direction: column; color: var(--text); padding: 16px 20px; }
.docs-prevnext a:hover { border-color: var(--blue); text-decoration: none; }
.docs-prevnext small { color: var(--muted); }
.docs-prevnext__next { text-align: right; grid-column: 2; }
@media (max-width: 900px) {
    .docs-layout { grid-template-columns: 1fr; gap: 20px; }
    .docs-nav { position: static; max-height: none; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
    .docs-nav__details > summary { display: list-item; cursor: pointer; font-weight: 500; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
    .docs-nav__details[open] > summary { margin-bottom: 10px; }
    .docs-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0; background: var(--bg-tint); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.footer nav { display: flex; gap: 22px; flex: 1; flex-wrap: wrap; }
.footer nav a { color: var(--muted); }
.footer p { width: 100%; margin: 0; }

/* ---------- admin ---------- */
.admin__main { padding: 32px 24px 80px; }
.admin__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.admin__head h1 { margin: 0; font-size: 1.8rem; }
.admin__cols { display: grid; grid-template-columns: 1fr 420px; gap: 20px; align-items: start; }
.admin__side { display: flex; flex-direction: column; gap: 20px; }
.admin h2 { font-size: 1.15rem; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.alert--ok { background: var(--green-soft); color: var(--green); }
.alert--err { background: var(--red-soft); color: var(--red); }
.table-wrap { padding: 0; overflow-x: auto; margin-top: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 500; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions a { margin-left: 12px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 500; }
.form input:not([type=checkbox]), .form select, .form textarea {
    font: 400 .95rem/1.4 var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
.form textarea { font-family: var(--mono); font-size: .85rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.form input[readonly] { opacity: .7; }
.form__row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.form__row > * { flex: 1 1 140px; }
.form .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.form__actions { display: flex; gap: 10px; }
.form--upload { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.asset { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.asset code { display: block; margin-top: 4px; font-size: .7rem; word-break: break-all; }
.danger { border-color: var(--red-soft); }
.auth { max-width: 420px; margin: 40px auto; text-align: center; }
.auth .form { text-align: left; margin-top: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .grid--3 { grid-template-columns: 1fr 1fr; }
    .split, .release-page, .admin__cols { grid-template-columns: 1fr; }
    .downloads { position: static; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .topbar__inner { gap: 12px; }
    .nav a { display: none; }
    .nav a[href$="/docs"], .nav a[href*="/releases"] { display: inline; padding: 8px 10px; }
    .grid--3 { grid-template-columns: 1fr; }
    .hero { padding-top: 44px; }
    .window__tab:not(.is-active) { display: none; }
    .window__view { aspect-ratio: 4 / 3; }
    .release { grid-template-columns: 1fr; gap: 6px; }
    .release__side { flex-direction: row; align-items: baseline; gap: 12px; }
    .section { padding: 56px 0; }
}
@media (max-width: 420px) {
    .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
    .btn--lg:hover { transform: none; }
}
