:root {
    color-scheme: light;
    --brand-950: #00152f;
    --brand-900: #001f47;
    --brand-700: #0057c8;
    --brand-600: #0065fd;
    --brand-500: #1596ff;
    --brand-100: #dcecff;
    --brand-50: #eff6ff;
    /* Compatibility aliases while component rules migrate to semantic brand tokens. */
    --green-950: var(--brand-950);
    --green-900: var(--brand-900);
    --green-700: var(--brand-700);
    --green-600: var(--brand-600);
    --green-500: var(--brand-500);
    --green-100: var(--brand-100);
    --green-50: var(--brand-50);
    --paper: #ffffff;
    --canvas: #f5f8fc;
    --canvas-strong: #eaf1f8;
    --ink: #071426;
    --ink-soft: #4f6075;
    --ink-faint: #5f7086;
    --border: #d8e2ee;
    --border-strong: #c4d2e2;
    --amber: #c47a16;
    --amber-soft: #fff3dd;
    --blue: var(--brand-600);
    --blue-soft: #e8f2ff;
    --success: #0d8a5f;
    --success-soft: #eaf8f2;
    --danger: #a43e3e;
    --danger-soft: #fff0f0;
    --shadow-sm: 0 8px 24px rgba(5, 34, 72, 0.07);
    --shadow-lg: 0 28px 70px rgba(3, 36, 79, 0.15);
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --content: 1180px;
    --surface-page: var(--canvas);
    --surface-soft: var(--canvas-strong);
    --surface-card: var(--paper);
    --surface-raised: #ffffff;
    --surface-input: #ffffff;
    --surface-header: rgba(255, 255, 255, .92);
    --surface-card-translucent: rgba(255, 255, 255, .96);
    --surface-status-translucent: rgba(255, 255, 255, .78);
    --hero-start: #ffffff;
    --hero-end: #f0f7ff;
    --page-hero-end: #ffffff;
    --text-primary: var(--ink);
    --text-secondary: var(--ink-soft);
    --text-muted: var(--ink-faint);
    --text-accent: var(--green-700);
    --text-accent-hover: var(--green-600);
    --focus-ring: rgba(0, 101, 253, .30);
    --success-border: #b9dfcf;
    --info-border: #bfd7f2;
    --info-soft: #eff6ff;
    --danger-border: #f0c5c5;
    --danger-card-border: #edcece;
    --warning-border: #eed5ab;
    --warning-text: #735d3b;
    --warning-strong: #7a5016;
    --status-success-text: #08734f;
    --status-info-text: #005db7;
    --status-warning-text: #8b5b16;
    --status-danger-text: var(--danger);
    --accent-border: #b8d5f5;
    --accent-border-hover: #9fc7f1;
    --accent-border-selected: #80b7ed;
    --chart-grid: #e1e9f2;
    --chart-now: #aebdce;
    --chart-history: var(--brand-950);
    --chart-projection: var(--brand-600);
    --chart-upper: var(--amber);
    --chart-lower: var(--blue);
    --theme-toggle-background: var(--brand-950);
    --theme-toggle-foreground: #ffffff;
    --theme-toggle-border: rgba(255, 255, 255, .18);
    --theme-toggle-shadow: 0 16px 38px rgba(0, 35, 78, .30);
}

/* Admin-only portrait media studio */
.shorts-admin-page {
    display: grid;
    gap: 1.25rem;
    padding-bottom: 4rem;
}

.shorts-admin-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.shorts-admin-hero h1 {
    margin: 0.35rem 0 0.55rem;
    max-width: 900px;
}

.shorts-admin-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--text-muted);
}

.shorts-generator-card,
.media-custom-generator-card,
.shorts-progress-card,
.shorts-history-card,
.shorts-config-card {
    padding: clamp(1.15rem, 2vw, 1.75rem);
}

.media-custom-generator-card .card-heading p {
    max-width: 760px;
    margin: .35rem 0 0;
    color: var(--text-secondary);
    font-size: .85rem;
}

.media-custom-form .media-ticker-field,
.media-custom-form > .button,
.media-custom-form > .shorts-worker-note {
    grid-column: 1 / -1;
}

.media-custom-options {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.media-custom-options > fieldset,
.media-custom-options > .form-field {
    min-width: 0;
}

.media-custom-form .ticker-picker {
    max-width: none;
}

.shorts-generator-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.shorts-generator-form fieldset {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.shorts-generator-form legend {
    margin-bottom: 0.45rem;
    font-weight: 800;
}

.shorts-choice,
.shorts-check {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-card) 92%, var(--brand-600) 8%);
    cursor: pointer;
}

.shorts-choice:has(input:checked),
.shorts-check:has(input:checked) {
    border-color: var(--brand-600);
    box-shadow: inset 0 0 0 1px var(--brand-600);
}

.shorts-choice input,
.shorts-check input {
    margin-top: 0.2rem;
    accent-color: var(--brand-600);
}

.shorts-choice span,
.shorts-check span {
    display: grid;
    gap: 0.2rem;
}

.shorts-choice small,
.shorts-check small,
.shorts-worker-note {
    color: var(--text-muted);
}

.shorts-generator-form > .button {
    align-self: end;
    min-height: 48px;
}

.shorts-progress-track {
    display: block;
    width: 100%;
    height: 12px;
    appearance: none;
    overflow: hidden;
    margin-top: 1rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border) 70%, transparent);
}

.shorts-progress-track::-webkit-progress-bar {
    border-radius: inherit;
    background: color-mix(in srgb, var(--border) 70%, transparent);
}

.shorts-progress-track::-webkit-progress-value,
.shorts-progress-track::-moz-progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-600), #46a4ff);
}

.shorts-stage {
    margin: 0.55rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.shorts-batch-facts,
.shorts-result-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.shorts-batch-facts div,
.shorts-result-metrics div {
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.shorts-batch-facts dt,
.shorts-result-metrics dt {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shorts-batch-facts dd,
.shorts-result-metrics dd {
    margin: 0.25rem 0 0;
    font-weight: 800;
}

.shorts-batch-downloads,
.shorts-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-top: 1rem;
}

.shorts-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.shorts-result-card {
    min-width: 0;
    padding: 1.1rem;
}

.shorts-result-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
}

.shorts-result-heading h2 {
    margin: 0.15rem 0 0;
}

.shorts-result-heading h2 small {
    color: var(--text-muted);
    font-size: 0.75em;
    font-weight: 600;
}

.shorts-symbol-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--brand-600);
    font-weight: 900;
}

.shorts-preview {
    display: block;
    width: min(100%, 290px);
    aspect-ratio: 9 / 16;
    margin: 1rem auto;
    border-radius: 16px;
    background: #07111f;
    box-shadow: 0 18px 45px rgba(8, 31, 65, 0.22);
}

.shorts-result-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shorts-template-reason,
.shorts-item-error,
.shorts-item-waiting {
    margin: 1rem 0;
    padding: 0.85rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-card) 82%, var(--brand-600) 18%);
    color: var(--text-muted);
}

.shorts-item-error {
    background: color-mix(in srgb, var(--surface-card) 82%, #ffb547 18%);
}

.shorts-item-waiting span {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.4rem;
    border-radius: 50%;
    background: var(--brand-600);
    animation: shorts-pulse 1.2s ease-in-out infinite;
}

@keyframes shorts-pulse {
    50% { opacity: 0.25; transform: scale(0.8); }
}

.shorts-copy-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.65rem;
    margin-top: 0.8rem;
}

.shorts-copy-block label {
    grid-column: 1 / -1;
    font-weight: 800;
}

.shorts-copy-block textarea {
    resize: vertical;
}

.shorts-result-actions form {
    display: flex;
    gap: 0.45rem;
    margin-left: auto;
}

.shorts-config-card summary {
    cursor: pointer;
}

.shorts-config-card summary > span {
    display: grid;
    gap: 0.3rem;
}

.shorts-config-card form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.shorts-config-card input {
    min-width: 7rem;
}

@media (max-width: 900px) {
    .shorts-generator-form,
    .shorts-results {
        grid-template-columns: 1fr;
    }

    .shorts-batch-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .shorts-admin-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .shorts-batch-facts,
    .shorts-result-metrics {
        grid-template-columns: 1fr;
    }

    .shorts-result-heading {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .shorts-result-heading .validation-chip {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .shorts-copy-block {
        grid-template-columns: 1fr;
    }

    .shorts-copy-block label {
        grid-column: auto;
    }
}

html[data-theme="dark"] {
    color-scheme: dark;
    --paper: #101e32;
    --canvas: #07111f;
    --canvas-strong: #0b1728;
    --ink: #f2f7ff;
    --ink-soft: #b7c4d6;
    --ink-faint: #8fa0b6;
    --border: #263750;
    --border-strong: #3a4d68;
    --brand-100: #123968;
    --brand-50: #0b294c;
    --amber-soft: #342817;
    --blue-soft: #0e2f55;
    --success-soft: #102f28;
    --danger-soft: #351d20;
    --shadow-sm: 0 10px 28px rgba(0, 0, 0, .24);
    --shadow-lg: 0 30px 76px rgba(0, 0, 0, .42);
    --surface-page: var(--canvas);
    --surface-soft: var(--canvas-strong);
    --surface-card: var(--paper);
    --surface-raised: #14243a;
    --surface-input: #0b1728;
    --surface-header: rgba(7, 17, 31, .92);
    --surface-card-translucent: rgba(16, 30, 50, .96);
    --surface-status-translucent: rgba(15, 32, 53, .90);
    --hero-start: #07111f;
    --hero-end: #0a1b31;
    --page-hero-end: #07111f;
    --text-primary: var(--ink);
    --text-secondary: var(--ink-soft);
    --text-muted: var(--ink-faint);
    --text-accent: #68b1ff;
    --text-accent-hover: #96c9ff;
    --focus-ring: rgba(50, 145, 255, .48);
    --success-border: #2f684e;
    --info-border: #315772;
    --info-soft: #132635;
    --danger-border: #713b3f;
    --danger-card-border: #6c383b;
    --warning-border: #674f27;
    --warning-text: #dfbd82;
    --warning-strong: #f0ca85;
    --status-success-text: #73dfb2;
    --status-info-text: #82bfff;
    --status-warning-text: #e7c27c;
    --status-danger-text: #f09a9d;
    --accent-border: #28558a;
    --accent-border-hover: #356ca8;
    --accent-border-selected: #4385c7;
    --chart-grid: #273a54;
    --chart-now: #526984;
    --chart-history: #e4efff;
    --chart-projection: #4f9dff;
    --chart-upper: #e7b45f;
    --chart-lower: #75bff0;
    --theme-toggle-background: #eef6ff;
    --theme-toggle-foreground: #071a36;
    --theme-toggle-border: rgba(255, 255, 255, .32);
    --theme-toggle-shadow: 0 18px 44px rgba(0, 0, 0, .48);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--text-primary);
    background: var(--surface-page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.35rem, 5vw, 4.8rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.7rem); }
h3 { font-size: 1.15rem; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .82; }

:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

.sr-only {
    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: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 1000;
    padding: .75rem 1rem;
    border-radius: 8px;
    color: white;
    background: var(--green-900);
}
.skip-link:focus { top: 1rem; }

.theme-toggle {
    position: fixed;
    right: max(1.15rem, env(safe-area-inset-right));
    bottom: max(1.15rem, env(safe-area-inset-bottom));
    z-index: 250;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--theme-toggle-border);
    border-radius: 50%;
    color: var(--theme-toggle-foreground);
    background: var(--theme-toggle-background);
    box-shadow: var(--theme-toggle-shadow);
    cursor: pointer;
    isolation: isolate;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.theme-toggle:hover { transform: translateY(-2px) rotate(4deg); }
.theme-toggle:active { transform: translateY(0) scale(.96); }
.theme-toggle::after {
    content: attr(data-theme-tooltip);
    position: absolute;
    right: calc(100% + .75rem);
    top: 50%;
    width: max-content;
    max-width: 180px;
    padding: .5rem .68rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    background: var(--surface-raised);
    box-shadow: var(--shadow-sm);
    font-size: .7rem;
    font-weight: 760;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transform: translate(5px, -50%);
    transition: opacity .16s ease, transform .16s ease;
}
.theme-toggle:hover::after, .theme-toggle:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.theme-toggle-icon { grid-area: 1 / 1; font-size: 1.45rem; line-height: 1; transition: opacity .16s ease, transform .2s ease; }
.theme-toggle-sun { opacity: 0; transform: rotate(-30deg) scale(.6); }
html[data-theme="dark"] .theme-toggle-moon { opacity: 0; transform: rotate(30deg) scale(.6); }
html[data-theme="dark"] .theme-toggle-sun { opacity: 1; transform: rotate(0) scale(1); }

.content-width { width: min(var(--content), calc(100% - 3rem)); margin-inline: auto; }
.section-pad { padding: 7rem 0; }
.section-pad-small { padding: 3.5rem 0 5.5rem; }
.section-soft { background: var(--surface-soft); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    background: var(--surface-header);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(var(--content), calc(100% - 3rem));
    min-height: 72px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; font-weight: 820; }
.brand-assets { display: inline-flex; align-items: center; gap: .62rem; border-radius: 10px; }
.brand-logo { width: 32px; height: auto; flex: 0 0 auto; display: block; object-fit: contain; }
.brand-wordmark-image { width: 154px; height: auto; flex: 0 0 auto; display: block; object-fit: contain; }
html[data-theme="dark"] .brand-assets {
    padding: .28rem .52rem .28rem .34rem;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(0, 0, 0, .18);
}

.primary-navigation { display: flex; align-items: center; gap: 1.55rem; font-size: .9rem; font-weight: 650; }
.primary-navigation > a:not(.button) { color: var(--text-secondary); padding: 1.55rem 0; position: relative; }
.primary-navigation > a:hover, .primary-navigation > a[aria-current="page"] { color: var(--text-accent); }
.primary-navigation > a.button:hover,
.primary-navigation > a.button[aria-current="page"] { color: #ffffff; }
.primary-navigation > a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 4px; background: var(--green-600); }
.nav-logout { margin: 0; }
.menu-toggle { display: none; border: 0; padding: .5rem; background: transparent; }
.menu-toggle > span:not(.sr-only) { display: block; width: 23px; height: 2px; margin: 5px; background: var(--ink); }

.account-strip { background: var(--green-950); color: white; }
.account-strip-dashboard-hidden { display: none; }
.account-strip-inner { width: min(var(--content), calc(100% - 3rem)); min-height: 42px; margin-inline: auto; display: flex; align-items: center; justify-content: flex-end; gap: 1.25rem; font-size: .78rem; }
.status-dot, .session-pill, .balance-pill, .plan-pill, .status-chip { display: inline-flex; align-items: center; gap: .45rem; }
.status-dot > span, .status-chip > span { width: 7px; height: 7px; border-radius: 50%; background: #52db9d; box-shadow: 0 0 0 4px rgba(82, 219, 157, .12); }
.session-pill { color: rgba(255,255,255,.72); font-variant-numeric: tabular-nums; }
.session-pill strong { min-width: 4.8rem; color: white; letter-spacing: .03em; text-align: right; }
.plan-pill { padding: .3rem .62rem; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #b9dcff; background: rgba(255,255,255,.07); font-size: .65rem; font-weight: 820; }
.balance-pill { padding-left: 1.25rem; border-left: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.7); }
.balance-pill strong { color: white; }

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .76rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 11px;
    font-weight: 760;
    line-height: 1;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .52; }
.button.is-loading::after {
    width: .85rem;
    height: .85rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: button-spinner .7s linear infinite;
}
@keyframes button-spinner { to { transform: rotate(360deg); } }
.button-primary { color: white; background: var(--brand-600); box-shadow: 0 10px 24px rgba(0, 101, 253, .22); }
.button-primary:hover:not(:disabled) { background: var(--brand-700); box-shadow: 0 13px 28px rgba(0, 87, 200, .28); }
.button-dark { min-height: 39px; color: white; background: var(--green-950); }
.button-light { color: var(--green-950); background: white; }
.button-secondary { color: var(--text-accent); border-color: var(--border-strong); background: var(--surface-raised); }
.button-ghost { min-height: 38px; color: var(--text-secondary); border-color: var(--border); background: transparent; }
.button-danger { color: white; background: var(--danger); box-shadow: 0 10px 24px rgba(164, 62, 62, .18); }
.button-danger:hover:not(:disabled) { background: #873131; box-shadow: 0 13px 28px rgba(164, 62, 62, .24); }

body.confirmation-dialog-is-open { overflow: hidden; }
.confirmation-dialog {
    width: min(540px, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 0;
    overflow: auto;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    background: var(--surface-raised);
    box-shadow: 0 34px 100px rgba(0, 20, 48, .32);
}
.confirmation-dialog::backdrop {
    background: rgba(0, 16, 36, .68);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.confirmation-dialog-card {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: 2rem;
    background:
        radial-gradient(circle at 100% 0, var(--danger-soft), transparent 36%),
        var(--surface-raised);
}
.confirmation-dialog-close {
    position: absolute;
    top: .9rem;
    right: .9rem;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-card);
    cursor: pointer;
}
.confirmation-dialog-close:hover { color: var(--text-primary); border-color: var(--border-strong); }
.confirmation-dialog-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: var(--danger);
    border: 1px solid var(--danger-border);
    border-radius: 16px;
    background: var(--danger-soft);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .06em;
}
.confirmation-dialog .eyebrow { margin: 0; }
.confirmation-dialog h2 {
    max-width: 430px;
    margin: -.25rem 2rem 0 0;
    font-size: clamp(1.65rem, 5vw, 2.25rem);
}
.confirmation-dialog p { margin: 0; color: var(--text-secondary); }
.confirmation-dialog-impact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-card);
}
.confirmation-dialog-impact > div {
    display: grid;
    gap: .2rem;
    padding: .9rem 1rem;
}
.confirmation-dialog-impact > div + div { border-left: 1px solid var(--border); }
.confirmation-dialog-impact span {
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.confirmation-dialog-impact strong { font-size: .84rem; }
.confirmation-dialog-warning {
    padding: .8rem .9rem;
    color: var(--status-danger-text) !important;
    border: 1px solid var(--danger-border);
    border-radius: 12px;
    background: var(--danger-soft);
    font-size: .78rem;
}
.confirmation-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: .2rem;
}
.confirmation-dialog-actions .button { width: 100%; }
.button-small { min-height: 38px; padding: .6rem .95rem; font-size: .84rem; border-radius: 9px; }
.button-tall { min-height: 52px; }
.button-full { width: 100%; }
.text-link { color: var(--text-accent); font-weight: 750; }
.text-link:hover { color: var(--text-accent-hover); }

.eyebrow { display: inline-block; margin-bottom: .75rem; color: var(--text-accent); font-size: .73rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }

.flash-region { position: fixed; top: 88px; left: 50%; z-index: 200; width: min(620px, calc(100% - 2rem)); transform: translateX(-50%); }
.app-shell .flash-region { top: 130px; }
.app-shell[data-page="dashboard"] .flash-region { top: 88px; }
.flash { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px; color: var(--text-primary); background: var(--surface-raised); box-shadow: var(--shadow-lg); font-size: .9rem; }
.flash-success { border-color: var(--success-border); background: var(--success-soft); }
.flash-error { border-color: var(--danger-border); background: var(--danger-soft); }
.flash-info { border-color: var(--info-border); background: var(--info-soft); }
.flash-close { border: 0; color: var(--text-muted); background: none; font-size: 1.35rem; cursor: pointer; }

