/*
 * ArcPanel portal — static template styles.
 *
 * Colours are tokens on :root. Light is the default; dark applies when the
 * visitor's system prefers it (and no choice was saved), or when
 * <html data-theme="dark"> is set by the theme toggle in assets/js/app.js.
 * Code blocks, terminals and the dashboard mock-up stay dark in both themes.
 */

/* ------------------------------------------------------------------ */
/* 0. Fonts (self-hosted, SIL OFL; licences in ../fonts/)              */
/* ------------------------------------------------------------------ */

/* IBM Plex Sans, latin */
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans, latin-ext */
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono, latin */
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono, latin-ext */
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Schibsted Grotesk, latin */
@font-face {
    font-family: "Schibsted Grotesk";
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Schibsted Grotesk, latin-ext */
@font-face {
    font-family: "Schibsted Grotesk";
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url("../fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ */
/* 1. Tokens                                                           */
/* ------------------------------------------------------------------ */

:root {
    color-scheme: light;

    --font-display: "Schibsted Grotesk", "Segoe UI", sans-serif;
    --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --border: #dfe3ea;
    --border-strong: #c9cfda;
    --fg: #171a20;
    --fg-muted: #525b6b;
    --fg-subtle: #636c7d;

    --accent: #2f55d4;
    --accent-hover: #2443b0;
    --accent-fg: #ffffff;
    --accent-subtle: #eef2fe;
    --accent-line: #b9c7f5;

    --band-bg: #e9edf7;
    --band-surface: #ffffff;
    --band-border: #d3daea;
    --band-border-strong: #b7c0d4;
    --band-fg: #171a20;
    --band-muted: #4a5366;
    --band-accent: #2f55d4;
    --band-accent-fg: #ffffff;
    --band-accent-subtle: #dfe6fb;
    --band-accent-line: #9fb0ec;

    --ok: #1a7a44;
    --ok-subtle: #e7f5ec;
    --ok-ink: #14532d;
    --warn: #f2b451;
    --warn-subtle: #fff8eb;
    --warn-ink: #8a5a00;
    --danger: #a3201b;
    --danger-subtle: #fdecec;
    --danger-line: #f2b2ae;
    --violet: #6d28d9;

    --donate: #f2b451;
    --donate-fg: #0b0d12;
    --donate-ink: #8a5a00;
    --donate-subtle: #fff3dc;

    --code-bg: #0b0d12;
    --code-surface: #11141b;
    --code-raised: #171b24;
    --code-border: #232836;
    --code-border-strong: #333a4a;
    --code-fg: #e8ebf1;
    --code-fg-2: #c3c9d6;
    --code-muted: #838c9e;
    --code-accent: #8ea4ff;
    --code-accent-subtle: #19203d;
    --code-ok: #4cc38a;
    --code-warn: #f2b451;

    --shadow-lg: 0 30px 80px rgba(11, 13, 18, 0.28);
    --shadow-sm: 0 8px 24px rgba(11, 13, 18, 0.1);

    --radius-sm: 8px;
    --radius: 10px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Logo (same lockup and colours as the panel: arcpanel/templates/nocturne/assets/logo/). */
    --logo-tile: #0f1320;
    --logo-ring: #0f1320;
    --logo-mark: #9db0ff;
    --logo-star: #f2b451;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg: #0e1117;
        --surface: #151922;
        --surface-2: #1b2029;
        --border: #262c3a;
        --border-strong: #363e50;
        --fg: #e8ebf1;
        --fg-muted: #a0a8b8;
        --fg-subtle: #8c95a7;

        --accent: #8ea4ff;
        --accent-hover: #a9baff;
        --accent-fg: #0b0d12;
        --accent-subtle: #19203d;
        --accent-line: #36468a;

        --band-bg: #080a0e;
        --band-surface: #11141b;
        --band-border: #232836;
        --band-border-strong: #333a4a;
        --band-fg: #e8ebf1;
        --band-muted: #a0a8b8;
        --band-accent: #8ea4ff;
        --band-accent-fg: #0b0d12;
        --band-accent-subtle: #19203d;
        --band-accent-line: #36468a;

        --ok: #4cc38a;
        --ok-subtle: #0f241a;
        --ok-ink: #8fe0b5;
        --warn-subtle: #2a1f0c;
        --warn-ink: #f2b451;
        --danger: #f27b76;
        --danger-subtle: #2c1515;
        --danger-line: #5c2624;
        --violet: #c4a7ff;

        --donate-ink: #f2b451;
        --donate-subtle: #2a1f0c;

        --logo-ring: #2c355a;

        --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
        --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0e1117;
    --surface: #151922;
    --surface-2: #1b2029;
    --border: #262c3a;
    --border-strong: #363e50;
    --fg: #e8ebf1;
    --fg-muted: #a0a8b8;
    --fg-subtle: #8c95a7;

    --accent: #8ea4ff;
    --accent-hover: #a9baff;
    --accent-fg: #0b0d12;
    --accent-subtle: #19203d;
    --accent-line: #36468a;

    --band-bg: #080a0e;
    --band-surface: #11141b;
    --band-border: #232836;
    --band-border-strong: #333a4a;
    --band-fg: #e8ebf1;
    --band-muted: #a0a8b8;
    --band-accent: #8ea4ff;
    --band-accent-fg: #0b0d12;
    --band-accent-subtle: #19203d;
    --band-accent-line: #36468a;

    --ok: #4cc38a;
    --ok-subtle: #0f241a;
    --ok-ink: #8fe0b5;
    --warn-subtle: #2a1f0c;
    --warn-ink: #f2b451;
    --danger: #f27b76;
    --danger-subtle: #2c1515;
    --danger-line: #5c2624;
    --violet: #c4a7ff;

    --donate-ink: #f2b451;
    --donate-subtle: #2a1f0c;

    --logo-ring: #2c355a;

    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ------------------------------------------------------------------ */
/* 2. Base                                                             */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-hover);
}

img,
svg {
    display: block;
    max-width: 100%;
}

code,
pre,
kbd {
    font-family: var(--font-mono);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

p {
    margin: 0;
    text-wrap: pretty;
}

.nowrap {
    white-space: nowrap;
}

ul,
ol {
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-fg);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

.is-hidden {
    display: none !important;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 24px;
}

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

.text-center {
    text-align: center;
}

.mono {
    font-family: var(--font-mono);
}

/* ------------------------------------------------------------------ */
/* 3. Buttons and small parts                                          */
/* ------------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn--lg {
    min-height: 48px;
    padding: 0 22px;
    font-size: 16px;
}

.btn--block {
    display: flex;
    width: 100%;
}

.btn--primary {
    background: var(--accent);
    color: var(--accent-fg);
}

.btn--primary:hover {
    background: var(--accent-hover);
    color: var(--accent-fg);
}

.btn--secondary {
    border-color: var(--border-strong);
    color: var(--fg);
    font-weight: 500;
}

.btn--secondary:hover {
    background: var(--surface-2);
    color: var(--fg);
}

.btn--outline-accent {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--outline-accent:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}

.btn--band {
    background: var(--band-accent);
    color: var(--band-accent-fg);
}

.btn--band:hover {
    background: var(--accent-hover);
    color: var(--band-accent-fg);
}

.btn--band-ghost {
    border-color: var(--band-border-strong);
    color: var(--band-fg);
    font-weight: 500;
}

.btn--band-ghost:hover {
    background: var(--band-accent-subtle);
    color: var(--band-fg);
}

.btn--donate {
    border-color: var(--donate-ink);
    color: var(--donate-ink);
}

.btn--donate:hover {
    background: var(--donate-subtle);
    color: var(--donate-ink);
}

.btn--donate-solid {
    background: var(--donate);
    color: var(--donate-fg);
    font-weight: 700;
}

.btn--donate-solid:hover {
    background: #f6c574;
    color: var(--donate-fg);
}

.btn--ink {
    background: var(--fg);
    color: var(--bg);
}

.btn--ink:hover {
    background: var(--fg-muted);
    color: var(--bg);
}

.btn--code {
    background: var(--code-accent);
    color: var(--code-bg);
}

.btn--code:hover {
    background: #a9baff;
    color: var(--code-bg);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--band-border-strong);
    border-radius: var(--radius);
    background: transparent;
    color: var(--band-fg);
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--band-accent-subtle);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
}

.band .eyebrow {
    color: var(--band-accent);
}

.eyebrow--donate,
.band .eyebrow--donate {
    color: var(--donate-ink);
}

.eyebrow--ok,
.band .eyebrow--ok {
    color: var(--ok);
}

.badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.badge--warn {
    border: 1px solid var(--warn);
    background: var(--warn-subtle);
    color: var(--warn-ink);
}

.badge--ok {
    border: 1px solid var(--ok);
    background: var(--ok-subtle);
    color: var(--ok-ink);
}

.badge--neutral {
    background: var(--surface-2);
    color: var(--fg-muted);
}

.tag {
    display: inline-flex;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.tag--breaking {
    background: var(--danger-subtle);
    color: var(--danger);
}

.tag--added {
    background: var(--ok-subtle);
    color: var(--ok);
}

.tag--changed {
    background: var(--accent-subtle);
    color: var(--accent);
}

.tag--security {
    background: var(--warn-subtle);
    color: var(--warn-ink);
}

.tag--fixed {
    background: var(--surface-2);
    color: var(--fg-muted);
}

.status-pill {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--band-accent-line);
    border-radius: 999px;
    background: var(--band-accent-subtle);
    color: var(--band-fg);
    font-size: 13px;
}

.status-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
}

.check-icon {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--ok);
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.check-list li {
    display: flex;
    gap: 10px;
}

.check-list__intro {
    color: var(--fg-muted);
    font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* 4. Header and navigation                                            */
/* ------------------------------------------------------------------ */

.band {
    background: var(--band-bg);
    color: var(--band-fg);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--band-bg);
    color: var(--band-fg);
    border-bottom: 1px solid var(--band-border);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--band-fg);
    text-decoration: none;
}

.brand:hover {
    color: var(--band-fg);
}

.brand__logo {
    display: block;
    height: 28px;
    width: auto;
}

.site-footer .brand__logo {
    height: 24px;
}

.brand__tile {
    fill: var(--logo-tile);
}

.brand__ring {
    fill: none;
    stroke: var(--logo-ring);
    stroke-width: 2;
}

.brand__mark {
    fill: none;
    stroke: var(--logo-mark);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand__star {
    fill: var(--logo-star);
}

.brand__word {
    fill: none;
    stroke: currentColor;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-nav__menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 22px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.site-nav__link {
    display: inline-block;
    padding-block: 10px;
    border-bottom: 2px solid transparent;
    color: var(--band-muted);
    text-decoration: none;
}

.site-nav__link:hover {
    color: var(--band-fg);
}

.site-nav__link.is-active {
    border-bottom-color: var(--band-accent);
    color: var(--band-fg);
    font-weight: 500;
}

.site-nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Seven menu items still fit on one line just above the mobile layout. */
@media (min-width: 1024px) and (max-width: 1199px) {
    .site-nav {
        gap: 16px;
    }

    .site-nav__menu {
        gap: 4px 16px;
        font-size: 14px;
    }
}

.nav-toggle {
    display: none;
}

.theme-toggle__sun {
    display: none;
}

:root[data-theme="dark"] .theme-toggle__sun {
    display: block;
}

:root[data-theme="dark"] .theme-toggle__moon {
    display: none;
}

@media (max-width: 1023px) {
    .site-nav {
        flex-wrap: wrap;
        gap: 12px;
        min-height: 64px;
        padding-block: 10px;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .site-nav__menu,
    .site-nav__actions {
        display: none;
        width: 100%;
    }

    .site-header.is-open .site-nav__menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        border-top: 1px solid var(--band-border);
    }

    .site-header.is-open .site-nav__link {
        display: block;
        padding-block: 12px;
        border-bottom: 1px solid var(--band-border);
    }

    .site-header.is-open .site-nav__link.is-active {
        border-bottom-color: var(--band-border);
        color: var(--band-accent);
        font-weight: 600;
    }

    .nav-toggle__close,
    .site-header.is-open .nav-toggle__open {
        display: none;
    }

    .site-header.is-open .nav-toggle__close {
        display: block;
    }

    .site-header.is-open .site-nav__actions {
        display: flex;
        flex-wrap: wrap;
        padding-bottom: 12px;
    }
}

/* ------------------------------------------------------------------ */
/* 5. Heroes and section scaffolding                                   */
/* ------------------------------------------------------------------ */

.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 56px;
    padding-block: 64px 96px;
}

.hero__copy {
    display: flex;
    flex: 1 1 500px;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.hero__visual {
    flex: 1 1 480px;
    min-width: 0;
}

.hero__title {
    font-size: clamp(38px, 5.2vw, 64px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.025em;
    /* Balancing would break "open-source" at its hyphen. */
    text-wrap: wrap;
}

.hero__lead {
    max-width: 560px;
    color: var(--band-muted);
    font-size: 19px;
}

.hero__meta {
    color: var(--band-muted);
    font-size: 14px;
}

.page-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-block: 48px 72px;
}

.page-hero--center {
    align-items: center;
    text-align: center;
}

.page-hero--overlap {
    padding-bottom: 140px;
}

.page-hero__title {
    max-width: 860px;
    font-size: clamp(36px, 4.6vw, 56px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.025em;
}

.page-hero__lead {
    max-width: 680px;
    color: var(--band-muted);
    font-size: 19px;
}

.page-hero__row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.section {
    padding-block: 96px;
}

.section--top {
    padding-block: 96px 48px;
}

.section--tight {
    padding-block: 48px;
}

.section--end {
    padding-block: 48px 96px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 760px;
    margin-bottom: 40px;
}

.section-head--row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    max-width: none;
    margin-bottom: 24px;
}

.section-title {
    font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.1;
}

.section-title--sm {
    font-size: clamp(26px, 3vw, 36px);
}

.section-lead {
    color: var(--fg-muted);
    font-size: 18px;
}

.band .section-lead {
    color: var(--band-muted);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stack--lg {
    gap: 28px;
}

.split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 48px;
}

.split--top {
    align-items: flex-start;
}

.split__col {
    display: flex;
    flex: 1 1 420px;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.split__col--narrow {
    flex: 1 1 320px;
    gap: 12px;
}

.split__col--wide {
    flex: 2 1 560px;
    gap: 10px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid--180 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.grid--220 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid--240 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid--250 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid--260 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--300 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--420 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.panel {
    padding: clamp(24px, 4vw, 56px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
}

.panel--accent {
    border-color: var(--accent-line);
}

.panel--band {
    border-color: var(--band-border);
    background: var(--band-bg);
    color: var(--band-fg);
}

.panel--code {
    border-color: var(--code-border);
    background: var(--code-bg);
    color: var(--code-fg);
}

/* ------------------------------------------------------------------ */
/* 6. Cards                                                            */
/* ------------------------------------------------------------------ */

.card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--fg);
}

a.card {
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

a.card:hover {
    border-color: var(--accent-line);
    color: var(--fg);
    transform: translateY(-2px);
}

.card--row {
    flex-direction: row;
    gap: 14px;
}

.card--lg {
    gap: 14px;
    padding: 28px;
    border-radius: var(--radius-lg);
}

.card__icon {
    flex-shrink: 0;
    color: var(--accent);
}

.card__title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card__title--lg {
    font-size: 22px;
}

.card__text {
    color: var(--fg-muted);
    font-size: 15px;
}

.card__grow {
    flex-grow: 1;
}

.card__link {
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
}

.card__kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
}

.card__price {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.card__price small {
    color: var(--fg-muted);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
}

.trust-strip {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.trust-strip__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px 32px;
    padding-block: 28px;
    list-style: none;
    font-weight: 500;
}

.trust-strip__item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trust-strip__item svg {
    color: var(--accent);
}

.num-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    list-style: none;
}

.num-list li {
    display: flex;
    gap: 14px;
}

.num-badge {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}

.num-list__text {
    color: var(--fg-muted);
}

.num-list strong {
    color: var(--fg);
}

.fund-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    border: 1px solid var(--band-border);
    border-radius: var(--radius-lg);
    background: var(--band-surface);
}

.fund-card--featured {
    border-color: var(--band-accent-line);
}

.fund-card__icon--accent {
    color: var(--band-accent);
}

.fund-card__icon--donate {
    color: var(--donate-ink);
}

.fund-card__icon--ok {
    color: var(--ok);
}

.fund-card__text {
    flex-grow: 1;
    color: var(--band-muted);
}

.fund-card .btn {
    align-self: flex-start;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cta-row__copy {
    display: flex;
    flex: 1 1 480px;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.cta-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(24px, 4vw, 48px);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-xl);
    background: var(--accent-subtle);
}

.cta-banner__copy {
    display: flex;
    flex: 1 1 480px;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.cta-banner__title {
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 700;
}

.cta-banner__text {
    color: var(--fg-muted);
}

/* As a split column the banner stacks: copy on top, button below. */
.split__col.cta-banner {
    align-items: flex-start;
    justify-content: flex-start;
}

.split__col.cta-banner .cta-banner__copy {
    flex: 0 0 auto;
}

/* ------------------------------------------------------------------ */
/* 7. Terminal, code and dashboard mock-up                             */
/* ------------------------------------------------------------------ */

.terminal {
    overflow: hidden;
    border: 1px solid var(--code-border);
    border-radius: 12px;
    background: var(--code-surface);
    color: var(--code-fg);
}

.terminal--deep {
    background: var(--code-bg);
}

.terminal__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--code-border);
    color: var(--code-muted);
    font-size: 13px;
}

.terminal__title {
    font-family: var(--font-mono);
    font-size: 12px;
}

/* Scrollbars on the always-dark code surfaces match them. */
.terminal__body,
.code-line,
.cmd__code {
    scrollbar-width: thin;
    scrollbar-color: var(--code-border-strong) transparent;
}

.terminal__body {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.8;
}

.terminal__body--lg {
    padding: 20px;
    font-size: 13.5px;
    line-height: 1.9;
}

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

.t-cmd {
    color: var(--code-accent);
}

.t-ok {
    color: var(--code-ok);
}

.copy-btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--code-border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--code-fg-2);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.copy-btn:hover {
    border-color: var(--code-accent);
    color: var(--code-fg);
}

.copy-btn.is-copied {
    border-color: var(--code-ok);
    color: var(--code-ok);
}

.code-line {
    margin: 0;
    padding: 10px 14px;
    overflow-x: auto;
    border: 1px solid var(--code-border);
    border-radius: var(--radius);
    background: var(--code-surface);
    color: var(--code-fg);
    font-size: 13px;
    line-height: 1.8;
}

.inline-code {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--fg);
    font-size: 0.9em;
}

