/* ==========================================================================
   Fonts (self-hosted, SIL Open Font License, see assets/fonts/LICENSE-*.txt)
   ========================================================================== */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-variable.woff2") format("woff2");
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/manrope-latin-variable.woff2") format("woff2");
}

/* ==========================================================================
   Design tokens
   Palette values are defined once; components only use the semantic tokens
   below (text, link, surface, tone) so colors can be adjusted centrally.
   ========================================================================== */

:root {
    /* Palette */
    --navy-900: #0d1a3a;
    --navy-800: #14245a;
    --navy-700: #2e4c8e;
    --navy-600: #3d4c70;
    --navy-500: #4a5775;
    --gray-400: #6b7690;
    --gray-200: #d5dbe6;
    --gray-150: #e4e8ef;
    --gray-100: #eef1f6;

    --blue-700: #1846b5;
    --blue-600: #1a56db;
    --blue-200: #cfdff9;
    --blue-100: #e0ebff;
    --blue-50: #f3f7ff;

    --red-500: #e9452b;
    --red-200: #fbd1c5;
    --red-100: #ffe0d6;
    --red-50: #fff6f3;

    --green-600: #12a150;
    --green-200: #c3ead3;
    --green-100: #d6f4e3;
    --green-50: #f0fcf5;

    --purple-600: #6a4fd6;
    --purple-200: #dcd4fb;
    --purple-100: #e8e2ff;
    --purple-50: #f7f5ff;

    --yellow-500: #f4bf00;
    --yellow-400: #fecb16;

    --amber-500: #f6a609;
    --amber-400: #ffbe2e;
    --amber-300: #f7cb6b;
    --amber-100: #fde5b3;
    --amber-50: #fffaf0;

    --slate-600: #3f4d6b;
    --slate-200: #dfe3ec;
    --slate-100: #e8ebf2;
    --slate-50: #f6f7fa;

    /* Semantic colors */
    --color-text: var(--navy-900);
    --color-heading: var(--navy-800);
    --color-text-muted: var(--navy-500);
    --color-text-subtle: var(--gray-400);
    --color-text-accent: var(--navy-700);
    --color-link: var(--blue-600);
    --color-link-hover: var(--blue-700);
    --color-primary: var(--blue-600);
    --color-bg: #fcfdff;
    --color-surface: #ffffff;
    --color-border: var(--gray-150);
    --color-border-strong: var(--gray-200);

    /* Primary call to action and active navigation */
    --color-cta: var(--yellow-400);
    --color-cta-hover: var(--yellow-500);
    --color-cta-text: var(--navy-900);

    /* Legacy aliases used by older components */
    --color-ink: var(--color-text);
    --color-ink-muted: var(--color-text-muted);

    --color-cheap: #1a7d3b;
    --color-cheap-bg: #e3f6e8;
    --color-normal: #3a4552;
    --color-normal-bg: #eef1f4;
    --color-expensive: #b3261e;
    --color-expensive-bg: #fdeaea;
    --color-unknown: #97590a;
    --color-unknown-bg: #fdf3e3;

    /* Chart */
    --chart-line: var(--color-primary);
    --chart-area-start: rgba(26, 86, 219, .16);
    --chart-area-end: rgba(26, 86, 219, .01);
    --chart-grid: var(--gray-100);
    --chart-median: #7d93c4;

    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: "Inter", var(--font-system);
    --font-heading: "Manrope", var(--font-system);
    --font-sans: var(--font-body);
    --font-weight-heading: 800;

    /* Layout */
    --layout-max: 1040px;
    --layout-max-wide: 1360px;
    --layout-gutter: 24px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-pill: 999px;

    --shadow-card: 0 1px 2px rgba(13, 26, 58, .04), 0 4px 14px rgba(13, 26, 58, .03);
    --shadow-popover: 0 4px 14px rgba(13, 26, 58, .12);
    --shadow-elevated: 0 2px 6px rgba(20, 36, 90, .05), 0 22px 48px -18px rgba(20, 36, 90, .22);
}

/* Tones: reusable color sets for tinted cards and icon badges. */
.tone-red {
    --tone-fg: var(--red-500);
    --tone-bg-start: var(--red-50);
    --tone-bg-end: var(--red-100);
    --tone-border: var(--red-200);
    --tone-icon-bg: var(--red-100);
}

.tone-blue {
    --tone-fg: var(--blue-600);
    --tone-bg-start: var(--blue-50);
    --tone-bg-end: #e9f0fd;
    --tone-border: var(--blue-200);
    --tone-icon-bg: var(--blue-100);
}

.tone-green {
    --tone-fg: var(--green-600);
    --tone-bg-start: var(--green-50);
    --tone-bg-end: #e4f7ec;
    --tone-border: var(--green-200);
    --tone-icon-bg: var(--green-100);
}

.tone-purple {
    --tone-fg: var(--purple-600);
    --tone-bg-start: var(--purple-50);
    --tone-bg-end: #efecfd;
    --tone-border: var(--purple-200);
    --tone-icon-bg: var(--purple-100);
}

.tone-amber {
    --tone-fg: var(--amber-500);
    --tone-bg-start: var(--amber-50);
    --tone-bg-end: #fff3d9;
    --tone-border: var(--amber-300);
    --tone-icon-bg: var(--amber-100);
}

.tone-slate {
    --tone-fg: var(--slate-600);
    --tone-bg-start: var(--slate-50);
    --tone-bg-end: var(--slate-100);
    --tone-border: var(--slate-200);
    --tone-icon-bg: var(--slate-100);
}

.tone-neutral {
    --tone-fg: var(--gray-400);
    --tone-bg-start: var(--slate-50);
    --tone-bg-end: var(--gray-100);
    --tone-border: var(--gray-150);
    --tone-icon-bg: var(--gray-100);
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-heading);
    color: var(--color-heading);
}

a {
    color: var(--color-link);
}

a:hover {
    color: var(--color-link-hover);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Explicitly underlined inline link, e.g. calls to action inside text. */
.text-link {
    color: var(--color-link);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.text-link:hover {
    color: var(--color-link-hover);
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.icon {
    display: inline-block;
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: 0 var(--layout-gutter);
}

.container-wide {
    max-width: var(--layout-max-wide);
}

.site-header {
    position: relative;
    z-index: 30;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(20, 36, 90, .04);
}

.site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 16px;
    padding-bottom: 24px;
    font-size: 13px;
    color: var(--color-text-subtle);
}

.site-footer p {
    margin: 0;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.site-footer-nav a,
.site-footer-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--color-text-muted);
    text-decoration: none;
    cursor: pointer;
}

.site-footer-nav a:hover,
.site-footer-button:hover {
    color: var(--color-heading);
    text-decoration: underline;
}

.brand {
    display: flex;
    flex-shrink: 0;
    white-space: nowrap;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: var(--font-weight-heading);
    letter-spacing: -.01em;
    color: var(--color-heading);
    text-decoration: none;
}

.brand:hover {
    color: var(--color-heading);
}

.brand-logo {
    display: block;
    width: 38px;
    height: 38px;
}

/* Centered main navigation; the active item gets a yellow bar that sits
   on the header's bottom edge. */
.site-nav {
    display: flex;
    align-self: stretch;
    gap: 40px;
}

.site-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 16.5px;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
}

.site-nav-link:hover {
    color: var(--color-heading);
}

.site-nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 14px;
    left: 0;
    height: 4px;
    border-radius: var(--radius-pill);
    background: transparent;
    transition: background-color .15s;
}

.site-nav-link:hover::after {
    background: var(--gray-150);
}

.site-nav-link.is-active {
    font-weight: 700;
    color: var(--color-heading);
}

.site-nav-link.is-active::after {
    right: 8%;
    left: 8%;
    background: var(--color-cta);
}

.site-nav-toggle {
    display: none;
}

.page-section {
    padding-top: 36px;
    padding-bottom: 20px;
}