.hero { overflow: hidden; min-height: 690px; display: flex; align-items: center; background: radial-gradient(circle at 78% 35%, rgba(21, 150, 255, .16), transparent 34%), linear-gradient(135deg, var(--hero-start) 0%, var(--hero-end) 100%); }
.hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 5rem; }
.hero-copy h1 { max-width: 610px; margin-bottom: 1.45rem; font-size: clamp(3.2rem, 6.2vw, 5.45rem); }
.hero-copy h1 span { color: var(--text-accent); }
.hero-lead { max-width: 590px; margin-bottom: 2rem; color: var(--text-secondary); font-size: 1.12rem; }
.hero-actions { display: flex; align-items: center; gap: 1.4rem; }
.micro-disclosure { max-width: 530px; margin: 1.35rem 0 0; color: var(--text-muted); font-size: .78rem; }
.hero-visual { position: relative; }
.chart-card { overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-card-translucent); box-shadow: var(--shadow-lg); }
.chart-card-large { padding: 1.45rem; transform: rotate(1deg); }
.chart-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.15rem; }
.chart-toolbar > div { display: flex; align-items: center; gap: .75rem; }
.chart-toolbar strong, .chart-toolbar span { display: block; }
.chart-toolbar strong { font-size: .86rem; }
.chart-toolbar div div span { color: var(--text-muted); font-size: .72rem; }
.ticker-icon { width: 36px; height: 36px; display: grid !important; place-items: center; border-radius: 50%; color: white; background: var(--green-950); font-weight: 850; }
.demo-badge, .validation-chip, .table-chip { display: inline-flex !important; align-items: center; width: max-content; padding: .3rem .57rem; border-radius: 999px; color: var(--text-accent); background: var(--brand-100); font-size: .67rem !important; font-weight: 800; letter-spacing: .03em; }
.chart-value { min-width: 0; display: flex; align-items: baseline; gap: .65rem; margin-bottom: .3rem; }
.chart-value strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 1.65rem; letter-spacing: -.04em; }
.chart-value span { color: var(--text-muted); font-size: .72rem; }
.market-chart { width: 100%; margin: .2rem 0; }
.chart-grid-lines line { stroke: var(--chart-grid); stroke-width: 1; }
.chart-band { fill: url(#forecast-fill); }
.chart-history, .chart-projection, .chart-upper, .chart-lower { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-history { stroke: var(--chart-history); stroke-width: 5; }
.chart-projection { stroke: var(--chart-projection); stroke-width: 5; stroke-dasharray: 8 8; }
.chart-upper { stroke: var(--chart-upper); stroke-width: 2; stroke-dasharray: 4 6; }
.chart-lower { stroke: var(--chart-lower); stroke-width: 2; stroke-dasharray: 4 6; }
.chart-now { stroke: var(--chart-now); stroke-width: 1; stroke-dasharray: 4 5; }
.chart-now-label { fill: var(--text-muted); font-size: 10px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .85rem; padding-top: .7rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .67rem; }
.chart-legend span { display: flex; align-items: center; gap: .35rem; }
.chart-legend i { width: 15px; height: 2px; display: block; }
.legend-history { background: var(--chart-history); }
.legend-projection { border-top: 2px dashed var(--chart-projection); }
.legend-upper { border-top: 2px dotted var(--chart-upper); }
.legend-lower { border-top: 2px dotted var(--chart-lower); }
.floating-card { position: absolute; border: 1px solid var(--border-strong); border-radius: 13px; background: var(--surface-raised); box-shadow: var(--shadow-sm); }
.floating-credit { right: -24px; top: 29%; padding: .75rem 1rem; transform: rotate(-2deg); }
.floating-credit span, .floating-credit strong { display: block; }
.floating-credit span { color: var(--text-muted); font-size: .65rem; }
.floating-credit strong { font-size: 1rem; }
.floating-data { left: -28px; bottom: 11%; display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; transform: rotate(-1deg); }
.floating-data strong, .floating-data span { display: block; }
.floating-data strong { font-size: .76rem; }
.floating-data div span { color: var(--text-muted); font-size: .64rem; }
.check-circle { width: 27px; height: 27px; display: grid !important; place-items: center; border-radius: 50%; color: white; background: var(--green-600); font-size: .72rem; }
.public-hero { padding-top: 5.6rem; padding-bottom: 6.2rem; }
.trial-promotion-section {
    position: relative;
    overflow: hidden;
    background: var(--surface-soft);
}
.trial-promotion-section::before {
    position: absolute;
    top: -360px;
    right: -160px;
    width: 760px;
    height: 760px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand-500) 12%, transparent), transparent 68%);
    content: "";
    pointer-events: none;
}
.trial-promotion-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(320px, .74fr);
    align-items: stretch;
    gap: clamp(2.25rem, 4.5vw, 4.75rem);
    min-height: 370px;
    padding: clamp(2.25rem, 4.5vw, 4.25rem);
    border: 1px solid rgba(116, 186, 255, .38);
    border-radius: 28px;
    background:
        radial-gradient(circle at 16% -12%, rgba(37, 147, 255, .34), transparent 43%),
        radial-gradient(circle at 100% 100%, rgba(20, 101, 253, .16), transparent 38%),
        linear-gradient(135deg, #071729 0%, #0b213c 54%, #071425 100%);
    box-shadow: 0 30px 90px rgba(3, 20, 40, .25);
}
.trial-promotion-panel::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .15;
    background-image:
        linear-gradient(rgba(116, 186, 255, .18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 186, 255, .18) 1px, transparent 1px);
    background-size: 46px 46px;
    content: "";
    mask-image: linear-gradient(90deg, transparent, black 34%, black);
}
.trial-promotion-panel::after {
    position: absolute;
    z-index: -1;
    top: -160px;
    right: -80px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(25, 126, 255, .28), transparent 67%);
    content: "";
    pointer-events: none;
}
.trial-promotion-copy {
    min-width: 0;
    align-self: center;
}
.trial-promotion-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .9rem;
    padding: .42rem .7rem;
    border: 1px solid rgba(116, 186, 255, .28);
    border-radius: 999px;
    color: #9bd2ff;
    background: rgba(20, 101, 253, .12);
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.trial-promotion-kicker::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #47a7ff;
    box-shadow: 0 0 0 5px rgba(71, 167, 255, .13);
    content: "";
}
.trial-promotion-copy h2 {
    max-width: 700px;
    margin: 0;
    color: white;
    font-size: clamp(2.35rem, 4.2vw, 3.25rem);
    line-height: 1.02;
    letter-spacing: -.052em;
}
.trial-promotion-lead {
    max-width: 650px;
    margin: 1.15rem 0 1.6rem;
    color: rgba(235, 246, 255, .72);
    font-size: .98rem;
    line-height: 1.7;
}
.trial-promotion-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.trial-promotion-cta {
    min-height: 54px;
    flex: 0 0 auto;
    padding-inline: 1.45rem;
    box-shadow: 0 15px 32px rgba(0, 101, 253, .3);
}
.trial-promotion-trust {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1rem;
}
.trial-promotion-trust span {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: rgba(235, 246, 255, .76);
    font-size: .7rem;
    font-weight: 800;
}
.trial-promotion-trust span::before {
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(116, 186, 255, .35);
    border-radius: 50%;
    color: #8bcaff;
    background: rgba(20, 101, 253, .14);
    content: "\2713";
    font-size: .58rem;
}
.trial-promotion-disclosure {
    max-width: 640px;
    margin: 1rem 0 0;
    color: rgba(218, 237, 252, .48);
    font-size: .67rem;
    line-height: 1.5;
}
.trial-promotion-summary {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    padding: 1.35rem;
    border: 1px solid rgba(148, 205, 255, .22);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .105), rgba(255, 255, 255, .045));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .18);
    backdrop-filter: blur(8px);
}
.trial-promotion-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .15rem .2rem 1rem;
    border-bottom: 1px solid rgba(148, 205, 255, .16);
}
.trial-promotion-summary-head > span {
    color: #9bd2ff;
    font-size: .69rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.trial-promotion-duration {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: white;
}
.trial-promotion-duration strong {
    font-size: 3.8rem;
    line-height: .8;
    letter-spacing: -.09em;
}
.trial-promotion-duration span {
    color: #9bd2ff;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .11em;
    line-height: 1.25;
    text-transform: uppercase;
}
.trial-promotion-features {
    display: grid;
    margin: .35rem 0 1rem;
    padding: 0;
    list-style: none;
}
.trial-promotion-features li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: .75rem;
    padding: .9rem .2rem;
    border-bottom: 1px solid rgba(148, 205, 255, .13);
}
.trial-promotion-features li > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(145deg, #2593ff, #0f69dc);
    box-shadow: 0 8px 20px rgba(0, 101, 253, .22);
    font-size: .72rem;
    font-weight: 900;
}
.trial-promotion-features strong,
.trial-promotion-features small {
    display: block;
}
.trial-promotion-features strong {
    color: white;
    font-size: .8rem;
}
.trial-promotion-features small {
    margin-top: .18rem;
    color: rgba(218, 237, 252, .54);
    font-size: .66rem;
    line-height: 1.4;
}
.trial-promotion-transition {
    margin-top: auto;
    padding: .85rem .95rem;
    border: 1px solid rgba(148, 205, 255, .16);
    border-radius: 13px;
    background: rgba(1, 12, 26, .26);
}
.trial-promotion-transition span,
.trial-promotion-transition strong {
    display: block;
}
.trial-promotion-transition span {
    color: rgba(218, 237, 252, .5);
    font-size: .6rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.trial-promotion-transition strong {
    margin-top: .22rem;
    color: rgba(245, 251, 255, .88);
    font-size: .68rem;
    line-height: 1.4;
}
.forecast-proof { margin: 0; }
.proof-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0 .55rem .75rem;
    color: var(--text-muted);
    font-size: .66rem;
}
.proof-heading > div { display: flex; align-items: center; gap: .45rem; }
.proof-heading strong { color: var(--text-primary); font-size: .72rem; letter-spacing: .01em; }
.proof-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 4px rgba(21, 150, 255, .14); }
.forecast-example-image {
    display: block;
    width: 100%;
    height: auto;
    margin-top: .65rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f5f8fc;
}
.forecast-proof figcaption { max-width: 570px; margin: .8rem auto 0; color: var(--text-muted); font-size: .65rem; line-height: 1.55; text-align: center; }
.result-showcase { min-width: 0; }
.result-carousel {
    position: relative;
    overflow: hidden;
    background: var(--surface-raised);
}
.result-carousel-viewport {
    overflow: hidden;
    touch-action: pan-y;
}
.result-carousel-track {
    display: flex;
    transform: translate3d(0, 0, 0);
    transition: transform .7s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}
.result-carousel-track.carousel-index-1 { transform: translate3d(-100%, 0, 0); }
.result-carousel-track.carousel-index-2 { transform: translate3d(-200%, 0, 0); }
.result-carousel-track.carousel-index-3 { transform: translate3d(-300%, 0, 0); }
.result-carousel-slide {
    min-width: 0;
    flex: 0 0 100%;
    padding: 1.15rem;
}
.result-slide-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .85rem;
}
.result-slide-heading > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .7rem;
}
.result-slide-heading > div > div { min-width: 0; }
.result-slide-heading strong,
.result-slide-heading small { display: block; }
.result-slide-heading strong {
    overflow-wrap: anywhere;
    font-size: .83rem;
    letter-spacing: .01em;
}
.result-slide-heading strong span {
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 750;
}
.result-slide-heading small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: .67rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.result-showcase-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #f5f8fc;
}
.result-showcase-link {
    position: relative;
    display: block;
    border-radius: 11px;
}
.result-showcase-open {
    position: absolute;
    right: .65rem;
    bottom: .65rem;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .7rem;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 9px;
    color: #ffffff;
    background: rgba(0, 21, 47, .88);
    box-shadow: 0 8px 22px rgba(0, 21, 47, .22);
    font-size: .65rem;
    font-weight: 820;
    letter-spacing: .01em;
    transition: background .16s ease, transform .16s ease;
}
.result-showcase-link:hover .result-showcase-open {
    background: var(--brand-700);
    transform: translateY(-1px);
}
.result-showcase-link:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}
.result-carousel-controls {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .55rem;
    padding: .8rem 1.15rem;
    border-top: 1px solid var(--border);
    background: var(--surface-soft);
}
.result-carousel-arrow,
.result-carousel-toggle,
.result-carousel-dots button {
    min-height: 34px;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    background: var(--surface-raised);
    font-family: inherit;
    font-size: .66rem;
    font-weight: 850;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}
.result-carousel-arrow {
    width: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    font-size: .95rem;
}
.result-carousel-dots {
    min-width: 0;
    display: flex;
    justify-content: center;
    gap: .35rem;
}
.result-carousel-dots button {
    padding: .4rem .55rem;
    border-radius: 999px;
}
.result-carousel-toggle {
    min-width: 82px;
    padding: .4rem .65rem;
    border-radius: 999px;
}
.result-carousel-arrow:hover,
.result-carousel-toggle:hover,
.result-carousel-dots button:hover {
    border-color: var(--green-500);
    color: var(--text-accent);
    transform: translateY(-1px);
}
.result-carousel-dots button[aria-current="true"] {
    border-color: var(--green-600);
    color: white;
    background: var(--green-600);
}
.result-carousel-arrow:focus-visible,
.result-carousel-toggle:focus-visible,
.result-carousel-dots button:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.forecast-walkthrough-section {
    position: relative;
    overflow: hidden;
    background: var(--surface-card);
}
.forecast-walkthrough-section::before {
    position: absolute;
    top: -180px;
    right: -110px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(21, 150, 255, .14), transparent 68%);
    content: "";
    pointer-events: none;
}
.forecast-walkthrough-grid {
    position: relative;
    display: grid;
    grid-template-columns: .72fr 1.28fr;
    align-items: center;
    gap: 4.5rem;
}
.forecast-walkthrough-copy h2 { margin-bottom: 1rem; }
.walkthrough-points {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1.4rem;
}
.walkthrough-points span {
    padding: .42rem .68rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    background: var(--surface-soft);
    font-size: .68rem;
    font-weight: 750;
}
.forecast-video-card {
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-raised);
    box-shadow: var(--shadow-lg);
}
.forecast-video-frame {
    overflow: hidden;
    aspect-ratio: 1396 / 704;
    background: #020a15;
}
.forecast-video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
.forecast-video-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-top: 1px solid var(--border);
}
.forecast-video-caption strong,
.forecast-video-caption div span { display: block; }
.forecast-video-caption strong { font-size: .86rem; }
.forecast-video-caption div span {
    margin-top: .12rem;
    color: var(--text-muted);
    font-size: .68rem;
}
.forecast-video-summary {
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--surface-soft);
    font-size: .75rem;
}
.forecast-video-summary summary {
    padding: .8rem 1.15rem;
    color: var(--text-accent);
    font-weight: 800;
    cursor: pointer;
}
.forecast-video-summary p {
    margin: 0;
    padding: 0 1.15rem 1rem;
}

.section-heading { max-width: 560px; }
.section-heading h2 { margin-bottom: 1rem; }
.section-heading p { color: var(--text-secondary); }
.narrow-heading { margin: 0 auto 3.2rem; text-align: center; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.step-card { min-height: 240px; padding: 2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); }
.step-number { display: inline-grid; width: 42px; height: 42px; place-items: center; margin-bottom: 2.5rem; border-radius: 50%; color: var(--text-accent); background: var(--green-100); font-size: .73rem; font-weight: 850; }
.step-card h3 { margin-bottom: .65rem; font-size: 1.35rem; }
.step-card p { margin: 0; color: var(--text-secondary); }
.modes-grid { display: grid; grid-template-columns: .75fr 1.25fr; align-items: center; gap: 5rem; }
.mode-stack { display: grid; gap: 1rem; }
.mode-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); box-shadow: var(--shadow-sm); }
.mode-card-active { border-color: var(--accent-border-selected); background: linear-gradient(100deg, var(--surface-card), var(--green-50)); }
.mode-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--green-600); font-size: .78rem; font-weight: 850; }
.mode-icon-dark { background: var(--green-950); }
.mode-card h3 { margin: 0 0 .3rem; }
.mode-card p { margin: 0; color: var(--text-secondary); font-size: .88rem; }
.mode-label { padding: .32rem .6rem; border-radius: 999px; color: var(--text-accent); background: var(--brand-100); font-size: .66rem; font-weight: 800; }
.mode-label-neutral { color: var(--text-secondary); background: var(--surface-soft); }

