/* Global visual foundation. Page CSS owns layout, not component themes. */
:root {
    --bg-main: #080e14;
    --bg-card: #0e161e;
    --bg-raised: #131e27;
    --bg-chrome: rgba(16, 23, 29, 0.88);
    --border-soft: #283741;
    --text-main: #f3f4f6;
    --text-muted: #9cabb8;
    --text-soft: #b8c5d0;
    --text-dim: #8296a8;
    --accent: #b9eafb;
    --accent-hover: #e1f5fb;
    --accent-border: rgba(185, 234, 251, 0.42);
    --accent-tint: rgba(185, 234, 251, 0.12);
    --success: #86efac;
    --warning: #d9ae75;
    --danger: #fca5a5;
    --radius: 4px;
    /* Preserve the landing's existing font roles and fallback metrics. */
    --font-sans: 'Roboto Flex', system-ui, sans-serif;
    --font-heading: 'Manrope', var(--font-sans);
    --font-content: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --font-content-compact: Inter, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
    --heading-weight: 575;
    --layout-max-width: 1512px;
    --layout-gutter: clamp(20px, 4vw, 56px);
    --z-header: 50;
    --z-modal: 60;
    --z-error: 90;
}

/* Minimal reset replacing the Tailwind preflight on public pages. */
*, *::before, *::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: var(--border-soft);
}
:where(html) { -webkit-text-size-adjust: 100%; }
:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre, hr) { margin: 0; }
:where(h1, h2, h3, h4, h5, h6) { font-size: inherit; font-weight: inherit; }
:where(ul, ol, menu) { margin: 0; padding: 0; list-style: none; }
:where(a) { color: inherit; text-decoration: inherit; }
:where(button, input, select, textarea, optgroup) { font: inherit; color: inherit; margin: 0; padding: 0; }
:where(button, [type="button"], [type="submit"], [type="reset"]) { background: transparent; }
:where(button, select) { text-transform: none; }
:where(button, [role="button"]) { cursor: pointer; }
:where(button:disabled) { cursor: default; }
:where(img, svg, video, canvas, audio, iframe, embed, object) { display: block; vertical-align: middle; }
:where(img, video) { max-width: 100%; height: auto; }
:where(hr) { height: 0; color: inherit; border-top-width: 1px; }

.hidden, [hidden] { display: none !important; }

body {
    font-family: var(--font-sans);
    margin: 0;
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

:where(h1, h2, h3, h4, h5, h6) {
    font-family: var(--font-heading);
}

.layout-container {
    width: 100%;
    max-width: var(--layout-max-width);
    margin-inline: auto;
    padding-inline: var(--layout-gutter);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 44px;
    padding: 10px 18px;

    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: var(--heading-weight);
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: center;

    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;

    transition:
            border-color 180ms ease,
            background-color 180ms ease,
            color 180ms ease;
}

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

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary {
    color: #0a1a23;
    border-color: var(--accent);
    background-color: var(--accent);
}

.btn-primary:not(:disabled):hover {
    border-color: var(--accent-hover);
    background-color: var(--accent-hover);
}

.btn-secondary {
    color: var(--accent);
    border-color: var(--accent-border);
    background-color: rgba(10, 26, 35, 0.48);
}

.btn-secondary:not(:disabled):hover {
    border-color: var(--accent);
    background-color: var(--accent-tint);
}

.btn-danger,
.btn.is-danger {
    color: #ffe4e6;
    border-color: rgba(253, 164, 175, 0.42);
    background-color: #491e29;
}

.btn-danger:not(:disabled):hover,
.btn.is-danger:not(:disabled):hover {
    border-color: #fda4af;
    background-color: #672734;
}

/* Variants: pill is the existing landing CTA shape; rectangular is default. */
.btn-pill { border-radius: 999px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-split { justify-content: space-between; }
.btn-ghost { background: transparent; color: var(--text-soft); border-color: var(--border-soft); }
.btn-ghost:not(:disabled):hover { background: var(--bg-raised); color: var(--text-main); }
.btn-icon { width: 36px; min-height: 36px; padding: 0; flex: 0 0 auto; }
.btn-icon.btn-sm { width: 26px; min-height: 26px; }
.btn-link { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--accent); }
.btn-link:not(:disabled):hover { color: var(--accent-hover); }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

.card {
    min-width: 0;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
}
.card-flush { padding: 0; }
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.text-link svg { flex: none; }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); }
.panel-title { margin: 0; font-size: 22px; font-weight: var(--heading-weight); line-height: 1.2; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.is-success { color: var(--success); }
.status.is-warning { color: var(--warning); }
.status.is-danger { color: var(--danger); }
.status.is-muted { color: var(--text-muted); }

.section-title {
    font-family: var(--font-content);
    font-size: calc(var(--section-heading-size, clamp(31px, 2.7vw, 45px)) + var(--section-heading-size-offset, 0px));
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: 1.12;
}
@media (max-width: 1050px) { .section-title { --section-heading-size: 34px; } }
@media (max-width: 980px) { .section-title { --section-heading-size: clamp(34px, 6vw, 46px); } }
@media (max-width: 520px) { .section-title { --section-heading-size: 36px; } }
.eyebrow {
    color: var(--text-dim);
    font: 12px/1.5 var(--font-mono);
    letter-spacing: .25em;
    text-transform: uppercase;
}

/* Shared form controls. */
.field { display: grid; gap: 8px; min-width: 0; }
.field-label { color: var(--text-soft); font-size: 14px; line-height: 1.2; }
.input, .textarea, .select {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-main);
    color: var(--text-main);
    font: 15px/1.45 var(--font-sans);
}
.textarea { min-height: 100px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:focus, .textarea:focus, .select:focus { outline: 1px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.input:disabled, .textarea:disabled, .select:disabled { opacity: .6; cursor: not-allowed; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 14px;
    line-height: 1.45;
}
.notice.is-success { color: var(--success); border-color: var(--success); }
.notice.is-warning { color: var(--warning); border-color: var(--warning); }
.notice.is-danger { color: var(--danger); border-color: var(--danger); }
.notice p { margin: 0; }
.progress { height: 5px; background: var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); }
