:root {
    color-scheme: light;
    --bg: #f5f7f1;
    --surface: #ffffff;
    --surface-soft: #eef4ed;
    --ink: #172a22;
    --muted: #63726a;
    --line: #d9e2dc;
    --accent: #2f7d50;
    --accent-dark: #20583a;
    --gold: #b5812c;
    --terra: #9a5a3a;
    --error: #a33b32;
    --shadow: 0 18px 45px rgba(24, 48, 38, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(217, 226, 220, 0.85);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
}

.site-nav,
.site-footer,
.prediction-shell,
.content-band {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 800;
}

.brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.86rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 0 0 auto;
}

.nav-link,
.nav-button,
.primary-action,
.secondary-action,
.site-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 8px;
    font-weight: 800;
}

.nav-link {
    padding: 0 12px;
    color: var(--muted);
}

.nav-link.active,
.nav-link:hover {
    color: var(--accent-dark);
}

.nav-button,
.primary-action {
    padding: 0 18px;
    background: var(--accent);
    color: #ffffff;
}

.nav-button:hover,
.primary-action:hover,
.submit-button:hover,
.submit-button:focus {
    background: var(--accent-dark);
}

.nav-button.active {
    background: var(--accent-dark);
}

.landing-hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: calc(100vh - 142px);
    margin-bottom: 20px;
    padding: 92px max(24px, calc((100vw - 1180px) / 2)) 76px;
    isolation: isolate;
    background-image:
        linear-gradient(90deg, rgba(13, 29, 23, 0.78), rgba(13, 29, 23, 0.4) 42%, rgba(13, 29, 23, 0.06)),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

.hero-copy {
    max-width: 660px;
    color: #ffffff;
}

.eyebrow,
.panel-label {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.landing-hero .eyebrow {
    color: #f1c981;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(2.7rem, 4.8rem, 5rem);
    line-height: 0.98;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2rem, 3rem, 3.2rem);
    line-height: 1.05;
    letter-spacing: 0;
}

h3 {
    margin: 12px 0 10px;
    font-size: 1.08rem;
}

.hero-text {
    max-width: 560px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.12rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-action,
.secondary-action {
    min-width: 154px;
    padding: 0 20px;
}

.secondary-action {
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: #ffffff;
}

.secondary-action:hover {
    background: rgba(255, 255, 255, 0.14);
}

.content-band {
    padding: 64px 0;
}

.section-heading {
    display: grid;
    gap: 4px;
    margin-bottom: 24px;
}

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

.info-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(24, 48, 38, 0.08);
}

.info-card span {
    color: var(--terra);
    font-size: 0.86rem;
    font-weight: 800;
}

.info-card p,
.result-note,
.site-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.split-band {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    border-top: 1px solid var(--line);
}

.input-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.input-list span {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--accent-dark);
    font-size: 0.92rem;
    font-weight: 800;
}

.prediction-main {
    min-height: calc(100vh - 72px);
    background: #f7f8f6;
}

.prediction-shell {
    padding: 28px 0 72px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 32px;
    color: #748078;
    font-size: 0.84rem;
}

.breadcrumb a {
    color: var(--accent-dark);
    font-weight: 700;
}

.breadcrumb a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prediction-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 56px;
    align-items: end;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #d7ddd9;
}

.prediction-intro-copy,
.estimator-form,
.estimate-column,
.form-section {
    min-width: 0;
}

.section-kicker {
    margin: 0 0 10px;
    color: var(--accent-dark);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prediction-intro h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2.25rem, 5vw, 3.65rem);
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.prediction-intro-copy > p:last-child {
    max-width: 670px;
    margin: 16px 0 0;
    color: #58665e;
    font-size: 1rem;
    line-height: 1.65;
}

.model-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(84px, auto));
    margin: 0;
}

.model-facts div {
    min-width: 0;
    padding: 4px 20px;
    border-left: 1px solid #cfd7d2;
}

.model-facts dt {
    margin-bottom: 7px;
    color: #748078;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.model-facts dd {
    margin: 0;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.estimator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.estimator-form,
.result-panel {
    border: 1px solid #d7ddd9;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 42, 34, 0.05);
}

.form-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 30px;
    border-bottom: 1px solid #e0e5e2;
}

.form-header h2,
.result-explainer h2,
.input-advice h2 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.form-header p,
.form-actions p {
    margin: 7px 0 0;
    color: #657169;
    font-size: 0.86rem;
    line-height: 1.5;
}

.required-note {
    flex: 0 0 auto;
    margin: 2px 0 0 !important;
    white-space: nowrap;
}

.required-note span,
.form-field label span {
    color: var(--error);
}

.form-alert {
    margin: 24px 30px 0;
    padding: 14px 16px;
    border: 1px solid #d8aca7;
    border-radius: 4px;
    background: #fff8f7;
    color: #782b25;
    font-size: 0.86rem;
}

.form-alert p {
    margin: 4px 0 0;
    line-height: 1.45;
}

.form-alert .errorlist {
    margin-bottom: 0;
}

.form-section {
    margin: 0;
    padding: 27px 30px 30px;
    border: 0;
    border-bottom: 1px solid #e0e5e2;
}

.form-section legend {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
}

.section-title,
.section-description {
    display: block;
}

.section-title {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 750;
}

.section-description {
    margin-top: 5px;
    color: #657169;
    font-size: 0.84rem;
    line-height: 1.45;
}

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