.methodology-section { background: var(--surface-card); }
.methodology-intro {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    align-items: end;
    gap: 5rem;
    margin-bottom: 3rem;
}
.methodology-intro > p { max-width: 690px; margin: 0; color: var(--text-secondary); font-size: 1rem; }
.methodology-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.methodology-card {
    min-height: 245px;
    padding: 1.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
}
.methodology-card > span {
    display: inline-block;
    margin-bottom: 2.8rem;
    color: var(--text-accent);
    font-size: .67rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.methodology-card h3 { margin-bottom: .65rem; font-size: 1.28rem; }
.methodology-card p { margin: 0; color: var(--text-secondary); font-size: .82rem; }
.methodology-limit {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 1.2rem;
    margin-top: 1rem;
    padding: 1.15rem 1.3rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
}
.methodology-limit strong { color: var(--text-primary); font-size: .8rem; }
.methodology-limit p { margin: 0; color: var(--text-secondary); font-size: .76rem; }

.section-dark { color: white; background: var(--green-950); }
.pricing-grid { display: grid; gap: 2.3rem; }
.pricing-grid > .section-heading { max-width: 760px; }
.pricing-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 1rem; }
.section-heading-light p { color: rgba(255,255,255,.65); }
.eyebrow-light { color: #74baff; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 2.2rem; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); color: var(--text-primary); background: var(--surface-raised); box-shadow: 0 28px 70px rgba(0,0,0,.18); }
.price-card-featured { border-color: rgba(77, 162, 255, .72); box-shadow: 0 30px 80px rgba(0,0,0,.25), 0 0 0 1px rgba(77, 162, 255, .16); }
.price-card-featured::before { content: "Frequent research"; position: absolute; top: 0; right: 1.5rem; padding: .45rem .72rem; border-radius: 0 0 9px 9px; color: var(--brand-950); background: #74baff; font-size: .62rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.price-card > span { color: var(--text-secondary); font-size: .83rem; font-weight: 700; }
.price-card > .price-card-kicker { color: var(--text-accent); }
.price { display: flex; align-items: flex-end; gap: .45rem; margin: .45rem 0 1.5rem; }
.price strong { font-size: 4rem; line-height: 1; letter-spacing: -.07em; }
.price small { padding-bottom: .5rem; color: var(--text-muted); font-weight: 800; }
.price-card-intro { min-height: 2.7rem; margin: -.55rem 0 1.25rem; color: var(--text-secondary); font-size: .82rem; }
.feature-list { margin: 0 0 1.7rem; padding: 0; list-style: none; }
.feature-list li { display: flex; gap: .65rem; padding: .7rem 0; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: .88rem; }
.feature-list li span { color: var(--text-accent); font-weight: 850; }
.price-card .button { margin-top: auto; }
.price-card-note { margin: -1rem 0 1.2rem; color: var(--text-muted); font-size: .68rem; text-align: center; }
.format-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 5rem; }
.format-grid > * { min-width: 0; }
.format-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--green-950); box-shadow: var(--shadow-sm); }
.format-card-head { display: flex; justify-content: space-between; margin-bottom: 1.25rem; color: rgba(255,255,255,.62); font-size: .74rem; }
.format-card > code { display: block; max-width: 100%; overflow-x: auto; padding: 1.2rem; border-radius: 10px; color: #b9dcff; background: rgba(0,0,0,.2); font-size: .91rem; white-space: nowrap; }
.format-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.format-meta span { padding: .32rem .6rem; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: rgba(255,255,255,.68); font-size: .66rem; }

.faq-layout { display: grid; grid-template-columns: .7fr 1.3fr; align-items: start; gap: 5rem; }
.faq-list { display: grid; gap: .75rem; }
.faq-list details {
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-card);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.faq-list details[open] { border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
.faq-list summary {
    position: relative;
    padding: 1.15rem 3.2rem 1.15rem 1.2rem;
    color: var(--text-primary);
    font-size: .86rem;
    font-weight: 780;
    list-style: none;
    cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--text-accent);
    background: var(--green-100);
    content: "+";
    font-size: 1rem;
    transform: translateY(-50%);
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { margin: 0; padding: 0 1.2rem 1.25rem; color: var(--text-secondary); font-size: .78rem; }
.risk-disclosure-section { background: var(--surface-card); }
.investment-risk-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    padding: 2.4rem;
    border: 1px solid var(--warning-border);
    border-radius: var(--radius-lg);
    background: var(--amber-soft);
}
.risk-symbol {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--warning-border);
    border-radius: 14px;
    color: var(--warning-strong);
    background: var(--surface-raised);
    font-size: 1.2rem;
    font-weight: 900;
}
.eyebrow-risk { color: var(--warning-strong); }
.investment-risk-card h2 { margin-bottom: .85rem; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.investment-risk-card p { max-width: 920px; margin-bottom: .75rem; color: var(--warning-text); font-size: .83rem; }
.investment-risk-card .investment-risk-summary { margin-bottom: 1rem; font-size: .88rem; }
.investment-risk-summary strong { color: var(--warning-strong); }
.investment-risk-card p:last-child { margin-bottom: 0; }

.site-footer { padding: 3rem 0; border-top: 1px solid var(--border); background: var(--surface-card); }
.footer-inner { width: min(var(--content), calc(100% - 3rem)); margin-inline: auto; display: grid; grid-template-columns: 1.05fr .62fr .72fr 1.25fr; gap: 2.5rem; align-items: start; }
.brand-footer { margin-bottom: .7rem; }
.brand-footer .brand-assets { gap: .5rem; }
.brand-footer .brand-logo { width: 28px; height: auto; }
.brand-footer .brand-wordmark-image { width: 138px; height: auto; }
.footer-inner p { margin: 0; color: var(--text-muted); font-size: .75rem; }
.footer-links { display: grid; gap: .5rem; color: var(--text-secondary); font-size: .8rem; font-weight: 650; }
.footer-links strong, .footer-risk > strong { margin-bottom: .25rem; color: var(--text-primary); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-links a:hover { color: var(--text-accent-hover); }
.footer-risk p { line-height: 1.65; }
.footer-legal-line { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.auth-terms a { color: var(--text-accent); font-weight: 750; }
.auth-terms a:hover { color: var(--text-accent-hover); }

.legal-hero {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(120deg, var(--green-50), var(--page-hero-end));
}
.legal-hero-inner { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3rem; }
.legal-hero h1 { max-width: 800px; margin-bottom: .8rem; font-size: clamp(2.6rem, 5vw, 4.35rem); }
.legal-hero p { max-width: 720px; margin: 0; color: var(--text-secondary); }
.legal-meta {
    min-width: 175px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-card-translucent);
}
.legal-meta span, .legal-meta strong { display: block; }
.legal-meta span { margin-bottom: .2rem; color: var(--text-muted); font-size: .64rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.legal-meta strong { font-size: .82rem; }
.legal-page { background: var(--surface-page); }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 790px); justify-content: center; align-items: start; gap: 5rem; }
.legal-toc {
    position: sticky;
    top: 105px;
    display: grid;
    gap: .25rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-card);
}
.legal-toc strong { padding: .35rem .45rem .55rem; color: var(--text-primary); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.legal-toc a { padding: .46rem .45rem; border-radius: 7px; color: var(--text-secondary); font-size: .72rem; }
.legal-toc a:hover { color: var(--text-accent); background: var(--green-50); }
.legal-content {
    padding: 2.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}
.legal-content section { scroll-margin-top: 110px; }
.legal-content section + section { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.legal-content h2 { margin-bottom: 1rem; font-size: 1.45rem; letter-spacing: -.025em; }
.legal-content h3 { margin: 1.4rem 0 .65rem; font-size: .95rem; letter-spacing: -.015em; }
.legal-content p, .legal-content li { color: var(--text-secondary); font-size: .82rem; line-height: 1.75; }
.legal-content p { margin-bottom: .9rem; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content ul { display: grid; gap: .55rem; margin: .8rem 0 1rem; padding-left: 1.35rem; }
.legal-content a { color: var(--text-accent); font-weight: 720; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.legal-content strong { color: var(--text-primary); }
.legal-callout {
    margin: 1.2rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--accent-border);
    border-radius: 11px;
    background: var(--green-50);
}
.legal-callout > strong { display: block; margin-bottom: .25rem; font-size: .78rem; }
.legal-callout p { margin: 0; font-size: .76rem; }
.legal-callout-risk { border-color: var(--warning-border); background: var(--amber-soft); }
.legal-callout-risk > strong { color: var(--warning-strong); }
.legal-callout-risk p { color: var(--warning-text); }

.auth-section { min-height: calc(100vh - 230px); display: flex; align-items: center; background: radial-gradient(circle at 20% 20%, rgba(21, 150, 255, .12), transparent 30%); }
.auth-layout { display: grid; grid-template-columns: 1fr 470px; align-items: center; gap: 7rem; }
.auth-copy h1 { margin-bottom: .8rem; font-size: clamp(3rem, 6vw, 5rem); }
.auth-copy > p { max-width: 550px; color: var(--text-secondary); font-size: 1.08rem; }
.auth-note { max-width: 520px; display: flex; gap: 1rem; margin-top: 2rem; padding: 1rem; border: 1px solid var(--accent-border); border-radius: 13px; background: var(--green-50); }
.auth-note strong { font-size: .85rem; }
.auth-note p { margin: .15rem 0 0; color: var(--text-secondary); font-size: .76rem; }
.lock-icon { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--text-accent); background: var(--surface-raised); font-size: .52rem; }
.auth-card { padding: 2.3rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-card); box-shadow: var(--shadow-lg); }
.auth-card-head { margin-bottom: 1.7rem; }
.auth-card-head .eyebrow { margin-bottom: .35rem; }
.auth-card-head h2 { margin: 0; font-size: 1.65rem; }
.form-stack { display: grid; gap: 1.2rem; }
.form-field { display: grid; gap: .45rem; }
.form-field label, .field-label { color: var(--text-primary); font-size: .8rem; font-weight: 760; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.label-row span { color: var(--text-muted); font-size: .67rem; }
.form-field input, .form-field select, .form-field textarea, .form-section-content select {
    width: 100%;
    min-height: 48px;
    padding: .75rem .85rem;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--text-primary);
    background: var(--surface-input);
    transition: border .16s ease, box-shadow .16s ease;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 0; border-color: var(--green-600); box-shadow: 0 0 0 4px var(--focus-ring); }
.password-field { position: relative; }
.password-field input { padding-right: 4.5rem; }
.password-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; padding: .4rem .55rem; color: var(--text-accent); background: transparent; font-size: .72rem; font-weight: 800; cursor: pointer; }
.auth-footnote { margin: 1.3rem 0 0; color: var(--text-muted); font-size: .7rem; text-align: center; }

/* Account registration, recovery, and verification */
.primary-navigation > .button[aria-current="page"]::after { display: none; }
.primary-navigation > .button[aria-current="page"] { box-shadow: 0 0 0 3px rgba(0, 101, 253, .18); }
.auth-card-head > p { margin: .55rem 0 0; color: var(--text-secondary); font-size: .76rem; }
.auth-inline-link { color: var(--text-accent); font-size: .7rem; font-weight: 780; }
.auth-inline-link:hover { color: var(--text-accent-hover); }
.auth-switch { margin: 1.5rem 0 0; padding-top: 1.15rem; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: .76rem; text-align: center; }
.auth-switch a { color: var(--text-accent); font-weight: 800; }
.auth-switch a:hover { color: var(--text-accent-hover); }
.auth-layout-wide { grid-template-columns: minmax(0, 1fr) 560px; gap: 5rem; }
.auth-section-signup .auth-layout { align-items: start; }
.auth-section-signup .auth-copy { padding-top: 2.5rem; }
.auth-card-wide { padding: 2rem; }
.auth-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.auth-field-wide { grid-column: 1 / -1; }
.auth-form-help { margin: -.25rem 0 0; color: var(--text-muted); font-size: .68rem; }
.auth-terms { margin: 1rem 0 0; color: var(--text-muted); font-size: .66rem; line-height: 1.6; text-align: center; }
.auth-benefits { max-width: 540px; display: grid; gap: .7rem; margin-top: 2rem; }
.auth-benefits > div { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; padding: .85rem 0; border-top: 1px solid var(--border); text-align: left; }
.auth-benefits > div > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--text-accent); background: var(--green-100); font-size: .65rem; font-weight: 850; }
.auth-benefits p, .auth-benefits strong, .auth-benefits small { display: block; margin: 0; }
.auth-benefits strong { font-size: .8rem; }
.auth-benefits small { margin-top: .15rem; color: var(--text-muted); font-size: .68rem; }
.auth-section-compact .auth-copy h1 { font-size: clamp(2.8rem, 5vw, 4.35rem); }
.auth-verification-section { min-height: calc(100vh - 230px); }
.auth-status-card { max-width: 760px; padding: clamp(1.7rem, 5vw, 3.5rem); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-card); box-shadow: var(--shadow-lg); text-align: center; }
.auth-status-icon { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 1.3rem; border-radius: 20px; color: white; background: linear-gradient(145deg, var(--brand-900), var(--brand-600)); font-size: 1.3rem; font-weight: 850; box-shadow: 0 12px 30px rgba(0, 101, 253, .22); }
.auth-status-card .eyebrow { margin-bottom: .5rem; }
.auth-status-card h1 { margin-bottom: .8rem; font-size: clamp(2.4rem, 6vw, 4rem); }
.auth-status-card > p { max-width: 610px; margin: 0 auto; color: var(--text-secondary); }
.auth-status-card > p strong { color: var(--text-primary); overflow-wrap: anywhere; }
.auth-verification-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 2rem 0 1rem; text-align: left; }
.auth-verification-steps > div { display: grid; grid-template-columns: auto 1fr; gap: .65rem; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-page); }
.auth-verification-steps > div > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--text-accent); background: var(--green-100); font-size: .65rem; font-weight: 850; }
.auth-verification-steps p, .auth-verification-steps strong, .auth-verification-steps small { display: block; margin: 0; }
.auth-verification-steps strong { font-size: .73rem; }
.auth-verification-steps small { margin-top: .18rem; color: var(--text-muted); font-size: .64rem; }
.auth-resend-panel { margin-top: 1rem; padding: 1.2rem; border: 1px solid var(--accent-border); border-radius: 13px; background: var(--green-50); }
.auth-resend-panel p { margin-bottom: .85rem; color: var(--text-secondary); font-size: .75rem; }
.auth-resend-panel form { margin: 0; }
.auth-status-link { display: inline-flex; margin-top: 1.4rem; color: var(--text-accent); font-size: .76rem; font-weight: 800; }
.auth-status-link:hover { color: var(--text-accent-hover); }
.auth-token-status { margin: -.15rem 0 0; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: 9px; color: var(--text-secondary); background: var(--surface-page); font-size: .68rem; text-align: center; }
.auth-token-status.is-ready { border-color: var(--success-border); color: var(--status-success-text); background: var(--success-soft); }
.auth-token-status.is-error { border-color: var(--danger-border); color: var(--status-danger-text); background: var(--danger-soft); }
.email-preview-layout { max-width: 820px; }
.email-preview-card { overflow: hidden; border: 1px solid #d8e2ee; border-radius: var(--radius-lg); color: #071426; background: #ffffff; box-shadow: var(--shadow-lg); }
.email-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid #d8e2ee; background: #f5f8fc; }
.email-preview-brand { display: flex; align-items: center; gap: .7rem; }
.email-preview-brand .brand-assets { gap: .4rem; padding: 0; background: transparent; box-shadow: none; }
.email-preview-brand .brand-logo { width: 27px; height: auto; }
.email-preview-brand .brand-wordmark-image { width: 128px; height: auto; }
html[data-theme="dark"] .email-preview-brand .brand-assets {
    padding: 0;
    background: transparent;
    box-shadow: none;
}
.email-preview-brand strong, .email-preview-brand small { display: block; }
.email-preview-brand strong { font-size: .8rem; }
.email-preview-brand small { color: #5f7086; font-size: .65rem; }
.email-preview-meta { margin: 0; padding: .75rem 1.3rem; border-bottom: 1px solid #d8e2ee; }
.email-preview-meta > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: .75rem; padding: .35rem 0; }
.email-preview-meta dt { color: #5f7086; font-size: .68rem; }
.email-preview-meta dd { margin: 0; overflow-wrap: anywhere; font-size: .72rem; font-weight: 700; }
.email-preview-body { max-width: 610px; margin-inline: auto; padding: clamp(2rem, 7vw, 4rem) 1.5rem; text-align: center; }
.email-preview-icon { width: 55px; height: 55px; margin-bottom: 1.1rem; border-radius: 16px; font-size: 1rem; }
.email-preview-body h2 { margin-bottom: .8rem; font-size: clamp(1.7rem, 4vw, 2.35rem); }
.email-preview-body > p { color: #4f6075; white-space: pre-line; }
.email-preview-body > .button { margin-top: .7rem; }
.email-preview-body > small { display: block; margin-top: 1.2rem; color: #5f7086; font-size: .67rem; }
.email-preview-footer { padding: 1rem 1.3rem; border-top: 1px solid #d8e2ee; color: #5f7086; background: #f5f8fc; font-size: .65rem; line-height: 1.6; text-align: center; }

.page-hero { background: linear-gradient(120deg, var(--green-50), var(--page-hero-end)); }
.page-hero-grid { display: grid; grid-template-columns: 1fr 420px; align-items: center; gap: 5rem; }
.page-hero h1 { margin-bottom: .8rem; font-size: clamp(2.6rem, 5vw, 4rem); }
.page-hero p { max-width: 660px; color: var(--text-secondary); }
.page-status-card { display: flex; gap: 1rem; padding: 1.2rem; border: 1px solid var(--info-border); border-radius: 14px; background: var(--surface-status-translucent); }
.status-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-weight: 850; }
.page-status-card strong { font-size: .85rem; }
.page-status-card p { margin: .2rem 0 0; font-size: .75rem; }
.contact-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 2rem; }
.surface-card { padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); box-shadow: var(--shadow-sm); }
.form-grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-aside { display: grid; align-content: start; gap: 1rem; }
.info-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); }
.info-card-label { display: inline-block; margin-bottom: 1.1rem; color: var(--text-accent); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.info-card h3 { margin-bottom: .6rem; font-size: 1.25rem; }
.info-card p { color: var(--text-secondary); font-size: .85rem; }

.dashboard-page { min-height: calc(100vh - 250px); }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.2rem; }
.dashboard-heading h1 { margin: 0 0 .45rem; font-size: clamp(2.25rem, 3.5vw, 3rem); }
.dashboard-heading p { margin: 0; color: var(--text-secondary); }
.dashboard-heading .eyebrow { margin-bottom: .5rem; }
.dashboard-heading-compact { align-items: start; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.metrics-grid-two { grid-template-columns: repeat(2, 1fr); }
.metrics-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { min-height: 182px; display: flex; flex-direction: column; justify-content: space-between; padding: 1.35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); box-shadow: var(--shadow-sm); }
.metric-card-primary { color: white; border-color: var(--green-900); background: linear-gradient(135deg, var(--green-900), var(--green-700)); }
.metric-top, .metric-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.metric-top > span:first-child { color: var(--text-secondary); font-size: .76rem; font-weight: 700; }
.metric-card-primary .metric-top > span:first-child { color: rgba(255,255,255,.68); }
.metric-card > strong { font-size: 2.25rem; letter-spacing: -.05em; }
.metric-card > .metric-plan-name { font-size: clamp(1.65rem, 3vw, 2.25rem); }
.metric-card strong small { color: var(--text-muted); font-size: .9rem; letter-spacing: 0; }
.metric-card-primary strong small { color: rgba(255,255,255,.65); }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--green-900); background: white; font-weight: 850; }
.metric-icon-soft { color: var(--text-accent); background: var(--green-100); }
.metric-foot { min-height: 23px; color: var(--text-muted); font-size: .68rem; }
.metric-foot a { color: var(--text-accent); font-weight: 800; }
.metric-card-primary .metric-foot { color: rgba(255,255,255,.6); }
.metric-card-primary .metric-foot a { color: white; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.card-heading .eyebrow { margin-bottom: .35rem; }
.card-heading h2 { margin: 0; font-size: 1.35rem; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.compact-empty { min-height: 300px; padding: 2rem; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-page); }
.empty-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 15px; color: var(--text-accent); background: var(--green-100); font-size: 1.2rem; }
.compact-empty h3 { margin: 0 0 .5rem; }
.compact-empty p { max-width: 440px; margin-bottom: 1.25rem; color: var(--text-secondary); font-size: .85rem; }
.action-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .9rem 0; border-top: 1px solid var(--border); }
.action-row:hover strong { color: var(--text-accent-hover); }
.action-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--text-accent); background: var(--green-100); font-weight: 850; }
.action-row strong, .action-row small { display: block; }
.action-row strong { font-size: .82rem; }
.action-row small { color: var(--text-muted); font-size: .68rem; }
.status-chip { width: max-content; padding: .4rem .7rem; border: 1px solid var(--success-border); border-radius: 999px; color: var(--status-success-text); background: var(--success-soft); font-size: .7rem; font-weight: 800; }
.status-chip-warning { border-color: var(--warning-border); color: var(--status-warning-text); background: var(--amber-soft); }
.status-chip-warning > span { background: var(--amber); box-shadow: 0 0 0 4px rgba(196,122,22,.12); }
.validation-chip-neutral { color: var(--text-secondary); background: var(--surface-soft); }
.upload-preview-card { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.5rem; margin-bottom: 1rem; }
.upload-dropzone { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-page); text-align: center; }
.upload-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 15px; color: var(--text-accent); background: var(--green-100); font-size: 1.2rem; }
.upload-dropzone h2 { margin-bottom: .6rem; font-size: 1.35rem; }
.upload-dropzone p { max-width: 510px; color: var(--text-secondary); font-size: .86rem; }
.helper-text { color: var(--text-muted); font-size: .68rem; }
.upload-dropzone .helper-text { margin-top: .9rem; }
.upload-rules { display: grid; align-content: center; gap: 1rem; }
.upload-rules > div { display: flex; gap: .8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.rule-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--text-accent); background: var(--green-100); font-weight: 850; }
.upload-rules p { margin: 0; }
.upload-rules strong, .upload-rules small { display: block; }
.upload-rules strong { font-size: .8rem; }
.upload-rules small { margin-top: .15rem; color: var(--text-muted); font-size: .68rem; }
.dataset-empty-card { margin-top: 1rem; }
.dataset-list { display: grid; gap: .7rem; }
.dataset-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; padding: 1rem; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-page); }
.dataset-row strong, .dataset-row small { display: block; }
.dataset-row strong { font-size: .8rem; }
.dataset-row small { color: var(--text-muted); font-size: .68rem; }
.dataset-row > div:last-child { text-align: right; }

