:root {
    color-scheme: light;
    --ink: #18201c;
    --muted: #607064;
    --line: #d9e1da;
    --paper: #f7f7f2;
    --surface: #ffffff;
    --green: #1d6b56;
    --green-dark: #164d41;
    --blue: #2e6f9f;
    --sun: #d59a32;
    --rose: #b65b5b;
    --shadow: 0 18px 45px rgba(24, 32, 28, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--paper);
    color: var(--ink);
}

body {
    margin: 0;
}

button,
input,
select {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
}

.planner-band {
    padding: 32px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.94), rgba(255,255,255,0.80)),
        repeating-linear-gradient(45deg, #e4ece7 0, #e4ece7 1px, transparent 1px, transparent 18px);
}

.planner-layout {
    width: min(1240px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
    gap: 28px;
    align-items: start;
}

.intro-panel {
    padding: 26px 0;
}

.eyebrow,
.variant-kicker,
.offer-type {
    margin: 0 0 8px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
p {
    margin-top: 0;
}

h1 {
    max-width: 720px;
    margin-bottom: 18px;
    font-size: clamp(2.35rem, 5vw, 4.9rem);
    line-height: 0.96;
    letter-spacing: 0;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    margin-bottom: 6px;
}

h3 {
    font-size: 1.45rem;
    margin-bottom: 0;
}

h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

h5 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.lead {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.6;
}

.route-visual {
    position: relative;
    margin-top: 38px;
    width: min(520px, 100%);
    min-height: 220px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 22% 30%, rgba(46, 111, 159, 0.16), transparent 28%),
        radial-gradient(circle at 72% 67%, rgba(29, 107, 86, 0.16), transparent 26%),
        linear-gradient(135deg, #fff, #edf4f1);
    overflow: hidden;
}

.route-line {
    position: absolute;
    left: 72px;
    right: 72px;
    top: 108px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue), var(--green), var(--sun));
    transform: rotate(-8deg);
}

.route-dot {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--green);
    color: var(--green-dark);
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.route-dot-start {
    left: 28px;
    top: 54px;
}

.route-dot-mid {
    left: calc(50% - 38px);
    top: 78px;
    border-color: var(--sun);
}

.route-dot-end {
    right: 28px;
    bottom: 46px;
    border-color: var(--blue);
}

.planner-form {
    padding: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

label span,
legend {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 750;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd7cf;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
}

input:focus,
select:focus,
button:focus-visible {
    outline: 3px solid rgba(46, 111, 159, 0.3);
    outline-offset: 2px;
}

fieldset {
    margin: 20px 0 0;
    padding: 0;
    border: 0;
}

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

.choice {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfcfa;
}

.choice input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: var(--green);
}

.choice span {
    min-width: 0;
    margin: 0;
    overflow-wrap: normal;
    font-size: 0.88rem;
}

@media (min-width: 1180px) {
    .choice-grid {
        grid-template-columns: repeat(4, minmax(138px, 1fr));
    }
}

.primary-button {
    width: 100%;
    min-height: 52px;
    margin-top: 22px;
    border: 0;
    border-radius: 6px;
    background: var(--green);
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

.primary-button:hover {
    background: var(--green-dark);
}

.form-error {
    padding: 12px;
    border-left: 4px solid var(--rose);
    background: #fff0f0;
    color: #7a2525;
}

.results-band {
    width: min(1240px, calc(100% - 36px));
    margin: 32px auto 56px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 18px;
}

.freshness-note {
    display: grid;
    gap: 6px;
    max-width: 520px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.variant-card,
.offer-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.variant-card {
    padding: 18px;
}

.variant-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 14px;
}

.metric-stack {
    display: grid;
    justify-items: end;
    color: var(--muted);
    white-space: nowrap;
}

.metric-stack strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.reason-list,
.offer-card ul {
    padding-left: 18px;
    color: var(--muted);
}

.timeline {
    display: grid;
    gap: 16px;
}

.stage-item {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.stage-index {
    color: var(--green);
    font-weight: 850;
}

.stage-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.stage-reasons,
.activity-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.stage-reasons span,
.activity-strip span {
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faf8;
    color: var(--muted);
    font-size: 0.82rem;
}

.accommodation-list {
    display: grid;
    gap: 10px;
}

.offer-card {
    padding: 12px;
}

.offer-card p {
    color: var(--muted);
    font-size: 0.88rem;
}

.tradeoff {
    margin-bottom: 0;
    color: #7a5522;
}

@media (max-width: 1050px) {
    .planner-layout,
    .variant-grid {
        grid-template-columns: 1fr;
    }

    .intro-panel {
        padding: 8px 0 0;
    }
}

@media (max-width: 680px) {
    .planner-band {
        padding: 18px;
    }

    .planner-form {
        padding: 16px;
    }

    .form-grid,
    .choice-grid {
        grid-template-columns: 1fr;
    }

    .results-header,
    .variant-header {
        display: grid;
        justify-items: start;
    }

    .metric-stack {
        justify-items: start;
    }

    .stage-item {
        grid-template-columns: 1fr;
    }

    .route-visual {
        min-height: 180px;
    }
}