.page-intro {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 8px;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

h1 {
    max-width: 640px;
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
}

.intro {
    max-width: 560px;
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-ink-muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

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

.button.secondary {
    color: var(--color-ink);
    background: var(--color-surface);
    border-color: var(--color-border);
}

.search-card-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 8px;
}

.search-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.search-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.field {
    display: flex;
    flex: 1 1 140px;
    min-width: 120px;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.field-input {
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--color-ink);
    background: var(--color-surface);
}

.search-submit {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 20px;
}

.combobox {
    position: relative;
}

.combobox-list {
    position: absolute;
    z-index: 10;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    max-height: 280px;
    overflow-y: auto;
}

.combobox-list li {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.combobox-list li .main {
    font-size: 14px;
    color: var(--color-ink);
}

.combobox-list li .sub {
    font-size: 12px;
    color: var(--color-ink-muted);
}

.combobox-list li:hover,
.combobox-list li.active {
    background: var(--color-bg);
}

/* Station autocomplete (see assets/js/station-autocomplete.js). */
.autocomplete {
    position: relative;
}

.autocomplete .field-input {
    width: 100%;
    box-sizing: border-box;
    padding-right: 32px;
}

.autocomplete .field-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

.autocomplete-clear {
    position: absolute;
    right: 6px;
    bottom: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    color: var(--color-text-subtle);
    cursor: pointer;
}

.autocomplete-clear:hover {
    background: var(--slate-100);
    color: var(--color-text);
}

.autocomplete-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    width: max(100%, min(400px, calc(100vw - 32px)));
    max-height: 360px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(13, 26, 58, .14);
}

.autocomplete-heading,
.autocomplete-empty {
    padding: 8px 10px 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.autocomplete-empty {
    padding: 12px 10px;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.autocomplete-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.autocomplete-option.is-active {
    background: var(--blue-50);
}

.autocomplete-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--slate-100);
    font-size: 16px;
    color: var(--color-text-muted);
}

.autocomplete-option.is-active .autocomplete-icon {
    background: var(--blue-100);
    color: var(--blue-600);
}

.autocomplete-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.autocomplete-main {
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-sub {
    font-size: 12.5px;
    color: var(--color-text-muted);
}

.autocomplete-list mark {
    background: none;
    color: inherit;
    font-weight: 700;
}

.autocomplete-code {
    flex-shrink: 0;
    padding: 2px 7px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

.popular-stations {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 24px 56px;
}

.section-label {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.chip:hover {
    color: var(--color-text);
    background: var(--color-bg);
    border-color: var(--color-border-strong);
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}

.explanation {
    max-width: 600px;
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-ink-muted);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    text-transform: capitalize;
}

.badge-lg {
    padding: 5px 12px;
    font-size: 14px;
}

.badge-cheap {
    color: var(--color-cheap);
    background: var(--color-cheap-bg);
}

.badge-normal {
    color: var(--color-normal);
    background: var(--color-normal-bg);
}

.badge-expensive {
    color: var(--color-expensive);
    background: var(--color-expensive-bg);
}

.badge-insufficient_data {
    color: var(--color-unknown);
    background: var(--color-unknown-bg);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}

.metric-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px;
}

.metric-card.metric-current {
    border-color: var(--color-ink);
}

.metric-label {
    display: block;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.metric-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.chart-card {
    padding: 20px 20px 14px;
}

.chart-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.chart-currency-switch {
    display: inline-flex;
    flex-shrink: 0;
    padding: 2px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
}

.chart-currency-switch[hidden] {
    display: none;
}

.chart-currency-switch button {
    padding: 4px 12px;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.chart-currency-switch button[aria-pressed="true"] {
    background: var(--blue-100);
    color: var(--color-text);
}

.chart-currency-switch button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.chart-currency-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--color-text-muted);
}

.price-chart {
    display: block;
    width: 100%;
    height: auto;
}

.chart-imputed-dot {
    fill: var(--color-unknown);
    stroke: #fff;
    stroke-width: 1.5;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--color-ink-muted);
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
}

.legend-actual {
    background: var(--color-ink);
}

.legend-imputed {
    background: var(--color-unknown);
}

/* ==========================================================================
   Reusable components
   ========================================================================== */

.card-padded {
    padding: 22px 24px;
}

.card-tinted {
    background: linear-gradient(110deg, var(--tone-bg-start), var(--tone-bg-end));
    border-color: var(--tone-border);
}

.card-title {
    margin: 0;
    font-size: 23px;
    line-height: 1.25;
}

.card-subtitle {
    margin: 2px 0 0;
    font-size: 16px;
    color: var(--color-text-accent);
}

.icon-badge {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 28px;
    color: var(--tone-fg);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .55), transparent 60%), var(--tone-icon-bg);
}

.icon-badge-lg {
    width: 66px;
    height: 66px;
    font-size: 32px;
}

.page-header {
    margin: 0 0 22px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--color-text-muted);
}

.breadcrumbs li + li::before {
    content: "›";
    margin: 0 7px;
    color: var(--color-text-subtle);
}

.breadcrumbs a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.page-title {
    max-width: none;
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.page-subtitle {
    margin: 6px 0 0;
    font-size: 19px;
    font-weight: 500;
    color: var(--color-text-accent);
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14.5px;
    color: var(--navy-600);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* "Zuletzt aktualisiert" below the meta line: deliberately quiet. */
.page-updated {
    margin: 8px 0 0;
    font-size: 12.5px;
    color: var(--color-text-subtle);
}

.meta-item .icon {
    font-size: 17px;
}

.meta-item + .meta-item::before {
    content: "•";
    margin: 0 14px;
    color: var(--color-text-subtle);
}

.field-box {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 10px 16px 9px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    cursor: text;
}

.field-box:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

.field-box-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.field-box-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.field-box-icon {
    font-size: 24px;
    color: var(--color-text);
}

.field-box-input {
    width: 100%;
    min-width: 0;
    padding: 2px 0;
    border: 0;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
    background: transparent;
    outline: none;
}

.field-box-select {
    padding-right: 28px;
    appearance: none;
    cursor: pointer;
}

.field-box-chevron {
    position: absolute;
    right: 0;
    font-size: 20px;
    pointer-events: none;
}

/* Several field boxes sharing one border, separated by a short divider. */
.field-group {
    display: flex;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
}

.field-group:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

.field-group > .field-box {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.field-group > .field-box + .field-box {
    position: relative;
}

.field-group > .field-box + .field-box::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 1px;
    background: var(--color-border-strong);
}

.field-box-time {
    flex: 0 0 150px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    cursor: pointer;
}

.checkbox input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--color-primary);
}

.button-cta {
    gap: 12px;
    padding: 13px 24px;
    border: 0;
    border-radius: 10px;
    font-size: 19px;
    font-weight: 700;
    color: var(--color-cta-text);
    background: var(--color-cta);
    transition: background-color .15s, transform .15s;
}

.button-cta:hover {
    color: var(--color-cta-text);
    background: var(--color-cta-hover);
}

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

/* Busy state while the next page loads: a spinner replaces the trailing icon. */
.button.is-busy {
    cursor: progress;
    pointer-events: none;
}

.button.is-busy > .icon:last-child {
    display: none;
}

.button.is-busy::after {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: button-spin .7s linear infinite;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .button.is-busy::after {
        animation-duration: 2s;
    }
}

.button-cta .icon {
    font-size: 26px;
}

.button-cta .icon:last-child {
    font-size: 22px;
}

/* ==========================================================================
   Price chart (see components/price-chart.php)
   ========================================================================== */

.chart {
    padding: 16px 10px 30px 50px;
}

.chart-plot {
    position: relative;
    height: 226px;
}

.chart-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-grid {
    stroke: var(--chart-grid);
    stroke-width: 1;
}

.chart-area-stop-start {
    stop-color: var(--chart-area-start);
}

.chart-area-stop-end {
    stop-color: var(--chart-area-end);
}

.chart-line {
    fill: none;
    stroke: var(--chart-line);
    stroke-width: 2.5;
    stroke-linejoin: round;
}

.chart-median {
    stroke: var(--chart-median);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.chart-y-label,
.chart-x-label,
.chart-median-label {
    position: absolute;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    color: var(--color-text-muted);
}

.chart-y-label {
    right: calc(100% + 12px);
    transform: translateY(-50%);
}

.chart-x-label {
    top: calc(100% + 10px);
    transform: translateX(-50%);
}

.chart-median-label {
    right: 0;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--color-primary);
}

.chart-marker {
    position: absolute;
    width: 13px;
    height: 13px;
    margin: -6.5px 0 0 -6.5px;
    padding: 0;
    border: 2px solid var(--color-surface);
    border-radius: 50%;
    background: var(--chart-line);
    box-shadow: 0 0 0 1px rgba(26, 86, 219, .35);
    cursor: pointer;
}

/* Larger invisible hit area for touch. */
.chart-marker::before {
    content: "";
    position: absolute;
    inset: -10px;
}

.chart-marker:hover,
.chart-marker:focus-visible {
    box-shadow: 0 0 0 4px rgba(26, 86, 219, .2);
    outline: none;
}

.chart-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    z-index: 2;
    padding: 7px 13px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: var(--shadow-popover);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%);
    transition: opacity .12s ease;
    pointer-events: none;
}

.chart-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: -4px 0 0 -4.5px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    transform: rotate(45deg);
}

.chart-marker-start .chart-tooltip {
    left: -12px;
    transform: none;
}

.chart-marker-start .chart-tooltip::after {
    left: 18px;
}

.chart-marker-end .chart-tooltip {
    right: -12px;
    left: auto;
    transform: none;
}

.chart-marker-end .chart-tooltip::after {
    right: 18px;
    left: auto;
    margin-left: 0;
    margin-right: -4.5px;
}

/* Insufficient data: the chart is faded and a notice sits on top. */
.chart-insufficient {
    position: relative;
}

.chart-insufficient .chart-plot {
    opacity: .35;
}

.chart-plot-empty {
    background: repeating-linear-gradient(
        to bottom,
        var(--chart-grid) 0 1px,
        transparent 1px 25%
    );
    border-bottom: 1px solid var(--chart-grid);
}

