/*
|--------------------------------------------------------------------------
| #File: /assets/css/style.css
| #Version: 1.0.0
| #Description: Production mobile-first stylesheet for keyboard.im.
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| Root tokens
|--------------------------------------------------------------------------
*/
:root {
    color-scheme: dark light;

    --bg: #09111f;
    --bg-elev-1: rgba(255, 255, 255, 0.04);
    --bg-elev-2: rgba(255, 255, 255, 0.06);
    --bg-elev-3: rgba(255, 255, 255, 0.08);
    --bg-soft: #101a2c;
    --surface: rgba(12, 19, 35, 0.82);
    --surface-2: rgba(17, 26, 46, 0.88);
    --surface-3: rgba(22, 34, 58, 0.92);
    --surface-strong: #16213a;
    --surface-muted: #0f1a2d;

    --text: #eef4ff;
    --text-soft: #c6d4ef;
    --text-muted: #93a5c7;
    --text-faint: #7385a7;

    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.14);

    --primary: #4f8cff;
    --primary-hover: #6aa0ff;
    --primary-active: #3f7df0;
    --primary-soft: rgba(79, 140, 255, 0.16);
    --accent: #35d3a7;
    --accent-soft: rgba(53, 211, 167, 0.16);
    --warning: #f4b860;
    --danger: #ff6f7d;

    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.3);

    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;

    --container: 1200px;
    --container-narrow: 860px;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-7: 1.75rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-14: 3.5rem;
    --space-16: 4rem;
    --space-20: 5rem;

    --font-sans:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    --fs-0: 0.8125rem;
    --fs-1: 0.9375rem;
    --fs-2: 1rem;
    --fs-3: 1.125rem;
    --fs-4: 1.25rem;
    --fs-5: 1.5rem;
    --fs-6: 1.875rem;
    --fs-7: 2.25rem;
    --fs-8: 2.75rem;
    --fs-9: 3.5rem;

    --lh-tight: 1.1;
    --lh-snug: 1.25;
    --lh-base: 1.6;
    --lh-relaxed: 1.75;

    --transition-fast: 140ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 320ms ease;

    --header-height: 72px;
    --ring: 0 0 0 3px rgba(79, 140, 255, 0.22);
}

/*
|--------------------------------------------------------------------------
| Light mode support
|--------------------------------------------------------------------------
*/
@media (prefers-color-scheme: light) {
    :root {
        --bg: #f4f8ff;
        --bg-elev-1: rgba(10, 24, 46, 0.03);
        --bg-elev-2: rgba(10, 24, 46, 0.04);
        --bg-elev-3: rgba(10, 24, 46, 0.06);
        --bg-soft: #edf3ff;
        --surface: rgba(255, 255, 255, 0.8);
        --surface-2: rgba(255, 255, 255, 0.92);
        --surface-3: rgba(255, 255, 255, 0.98);
        --surface-strong: #ffffff;
        --surface-muted: #f6f9ff;

        --text: #0c1526;
        --text-soft: #20324d;
        --text-muted: #52637f;
        --text-faint: #74829d;

        --line: rgba(10, 24, 46, 0.09);
        --line-strong: rgba(10, 24, 46, 0.14);

        --primary-soft: rgba(79, 140, 255, 0.12);
        --accent-soft: rgba(53, 211, 167, 0.14);

        --shadow-sm: 0 8px 20px rgba(20, 40, 70, 0.08);
        --shadow-md: 0 18px 44px rgba(20, 40, 70, 0.12);
        --shadow-lg: 0 30px 72px rgba(20, 40, 70, 0.16);
    }
}

/*
|--------------------------------------------------------------------------
| Reset / base
|--------------------------------------------------------------------------
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-2);
    line-height: var(--lh-base);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(53, 211, 167, 0.12), transparent 24%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

svg {
    fill: currentColor;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

p,
ul,
ol,
dl {
    margin: 0 0 var(--space-4);
}

ul,
ol {
    padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 var(--space-4);
    color: var(--text);
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.1rem, 5vw, var(--fs-9));
}

h2 {
    font-size: clamp(1.5rem, 3vw, var(--fs-7));
}

h3 {
    font-size: clamp(1.125rem, 2vw, var(--fs-5));
}

strong {
    font-weight: 700;
}

small {
    font-size: var(--fs-0);
}

::selection {
    background: rgba(79, 140, 255, 0.28);
    color: var(--text);
}

/*
|--------------------------------------------------------------------------
| Focus states
|--------------------------------------------------------------------------
*/
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: 12px;
}

