/* ============================================
   HOME PAGE: horizontal road with five panels
   Order: road and panels, signs, the five panels, road strip, desktop scaling, tablet,
   phone story cards, reduced motion and the trial photo background.
   ============================================ */

:root {
    --bar-h: 90px;
    --page-edge: calc(max(0px, (100% - var(--page-max)) / 2) + var(--page-gutter));
    --exit-w: 264px;
}

@media (min-width: 768px) {
    :root {
        --top-h: 0px;
    }
}

.journey {
    display: flex;
    flex-direction: column;
}

.road {
    display: flex;
    height: calc(100vh - var(--top-h) - var(--bar-h));
    height: calc(100dvh - var(--top-h) - var(--bar-h));
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.road::-webkit-scrollbar,
.panel::-webkit-scrollbar {
    display: none;
}

.road:focus-visible {
    outline-offset: -4px;
}

.panel {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(22px, 4vh, 52px) 0 clamp(18px, 3vh, 28px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scrollbar-width: none;
    background: radial-gradient(900px 520px at 88% 0%, rgba(20, 145, 138, 0.07), transparent 60%), var(--paper);
}

.panel:nth-child(odd):not(.p-start) {
    background-color: var(--sand-50);
    background-image: radial-gradient(900px 520px at 10% 100%, rgba(var(--sand-rgb), 0.12), transparent 60%);
}

.panel-inner {
    width: 100%;
    max-width: var(--page-max);
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
    margin: auto;
}

.km {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--teal-600);
    font: 700 15px/1 var(--head);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel h1,
.panel h2 {
    margin: 0 0 16px;
    color: var(--navy-900);
    font-family: var(--head);
    font-weight: 800;
    letter-spacing: -0.005em;
    line-height: 1.04;
    text-wrap: balance;
}

.panel h1 {
    max-width: 19ch;
    font-size: clamp(28px, min(3.4vw, 5vh), 50px);
}

.panel h2 {
    max-width: 42ch;
    font-size: clamp(30px, min(3.4vw, 6vh), 52px);
}

.panel-lead {
    max-width: 56ch;
    margin: 0 0 clamp(16px, 3vh, 26px);
    color: var(--ink-2);
    font-size: clamp(17px, 1.3vw, 20px);
}

/* ---------- Next-exit sign ---------- */

.exit {
    position: relative;
    flex: none;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: var(--exit-w);
    height: 56px;
    margin-top: 18px;
    margin-right: var(--page-edge);
    text-align: left;
    padding: 8px 14px 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: linear-gradient(180deg, #16968e, var(--teal-600));
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px -12px rgba(10, 27, 46, 0.7);
    transition: box-shadow 0.2s, filter 0.2s;
    font: 600 15px/1.15 var(--head);
    text-decoration: none;
}

.exit small {
    display: block;
    margin-bottom: 3px;
    font: 500 12px/1 var(--body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.88;
}

.exit i {
    font-size: 22px;
    transition: transform 0.28s cubic-bezier(0.3, 0.7, 0.4, 1);
}

.exit:hover,
.exit:focus-visible {
    color: #ffffff;
    filter: brightness(1.06);
}

.exit:hover i,
.exit:focus-visible i {
    transform: translateX(5px);
}

.exit.is-back:hover i,
.exit.is-back:focus-visible i {
    transform: translateX(-5px);
}

.exits {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 0 var(--page-edge);
}

.exits .exit {
    margin: 0;
}

.exit.is-back {
    justify-content: flex-start;
    background: linear-gradient(180deg, #2b5b8c, var(--navy-800));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 24px -12px rgba(10, 27, 46, 0.7);
}

/* ---------- Panel 1: start (navy, map) ---------- */

.panel.p-start {
    --focus: var(--sand-400);
    color: var(--on-dark);
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 44px 44px,
        radial-gradient(55% 70% at 72% 48%, rgba(14, 40, 68, 0.3), transparent 70%),
        linear-gradient(100deg, rgba(44, 92, 140, 0.66) 0%, rgba(70, 122, 172, 0.38) 48%, rgba(96, 146, 192, 0.22) 100%),
        url("../images/home-road.jpg") center 60% / cover no-repeat,
        #24527f;
}

.p-start .ui-btn-on-dark-primary {
    --btn-bg: linear-gradient(180deg, #ecc77a, #d6ac4f);
    --btn-border: #c99c52;
    --btn-color: var(--navy-800);
    --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 16px -8px rgba(154, 107, 37, 0.7);
    --btn-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 22px -10px rgba(154, 107, 37, 0.8);
}

.p-start .ui-btn-on-dark-secondary {
    --btn-bg: rgba(255, 255, 255, 0.12);
    --btn-border: rgba(255, 255, 255, 0.45);
    --btn-color: #ffffff;
    --btn-border-hover: rgba(255, 255, 255, 0.8);
}

.p-start .ui-btn-on-dark-secondary:hover,
.p-start .ui-btn-on-dark-secondary:focus-visible {
    --btn-bg: rgba(255, 255, 255, 0.2);
}

.p-start .km {
    color: var(--sand-400);
}

.p-start h1 {
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(8, 24, 42, 0.55);
}

.p-start h1 mark {
    padding: 0;
    background: none;
    color: var(--teal-300);
}

.p-start .panel-lead {
    color: #f1f6f9;
    text-shadow: 0 1px 10px rgba(8, 24, 42, 0.6);
}

.p-start .panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas: "text map" "facts facts";
    column-gap: clamp(24px, 4vw, 64px);
    row-gap: clamp(14px, 2.6vh, 26px);
    align-items: center;
}

.start-text {
    grid-area: text;
}

.p-start .facts {
    grid-area: facts;
}

.p-start .map-frame {
    grid-area: map;
    position: relative;
    margin: 0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fact {
    padding: 8px 12px;
    border-left: 4px solid var(--sand-400);
    border-radius: 0 6px 6px 0;
    background: rgba(10, 30, 52, 0.9);
    box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.fact strong {
    display: block;
    color: #ffffff;
    font: 700 20px/1.1 var(--head);
}

.fact strong em {
    font-style: normal;
    color: var(--sand-400);
}

.fact span {
    display: block;
    margin-top: 2px;
    color: #d5e2ea;
    font-size: 12.5px;
    line-height: 1.4;
}

.p-start .road-map {
    max-height: calc(100dvh - var(--top-h) - var(--bar-h) - 250px);
    filter: drop-shadow(0 18px 28px rgba(4, 16, 30, 0.55));
}

.p-start .road-map-land {
    fill: rgba(10, 30, 52, 0.62);
    stroke: #9eeee3;
    stroke-width: 2;
}

.p-start .road-map-national path {
    stroke-opacity: 0.5;
}

.p-start .road-map-roads path {
    stroke: #f6cf55;
    stroke-width: 3.6;
}

.p-start figcaption {
    margin-top: 6px;
}

.p-start .map-legend {
    color: #e8f1f4;
    text-shadow: 0 1px 4px rgba(8, 24, 42, 0.7);
}

.p-start .map-credit {
    color: #c9d8e2;
    font-size: 10.5px;
    text-shadow: 0 1px 4px rgba(8, 24, 42, 0.7);
}

/* ---------- Panel 2: tiers ruler ---------- */

.p-how .panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    column-gap: clamp(24px, 4vw, 60px);
    align-items: center;
}

.how-text .panel-lead {
    margin-bottom: 20px;
}

.notes {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.notes li {
    display: flex;
    gap: 12px;
    color: var(--ink-2);
    font-size: 15px;
}

.notes i {
    flex: none;
    margin-top: 1px;
    color: var(--teal-600);
}

.ruler-card {
    padding: clamp(18px, 2.4vw, 28px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 40px -30px rgba(10, 27, 46, 0.45);
}

.ruler {
    position: relative;
    margin: 38px 0 4px;
}

.ruler-bar {
    display: flex;
    height: 54px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(10, 27, 46, 0.08);
}

.ruler-zone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: inline-size;
    min-width: 0;
    font: 800 24px/1 var(--head);
    flex: 1;
    transition: filter 0.3s ease;
}

.ruler-zone > span {
    position: relative;
    font-size: min(1em, 32cqi);
    white-space: nowrap;
}

.ruler-zone.is-none {
    background: repeating-linear-gradient(135deg, #efe9df 0 8px, #f6f1e8 8px 16px);
    color: var(--ink-3);
}

.ruler-zone.is-discount {
    background: linear-gradient(90deg, #cfeee9, #a7e0d8);
    color: var(--teal-600);
}

.ruler-zone.is-top {
    background: linear-gradient(90deg, var(--teal-600), var(--navy-700));
    color: #ffffff;
}

.ruler-zone.is-top::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(10, 27, 46, 0.5));
}

.ruler-zone.is-dim {
    filter: saturate(0.35) opacity(0.6);
}

.ruler-ticks {
    position: relative;
    height: 32px;
    margin-top: 6px;
}

.ruler-ticks span {
    position: absolute;
    top: 0;
    padding-top: 10px;
    transform: translateX(-50%);
    color: var(--ink-3);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


.ruler-ticks span::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 8px;
    background: var(--ink-3);
}

.ruler-ticks span.major {
    color: var(--navy-900);
    font-weight: 600;
}

.ruler-ticks span.major::before {
    top: -2px;
    width: 2px;
    height: 12px;
    background: var(--navy-900);
}


.ruler-ticks span.is-crowded {
    color: transparent;
}

.ruler-ticks span:first-child {
    transform: none;
}

.ruler-ticks span:first-child::before {
    left: 0;
}

.ruler-ticks span:last-child {
    transform: translateX(-100%);
}

.ruler-ticks span:last-child::before {
    left: auto;
    right: 0;
}

.ruler-marker {
    position: absolute;
    top: -36px;
    left: 43.75%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    pointer-events: none;
    transition: left 0.15s ease-out;
}

.ruler-marker b {
    padding: 5px 9px;
    border-radius: 6px;
    background: var(--navy-900);
    color: #ffffff;
    font: 600 13px/1 var(--body);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ruler-marker::after {
    content: "";
    width: 2px;
    height: 64px;
    margin-top: 2px;
    background: var(--navy-900);
}

.ruler-marker.edge-left {
    transform: translateX(-8%);
}

.ruler-marker.edge-right {
    transform: translateX(-92%);
}

.estimator {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 20px;
    align-items: end;
    margin-top: 14px;
}

.estimator label {
    display: block;
    margin-bottom: 6px;
    color: var(--navy-900);
    font-size: 14.5px;
    font-weight: 600;
}

.range {
    width: 100%;
    height: 44px;
    margin: 0;
    accent-color: var(--teal-600);
    cursor: pointer;
}

.km-field {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding-right: 12px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: var(--sand-50);
}

.km-field:focus-within {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.km-field input {
    width: 8.5ch;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--navy-900);
    font: 700 20px/1 var(--head);
    font-variant-numeric: tabular-nums;
}

.km-field input:focus {
    outline: none;
}

.km-field span {
    color: var(--ink-3);
    font-size: 14px;
}

.result {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--sand-100);
}

.result-pct {
    min-width: 3ch;
    color: var(--navy-900);
    font: 800 38px/1 var(--head);
}

.result p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
}

.result strong {
    color: var(--navy-900);
}

.tiers {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.tier {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tier.is-current {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.tier-pct {
    display: block;
    color: var(--navy-900);
    font: 800 28px/1.05 var(--head);
}

.tier-range {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.tier-note {
    display: block;
    color: var(--ink-3);
    font-size: 13px;
}

/* ---------- Panel 3: steps as cards connected by a moving dashed lane ---------- */

.posts {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.posts li {
    position: relative;
    padding: 18px 18px 20px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(27, 58, 92, 0.08), 0 4px 0 rgba(27, 58, 92, 0.08), 0 14px 26px -14px rgba(27, 58, 92, 0.35);
    animation: post-in 0.55s ease both;
}

.posts li:nth-child(2) { animation-delay: 0.12s; }
.posts li:nth-child(3) { animation-delay: 0.24s; }
.posts li:nth-child(4) { animation-delay: 0.36s; }
.posts li:nth-child(5) { animation-delay: 0.48s; }

.posts li:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: calc(18px + 25px - 2px);
    left: calc(18px + 50px + 10px);
    right: -12px;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--sand-400) 0 14px, transparent 14px 24px);
    animation: post-lane 1.2s linear infinite;
}

.posts li:not(:last-child)::before {
    content: "";
    position: absolute;
    z-index: 3;
    top: calc(18px + 25px - 7px);
    right: -22px;
    border: 7px solid transparent;
    border-left: 9px solid var(--sand-400);
    border-right: 0;
}

.post-num {
    position: relative;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 16px;
    isolation: isolate;
    color: #ffffff;
    font: 800 22px/1 var(--head);
}

.post-num::before {
    content: "";
    position: absolute;
    inset: 8px;
    z-index: -1;
    border-radius: 6px;
    background: var(--navy-900);
    box-shadow: 0 0 0 4px var(--sand-50), 0 0 0 6px var(--sand-400), 0 8px 16px -6px rgba(27, 58, 92, 0.55);
    transform: rotate(45deg);
}

.posts h3 {
    margin: 0 0 8px;
    color: var(--navy-900);
    font: 700 21px/1.15 var(--head);
}

.posts p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
}

@keyframes post-lane-v {
    from { background-position: 0 0; }
    to { background-position: 0 18px; }
}

@keyframes post-lane {
    from { background-position: 0 0; }
    to { background-position: 24px 0; }
}

@keyframes post-in {
    from { opacity: 0; transform: translateX(-14px); }
    to { opacity: 1; transform: none; }
}

.steps-note {
    margin: 28px 0 0;
    padding: 16px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #dfeaee;
}

.steps-note ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 28px;
}

.steps-note li {
    color: #dfeaee;
}

.steps-note i {
    color: var(--sand-400);
}

/* ---------- Panel 4: help and legal basis ---------- */

.hl-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: start;
    margin-top: 18px;
}

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

.help-card {
    --focus: var(--sand-400);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border-radius: 8px;
    background: var(--navy-900);
    color: #ffffff;
    text-decoration: none;
}

.help-card:nth-child(2) {
    background: var(--teal-600);
}

.help-card:hover,
.help-card:focus-visible {
    color: #ffffff;
}

.help-card i.ico {
    color: var(--sand-400);
    font-size: 28px;
    line-height: 1;
}

.help-card:nth-child(2) i.ico {
    color: #ffffff;
}

.help-card h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font: 800 26px/1.05 var(--head);
}

.help-card p {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.9);
}

.know-box {
    margin-top: 4px;
    padding: 16px 20px 6px;
    border: 1px solid rgba(var(--sand-rgb), 0.45);
    border-radius: 8px;
    background: var(--sand-50);
}

.know-box h3,
.hl-title {
    margin: 0 0 12px;
    color: var(--teal-600);
    font: 700 14px/1 var(--head);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hl-title {
    margin: 4px 0 10px;
}

.help-notes {
    display: block;
    columns: 2;
    column-gap: 24px;
}

.help-notes li {
    margin-bottom: 10px;
    font-size: 14.5px;
    break-inside: avoid;
}

.legal {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.legal a {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    height: 100%;
    min-height: 44px;
    padding: 12px 40px 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    text-decoration: none;
}

.legal-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--sand-100);
    box-shadow: inset 0 0 0 1px rgba(var(--sand-rgb), 0.55);
    color: var(--sand-600);
    font-size: 18px;
}

.legal-text {
    min-width: 0;
}

.legal strong {
    display: block;
    margin-bottom: 2px;
    color: var(--navy-900);
    font: 700 19px/1.2 var(--head);
}

.legal-text > span:not(.card-link) {
    color: var(--ink-2);
    font-size: 14px;
}

.legal .card-link {
    display: flex;
    width: fit-content;
}

.legal .ext {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--sand-600);
    font-size: 14px;
    font-weight: 600;
}

.finish {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 8px;
    background: radial-gradient(80% 140% at 100% 0%, rgba(20, 145, 138, 0.5), transparent 60%), var(--navy-900);
    color: #ffffff;
}

.finish p {
    flex: 1 1 100%;
    margin: 0;
    font: 700 20px/1.15 var(--head);
}

.finish .ui-btn {
    flex: 1 1 auto;
}

/* ---------- Road strip ---------- */

.roadbar {
    --focus: var(--sand-400);
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 24px);
    height: var(--bar-h);
    padding: 0 var(--page-edge);
    background: linear-gradient(180deg, #1b3c63, #142d4c);
}

.rb-track {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 68px;
}

.rb-road {
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    height: 34px;
    border: 2px solid #ecdfc2;
    border-radius: 6px;
    background: #102640;
}

.rb-lane {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 3px;
    margin-top: -1.5px;
    background: repeating-linear-gradient(90deg, #ffffff 0 18px, transparent 18px 34px);
    opacity: 0.8;
}

.rb-inset {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 26px;
    right: 26px;
}

.rb-done {
    position: absolute;
    top: 6px;
    left: -26px;
    width: 0;
    height: 34px;
    border-radius: 6px;
    background: rgba(var(--sand-rgb), 0.3);
    pointer-events: none;
}

.rb-stations {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rb-stations li {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}

.rb-stations li:nth-child(1) { left: 0; }
.rb-stations li:nth-child(2) { left: 25%; }
.rb-stations li:nth-child(3) { left: 50%; }
.rb-stations li:nth-child(4) { left: 75%; }

.rb-stations li:last-child {
    left: 100%;
    transform: translateX(calc(-100% + 10px));
}

.rb-stations a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 44px;
    padding-top: 13px;
    color: var(--on-dark-2);
    font: 600 13px/1 var(--head);
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.rb-stations li:last-child a {
    align-items: flex-end;
}

.rb-dot {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    background: var(--teal-500);
}

.rb-label {
    margin-top: 12px;
}

.rb-stations a:hover,
.rb-stations a[aria-current="step"] {
    color: #ffffff;
}

.rb-stations a[aria-current="step"] .rb-label {
    color: var(--sand-400);
}

.rb-stations a[aria-current="step"] .rb-dot {
    background: var(--sand-400);
}

.rb-vehicle {
    position: absolute;
    top: 6px;
    left: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    height: 34px;
    transform: translateX(-50%);
    pointer-events: none;
}

.rb-vehicle span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 28px;
    border-radius: 6px;
    background: var(--sand-400);
    color: var(--on-gold);
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.rb-vehicle.is-back span {
    transform: scaleX(-1);
}

.mbar,
.mprogress {
    display: none;
}

/* ---------- Desktop: panels scale with the visible height ---------- */

@media (min-width: 1100px) {
    .p-start .road-map {
        max-height: calc(100dvh - var(--head-h) - var(--bar-h) - clamp(260px, 30dvh, 300px));
        margin-left: auto;
    }

    .p-start figcaption {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 18px;
    }

    .p-start figcaption .map-credit,
    .p-start figcaption .map-legend {
        margin: 0;
    }

    .p-start .map-credit {
        white-space: nowrap;
    }

    .panel {
        padding: calc(var(--head-h) + clamp(10px, 2dvh, 28px)) 0 clamp(12px, 2.4dvh, 28px);
    }

    .km {
        margin-bottom: clamp(8px, 1.6dvh, 16px);
        font-size: clamp(13px, 1.7dvh, 15px);
    }

    .panel h1,
    .panel h2 {
        margin-bottom: clamp(8px, 1.6dvh, 16px);
    }

    .panel h1 {
        font-size: clamp(26px, min(3.4vw, 5dvh), 50px);
    }

    .panel h2 {
        font-size: clamp(26px, min(3.4vw, 5.2dvh), 52px);
    }

    .panel-lead {
        margin-bottom: clamp(10px, 2.4dvh, 26px);
        font-size: clamp(15px, min(1.3vw, 2.3dvh), 20px);
    }

    .exit {
        height: clamp(44px, 6dvh, 56px);
        margin-top: clamp(8px, 1.6dvh, 18px);
    }

    .exits {
        margin-top: clamp(8px, 1.6dvh, 18px);
    }

    .p-start .panel-inner {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        row-gap: clamp(8px, 1.8dvh, 22px);
    }

    .p-start .ui-btn-lg {
        min-height: clamp(46px, 6.2dvh, 56px);
    }

    .fact {
        padding: clamp(5px, 0.9dvh, 8px) 12px;
    }

    .fact strong {
        font-size: clamp(16px, 2.3dvh, 20px);
    }

    .fact span {
        font-size: clamp(11.5px, 1.5dvh, 12.5px);
    }

    .notes {
        gap: clamp(6px, 1.4dvh, 12px);
    }

    .notes li {
        font-size: clamp(14px, 1.8dvh, 15px);
    }

    .ruler-card {
        padding: clamp(14px, 2.6dvh, 28px);
    }

    .ruler {
        --ruler-h: clamp(40px, 6dvh, 54px);
        margin-top: clamp(32px, 4.4dvh, 38px);
    }

    .ruler-bar {
        height: var(--ruler-h);
    }

    .ruler-zone {
        font-size: clamp(19px, 2.8dvh, 24px);
    }

    .ruler-marker::after {
        height: calc(var(--ruler-h) + 10px);
    }

    .ruler-ticks {
        height: clamp(26px, 3.6dvh, 32px);
    }

    .estimator {
        margin-top: clamp(6px, 1.4dvh, 14px);
    }

    .range {
        height: clamp(34px, 4.8dvh, 44px);
    }

    .km-field {
        min-height: clamp(42px, 5.4dvh, 48px);
    }

    .result {
        margin-top: clamp(8px, 1.4dvh, 14px);
        padding: clamp(6px, 1.2dvh, 12px) 16px;
    }

    .result-pct {
        font-size: clamp(26px, 4.2dvh, 38px);
    }

    .tiers {
        margin-top: clamp(8px, 1.4dvh, 14px);
    }

    .tier {
        padding: clamp(6px, 1.2dvh, 12px) 14px;
    }

    .tier-pct {
        font-size: clamp(20px, 3.1dvh, 28px);
    }

    .posts {
        --post-pad: clamp(10px, 2dvh, 18px);
        --post-num: clamp(40px, 5.6dvh, 50px);
        margin-top: clamp(12px, 3dvh, 30px);
    }

    .posts li {
        padding: var(--post-pad) 18px calc(var(--post-pad) + 2px);
    }

    .posts li:not(:last-child)::after {
        top: calc(var(--post-pad) + var(--post-num) / 2 - 2px);
        left: calc(18px + var(--post-num) + 10px);
    }

    .posts li:not(:last-child)::before {
        top: calc(var(--post-pad) + var(--post-num) / 2 - 7px);
    }

    .post-num {
        width: var(--post-num);
        height: var(--post-num);
        margin-bottom: clamp(6px, 1.6dvh, 16px);
        font-size: clamp(18px, 2.6dvh, 22px);
    }

    .posts h3 {
        margin-bottom: clamp(4px, 1dvh, 8px);
        font-size: clamp(17px, 2.6dvh, 21px);
    }

    .posts p {
        font-size: clamp(12.5px, 1.9dvh, 15px);
        line-height: 1.45;
    }

    .steps-note {
        margin-top: clamp(10px, 2.4dvh, 28px);
        padding: clamp(8px, 1.6dvh, 16px) 20px;
    }

    .hl-grid {
        margin-top: clamp(8px, 1.6dvh, 18px);
    }

    .help-grid {
        margin-bottom: clamp(8px, 1.8dvh, 18px);
    }

    .help-card {
        padding: clamp(12px, 2dvh, 20px);
    }

    .help-card h3 {
        margin-bottom: clamp(4px, 0.8dvh, 8px);
        font-size: clamp(21px, 3.2dvh, 26px);
    }

    .help-card p {
        margin-bottom: clamp(4px, 1dvh, 12px);
    }

    .know-box {
        padding: clamp(10px, 1.6dvh, 16px) 20px clamp(2px, 0.6dvh, 6px);
    }

    .help-notes li {
        margin-bottom: clamp(4px, 1dvh, 10px);
    }

    .legal a {
        padding: clamp(6px, 1.1dvh, 12px) 40px clamp(6px, 1.1dvh, 12px) 14px;
    }

    .finish {
        padding: clamp(10px, 1.8dvh, 16px) 18px;
        gap: clamp(6px, 1dvh, 10px);
    }

    .finish p {
        font-size: clamp(17px, 2.6dvh, 20px);
    }

    .finish .ui-btn {
        min-height: clamp(42px, 5.6dvh, 48px);
    }

    .card-go {
        min-height: clamp(26px, 3.8dvh, 34px);
        font-size: clamp(13.5px, 1.9dvh, 14.5px);
    }

    .legal .card-link {
        margin-top: clamp(1px, 0.5dvh, 6px);
    }

    .legal-text > span:not(.card-link) {
        font-size: clamp(13px, 1.8dvh, 14px);
        line-height: 1.4;
    }

    .legal {
        gap: clamp(6px, 1dvh, 10px);
    }

    .legal strong {
        font-size: clamp(17px, 2.5dvh, 19px);
    }
}

@media (max-width: 1099.98px) {
    .hl-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Tablet ---------- */

@media (min-width: 768px) and (max-width: 1099.98px) {
    .panel {
        padding-top: calc(var(--head-h) + 22px);
        justify-content: flex-start;
    }

    .p-start .panel-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "text" "facts" "map";
    }

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

    .p-start .road-map {
        max-height: 46vh;
        margin: 0 auto;
    }

    .p-how .panel-inner {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 18px;
    }

    .posts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 30px;
    }

    .posts li:nth-child(3)::after,
    .posts li:nth-child(3)::before {
        display: none;
    }

    .steps-note ul {
        grid-template-columns: minmax(0, 1fr);
    }

    .help-notes {
        columns: 1;
    }
}

@media (min-width: 768px) and (max-height: 760px) {
    .panel {
        justify-content: flex-start;
    }
}

/* ---------- Phone: vertical story cards ---------- */

@media (max-width: 767.98px) {
    .road {
        position: relative;
        display: block;
        height: auto;
        overflow: visible;
        padding: 0 12px 12px;
        scroll-snap-type: none;
        background: var(--sand-50);
    }

    .panel {
        display: block;
        overflow: visible;
        margin: 0 0 16px;
        padding: 24px 20px 22px;
        border: 1px solid var(--line);
        border-radius: 8px;
        scroll-margin-top: calc(var(--head-h) + 8px);
    }

    .panel:not(.p-start),
    .panel:nth-child(odd):not(.p-start) {
        background: #ffffff;
    }

    .panel.p-start {
        min-height: calc(100svh - var(--top-h));
        margin: 0 -12px 16px;
        padding: 28px 16px 24px;
        border: 0;
        border-radius: 0;
        background:
            linear-gradient(180deg, rgba(60, 100, 145, 0.55) 0%, rgba(30, 68, 108, 0.78) 55%, rgba(15, 42, 70, 0.92) 100%),
            url("../images/home-road.jpg") 62% 60% / cover no-repeat,
            #24527f;
    }

    .panel h1 {
        font-size: 28px;
    }

    .panel h2 {
        font-size: 31px;
    }

    .p-start .panel-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "text" "facts" "map";
        gap: 20px;
    }

    .actions .ui-btn {
        flex: 1 1 100%;
    }

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

    .fact {
        padding: 8px 10px;
    }

    .fact strong {
        font-size: 18px;
    }

    .p-start .road-map {
        max-height: none;
    }

    .p-how .panel-inner {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 18px;
    }

    .ruler-card {
        padding: 16px;
    }

    .ruler-zone {
        font-size: 18px;
    }

    .ruler-ticks span:not(.major):not(:first-child):not(:last-child) {
        display: none;
    }

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

    .result-pct {
        font-size: 32px;
    }

    .tiers {
        grid-auto-flow: row;
        gap: 8px;
    }

    .tier {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 10px;
        align-items: center;
        padding: 10px 12px;
    }

    .tier-pct {
        grid-row: 1 / span 2;
        font-size: 26px;
    }

    .posts {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        margin-top: 18px;
    }

    .posts li {
        display: grid;
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .posts li:nth-child(n)::after {
        display: block;
        top: calc(14px + 50px + 6px);
        bottom: calc(-22px - 14px + 4px);
        left: calc(14px + 25px - 2px);
        right: auto;
        width: 4px;
        height: auto;
        background: repeating-linear-gradient(180deg, var(--sand-400) 0 10px, transparent 10px 18px);
        animation-name: post-lane-v;
    }

    .posts li:nth-child(n)::before {
        display: none;
    }

    .posts li:last-child::after {
        display: none;
    }

    .post-num {
        margin: 0;
    }

    .post-num::before {
        box-shadow: 0 0 0 4px #ffffff, 0 0 0 6px var(--sand-400), 0 8px 16px -6px rgba(27, 58, 92, 0.55);
    }

    .posts h3 {
        font-size: 20px;
    }

    .steps-note {
        margin-top: 12px;
    }

    .steps-note ul {
        grid-template-columns: minmax(0, 1fr);
    }

    .help-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin: 18px 0;
    }

    .help-card {
        padding: 18px;
    }

    .help-notes {
        columns: 1;
    }

    .finish .ui-btn {
        flex: 1 1 100%;
    }

    .exit {
        position: static;
        align-self: stretch;
        width: 100%;
        margin-top: 20px;
        margin-right: 0;
    }

    .panel-inner {
        padding-left: 0;
        padding-right: 0;
    }

    .exit.is-back {
        display: none;
    }

    .exits {
        padding: 0;
    }

    .roadbar {
        display: none;
    }

    .mprogress {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        display: block;
        width: 100%;
        height: 4px;
        background: transparent;
        pointer-events: none;
    }

    .mprogress span {
        display: block;
        width: 100%;
        height: 100%;
        background: var(--teal-500);
        transform: scaleX(0);
        transform-origin: 0 50%;
    }

    .mbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: flex;
        gap: 10px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: rgba(255, 253, 249, 0.97);
        box-shadow: 0 -10px 24px -18px rgba(10, 27, 46, 0.5);
        transition: transform 0.25s ease, visibility 0.25s;
    }

    .mbar .ui-btn {
        flex: 1;
        min-height: 52px;
        padding: 0 10px;
        white-space: nowrap;
    }

    .mbar .ui-btn-primary {
        flex: 1.4;
    }

    .mbar .ui-btn-secondary {
        --btn-border: var(--navy-900);
        --btn-shadow: 0 6px 16px -8px rgba(4, 16, 30, 0.6);
        --btn-border-hover: var(--sand-400);
        --btn-color-hover: var(--navy-900);
        --btn-shadow-hover: 0 10px 22px -10px rgba(4, 16, 30, 0.7);
    }

    .mbar.is-hidden {
        visibility: hidden;
        transform: translateY(110%);
    }

    body:has(.mbar),
    body:has(.mbar):has(.env-notice) {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .env-notice {
        bottom: calc(84px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 380px) {
    .panel {
        padding: 20px 16px;
    }

    .fact strong {
        font-size: 16px;
    }

    .fact span {
        font-size: 12px;
    }
}

@media (max-width: 399.98px) {
    .mbar .ui-btn {
        gap: 6px;
        padding: 0 8px;
        font-size: 15px;
    }

    .mbar .ui-btn i,
    .mbar .ui-btn::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .road {
        scroll-behavior: auto;
    }
}

/* ---------- Site-wide road photo background (trial): light panels let the road show through ---------- */

.panel:not(.p-start),
.panel:nth-child(odd):not(.p-start) {
    background: rgba(251, 247, 240, 0.1);
}

.panel:not(.p-start) .km,
.panel:not(.p-start) h2,
.panel:not(.p-start) .panel-lead,
.how-text .notes li,
.panel:not(.p-start) .hl-title,
.panel:not(.p-start) .know-box h3 {
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.95), 0 0 14px rgba(255, 255, 255, 0.85);
}

.panel:not(.p-start) h2 {
    color: var(--navy-800);
}

.panel:not(.p-start) .km,
.panel:not(.p-start) .hl-title {
    color: #0b5a54;
}

.panel:not(.p-start) .panel-lead,
.how-text .notes li {
    color: var(--ink);
}

@media (max-width: 767.98px) {
    .road {
        background: transparent;
    }

    .panel:not(.p-start),
    .panel:nth-child(odd):not(.p-start) {
        background: rgba(255, 255, 255, 0.95);
    }
}