.chart-notice {
    position: absolute;
    top: 45%;
    left: 50%;
    z-index: 3;
    margin: 0;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

.chart-marker:hover .chart-tooltip,
.chart-marker:focus .chart-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Public price page (see pages/reference-price.php)
   ========================================================================== */

.price-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Price overview (/mietwagenpreise) and station/route pages. */
.price-overview-page,
.price-route-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.price-overview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px 24px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.price-overview-link {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
}

.price-overview-label {
    font-weight: 600;
    color: var(--color-link);
}

.price-overview-link:hover .price-overview-label {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.price-overview-detail {
    font-size: 13px;
    color: var(--color-text-muted);
}

.price-route-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Price level as a tinted chip in the tone of the classification, the
   same tone-* colors as on the price page. */
.price-route-chip {
    display: inline-block;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    color: var(--tone-fg);
    background: var(--tone-icon-bg);
    font-weight: 600;
    text-decoration: none;
}

a.price-route-chip:hover,
a.price-route-chip:focus-visible {
    text-decoration: underline;
}

/* The table scrolls inside the card; the vehicle class column stays.
   position: relative keeps the absolutely positioned visually-hidden cell
   texts inside the scroll box, otherwise they widen the whole page. */
.price-route-scroll {
    position: relative;
    overflow-x: auto;
}

.price-route-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.price-route-table th,
.price-route-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    white-space: nowrap;
}

.price-route-table thead th {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.price-route-table tbody th {
    position: sticky;
    left: 0;
    background: var(--color-surface);
    font-weight: 600;
}

.price-route-acriss {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-subtle);
}

.price-route-empty {
    color: var(--color-text-subtle);
}

.price-route-back {
    margin: 0;
}

.price-page .card {
    margin-bottom: 0;
}

.price-page .page-header {
    margin-bottom: 0;
}

.price-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 22px;
    overflow: hidden;
    padding: 24px 24px 22px;
}

/* USA skyline in the box's tone: one monochrome mask image, filled with
   the tone color, so it matches every classification. */
.price-hero::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 92%;
    background: var(--tone-fg);
    opacity: .16;
    -webkit-mask: url("../img/price-hero-skyline-mask.webp") right bottom / contain no-repeat;
    mask: url("../img/price-hero-skyline-mask.webp") right bottom / contain no-repeat;
    pointer-events: none;
}

.price-hero > * {
    position: relative;
}

.price-hero-body {
    flex: 1;
    min-width: 0;
}

.price-hero .stat-label {
    margin: 2px 0 6px;
}

.price-hero-label {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: var(--font-weight-heading);
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--tone-fg);
}

.price-hero-value {
    margin: 2px 0 6px;
    font-family: var(--font-heading);
    font-size: 58px;
    font-weight: var(--font-weight-heading);
    line-height: 1.05;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    color: var(--tone-fg);
}

/* No reliable price level: label and icon in gray, so the link stands out. */
.price-hero-insufficient {
    --tone-fg: var(--color-text-subtle);
}

/* No price value below the label here, so the text needs its own gap. */
.price-hero-insufficient .price-hero-label {
    margin-bottom: 6px;
}

.price-hero-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.price-hero-text strong {
    color: var(--color-text);
}

.price-hero-action {
    margin-top: 10px;
}

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

/* Small uppercase label, shared by the stat cards and the hero. */
.stat-label {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: .03em;
    text-transform: uppercase;
    hyphens: auto;
    overflow-wrap: break-word;
}

.stat-card {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 18px 16px;
}

.stat-card .icon-badge {
    align-self: flex-start;
}

/* Label on top, value pinned to the bottom, so values line up across
   cards whether a label takes one or two lines. */
.stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding-top: 4px;
}

.stat-card-body .stat-label {
    margin-bottom: auto;
}

.stat-card-value {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: var(--font-weight-heading);
    line-height: 1.1;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
    color: var(--tone-fg);
}

/* Price check and price watch share one slot: the watch form replaces
   the check form while it is the URL target (#price-watch). */
.price-forms .price-check-watch,
.price-forms:has(.price-check-watch:target) .price-check-check {
    display: none;
}

.price-forms .price-check-watch:target {
    display: flex;
}

.price-check {
    scroll-margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 28px 22px;
    border-width: 1.5px;
}

/* Price watch: light blue card with a neutral border and soft shadow. */
.price-check-watch {
    border-width: 1px;
    box-shadow: 0 2px 6px rgba(20, 36, 90, .04), 0 16px 36px -18px rgba(20, 36, 90, .16);
    
    background: linear-gradient(300deg, var(--tone-bg-end), #ffffff);
    border-color: #c8d6ed;
}

/* Price watch icon: navy eye with a yellow bell on a neutral circle,
   only in this box. */
.price-check-watch .icon-badge {
    --tone-fg: var(--color-heading);
    --tone-icon-bg: var(--slate-100);
    --icon-accent: var(--color-cta);
}

.price-check-watch .icon-badge .icon {
    font-size: 42px;
}

.price-check-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 4px;
}

.price-check-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.25;
}

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

.price-empty-state {
    text-align: left;
}

.price-empty-heading {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.info-list {
    padding-top: 10px;
    padding-bottom: 10px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    padding: 10px 0;
}

.info-item + .info-item {
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.info-item .icon-badge-lg {
    width: 48px;
    height: 48px;
    font-size: 24px;
}

.info-item-title {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.3;
}

.info-item-text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--color-text-muted);
}

.info-item-text + .info-item-text {
    margin-top: 8px;
}

.info-item-text strong {
    color: inherit;
}

.price-insights {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.price-insights li + li {
    margin-top: 6px;
}

.price-insights li::marker {
    color: var(--color-primary);
}

.faq-list {
    min-width: 0;
    padding-bottom: 8px;
}

.faq-entry {
    margin-top: 16px;
    /* Question and answer share the indent; the marker sits in it. */
    padding-left: 18px;
}

.faq-entry + .faq-entry {
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.faq-question {
    position: relative;
    margin: 0 0 6px;
    font-size: 15.5px;
    line-height: 1.35;
}

/* Small bullet marker so the questions read as a list. */
.faq-question::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 0.45em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
}

/* Footer-like block of links to neighbouring price pages, directly on
   the page background. */
.related-pages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 12px;
    /* Aligns with the content of the cards above (border + .card-padded). */
    padding: 0 calc(24px + 1px);
}

.related-pages-heading {
    margin-bottom: 10px;
    font-size: 11.5px;
    color: var(--color-text-muted);
}

/* One entry per line, like an ordered footer list. */
.related-pages-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
    line-height: 1.5;
}

.related-pages-list > li + li {
    margin-top: 3px;
}

.related-pages-link {
    color: var(--blue-700);
    text-decoration: none;
}

.related-pages-link:hover {
    color: var(--blue-700);
    text-decoration: underline;
}

.related-pages-current {
    color: var(--color-text-muted);
    font-weight: 600;
}

.related-pages-code {
    font-size: 12px;
    color: var(--color-text-subtle);
}

/* ==========================================================================
   Trip form behaviour (see assets/js/trip-fields.js)
   ========================================================================== */

.trip-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-check-station .autocomplete-list {
    top: calc(100% - 2px);
}

.field-error {
    margin: 6px 2px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--red-500);
}

.field-error[hidden],
.price-check-dropoff[hidden] {
    display: none;
}

.price-check-dates {
    position: relative;
}

.price-check-dates-error {
    grid-column: 1 / -1;
    margin-top: -10px;
}

.field-box-date,
.field-box-date .field-box-input {
    cursor: pointer;
}

/* Date range picker (see assets/js/date-range-picker.js) */
.date-range-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    padding: 18px 20px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-elevated);
}

.date-range-popover[hidden] {
    display: none;
}

.date-range-nav {
    position: absolute;
    top: 14px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: var(--color-heading);
    cursor: pointer;
}

.date-range-nav:hover:not(:disabled) {
    background: var(--slate-100);
}

.date-range-nav:disabled {
    color: var(--color-border-strong);
    cursor: default;
}

.date-range-prev {
    left: 14px;
}

.date-range-next {
    right: 14px;
}

.date-range-months {
    display: flex;
    gap: 32px;
}

.date-range-month {
    flex: 1;
    min-width: 0;
}

.date-range-month-title {
    margin: 6px 0 12px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    color: var(--color-heading);
}

.date-range-grid {
    display: grid;
    grid-template-columns: repeat(7, 42px);
    row-gap: 4px;
}

.date-range-weekday {
    padding-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: var(--color-text-subtle);
}

/* Range: a continuous light band between start and end, which are dark
   with rounded outer ends. */
.date-range-day {
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
}

.date-range-day:hover:not(:disabled) {
    background: var(--slate-100);
}

.date-range-day.is-in-range:not(:disabled) {
    border-radius: 0;
    background: var(--blue-100);
}

.date-range-day.is-start:not(:disabled),
.date-range-day.is-end:not(:disabled) {
    background: var(--color-heading);
    color: #fff;
    font-weight: 700;
}

.date-range-day.is-start:has(~ .is-in-range, ~ .is-end) {
    border-radius: 999px 0 0 999px;
}

.date-range-day.is-end:not(.is-start) {
    border-radius: 0 999px 999px 0;
}

.date-range-day:disabled {
    color: var(--color-border-strong);
    cursor: default;
}

@media (max-width: 640px) {
    .date-range-popover {
        right: 0;
        padding: 16px 12px 12px;
    }

    .date-range-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .date-range-month-title {
        margin-top: 4px;
    }

    .price-check-dates-error {
        margin-top: 0;
    }
}

/* ==========================================================================
   Price monitoring activation (see pages/price-monitoring-activate.php)
   ========================================================================== */

.activation-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.activation-page .page-header {
    margin-bottom: 0;
}

.activation-form {
    overflow: hidden;
    padding: 0;
    border: 1.5px solid var(--blue-200);
    box-shadow: 0 2px 6px rgba(20, 36, 90, .05), 0 22px 44px -20px rgba(26, 86, 219, .28);
}

/* Optional head row (trip price page): tinted, so the form reads as the
   main action of the page. */
.activation-form-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--blue-200);
    background: linear-gradient(180deg, var(--blue-100), var(--blue-50));
}