/* Dataset upload and GridFS-backed history */
.dataset-metrics { margin-bottom: 1rem; }
.dataset-upload-shell { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); gap: 1.5rem; margin-bottom: 1rem; }
.dataset-upload-form, .dataset-upload-form fieldset { min-width: 0; }
.dataset-upload-form fieldset { display: grid; gap: 1.2rem; margin: 0; padding: 0; border: 0; }
.dataset-upload-form fieldset:disabled { opacity: .62; }
.dataset-upload-shell { scroll-margin-top: 145px; }
.dataset-upload-heading { align-items: flex-start; }
.dataset-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dataset-upload-wide { grid-column: 1 / -1; }
.dataset-file-field input[type="file"], .dataset-merge-form input[type="file"] { height: auto; min-height: 54px; padding: .38rem; color: var(--text-secondary); background: var(--surface-page); cursor: pointer; }
.dataset-file-field input[type="file"]::file-selector-button, .dataset-merge-form input[type="file"]::file-selector-button { min-height: 38px; margin-right: .75rem; padding: .55rem .8rem; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text-accent); background: var(--surface-raised); font-weight: 760; cursor: pointer; }
.dataset-checkbox { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-page); cursor: pointer; }
.dataset-checkbox input { width: 17px; height: 17px; flex: 0 0 auto; margin: .15rem 0 0; accent-color: var(--green-600); }
.dataset-checkbox strong, .dataset-checkbox small { display: block; }
.dataset-checkbox strong { font-size: .79rem; }
.dataset-checkbox small { margin-top: .15rem; color: var(--text-muted); font-size: .68rem; }
.dataset-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.dataset-upload-actions p { max-width: 330px; margin: 0; color: var(--text-muted); font-size: .7rem; }
.dataset-form-notice, .dataset-inline-warning { padding: .8rem .9rem; border: 1px solid var(--warning-border); border-radius: 10px; color: var(--warning-text); background: var(--amber-soft); font-size: .75rem; }
.dataset-upload-guide { min-width: 0; padding: 1.35rem; border-radius: 14px; background: var(--surface-page); }
.dataset-upload-guide h3 { margin-bottom: .65rem; font-size: 1.35rem; }
.dataset-upload-guide > p { margin-bottom: 1.25rem; color: var(--text-secondary); font-size: .78rem; }
.dataset-upload-guide .upload-rules { gap: .8rem; }
.dataset-upload-guide .upload-rules > div { padding-bottom: .8rem; }
.dataset-format-sample { min-width: 0; margin-top: 1rem; padding: .9rem; border-radius: 10px; color: white; background: var(--green-950); }
.dataset-format-sample span { display: block; margin-bottom: .45rem; color: rgba(255,255,255,.55); font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.dataset-format-sample code { display: block; overflow-x: auto; color: #b9dcff; font-size: .72rem; white-space: nowrap; }
.dataset-list-card { margin-top: 1rem; }
.dataset-row { grid-template-columns: auto minmax(150px, .8fr) minmax(240px, 1.15fr) auto auto; gap: 1rem; color: inherit; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.dataset-row:hover { border-color: var(--accent-border-hover); background: var(--green-50); transform: translateY(-1px); }
.dataset-row-copy, .dataset-row-range, .dataset-row-status { min-width: 0; }
.dataset-row-copy strong, .dataset-row-copy small, .dataset-row-range strong, .dataset-row-range small, .dataset-row-status small { display: block; }
.dataset-row-copy strong { font-size: .86rem; }
.dataset-row-range { text-align: right; }
.dataset-row-range strong { font-size: .75rem; }
.dataset-row-status { display: grid; justify-items: end; gap: .25rem; text-align: right; }
.dataset-row-arrow { color: var(--text-accent); font-weight: 850; }
.dataset-folder-row { grid-template-columns: minmax(0, 1fr) auto; padding: 0; overflow: hidden; }
.dataset-folder-row:hover { transform: none; }
.dataset-row-main { min-width: 0; display: grid; grid-template-columns: auto minmax(150px, .8fr) minmax(240px, 1.15fr) auto auto; align-items: center; gap: 1rem; padding: 1rem; color: inherit; }
.dataset-row-main-static { width: 100%; grid-template-columns: auto minmax(180px, 1fr) auto; }
.dataset-row-action { align-self: stretch; display: flex; align-items: center; padding: .75rem; border-left: 1px solid var(--border); }
.dataset-row-action .button { min-width: 76px; }
.dataset-row-muted { background: var(--surface-soft); }
.dataset-row-muted:hover { background: var(--surface-soft); }
.folder-state-section { scroll-margin-top: 140px; }
.folder-state-cta { margin-top: 1rem; }
.section-intro { margin: -.35rem 0 1.1rem; color: var(--text-secondary); font-size: .78rem; }
.capacity-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; margin-top: 1rem; padding: 1.15rem; border: 1px solid var(--warning-border); border-radius: 14px; color: var(--warning-text); background: var(--amber-soft); }
.capacity-notice[hidden] { display: none; }
.capacity-notice-static { margin: 0 0 1rem; }
.capacity-notice-icon, .transition-banner-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--warning-strong); background: var(--surface-raised); font-size: .68rem; font-weight: 850; }
.capacity-notice strong { color: var(--warning-strong); font-size: .86rem; }
.capacity-notice p { margin: .3rem 0 0; font-size: .76rem; }
.capacity-notice-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.transition-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; padding: 1.35rem; border: 1px solid var(--accent-border); border-radius: var(--radius); background: var(--green-50); box-shadow: var(--shadow-sm); }
.transition-banner h2 { margin: .2rem 0 .45rem; font-size: 1.25rem; }
.transition-banner p { max-width: 850px; margin: 0; color: var(--text-secondary); font-size: .8rem; }
.transition-banner-icon { color: var(--text-accent); background: var(--surface-raised); }
.trial-overview {
    margin-bottom: 1rem;
    padding: 1.15rem 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-card);
}
.trial-overview-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.trial-overview-heading h2 { display: inline-flex; align-items: center; gap: .55rem; margin: 0; color: var(--text-primary); font-size: 1rem; }
.trial-overview-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 14%, transparent); }
.trial-overview-remaining { color: var(--text-secondary); font-size: .82rem; font-weight: 750; white-space: nowrap; }
.trial-overview-remaining span { color: var(--text-accent); font-size: 1.22rem; letter-spacing: -.04em; }
.trial-overview-inclusions { margin: .45rem 0 0; color: var(--text-secondary); font-size: .78rem; line-height: 1.55; }
.trial-overview-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .55rem; }
.trial-overview-footer p { margin: 0; color: var(--text-muted); font-size: .78rem; line-height: 1.5; }
.trial-overview-link { min-height: 44px; display: inline-flex; flex: 0 0 auto; align-items: center; gap: .35rem; margin-block: -.6rem; font-size: .78rem; }
.trial-transition-notice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; margin-bottom: 1rem; padding: 1.15rem 1.35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); }
.trial-transition-notice h2 { margin: 0 0 .25rem; font-size: 1rem; }
.trial-transition-notice p { margin: 0; color: var(--text-secondary); font-size: .76rem; line-height: 1.5; }
.trial-transition-notice .trial-transition-detail { margin-top: .3rem; color: var(--text-muted); font-size: .76rem; }
.trial-transition-notice > .text-link { min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; }
.trial-account-summary .trial-account-card { min-height: 140px; box-shadow: none; }
.folder-selection-card { margin-bottom: 1rem; }
.folder-selection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-bottom: .9rem; }
.folder-selection-option { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: .75rem; padding: .85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-page); cursor: pointer; }
.folder-selection-option:has(input:checked) { border-color: var(--accent-border-selected); background: var(--green-50); }
.folder-selection-option input { width: 17px; height: 17px; accent-color: var(--green-600); }
.folder-selection-option strong, .folder-selection-option small { display: block; }
.folder-selection-option strong { font-size: .78rem; }
.folder-selection-option small { color: var(--text-muted); font-size: .65rem; }
.folder-selection-card > .button { width: max-content; margin-top: .75rem; }

