:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #eef3f8;
    --text: #172033;
    --muted: #667085;
    --line: #dfe5ec;
    --primary: #136f63;
    --primary-dark: #0b4f47;
    --accent: #f4a261;
    --success: #dff7eb;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --shadow: 0 20px 50px rgba(20, 35, 60, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.narrow {
    width: min(820px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent);
    color: #172033;
    font-size: 0.85rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-actions a {
    color: #d7deea;
    text-decoration: none;
    font-size: 0.94rem;
}

.header-actions a:hover {
    color: #fff;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 80% 10%, rgba(244, 162, 97, 0.22), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #123d3a 100%);
    padding: 92px 0 120px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -15% -120px;
    height: 220px;
    background: var(--bg);
    border-radius: 50% 50% 0 0;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 80px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.hero h1,
.section-heading h2,
.panel-heading h2 {
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(2.6rem, 6vw, 5.3rem);
}

.hero p {
    max-width: 690px;
    margin: 24px 0 32px;
    color: #cfdae7;
    font-size: 1.14rem;
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent);
    color: #172033;
    box-shadow: 0 12px 30px rgba(244, 162, 97, 0.22);
}

.button-primary:hover {
    background: #ffb372;
}

.button-secondary {
    background: var(--primary);
    color: #fff;
}

.button-ghost {
    background: var(--surface-soft);
    color: var(--text);
}

.button-full {
    width: 100%;
    min-height: 56px;
    font-size: 1rem;
}

.hero-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.route-line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 30px;
}

.route-dot {
    width: 16px;
    height: 16px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--accent);
}

.route-dot-end {
    background: #7ee0c3;
}

.route-track {
    height: 2px;
    background: repeating-linear-gradient(90deg, #e4edf7 0 12px, transparent 12px 20px);
}

.hero-stat {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat span {
    display: block;
    color: #aebdcd;
    font-size: 0.84rem;
}

.hero-stat strong {
    display: block;
    margin-top: 3px;
    font-size: 1.08rem;
}

.calculator-section {
    position: relative;
    z-index: 2;
    margin-top: -60px;
    padding-bottom: 88px;
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    align-items: start;
    gap: 28px;
}

.panel {
    border: 1px solid rgba(221, 228, 236, 0.92);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.form-panel {
    padding: 34px;
}

.side-panel {
    position: sticky;
    top: 96px;
    padding: 30px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.panel-heading.compact {
    margin-bottom: 22px;
}

.panel-heading h2 {
    font-size: 1.65rem;
}

.panel-heading p {
    margin: 7px 0 0;
    color: var(--muted);
}

.step-number {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.step-number.muted {
    background: var(--surface-soft);
    color: var(--primary-dark);
}

.calculator-form fieldset {
    margin: 0 0 26px;
    padding: 0;
    border: 0;
}

.calculator-form legend {
    width: 100%;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-weight: 900;
    color: var(--primary-dark);
}

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

.field-wide {
    grid-column: 1 / -1;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 0.9rem;
    font-weight: 800;
}

.field small {
    color: var(--muted);
}

.field input,
.field select {
    width: 100%;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: var(--text);
    padding: 0 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(19, 111, 99, 0.12);
}

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

.fuel-box {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fbfcfe;
}

.fuel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fuel-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e6f5f2;
    color: var(--primary-dark);
    font-weight: 900;
}

.fuel-icon-alt {
    background: #fff0e2;
    color: #9c4f19;
}

.optional {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.alert {
    margin-bottom: 24px;
    border-radius: 14px;
    padding: 16px 18px;
}

.alert-error {
    border: 1px solid #ffd3cf;
    background: var(--danger-bg);
    color: var(--danger);
}

.alert ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.empty-state {
    display: grid;
    justify-items: center;
    text-align: center;
    padding: 42px 12px 26px;
}

.empty-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: var(--surface-soft);
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 900;
}

.empty-state h3 {
    margin: 18px 0 4px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.summary-card {
    min-width: 0;
    padding: 13px;
    border-radius: 14px;
    background: var(--surface-soft);
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
}

.summary-card strong {
    display: block;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.result-card {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
}

.result-card.winner {
    border-color: #78c9ad;
    box-shadow: 0 0 0 3px rgba(19, 111, 99, 0.09);
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.result-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.result-card h3 {
    margin: 2px 0 0;
    font-size: 1.9rem;
    letter-spacing: -0.04em;
}

.badge {
    border-radius: 999px;
    padding: 7px 10px;
    background: var(--success);
    color: var(--primary-dark);
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.result-card dl {
    margin: 18px 0 0;
}

.result-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
}

.result-card dt {
    color: var(--muted);
}

.result-card dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.result-card .total-person {
    margin-top: 4px;
    color: var(--primary-dark);
    font-size: 1.03rem;
}

.comparison-note {
    margin-top: 14px;
    border-radius: 14px;
    padding: 14px;
    background: #fff8ef;
    color: #7a431f;
    font-size: 0.9rem;
}

.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.info-section,
.faq-section {
    padding: 88px 0;
}

.info-section {
    background: #fff;
}

.section-heading {
    margin-bottom: 34px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

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

.info-card {
    min-height: 230px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px;
    background: #fff;
}

.info-card > span {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 900;
}

.info-card h3 {
    margin: 28px 0 8px;
    font-size: 1.2rem;
}

.info-card p {
    margin: 0;
    color: var(--muted);
}

.faq-section details {
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
}

.faq-section summary {
    cursor: pointer;
    font-weight: 900;
    font-size: 1.05rem;
}

.faq-section details p {
    margin: 12px 0 0;
    color: var(--muted);
}

.site-footer {
    padding: 38px 0;
    background: #0f172a;
    color: #d7deea;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-content strong {
    color: #fff;
}

.footer-content p {
    margin: 4px 0 0;
    color: #9dacbf;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 50;
    max-width: 340px;
    border-radius: 14px;
    padding: 13px 16px;
    background: #172033;
    color: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .hero-grid,
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        gap: 42px;
    }

    .hero-card {
        max-width: 620px;
    }

    .side-panel {
        position: static;
    }

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

@media (max-width: 680px) {
    .header-actions {
        display: none;
    }

    .hero {
        padding-top: 64px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .form-panel,
    .side-panel {
        padding: 22px;
    }

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

    .field-wide {
        grid-column: auto;
    }

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

@media print {
    .site-header,
    .hero,
    .form-panel,
    .info-section,
    .faq-section,
    .site-footer,
    .result-actions,
    .toast {
        display: none !important;
    }

    body,
    .calculator-section {
        background: #fff;
        margin: 0;
        padding: 0;
    }

    .calculator-layout {
        display: block;
    }

    .side-panel {
        border: 0;
        box-shadow: none;
    }
}
