/*
 * WorthIt v1.4 — The Decision Studio
 *
 * A deliberate departure from the magazine-style v1.3 interface:
 * modern sans typography, a solid-colour side rail, a clear application
 * workspace, and a single terracotta accent. No shadowed cards, glass,
 * gradients, oversized marketing imagery, or third-party font dependencies.
 */
:root {
    --canvas: #eae9e3;
    --paper: #faf9f5;
    --ink: #242a2b;
    --muted: #566061;
    --quiet: #727b7b;
    --line: #bac1bf;
    --line-light: #dde1dd;
    --accent: #aa452f;
    --accent-contrast: #ffffff;
    --accent-tint: #f3e7e0;
    --control: #ffffff;
    --focus: #b24c37;
    --positive: #2a6854;
    --positive-wash: #e8f1ec;
    --negative: #a7422e;
    --negative-wash: #f7eae2;
    --number-surface: #eeeee9;
    --rail-bg: #233734;
    --rail-ink: #f8f4ec;
    --rail-muted: #bdcdc5;
    --font-sans: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    --font-serif: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
}

:root[data-theme="dark"] {
    --canvas: #111717;
    --paper: #1a2323;
    --ink: #f1eee7;
    --muted: #c5ceca;
    --quiet: #9daaa6;
    --line: #52605b;
    --line-light: #35413d;
    --accent: #eb9e87;
    --accent-contrast: #182120;
    --accent-tint: #3a2c29;
    --control: #24312e;
    --focus: #f3b39c;
    --positive: #9fddba;
    --positive-wash: #253b32;
    --negative: #f0ad90;
    --negative-wash: #3e2c2a;
    --number-surface: #2c3633;
    --rail-bg: #0d1414;
    --rail-ink: #f5f0e7;
    --rail-muted: #aebcb6;
}

body {
    font-size: 1.075rem;
    line-height: 1.55;
    background: var(--canvas);
}

.page-shell {
    max-width: 1520px;
    padding: 0 clamp(18px, 3.5vw, 62px);
}

.site-header {
    min-height: 89px;
    border-bottom: 1px solid var(--line);
}

.brand {
    font-family: var(--font-sans);
    font-size: 1.95rem;
    font-weight: 850;
    letter-spacing: -0.09em;
}

.brand span {
    font-style: normal;
    font-weight: 850;
}

.brand b {
    margin-left: 0.08em;
}

.header-descriptor,
.masthead-label,
.rail-overline,
.step-count,
.step-overline,
.subhead,
.recommendation-label,
.report-edition,
.site-footer {
    letter-spacing: 0.095em;
}

.introduction {
    grid-template-columns: minmax(0, 1.4fr) minmax(235px, 0.65fr);
    gap: clamp(20px, 5vw, 85px);
    padding: clamp(36px, 5vw, 75px) 0 clamp(40px, 5vw, 64px);
    align-items: center;
}

.introduction h1 {
    font-family: var(--font-sans);
    font-weight: 820;
    font-size: clamp(3.2rem, 6.8vw, 6.7rem);
    line-height: 0.98;
    letter-spacing: -0.085em;
}

.introduction h1 span {
    color: var(--accent);
}

.masthead-label {
    margin-bottom: 17px;
    color: var(--accent);
}

.intro-note {
    max-width: 330px;
    margin: 0;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 2px solid var(--accent);
    font-family: var(--font-sans);
    font-size: 1.12rem;
    font-weight: 480;
    line-height: 1.7;
}

.experience {
    grid-template-columns: minmax(260px, 28%) minmax(0, 1fr);
    border: 0;
    background: var(--paper);
}

.rail {
    padding: clamp(30px, 4vw, 62px) clamp(24px, 3.1vw, 44px);
    background: var(--rail-bg);
    color: var(--rail-ink);
    border: 0;
    gap: 45px;
}

.rail-main {
    position: sticky;
    top: 28px;
}

.rail-overline,
.rail-steps li.is-current,
.rail-note-mark {
    color: #f1b09b;
}

.rail-intro {
    font-family: var(--font-sans);
    font-size: clamp(1.75rem, 2.9vw, 2.6rem);
    font-weight: 760;
    letter-spacing: -0.06em;
    line-height: 1.13;
    margin: 25px 0 62px;
}

.rail-steps li,
.rail-steps li:last-child {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--rail-muted);
}

.rail-steps li.is-current {
    color: var(--rail-ink);
    border-top-color: #f1b09b;
}

.rail-steps li.is-current span {
    color: #f1b09b;
}

.rail-steps li.is-complete {
    color: var(--rail-ink);
}

.rail-steps li strong {
    font-weight: 600;
}

.rail-footer {
    color: var(--rail-muted);
}

.rail-note-mark {
    font-family: var(--font-sans);
    font-weight: 700;
}

.workspace {
    padding: clamp(32px, 4.6vw, 72px) clamp(24px, 5vw, 82px) clamp(42px, 5vw, 76px);
}

.step-header,
.report-topline {
    margin-bottom: 30px;
    padding-bottom: 18px;
}

.step-overline {
    letter-spacing: 0.12em;
}

.step-intro {
    margin-bottom: 36px;
}

.step-intro h2,
.report h2 {
    font-family: var(--font-sans);
    font-weight: 760;
    letter-spacing: -0.065em;
    line-height: 1.05;
    font-size: clamp(2.2rem, 4.3vw, 4.4rem);
}

.helper {
    font-size: 1.06rem;
    max-width: 600px;
}

.field label,
.payment-choice legend,
.choice-group legend {
    font-size: 1.01rem;
    font-weight: 700;
}

input:not([type="radio"]),
select,
.input-with-prefix,
.input-with-suffix {
    min-height: 62px;
    border-color: var(--line);
    border-radius: 0;
}