.form-field {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.form-field label {
    color: #253b31;
    font-size: 0.86rem;
    font-weight: 700;
}

.field-control {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid #b8c3bd;
    border-radius: 4px;
    background: #ffffff;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field-control:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 125, 80, 0.13);
}

.has-error .field-control {
    border-color: var(--error);
}

.field-control > span {
    flex: 0 0 auto;
    padding: 0 12px;
    color: #5f6c64;
    font-size: 0.78rem;
    font-weight: 750;
    white-space: nowrap;
}

.control-input {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172a22;
    font: inherit;
    font-size: 0.94rem;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.control-input::placeholder {
    color: #8a958e;
    font-weight: 500;
    opacity: 1;
}

.field-support {
    display: grid;
    gap: 2px;
    color: #657169;
    font-size: 0.74rem;
    line-height: 1.4;
}

.field-support span:last-child {
    color: #879189;
}

.field-error {
    margin: 0;
    color: var(--error);
    font-size: 0.78rem;
    font-weight: 700;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 30px;
}

.form-actions p {
    max-width: 360px;
    margin: 0;
}

.submit-button {
    min-width: 190px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 4px;
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 750;
}

.submit-button:focus-visible {
    outline: 3px solid rgba(47, 125, 80, 0.28);
    outline-offset: 3px;
}

.estimate-column {
    position: sticky;
    top: 96px;
}

.result-panel {
    padding: 27px 26px 24px;
    border-top: 3px solid #aeb8b2;
}

.result-panel.has-result {
    border-top-color: var(--accent);
}

.result-label {
    margin: 0 0 12px;
    color: #657169;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.result-value {
    margin: 0;
    color: var(--accent-dark);
    font-size: clamp(2rem, 3.4vw, 2.65rem);
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.result-value.is-empty {
    color: #7c8881;
}

.result-status {
    margin: 10px 0 0;
    color: #657169;
    font-size: 0.82rem;
    line-height: 1.45;
}

.result-explainer {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #e0e5e2;
}

.result-explainer h2,
.input-advice h2 {
    font-size: 0.92rem;
}

.result-explainer p,
.input-advice p {
    margin: 8px 0 0;
    color: #657169;
    font-size: 0.82rem;
    line-height: 1.55;
}

.result-details {
    margin: 22px 0 0;
    padding-top: 15px;
    border-top: 1px solid #e0e5e2;
}

.result-details div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    font-size: 0.78rem;
}

.result-details dt {
    color: #7b867f;
}

.result-details dd {
    margin: 0;
    color: #31443a;
    font-weight: 700;
    text-align: right;
}

.input-advice {
    margin-top: 16px;
    padding: 18px 20px;
    border-left: 3px solid #b9c7be;
    background: #edf1ee;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
}

.site-footer strong {
    display: block;
    margin-bottom: 6px;
}

.site-footer a {
    flex: 0 0 auto;
    min-width: 132px;
    padding: 0 16px;
    border: 1px solid var(--line);
    color: var(--accent-dark);
}

.site-footer a:hover {
    border-color: var(--accent);
}

@media (max-width: 900px) {
    .landing-hero {
        min-height: 76vh;
        padding-top: 76px;
    }

    .feature-grid,
    .split-band,
    .estimator-layout,
    .prediction-intro {
        grid-template-columns: 1fr;
    }

    .prediction-intro {
        gap: 24px;
    }

    .model-facts {
        width: 100%;
    }

    .model-facts div:first-child {
        border-left: 0;
        padding-left: 0;
    }

    .estimate-column {
        position: static;
    }
}

@media (max-width: 680px) {
    .site-nav,
    .site-footer,
    .prediction-shell,
    .content-band {
        width: min(1180px, calc(100% - 20px));
    }

    .site-nav,
    .site-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .site-nav {
        padding: 12px 0;
    }

    .nav-actions {
        width: 100%;
    }

    .nav-link,
    .nav-button {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 10px;
    }

    .brand span:last-child {
        white-space: normal;
    }

    .landing-hero {
        min-height: 70vh;
        padding: 70px 18px 42px;
        background-position: 58% center;
    }

    h1 {
        font-size: clamp(2.4rem, 3.1rem, 3.2rem);
    }

    h2 {
        font-size: clamp(1.8rem, 2.3rem, 2.4rem);
    }

    .hero-text {
        font-size: 1rem;
    }

    .hero-actions {
        width: 100%;
    }

    .primary-action,
    .secondary-action {
        flex: 1 1 160px;
    }

    .content-band {
        padding: 42px 0;
    }

    .prediction-shell {
        padding: 22px 0 48px;
    }

    .breadcrumb {
        margin-bottom: 24px;
    }

    .prediction-intro {
        margin-bottom: 22px;
        padding-bottom: 24px;
    }

    .prediction-intro h1 {
        font-size: clamp(2.15rem, 11vw, 3rem);
    }

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

    .model-facts div {
        padding: 3px 10px;
    }

    .model-facts dt {
        font-size: 0.62rem;
    }

    .model-facts dd {
        font-size: 0.82rem;
    }

    .form-header,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
        padding: 22px 18px;
    }

    .required-note {
        white-space: normal;
    }

    .form-alert {
        margin: 20px 18px 0;
    }

    .form-section {
        padding: 24px 18px;
    }

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

    .result-panel {
        padding: 22px 20px;
    }

    .submit-button {
        width: 100%;
    }
}