.panel--code .inline-code,
.mockup .inline-code {
    background: var(--code-raised);
    color: var(--code-fg);
}

.mockup {
    overflow: hidden;
    border: 1px solid var(--code-border);
    border-radius: var(--radius-lg);
    background: var(--code-surface);
    color: var(--code-fg);
    box-shadow: var(--shadow-lg);
}

.mockup__chrome {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--code-border);
}

.mockup__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--code-border-strong);
}

.mockup__url {
    margin-left: 12px;
    color: var(--code-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}

.mockup__body {
    display: flex;
    min-height: 380px;
}

.mockup__side {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 4px;
    width: 168px;
    margin: 0;
    padding: 16px 10px;
    border-right: 1px solid var(--code-border);
    list-style: none;
    color: #a0a8b8;
    font-size: 13px;
}

.mockup__side li {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
}

.mockup__side .is-active {
    background: var(--code-accent-subtle);
    color: #c7d2ff;
}

.mockup__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: 20px;
}

.mockup__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mockup__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
}

.mockup__kbd {
    padding: 4px 10px;
    border: 1px solid var(--code-border-strong);
    border-radius: 6px;
    color: #a0a8b8;
    font-size: 11px;
}

.mockup__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stat {
    padding: 12px;
    border: 1px solid var(--code-border);
    border-radius: var(--radius);
    background: var(--code-raised);
}