/* Dataset details and version history */
.dataset-back-link { display: inline-flex; margin-bottom: 1.2rem; color: var(--text-accent); font-size: .78rem; font-weight: 780; }
.dataset-back-link:hover { color: var(--text-accent-hover); }
.dataset-detail-heading { align-items: center; }
.dataset-title-lockup { display: flex; align-items: center; gap: 1rem; }
.ticker-icon-large { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 16px; font-size: 1.05rem; }
.dataset-title-lockup .eyebrow { margin-bottom: .35rem; }
.dataset-title-lockup h1 { margin-bottom: .3rem; }
.dataset-detail-actions { display: flex; align-items: center; gap: .8rem; }
.dataset-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.dataset-summary-card { min-width: 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-card); box-shadow: var(--shadow-sm); }
.dataset-summary-card > span, .dataset-summary-card > small { display: block; color: var(--text-muted); font-size: .68rem; }
.dataset-summary-card > strong { display: block; margin: .55rem 0 .2rem; overflow-wrap: anywhere; font-size: 1.25rem; letter-spacing: -.03em; }
.dataset-summary-card > .included-plan-label { color: var(--text-accent); font-size: 1.05rem; letter-spacing: -.01em; }
.dataset-detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); gap: 1rem; }
.dataset-detail-card, .dataset-merge-card { min-width: 0; }
.history-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.history-pagination > span:last-child { text-align: right; }
.history-pagination > strong { color: var(--text-secondary); font-size: .7rem; }
.dataset-meta-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; margin: 0; }
.dataset-meta-list > div { min-width: 0; padding: .8rem 0; border-top: 1px solid var(--border); }
.dataset-meta-list dt { color: var(--text-muted); font-size: .68rem; }
.dataset-meta-list dd { margin: .22rem 0 0; overflow-wrap: anywhere; font-size: .78rem; font-weight: 720; }
.dataset-meta-wide { grid-column: 1 / -1; }
.dataset-meta-list code { color: var(--text-secondary); font-size: .68rem; word-break: break-all; }
.dataset-merge-card > p { color: var(--text-secondary); font-size: .78rem; }
.dataset-merge-rules { display: grid; gap: .55rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.dataset-merge-rules li { position: relative; padding-left: 1.35rem; color: var(--text-secondary); font-size: .72rem; }
.dataset-merge-rules li::before { content: "\2713"; position: absolute; left: 0; color: var(--text-accent); font-weight: 850; }
.dataset-merge-form { display: grid; gap: 1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.dataset-inline-warning { margin: 1rem 0 0; }
.dataset-versions-card { margin-top: 1rem; }
.dataset-version-table { min-width: 900px; }
.dataset-version-table td { vertical-align: middle; }
.dataset-version-table td > strong, .dataset-version-table td > small { display: block; }
.dataset-version-table td > strong { margin-bottom: .25rem; font-size: .75rem; }
.dataset-version-table td > small { color: var(--text-muted); font-size: .64rem; }
.dataset-version-table td:first-child strong { display: inline-block; margin: 0 .45rem 0 0; }
.dataset-version-file { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dataset-version-table code { color: var(--text-secondary); font-size: .66rem; }

.analysis-layout { display: block; }
.analysis-form-card { padding: 0; overflow: hidden; }
.form-section { display: grid; grid-template-columns: 46px 1fr; gap: 1rem; padding: 1.5rem; border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: 0; }
.form-section-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--text-accent); background: var(--green-100); font-size: .72rem; font-weight: 850; }
.form-section-content { display: grid; gap: .65rem; }
.form-section-content > label, .field-label { font-size: .82rem; font-weight: 800; }
.form-section-content select:disabled { color: var(--text-muted); background: var(--surface-page); }
.ticker-picker { position: relative; display: grid; gap: .55rem; }
.ticker-combobox-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    color: var(--text-secondary);
    background: var(--surface-input);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.ticker-combobox-shell:focus-within {
    border-color: var(--green-600);
    box-shadow: 0 0 0 4px var(--focus-ring);
}
.ticker-combobox-shell.is-selected {
    border-color: var(--accent-border-selected);
    background: var(--green-50);
}
.ticker-search-mark {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin-left: .85rem;
    color: var(--text-muted);
}
.ticker-search-mark svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.ticker-combobox-shell.is-selected .ticker-search-mark { color: var(--text-accent); }
.ticker-combobox-shell.is-loading .ticker-search-mark {
    border: 2px solid var(--border-strong);
    border-top-color: var(--green-600);
    border-radius: 50%;
    animation: ticker-spin .7s linear infinite;
}
.ticker-combobox-shell.is-loading .ticker-search-mark svg { visibility: hidden; }
.ticker-combobox-shell input {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: .75rem .7rem;
    border: 0;
    outline: 0;
    color: var(--text-primary);
    background: transparent;
    font: inherit;
}
.ticker-combobox-shell input::placeholder { color: var(--text-muted); }
.ticker-combobox-shell input:disabled { cursor: not-allowed; }
.ticker-clear {
    min-height: 34px;
    margin-right: .45rem;
    padding: .35rem .62rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-accent);
    background: var(--surface-card);
    font-size: .66rem;
    font-weight: 800;
    cursor: pointer;
}
.ticker-clear:hover { border-color: var(--accent-border-hover); background: var(--green-100); }
.ticker-clear:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 1px; }
.ticker-clear[hidden] { display: none; }
.ticker-listbox {
    position: absolute;
    z-index: 30;
    top: 56px;
    right: 0;
    left: 0;
    max-height: 330px;
    overflow-y: auto;
    padding: .4rem;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface-card);
    box-shadow: var(--shadow-lg);
}
.ticker-listbox[hidden], .ticker-option-group[hidden], .ticker-listbox-empty[hidden] { display: none; }
.ticker-option-group { display: grid; gap: .2rem; }
.ticker-option-group + .ticker-option-group {
    margin-top: .35rem;
    padding-top: .35rem;
    border-top: 1px solid var(--border);
}
.ticker-option-heading {
    display: block;
    padding: .42rem .6rem .3rem;
    color: var(--text-muted);
    font-size: .61rem;
    font-weight: 830;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.ticker-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    min-height: 50px;
    padding: .62rem .68rem;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
}
.ticker-option:hover, .ticker-option-active {
    border-color: var(--accent-border-hover);
    background: var(--green-50);
}
.ticker-option-selected {
    border-color: var(--accent-border-selected);
    background: var(--green-100);
}
.ticker-option-copy { min-width: 0; }
.ticker-option-copy strong, .ticker-option-copy small { display: block; }
.ticker-option-copy strong {
    overflow: hidden;
    font-size: .75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ticker-option-copy small {
    margin-top: .16rem;
    color: var(--text-muted);
    font-size: .62rem;
}
.ticker-option-badge {
    flex: 0 0 auto;
    padding: .24rem .42rem;
    border-radius: 999px;
    color: var(--text-accent);
    background: var(--green-100);
    font-size: .57rem;
    font-weight: 820;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.ticker-listbox-empty {
    padding: .9rem .7rem;
    color: var(--text-muted);
    font-size: .7rem;
    text-align: center;
}
.ticker-picker .helper-text.is-error { color: var(--danger); }
@keyframes ticker-spin { to { transform: rotate(360deg); } }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.choice-card { display: flex; align-items: center; gap: .8rem; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-card); cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.choice-card:hover { border-color: var(--accent-border-hover); transform: translateY(-1px); }
.choice-card-selected { border-color: var(--accent-border-selected); background: var(--green-50); }
.choice-card input { position: absolute; opacity: 0; }
.choice-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--green-600); font-size: .7rem; font-weight: 850; }
.choice-mark-dark { background: var(--green-950); }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { font-size: .78rem; }
.choice-card small { color: var(--text-muted); font-size: .65rem; }
.run-review > div { display: flex; justify-content: space-between; font-size: .78rem; }
.run-review > div span { color: var(--text-secondary); }
.run-review > div strong { font-size: .85rem; }
.run-review > p { margin: 0; color: var(--text-muted); font-size: .66rem; text-align: center; }
.analysis-is-running { overflow: hidden; touch-action: none; }
.analysis-running-overlay[hidden] { display: none; }
.analysis-running-overlay {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 2rem;
    color: #071426;
    background:
        radial-gradient(circle at 16% 12%, rgba(35, 146, 255, .32), transparent 34%),
        radial-gradient(circle at 84% 88%, rgba(0, 101, 253, .24), transparent 35%),
        rgba(0, 15, 38, .91);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    backdrop-filter: blur(18px) saturate(120%);
    overscroll-behavior: contain;
}
.analysis-running-overlay:focus { outline: 0; }
.analysis-running-card {
    position: relative;
    width: min(780px, 100%);
    display: grid;
    grid-template-columns: minmax(280px, .92fr) minmax(0, 1.08fr);
    overflow: hidden;
    border: 1px solid rgba(154, 199, 243, .82);
    border-radius: 28px;
    background: linear-gradient(145deg, #ffffff, #edf6ff);
    box-shadow:
        0 34px 100px rgba(0, 10, 32, .52),
        0 0 0 1px rgba(255, 255, 255, .35) inset;
}
.analysis-running-card::after {
    content: "";
    position: absolute;
    top: -90px;
    right: -85px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(0, 101, 253, .08);
    pointer-events: none;
}
.analysis-running-visual {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 38%, rgba(72, 169, 255, .26), transparent 34%),
        linear-gradient(150deg, #00152f 0%, #002f70 60%, #0065fd 145%);
}
.analysis-running-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(159, 205, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(159, 205, 255, .07) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.82), transparent 92%);
}
.analysis-running-orbit {
    position: absolute;
    z-index: 2;
    top: 48px;
    left: 50%;
    width: 132px;
    height: 132px;
    transform: translateX(-50%);
}
.analysis-running-orbit-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(146, 205, 255, .34);
    border-top-color: #ffffff;
    border-right-color: #5eb3ff;
    border-radius: 50%;
    box-shadow: 0 0 32px rgba(28, 142, 255, .20);
    animation: analysis-orbit-spin 2.1s linear infinite;
}
.analysis-running-orbit-ring::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 16px #75beff;
}
.analysis-running-orbit-ring-secondary {
    inset: 13px;
    border-color: rgba(255, 255, 255, .18);
    border-bottom-color: #3299ff;
    animation-direction: reverse;
    animation-duration: 1.45s;
}
.analysis-running-orbit-ring-secondary::before {
    top: auto;
    right: auto;
    bottom: 6px;
    left: 13px;
    width: 6px;
    height: 6px;
    background: #46a8ff;
}
.analysis-running-orbit-core {
    position: absolute;
    inset: 36px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 15px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 30px rgba(0, 24, 65, .36);
}
.analysis-running-orbit-core span {
    width: 7px;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(to top, #0057c8, #48a9ff);
    transform-origin: center bottom;
    animation: analysis-bar-pulse 1.15s ease-in-out infinite alternate;
}
.analysis-running-orbit-core span:nth-child(1) { height: 14px; }
.analysis-running-orbit-core span:nth-child(2) { height: 27px; animation-delay: -.38s; }
.analysis-running-orbit-core span:nth-child(3) { height: 20px; animation-delay: -.72s; }
.analysis-running-chart {
    position: absolute;
    right: 15px;
    bottom: 30px;
    left: 15px;
    width: calc(100% - 30px);
    overflow: visible;
}
.analysis-running-chart path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.analysis-running-grid { stroke: rgba(196, 225, 255, .13); stroke-width: 1; }
.analysis-running-bound {
    stroke: rgba(95, 183, 255, .66);
    stroke-width: 1.5;
    stroke-dasharray: 5 7;
    animation: analysis-chart-flow 1.4s linear infinite;
}
.analysis-running-bound-lower { animation-direction: reverse; }
.analysis-running-line {
    stroke: url("#analysis-running-line");
    stroke-width: 4;
    stroke-dasharray: 610;
    stroke-dashoffset: 610;
    filter: drop-shadow(0 0 5px rgba(72, 169, 255, .65));
    animation: analysis-line-draw 2.3s ease-in-out infinite;
}
.analysis-running-point {
    fill: #ffffff;
    stroke: #168fff;
    stroke-width: 3;
    transform-box: fill-box;
    transform-origin: center;
    animation: analysis-point-pulse 1.2s ease-in-out infinite;
}
.analysis-running-copy {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 3rem;
}
.analysis-running-kicker {
    margin-bottom: .8rem;
    color: #0057c8;
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.analysis-running-copy h2 {
    margin-bottom: .8rem;
    color: #071426;
    font-size: clamp(1.8rem, 4vw, 2.45rem);
}
.analysis-running-ticker {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 1rem;
    overflow: hidden;
    padding: .34rem .58rem;
    border: 1px solid #bfd9f6;
    border-radius: 999px;
    color: #004fae;
    background: rgba(232, 244, 255, .88);
    font-size: .66rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analysis-running-ticker[hidden] { display: none; }
.analysis-running-status {
    min-height: 1.6em;
    margin-bottom: .8rem;
    color: #3f536b;
    font-size: .8rem;
    font-weight: 720;
}
.analysis-running-status::after {
    content: "\2026";
    display: inline-block;
    width: 1.4em;
    overflow: hidden;
    vertical-align: bottom;
    animation: analysis-ellipsis 1.3s steps(4, end) infinite;
}
.analysis-running-progress {
    position: relative;
    height: 6px;
    overflow: hidden;
    margin-bottom: 1.15rem;
    border-radius: 999px;
    background: #dcecff;
}
.analysis-running-progress span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -42%;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1596ff, #0065fd, #7fc5ff);
    box-shadow: 0 0 14px rgba(0, 101, 253, .36);
    animation: analysis-progress-scan 1.55s ease-in-out infinite;
}
.analysis-running-note {
    margin: 0;
    color: #607188;
    font-size: .68rem;
    line-height: 1.55;
}
@keyframes analysis-orbit-spin {
    to { transform: rotate(360deg); }
}
@keyframes analysis-bar-pulse {
    to { transform: scaleY(.55); opacity: .68; }
}
@keyframes analysis-chart-flow {
    to { stroke-dashoffset: -24; }
}
@keyframes analysis-line-draw {
    0% { stroke-dashoffset: 610; opacity: .35; }
    55%, 82% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: -40; opacity: .45; }
}
@keyframes analysis-point-pulse {
    50% { transform: scale(1.55); opacity: .7; }
}
@keyframes analysis-ellipsis {
    0% { width: 0; }
    100% { width: 1.4em; }
}
@keyframes analysis-progress-scan {
    0% { left: -42%; }
    100% { left: 100%; }
}
.risk-card { padding: 1rem 1.1rem; border: 1px solid var(--warning-border); border-radius: 13px; background: var(--amber-soft); }
.risk-card strong { color: var(--warning-strong); font-size: .8rem; }
.risk-card p { margin: .25rem 0 0; color: var(--warning-text); font-size: .7rem; }

.billing-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); align-items: stretch; gap: 1rem; margin-bottom: 1rem; }
.balance-card { padding: 2rem; border-radius: var(--radius); color: white; background: linear-gradient(140deg, var(--green-900), var(--green-600)); box-shadow: var(--shadow-lg); }
.balance-card > span { color: rgba(255,255,255,.68); font-size: .78rem; font-weight: 700; }
.balance-card > strong { display: block; margin: .6rem 0; font-size: clamp(2.6rem, 5vw, 4rem); letter-spacing: -.065em; }
.balance-card > p { margin-bottom: 1.5rem; color: rgba(255,255,255,.72); font-size: .82rem; }
.balance-card > small { display: block; margin-top: .65rem; color: rgba(255,255,255,.55); font-size: .64rem; text-align: center; }
.billing-plan-card { display: flex; flex-direction: column; }
.billing-plan-card-pro { border-color: var(--accent-border-selected); }
.billing-plan-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.billing-plan-heading h2 { margin: .15rem 0 0; font-size: 1.7rem; }
.billing-plan-card > p { color: var(--text-secondary); font-size: .8rem; }
.billing-plan-card > form { margin-top: auto; padding-top: 1rem; }
.billing-plan-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: .3rem 0 1rem; }
.billing-plan-facts > div { padding: .75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.billing-plan-facts dt { color: var(--text-muted); font-size: .63rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.billing-plan-facts dd { margin: .25rem 0 0; font-size: .78rem; font-weight: 780; }
.billing-plan-notice { padding: .8rem .9rem; border: 1px solid var(--warning-border); border-radius: 10px; color: var(--warning-text); background: var(--amber-soft); font-size: .72rem; }
.compact-feature-list { display: grid; gap: .5rem; margin: .25rem 0 1rem; padding: 0; list-style: none; }
.compact-feature-list li { position: relative; padding-left: 1.25rem; color: var(--text-secondary); font-size: .72rem; }
.compact-feature-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--text-accent); font-weight: 850; }
.top-up-section { margin-top: 1rem; scroll-margin-top: 135px; }
.top-up-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.top-up-card { position: relative; padding: 1.25rem; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-page); }
.top-up-card-popular { border-color: var(--accent-border-selected); background: var(--green-50); }
.top-up-card > strong { display: block; margin-bottom: .35rem; font-size: 1.35rem; }
.top-up-card > p { min-height: 2.2rem; color: var(--text-secondary); font-size: .73rem; }
.top-up-equivalents { display: grid; gap: .35rem; margin: .9rem 0 1rem; padding: 0; list-style: none; }
.top-up-equivalents li { position: relative; padding-left: 1rem; color: var(--text-secondary); font-size: .66rem; }
.top-up-equivalents li::before { content: "\2713"; position: absolute; left: 0; color: var(--text-accent); font-weight: 850; }
.top-up-mix-note { margin: .8rem 0 0; color: var(--text-secondary); font-size: .7rem; text-align: center; }
.popular-label { position: absolute; top: 0; right: 1rem; padding: .35rem .58rem; border-radius: 0 0 8px 8px; color: white; background: var(--green-700); font-size: .58rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.billing-checkout-status { display: block; margin-top: .7rem; color: var(--text-muted); font-size: .63rem; text-align: center; }
.ledger-card { margin-top: 1rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .77rem; }
th { padding: .8rem; color: var(--text-muted); border-bottom: 1px solid var(--border); font-size: .66rem; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
td { padding: 1rem .8rem; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
.align-right { text-align: right; }
.amount-positive { color: var(--status-success-text); font-weight: 800; }
.table-chip-success { color: var(--status-success-text); background: var(--success-soft); }
.table-chip-danger { color: var(--status-danger-text); background: var(--danger-soft); }
.table-chip-warning { color: var(--status-warning-text); background: var(--amber-soft); }
.table-chip-neutral { color: var(--text-secondary); background: var(--surface-soft); }
.table-chip-completed { color: var(--status-success-text); background: var(--success-soft); }
.table-chip-running, .table-chip-queued { color: var(--status-info-text); background: var(--blue-soft); }
.table-chip-refunded, .table-chip-failed { color: var(--status-warning-text); background: var(--amber-soft); }

.settings-layout { max-width: 850px; }
.settings-card { margin-bottom: 1rem; }
.avatar { width: 53px; height: 53px; display: grid; place-items: center; border-radius: 15px; color: white; background: var(--green-900); font-size: .82rem; font-weight: 850; }
.avatar-small { width: 36px; height: 36px; border-radius: 10px; font-size: .66rem; }
.account-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.account-field-wide { grid-column: 1 / -1; }
.account-profile-form input[readonly] { color: var(--text-secondary); background: var(--surface-soft); cursor: not-allowed; }
.account-profile-form > .button, .account-password-form > .button { width: max-content; min-width: 190px; }
.dataset-slot-form { margin-top: .2rem; }
.dataset-slot-form .button { min-height: 42px; font-size: .7rem; }
.account-recovery-link { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .7rem; }
.account-recovery-link a { color: var(--text-accent); font-weight: 800; }
.account-recovery-link a:hover { color: var(--text-accent-hover); }

.table-user { display: flex; align-items: center; gap: .7rem; }
.table-user strong, .table-user small { display: block; }
.table-user strong { font-size: .77rem; }
.table-user small { color: var(--text-muted); font-size: .65rem; }
.icon-button { border: 0; color: var(--text-muted); background: none; }
.admin-notice { margin-top: 1rem; }
.admin-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.admin-action-card { min-width: 0; }
.admin-action-card .card-heading { align-items: flex-start; }
.admin-action-card h2 { font-size: 1.45rem; }
.admin-action-intro { margin: -.2rem 0 1.35rem; color: var(--text-secondary); font-size: .76rem; }
.admin-danger-card { border-color: var(--danger-card-border); }
.eyebrow-danger { color: var(--status-danger-text); }
.money-input { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-input); }
.money-input:focus-within { outline: 3px solid var(--focus-ring); border-color: var(--green-600); }
.money-input > span { padding-left: .85rem; color: var(--text-secondary); font-size: .8rem; font-weight: 800; }
.money-input input { min-width: 0; border: 0; border-radius: 0; }
.money-input input:focus { outline: 0; }
.form-field > small, .form-empty-note { color: var(--text-muted); font-size: .68rem; }
.form-empty-note { margin: 0; text-align: center; }
.admin-table-count { color: var(--text-muted); font-size: .72rem; font-weight: 750; }
.admin-sales-section { margin-bottom: 2rem; }
.admin-sales-section .admin-action-intro { max-width: 960px; }
.admin-sales-grid .metric-card { min-height: 164px; }
.admin-account-summary-heading { margin-top: .25rem; }
.admin-user-table { min-width: 980px; }
.admin-user-table td { vertical-align: middle; }
.table-empty { padding: 2rem; color: var(--text-muted); text-align: center; }
.admin-funnel-card .admin-action-intro { max-width: 1020px; }
.admin-funnel-wrap { border: 1px solid var(--border); border-radius: 13px; }
.admin-funnel-table { min-width: 820px; table-layout: fixed; }
.admin-funnel-table th:first-child { width: 30%; }
.admin-funnel-table thead th { padding: .75rem 1rem; background: var(--surface-soft); }
.admin-funnel-table thead th:not(:first-child) { color: var(--text-secondary); }
.admin-funnel-table tbody th,
.admin-funnel-table tbody td { padding: .72rem 1rem; }
.admin-funnel-table tbody th { color: var(--text-primary); text-align: left; }
.admin-funnel-table tbody th > strong,
.admin-funnel-table tbody th > small,
.admin-funnel-table tbody td > strong,
.admin-funnel-table tbody td > small { display: block; }
.admin-funnel-table tbody th > strong,
.admin-funnel-table tbody td > strong { font-size: .76rem; }
.admin-funnel-table tbody th > small,
.admin-funnel-table tbody td > small { margin-top: .15rem; color: var(--text-muted); font-size: .59rem; line-height: 1.35; }
.admin-funnel-table tbody td > small { white-space: normal; }
.admin-funnel-group th { padding: .52rem 1rem !important; color: var(--text-accent) !important; border-top: 1px solid var(--border); background: var(--green-50); font-size: .59rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.admin-funnel-group:first-child th { border-top: 0; }
.admin-funnel-conversion th,
.admin-funnel-conversion td { color: var(--text-accent); background: color-mix(in srgb, var(--green-50) 72%, var(--surface-card)); }
.admin-funnel-conversion td > strong { font-size: .88rem; }
.admin-funnel-note { margin: .8rem 0 0; color: var(--text-muted); font-size: .63rem; line-height: 1.55; }
.admin-reliability-summary { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 0; }
.admin-reliability-summary > div { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.admin-reliability-summary dt { color: var(--text-muted); font-size: .59rem; font-weight: 820; letter-spacing: .05em; text-transform: uppercase; }
.admin-reliability-summary dd { margin: .25rem 0 0; color: var(--text-primary); font-size: 1.05rem; font-weight: 880; letter-spacing: -.025em; }
.admin-reliability-total { border-color: var(--accent-border) !important; background: var(--green-50) !important; }
.admin-reliability-total dd { color: var(--text-accent); }
.admin-reliability-table-heading { margin-top: 1.35rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.admin-reliability-table-heading h3 { margin: .2rem 0 0; font-size: 1.3rem; }
.activity-failure-table td > strong, .activity-failure-table td > small { display: block; }
.activity-failure-table td > small { margin-top: .18rem; color: var(--text-muted); font-size: .63rem; }
.validation-chip-warning { color: var(--status-warning-text); background: var(--amber-soft); }
.validation-chip-success { color: var(--status-success-text); background: var(--success-soft); }
.operations-card { margin-top: 1rem; }
.operations-alert-grid { display: grid; gap: .7rem; }
.operations-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: 1rem; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); }
.operations-alert-warning { border-color: var(--warning-border); background: var(--amber-soft); }
.operations-alert-critical { border-color: var(--danger-card-border); background: var(--danger-soft); }
.operations-alert-marker { width: 9px; height: 9px; border-radius: 999px; background: var(--status-warning-text); box-shadow: 0 0 0 5px color-mix(in srgb, var(--status-warning-text) 14%, transparent); }
.operations-alert-critical .operations-alert-marker { background: var(--status-danger-text); box-shadow: 0 0 0 5px color-mix(in srgb, var(--status-danger-text) 14%, transparent); }
.operations-alert-level { color: var(--text-muted); font-size: .61rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.operations-alert h3 { margin: .16rem 0 .22rem; font-size: .9rem; }
.operations-alert p { margin: 0; color: var(--text-secondary); font-size: .7rem; }
.operations-clear { display: flex; align-items: center; gap: .85rem; padding: 1rem; border: 1px solid var(--success-border); border-radius: 13px; background: var(--success-soft); }
.operations-clear-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--status-success-text); background: color-mix(in srgb, var(--success) 16%, transparent); font-weight: 900; }
.operations-clear strong { display: block; color: var(--status-success-text); font-size: .8rem; }
.operations-clear p { margin: .14rem 0 0; color: var(--text-secondary); font-size: .68rem; }
.quota-progress { margin: .2rem 0 1.4rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.quota-progress-heading { display: flex; justify-content: space-between; gap: 1rem; color: var(--text-secondary); font-size: .7rem; }
.quota-progress-heading strong { color: var(--text-primary); }
.quota-progress-track { display: block; width: 100%; height: 7px; overflow: hidden; margin: .55rem 0 .4rem; border: 0; border-radius: 999px; background: var(--border); appearance: none; }
.quota-progress-track::-webkit-progress-bar { border-radius: inherit; background: var(--border); }
.quota-progress-track::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--green-500), var(--green-700)); }
.quota-progress-track::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--green-500), var(--green-700)); }
.quota-progress small { color: var(--text-muted); font-size: .64rem; }
.data-plan-status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .2rem 0 1rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.data-plan-status span, .data-plan-status strong { display: block; }
.data-plan-status > div > span { color: var(--text-muted); font-size: .61rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.data-plan-status > div > strong { margin-top: .15rem; font-size: .75rem; }
.admin-row-attention { background: color-mix(in srgb, var(--amber-soft) 56%, transparent); }
.admin-user-filters { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(135px, .7fr)) auto; align-items: end; gap: .7rem; margin-bottom: 1rem; padding: .9rem; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); }
.admin-user-filters .form-field { gap: .3rem; }
.admin-user-filters label { font-size: .65rem; }
.admin-user-filters input, .admin-user-filters select { min-height: 42px; padding: .65rem .72rem; }
.admin-filter-clear { min-height: 42px; }
.table-user .table-chip { display: inline-flex !important; margin-top: .3rem; margin-right: .2rem; font-size: .56rem !important; }
.admin-timeline-panel[hidden], .admin-user-table tr[hidden] { display: none; }
.admin-timeline-panel { margin-top: 1rem; padding: 1.1rem; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface-soft); }
.admin-timeline-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.admin-timeline-heading h3 { margin: .1rem 0; font-size: 1.25rem; }
.admin-timeline-heading p { margin: .2rem 0 0; color: var(--text-muted); font-size: .7rem; }
.admin-timeline-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0; }
.admin-timeline-summary > div { padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card); }
.admin-timeline-summary span, .admin-timeline-summary strong { display: block; }
.admin-timeline-summary span { color: var(--text-muted); font-size: .59rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.admin-timeline-summary strong { margin-top: .2rem; font-size: .75rem; overflow-wrap: anywhere; }
.admin-timeline-status { padding: 1rem; color: var(--text-muted); font-size: .72rem; text-align: center; }
.admin-timeline-status[hidden] { display: none; }
.admin-timeline-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.admin-timeline-item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; padding: .9rem 0; border-top: 1px solid var(--border); }
.admin-timeline-marker { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--text-accent); background: var(--green-100); font-size: .61rem; font-weight: 900; text-transform: uppercase; }
.admin-timeline-marker-analysis { color: var(--status-info-text); background: var(--blue-soft); }
.admin-timeline-marker-admin { color: var(--status-warning-text); background: var(--amber-soft); }
.admin-timeline-copy strong, .admin-timeline-copy small { display: block; }
.admin-timeline-copy strong { font-size: .75rem; }
.admin-timeline-copy small { margin-top: .18rem; color: var(--text-muted); font-size: .63rem; }
.admin-timeline-amount { text-align: right; }
.admin-timeline-amount strong, .admin-timeline-amount small { display: block; }
.admin-timeline-amount strong { font-size: .72rem; }
.admin-timeline-amount small { margin-top: .15rem; color: var(--text-muted); font-size: .6rem; }

