:root {
    --red: #ad1916;
    --red-dark: #871310;
    --navy: #0d1f3c;
    --blue: #1a3a6b;
    --ink: #251d1d;
    --muted: #716767;
    --line: #eadede;
    --paper: #fff;
    --soft: #fcf8f8;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font: 15px/1.55 Inter, Arial, sans-serif;
    background: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: auto;
}

.topbar {
    background: var(--red);
    color: #fff;
    font-size: 11px;
    padding: 6px 0;
}

.split {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--line);
    transition: .25s;
}

    .site-header.is-scrolled {
        box-shadow: 0 4px 18px #58101018;
    }

.nav {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand,
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border: 2px solid #f3d4d3;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, var(--red), #fff 65%);
    display: grid;
    place-items: center;
}

    .brand-mark img {
        max-width: 100%;
        height: 100%;
        object-fit: contain;
    }

.brand strong {
    color: var(--red);
    font-size: 17px;
    letter-spacing: .08em;
    line-height: 1;
}

.brand small {
    display: block;
    color: #756b6b;
    font-size: 9px;
    letter-spacing: .13em;
    text-transform: uppercase;
    margin-top: 3px;
}

/* =========================================================
   NAV LINKS + DROPDOWNS (single consolidated block)
   ========================================================= */

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

    .nav-links > a {
        border: 0;
        background: transparent;
        padding: 8px 10px;
        border-radius: 6px;
        font: 600 13px Inter;
        cursor: pointer;
    }

        .nav-links > a:hover {
            color: var(--red);
            background: #fdf2f2;
        }

/* --- dropdown wrapper (top-level) --- */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

    /* invisible bridge so cursor never "exits" between trigger and menu */
    .nav-dropdown::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 10px;
    }

    .nav-dropdown > a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border: 0;
        background: transparent;
        padding: 8px 10px;
        border-radius: 6px;
        font: 600 13px Inter;
        cursor: pointer;
    }

        .nav-dropdown > a:hover {
            color: var(--red);
            background: #fdf2f2;
        }

/* --- nested dropdown wrapper (2nd level flyout) --- */
.nav-dropdown--nested {
    position: relative;
    display: flex;
    align-items: center;
}

    /* invisible bridge for the nested flyout (sits to the right) */
    .nav-dropdown--nested::after {
        content: "";
        position: absolute;
        top: 0;
        left: 100%;
        bottom: 0;
        width: 12px;
    }

    .nav-dropdown--nested > a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border: 0;
        background: transparent;
        padding: 8px 10px;
        border-radius: 6px;
        font: 600 13px Inter;
        cursor: pointer;
        width: 100%;
    }

        .nav-dropdown--nested > a:hover {
            color: var(--red);
            background: #fdf2f2;
        }

/* --- toggle arrow button (touch devices only; hover handles desktop) --- */
.dropdown-toggle {
    border: 0;
    background: transparent;
    padding: 4px;
    margin: 0;
    display: none; /* hidden on desktop � hover already opens the menu */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
}

@media (hover: none) {
    .dropdown-toggle {
        display: inline-flex;
    }
}

.dropdown-toggle:hover,
.dropdown-toggle:focus,
.dropdown-toggle:active {
    background: transparent;
    outline: none;
}

.dropdown-toggle span {
    display: inline-block;
    width: 0;
    height: 0;
    transition: transform .2s ease;
}

/* top-level: small down-pointing triangle */
.nav-dropdown > .dropdown-toggle span {
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid currentColor;
    border-bottom: 0;
    opacity: .6;
}

/* nested: small right-pointing triangle (flyout opens sideways) */
.nav-dropdown.nav-dropdown--nested > .dropdown-toggle span {
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 4px solid currentColor;
    border-right: 0;
}

.nav-dropdown.open > .dropdown-toggle span,
.nav-dropdown--nested.open > .dropdown-toggle span {
    transform: rotate(90deg);
}

/* --- dropdown panel (top-level) --- */
.dropdown-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 200px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 10px 25px #35101020;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.nav-dropdown:hover > .dropdown-menu,
.nav-dropdown:focus-within > .dropdown-menu,
.nav-dropdown.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px;
    border-radius: 5px;
    font-size: 13px;
    text-align: left;
    transition: background .18s ease, color .18s ease, padding-left .18s ease;
}

    .dropdown-menu a:hover {
        background: #fcf2f2;
        color: var(--red);
        padding-left: 11px;
    }