.stat__label {
    color: var(--code-muted);
    font-size: 11px;
}

.stat__value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

.meters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--code-border);
    border-radius: var(--radius);
    background: var(--code-raised);
}

.meter__row {
    display: flex;
    justify-content: space-between;
    color: #a0a8b8;
    font-size: 12px;
}

.meter__track {
    height: 6px;
    border-radius: 3px;
    background: var(--code-border);
}

.meter__fill {
    height: 6px;
    border-radius: 3px;
    background: var(--code-accent);
}

.meter__fill--23 {
    width: 23%;
}

.meter__fill--41 {
    width: 41%;
}

.meter__fill--58 {
    width: 58%;
}

.events {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--code-fg-2);
    font-size: 12px;
}

.events li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.events__ok {
    color: var(--code-ok);
}

.events__warn {
    color: var(--code-warn);
}

@media (max-width: 560px) {
    .mockup__side {
        display: none;
    }
}

/* ------------------------------------------------------------------ */
/* 8. Support plans                                                    */
/* ------------------------------------------------------------------ */

.notice-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--band-accent-line);
    border-radius: 12px;
    background: var(--band-accent-subtle);
    color: var(--band-fg);
    font-size: 14px;
    text-align: left;
}

.overlap {
    margin-top: -96px;
}