/*
|--------------------------------------------------------------------------
| Layout utilities
|--------------------------------------------------------------------------
*/
.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
    padding-bottom: var(--space-12);
}

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.container--narrow {
    width: min(100% - 2rem, var(--container-narrow));
    margin-inline: auto;
}

.section {
    padding-block: var(--space-10);
}

.section--tight-top {
    padding-top: var(--space-4);
}

.section--muted {
    background:
        linear-gradient(180deg, transparent 0%, var(--bg-elev-1) 100%);
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.section-heading--tight {
    margin-bottom: var(--space-6);
}

.section-title {
    margin-bottom: var(--space-3);
}

.section-text {
    max-width: 72ch;
    color: var(--text-muted);
    font-size: var(--fs-3);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: var(--space-3);
    color: var(--accent);
    font-size: var(--fs-0);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 8px color-mix(in srgb, currentColor 14%, transparent);
}

.content-grid,
.card-grid,
.steps-grid,
.metrics-grid,
.panel-grid,
.stat-card-grid {
    display: grid;
    gap: var(--space-4);
}

/*
|--------------------------------------------------------------------------
| Skip links
|--------------------------------------------------------------------------
*/
.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    color: var(--text);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-md);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 1rem;
}

/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background:
        linear-gradient(180deg, rgba(10, 16, 29, 0.78), rgba(10, 16, 29, 0.64));
    border-bottom: 1px solid var(--line);
}

@media (prefers-color-scheme: light) {
    .site-header {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.66));
    }
}

.site-header__inner {
    min-height: var(--header-height);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-3);
    padding-block: 0.9rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.site-brand__mark {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background:
        linear-gradient(135deg, var(--primary) 0%, #3168d9 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 12px 28px rgba(79, 140, 255, 0.3);
    flex-shrink: 0;
}

.site-brand__icon {
    width: 1.7rem;
    height: 1.7rem;
}

.site-brand__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.site-brand__title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-brand__tagline {
    color: var(--text-faint);
    font-size: var(--fs-0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-toggle {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 16px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.28rem;
    border: 1px solid var(--line);
    background: var(--bg-elev-2);
    transition:
        transform var(--transition-fast),
        background var(--transition-base),
        border-color var(--transition-base);
}

.nav-toggle:hover {
    background: var(--bg-elev-3);
    border-color: var(--line-strong);
}

.nav-toggle__line {
    width: 1.2rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.site-header__panel {
    grid-column: 1 / -1;
    display: none;
    padding-top: var(--space-3);
}

.site-header__panel.is-open {
    display: grid;
    gap: var(--space-4);
}

.site-nav__list {
    list-style: none;
    display: grid;
    gap: 0.35rem;
    padding: 0;
    margin: 0;
}

.site-nav__link {
    display: flex;
    align-items: center;
    min-height: 2.9rem;
    padding-inline: 0.9rem;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--text-soft);
    transition:
        background var(--transition-base),
        color var(--transition-base),
        border-color var(--transition-base);
}

.site-nav__link:hover {
    background: var(--bg-elev-2);
    color: var(--text);
}

.site-nav__link.is-active {
    background: var(--primary-soft);
    border-color: rgba(79, 140, 255, 0.24);
    color: var(--text);
}

.site-header__actions {
    display: flex;
}

/*
|--------------------------------------------------------------------------
| Buttons / badges
|--------------------------------------------------------------------------
*/
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.85rem 1.15rem;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: var(--fs-1);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    transition:
        transform var(--transition-fast),
        background var(--transition-base),
        border-color var(--transition-base),
        color var(--transition-base),
        box-shadow var(--transition-base);
    will-change: transform;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button--primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-active) 100%);
    box-shadow: 0 14px 34px rgba(79, 140, 255, 0.26);
}

.button--primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
}

.button--ghost {
    color: var(--text);
    background: var(--bg-elev-2);
    border-color: var(--line);
}