.analysis-history-card { margin-top: 1.5rem; }
.analysis-history-table { min-width: 760px; }
.analysis-history-table td > strong, .analysis-history-table td > small { display: block; }
.analysis-history-table td > small { margin-top: .15rem; color: var(--text-muted); font-size: .64rem; }
.analysis-result-heading { align-items: center; }
.status-chip-completed > span { background: #52db9d; }
.status-chip-running > span, .status-chip-queued > span { background: #5ca8df; box-shadow: 0 0 0 4px rgba(92, 168, 223, .14); }
.status-chip-refunded > span, .status-chip-failed > span { background: #d89b49; box-shadow: 0 0 0 4px rgba(216, 155, 73, .14); }
.analysis-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.analysis-chart-card { width: min(1480px, calc(100vw - 2rem)); margin: 0 0 1rem 50%; overflow: hidden; transform: translateX(-50%); }
.analysis-chart-surface { position: relative; width: 100%; min-height: 700px; overflow: visible; border: 1px solid var(--border-strong); border-radius: 13px; background: var(--surface-card); }
.analysis-chart-loading { min-height: 700px; display: grid; place-items: center; color: var(--text-muted); font-size: .76rem; }
.analysis-chart-fallback { padding: 1rem; border: 1px solid var(--warning-border); border-radius: 13px; background: var(--amber-soft); }
.analysis-chart-fallback p { margin: 0 0 .8rem; color: var(--warning-text); font-size: .72rem; }
.analysis-chart-fallback img, .analysis-chart-noscript { width: 100%; padding: .3rem; border: 1px solid var(--border-strong); border-radius: 11px; background: #ffffff; }
.analysis-chart-cursor-readout { position: absolute; z-index: 4; top: 73px; left: 78px; display: flex; align-items: center; gap: .55rem; max-width: calc(100% - 180px); min-height: 28px; padding: .36rem .58rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); background: var(--surface-card-translucent); box-shadow: var(--shadow-sm); pointer-events: none; font-size: .66rem; line-height: 1.2; }
.analysis-chart-cursor-readout[hidden] { display: none; }
.analysis-chart-cursor-readout strong { color: var(--text-primary); font-weight: 800; }
.analysis-chart-cursor-readout span:last-child { color: var(--text-accent); font-weight: 800; }
.analysis-chart-surface .hoverlayer .hovertext, .analysis-chart-surface .hoverlayer .axistext { display: none !important; }
.analysis-chart-surface .modebar { top: 7px; right: 7px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-card-translucent) !important; box-shadow: var(--shadow-sm); }
.analysis-chart-surface .modebar-btn path { fill: var(--text-secondary) !important; }
.analysis-chart-surface .modebar-btn:hover path { fill: var(--text-accent) !important; }
.analysis-chart-surface .modebar-btn.active path { fill: var(--text-accent) !important; }
.analysis-chart-surface .modebar-btn:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 1px; }
.analysis-chart-note { margin: .85rem 0 0; color: var(--text-muted); font-size: .7rem; }
.auth-session-note { margin: 1rem 0 0; color: var(--text-muted); font-size: .68rem; line-height: 1.55; text-align: center; }
.analysis-fit-metrics { margin: 1rem 0; }
.analysis-fit-metrics .metric-card { min-height: 155px; }
.instrument-context-card { margin: 1rem 0; padding: clamp(1.25rem, 3vw, 2rem); overflow: hidden; }
.instrument-context-heading { align-items: flex-start; }
.instrument-context-heading h2 { margin: .18rem 0 .35rem; }
.instrument-context-heading p { max-width: 720px; margin: 0; color: var(--text-secondary); font-size: .72rem; line-height: 1.6; }
.instrument-identity-chips { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.instrument-identity-chips span { padding: .35rem .58rem; border: 1px solid var(--accent-border); border-radius: 999px; color: var(--text-accent); background: var(--brand-50); font-size: .61rem; font-weight: 820; letter-spacing: .04em; }
.instrument-context-lead-grid { display: grid; grid-template-columns: .8fr 1.05fr 1.25fr; gap: .8rem; margin: 1.35rem 0 .8rem; }
.instrument-context-lead { min-width: 0; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; padding: 1.2rem; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg, var(--surface-card), var(--brand-50)); }
.instrument-context-lead > span, .instrument-context-detail small, .instrument-profile-facts dt { color: var(--text-muted); font-size: .61rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.instrument-context-lead > strong { margin: auto 0 .25rem; color: var(--text-primary); font-size: clamp(1.35rem, 2.8vw, 2rem); line-height: 1.05; letter-spacing: -.04em; }
.instrument-context-lead > strong small { color: var(--text-muted); font-size: .68rem; letter-spacing: .02em; }
.instrument-context-lead > small { color: var(--text-secondary); font-size: .67rem; }
.instrument-change-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: 1.35rem; }
.instrument-change-grid > div { min-width: 0; padding: .7rem .55rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card-translucent); }
.instrument-change-grid small, .instrument-change-grid strong { display: block; }
.instrument-change-grid small { margin-bottom: .25rem; color: var(--text-muted); font-size: .58rem; }
.instrument-change-grid strong { color: var(--text-primary); font-size: .84rem; }
.instrument-change-grid .context-positive { color: var(--status-success-text); }
.instrument-change-grid .context-negative { color: var(--status-danger-text); }
.instrument-range-card > strong { margin: 1.15rem 0 .8rem; font-size: 1.25rem; }
.instrument-range-progress { display: block; width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 999px; background: var(--border); appearance: none; }
.instrument-range-progress::-webkit-progress-bar { border-radius: inherit; background: var(--border); }
.instrument-range-progress::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); }
.instrument-range-progress::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); }
.instrument-range-labels { display: flex; justify-content: space-between; gap: .5rem; margin-top: .5rem; color: var(--text-muted); }
.instrument-range-labels small:nth-child(2) { color: var(--text-accent); font-weight: 780; text-align: center; }
.instrument-context-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.instrument-context-detail { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: .85rem; padding: 1.1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.instrument-context-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--accent-border); border-radius: 11px; color: var(--text-accent); background: var(--brand-50); font-size: .69rem; font-weight: 900; }
.instrument-context-detail strong { display: block; margin: .25rem 0; color: var(--text-primary); font-size: .88rem; }
.instrument-context-detail p { margin: .22rem 0 0; color: var(--text-secondary); font-size: .66rem; line-height: 1.55; }
.instrument-context-detail p b { color: var(--text-primary); }
.instrument-uncertainty-detail { border-color: var(--accent-border); background: linear-gradient(135deg, var(--brand-50), var(--surface-soft)); }
.instrument-profile-card { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: clamp(1.5rem, 4vw, 3rem); margin: 1rem 0; padding: clamp(1.4rem, 3vw, 2rem); }
.instrument-profile-copy h2 { margin: .2rem 0 .75rem; }
.instrument-profile-copy > p { max-width: 760px; margin: 0; color: var(--text-secondary); font-size: .72rem; line-height: 1.75; }
.instrument-profile-facts { display: grid; align-content: start; gap: 0; margin: 0; }
.instrument-profile-facts > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: .7rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.instrument-profile-facts > div:first-child { padding-top: 0; }
.instrument-profile-facts > div:last-child { padding-bottom: 0; border-bottom: 0; }
.instrument-profile-facts dt, .instrument-profile-facts dd { margin: 0; }
.instrument-profile-facts dd { color: var(--text-primary); font-size: .7rem; font-weight: 720; overflow-wrap: anywhere; }
.instrument-profile-facts dd small { display: block; margin-top: .18rem; color: var(--text-muted); font-size: .61rem; font-weight: 500; }
.instrument-profile-facts a { color: var(--text-accent); }
[data-forecast-calendar][hidden] { display: none !important; }
.analysis-result-table { min-width: 900px; }
.analysis-lower-bound { color: var(--status-info-text); font-weight: 780; }
.analysis-upper-bound { color: var(--status-warning-text); font-weight: 780; }
.analysis-state-card { display: grid; justify-items: center; max-width: 720px; margin: 1rem auto; padding: 3rem; text-align: center; }
.analysis-state-card h2 { margin: .8rem 0; }
.analysis-state-card p { max-width: 560px; color: var(--text-secondary); }

.error-section { min-height: 60vh; display: flex; align-items: center; }
.error-code { color: var(--text-accent); font-size: 5rem; font-weight: 900; letter-spacing: -.08em; }
.error-section h1 { margin: 0; font-size: 2.5rem; }
.error-section p { margin: .7rem 0 1.4rem; color: var(--text-secondary); }

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    box-shadow: 0 0 0 1000px var(--surface-input) inset;
    caret-color: var(--text-primary);
}

html[data-theme="dark"] .button:disabled,
html[data-theme="dark"] fieldset:disabled {
    opacity: .64;
}

@media (max-width: 980px) {
    .hero-grid, .auth-layout, .page-hero-grid, .pricing-grid { grid-template-columns: 1fr; }
    .hero-grid { gap: 4rem; }
    .hero-copy { text-align: center; }
    .hero-copy h1, .hero-lead, .micro-disclosure { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { width: min(680px, 100%); margin-inline: auto; }
    .trial-promotion-panel { grid-template-columns: minmax(0, 1.05fr) minmax(300px, .8fr); gap: 2rem; min-height: 350px; padding: 2rem; }
    .trial-promotion-copy h2 { font-size: clamp(2.25rem, 4.8vw, 3.15rem); }
    .trial-promotion-actions { align-items: flex-start; flex-direction: column; }
    .auth-layout { gap: 3rem; }
    .auth-copy { text-align: center; }
    .auth-copy > p, .auth-note { margin-left: auto; margin-right: auto; }
    .auth-section-signup .auth-copy { padding-top: 0; }
    .auth-benefits { margin-left: auto; margin-right: auto; }
    .auth-layout .auth-card { width: min(560px, 100%); margin-inline: auto; }
    .pricing-grid { gap: 3rem; }
    .price-card { width: min(480px, 100%); }
    .page-hero-grid { gap: 1.5rem; }
    .dataset-detail-grid { grid-template-columns: 1fr; }
    .dataset-row { grid-template-columns: auto minmax(145px, .8fr) minmax(220px, 1fr) auto; }
    .dataset-folder-row { grid-template-columns: minmax(0, 1fr) auto; }
    .dataset-row-main { grid-template-columns: auto minmax(145px, .8fr) minmax(220px, 1fr) auto; }
    .dataset-row-status { display: none; }
    .metrics-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analysis-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .instrument-context-lead-grid { grid-template-columns: 1fr 1fr; }
    .instrument-range-card { grid-column: 1 / -1; }
    .instrument-profile-card { grid-template-columns: 1fr; }
    .admin-reliability-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-user-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-user-search { grid-column: 1 / -1; }
    .admin-filter-clear { align-self: end; }
    .methodology-intro, .faq-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .methodology-intro > p { max-width: 760px; }
    .forecast-walkthrough-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .forecast-walkthrough-copy { max-width: 760px; }
    .legal-layout { grid-template-columns: 1fr; gap: 1rem; }
    .legal-toc { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .legal-toc strong { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
    .menu-toggle { display: block; }
    .primary-navigation { position: absolute; left: 1rem; right: 1rem; top: calc(100% + .5rem); display: none; align-items: stretch; flex-direction: column; gap: 0; padding: .7rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow-lg); }
    .primary-navigation.is-open { display: flex; }
    .primary-navigation > a:not(.button) { padding: .8rem; border-radius: 8px; }
    .primary-navigation > a:not(.button)[aria-current="page"]::after { display: none; }
    .primary-navigation > a:not(.button)[aria-current="page"] { background: var(--brand-50); }
    .primary-navigation .button { margin-top: .35rem; }
    .nav-logout { padding: .4rem .7rem; }
    .nav-logout .button { width: 100%; }
}

@media (max-width: 820px) {
    .trial-promotion-panel { grid-template-columns: 1fr; min-height: 0; }
    .trial-promotion-actions { align-items: center; flex-direction: row; }
    .trial-promotion-summary { min-height: 0; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .metrics-grid .metric-card:last-child { grid-column: 1 / -1; }
    .metrics-grid-two .metric-card:last-child { grid-column: auto; }
    .metrics-grid-four .metric-card:last-child { grid-column: auto; }
    .admin-action-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .step-card { min-height: auto; }
    .step-number { margin-bottom: 1.5rem; }
    .methodology-grid { grid-template-columns: 1fr; }
    .methodology-card { min-height: auto; }
    .methodology-card > span { margin-bottom: 1.5rem; }
    .methodology-limit { grid-template-columns: 1fr; gap: .35rem; }
    .modes-grid, .format-grid, .contact-grid, .billing-hero-grid, .upload-preview-card { grid-template-columns: 1fr; gap: 2rem; }
    .pricing-cards { grid-template-columns: 1fr; }
    .pricing-cards .price-card { margin-inline: auto; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-disclosure { grid-column: 1 / -1; }
    .dataset-upload-shell { grid-template-columns: 1fr; }
    .dataset-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .dataset-folder-row { grid-template-columns: minmax(0, 1fr) auto; }
    .dataset-row-main { grid-template-columns: auto minmax(0, 1fr) auto; }
    .dataset-row-range { grid-column: 2 / 3; text-align: left; }
    .dataset-row-range strong { font-size: .7rem; }
    .dataset-row-arrow { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
}

@media (max-width: 600px) {
    .site-header .brand-assets { gap: .5rem; }
    .site-header .brand-logo { width: 28px; }
    .site-header .brand-wordmark-image { width: 132px; }
    .content-width, .header-inner, .account-strip-inner, .footer-inner { width: min(100% - 2rem, var(--content)); }
    .section-pad { padding: 4.5rem 0; }
    .section-pad-small { padding: 2.3rem 0 4rem; }
    .hero { min-height: auto; }
    .hero-copy h1 { font-size: 3.15rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .trial-promotion-panel { gap: 1.35rem; padding: 1.25rem; border-radius: 22px; }
    .trial-promotion-copy h2 { font-size: clamp(1.9rem, 9vw, 2.55rem); }
    .trial-promotion-lead { margin: .8rem 0 1.1rem; font-size: .85rem; }
    .trial-promotion-actions { align-items: stretch; flex-direction: column; gap: .85rem; }
    .trial-promotion-trust { display: grid; grid-template-columns: 1fr 1fr; }
    .trial-promotion-cta { width: 100%; }
    .trial-promotion-summary { padding: 1rem; border-radius: 18px; }
    .trial-promotion-duration strong { font-size: 3.25rem; }
    .trial-promotion-features { margin-bottom: .8rem; }
    .trial-promotion-features li { padding: .8rem .1rem; }
    .proof-heading { align-items: flex-start; flex-direction: column; gap: .25rem; }
    .chart-card-large { padding: 1rem; transform: none; }
    .result-carousel-slide { padding: .8rem; }
    .result-carousel-controls {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: .75rem .8rem;
    }
    .result-carousel-toggle {
        width: 100%;
        grid-column: 1 / -1;
    }
    .forecast-video-caption { align-items: flex-start; }
    .floating-card { display: none; }
    .account-strip-inner { justify-content: space-between; }
    .plan-pill { display: none; }
    .session-pill { display: grid; gap: 0; }
    .session-pill strong { min-width: 0; text-align: left; }
    .balance-pill { padding-left: .7rem; }
    .dashboard-heading { align-items: stretch; flex-direction: column; }
    .dashboard-heading > .button { width: 100%; }
    .metrics-grid, .metrics-grid-two { grid-template-columns: 1fr; }
    .metrics-grid-four { grid-template-columns: 1fr; }
    .metrics-grid .metric-card:last-child, .metrics-grid-two .metric-card:last-child { grid-column: auto; }
    .metric-card { min-height: 155px; }
    .form-grid-two, .choice-grid, .account-profile-grid { grid-template-columns: 1fr; }
    .top-up-grid, .folder-selection-grid, .billing-plan-facts { grid-template-columns: 1fr; }
    .form-section { grid-template-columns: 36px 1fr; padding: 1.15rem; }
    .account-field-wide { grid-column: auto; }
    .account-profile-form > .button, .account-password-form > .button { width: 100%; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-disclosure { grid-column: auto; }
    .footer-legal-line { grid-column: auto; }
    .investment-risk-card { grid-template-columns: 1fr; padding: 1.6rem; }
    .legal-hero-inner { grid-template-columns: 1fr; align-items: start; gap: 1.4rem; }
    .legal-meta { min-width: 0; width: 100%; }
    .legal-toc { grid-template-columns: 1fr 1fr; }
    .legal-content { padding: 1.4rem; }
    .flash-region, .app-shell .flash-region { top: 80px; }
    .theme-toggle { right: max(.85rem, env(safe-area-inset-right)); bottom: max(.85rem, env(safe-area-inset-bottom)); width: 48px; height: 48px; }
    .theme-toggle::after { display: none; }
    .dataset-upload-grid, .dataset-summary-grid, .dataset-meta-list { grid-template-columns: 1fr; }
    .dataset-upload-wide, .dataset-meta-wide { grid-column: auto; }
    .dataset-upload-actions { align-items: stretch; flex-direction: column; }
    .dataset-upload-actions .button { width: 100%; }
    .dataset-detail-heading { align-items: stretch; }
    .dataset-title-lockup { align-items: flex-start; }
    .dataset-detail-actions { align-items: stretch; flex-direction: column; }
    .dataset-detail-actions .validation-chip { align-self: flex-start; }
    .dataset-detail-actions .button { width: 100%; }
    .dataset-row { padding: .9rem; }
    .dataset-folder-row { grid-template-columns: 1fr; padding: 0; }
    .dataset-row-main { padding: .9rem; }
    .dataset-row-action { justify-content: stretch; padding: .7rem .9rem; border-top: 1px solid var(--border); border-left: 0; }
    .dataset-row-action .button { width: 100%; }
    .capacity-notice, .transition-banner { grid-template-columns: 1fr; }
    .capacity-notice-actions { align-items: stretch; flex-direction: column; }
    .capacity-notice-actions .button, .folder-selection-card > .button { width: 100%; }
    .dataset-version-table { min-width: 780px; }
    .analysis-summary-grid { grid-template-columns: 1fr; }
    .instrument-context-heading { align-items: flex-start; flex-direction: column; }
    .instrument-identity-chips { justify-content: flex-start; }
    .instrument-context-lead-grid, .instrument-context-detail-grid { grid-template-columns: 1fr; }
    .instrument-range-card { grid-column: auto; }
    .instrument-context-lead { min-height: 150px; }
    .instrument-change-grid { gap: .35rem; }
    .instrument-change-grid > div { padding-inline: .4rem; }
    .instrument-profile-facts > div { grid-template-columns: 1fr; gap: .2rem; }
    .analysis-running-overlay { align-items: start; padding: 1rem; }
    .analysis-running-card { grid-template-columns: 1fr; border-radius: 22px; }
    .analysis-running-visual { min-height: 245px; }
    .analysis-running-orbit { top: 28px; width: 112px; height: 112px; }
    .analysis-running-orbit-core { inset: 31px; }
    .analysis-running-chart { bottom: 12px; }
    .analysis-running-copy { padding: 2rem 1.5rem; }
    .analysis-chart-surface, .analysis-chart-loading { min-height: 720px; }
    .analysis-chart-cursor-readout { top: 73px; left: 64px; max-width: calc(100% - 84px); flex-wrap: wrap; gap: .25rem .48rem; }
    .analysis-state-card { padding: 2rem 1.25rem; }
    .auth-card, .auth-card-wide { padding: 1.45rem; }
    .auth-form-grid, .auth-verification-steps { grid-template-columns: 1fr; }
    .auth-field-wide { grid-column: auto; }
    .auth-verification-steps > div { align-items: start; }
    .auth-resend-panel .button { width: 100%; }
    .email-preview-page .dashboard-heading .status-chip { align-self: flex-start; }
    .email-preview-toolbar { align-items: flex-start; }
    .email-preview-meta > div { grid-template-columns: 1fr; gap: .1rem; }
    .operations-alert { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
    .operations-alert .button { grid-column: 2; width: 100%; }
    .admin-user-filters { grid-template-columns: 1fr; }
    .admin-user-search { grid-column: auto; }
    .admin-timeline-heading { flex-direction: column; }
    .admin-timeline-heading .button { width: 100%; }
    .admin-timeline-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-timeline-item { grid-template-columns: auto minmax(0, 1fr); }
    .admin-timeline-amount { grid-column: 2; text-align: left; }
    .data-plan-status { align-items: flex-start; flex-direction: column; }
    .admin-funnel-wrap { margin-inline: -.25rem; }
    .admin-funnel-table { min-width: 720px; }
    .admin-funnel-table th:first-child { position: sticky; z-index: 1; left: 0; width: 32%; background: var(--surface-card); box-shadow: 1px 0 0 var(--border); }
    .admin-funnel-table thead th:first-child { z-index: 2; background: var(--surface-soft); }
    .admin-funnel-table .admin-funnel-group th { position: static; box-shadow: none; }
    .admin-funnel-table .admin-funnel-conversion th { background: color-mix(in srgb, var(--green-50) 72%, var(--surface-card)); }
    .admin-reliability-summary { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
    .hero-copy h1 { font-size: 2.55rem; }
    .hero-lead { font-size: 1rem; }
    .result-slide-heading { align-items: flex-start; }
    .result-slide-heading .demo-badge { display: none !important; }
    .result-carousel-dots { gap: .2rem; }
    .result-carousel-dots button { padding-inline: .38rem; font-size: .59rem; }
    .forecast-video-caption { flex-direction: column; }
    .chart-value { align-items: flex-start; flex-direction: column; gap: .1rem; }
    .chart-value strong { font-size: 1.35rem; }
    .chart-legend { gap: .55rem; }
    .account-strip-inner { font-size: .68rem; }
    .legal-toc { grid-template-columns: 1fr; }
    .legal-toc strong { grid-column: auto; }
}

.newsletter-page {
    min-height: 70vh;
    background:
        radial-gradient(circle at 88% 4%, rgba(21, 150, 255, .12), transparent 25rem),
        linear-gradient(180deg, var(--hero-start), var(--surface-page) 28rem);
}

.newsletter-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3rem;
    align-items: center;
    padding: 2.5rem 0 3rem;
}

.newsletter-hero h1 {
    max-width: 900px;
    margin: .45rem 0 1rem;
    font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.newsletter-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.08rem;
}

.newsletter-hero-mark {
    display: grid;
    place-items: center;
    width: 148px;
    aspect-ratio: 1;
    border: 1px solid var(--accent-border);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-900), var(--brand-600));
    box-shadow: var(--shadow-lg);
}

.newsletter-hero-mark span {
    font-size: 4.1rem;
    font-weight: 850;
    line-height: .9;
}

.newsletter-hero-mark small {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.newsletter-edition-meta {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-card-translucent);
    box-shadow: var(--shadow-sm);
}

.newsletter-edition-meta strong {
    display: block;
    margin-top: .15rem;
    font-size: 1.22rem;
}

.newsletter-edition-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .7rem 1rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 700;
}

.newsletter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
}

.newsletter-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}

.newsletter-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.newsletter-card-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid var(--border);
}

.newsletter-symbol {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.newsletter-symbol > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-700), var(--brand-500));
    font-size: .9rem;
    font-weight: 850;
}