.activation-form-head .icon-badge {
    background: var(--color-surface);
    color: var(--color-primary);
}

.activation-form-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
}

.activation-form-intro {
    margin: 4px 0 0;
    font-size: 15px;
    color: var(--color-text-muted);
}

/* Step number in front of each section title. */
.activation-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activation-step {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-primary);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.activation-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 28px;
}

.activation-section + .activation-section {
    border-top: 1px solid var(--color-border);
}

.activation-section-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.activation-section-text {
    margin: -6px 0 0;
    font-size: 15px;
    color: var(--color-text-muted);
}

.trip-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
    font-weight: 600;
}

.trip-summary li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.trip-summary .icon {
    font-size: 20px;
    color: var(--color-heading);
}

/* Button that looks like an inline text link. */
.text-link-button {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.activation-trip {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 6px;
}

.activation-trip[hidden] {
    display: none;
}

.form-errors {
    margin: 0;
    padding: 12px 16px 12px 34px;
    border: 1px solid var(--red-200);
    border-radius: 10px;
    background: var(--red-50);
    font-size: 14.5px;
    color: var(--red-500);
}

/* Vehicle class picker (see assets/js/vehicle-class-picker.js) */
.vehicle-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehicle-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vehicle-picker-selected[hidden] {
    display: none;
}

/* Selected class: light blue with a check mark, clearly "chosen". */
.vehicle-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 8px 12px;
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-pill);
    background: var(--blue-50);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--color-heading);
    cursor: pointer;
}

.vehicle-chip::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    margin-right: 2px;
    border-radius: 50%;
    background: var(--color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.vehicle-chip-code {
    font-size: 12px;
    font-weight: 500;
    opacity: .75;
}

.vehicle-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 2px;
    border-radius: 50%;
    background: var(--blue-100);
    font-size: 15px;
    line-height: 1;
    color: var(--color-primary);
}

.vehicle-chip:hover .vehicle-chip-remove {
    background: var(--blue-200);
}

.vehicle-picker-counter {
    margin-left: 4px;
    font-weight: 500;
    color: var(--color-text-subtle);
}

.vehicle-picker .field-box-input:disabled {
    background: transparent;
    cursor: not-allowed;
}

.vehicle-picker .autocomplete-list {
    top: calc(100% - 2px);
}

.vehicle-picker-popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.vehicle-picker-popular-label {
    margin-right: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.vehicle-picker-popular .chip {
    cursor: pointer;
}

.vehicle-picker-popular .chip.is-selected {
    border-color: var(--color-heading);
    background: var(--blue-50);
    color: var(--color-heading);
}

.vehicle-picker-popular .chip:disabled {
    opacity: .45;
    cursor: not-allowed;
}

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

.activation-contact .field-box-input {
    padding-left: 0;
}

.activation-consent span {
    line-height: 1.5;
}

.activation-consent input {
    align-self: flex-start;
    margin-top: 1px;
}

.activation-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

@media (max-width: 640px) {
    .activation-section {
        padding: 18px 16px;
    }

    .activation-section-title {
        gap: 10px;
        font-size: 18px;
    }

    .activation-step {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .activation-form-head {
        align-items: flex-start;
        gap: 14px;
        padding: 18px 16px;
    }

    .activation-form-head .icon-badge-lg {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .activation-form-title {
        font-size: 19px;
    }

    .activation-form-intro {
        font-size: 14.5px;
    }

    .trip-summary {
        flex-direction: column;
        font-size: 15px;
    }

    .activation-contact {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

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

.error-code {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 64px;
    font-weight: var(--font-weight-heading);
    line-height: 1;
    color: var(--color-cta);
}

/* Status pages: pending, confirmed, error (see pages/price-monitoring-status.php) */
.status-page {
    max-width: 720px;
}

.status-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 32px;
    box-shadow: 0 2px 6px rgba(20, 36, 90, .04), 0 16px 36px -18px rgba(20, 36, 90, .16);
}

.status-title {
    margin: 4px 0 0;
    font-size: 28px;
    line-height: 1.2;
}

.status-text {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.55;
}

.status-hint {
    margin: 0;
    font-size: 14.5px;
    color: var(--color-text-muted);
}

/* Maintenance mode (pages/maintenance*.php) */
.maintenance-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.maintenance-logo {
    width: 64px;
    height: 64px;
}

.maintenance-access {
    width: 100%;
    max-width: 360px;
}

.maintenance-access .field-box {
    width: 100%;
}

/* "Adresse korrigieren" on the pending page */
.status-correct {
    width: 100%;
    max-width: 420px;
    font-size: 14.5px;
    text-align: left;
}

.status-correct summary {
    color: var(--color-link);
    text-decoration: underline;
    cursor: pointer;
}

.status-correct-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.status-correct-form .field-error {
    margin-top: -4px;
}

.status-correct-submit {
    justify-self: start;
}

.status-summary {
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--slate-50);
    font-size: 15px;
}

.status-button {
    margin-top: 8px;
    font-size: 16px;
}

.status-button .icon {
    font-size: 20px;
}

.activation-form-error {
    margin: 24px 28px 0;
    list-style: none;
    padding-left: 16px;
}

@media (max-width: 640px) {
    .status-card {
        padding: 22px 18px;
    }

    .status-title {
        font-size: 23px;
    }

    .activation-form-error {
        margin: 18px 16px 0;
    }
}

/* Price alert management (see pages/price-alert-manage.php) */
.manage-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 860px;
}

.manage-page .page-header {
    margin-bottom: 0;
}

.manage-card {
    padding: 0;
    box-shadow: 0 2px 6px rgba(20, 36, 90, .04), 0 16px 36px -18px rgba(20, 36, 90, .16);
}

.manage-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.manage-status {
    padding: 4px 12px;
    border: 1px solid var(--tone-border);
    border-radius: var(--radius-pill);
    background: var(--tone-icon-bg);
    font-size: 13px;
    font-weight: 700;
    color: var(--tone-fg);
}

.manage-vehicles {
    width: 100%;
    margin-top: 6px;
    border-collapse: collapse;
    font-size: 15px;
}

.manage-vehicles th {
    padding: 8px 10px 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--color-text-muted);
}

.manage-vehicles td {
    padding: 10px 10px 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-variant-numeric: tabular-nums;
    line-height: 24px;
    vertical-align: top;
}

.manage-vehicles td:first-child {
    font-weight: 600;
}

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

.manage-action-form {
    margin: 0;
}

.manage-button {
    height: 46px;
    padding: 0 18px;
    border: 1.5px solid var(--color-heading);
    border-radius: 10px;
    background: var(--color-surface);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-heading);
    cursor: pointer;
}

.manage-button:hover {
    background: var(--slate-50);
}

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

.manage-button-primary:hover {
    background: var(--navy-900);
}

.manage-flash {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid var(--green-200);
    border-radius: 12px;
    background: var(--green-50);
    font-size: 15px;
    font-weight: 600;
}

.manage-flash p {
    margin: 0;
}

.manage-flash-error {
    border-color: var(--red-200);
    background: var(--red-50);
    color: var(--red-500);
}

.manage-flash .manage-button {
    height: 38px;
    font-size: 14px;
}

@media (max-width: 640px) {
    .manage-vehicles {
        font-size: 14px;
    }

    /* One block per vehicle: name, partner links, then the labelled lowest price. */
    .manage-vehicles thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .manage-vehicles tr {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border);
    }

    .manage-vehicles td {
        display: block;
        padding: 0;
        border-bottom: 0;
    }

    .manage-vehicles td + td {
        margin-top: 8px;
    }

    .manage-vehicles-lowest::before {
        content: attr(data-label) ": ";
        color: var(--color-text-muted);
    }

    .manage-actions .manage-action-form,
    .manage-actions .manage-button {
        width: 100%;
    }
}

/* Alert prices and partner notice (components/alert-prices.php, partner-modal.php) */
.status-prices {
    width: 100%;
}

.alert-price-link {
    font-weight: 700;
    color: var(--color-link);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.alert-price-loading {
    display: inline-block;
    width: 72px;
    height: 12px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--slate-100), var(--slate-200), var(--slate-100));
    background-size: 200% 100%;
    animation: alert-price-shimmer 1.2s linear infinite;
    vertical-align: middle;
}

@keyframes alert-price-shimmer {
    to {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .alert-price-loading {
        animation: none;
    }
}

.alert-price-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    white-space: nowrap;
}

/* Price from the latest price drop email. */
.alert-price-link.is-dropped span {
    margin: -2px -6px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #d9f7c4;
}

.alert-price-compare {
    margin-top: 10px;
    font-weight: 600;
}

.alert-price-provider {
    display: block;
    flex: none;
    width: auto;
    height: 24px;
}

.alert-prices-note {
    margin-top: 10px;
}

.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -2px;
    animation: button-spin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation-duration: 2s;
    }
}

.manage-expired {
    margin-top: 14px;
}

.manage-expired-cta {
    margin-top: 12px;
    font-size: 16px;
}

.manage-rebook-tip {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.partner-dialog {
    max-width: 520px;
    text-align: center;
}

.partner-title {
    margin: 0 0 10px;
    font-size: 22px;
}

.partner-text {
    margin: 0 0 12px;
    font-size: 15.5px;
    line-height: 1.55;
}

.partner-text-muted {
    font-size: 14.5px;
    color: var(--color-text-muted);
}

.partner-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.partner-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 18px;
}

.partner-logos img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