input:not([type="radio"]):hover,
select:hover {
    border-color: var(--quiet);
}

.payment-choice {
    padding: 28px 0 0;
    margin: 17px 0 0;
    border-top: 1px solid var(--line-light);
}

.payment-options {
    gap: 8px;
    border: 0;
}

.acceptance-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-option,
.payment-option + .payment-option {
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.payment-option:has(input:checked) {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
    background: var(--accent-tint);
}

.payment-option span {
    font-size: 0.98rem;
    line-height: 1.3;
}

.compare-choice {
    padding-top: 22px;
    margin-top: 18px;
    border-top: 0;
}

.credit-fields {
    padding-top: 24px;
}

.purchase-total {
    padding: 24px 29px;
    margin: 34px 0 0;
    background: var(--rail-bg);
    border: 0;
    color: var(--rail-ink);
}

.purchase-total p,
.purchase-total .subhead {
    color: var(--rail-muted);
}

.purchase-total strong {
    font-family: var(--font-sans);
    font-weight: 760;
    letter-spacing: -0.06em;
}

.question-number,
.question-heading h3,
.recommendation-mark,
.recommendation h3,
.plain-result-title,
.smart-recommendation h4,
.smart-payment-planner h4,
.smart-debt-comparison h4,
.thought-answer h4,
.thought-finding-heading,
.green-light h3,
.green-limit,
.report-stat strong,
.runway-card strong,
.cost-per-use strong,
.smart-method strong,
.smart-debt-grid strong {
    font-family: var(--font-sans);
    font-style: normal;
    font-weight: 730;
    letter-spacing: -0.045em;
}

.question-heading h3 {
    font-size: 1.6rem;
}

.question-number {
    font-size: 1.12rem;
    font-weight: 800;
}

.button {
    border-color: var(--accent);
    min-height: 60px;
    padding: 13px 26px;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.button-primary {
    background: var(--accent);
    color: var(--accent-contrast);
}

.button-primary:hover {
    background: var(--ink);
    color: var(--canvas);
    border-color: var(--ink);
}

.button-secondary {
    border-color: var(--line);
}

.recommendation {
    border-top-width: 4px;
    padding: 27px 0 30px;
}

.recommendation h3 {
    font-size: clamp(1.7rem, 2.7vw, 2.4rem);
}

.payment-availability-result {
    margin: 0 0 27px;
    padding: 17px 21px;
    border-left: 4px solid var(--accent);
    background: var(--accent-tint);
}

.payment-availability-result strong {
    display: block;
    font-weight: 800;
    font-size: 1.04rem;
}

.payment-availability-result p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.green-light {
    background: var(--number-surface);
    padding: clamp(24px, 4vw, 48px);
    border: 0;
}

.green-light-main {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.smart-methods,
.report-grid,
.runway-grid {
    border-color: var(--line);
}

.smart-methods .smart-method {
    padding-top: 24px;
}

.thought-choice:has(input:checked),
.green-goal label:has(input:checked) {
    background: var(--accent-tint);
}

.site-footer {
    padding: 28px 0 42px;
    color: var(--quiet);
}

@media (max-width: 900px) {
    .introduction {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .intro-note {
        max-width: 680px;
    }

    .experience {
        grid-template-columns: minmax(200px, 29%) minmax(0, 1fr);
    }

    .rail {
        padding: 32px 20px;
    }

    .rail-intro {
        font-size: 1.85rem;
    }

    .workspace {
        padding: 35px 25px 55px;
    }
}

@media (max-width: 710px) {
    .page-shell {
        padding: 0 13px;
    }

    .site-header {
        min-height: 75px;
    }

    .header-descriptor {
        display: none;
    }

    .introduction {
        padding: 32px 4px 38px;
    }

    .introduction h1 {
        font-size: clamp(2.9rem, 11vw, 4.9rem);
    }

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

    .rail {
        padding: 23px;
        gap: 0;
    }

    .rail-main {
        position: static;
    }

    .rail-overline,
    .rail-intro,
    .rail-footer {
        display: none;
    }

    .rail-steps {
        display: flex;
        gap: 15px;
    }

    .rail-steps li,
    .rail-steps li:last-child {
        flex: 1 1 0;
        padding: 0 0 12px;
        border-top: 0;
        border-bottom: 2px solid rgba(255, 255, 255, 0.25);
        gap: 6px;
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .rail-steps li.is-current {
        border-bottom-color: #f1b09b;
    }

    .rail-steps strong {
        font-size: 0.81rem;
    }

    .workspace {
        padding: 27px 22px 43px;
    }

    .step-intro h2,
    .report h2 {
        font-size: clamp(2.15rem, 8.5vw, 3.5rem);
    }

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

    .payment-option,
    .payment-option + .payment-option {
        padding: 11px 8px;
        gap: 7px;
    }

    .payment-option input[type="radio"] {
        width: 17px;
        height: 17px;
    }

    .payment-option span {
        font-size: 0.9rem;
    }

    .payment-options:not(.acceptance-options) {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .purchase-total {
        padding: 18px;
    }
}

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

/* Keep the first question visible sooner on smaller screens. */
@media (max-width: 710px) {
    .introduction {
        padding: 23px 4px 27px;
        gap: 0;
    }

    .introduction h1 {
        font-size: clamp(2.65rem, 10.3vw, 3.3rem);
    }

    .intro-note {
        display: none;
    }

    .rail {
        padding: 17px 19px;
    }

    .workspace {
        padding-top: 24px;
    }
}

/* Long reports should jump straight to the edited section, not drift while a
 * user attempts to press another control. */
html {
    scroll-behavior: auto;
}

/* Avoid inherited print-style italic heading in the new sans-serif report. */
.report h2 em {
    font-style: normal;
    font-weight: 760;
}