/* --- nested flyout panel --- */
.dropdown-menu--nested {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: -6px;
    left: 100%;
    width: 200px;
    margin-left: 10px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 10px 25px #35101020;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-6px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.nav-dropdown--nested:hover > .dropdown-menu--nested,
.nav-dropdown--nested:focus-within > .dropdown-menu--nested,
.nav-dropdown--nested.open > .dropdown-menu--nested {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

/* =========================================================
   END NAV DROPDOWNS
   ========================================================= */

/* ===== Nav actions / language switch / CTA ===== */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.language {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 5px;
    overflow: hidden;
}

    .language button {
        font-size: 10px;
        padding: 4px 5px;
        border: 0;
        background: #fff;
        cursor: pointer;
    }

        .language button.active {
            background: var(--red);
            color: #fff;
        }

.menu-toggle {
    display: none;
    border: 0;
    background: #fff;
    font-size: 22px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 12px 20px;
    font: 600 14px Inter;
    cursor: pointer;
    transition: .2s;
}

    .button:hover {
        transform: translateY(-1px);
        filter: brightness(.96);
    }

.button-small {
    padding: 8px 12px;
    font-size: 12px;
}

.button-primary {
    background: var(--red);
    color: white;
}

.button-accent {
    background: #d72b25;
    color: white;
}

.button-glass {
    background: #ffffff1c;
    border: 1px solid #ffffff5a;
    color: #fff;
}

/* ===== Hero ===== */

.hero {
    height: min(92vh, 780px);
    min-height: 600px;
    position: relative;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #fff;
}

.hero-image {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, #5b0909aa, #9c1812a3, #4d070750), url('/images/trainkos_hero.png') center/cover;
    animation: heroZoom 8s ease-out both;
}

.hero-overlay {
    position: absolute;
    inset: auto 0 0;
    height: 160px;
    background: linear-gradient(transparent, #fff);
}

@keyframes heroZoom {
    from {
        transform: scale(1.12);
    }

    to {
        transform: scale(1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #fff5;
    border-radius: 20px;
    background: #fff2;
    font-size: 12px;
    backdrop-filter: blur(3px);
}

.hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -.055em;
    margin: 20px 0;
}

.hero p {
    max-width: 560px;
    font-size: 18px;
    color: #fffd;
    line-height: 1.7;
}

.button-row {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 55px;
}

    .hero-stats b {
        display: block;
        font-size: 27px;
    }

    .hero-stats span {
        font-size: 11px;
        color: #fffa;
    }

/* ===== Journey planner ===== */

.planner-wrap {
    margin-top: -64px;
    position: relative;
    z-index: 2;
}

.planner {
    padding: 24px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 40px #56101023;
}

.planner-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
}

    .planner-title > b {
        font-size: 24px;
        color: var(--red);
    }

.planner h2 {
    font-size: 17px;
    margin: 0;
}

.planner p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.planner-form {
    display: grid;
    grid-template-columns: 1fr 32px 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.planner label {
    display: grid;
    gap: 6px;
    color: #6c5e5e;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.planner select,
.planner input,
.form-control {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 11px;
    background: white;
    color: var(--ink);
    font: 14px Inter;
}

/* Searchable station dropdown */
.combo {
    position: relative;
    display: block;
}

.combo-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: 4px;
}

.combo-option {
    padding: 9px 11px;
    border-radius: 5px;
    font: 14px Inter;
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .combo-option:hover,
    .combo-option.active {
        background: var(--red, #b3282d);
        color: #fff;
    }

.combo-empty {
    padding: 9px 11px;
    font: 13px Inter;
    color: #9ca3af;
}

/* Date field: styled dd/mm/yyyy text with the native picker behind it */
.date-field {
    position: relative;
    display: block;
}

    .date-field input[type="text"] {
        cursor: pointer;
        padding-right: 34px;
        background: #fff;
    }

    .date-field .date-ico {
        position: absolute;
        right: 11px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 15px;
        font-style: normal;
        line-height: 1;
        cursor: pointer;
    }

/* Custom calendar popup */
.date-cal {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    width: 264px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 34px rgba(86, 16, 16, .16);
    padding: 10px;
    user-select: none;
}

.date-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.date-cal-title {
    font: 700 14px Inter;
    color: var(--ink);
}

.date-cal-nav {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--red);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

    .date-cal-nav:hover {
        background: #fbeeee;
    }

.date-cal-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

    .date-cal-dow span {
        text-align: center;
        font: 600 10px Inter;
        color: var(--muted);
        text-transform: uppercase;
    }

.date-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.date-cal-day {
    aspect-ratio: 1 / 1;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    font: 500 13px Inter;
    cursor: pointer;
}

    .date-cal-day:hover {
        background: #fbeeee;
    }

    .date-cal-day.is-today {
        box-shadow: inset 0 0 0 1px var(--red);
        color: var(--red);
        font-weight: 700;
    }

    .date-cal-day.is-selected {
        background: var(--red);
        color: #fff;
        font-weight: 700;
    }

    .date-cal-day.is-disabled {
        color: #d3c9c9;
        cursor: not-allowed;
    }

        .date-cal-day.is-disabled:hover {
            background: transparent;
        }

.swap {
    height: 39px;
    border: 1px solid #e7c9c8;
    border-radius: 50%;
    background: #fff;
    color: var(--red);
    cursor: pointer;
    font-size: 17px;
}

.journey-results {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.journey-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 11px 3px;
}

    .journey-result b {
        color: var(--red);
    }

/* ===== Sections ===== */

.section {
    padding: 64px 0;
}

.muted {
    background: var(--soft);
}

h2 {
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 6px;
}

.section-title {
    margin-bottom: 28px;
}

    .section-title p,
    .center p {
        color: var(--muted);
        margin: 4px 0;
    }

    .section-title > a,
    .service-card span {
        color: var(--red);
        font-weight: 700;
        font-size: 13px;
    }

.grid {
    display: grid;
    gap: 18px;
}

.three {
    grid-template-columns: repeat(3, 1fr);
}

.four {
    grid-template-columns: repeat(4, 1fr);
}

.route-card,
.service-card,
.news-card,
.pub-row,
.detail-card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 21px;
    transition: .25s;
}

    .route-card:hover,
    .service-card:hover,
    .news-card:hover {
        border-color: #d99896;
        box-shadow: 0 10px 25px #67101012;
        transform: translateY(-2px);
    }

.route-card {
    position: relative;
}

    .route-card label {
        position: absolute;
        right: 15px;
        top: 15px;
        color: #fff;
        background: #d72b25;
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 9px;
        font-weight: bold;
    }

    .route-card span {
        font-size: 10px;
        color: var(--muted);
        font-weight: bold;
    }

    .route-card h3 {
        margin: 11px 0 0;
        font-size: 16px;
    }

    .route-card i {
        display: block;
        height: 14px;
        width: 1px;
        margin-left: 6px;
        background: #d6c6c6;
    }

    .route-card p {
        font-size: 12px;
        margin: 17px 0 0;
        color: var(--muted);
    }

    .route-card em {
        float: right;
        font-style: normal;
        font-size: 11px;
    }

.center {
    text-align: center;
    margin-bottom: 34px;
}

.service-card > b {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f8e8e8;
    color: var(--red);
    font-size: 20px;
}

.service-card h3 {
    font-size: 15px;
    margin: 15px 0 6px;
}

.service-card p {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 15px;
}

.news-card .news-image {
    height: 135px;
    margin: -21px -21px 16px;
    background: linear-gradient(135deg, #9c1515, #263c63);
    border-radius: 14px 14px 0 0;
}

.news-card small {
    color: var(--red);
    font-weight: bold;
}

.news-card h3 {
    font-size: 16px;
    line-height: 1.35;
    margin: 7px 0;
}

.news-card p {
    color: var(--muted);
    font-size: 13px;
}

.publication-list {
    display: grid;
    gap: 9px;
}

.pub-row {
    border-radius: 8px;
    padding: 14px 17px;
    display: flex;
    align-items: center;
    gap: 13px;
}

    .pub-row b {
        color: var(--red);
        font-size: 21px;
    }

    .pub-row span {
        margin-left: auto;
        color: var(--muted);
        font-size: 12px;
    }

.banner {
    padding: 36px 40px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

    .banner h2 {
        font-size: 26px;
    }

    .banner p {
        color: #fffc;
        margin: 5px 0 0;
    }

.page-hero {
    padding: 66px 0;
    color: #fff;
    background: linear-gradient(135deg, var(--navy), var(--blue));
}

    .page-hero h1 {
        font-size: 42px;
        margin: 0 0 8px;
    }

    .page-hero p {
        max-width: 650px;
        color: #fffc;
        font-size: 17px;
    }

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.detail-card .icon {
    color: var(--red);
    font-size: 25px;
}

.detail-card h3 {
    font-size: 16px;
}

.detail-card p {
    font-size: 13px;
    color: var(--muted);
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

th {
    background: var(--red);
    color: #fff;
    text-align: left;
    padding: 13px 18px;
    font-size: 13px;
}

td {
    padding: 13px 18px;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

tr:nth-child(even) {
    background: #fdf9f9;
}

.filters {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.filter {
    padding: 7px 11px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font: 600 12px Inter;
}

    .filter.active,
    .filter:hover {
        background: var(--red);
        color: #fff;
        border-color: var(--red);
    }

.form-panel {
    max-width: 680px;
    margin: auto;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 7px 20px #4c10100d;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-panel label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.form-panel textarea {
    min-height: 130px;
    resize: vertical;
}

/* ===== Footer ===== */

.site-footer {
    background: var(--red);
    color: #fff;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 54px 0;
}

    .footer-grid h3 {
        font-size: 11px;
        letter-spacing: .12em;
        opacity: .65;
    }

    .footer-grid p,
    .footer-grid a {
        display: block;
        font-size: 13px;
        opacity: .85;
        margin: 9px 0;
    }

.footer-brand .brand-mark {
    border-color: #fff5;
}

.socials {
    display: flex;
    gap: 8px;
}

    .socials a {
        display: grid;
        place-items: center;
        width: 29px;
        height: 29px;
        border-radius: 50%;
        background: #fff2;
        font-size: 12px;
    }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 1px solid #fff3;
    font-size: 11px;
    opacity: .72;
}

.toast {
    position: fixed;
    z-index: 20;
    right: 20px;
    bottom: 20px;
    transform: translateY(100px);
    opacity: 0;
    background: #193d2d;
    color: #fff;
    padding: 12px 17px;
    border-radius: 7px;
    transition: .25s;
}

    .toast.show {
        transform: none;
        opacity: 1;
    }

/* ===== Modern news cards ===== */

.news-card-modern {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--line);
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

    .news-card-modern:hover {
        border-color: var(--red) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .news-card-modern > a {
        display: flex;
        flex-direction: column;
        padding: 1.25rem;
        height: 100%;
        text-decoration: none;
        color: inherit;
    }

.news-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.news-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-purple {
    background: #ede9fe;
    color: #6d28d9;
}

.badge-green {
    background: #dcfce7;
    color: #15803d;
}

.badge-yellow {
    background: #fef9c3;
    color: #a16207;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--muted, #6b7280);
}

.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.news-card-modern:hover .news-card-title {
    color: var(--red) !important;
}

.news-card-excerpt {
    font-size: 0.875rem;
    color: var(--muted, #6b7280);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-footer {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--red) !important;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s, transform 0.3s;
}

.news-card-modern:hover .news-card-footer {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        padding: 12px 16px;
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 8px 15px #0001;
    }

        .nav-links.open {
            display: grid;
        }

        .nav-links > a,
        .nav-dropdown > a {
            display: block;
            width: 100%;
            text-align: left;
        }

    .dropdown-toggle {
        display: inline-flex; /* mobile always needs the tap-to-expand control */
    }

    .dropdown-menu,
    .dropdown-menu--nested {
        position: static;
        width: auto;
        box-shadow: none;
        margin-left: 15px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        display: none; /* toggled open via JS .open class instead of hover */
    }

    .nav-dropdown.open > .dropdown-menu,
    .nav-dropdown--nested.open > .dropdown-menu--nested {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .nav-actions .button {
        display: none;
    }

    .planner-form {
        grid-template-columns: 1fr 32px 1fr;
    }

        .planner-form label:nth-of-type(3) {
            grid-column: 1 / 3;
        }

        .planner-form .button {
            grid-column: 3;
        }

    .four {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .topbar {
        display: none;
    }

    .nav {
        height: 60px;
    }

    .nav-links {
        top: 60px;
    }

    .brand small {
        display: none;
    }

    .hero {
        min-height: 590px;
    }

        .hero h1 {
            font-size: 43px;
        }

    .hero-stats {
        gap: 18px;
    }

        .hero-stats b {
            font-size: 23px;
        }

    .planner-wrap {
        margin-top: -35px;
    }

    .planner-form {
        grid-template-columns: 1fr;
    }

        .planner-form .swap {
            display: none;
        }

        .planner-form label:nth-of-type(3),
        .planner-form .button {
            grid-column: auto;
        }

    .three,
    .four,
    .content-grid,
    .footer-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .split,
    .banner,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .section {
        padding: 45px 0;
    }

    .page-hero {
        padding: 48px 0;
    }

        .page-hero h1 {
            font-size: 35px;
        }

    .planner {
        padding: 18px;
    }

    .journey-result {
        font-size: 12px;
    }

    .footer-bottom {
        gap: 6px;
    }
}