/* Alamo in front, USA to GO slightly behind it. */
.partner-logo-stack {
    display: inline-flex;
    isolation: isolate;
}

.partner-logo-stack img {
    border-radius: 50%;
    /* White ring makes the overlap readable. */
    box-shadow: 0 0 0 4px var(--color-surface);
}

.partner-logo-stack img:first-child {
    position: relative;
    z-index: 1;
}

.partner-logo-stack img + img {
    margin-left: -8px;
}

.partner-arrow {
    display: inline-flex;
    font-size: 22px;
    color: var(--color-cta);
}

.partner-arrow .icon + .icon {
    margin-left: -10px;
}

.partner-continue {
    font-size: 16px;
}

.partner-continue .icon {
    font-size: 20px;
}

.partner-cancel {
    padding: 4px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: underline;
    cursor: pointer;
}

/* Search card inside the trip check box on the price pages: the box is
   the card. */
.home-search.home-search-plain {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

.trip-price-page-link {
    margin: 0;
}

/* Lowest, typical and highest price as one line below the chart. */
.trip-price-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 16px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--color-border);
    list-style: none;
    font-size: 15px;
    color: var(--color-text-muted);
}

.trip-price-stats li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.trip-price-stats strong {
    color: var(--color-heading);
}

.trip-price-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--tone-icon-bg);
    font-size: 15px;
    color: var(--tone-fg);
}

/* Search card on the trip price page (components/price-search.php) */
.price-search-section {
    margin-top: 8px;
}

.price-search-heading {
    margin: 0 0 12px;
    font-size: 20px;
}

.home-search-compact {
    padding: 18px 18px 18px;
    box-shadow: 0 2px 6px rgba(20, 36, 90, .04), 0 16px 36px -18px rgba(20, 36, 90, .16);
}

.home-search-compact .home-search-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-search-compact .home-search-submit {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .home-search-compact .home-search-fields {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==========================================================================
   Legal pages and legal text (see pages/legal.php, components/legal-content.php)
   ========================================================================== */

.legal-page {
    max-width: 760px;
    padding-bottom: 48px;
}

.legal-copy h1 {
    max-width: none;
    margin: 0 0 6px;
    font-size: 34px;
}

.legal-copy h2 {
    margin: 30px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.legal-copy p {
    margin: 0 0 12px;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--color-text);
}

.legal-copy ul {
    margin: 0 0 12px;
    padding-left: 22px;
    font-size: 15.5px;
    line-height: 1.65;
}

.legal-copy li + li {
    margin-top: 4px;
}

/* Closing block with the price alert button (components/price-alert-cta.php). */
.price-alert-cta {
    display: flex;
    align-items: center;
    gap: 16px 28px;
    padding: 24px 28px;
    border: 1px solid var(--blue-200);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--blue-100), var(--blue-50));
}

.price-alert-cta-text {
    flex: 1;
    min-width: 0;
}

.price-alert-cta-text p {
    margin: 0;
}

.price-alert-cta-text .price-alert-cta-title {
    margin-bottom: 4px;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: var(--font-weight-heading);
    line-height: 1.35;
    color: var(--color-heading);
}

.price-alert-cta .button-cta {
    flex: none;
    text-decoration: none;
}

@media (max-width: 640px) {
    .price-alert-cta {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 18px;
    }
}

.about-page .price-alert-cta {
    margin-top: 40px;
}

.about-lead {
    font-size: 17px !important;
}

.about-founder {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin: 4px 0 8px;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(20, 36, 90, .04), 0 16px 36px -18px rgba(20, 36, 90, .16);
}

.about-founder-figure {
    flex-shrink: 0;
    width: 180px;
    margin: 0;
    text-align: center;
}

/* Round photo with a yellow ring in the CTA colour. */
.about-founder-image {
    display: block;
    width: 180px;
    height: 180px;
    border: 4px solid var(--color-cta);
    border-radius: 50%;
    box-shadow: 0 8px 24px -10px rgba(20, 36, 90, .35);
    object-fit: cover;
}

.about-founder-figure figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.35;
}

.about-founder-figure figcaption strong {
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--color-heading);
}

.about-founder-figure figcaption span {
    color: var(--color-text-muted);
}

.about-founder-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .about-founder {
        flex-direction: column;
        align-items: center;
        padding: 20px 18px;
    }

    .about-founder-text {
        width: 100%;
    }
}

.legal-copy .legal-note {
    font-size: 14px;
    color: var(--color-text-subtle);
}

/* ==========================================================================
   Modals: cookie consent and legal popup
   ========================================================================== */

/* Set while a modal is open, so the page behind does not scroll. */
.has-modal,
.has-modal body {
    overflow: hidden;
}

.cookie-consent,
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(13, 26, 58, .55);
}

.cookie-consent {
    z-index: 100;
}

/* Above the cookie dialog, which it is opened from. */
.modal {
    z-index: 110;
}

.cookie-consent[hidden],
.cookie-consent [hidden],
.modal[hidden] {
    display: none;
}

.cookie-consent-dialog,
.modal-dialog {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    background: var(--color-surface);
    border-radius: 18px;
    box-shadow: 0 24px 64px -16px rgba(13, 26, 58, .45);
}

.cookie-consent-dialog {
    max-width: 680px;
    max-height: calc(100vh - 32px);
    padding: 28px 28px 20px;
}

.modal-dialog {
    max-width: 780px;
    max-height: min(820px, calc(100vh - 32px));
    padding: 32px 36px;
}

.cookie-consent-dialog:focus,
.modal-dialog:focus {
    outline: none;
}

.modal-close {
    position: sticky;
    top: 0;
    float: right;
    width: 36px;
    height: 36px;
    margin: -12px -16px 0 12px;
    border: 0;
    border-radius: 50%;
    background: var(--slate-100);
    font-size: 22px;
    line-height: 1;
    color: var(--color-heading);
    cursor: pointer;
}

.modal-close:hover {
    background: var(--slate-200);
}

.modal-body .legal-copy h1 {
    font-size: 28px;
}

.cookie-consent-title {
    margin: 0 0 8px;
    font-size: 22px;
}

.cookie-consent-text {
    margin: 0 0 20px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--color-text-muted);
}

.cookie-consent-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 20px;
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.cookie-consent-categories .checkbox {
    align-items: flex-start;
    font-size: 14.5px;
    line-height: 1.45;
}

.cookie-consent-categories .checkbox input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

/* All three choices have the same size on purpose, so rejecting is as
   easy as accepting. */
.cookie-consent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.cookie-consent-button {
    height: 50px;
    padding: 0 10px;
    white-space: nowrap;
    border: 1.5px solid var(--color-heading);
    border-radius: 10px;
    background: var(--color-surface);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-heading);
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

.cookie-consent-button:hover {
    background: var(--slate-50);
}

.cookie-consent-button-primary {
    background: var(--color-heading);
    color: #fff;
}

.cookie-consent-button-primary:hover {
    border-color: var(--navy-900);
    background: var(--navy-900);
}

.cookie-consent-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
    margin: 16px 0 0;
}

.cookie-consent-link {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: underline;
    text-underline-offset: .15em;
    cursor: pointer;
}

.cookie-consent-link:hover {
    color: var(--color-heading);
}

@media (max-width: 640px) {
    .cookie-consent,
    .modal {
        align-items: flex-end;
        padding: 10px;
    }

    .cookie-consent-dialog {
        padding: 22px 18px 16px;
    }

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

    .modal-dialog {
        max-height: calc(100vh - 20px);
        padding: 24px 20px;
    }

    .legal-copy h1 {
        font-size: 26px;
    }
}

/* ==========================================================================
   Home page (see pages/home.php)
   ========================================================================== */

.home-hero {
    position: relative;
    z-index: 1;
    padding: 56px 0 40px;
    background:
        radial-gradient(60% 80% at 92% 0%, rgba(254, 203, 22, .14), transparent 70%),
        radial-gradient(55% 90% at 78% 30%, rgba(26, 86, 219, .09), transparent 70%),
        linear-gradient(180deg, var(--color-surface), #f1f4f9);
}

/* Photo on the right, fading out towards the text (left) and the page
   below. Sources: home-hero-{960,1600,2560}.webp, JPG fallback for
   browsers without image-set() type support. */
.home-hero-media {
    position: absolute;
    /* Ends a little below the top of the search card, so the car stays
       visible above it. */
    inset: 0 0 150px 0;
    background-image: url("../img/home-hero-1600.jpg");
    background-image: image-set(
        url("../img/home-hero-960.webp") type("image/webp"),
        url("../img/home-hero-1600.jpg") type("image/jpeg")
    );
    background-position: right center;
    background-size: cover;
    -webkit-mask-image:
        linear-gradient(90deg, rgba(0, 0, 0, .14) 0%, rgba(0, 0, 0, .2) 40%, #000 75%),
        linear-gradient(180deg, #000 72%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(90deg, rgba(0, 0, 0, .14) 0%, rgba(0, 0, 0, .2) 40%, #000 75%),
        linear-gradient(180deg, #000 72%, transparent 100%);
    mask-composite: intersect;
}

@media (min-width: 641px) {
    .home-hero-media {
        background-image: image-set(
            url("../img/home-hero-1600.webp") type("image/webp"),
            url("../img/home-hero-1600.jpg") type("image/jpeg")
        );
    }
}

@media (min-width: 1600px), (min-width: 1000px) and (min-resolution: 2dppx) {
    .home-hero-media {
        background-image: image-set(
            url("../img/home-hero-2560.webp") type("image/webp"),
            url("../img/home-hero-1600.jpg") type("image/jpeg")
        );
    }
}

.home-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
    align-items: start;
    column-gap: 48px;
}

.home-hero-inner > .home-search {
    grid-column: 1 / -1;
    margin-top: 36px;
}

/* Head row of the search card: heading, short explanation on the right
   (hidden on phones). */
.home-search-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 24px;
    margin-bottom: 18px;
}

.home-search-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
}

.home-search-intro {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Pickup label row; on phones with the "different dropoff" checkbox on
   the right (see the 640px block). */
.home-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-dropoff-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    white-space: nowrap;
    color: var(--color-text-muted);
    cursor: pointer;
}

.home-dropoff-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--color-primary);
}