.segmented {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.segmented--center {
    align-self: center;
}

.segmented--full {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    box-shadow: none;
    background: var(--band-bg);
}

.segmented__btn {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--fg-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.segmented__btn[aria-pressed="true"] {
    background: var(--fg);
    color: var(--bg);
}

.plans {
    align-items: stretch;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.plan--featured {
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

.plan__badge {
    position: absolute;
    top: -13px;
    left: 28px;
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-fg);
    font-size: 12px;
    font-weight: 600;
}

.plan__head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan__name {
    font-size: 22px;
    font-weight: 700;
}

.plan__desc {
    color: var(--fg-muted);
    font-size: 15px;
}

.plan__price {
    display: flex;
    flex-direction: column;
}

.plan__amount-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.plan__amount {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.plan__unit,
.plan__note {
    color: var(--fg-muted);
    font-size: 14px;
}

.plan__note {
    font-size: 13px;
}

.plans-footnote {
    color: var(--fg-muted);
    font-size: 14px;
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.compare-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 15px;
}

.compare-table th,
.compare-table td {
    padding: 14px 20px;
    text-align: left;
    vertical-align: top;
}

.compare-table thead th {
    background: var(--surface-2);
    font-weight: 600;
}

.compare-table thead th:first-child {
    width: 32%;
    color: var(--fg-muted);
}

.compare-table tbody tr {
    border-top: 1px solid var(--border);
}

.compare-table tbody th {
    font-weight: 500;
}

.compare-table .is-muted {
    color: var(--fg-subtle);
}

.compare-table .is-accent {
    color: var(--accent);
}

/* Small screens: the row labels stay in view while the plans scroll. */
@media (max-width: 760px) {
    .compare-table {
        min-width: 640px;
        font-size: 14px;
    }

    .compare-table th,
    .compare-table td {
        padding: 12px 14px;
    }

    .compare-table thead th:first-child,
    .compare-table tbody th {
        position: sticky;
        left: 0;
        z-index: 1;
        width: 132px;
        box-shadow: inset -1px 0 0 var(--border);
    }

    .compare-table tbody th {
        background: var(--surface);
    }
}

.callout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.callout--row {
    flex-direction: row;
    gap: 14px;
    padding: 24px;
}

.callout--ok {
    border-color: transparent;
    background: var(--ok-subtle);
    color: var(--ok-ink);
}

.callout--warn {
    border-color: var(--warn);
    background: var(--warn-subtle);
    color: var(--warn-ink);
}

.callout--danger {
    border-color: var(--danger-line);
    background: var(--danger-subtle);
    color: var(--danger);
}

.callout__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.callout__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
}

.callout__body a {
    color: inherit;
    font-weight: 600;
}

.callout__title {
    font-size: 20px;
    font-weight: 600;
}

.callout__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 20px;
}

.callout:not(.callout--ok) .callout__list {
    color: var(--fg-muted);
}

.faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq__item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.faq__item[open] {
    border-color: var(--border-strong);
}

/* The whole summary row is the hit area; a chevron replaces the marker. */
.faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
    display: none;
}

.faq__item summary::after {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    margin-top: -4px;
    border-right: 2px solid var(--fg-subtle);
    border-bottom: 2px solid var(--fg-subtle);
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.faq__item[open] summary::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

.faq__item summary:hover::after {
    border-color: var(--accent);
}

.faq__item p {
    margin-top: -6px;
    padding: 0 22px 18px;
    color: var(--fg-muted);
}

/* ------------------------------------------------------------------ */
/* 9. Forms                                                            */
/* ------------------------------------------------------------------ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field--full {
    grid-column: 1 / -1;
}

.field__label {
    font-size: 14px;
    font-weight: 600;
}

.panel--band .field__label {
    color: var(--band-muted);
    font-weight: 500;
}

.input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--fg);
    font: inherit;
}

.input--mono {
    font-family: var(--font-mono);
    font-size: 14px;
}

textarea.input {
    padding: 12px 14px;
    resize: vertical;
}

.input.error {
    border-color: var(--danger);
}

label.error {
    color: var(--danger);
    font-size: 13px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    grid-column: 1 / -1;
}

.form-hint {
    color: var(--fg-subtle);
    font-size: 13px;
}

.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact__intro {
    display: flex;
    flex: 1 1 340px;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.contact__intro p {
    color: var(--band-muted);
}

.contact__options {
    display: flex;
    flex: 1 1 460px;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

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

.contact__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 0;
    list-style: none;
}

/* ------------------------------------------------------------------ */
/* 10. Donate                                                          */
/* ------------------------------------------------------------------ */

.donate-box {
    display: flex;
    flex: 1 1 420px;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--band-border);
    border-radius: 18px;
    background: var(--band-surface);
}

.donate-box__legend {
    margin-bottom: 10px;
    padding: 0;
    color: var(--band-muted);
    font-size: 14px;
}

.donate-box fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.donate-box__note {
    color: var(--band-muted);
    font-size: 13px;
    text-align: center;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.amount-btn {
    min-height: 52px;
    border: 1px solid var(--band-border-strong);
    border-radius: var(--radius);
    background: transparent;
    color: var(--band-fg);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.amount-btn[aria-pressed="true"] {
    border-color: var(--donate);
    background: var(--donate-subtle);
    color: var(--donate-ink);
}

.hero-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 0;
    list-style: none;
    color: var(--band-muted);
    font-size: 15px;
}

.hero-checks li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-checks svg {
    color: var(--ok);
}

.give-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.give-card--wrap {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

.give-card--code {
    border-color: var(--code-border);
    background: var(--code-bg);
    color: var(--code-fg);
}

.give-card__info {
    display: flex;
    flex: 1 1 200px;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.give-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.give-card__title {
    font-size: 20px;
    font-weight: 600;
}

.give-card__sub {
    color: var(--fg-muted);
    font-size: 13px;
}

.give-card--code .give-card__sub,
.give-card--code .give-card__hint,
.give-card--code .field__label {
    color: var(--code-muted);
}

.give-card__text {
    flex-grow: 1;
    color: var(--fg-muted);
}

.give-card__hint {
    font-size: 13px;
}

.logo-tile {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.logo-tile--ink {
    background: var(--fg);
    color: var(--bg);
}

.logo-tile--accent {
    background: var(--accent-subtle);
    color: var(--accent);
}

.logo-tile--ok {
    background: var(--ok-subtle);
    color: var(--ok);
}

.logo-tile--code {
    background: var(--code-accent-subtle);
    color: var(--code-accent);
}

.kv {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0;
    font-size: 14px;
}

.kv dt {
    color: var(--fg-muted);
}

.kv dd {
    margin: 0;
    font-weight: 500;
}

.qr-slot {
    display: flex;
    flex: 0 0 156px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 156px;
    border: 2px dashed var(--border-strong);
    border-radius: 12px;
    color: var(--fg-subtle);
    font-size: 13px;
    text-align: center;
}

.give-card--code .qr-slot {
    border-color: var(--code-border-strong);
    color: var(--code-muted);
}

.wallet {
    display: flex;
    gap: 8px;
}

.wallet .input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    border-color: var(--code-border-strong);
    background: var(--code-surface);
    color: var(--code-fg);
    font-family: var(--font-mono);
    font-size: 13px;
}

.tier {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.tier--gold {
    border-color: var(--warn);
    background: var(--warn-subtle);
}

.tier__name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}

.tier__price {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
}

.tier__price small,
.tier__text {
    color: var(--fg-muted);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
}

.tier--gold .tier__price small,
.tier--gold .tier__text {
    color: var(--warn-ink);
}

.sponsor-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px;
    border: 2px dashed var(--border-strong);
    border-radius: 12px;
    color: var(--fg-subtle);
    font-size: 14px;
    text-decoration: none;
}

.sponsor-slot--cta {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.sponsor-slot--wide {
    padding-inline: 16px;
    text-align: center;
}

/* ------------------------------------------------------------------ */
/* 11. Installation                                                    */
/* ------------------------------------------------------------------ */

.req-card__title {
    font-weight: 600;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(20px, 3vw, 40px);
    border-radius: 18px;
}

.install-steps__title {
    font-size: 26px;
    font-weight: 700;
}

.install-steps__title + p,
.install-steps p {
    color: #a0a8b8;
}

.install-steps__title--spaced {
    margin-top: 12px;
}

.install-steps__note {
    color: var(--code-muted);
    font-size: 14px;
}

.cmd {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--code-border-strong);
    border-radius: var(--radius);
}

.cmd--active {
    border-color: var(--code-accent);
}

.cmd__code {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    overflow-x: auto;
    background: var(--code-surface);
    font-size: 14px;
    line-height: 1.7;
    white-space: nowrap;
}

.cmd__code--wrap {
    white-space: pre-wrap;
    word-break: break-word;
}

.cmd__btn {
    flex-shrink: 0;
    min-width: 88px;
    border: 0;
    background: var(--code-accent);
    color: var(--code-bg);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.cmd__btn.is-copied {
    background: var(--code-ok);
}

/* Step 3 sits after the options in one wrapper and its command bar sticks to the
   viewport bottom while the options scroll by (spec 2026-10-19-001, decision 1). */
.install-flow {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.install-run {
    margin-top: 24px;
}

.install-run__bar {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    overflow: hidden;
    border: 1px solid var(--code-accent);
    border-radius: var(--radius);
    background: var(--code-surface);
    box-shadow: var(--shadow-sm);
    color: var(--code-fg);
}

.install-run__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 16px;
    padding: 6px 16px;
    border-bottom: 1px solid var(--code-border-strong);
    color: var(--code-muted);
    font-size: 13px;
}

.install-run__cmd {
    border: 0;
    border-radius: 0;
}

.install-run__cmd .cmd__code {
    max-height: 30vh;
    overflow-y: auto;
}

.link-btn {
    min-height: 32px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--code-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.link-btn.is-copied {
    color: var(--code-ok);
}

.cmd__part {
    white-space: nowrap;
}

/* Presets above the options (spec 2026-10-19-001, decision 2). */
.preset-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.preset {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.preset:has(.preset__input:checked) {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.preset:has(.preset__input:disabled) {
    cursor: default;
}

.preset__input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--accent);
}

.preset__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.preset__label {
    font-weight: 600;
}

.preset__hint {
    color: var(--fg-muted);
    font-size: 14px;
}

.settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.settings .input {
    min-height: 44px;
}

.switch-field {
    display: flex;
    align-items: center;
    align-self: end;
    gap: 10px;
    min-height: 44px;
    cursor: pointer;
}

.switch-field__flag {
    color: var(--fg-subtle);
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: nowrap;
}

/* The unattended switch and its hint take a whole row, so the hint has room to read. */
.switch-wrap {
    grid-column: 1 / -1;
}

.switch-wrap .switch-field {
    align-self: flex-start;
}

.field__hint {
    color: var(--fg-muted);
    font-size: 14px;
}

.field__error {
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
}

.input[aria-invalid="true"] {
    border-color: var(--danger);
}

.checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--accent);
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.option-group__title {
    float: left;
    width: 100%;
    margin-top: 8px;
    padding: 0;
    font-size: 19px;
    font-weight: 600;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.option .checkbox {
    margin-top: 2px;
}

.option.is-checked {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.option__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.option__label {
    font-weight: 600;
}

.option__hint {
    color: var(--fg-muted);
    font-size: 14px;
}

.option__flag {
    color: var(--fg-subtle);
    font-family: var(--font-mono);
    font-size: 12px;
}

/* An option the installer turns off (or on) because of another option. */
.option__needs {
    display: none;
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 600;
}

.option.is-disabled {
    cursor: not-allowed;
}

.option.is-disabled .option__label,
.option.is-disabled .option__hint {
    opacity: 0.6;
}

.option.is-disabled .option__needs {
    display: block;
}

/* ------------------------------------------------------------------ */
/* 12. Documentation                                                   */
/* ------------------------------------------------------------------ */

.search-box {
    display: flex;
    max-width: 640px;
    overflow: hidden;
    border: 1px solid var(--band-border-strong);
    border-radius: 12px;
    background: var(--band-surface);
}

.search-box__input {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding-inline: 16px;
    border: 0;
    background: transparent;
    color: var(--band-fg);
    font: inherit;
}

.search-box__input:focus {
    outline: none;
}

.search-box:focus-within {
    border-color: var(--band-accent);
}

.search-box__key {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--band-muted);
    font-size: 12px;
}

.docs-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 40px;
    padding-block: 40px 96px;
}

.docs-nav {
    display: flex;
    flex: 1 1 220px;
    flex-direction: column;
    gap: 22px;
    max-width: 260px;
    font-size: 15px;
}

.docs-nav__sections {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.docs-nav__group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-nav__toggle {
    display: none;
}

/*
 * Narrow screens: the section list folds behind a toggle, so the page
 * content follows the search box. The <head> script adds .js to <html>
 * before the first paint, so the list never shows and then folds. Without
 * JavaScript the list stays open.
 */
@media (max-width: 900px) {
    .docs-nav {
        flex-basis: 100%;
        max-width: none;
    }

    .js .docs-nav .docs-nav__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 0 16px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--surface);
        color: var(--fg);
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }

    .docs-nav__toggle svg {
        transition: transform 0.2s;
    }

    .docs-nav.is-open .docs-nav__toggle svg {
        transform: rotate(180deg);
    }

    .js .docs-nav:not(.is-open) .docs-nav__sections {
        display: none;
    }

    .docs-nav__link {
        padding-block: 11px;
    }
}

.docs-nav__title {
    padding: 0 10px 6px;
    color: var(--fg-subtle);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.docs-nav__link {
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--fg-muted);
    text-decoration: none;
}

.docs-nav__link:hover {
    background: var(--surface-2);
    color: var(--fg);
}

.docs-nav__link.is-active {
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 600;
}

.docs-main {
    display: flex;
    flex: 999 1 560px;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.docs-main__title {
    font-size: 28px;
    font-weight: 700;
}

.topic-card__count {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
}

/* A guide that is not written yet. */
.soon {
    display: inline-flex;
    align-self: flex-start;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--fg-subtle);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.docs-nav__link--soon {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: var(--fg-subtle);
}

.docs-nav__link--soon .soon {
    flex-shrink: 0;
}

.docs-nav__link--soon:hover {
    background: transparent;
    color: var(--fg-subtle);
}

.card--soon .card__title,
.card--soon .card__text {
    color: var(--fg-muted);
}

.ref-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.ref-card {
    display: flex;
    flex: 1 1 300px;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--code-bg);
    color: var(--code-fg);
}

.ref-card p {
    color: #a0a8b8;
    font-size: 15px;
}

.ref-card a {
    color: var(--code-accent);
    font-weight: 600;
}

.ref-card__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
}

.docs-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--fg-muted);
}

