:root {
    --bg: #edf4ff;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --ink: #102340;
    --muted: #5d7291;
    --line: rgba(63, 107, 174, 0.16);
    --primary: #1f6fff;
    --primary-strong: #0e56d0;
    --danger: #c84545;
    --success: #1f8f66;
    --shadow: 0 24px 70px rgba(42, 78, 140, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(82, 151, 255, 0.22), transparent 32%),
        radial-gradient(circle at bottom right, rgba(18, 88, 196, 0.18), transparent 34%),
        linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
    font-family: Calibri, Candara, "Segoe UI", sans-serif;
}

a {
    color: var(--primary-strong);
    text-decoration: none;
}

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

.page-shell {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.brand {
    position: relative;
    padding-left: 18px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink);
}

.brand::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary), #62a5ff);
    box-shadow: 0 0 0 5px rgba(31, 111, 255, 0.12);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
}

.nav form {
    margin: 0;
}

.ghost-button,
button,
.button-link {
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

button,
.button-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary), #4291ff);
    color: white;
    box-shadow: 0 14px 26px rgba(31, 111, 255, 0.24);
}

button:hover,
.button-link:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
    color: white;
}

.ghost-button,
button.secondary,
.button-link.subtle {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    box-shadow: none;
}

.content {
    padding-top: 24px;
}

.flash {
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
}

.flash-success {
    background: rgba(31, 143, 102, 0.1);
    color: var(--success);
}

.flash-error {
    background: rgba(200, 69, 69, 0.1);
    color: var(--danger);
}

.danger-button {
    background: linear-gradient(135deg, #d74f4f, #b73232);
    box-shadow: 0 14px 26px rgba(183, 50, 50, 0.22);
}

.danger-button:hover {
    background: linear-gradient(135deg, #c94040, #9f2525);
}

.error-list {
    margin: 0;
    padding-left: 18px;
}

.hero-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 34px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.88));
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -80px -80px auto;
    width: 240px;
    height: 240px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(31, 111, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.panel {
    padding: 26px;
    background: var(--panel-strong);
}

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

.grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary-strong);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
}

h1,
h2 {
    margin-top: 0;
    font-family: Calibri, Candara, "Segoe UI", sans-serif;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(2.1rem, 3vw, 3.3rem);
    line-height: 1.02;
}

h2 {
    margin-bottom: 10px;
    font-size: 1.45rem;
}

.lede {
    color: var(--muted);
    max-width: 56ch;
    line-height: 1.65;
}

.hero-metrics {
    display: grid;
    gap: 14px;
}

.metric {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(234, 243, 255, 0.82));
    border: 1px solid var(--line);
}

.metric span,
.big-stat {
    display: block;
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ink);
}

.metric small,
.footnote,
.details-list dt,
.field-note,
.choice-copy small {
    color: var(--muted);
}

.auth-panel {
    max-width: 620px;
    margin: 0 auto;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form label,
.stack-form fieldset {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.stack-form fieldset {
    margin: 0;
    padding: 0;
    border: none;
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    font: inherit;
}

input:focus,
select:focus {
    outline: none;
    border-color: rgba(31, 111, 255, 0.42);
    box-shadow: 0 0 0 4px rgba(31, 111, 255, 0.12);
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.choice-option {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(247, 251, 255, 0.9);
    cursor: pointer;
}

.choice-option:hover {
    border-color: rgba(31, 111, 255, 0.32);
    background: rgba(240, 247, 255, 0.96);
}

.choice-option input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.choice-copy {
    display: grid;
    gap: 4px;
}

.choice-copy strong {
    font-size: 1.06rem;
}

.form-links,
.action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.field-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.number-input {
    max-width: 160px;
}

.field-note {
    margin: 0;
    line-height: 1.5;
}

.captcha-block {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(244, 249, 255, 0.92);
}

.slider-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(244, 249, 255, 0.92);
    border: 1px solid var(--line);
}

.slider-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.slider-summary strong {
    display: block;
    margin-top: 4px;
    font-size: 1.5rem;
}

.slider-label {
    color: var(--muted);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.slider-scale {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

input[type="range"] {
    --slider-progress: 0%;
    padding: 0;
    height: 14px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary) 0%, #5ca8ff var(--slider-progress), rgba(16, 35, 64, 0.08) var(--slider-progress), rgba(16, 35, 64, 0.08) 100%);
    box-shadow: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 14px;
    border-radius: 999px;
    background: transparent;
}

input[type="range"]::-moz-range-track {
    height: 14px;
    border-radius: 999px;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -5px;
    border: 4px solid white;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 10px 22px rgba(31, 111, 255, 0.28);
    appearance: none;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 4px solid white;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 10px 22px rgba(31, 111, 255, 0.28);
}

.onboarding-note strong {
    color: var(--primary-strong);
}

.details-list {
    display: grid;
    gap: 14px;
}

.details-list div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(244, 249, 255, 0.88);
    border: 1px solid var(--line);
}

.details-list dd {
    margin: 0;
    font-weight: 700;
}

.timeline-list {
    display: grid;
    gap: 12px;
    margin: 14px 0 18px;
}

.timeline-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(244, 249, 255, 0.88);
    border: 1px solid var(--line);
}

.timeline-item span {
    font-weight: 700;
}

.timeline-item small {
    color: var(--muted);
    line-height: 1.45;
}

.progress {
    height: 12px;
    background: rgba(16, 35, 64, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #5ca8ff);
}

.warning-panel {
    margin-top: 24px;
}

.danger-panel {
    border-color: rgba(200, 69, 69, 0.24);
    background: linear-gradient(180deg, rgba(255, 251, 251, 0.98), rgba(255, 243, 243, 0.94));
}

.hidden-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 900px) {
    .hero-card,
    .grid,
    .grid.two-up,
    .choice-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .field-row {
        flex-direction: column;
        align-items: stretch;
    }

    .slider-summary {
        flex-direction: column;
    }

    .number-input {
        max-width: none;
    }
}