/* Example price alert in the hero (components/home-example-alert.php). */
.home-example {
    margin: 0;
}

/* Three example cards in one grid cell, crossfading: each is shown for
   7 s of the 21 s cycle and fades into the next. Without animation
   (reduced motion) only the first one shows. */
.home-example-slides {
    display: grid;
}

.home-example-slides > .home-example-card {
    grid-area: 1 / 1;
}

.home-example-slides > .home-example-card:not(:first-child) {
    opacity: 0;
}

@keyframes example-slide {
    0% { opacity: 0; }
    3%, 33.3% { opacity: 1; }
    36.3%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
    .home-example-slides > .home-example-card {
        animation: example-slide 21s linear infinite backwards;
        /* The first card starts already faded in. */
        animation-delay: calc(var(--slide) * 7s - .63s);
    }
}

.home-example-card {
    padding: 18px 20px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-elevated);
}

.home-example-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-example-thumb {
    display: grid;
    flex: none;
    place-items: center;
    width: 72px;
    height: 52px;
    border-radius: 10px;
    background: var(--slate-100);
    font-size: 26px;
    color: var(--color-heading);
}

.home-example-thumb.has-image {
    background: none;
}

.home-example-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-example-trip {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-muted);
}

.home-example-trip strong {
    font-size: 15px;
    color: var(--color-heading);
}

.home-example-badge-short {
    display: none;
}

.home-example-badge {
    align-self: flex-start;
    padding: 4px 10px 4px 22px;
    border-radius: var(--radius-pill);
    background: var(--green-50, #eefaf2) radial-gradient(circle at 11px 50%, #16a34a 3.5px, transparent 4px);
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
    white-space: nowrap;
}

.home-example-plot {
    position: relative;
    height: 130px;
    margin: 22px 0 0 50px;
}

.home-example-plot svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.home-example-grid {
    stroke: var(--color-border);
    stroke-width: 1;
}

.home-example-line,
.home-example-forecast {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2.5;
    stroke-linejoin: round;
}

.home-example-forecast {
    stroke-width: 2;
    stroke-dasharray: 5 5;
}

.home-example-axis {
    position: absolute;
    left: -50px;
    font-size: 11.5px;
    color: var(--color-text-subtle);
    transform: translateY(-50%);
}

.home-example-dot {
    position: absolute;
    width: 9px;
    height: 9px;
    border: 2px solid var(--color-surface);
    border-radius: 50%;
    background: var(--color-primary);
    transform: translate(-50%, -50%);
}

.home-example-dot.is-current {
    width: 15px;
    height: 15px;
    border-width: 3px;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .18);
}

.home-example-tooltip {
    position: absolute;
    display: flex;
    flex-direction: column;
    padding: 8px 14px;
    border: 1px solid #bfe5cc;
    border-radius: 10px;
    background: #eefaf2;
    box-shadow: 0 8px 20px -10px rgba(20, 36, 90, .3);
    font-size: 13px;
    line-height: 1.35;
    color: var(--color-heading);
    white-space: nowrap;
    /* Left of the current (lowest) point (--x/--y), slightly above it. */
    top: var(--y);
    left: var(--x);
    transform: translate(calc(-100% - 16px), -40%);
}

.home-example-tooltip strong {
    font-size: 17px;
}

.home-example-months {
    position: relative;
    height: 18px;
    margin: 8px 0 0 50px;
    font-size: 11.5px;
    color: var(--color-text-subtle);
}

.home-example-months span {
    position: absolute;
    transform: translateX(-50%);
}

.home-example-caption {
    margin: 10px 0 0;
    font-size: 12px;
    text-align: right;
    color: var(--color-text-subtle);
}

/* The three points: plain white boxes on a band that fades from light grey
   (below the hero) to white. */
.home-features-band {
    background: linear-gradient(180deg, #f1f4f9 0%, var(--color-surface) 100%);
}

/* Small icon animations for the three points, staggered: the price line
   draws itself, the bell rings, the arrows turn once. */
@property --line-draw {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

@property --line-dot {
    syntax: "<number>";
    inherits: true;
    initial-value: 1;
}

@keyframes line-draw {
    0% { --line-draw: 1; --line-dot: 0; opacity: 1; }
    35% { --line-draw: 0; --line-dot: 0; }
    42% { --line-dot: 1; }
    88% { opacity: 1; }
    96% { --line-draw: 0; --line-dot: 1; opacity: 0; }
    100% { --line-draw: 1; --line-dot: 0; opacity: 0; }
}

.icon-draw .icon {
    animation: line-draw 5s ease-in-out infinite;
}

@keyframes icon-spin {
    0%, 70% { transform: rotate(0); }
    90%, 100% { transform: rotate(360deg); }
}

.icon-spin .icon {
    animation: icon-spin 5s ease-in-out 2s infinite;
}

@keyframes bell-ring {
    0%, 70%, 100% { transform: rotate(0); }
    73% { transform: rotate(16deg); }
    76% { transform: rotate(-14deg); }
    79% { transform: rotate(10deg); }
    82% { transform: rotate(-7deg); }
    85% { transform: rotate(3deg); }
    88% { transform: rotate(0); }
}

.icon-ring .icon {
    transform-origin: 50% 15%;
    animation: bell-ring 4s ease-in-out 1s infinite;
}

@media (prefers-reduced-motion: reduce) {
    .icon-draw .icon,
    .icon-ring .icon,
    .icon-spin .icon {
        animation: none;
    }
}

.home-feature {
    padding: 24px;
    border-radius: 16px;
    background: var(--color-surface);
}

.home-eyebrow {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.home-title {
    max-width: 15em;
    margin: 0 0 18px;
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.1;
    letter-spacing: -.02em;
    text-wrap: balance;
    /* Manrope stops at 800; a thin stroke in the text color adds weight. */
    -webkit-text-stroke: .018em currentColor;
    paint-order: stroke fill;
}

.home-intro {
    /* Keeps the text off the hero image on tablet widths. */
    max-width: min(34em, 62%);
    text-wrap: pretty;
    margin: 0 0 40px;
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.5;
    color: var(--color-text-muted);
}

.home-search {
    padding: 24px 22px 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-elevated);
}

.home-search-fields {
    display: grid;
    grid-template-columns: 1.3fr 1.1fr 1.25fr 1fr auto;
    align-items: end;
    gap: 14px;
}

.home-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.home-field-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.home-field-control {
    position: relative;
}

.home-field-icon,
.home-field-chevron {
    position: absolute;
    top: 50%;
    font-size: 20px;
    color: var(--color-heading);
    transform: translateY(-50%);
    pointer-events: none;
}

.home-field-icon {
    left: 16px;
}

.home-field-chevron {
    right: 14px;
    font-size: 18px;
}

.home-field-input {
    width: 100%;
    height: 56px;
    box-sizing: border-box;
    padding: 0 36px 0 44px;
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    background: var(--color-surface);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 500;
    color: var(--color-text);
    transition: border-color .15s, box-shadow .15s;
}

.home-field-input::placeholder {
    color: var(--color-text-subtle);
    font-weight: 400;
}

.home-field-input:hover {
    border-color: #c4ccdb;
}

.home-field-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

/* Station inputs only need room on the right while the clear button shows. */
.autocomplete .home-field-input {
    padding-right: 14px;
}

.home-field-control:has(.autocomplete-clear:not([hidden])) .home-field-input {
    padding-right: 36px;
}

.home-field-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.home-field .autocomplete-clear {
    top: 50%;
    right: 10px;
    bottom: auto;
    transform: translateY(-50%);
}

/* Travel period: one readonly field, the calendar opens below it. */
.home-field-dates {
    position: relative;
}

.home-field-range {
    padding-right: 14px;
    cursor: pointer;
}

.home-field-input.is-invalid {
    border-color: var(--red-500);
}

.home-search-submit {
    height: 56px;
    padding: 0 20px;
    font-size: 16.5px;
    white-space: nowrap;
}

.home-search-submit .icon {
    font-size: 20px;
}

/* Short trust points centered below the search card (home page), each
   with a green check mark. */
.home-search-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    grid-column: 1 / -1;
    gap: 4px 20px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.home-search-trust li::before {
    content: "✓";
    margin-right: 6px;
    font-weight: 700;
    color: var(--green-600);
}

.home-popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.home-popular-label {
    margin-right: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.home-popular .chip {
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.home-popular .chip:hover {
    border-color: var(--color-cta);
    background: #fffbea;
}

/* Proof above the three points: heading, then one card with two figures
   (eyebrow, large number, short label) split by a divider. */
.home-proof {
    padding-top: 48px;
    padding-bottom: 64px;
}

.home-proof-heading {
    margin: 0 0 14px;
    font-size: 20px;
}

.home-proof-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
}

.home-proof-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
}

.home-proof-item + .home-proof-item {
    border-left: 1px solid var(--color-border);
}

.home-proof-eyebrow {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.home-proof-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(40px, 4.4vw, 56px);
    font-weight: var(--font-weight-heading);
    line-height: 1.05;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    color: var(--tone-fg);
}

.home-proof-badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--tone-icon-bg);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.home-proof-label {
    margin: 4px 0 0;
    font-size: 15px;
    color: var(--color-text-muted);
}

.home-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding-top: 36px;
}