.newsletter-symbol h2 {
    margin: 0;
    font-size: 1.08rem;
    letter-spacing: -.015em;
}

.newsletter-symbol h2 small {
    color: var(--text-muted);
    font-size: .72rem;
}

.newsletter-symbol p {
    margin: .08rem 0 0;
    color: var(--text-secondary);
    font-size: .78rem;
}

.newsletter-chart-link {
    display: block;
    padding: .7rem;
    background: #f6f9fd;
}

.newsletter-chart-image {
    width: 100%;
    min-height: 260px;
    aspect-ratio: 12 / 6.4;
    object-fit: contain;
    border: 1px solid #dfe7f0;
    border-radius: 10px;
    background: #fff;
}

.newsletter-card:last-child:nth-child(odd) .newsletter-chart-image {
    max-height: 610px;
}

.newsletter-card-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: .65rem 1rem;
    align-items: center;
    padding: .95rem 1.2rem 1.05rem;
    color: var(--text-secondary);
    font-size: .75rem;
}

.newsletter-card-footer span {
    display: block;
}

.newsletter-card-footer strong {
    display: block;
    color: var(--text-primary);
    font-size: .82rem;
}

.newsletter-card-footer a {
    color: var(--text-accent);
    font-weight: 800;
    white-space: nowrap;
}

.newsletter-empty {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    max-width: 850px;
    margin: 1rem auto 0;
    padding: 2.4rem;
}

.newsletter-empty h2 {
    margin: .3rem 0 .6rem;
}

.newsletter-empty p {
    margin: 0;
    color: var(--text-secondary);
}

.newsletter-empty-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-900), var(--brand-500));
    font-size: 2.3rem;
    font-weight: 850;
}

.newsletter-disclosure {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.2rem;
    align-items: baseline;
    padding: 1.25rem 1.35rem;
    margin-top: 1.5rem;
    border: 1px solid var(--warning-border);
    border-radius: var(--radius-sm);
    color: var(--warning-text);
    background: var(--amber-soft);
}

.newsletter-disclosure p {
    margin: 0;
    font-size: .84rem;
}

.newsletter-admin-card {
    margin: 1rem 0 1.5rem;
}

.newsletter-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
    gap: 2rem;
    align-items: end;
}

.newsletter-admin-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin: 1rem 0 0;
}