.button--ghost:hover {
    background: var(--bg-elev-3);
    border-color: var(--line-strong);
}

.button--sm {
    min-height: 2.45rem;
    padding: 0.7rem 0.95rem;
    border-radius: 14px;
    font-size: var(--fs-0);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--bg-elev-2);
    color: var(--text-soft);
    font-size: var(--fs-0);
    font-weight: 600;
    line-height: 1;
}

/*
|--------------------------------------------------------------------------
| Hero / page hero
|--------------------------------------------------------------------------
*/
.hero,
.page-hero,
.error-hero {
    padding-top: var(--space-8);
}

.hero__grid {
    display: grid;
    gap: var(--space-6);
    align-items: center;
}

.hero__title {
    margin-bottom: var(--space-4);
}

.hero__text,
.page-intro {
    max-width: 68ch;
    color: var(--text-muted);
    font-size: clamp(1.05rem, 2vw, 1.18rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.hero__points {
    list-style: none;
    display: grid;
    gap: 0.55rem;
    margin: var(--space-5) 0 0;
    padding: 0;
}

.hero__points li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-soft);
}

.hero__points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 12%, transparent);
}

.hero__panel {
    position: relative;
}

.page-title {
    margin-bottom: var(--space-4);
    max-width: 14ch;
}

/*
|--------------------------------------------------------------------------
| Cards
|--------------------------------------------------------------------------
*/
.stat-card,
.feature-card,
.step-card,
.content-card,
.panel-card,
.metric-card,
.info-card,
.legal-card,
.error-card,
.tool-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    box-shadow: var(--shadow-sm);
}

.stat-card::before,
.feature-card::before,
.step-card::before,
.tool-card::before,
.panel-card::before,
.metric-card::before,
.info-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
    pointer-events: none;
}

.stat-card,
.feature-card,
.step-card,
.content-card,
.panel-card,
.metric-card,
.info-card {
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.tool-card {
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    background:
        radial-gradient(circle at top right, rgba(79, 140, 255, 0.08), transparent 30%),
        linear-gradient(180deg, var(--surface-3) 0%, var(--surface-2) 100%);
    box-shadow: var(--shadow-md);
}

.legal-card,
.error-card {
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 3vw, 2.25rem);
}

.stat-card__label,
.metric-card__label,
.info-card__label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-faint);
    font-size: var(--fs-0);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card__value,
.metric-card__value,
.info-card__value {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.stat-card__text,
.feature-card__text,
.step-card__text,
.panel-card__text {
    color: var(--text-muted);
}

.feature-card__title,
.step-card__title,
.panel-card__title {
    margin-bottom: var(--space-3);
}

.feature-card__link,
.site-footer__link,
.site-footer__mail {
    color: var(--primary);
    font-weight: 700;
}

.feature-card__link:hover,
.site-footer__link:hover,
.site-footer__mail:hover {
    color: var(--primary-hover);
}

.step-card__index {
    display: inline-flex;
    margin-bottom: var(--space-3);
    color: var(--accent);
    font-size: var(--fs-0);
    font-weight: 800;
    letter-spacing: 0.1em;
}

/*
|--------------------------------------------------------------------------
| Tool layout
|--------------------------------------------------------------------------
*/
.tool-hero {
    padding-top: var(--space-8);
}

.tool-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.tool-card__top {
    display: grid;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.tool-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 2.5rem;
    font-weight: 700;
    color: var(--text-soft);
}

.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent),
        0 0 18px rgba(53, 211, 167, 0.45);
}

.tool-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tool-card__body {
    display: grid;
    gap: var(--space-4);
}

.tool-card__body--stacked {
    gap: var(--space-5);
}

.tool-sidebar {
    display: grid;
    gap: var(--space-2);
}

/*
|--------------------------------------------------------------------------
| Keyboard stage
|--------------------------------------------------------------------------
*/
.keyboard-stage {
    overflow-x: auto;
    padding-bottom: var(--space-1);
    -webkit-overflow-scrolling: touch;
}

.keyboard-stage::-webkit-scrollbar {
    height: 10px;
}

.keyboard-stage::-webkit-scrollbar-thumb {
    background: var(--bg-elev-3);
    border-radius: 999px;
}