.home-feature {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.home-feature-title {
    margin: 0 0 6px;
    font-size: 21px;
    line-height: 1.3;
    text-wrap: balance;
}

/* Keeps hyphenated compounds such as "USA-Mietwagen" on one line. */
.home-title-word {
    white-space: nowrap;
}

.home-feature-text {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

/* "Mietwagenpreise nach Ort": plain links to the station overview pages. */
.home-places {
    padding-top: 25px;
    padding-bottom: 64px;
}

.home-places-heading {
    margin: 0 0 14px;
    font-size: 20px;
}

.home-places-all a {
    color: var(--color-link);
    text-decoration: none;
}

.home-places-all a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* Plain list of place links (home page, station/route pages). */
.place-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

/* A single link (e.g. the opposite direction) gets the full width. */
.place-links-single {
    grid-template-columns: 1fr;
}

.place-links a {
    color: var(--color-link);
    text-decoration: none;
}

.place-links a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.price-route-related-heading {
    margin: 0 0 12px;
    font-size: 20px;
}

.home-places-all {
    margin: 16px 0 0;
    font-size: 15px;
    font-weight: 600;
}

/*
 * Three-column layout: titles and texts share grid rows across all columns,
 * so the texts start at the same height even when only some titles wrap.
 */
@media (min-width: 1201px) {
    .home-features {
        grid-template-rows: auto auto;
        row-gap: 0;
    }

    .home-feature {
        display: grid;
        grid-row: span 2;
        grid-template-rows: subgrid;
        grid-template-columns: auto minmax(0, 1fr);
        row-gap: 0;
        column-gap: 24px;
    }

    .home-feature .icon-badge {
        grid-row: 1 / span 2;
    }

    .home-feature-body {
        display: contents;
    }

    .home-feature-title,
    .home-feature-text {
        grid-column: 2;
    }
}

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

    .home-features {
        gap: 16px;
    }


    /* Tablets: the example stays beside the text, smaller and without
       axis labels. */
    .home-hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
        column-gap: 32px;
    }

    .home-intro {
        max-width: none;
    }

    .home-hero-inner > .home-search {
        margin-top: 28px;
    }

    .home-example-card {
        padding: 14px 16px 12px;
    }

    .home-example-thumb {
        width: 60px;
        height: 44px;
    }

    .home-example-axis,
    .home-example-months,
    .home-example-badge-long {
        display: none;
    }

    .home-example-badge-short {
        display: inline;
    }

    .home-example-plot {
        height: 100px;
        margin: 16px 0 0;
    }

    .home-example-caption {
        margin-top: 22px;
    }
}