.empty-state {
    padding: 24px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--fg-muted);
    text-align: center;
}
/* Guides of the docs section (spec 2026-10-23-002 §4.1). */

.docs-search {
    position: relative;
    max-width: 640px;
}

.docs-search--compact .search-box__input {
    min-height: 44px;
    font-size: 15px;
}

.search-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: min(420px, 70vh);
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    list-style: none;
}

.docs-search--compact .search-results {
    min-width: 280px;
}

.search-results__item a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--fg);
    text-decoration: none;
}

.search-results__item a:hover,
.search-results__item.is-selected a {
    background: var(--accent-subtle);
}

.search-results__title {
    font-weight: 600;
}

.search-results__meta {
    color: var(--fg-muted);
    font-size: 13px;
}

.search-results__empty {
    padding: 10px 12px;
    color: var(--fg-muted);
    font-size: 14px;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    margin: 0;
    padding: 0;
    color: var(--fg);
    font-size: 14px;
    list-style: none;
}

.breadcrumbs__list li {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

/* The separator is drawn, not read: the list already tells screen readers the order. */
.breadcrumbs__list li + li::before {
    margin-right: 8px;
    color: var(--fg-subtle);
    content: "›";
    content: "›" / "";
}

/* Links are muted and underline on hover; a last item without a link reads as where you are. */
.breadcrumbs__list a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 4px;
    color: var(--fg-muted);
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.breadcrumbs__list a:hover {
    color: var(--fg);
    text-decoration: underline;
}

.doc {
    gap: 28px;
}

.doc__head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: -16px;
}