.keyboard-grid {
    display: grid;
    gap: 0.4rem;
    min-width: 700px;
}

.keyboard-row {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 0.4rem;
}

.keycap {
    position: relative;
    min-height: 3.5rem;
    padding: 0.5rem 0.55rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 14px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 8px 18px rgba(0,0,0,0.12);
    transition:
        transform var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.keycap:hover {
    border-color: var(--line-strong);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.11) 0%, rgba(255,255,255,0.03) 100%);
}

.keycap.is-active {
    transform: translateY(-1px);
    border-color: rgba(79, 140, 255, 0.55);
    background:
        linear-gradient(180deg, rgba(79, 140, 255, 0.22) 0%, rgba(79, 140, 255, 0.1) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        0 12px 24px rgba(79, 140, 255, 0.16),
        0 0 0 1px rgba(79, 140, 255, 0.12);
}

.keycap--disabled {
    opacity: 0.45;
}

.keycap__label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.keycap__code {
    color: var(--text-faint);
    font-size: 0.58rem;
    line-height: 1.15;
    word-break: break-word;
}

.keycap--sm {
    grid-column: span 1;
}

.keycap--default {
    grid-column: span 1;
}

.keycap--md {
    grid-column: span 2;
}

.keycap--lg {
    grid-column: span 2;
}

.keycap--xl {
    grid-column: span 3;
}

.keycap--xxl {
    grid-column: span 4;
}

.keycap--space {
    grid-column: span 6;
}

/*
|--------------------------------------------------------------------------
| Chatter / polling / ghosting
|--------------------------------------------------------------------------
*/
.event-stream {
    display: grid;
    gap: 0.65rem;
    max-height: 20rem;
    overflow: auto;
    padding-right: 0.35rem;
}

.event-stream__empty,
.token-list__empty {
    color: var(--text-faint);
}

.event-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg-elev-1);
}

.event-row__key {
    font-weight: 700;
}

.event-row__meta,
.event-row__ms {
    color: var(--text-muted);
    font-size: var(--fs-0);
}

.ghosting-pad {
    display: grid;
    place-items: center;
    min-height: 13rem;
    padding: var(--space-6);
    border-radius: var(--radius-md);
    border: 1px dashed var(--line-strong);
    background:
        radial-gradient(circle at center, rgba(79, 140, 255, 0.12), transparent 56%),
        var(--bg-elev-1);
    text-align: center;
    outline: none;
    transition:
        border-color var(--transition-base),
        background var(--transition-base),
        transform var(--transition-fast);
}

.ghosting-pad:focus-visible {
    box-shadow: var(--ring);
    border-color: rgba(79, 140, 255, 0.45);
}

.ghosting-pad__title {
    margin-bottom: var(--space-2);
    font-size: var(--fs-4);
    font-weight: 800;
}

.ghosting-pad__text {
    color: var(--text-muted);
    max-width: 32rem;
}

.token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.token {
    display: inline-flex;
    align-items: center;
    min-height: 2.3rem;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-pill);
    background: var(--primary-soft);
    border: 1px solid rgba(79, 140, 255, 0.24);
    color: var(--text);
    font-size: var(--fs-0);
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| Content sections
|--------------------------------------------------------------------------
*/
.content-card h2,
.legal-card h2 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: var(--space-4);
}

.content-list {
    margin: 0;
    color: var(--text-soft);
}

.content-list li + li {
    margin-top: 0.7rem;
}

.content-list--ordered {
    padding-left: 1.2rem;
}

.faq-list {
    display: grid;
    gap: var(--space-3);
}

.faq-item {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface-2);
    box-shadow: var(--shadow-sm);
}