/* Tablets: the four fields in one row, the button below them. */
@media (max-width: 1080px) {
    .home-search-fields {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .home-search-submit {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .home-search-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .home-hero {
        padding: 32px 0 24px;
    }

    /* Phones: the photo becomes a band above the text, fading out at the
       bottom, with the car in view. */
    .home-hero-media {
        position: relative;
        inset: auto;
        width: auto;
        /* Grows with the width; the lower part fades out behind the
           eyebrow and the start of the headline. */
        height: clamp(240px, 50vw, 340px);
        margin: -32px 0 -52px;
        background-position: 88% 62%;
        -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 92%);
        mask-image: linear-gradient(180deg, #000 45%, transparent 92%);
    }

    /* Above the photo band, which is positioned. */
    .home-hero-text {
        position: relative;
    }

    .home-intro {
        max-width: none;
        margin-bottom: 22px;
    }

    .home-hero-inner > .home-search {
        margin-top: 0;
    }

    /* A small version of the example sits on the photo band (top left,
       beside the car) instead of pushing the search card down. */
    .home-hero-inner {
        position: static;
        grid-template-columns: minmax(0, 1fr);
    }

    .home-example {
        position: absolute;
        top: 12px;
        left: var(--layout-gutter);
        width: 270px;
        margin: 0;
    }

    .home-example-card {
        padding: 12px 14px 10px;
        border: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 10px 24px -12px rgba(20, 36, 90, .45);
    }

    .home-example-head {
        gap: 10px;
    }

    .home-example-thumb {
        width: 50px;
        height: 38px;
    }

    .home-example-trip {
        font-size: 11.5px;
        line-height: 1.35;
    }

    .home-example-trip strong {
        font-size: 13px;
    }

    .home-example-badge-long {
        display: none;
    }

    .home-example-badge-short {
        display: inline;
    }

    .home-example-badge {
        padding: 2px 7px 2px 16px;
        background: var(--green-50, #eefaf2) radial-gradient(circle at 8px 50%, #16a34a 3px, transparent 3.5px);
        font-size: 10.5px;
    }

    .home-example-axis,
    .home-example-months {
        display: none;
    }

    .home-example-plot {
        height: 72px;
        margin: 10px 0 0;
    }

    .home-example-line {
        stroke-width: 2;
    }

    .home-example-forecast {
        stroke-width: 1.5;
        stroke-dasharray: 3 3;
    }

    .home-example-dot {
        width: 7px;
        height: 7px;
        border-width: 1.5px;
    }

    .home-example-dot.is-current {
        width: 11px;
        height: 11px;
        border-width: 2px;
        box-shadow: 0 0 0 3px rgba(22, 163, 74, .18);
    }

    .home-example-tooltip {
        padding: 3px 7px;
        border-radius: 7px;
        font-size: 10px;
        line-height: 1.3;
        /* Below the line, left of the current point. */
        transform: translate(calc(-100% - 9px), -15%);
    }

    .home-example-tooltip strong {
        font-size: 12.5px;
    }

    .home-example-caption {
        margin-top: 16px;
        font-size: 10px;
    }
}

/* Small phones: place, vehicle class and the line only, so the card
   fits the lower photo band. */
@media (max-width: 479px) {
    .home-hero-media {
        height: 185px;
    }

    .home-example {
        width: 214px;
    }

    .home-example-card {
        padding: 10px 12px 18px;
    }

    .home-example-thumb,
    .home-example-badge,
    .home-example-caption {
        display: none;
    }

    /* Vehicle class and dates in one line. */
    .home-example-trip {
        display: block;
        font-size: 10.5px;
        line-height: 1.35;
        white-space: nowrap;
    }

    .home-example-trip strong {
        display: block;
    }

    .home-example-trip span:last-child::before {
        content: " · ";
    }

    .home-example-trip strong {
        overflow: hidden;
        font-size: 13px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .home-example-plot {
        height: 58px;
        margin-top: 8px;
    }
}

/* Narrow tablets: navigation on the right instead of centered. */
@media (max-width: 1080px) {
    .site-header-inner {
        grid-template-columns: auto 1fr;
    }

    .site-nav {
        justify-content: flex-end;
        gap: 28px;
    }
}

/* Phones and small tablets: menu button (site-nav.js). */
@media (max-width: 900px) {
    .site-header-inner {
        grid-template-columns: auto 1fr;
        gap: 16px;
        min-height: 60px;
    }

    .brand {
        font-size: 20px;
    }

    .site-nav {
        justify-content: flex-end;
        gap: 18px;
    }

    .site-nav-link {
        font-size: 14.5px;
    }

    .site-nav-link::after {
        bottom: 11px;
        height: 3px;
    }

    /* With site-nav.js: menu button, the links open as a panel below the header. */
    .has-nav-toggle .site-nav-toggle {
        display: inline-flex;
        justify-self: end;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-right: -10px;
        padding: 0;
        border: 0;
        border-radius: var(--radius-md);
        background: transparent;
        color: var(--color-heading);
        cursor: pointer;
    }

    .has-nav-toggle .site-nav-toggle:focus-visible {
        outline: 2px solid var(--color-primary);
    }

    .has-nav-toggle .site-nav {
        display: none;
    }

    .has-nav-toggle.is-nav-open .site-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 6px var(--layout-gutter) 10px;
        border-bottom: 1px solid var(--color-border);
        background: var(--color-surface);
        box-shadow: 0 8px 16px rgba(20, 36, 90, .08);
    }

    .has-nav-toggle .site-nav-link {
        padding: 12px 0;
        font-size: 16px;
    }

    .has-nav-toggle .site-nav-link + .site-nav-link {
        border-top: 1px solid var(--color-border);
    }

    /* The bar marks the active item on the left instead of below. */
    .has-nav-toggle .site-nav-link::after {
        top: 12px;
        right: auto;
        bottom: 12px;
        left: -12px;
        width: 4px;
        height: auto;
    }

    .has-nav-toggle .site-nav-link.is-active::after {
        right: auto;
        left: -12px;
    }
}

@media (max-width: 640px) {
    .brand-logo {
        width: 44px;
        height: 44px;
    }

    /* Logo only; the name stays for screen readers. */
    .brand-name {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .home-eyebrow {
        display: none;
    }

    /* Without the eyebrow the photo fades out less far into the text, so
       the headline keeps some room below the example. */
    .home-hero-media {
        margin-bottom: -28px;
    }

    .home-title {
        margin-bottom: 12px;
        font-size: 29px;
    }

    .home-intro {
        margin-bottom: 18px;
        font-size: 15.5px;
    }

    .home-search {
        padding: 16px 16px 14px;
        border-radius: 14px;
    }

    .home-search-head {
        margin-bottom: 14px;
    }

    .home-search-title {
        font-size: 19px;
    }

    .home-search-intro {
        display: none;
    }

    .has-dropoff-toggle .home-dropoff-toggle {
        display: flex;
    }

    .has-dropoff-toggle .home-field-dropoff {
        display: none;
    }

    .home-popular {
        display: none;
    }

    .home-search-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .home-field-label {
        font-size: 12.5px;
    }

    .home-field-input,
    .home-search-submit {
        height: 48px;
    }

    .home-feature {
        gap: 16px;
    }

    .home-proof {
        padding-top: 32px;
        padding-bottom: 40px;
    }

    .home-proof-heading {
        font-size: 18px;
    }

    .home-proof-item {
        padding: 18px 16px;
    }

    .home-proof-badge {
        padding: 2px 8px;
        font-size: 13px;
    }

    .home-search-trust {
        gap: 4px 14px;
        margin-top: 12px;
        font-size: 13px;
    }

    /* Phones: two narrow boxes side by side, no room for the icon. */
    .home-proof-item .icon-badge {
        display: none;
    }

    .home-proof-eyebrow {
        font-size: 11.5px;
    }

    .home-proof-value {
        font-size: 34px;
    }

    .home-proof-label {
        font-size: 14px;
    }

    .home-feature .icon-badge-lg {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }

    .home-feature-title {
        font-size: 18px;
    }

    .home-feature-text {
        font-size: 15px;
    }
}

@media (max-width: 860px) {
    .related-pages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    :root {
        --layout-gutter: 16px;
    }

    .page-section {
        padding-top: 24px;
    }

    .page-title {
        font-size: 26px;
    }

    .page-subtitle {
        font-size: 17px;
    }

    /* One item per line: long airport names would otherwise wrap and
       leave a separator dangling at the start of a line. */
    .meta-list {
        flex-direction: column;
    }

    .meta-item + .meta-item::before {
        content: none;
    }

    .price-page {
        gap: 16px;
    }

    .price-hero {
        gap: 16px;
        padding: 18px;
    }

    /* Narrow box: the skyline is larger and cropped on the left; it
       mostly lies behind the text (low opacity), only a small strip stays free. */
    .price-hero {
        padding-bottom: 26px;
    }

    .price-hero::before {
        height: 170px;
        opacity: .16;
        -webkit-mask-size: auto 100%;
        mask-size: auto 100%;
    }

    .price-hero .icon-badge-lg {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }

    .price-hero-value {
        font-size: 44px;
    }

    .stat-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .stat-card {
        align-items: center;
        padding: 14px;
    }

    .stat-card .icon-badge {
        align-self: center;
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .stat-card-body {
        padding-top: 0;
        gap: 2px;
    }

    .stat-card-value {
        font-size: 30px;
    }

    .card-padded {
        padding: 18px 16px;
    }

    .card-title {
        font-size: 20px;
    }

    .card-subtitle {
        font-size: 14.5px;
    }

    .chart {
        padding-left: 44px;
    }

    .chart-plot {
        height: 180px;
    }

    .chart-y-label,
    .chart-x-label {
        font-size: 12px;
    }

    .chart-x-label-secondary {
        display: none;
    }

    .price-check {
        padding: 18px 16px;
    }

    .price-check-header {
        gap: 14px;
    }

    .price-check-watch .icon-badge .icon {
        font-size: 34px;
    }

    .price-check-header .icon-badge-lg {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }

    .price-check-title {
        font-size: 20px;
    }

    .price-check-dates {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .related-pages {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        padding: 0 calc(16px + 1px);
    }

    .related-pages-list {
        columns: 2;
        column-gap: 16px;
    }

    .related-pages-list > li {
        break-inside: avoid;
    }

    /* Breadcrumbs: the current page is the H1 right below, so phones only
       show the path to it. */
    .breadcrumbs li:last-child:not(:nth-child(-n + 2)) {
        display: none;
    }

    .breadcrumbs li {
        white-space: nowrap;
    }

    /* Info list (FAQ, methodology): no icon column, full text width. */
    .info-item .icon-badge-lg {
        display: none;
    }

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

    .field-box-time {
        flex-basis: 112px;
    }

    .button-cta {
        width: 100%;
        gap: 8px;
        padding: 13px 12px;
        font-size: 15px;
    }

    .button-cta .icon {
        font-size: 22px;
    }

    /* Leaves room for longer labels on one line. */
    .button-cta .icon:last-child {
        display: none;
    }

    .button-cta .icon {
        font-size: 22px;
    }

    .button-cta .icon:last-child {
        font-size: 18px;
    }


    .info-item {
        gap: 14px;
    }

    .info-item .icon-badge-lg {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}

.live-search-results {
    max-width: 1080px;
    margin: 24px auto 56px;
    padding: 0 24px;
}

.rate-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.rate-card {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.rate-card-image {
    width: 140px;
    height: 100px;
    object-fit: contain;
    flex: 0 0 auto;
}

.rate-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.rate-card-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.rate-card-name {
    font-size: 15px;
    font-weight: 700;
}

.rate-card-acriss {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-ink-muted);
}

.rate-card-example {
    margin: 0;
    font-size: 13px;
    color: var(--color-ink-muted);
}

.rate-card-properties {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--color-ink-muted);
}

.rate-card-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

.rate-card-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}

.rate-card-price {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rate-card-payment {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    color: var(--color-ink-muted);
    font-size: 12px;
    font-weight: 600;
}

.rate-card-cta {
    margin-top: auto;
    width: 100%;
}

.rate-card-cta[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.rate-card-select-form {
    margin-top: auto;
}

.rate-card-select-form .rate-card-cta {
    margin-top: 0;
}

@media (max-width: 560px) {
    .rate-card {
        flex-direction: column;
    }

    .rate-card-image {
        width: 100%;
        height: 140px;
    }
}

.pbk-selected-summary {
    margin: 0 0 16px;
    font-size: 15px;
    color: var(--color-ink-muted);
}

.pbk-handoff-loading {
    margin: 0;
    font-size: 14px;
    color: var(--color-ink-muted);
}

.pbk-handoff-widget-wrap {
    min-height: 320px;
}

.pbk-hidden {
    display: none !important;
}

.button.tertiary {
    padding: 8px 0;
    color: var(--color-ink-muted);
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rate-card-watch {
    align-self: flex-start;
    margin-top: 4px;
    width: auto;
}

.price-alert-teaser {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.price-alert-teaser-heading {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.price-alert-teaser-body {
    margin: 0;
    color: var(--color-ink-muted);
}

.price-alert-banner {
    border-left: 4px solid var(--color-cheap);
    background: var(--color-cheap-bg);
}

.price-alert-banner p {
    margin: 0;
}

.price-alert-banner-error {
    border-left-color: var(--color-expensive);
    background: var(--color-expensive-bg);
}

.price-alert-status {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 16px;
}

.price-alert-status-heading {
    margin: 0 0 4px;
    font-weight: 700;
}

.price-alert-status p {
    margin: 0;
}

.price-alert-status-success {
    background: var(--color-cheap-bg);
    color: var(--color-cheap);
}

.price-alert-status-error {
    background: var(--color-expensive-bg);
    color: var(--color-expensive);
}

/* Drawer on desktop, bottom sheet on mobile (see the max-width: 640px
   override below) — both are position: fixed overlays, so their place in
   the DOM (inside #live-search-results, see price-alert-drawer.php) has
   no effect on how they're positioned on screen. */
.price-alert-drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.price-alert-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 32, .45);
}

.price-alert-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 92vw;
    background: var(--color-surface);
    box-shadow: -2px 0 12px rgba(16, 24, 32, .12);
    display: flex;
    flex-direction: column;
}

.price-alert-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.price-alert-drawer-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.price-alert-drawer-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--color-ink-muted);
    cursor: pointer;
    padding: 4px 8px;
}

.price-alert-drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.price-alert-drawer-intro {
    margin: 0 0 16px;
    color: var(--color-ink-muted);
    font-size: 14px;
}

.price-alert-hint {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--color-ink-muted);
}

.price-alert-vehicle-list {
    margin: 0 0 16px;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.price-alert-vehicle-group + .price-alert-vehicle-group {
    border-top: 1px solid var(--color-border);
}

.price-alert-vehicle-group-pinned {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.price-alert-group-heading {
    margin: 0;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.price-alert-vehicle-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 14px;
    border-top: 1px solid var(--color-border);
    cursor: pointer;
}

.price-alert-vehicle-group > .price-alert-vehicle-option:first-of-type {
    border-top: 0;
}

.price-alert-vehicle-option input[disabled] + span {
    color: var(--color-ink-muted);
    opacity: .6;
}

.price-alert-submit {
    width: 100%;
    margin-top: 8px;
}

/* Real users never see or fill this — a bot filling any input is the
   only thing that reaches it. */
.price-alert-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 640px) {
    .price-alert-drawer-panel {
        top: auto;
        right: 0;
        left: 0;
        width: 100%;
        max-width: none;
        max-height: 85vh;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }
}