.doc__title {
    font-size: clamp(30px, 4vw, 40px);
}

.doc__lead {
    max-width: 68ch;
    color: var(--fg-muted);
    font-size: 18px;
}

.doc__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--fg-subtle);
    font-size: 14px;
}

.doc__body {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 40px;
}

.doc-toc {
    position: sticky;
    top: 96px;
    flex: 0 0 200px;
    font-size: 14px;
}

.doc-toc__title {
    margin-bottom: 8px;
    color: var(--fg-subtle);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.doc-toc__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.doc-toc__list a {
    color: var(--fg-muted);
    text-decoration: none;
}

.doc-toc__list a:hover {
    color: var(--accent);
}

@media (max-width: 1200px) {
    .doc-toc {
        display: none;
    }
}

.prose--doc {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 76ch;
    line-height: 1.7;
}

/* Long URLs and paths in running text break instead of widening the page */
.prose--doc p,
.prose--doc li {
    overflow-wrap: anywhere;
}

.prose--doc h2,
.prose--doc h3 {
    scroll-margin-top: 96px;
}

.prose--doc a {
    color: var(--accent);
}

.prose--doc .heading-anchor {
    margin-left: 8px;
    color: var(--fg-subtle);
    font-weight: 400;
    text-decoration: none;
    opacity: 0;
}

.prose--doc h2:hover .heading-anchor,
.prose--doc h3:hover .heading-anchor,
.prose--doc .heading-anchor:focus {
    opacity: 1;
}

.prose--doc :not(pre) > code {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--surface-2);
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

.prose--doc table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15px;
}

.prose--doc th,
.prose--doc td {
    padding: 8px 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.prose--doc th {
    background: var(--surface-2);
}

/* Options and paths in a table stay on one line; the table scrolls instead. */
.prose--doc td code {
    overflow-wrap: normal;
    white-space: nowrap;
}

.prose--doc blockquote {
    margin: 0;
    padding: 4px 0 4px 16px;
    border-left: 3px solid var(--border-strong);
    color: var(--fg-muted);
}

.prose--doc blockquote.callout {
    gap: 6px;
    padding: 16px 20px;
    border-left-width: 1px;
    border-radius: var(--radius-md);
    color: var(--fg);
}

.prose--doc blockquote.callout--doc:not(.callout--warn) {
    border-color: var(--accent-line);
    background: var(--accent-subtle);
}

.prose--doc blockquote.callout--warn {
    color: var(--warn-ink);
}

/* Screenshots of the panel (spec 2026-10-23-004 §3.2) */
.doc-figure {
    margin: 24px 0;
}

.doc-figure__link {
    display: block;
}

.doc-figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.prose--doc img {
    max-width: 100%;
    height: auto;
}

.doc-figure figcaption {
    margin-top: 8px;
    color: var(--fg-muted);
    font-size: 14px;
}

.callout__label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.doc-code {
    position: relative;
}

.doc-code pre {
    margin: 0;
    padding: 16px 84px 16px 16px;
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: var(--code-bg);
    color: var(--code-fg);
    font-size: 14px;
    line-height: 1.6;
    scrollbar-color: var(--code-border-strong) transparent;
    scrollbar-width: thin;
}

.doc-code__btn {
    position: absolute;
    top: 10px;
    right: 10px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--code-border-strong);
    border-radius: var(--radius-sm);
    background: var(--code-raised);
    color: var(--code-fg-2);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.doc-code__btn:hover,
.doc-code__btn.is-copied {
    color: var(--code-fg);
}

/* On phones a long command scrolls under the button: give the button its own strip above the code. */
@media (max-width: 600px) {
    .doc-code pre {
        padding: 62px 16px 16px;
    }

    .doc-code__btn {
        min-height: 44px;
        padding: 0 16px;
    }
}

.doc-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.doc-pager__link {
    display: flex;
    flex: 1 1 240px;
    flex-direction: column;
    gap: 2px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--fg);
    font-weight: 600;
    text-decoration: none;
}

.doc-pager__link:hover {
    border-color: var(--accent-line);
}

.doc-pager__link--next {
    align-items: flex-end;
    text-align: right;
}

.doc-pager__dir {
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* 13. Changelog                                                       */
/* ------------------------------------------------------------------ */

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    min-height: 40px;
    padding-inline: 16px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--fg-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.chip[aria-pressed="true"] {
    border-color: var(--fg);
    background: var(--fg);
    color: var(--bg);
}

.chip--link {
    display: inline-flex;
    align-items: center;
    border-color: var(--band-border-strong);
    background: transparent;
    color: var(--band-muted);
    text-decoration: none;
}

.chip--link:hover {
    color: var(--band-fg);
}

.release {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.release + .release {
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.release__meta {
    display: flex;
    flex: 1 1 220px;
    flex-direction: column;
    align-self: flex-start;
    gap: 8px;
    max-width: 260px;
}

/* Side by side, the version stays in view while its changes scroll. */
@media (min-width: 1024px) {
    .release__meta {
        position: sticky;
        top: 96px;
    }
}

.release__version {
    font-size: 34px;
    font-weight: 800;
}

.release__summary {
    color: var(--fg-muted);
    font-size: 15px;
}

.release__body {
    display: flex;
    flex: 999 1 560px;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.release__empty {
    padding: 20px 0;
    color: var(--fg-muted);
    font-size: 15px;
}

.change-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.change-group__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.change-group__count {
    color: var(--fg-subtle);
    font-size: 14px;
}

.change-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    list-style: none;
}

.change-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.change-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.change-list span {
    color: var(--fg-muted);
    font-size: 15px;
}

.subscribe {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px;
    border-radius: 18px;
}

.subscribe__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subscribe__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
}

.subscribe__text {
    color: var(--band-muted);
    font-size: 15px;
}

.subscribe__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ------------------------------------------------------------------ */
/* 14. Contributing                                                    */
/* ------------------------------------------------------------------ */

.way-card__tag {
    font-family: var(--font-mono);
    font-size: 12px;
}

.way-card__tag--code {
    color: var(--accent);
}

.way-card__tag--ok {
    color: var(--ok);
}

.way-card__tag--danger {
    color: var(--danger);
}

.way-card__tag--violet {
    color: var(--violet);
}

.way-card__tag--warn {
    color: var(--warn-ink);
}

.steps {
    display: flex;
    flex: 1 1 520px;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: clamp(20px, 3vw, 36px);
    border-radius: 18px;
}

.steps__title {
    font-size: 26px;
    font-weight: 700;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
    list-style: none;
}

.step-list li {
    display: flex;
    gap: 14px;
}

.step-list__num {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--code-accent-subtle);
    color: var(--code-accent);
    font-size: 14px;
    font-weight: 700;
}

.step-list__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.step-list .t-cmd {
    font-family: var(--font-mono);
}

.rules {
    display: flex;
    flex: 1 1 360px;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: clamp(20px, 3vw, 36px);
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.rules ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 20px;
    color: var(--fg-muted);
}

.avatars {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 10px;
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--accent-subtle);
    color: var(--fg-subtle);
    font-size: 12px;
}