.faq-item__summary {
    list-style: none;
    display: flex;
    align-items: center;
    min-height: 4rem;
    padding: 1rem 1.15rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.faq-item__summary::-webkit-details-marker {
    display: none;
}

.faq-item__summary::after {
    content: "+";
    margin-left: auto;
    color: var(--text-faint);
    font-size: 1.35rem;
    line-height: 1;
}

.faq-item[open] .faq-item__summary::after {
    content: "−";
}

.faq-item__content {
    padding: 0 1.15rem 1.15rem;
    color: var(--text-muted);
}

.legal-card {
    background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
}

.legal-card > * + h2 {
    margin-top: var(--space-8);
}

.legal-card p,
.legal-card ul,
.legal-card ol {
    color: var(--text-soft);
}

.error-card {
    text-align: center;
    background:
        radial-gradient(circle at top center, rgba(79, 140, 255, 0.12), transparent 46%),
        linear-gradient(180deg, var(--surface-3), var(--surface-2));
}

/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background:
        linear-gradient(180deg, transparent 0%, var(--bg-elev-1) 100%);
}

.site-footer__inner {
    padding-block: var(--space-6);
    display: grid;
    gap: var(--space-5);
}

.site-footer__top,
.site-footer__bottom {
    display: grid;
    gap: var(--space-5);
}

.site-footer__brand-link {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-footer__text,
.site-footer__meta {
    color: var(--text-muted);
}

.site-footer__list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

/*
|--------------------------------------------------------------------------
| Responsive grids
|--------------------------------------------------------------------------
*/
.card-grid {
    grid-template-columns: 1fr;
}

.steps-grid,
.content-grid,
.metrics-grid,
.panel-grid,
.stat-card-grid {
    grid-template-columns: 1fr;
}

/*
|--------------------------------------------------------------------------
| Desktop / larger breakpoints
|--------------------------------------------------------------------------
*/
@media (min-width: 640px) {
    .container {
        width: min(100% - 2.5rem, var(--container));
    }

    .section {
        padding-block: var(--space-12);
    }

    .hero,
    .page-hero,
    .error-hero {
        padding-top: var(--space-10);
    }

    .hero,
    .page-hero,
    .error-hero {
        padding-top: var(--space-12);
    }

    .card-grid,
    .steps-grid,
    .content-grid,
    .metrics-grid,
    .panel-grid,
    .stat-card-grid {
        gap: var(--space-5);
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps-grid,
    .content-grid,
    .panel-grid,
    .stat-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metrics-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--space-4);
    }

    .site-footer__bottom {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

@media (min-width: 860px) {
    .site-header__inner {
        grid-template-columns: auto 1fr auto;
    }

    .nav-toggle {
        display: none;
    }

    .site-header__panel {
        grid-column: auto;
        display: grid !important;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: var(--space-5);
        padding-top: 0;
    }

    .site-nav__list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

    .site-nav__link {
        min-height: 2.55rem;
    }

    .hero__grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
        gap: var(--space-10);
    }

    .section-heading {
        flex-direction: row;
        justify-content: space-between;
        align-items: end;
    }

    .tool-card__top {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .tool-card__body {
        grid-template-columns: minmax(0, 1fr) 16.5rem;
        align-items: start;
    }

    .tool-card__body--stacked {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .panel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__top {
        grid-template-columns: 1.25fr 1fr;
        align-items: start;
    }

    .site-footer__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1080px) {
    .section {
        padding-block: var(--space-14);
    }

    .hero,
    .page-hero,
    .error-hero {
        padding-top: var(--space-12);
    }

    .card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .steps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/*
|--------------------------------------------------------------------------
| Motion
|--------------------------------------------------------------------------
*/
@media (prefers-reduced-motion: no-preference) {
    .tool-card,
    .feature-card,
    .step-card,
    .stat-card,
    .content-card,
    .panel-card,
    .metric-card,
    .info-card {
        animation: fade-up 500ms ease both;
    }

    .feature-card:nth-child(2),
    .step-card:nth-child(2),
    .stat-card:nth-child(2) {
        animation-delay: 40ms;
    }

    .feature-card:nth-child(3),
    .step-card:nth-child(3),
    .stat-card:nth-child(3) {
        animation-delay: 80ms;
    }

    .feature-card:nth-child(4),
    .stat-card:nth-child(4) {
        animation-delay: 120ms;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }
}

/*
|--------------------------------------------------------------------------
| Utility classes used by JS
|--------------------------------------------------------------------------
*/
.is-hidden {
    display: none !important;
}

.is-muted {
    color: var(--text-faint) !important;
}

.is-danger {
    color: var(--danger) !important;
}

.is-success {
    color: var(--accent) !important;
}