.newsletter-admin-facts div {
    padding: .8rem .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.newsletter-admin-facts dt {
    color: var(--text-muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.newsletter-admin-facts dd {
    margin: .25rem 0 0;
    font-size: .84rem;
    font-weight: 800;
}

.newsletter-admin-form {
    display: grid;
    gap: .7rem;
}

.newsletter-admin-form small {
    color: var(--text-muted);
    line-height: 1.45;
}

.newsletter-admin-warning {
    margin: .8rem 0 0;
    color: var(--status-warning-text);
    font-size: .82rem;
    font-weight: 700;
}

@media (max-width: 820px) {
    .newsletter-hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .newsletter-hero-mark {
        display: none;
    }

    .newsletter-edition-meta,
    .newsletter-disclosure {
        display: grid;
    }

    .newsletter-edition-facts {
        justify-content: flex-start;
    }

    .newsletter-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .newsletter-admin-layout {
        grid-template-columns: 1fr;
    }

    .newsletter-admin-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .confirmation-dialog {
        width: min(100% - 1rem, 540px);
        max-height: calc(100dvh - 1rem);
        border-radius: 19px;
    }

    .confirmation-dialog-card { padding: 1.35rem; }
    .confirmation-dialog-impact,
    .confirmation-dialog-actions { grid-template-columns: 1fr; }
    .confirmation-dialog-impact > div + div {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .newsletter-card-footer {
        grid-template-columns: 1fr 1fr;
    }

    .newsletter-card-footer a {
        grid-column: 1 / -1;
    }

    .newsletter-empty {
        display: grid;
        padding: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
    .analysis-running-line { stroke-dashoffset: 0; }
    .analysis-running-progress span { left: 0; width: 100%; opacity: .7; }
}

@media (forced-colors: active) {
    .theme-toggle {
        border: 2px solid ButtonText;
        color: ButtonText;
        background: ButtonFace;
        box-shadow: none;
    }
}

/* Master-only Community Feed Generator */
.community-feed-page {
    min-height: 70vh;
    padding-block: 2.3rem 5rem;
    background:
        radial-gradient(circle at 90% 2%, color-mix(in srgb, var(--brand-500) 13%, transparent), transparent 28rem),
        linear-gradient(180deg, var(--hero-start), var(--surface-page) 30rem);
}

.community-feed-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.community-feed-hero h1 {
    max-width: 900px;
    margin: .35rem 0 .75rem;
    font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.community-feed-hero p {
    max-width: 850px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.04rem;
}

.community-generator-card,
.community-feed-page .media-custom-generator-card,
.community-progress-card,
.community-result-card {
    padding: 1.55rem;
}

.community-feed-page .media-custom-generator-card {
    margin-bottom: 1.25rem;
}

.community-feed-page .media-custom-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.2rem;
}

.community-contract-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin: 1.2rem 0 1.45rem;
}

.community-contract-grid > div,
.community-result-meta > span {
    padding: .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.community-contract-grid span,
.community-contract-grid strong,
.community-contract-grid small {
    display: block;
}

.community-contract-grid span {
    color: var(--text-muted);
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.community-contract-grid strong { margin-top: .25rem; }
.community-contract-grid small { margin-top: .2rem; color: var(--text-secondary); font-size: .73rem; }

.community-generator-form { display: grid; gap: 1rem; }
.community-generator-form fieldset { display: grid; gap: .65rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.community-generator-form legend { padding: 0 .35rem; font-weight: 850; }
.community-generator-form .field-help { margin: 0 0 .2rem; color: var(--text-secondary); font-size: .82rem; }

.community-disclosure-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .7rem;
    align-items: start;
    padding: .85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.community-disclosure-choice:has(input:checked) {
    border-color: var(--accent-border);
    background: color-mix(in srgb, var(--green-50) 70%, var(--surface-card));
}

.community-disclosure-choice input { margin-top: .25rem; }
.community-disclosure-choice strong,
.community-disclosure-choice small { display: block; }
.community-disclosure-choice small { margin-top: .15rem; color: var(--text-secondary); }
.community-custom-disclosure { margin-top: .25rem; }

.community-policy-note {
    padding: 1rem 1.1rem;
    border-left: 4px solid var(--brand-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--surface-soft);
}

.community-policy-note p { margin: .3rem 0 0; color: var(--text-secondary); font-size: .82rem; }
.community-review-check { margin: 0; }
.community-progress-card { margin-top: 1.3rem; }

.community-results {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.community-result-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    margin-bottom: 1rem;
}

.community-result-heading h2 { margin: .15rem 0 0; }
.community-result-heading h2 small { color: var(--text-muted); font-size: .72rem; }

.community-chart-preview {
    display: block;
    max-width: 620px;
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f7f9fc;
    box-shadow: var(--shadow-sm);
}

.community-chart-preview img { display: block; width: 100%; height: auto; }

.community-result-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: 1rem 0;
}

.community-result-meta span { color: var(--text-secondary); font-size: .73rem; }
.community-result-meta strong { display: block; margin-top: .1rem; color: var(--text-primary); font-size: .82rem; }
.community-result-meta .community-duplicate-warning { color: var(--status-warning-text); background: var(--amber-soft); }

.community-copy-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.community-copy-columns .shorts-copy-block { margin: 0; }
.community-copy-columns label { display: flex; justify-content: space-between; gap: .75rem; }
.community-copy-columns label span { color: var(--text-muted); font-size: .68rem; font-weight: 700; }
.community-copy-columns textarea { min-height: 245px; resize: vertical; }
.community-feed-page .shorts-history-card { margin-top: 1.3rem; }

@media (max-width: 900px) {
    .community-contract-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .community-copy-columns { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
    .community-feed-hero { grid-template-columns: 1fr; }
    .community-feed-hero > .button { width: 100%; }
    .community-contract-grid,
    .community-result-meta { grid-template-columns: 1fr; }
    .community-generator-card,
    .community-feed-page .media-custom-generator-card,
    .community-progress-card,
    .community-result-card { padding: 1rem; }
    .community-result-heading { grid-template-columns: auto minmax(0, 1fr); }
    .community-result-heading > .validation-chip { grid-column: 2; justify-self: start; }
}

@media (max-width: 620px) {
    .media-custom-options { grid-template-columns: 1fr; }
    .media-custom-generator-card .card-heading { align-items: start; }
}

/* Mobile customer experience
   Keep these overrides together so phone behavior remains auditable even as
   individual product surfaces evolve. */
.mobile-bottom-navigation,
.navigation-backdrop {
    display: none;
}

body.mobile-navigation-is-open {
    overflow: hidden;
    overscroll-behavior: none;
}

@media (max-width: 1080px) {
    .site-header {
        z-index: 340;
    }

    .header-inner {
        position: relative;
    }

    .menu-toggle {
        position: relative;
        z-index: 363;
        width: 48px;
        min-width: 48px;
        height: 48px;
        display: grid;
        align-content: center;
        justify-content: center;
        padding: 0;
        border: 1px solid transparent;
        border-radius: 12px;
        cursor: pointer;
        transition:
            border-color .16s ease,
            background .16s ease;
    }

    .menu-toggle:hover,
    .menu-toggle[aria-expanded="true"] {
        border-color: var(--border);
        background: var(--surface-soft);
    }

    .menu-toggle > span:not(.sr-only) {
        width: 24px;
        height: 2px;
        margin: 3px 0;
        border-radius: 999px;
        transition:
            opacity .18s ease,
            transform .22s ease;
        transform-origin: center;
    }

    .menu-toggle[aria-expanded="true"] > span:nth-last-child(3) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] > span:nth-last-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] > span:last-child {
        transform: translateY(-8px) rotate(-45deg);
    }

    .navigation-backdrop {
        position: fixed;
        z-index: 341;
        inset: 0;
        display: block;
        visibility: hidden;
        background: rgba(0, 19, 43, .52);
        opacity: 0;
        pointer-events: none;
        transition:
            visibility .2s ease,
            opacity .2s ease;
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }

    .navigation-backdrop.is-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .primary-navigation {
        position: fixed;
        z-index: 350;
        top: calc(78px + env(safe-area-inset-top));
        right: max(1rem, env(safe-area-inset-right));
        left: auto;
        width: min(390px, calc(100vw - 2rem));
        max-height: calc(100dvh - 94px - env(safe-area-inset-top));
        display: flex;
        visibility: hidden;
        align-items: stretch;
        flex-direction: column;
        gap: .25rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: .75rem;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: var(--surface-raised);
        box-shadow: 0 30px 90px rgba(0, 27, 61, .28);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px) scale(.985);
        transform-origin: top right;
        transition:
            visibility .2s ease,
            opacity .2s ease,
            transform .2s ease;
        scrollbar-gutter: stable;
    }

    .primary-navigation.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .primary-navigation > a:not(.button),
    .primary-navigation > .button {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: .8rem .9rem;
        border-radius: 11px;
    }

    .primary-navigation > a:not(.button)[aria-current="page"] {
        color: var(--text-accent);
        background: var(--brand-50);
    }

    .primary-navigation > .button {
        justify-content: center;
        margin-top: .35rem;
    }

    .nav-logout {
        padding: .25rem 0 0;
    }

    .nav-logout .button {
        min-height: 48px;
    }
}

@media (max-width: 700px) {
    html {
        max-width: 100%;
        overflow-x: clip;
        scroll-padding-top: calc(5rem + env(safe-area-inset-top));
    }

    body {
        min-width: 0;
        max-width: 100%;
        overflow-x: clip;
    }

    body > *,
    main,
    main > *,
    section,
    .content-width,
    .hero-grid,
    .hero-grid > *,
    .auth-layout,
    .auth-layout > *,
    .page-hero-grid,
    .page-hero-grid > *,
    .dashboard-heading,
    .card-heading,
    .surface-card {
        min-width: 0;
        max-width: 100%;
    }

    h1,
    h2,
    h3,
    .hero-copy h1,
    .dashboard-heading h1,
    .page-hero h1 {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .site-header {
        padding-top: env(safe-area-inset-top);
    }

    .header-inner {
        width: calc(100% - 1rem);
        min-height: 64px;
        gap: .35rem;
    }

    .site-header .brand-assets {
        gap: .4rem;
    }

    .site-header .brand-logo {
        width: 27px;
    }

    .site-header .brand-wordmark-image {
        width: 122px;
    }

    .theme-toggle {
        z-index: 365;
        top: calc(.6rem + env(safe-area-inset-top));
        right: 4.05rem;
        bottom: auto;
        width: 44px;
        height: 44px;
        box-shadow: var(--shadow-sm);
    }

    .theme-toggle::after {
        display: none;
    }

    .primary-navigation {
        top: calc(70px + env(safe-area-inset-top));
        right: .5rem;
        left: .5rem;
        width: auto;
        max-height: calc(100dvh - 78px - env(safe-area-inset-top));
        padding: .65rem;
        border-radius: 16px;
        transform-origin: top center;
    }

    .content-width,
    .header-inner,
    .account-strip-inner,
    .footer-inner {
        width: calc(100% - 1.25rem);
    }

    .section-pad {
        padding: 3.25rem 0;
    }

    .section-pad-small {
        padding: 1.75rem 0 3rem;
    }

    .account-strip-inner {
        min-height: 46px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        justify-content: stretch;
        gap: .65rem;
        font-size: .7rem;
    }

    .plan-pill {
        display: none;
    }

    .session-pill,
    .balance-pill {
        min-width: 0;
        white-space: nowrap;
    }

    .session-pill {
        gap: .35rem;
        overflow: hidden;
        font-size: 0;
    }

    .session-pill::before {
        content: "Session";
        color: rgba(255, 255, 255, .7);
        font-size: .67rem;
    }

    .session-pill strong {
        min-width: 0;
        overflow: hidden;
        font-size: .72rem;
        text-align: left;
        text-overflow: ellipsis;
    }

    .balance-pill {
        gap: .35rem;
        padding-left: .65rem;
        font-size: 0;
    }

    .balance-pill::before {
        content: "Credit";
        color: rgba(255, 255, 255, .7);
        font-size: .67rem;
    }

    .balance-pill strong {
        font-size: .72rem;
    }

    .mobile-bottom-navigation {
        position: fixed;
        z-index: 300;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: .1rem;
        min-height: calc(68px + env(safe-area-inset-bottom));
        padding:
            .38rem max(.25rem, env(safe-area-inset-right))
            max(.38rem, env(safe-area-inset-bottom))
            max(.25rem, env(safe-area-inset-left));
        border-top: 1px solid var(--border);
        background: color-mix(in srgb, var(--surface-raised) 95%, transparent);
        box-shadow: 0 -14px 36px rgba(0, 30, 68, .13);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-navigation a {
        min-width: 0;
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: .2rem;
        padding: .25rem .1rem;
        border-radius: 12px;
        color: var(--text-muted);
        font-size: .63rem;
        font-weight: 760;
        line-height: 1;
        text-align: center;
        transition:
            color .16s ease,
            background .16s ease,
            transform .16s ease;
    }

    .mobile-bottom-navigation svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-navigation a[aria-current="page"] {
        color: var(--text-accent);
        background: var(--brand-50);
    }

    .mobile-bottom-navigation .mobile-bottom-navigation-primary {
        color: #ffffff;
        background: var(--brand-600);
        box-shadow: 0 8px 18px rgba(0, 101, 253, .25);
    }

    .mobile-bottom-navigation .mobile-bottom-navigation-primary[aria-current="page"] {
        color: #ffffff;
        background: var(--brand-700);
    }

    body.app-shell {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .public-shell .flash-region {
        top: calc(72px + env(safe-area-inset-top));
    }

    .app-shell .flash-region {
        top: calc(118px + env(safe-area-inset-top));
    }

    .app-shell[data-page="dashboard"] .flash-region {
        top: calc(72px + env(safe-area-inset-top));
    }

    .flash-region {
        width: calc(100% - 1rem);
    }

    .flash {
        align-items: flex-start;
        padding: .8rem .75rem .8rem .9rem;
        font-size: .8rem;
    }

    .flash-close {
        width: 44px;
        min-width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        margin: -.45rem -.35rem -.45rem 0;
        padding: 0;
    }

    .hero {
        min-height: auto;
        align-items: flex-start;
        padding-top: 2.4rem;
    }

    .hero-grid {
        gap: 2.5rem;
    }

    .hero-copy {
        text-align: left;
    }

    .hero-copy h1 {
        margin-right: 0;
        margin-left: 0;
        font-size: clamp(2.35rem, 12vw, 3.15rem);
        line-height: 1.02;
    }

    .hero-lead,
    .micro-disclosure {
        margin-right: 0;
        margin-left: 0;
    }

    .hero-lead {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }

    .hero-actions {
        align-items: stretch;
        justify-content: flex-start;
        gap: .65rem;
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-actions .text-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
    }

    .proof-heading {
        align-items: flex-start;
    }

    .result-carousel-arrow,
    .result-carousel-dots button,
    .result-carousel-toggle {
        min-height: 44px;
    }

    .result-carousel-arrow {
        width: 44px;
        height: 44px;
    }

    .result-showcase-open {
        right: .45rem;
        bottom: .45rem;
        min-height: 44px;
        padding: .6rem .72rem;
        font-size: .68rem;
    }

    .result-carousel-dots {
        justify-content: flex-start;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .result-carousel-dots::-webkit-scrollbar {
        display: none;
    }

    .result-carousel-dots button {
        flex: 0 0 auto;
        min-width: 44px;
    }

    .auth-section,
    .auth-verification-section {
        min-height: auto;
        align-items: flex-start;
    }

    .auth-layout,
    .auth-layout-wide {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
    }

    .auth-layout .auth-card {
        order: 1;
        width: 100%;
        margin: 0;
    }

    .auth-copy {
        order: 2;
        padding: .65rem .25rem 0;
        text-align: left;
    }

    .auth-section-signup .auth-copy {
        padding-top: .65rem;
    }

    .auth-copy h1,
    .auth-section-compact .auth-copy h1 {
        margin-bottom: .6rem;
        font-size: clamp(1.9rem, 9vw, 2.5rem);
    }

    .auth-copy > p {
        margin-bottom: 0;
        font-size: .9rem;
    }

    .auth-note,
    .auth-benefits {
        margin-top: 1rem;
    }

    .auth-card,
    .auth-card-wide {
        padding: 1.2rem;
        border-radius: 18px;
    }

    .auth-card-head {
        margin-bottom: 1.25rem;
    }

    .auth-card-head h2 {
        font-size: 1.45rem;
    }

    .password-toggle {
        right: .2rem;
        min-width: 58px;
        min-height: 44px;
        padding: .55rem;
    }

    .password-field input {
        padding-right: 4.25rem;
    }

    .auth-inline-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        margin: -.5rem 0;
        font-size: .75rem;
    }

    .auth-form-help,
    .auth-terms,
    .auth-session-note,
    .helper-text,
    .form-field > small {
        font-size: .74rem;
        line-height: 1.55;
    }

    .page-hero h1,
    .dashboard-heading h1 {
        font-size: clamp(2rem, 10vw, 2.65rem);
    }

    .dashboard-page {
        min-height: calc(100dvh - 250px);
    }

    .dashboard-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.35rem;
    }

    .dashboard-heading p,
    .page-hero p {
        font-size: .9rem;
    }

    .dashboard-heading > .button,
    .dashboard-heading > a.button {
        width: 100%;
    }

    .trial-overview,
    .trial-transition-notice {
        padding: 1rem;
        border-radius: 14px;
    }

    .trial-overview-heading {
        align-items: center;
    }

    .trial-overview-inclusions {
        margin-top: .6rem;
        font-size: .8rem;
    }

    .trial-overview-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
        margin-top: .55rem;
    }

    .trial-overview-link {
        margin: 0 0 -.55rem;
    }

    .trial-transition-notice {
        grid-template-columns: 1fr;
        gap: .25rem;
    }

    .trial-transition-notice > .text-link {
        margin-bottom: -.45rem;
    }

    .trial-account-summary {
        grid-template-columns: 1fr;
    }

    .trial-account-summary .trial-account-card {
        min-height: 108px;
    }

    .surface-card:not(.analysis-form-card) {
        padding: 1.05rem;
        border-radius: 16px;
    }

    .card-heading {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-bottom: 1rem;
    }

    .card-heading h2 {
        font-size: 1.25rem;
    }

    .card-heading > .validation-chip,
    .dashboard-heading > .status-chip {
        align-self: flex-start;
    }

    .metric-card {
        min-height: 142px;
        padding: 1.05rem;
    }

    .metric-card > strong {
        font-size: 2rem;
    }

    .metric-foot {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: .35rem .75rem;
    }

    .action-row {
        min-height: 68px;
        padding: .85rem 0;
    }

    .action-row small {
        font-size: .72rem;
        line-height: 1.45;
    }

    .form-section {
        grid-template-columns: 1fr;
        gap: .7rem;
        padding: 1rem;
    }

    .form-section-number {
        width: 30px;
        height: 30px;
        border-radius: 999px;
    }

    .ticker-combobox-shell input {
        min-height: 54px;
        padding-left: .6rem;
    }

    .ticker-clear {
        min-width: 52px;
        min-height: 44px;
        padding: .5rem;
        font-size: .7rem;
    }

    .ticker-listbox {
        top: 60px;
        max-height: min(42dvh, 320px);
        overscroll-behavior: contain;
        scroll-padding-block: .45rem;
    }

    .ticker-option {
        min-height: 56px;
        padding: .7rem;
    }

    .ticker-option-copy strong {
        font-size: .8rem;
    }

    .ticker-option-copy small {
        font-size: .68rem;
        white-space: normal;
    }

    .choice-card {
        align-items: flex-start;
        min-height: 88px;
        padding: .9rem;
    }

    .choice-card strong {
        font-size: .82rem;
        line-height: 1.35;
    }

    .choice-card small {
        margin-top: .25rem;
        font-size: .72rem;
        line-height: 1.45;
    }

    .run-review > div {
        gap: 1rem;
    }

    .run-review > div strong {
        text-align: right;
    }

    .run-review > p {
        font-size: .72rem;
        line-height: 1.5;
    }

    .button-small,
    .button-ghost,
    .button-dark,
    .dataset-slot-form .button {
        min-height: 44px;
    }

    .confirmation-dialog {
        width: 100%;
        max-width: none;
        max-height: min(88dvh, 760px);
        margin: auto 0 0;
        border-width: 1px 0 0;
        border-radius: 24px 24px 0 0;
    }

    .confirmation-dialog-card {
        gap: .85rem;
        padding:
            1.25rem 1.1rem
            max(1.25rem, env(safe-area-inset-bottom));
    }

    .confirmation-dialog-close {
        top: .75rem;
        right: .75rem;
        width: 44px;
        height: 44px;
    }

    .confirmation-dialog-impact,
    .confirmation-dialog-actions {
        grid-template-columns: 1fr;
    }

    .confirmation-dialog-impact > div + div {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .table-wrap {
        max-width: 100%;
        overscroll-behavior-x: contain;
        scrollbar-color: var(--border-strong) transparent;
    }

    .table-wrap:focus-visible {
        outline: 3px solid var(--focus-ring);
        outline-offset: 4px;
        border-radius: 10px;
    }

    .responsive-card-table,
    .responsive-card-table.analysis-history-table,
    .responsive-card-table.dataset-version-table {
        min-width: 0;
        display: block;
        border-collapse: separate;
        font-size: .78rem;
    }

    .responsive-card-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .responsive-card-table tbody {
        display: grid;
        gap: .75rem;
    }

    .responsive-card-table tbody tr {
        display: grid;
        padding: .35rem .85rem;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: var(--surface-page);
    }

    .responsive-card-table td {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(82px, .45fr) minmax(0, 1fr);
        gap: .8rem;
        padding: .68rem 0;
        border-bottom: 1px solid var(--border);
        text-align: right !important;
        overflow-wrap: anywhere;
    }

    .responsive-card-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: .65rem;
        font-weight: 820;
        letter-spacing: .055em;
        line-height: 1.4;
        text-align: left;
        text-transform: uppercase;
    }

    .responsive-card-table td:last-child {
        border-bottom: 0;
    }

    .responsive-card-table td[data-label="Action"] {
        display: block;
        padding-top: .8rem;
        text-align: left !important;
    }

    .responsive-card-table td[data-label="Action"]::before {
        display: none;
    }

    .responsive-card-table td[data-label="Action"] .text-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        border: 1px solid var(--accent-border);
        border-radius: 10px;
        background: var(--surface-card);
    }

    .responsive-card-table td[colspan] {
        display: block;
        padding: 1.2rem .4rem;
        text-align: center !important;
    }

    .responsive-card-table td[colspan]::before {
        display: none;
    }

    .analysis-result-table th:first-child,
    .analysis-result-table td:first-child {
        position: sticky;
        z-index: 1;
        left: 0;
        background: var(--surface-card);
        box-shadow: 1px 0 0 var(--border);
    }

    .analysis-result-table thead th:first-child {
        z-index: 2;
    }

    .analysis-chart-card {
        width: calc(100vw - .75rem);
    }

    .analysis-chart-surface,
    .analysis-chart-loading {
        min-height: 560px;
    }

    .analysis-chart-cursor-readout {
        top: 52px;
        left: 48px;
        max-width: calc(100% - 60px);
        font-size: .62rem;
    }

    .analysis-chart-note {
        font-size: .74rem;
        line-height: 1.5;
    }

    .instrument-context-card,
    .instrument-profile-card {
        padding: 1.05rem;
    }

    .instrument-context-lead,
    .analysis-fit-metrics .metric-card {
        min-height: 135px;
    }

    .instrument-context-detail p,
    .instrument-profile-copy > p,
    .instrument-profile-facts dd {
        font-size: .72rem;
    }

    .dataset-title-lockup {
        min-width: 0;
    }

    .dataset-title-lockup > div {
        min-width: 0;
    }

    .dataset-title-lockup h1 {
        overflow-wrap: anywhere;
    }

    .dataset-version-file {
        max-width: none;
        white-space: normal;
    }

    .billing-plan-heading {
        flex-wrap: wrap;
    }

    .balance-card {
        min-width: 0;
        padding: 1.3rem;
    }

    .top-up-card {
        padding: 1.05rem;
    }

    .top-up-card > p {
        min-height: 0;
    }

    .contact-grid form > .button {
        width: 100%;
    }

    .legal-content {
        padding: 1.05rem;
    }

    .site-footer {
        padding: 2.25rem 0;
    }

    .app-shell .site-footer {
        padding-bottom: 2.5rem;
    }
}

@media (max-width: 380px) {
    .site-header .brand-wordmark-image {
        width: 112px;
    }

    .theme-toggle {
        right: 3.8rem;
        width: 44px;
        height: 44px;
    }

    .menu-toggle {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }

    .content-width,
    .account-strip-inner,
    .footer-inner {
        width: calc(100% - 1rem);
    }

    .hero-copy h1 {
        font-size: 2.28rem;
    }

    .trial-promotion-panel {
        padding: 1rem;
    }

    .trial-promotion-trust {
        grid-template-columns: 1fr;
    }

    .trial-promotion-duration strong {
        font-size: 3rem;
    }

    .mobile-bottom-navigation a {
        font-size: .58rem;
    }

    .mobile-bottom-navigation svg {
        width: 20px;
        height: 20px;
    }

    .session-pill::before,
    .balance-pill::before {
        font-size: .62rem;
    }

    .session-pill strong,
    .balance-pill strong {
        font-size: .67rem;
    }

    .surface-card:not(.analysis-form-card),
    .auth-card,
    .auth-card-wide {
        padding: .95rem;
    }

    .ticker-search-mark {
        margin-left: .65rem;
    }

    .responsive-card-table td {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: .55rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) and (max-width: 900px) {
    .primary-navigation {
        top: calc(62px + env(safe-area-inset-top));
        max-height: calc(100dvh - 68px - env(safe-area-inset-top));
    }

    .mobile-bottom-navigation {
        min-height: calc(56px + env(safe-area-inset-bottom));
        padding-top: .2rem;
    }

    .mobile-bottom-navigation a {
        min-height: 44px;
        flex-direction: row;
        font-size: .6rem;
    }

    .mobile-bottom-navigation svg {
        width: 18px;
        height: 18px;
    }

    body.app-shell {
        padding-bottom: calc(56px + env(safe-area-inset-bottom));
    }
}

@media (pointer: coarse) {
    .button-small,
    .button-ghost,
    .button-dark,
    .confirmation-dialog-close,
    .flash-close,
    .password-toggle,
    .ticker-clear,
    .result-carousel-arrow,
    .result-carousel-toggle,
    .result-carousel-dots button {
        min-height: 44px;
    }
}

@media (hover: none) {
    .button:hover:not(:disabled),
    .choice-card:hover,
    .dataset-row:hover,
    .theme-toggle:hover {
        transform: none;
    }

    .button:active:not(:disabled),
    .choice-card:active,
    .mobile-bottom-navigation a:active {
        transform: scale(.985);
    }
}

@media (prefers-reduced-motion: reduce) {
    .primary-navigation,
    .navigation-backdrop,
    .menu-toggle > span:not(.sr-only),
    .mobile-bottom-navigation a {
        transition: none;
    }
}

/* Focused account creation */
.signup-focused-shell {
    min-height: 100vh;
    background: var(--surface-page);
}

.signup-focused-header {
    position: relative;
    background: color-mix(in srgb, var(--surface-header) 94%, transparent);
}

.signup-focused-header .header-inner {
    width: min(960px, calc(100% - 3rem));
    min-height: 68px;
}

.signup-focused-header .brand {
    min-height: 44px;
}

.signup-focused-header-action {
    display: flex;
    align-items: center;
    gap: .8rem;
    color: var(--text-secondary);
    font-size: .8rem;
    font-weight: 650;
}

.signup-focused-header-action .button {
    min-width: 82px;
    min-height: 44px;
}

.signup-focused-section {
    min-height: auto;
    align-items: flex-start;
    padding: clamp(2rem, 5vw, 4.5rem) 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(21, 150, 255, .13), transparent 38%),
        var(--surface-page);
}

.signup-focused-layout.content-width {
    width: min(620px, calc(100% - 2rem));
}

.signup-focused-card {
    width: 100%;
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border-radius: 24px;
}

.signup-focused-card-head {
    margin-bottom: 1.5rem;
    text-align: center;
}

.signup-trial-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: .65rem;
    padding: .38rem .7rem;
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    color: var(--text-accent);
    background: var(--brand-50);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.signup-focused-card-head h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 2.65rem);
    letter-spacing: -.045em;
}

.signup-trial-lead {
    max-width: 470px;
    margin: .65rem auto 0;
    color: var(--text-secondary);
    font-size: .88rem;
    line-height: 1.55;
}

.signup-trial-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin: .8rem 0 0;
    padding: 0;
    list-style: none;
}

.signup-trial-facts li {
    padding: .3rem .55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    background: var(--surface-soft);
    font-size: .66rem;
    font-weight: 750;
}

.signup-trial-transition {
    margin: .65rem 0 0;
    color: var(--text-muted);
    font-size: .7rem;
    line-height: 1.5;
}

.signup-error-summary {
    margin: 0 0 1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--danger-border);
    border-radius: 12px;
    color: var(--status-danger-text);
    background: var(--danger-soft);
    font-size: .8rem;
    line-height: 1.5;
}

.signup-error-summary strong {
    display: block;
}

.signup-error-summary ul {
    display: grid;
    gap: .2rem;
    margin: .4rem 0 0;
    padding-left: 1.2rem;
}

.signup-account-conflict {
    margin: 0 0 1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--info-border);
    border-radius: 12px;
    color: var(--status-info-text);
    background: var(--info-soft);
    font-size: .8rem;
    line-height: 1.5;
}

.signup-account-conflict strong {
    display: block;
}

.signup-account-conflict p {
    margin: .2rem 0 0;
}

.signup-account-conflict a {
    color: var(--text-accent);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.signup-focused-form {
    gap: 1rem;
}

.signup-focused-form .auth-form-grid {
    gap: .9rem 1rem;
}

.signup-focused-form .form-field {
    align-content: start;
}

.signup-focused-form .form-field input {
    min-height: 50px;
    font-size: 1rem;
}

.signup-focused-form .password-toggle {
    min-height: 44px;
}

.signup-focused-form .form-field input[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent);
}

.signup-focused-form .auth-form-help {
    margin: 0;
    font-size: .78rem;
    line-height: 1.45;
}

.form-field-error {
    margin: 0;
    color: var(--status-danger-text);
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.4;
}

.signup-submit {
    min-height: 54px;
    margin-top: .1rem;
    font-size: .94rem;
}

.signup-submit:disabled {
    cursor: wait;
}

.signup-focused-card .auth-terms {
    margin-top: 1.1rem;
    font-size: .8rem;
    line-height: 1.55;
}

.signup-risk-note {
    margin: .45rem 0 0;
    color: var(--text-muted);
    font-size: .76rem;
    line-height: 1.5;
    text-align: center;
}

.signup-focused-footer {
    padding: 1.2rem 0;
}

.signup-focused-footer-inner {
    width: min(960px, calc(100% - 3rem));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-muted);
    font-size: .76rem;
}

.signup-focused-footer-inner p {
    margin: 0;
}

.signup-focused-footer-inner nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.signup-focused-footer-inner a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-weight: 700;
}

.signup-focused-footer-inner a:hover {
    color: var(--text-accent-hover);
}

.signup-focused-shell .theme-toggle {
    display: none;
}

@media (max-width: 820px) {
    .signup-focused-form .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .signup-focused-form .auth-field-wide {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .signup-focused-header .header-inner {
        width: calc(100% - 1.25rem);
        min-height: 64px;
    }

    .signup-focused-header-action > span {
        display: none;
    }

    .signup-focused-header-action .button {
        min-width: 72px;
        min-height: 44px;
    }

    .signup-focused-section {
        padding: 1rem 0 1.5rem;
    }

    .signup-focused-layout.content-width {
        width: calc(100% - 1rem);
    }

    .signup-focused-card,
    .signup-focused-card.auth-card-wide {
        padding: 1.2rem;
        border-radius: 18px;
    }

    .signup-focused-card-head {
        margin-bottom: 1.2rem;
        text-align: left;
    }

    .signup-trial-lead { margin-inline: 0; }

    .signup-trial-facts { justify-content: flex-start; }

    .signup-focused-card-head h1 {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
    }

    .signup-focused-form .form-field input {
        min-height: 50px;
    }

    .signup-focused-footer-inner {
        width: calc(100% - 2rem);
        align-items: flex-start;
        flex-direction: column-reverse;
        gap: .55rem;
    }
}

@media (max-width: 380px) {
    .signup-focused-card,
    .signup-focused-card.auth-card-wide {
        padding: 1rem;
    }

    .signup-focused-form .auth-form-grid {
        gap: .8rem;
    }
}