.avatar:nth-child(4n + 2) {
    background: var(--ok-subtle);
}

.avatar:nth-child(4n + 3) {
    background: var(--warn-subtle);
}

.avatar:nth-child(4n) {
    background: var(--surface-2);
}

.avatar--you {
    border: 2px dashed var(--accent);
    background: var(--surface);
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.placeholder-note {
    color: var(--fg-subtle);
    font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* 15. AI agents                                                       */
/* ------------------------------------------------------------------ */

/* Demo conversation: every line is in the HTML; app.js hides and replays them. */
.agent-demo {
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.agent-demo__bar {
    padding-block: 8px;
}

.agent-demo__tabs {
    display: flex;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.agent-demo__tab {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--code-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.agent-demo__tab:hover {
    color: var(--code-fg);
}

.agent-demo__tab[aria-selected="true"] {
    border-color: var(--code-border-strong);
    background: var(--code-raised);
    color: var(--code-fg);
}

.agent-demo__control {
    flex: 0 0 auto;
    min-height: 32px;
}

.agent-demo__screen {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 440px;
    padding: 18px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.65;
    scrollbar-width: thin;
    scrollbar-color: var(--code-border-strong) transparent;
}

.agent-demo__screen[hidden] {
    display: none;
}

.agent-demo--mini .agent-demo__screen {
    height: 300px;
}

.agent-line {
    display: flex;
    gap: 10px;
    min-width: 0;
    margin: 0;
}

.agent-line__who {
    flex: 0 0 44px;
    color: var(--code-muted);
    font-size: 12px;
    line-height: 1.85;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.agent-line__text {
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.agent-line--user .agent-line__who,
.agent-line--confirm .agent-line__who {
    color: var(--code-warn);
}

.agent-line--user .agent-line__text,
.agent-line--confirm .agent-line__text {
    color: var(--code-fg);
}

.agent-line--agent .agent-line__who {
    color: var(--code-ok);
}

.agent-line--agent .agent-line__text {
    color: var(--code-fg-2);
    font-family: var(--font-sans);
    font-size: 14px;
}

.agent-line--cmd,
.agent-line--out {
    padding-left: 54px;
}

.agent-line--cmd .agent-line__text {
    padding-left: 2ch;
    color: var(--code-accent);
    text-indent: -2ch;
}

.agent-line--cmd .agent-line__text::before {
    content: "$ ";
    color: var(--code-muted);
}

.agent-line--out .agent-line__text {
    overflow-x: auto;
    color: var(--code-muted);
    white-space: pre;
    scrollbar-width: thin;
}

.agent-line--out .agent-line__text--wrap {
    white-space: pre-wrap;
}

.agent-line--out .agent-line__text.t-ok {
    color: var(--code-ok);
}

/* Lines wait for their turn only while app.js plays the conversation. */
.agent-demo.is-animated .agent-line:not(.is-shown) {
    display: none;
}

.agent-line.is-typing .agent-line__text::after {
    content: "▍";
    margin-left: 1px;
    color: var(--code-fg-2);
    animation: agent-caret 1s steps(1) infinite;
}

@keyframes agent-caret {
    50% {
        opacity: 0;
    }
}

/* How it works: the layers from the agent down to the panel. */
.layer-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.layer {
    position: relative;
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.layer:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -23px;
    left: 40px;
    width: 2px;
    height: 22px;
    background: var(--accent-line);
}

.layer--base {
    border-color: var(--accent-line);
    background: var(--accent-subtle);
}

.layer__name {
    color: var(--fg);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
}

.layer__name.mono {
    font-family: var(--font-mono);
    font-size: 15px;
}

.layer__text {
    color: var(--fg-muted);
    font-size: 15px;
}

.safety-list,
.skill-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.safety-list .num-badge {
    margin-bottom: 12px;
}

.section-note {
    margin-top: 24px;
    color: var(--band-muted);
    font-size: 15px;
}

/* Get started (not .steps: that is the contributing page's panel) */
.agent-steps {
    display: flex;
    flex-direction: column;
    gap: 36px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    display: flex;
    gap: 18px;
}

.step__body {
    flex: 1 1 auto;
    min-width: 0;
}

.step .terminal__body p {
    margin: 0;
    font-family: var(--font-sans);
    white-space: normal;
}

.t-link {
    color: var(--code-accent);
    text-decoration: underline;
}

/* For developers */
.tool-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.version-badge {
    padding: 2px 10px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-subtle);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
}

@media (max-width: 760px) {
    .layer {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .agent-demo__screen {
        height: 400px;
        padding: 14px;
    }

    .agent-line {
        flex-direction: column;
        gap: 0;
    }

    .agent-line__who {
        flex-basis: auto;
    }

    .agent-line--cmd,
    .agent-line--out {
        padding-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .agent-line.is-typing .agent-line__text::after {
        animation: none;
    }
}

/* ------------------------------------------------------------------ */
/* 16. Roadmap                                                         */
/* ------------------------------------------------------------------ */

.roadmap-note {
    max-width: 680px;
    color: var(--band-muted);
    font-size: 15px;
}

.roadmap-section .release + .release {
    margin-top: 28px;
}

.roadmap-waves {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    list-style: none;
}

/* One row per wave: the number on the left, its features in columns. */
.roadmap-wave {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: start;
    gap: 16px 24px;
    padding: 20px 24px;
}

.roadmap-wave__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.roadmap-wave__num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--accent-line);
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 13px;
}

.roadmap-wave__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px 24px;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.roadmap-wave__list li {
    display: flex;
    gap: 10px;
    padding-top: 4px;
}

@media (max-width: 600px) {
    .roadmap-wave {
        grid-template-columns: 1fr;
    }
}

.roadmap-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 0.55em;
    border-radius: 50%;
    background: var(--accent);
}

.roadmap-aside {
    margin-top: 20px;
    color: var(--fg-muted);
    font-size: 15px;
}

.roadmap-more {
    margin-top: 24px;
}

/* ------------------------------------------------------------------ */
/* 17. Footer                                                          */
/* ------------------------------------------------------------------ */

.site-footer {
    border-top: 1px solid var(--band-border);
    background: var(--band-bg);
    color: var(--band-muted);
    font-size: 14px;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-block: 64px 32px;
}

.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.site-footer__about {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
}

.site-footer__cols {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.footer-col__title {
    margin-bottom: 6px;
}

.footer-col__title {
    color: var(--band-fg);
    font-weight: 600;
}

.footer-col a {
    display: inline-block;
    padding-block: 3px;
    color: var(--band-muted);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--band-fg);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--band-border);
    font-size: 13px;
}

.site-footer__bottom a {
    color: var(--band-muted);
}

.site-footer__bottom a:hover {
    color: var(--band-fg);
}

/* ------------------------------------------------------------------ */
/* Comparison and audience pages                                       */
/* ------------------------------------------------------------------ */

.bullet-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 20px;
    color: var(--fg-muted);
}

.sources {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 22px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.compare-table sup a {
    text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Prose: long-form text such as the privacy policy and the terms      */
/* ------------------------------------------------------------------ */

.prose {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 72ch;
}

.prose h2 {
    margin-top: 16px;
    font-size: 22px;
}

.prose h3 {
    margin-top: 8px;
    font-size: 18px;
}

.prose ul,
.prose ol {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 22px;
}

.prose__updated {
    color: var(--fg-muted);
    font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* 18. Small screens and motion                                        */
/* ------------------------------------------------------------------ */

@media (max-width: 600px) {
    .container {
        padding-inline: 16px;
    }

    .section {
        padding-block: 64px;
    }

    .section--top {
        padding-block: 64px 32px;
    }

    .hero {
        gap: 40px;
        padding-block: 40px 64px;
    }

    .inline-form .input {
        min-width: 0;
        flex: 1 1 200px;
    }

    .hero .button-row .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* Install page on phones (spec 2026-10-19-001, decision 3): compact option
   cards with the flag on the label's line, commands that wrap, copy buttons
   beside the command. */
@media (max-width: 600px) {
    .cmd__code {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .cmd__btn {
        min-width: 64px;
        padding: 0 12px;
    }

    .option-grid,
    .preset-grid {
        gap: 8px;
    }

    .option,
    .preset {
        gap: 10px;
        padding: 12px 14px;
    }

    .option__text {
        display: grid;
        flex: 1;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 8px;
    }

    .option__label {
        grid-column: 1;
        grid-row: 1;
    }

    .option__flag {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        justify-self: start;
    }

    .option__hint,
    .option__needs {
        grid-column: 1 / -1;
    }
}

/* Touch screens: every control at least 44 px tall. */
@media (pointer: coarse) {
    .btn,
    .icon-btn,
    .copy-btn,
    .chip,
    .segmented__btn,
    .agent-demo__tab,
    .link-btn {
        min-height: 44px;
    }

    .brand {
        min-height: 44px;
    }

    .footer-col a,
    .card__link,
    .ref-card a {
        display: inline-block;
        padding-block: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------------ */
/* License cost calculator (/tools/license-cost-calculator)            */
/* ------------------------------------------------------------------ */

.calculator__check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.calculator__summary {
    font-size: 18px;
    font-weight: 500;
}

.calculator__share {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 24px;
}

.calculator__share .calculator__summary {
    flex: 1 1 320px;
    margin: 0;
}

.calculator__share .btn {
    flex: none;
}

.calculator__share .btn[hidden] {
    display: none;
}

/* The results while initCalculator() fetches new ones. */
.calculator-results.is-loading {
    opacity: .6;
    transition: opacity .15s;
}

.calculator__table thead th:first-child {
    width: auto;
}

.calculator__table .is-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Blog (spec 2026-10-24-001 §5)                                       */
/* ------------------------------------------------------------------ */

.blog {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-block: 48px 96px;
}

.blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

a.blog-chip {
    display: inline-flex;
    align-items: center;
    color: var(--fg-muted);
    text-decoration: none;
}

a.blog-chip:hover {
    border-color: var(--fg-muted);
    color: var(--fg);
}

a.blog-chip[aria-current="page"] {
    border-color: var(--fg);
    background: var(--fg);
    color: var(--bg);
}

.blog-card__media {
    display: block;
    margin: -24px -24px 6px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.blog-card__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
}

.blog-card__link {
    color: inherit;
    text-decoration: none;
}

.blog-card__link:hover {
    color: var(--accent);
}

.blog-card .card__text {
    flex: 1;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--fg-subtle);
    font-size: 14px;
}

.blog-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.blog-pager__pages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-pager__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding-inline: 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--fg-muted);
    text-decoration: none;
}

.blog-pager__link:hover {
    color: var(--fg);
}

.blog-pager__link.is-current {
    border-color: var(--fg);
    background: var(--fg);
    color: var(--bg);
}

.blog-pager__link.is-disabled {
    opacity: 0.45;
}

.blog-post {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 1080px;
    margin-inline: auto;
}

.blog-post__tags {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-post__cover {
    margin: 0;
}

.blog-post__cover img {
    width: 100%;
}

/* The body shares the header's left edge; the table of contents sits on the right. */
.blog-post__body {
    display: grid;
    grid-template-columns: minmax(0, 76ch) 200px;
    justify-content: space-between;
    align-items: start;
    gap: 40px;
}

.blog-post__body .doc-toc {
    grid-row: 1;
    grid-column: 2;
}

.blog-post__body .blog-prose {
    grid-row: 1;
    grid-column: 1;
    max-width: none;
}

@media (max-width: 1200px) {
    .blog-post__body {
        grid-template-columns: minmax(0, 76ch);
    }
}

/* The section being read is marked in the table of contents (app.js, initBlogToc). */
.blog-post .doc-toc__list a {
    display: block;
    padding-left: 12px;
    border-left: 2px solid var(--border);
}

.blog-post .doc-toc__list a[aria-current="true"] {
    border-left-color: var(--accent);
    color: var(--fg);
    font-weight: 600;
}

/* Long posts: sections stand apart. */
.blog-prose h2 {
    margin-top: 2em;
    font-size: clamp(22px, 2.4vw, 26px);
}

.blog-prose h3 {
    margin-top: 1.5em;
    font-size: 19px;
}

/* Tables: aligned figures, and edge shadows while there is more to scroll. */
.blog-prose table {
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    background:
        linear-gradient(to right, var(--bg) 30%, transparent) left / 40px 100% no-repeat local,
        linear-gradient(to left, var(--bg) 30%, transparent) right / 40px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--fg) 22%, transparent), transparent) left / 14px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--fg) 22%, transparent), transparent) right / 14px 100% no-repeat scroll;
}

@media (max-width: 600px) {
    .blog-prose table {
        font-size: 14px;
    }

    .blog-prose th,
    .blog-prose td {
        padding: 6px 8px;
    }
}

/* The whole card opens the post; the title link stretches over it. */
.blog-card {
    position: relative;
    transition: border-color 0.15s ease;
}

.blog-card:hover {
    border-color: var(--border-strong);
}

.blog-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.blog-card:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.blog-card__link:focus-visible {
    outline: none;
}

/* The first page of the unfiltered list leads with the newest post. */
@media (min-width: 760px) {
    .blog-grid--featured > .blog-card:first-child {
        grid-column: 1 / -1;
        padding: 32px;
    }

    .blog-grid--featured > .blog-card:first-child .card__title {
        max-width: 34ch;
        font-size: clamp(24px, 2.6vw, 30px);
        line-height: 1.25;
        text-wrap: balance;
    }

    .blog-grid--featured > .blog-card:first-child .card__text {
        max-width: 68ch;
        font-size: 17px;
    }
}

.blog-prose > :first-child {
    margin-top: 0;
}

.blog-prose .callout {
    gap: 6px;
    padding: 16px 20px;
    border-color: var(--accent-line);
    border-radius: var(--radius-md);
    background: var(--accent-subtle);
}

.blog-prose .callout--warn {
    border-color: var(--warn);
    background: var(--warn-subtle);
    color: var(--warn-ink);
}

.blog-callout__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 600px) {
    .blog {
        padding-block: 32px 64px;
    }
}

.blog-search {
    margin-top: 8px;
}

.blog-search .btn {
    flex: none;
    margin: 6px;
}

.blog-notice {
    color: var(--fg-muted);
}

/* ------------------------------------------------------------------ */
/* Consent banner for analytics (spec 2026-10-25-001)                  */
/* ------------------------------------------------------------------ */
.consent-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    padding: 16px 0;
    border-top: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.consent-banner[hidden] {
    display: none;
}

.consent-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.consent-banner__text {
    flex: 1 1 320px;
    margin: 0;
    color: var(--fg);
    font-size: 15px;
}

.consent-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--band-muted);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.link-button:hover {
    color: var(--band-fg);
}
