/* Public interface: shared spacing, readable type and responsive form controls. */
:root {
    --cmt-ink: #f3f6fc;
    --cmt-muted: #bac9df;
    --cmt-border: #304562;
    --cmt-surface: #10284a;
    --page-pad-x: 28px;
    --text-muted: #bac9df;
    --text-dim: #a9bad3;
}
body {
    background: #071c3d;
    color: var(--cmt-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
.site-layout, .site-content, .nav-sidebar, .nav-sidebar *, .nav-topbar,
.nav-mobile-tabs, .nav-mobile-tabs *, .dr-page *, .public-page *, .user-wrap *, .gate-main * {
    box-sizing: border-box;
}
button, input, select, textarea { font-family: inherit; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid #9acaff;
    outline-offset: 3px;
}
.site-content { min-width: 0; }
.nav-sidebar { background: #06162f; }
.nav-sidebar-inner { padding: 24px 20px; }
.nav-section-btn { min-height: 48px; padding: 14px 10px; gap: 12px; border-radius: 10px; }
.nav-section-btn.open, .nav-section-btn:hover { background: #132f50; }
.nav-section-label { font-size: 14px; line-height: 1.5; }
.nav-section-icon { display: inline-flex; align-items: center; justify-content: center; }
.nav-section-icon svg, .nav-mobile-tab-icon svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-info-links a { font-size: 14px; padding: 10px 12px; line-height: 1.5; }
.nav-account { gap: 10px; padding-top: 20px; }
.nav-account-btn { min-height: 44px; padding: 11px 14px; font-size: 14px; border-radius: 10px; }
.nav-clock { font-variant-numeric: tabular-nums; color: #a9bad3; }
.nav-topbar { box-sizing: border-box; }
.nav-mobile-tab-label { font-size: 12px; line-height: 1.4; }
.nav-mobile-tab-icon { display: inline-flex; align-items: center; justify-content: center; }
.site-footer { padding: 28px; gap: 12px; margin-top: 16px; }
.site-footer-links { font-size: 13px; gap: 8px 16px; }
.site-footer-links a { color: #bdcce0; padding-block: 4px; }
.site-footer-sep { display: none; }
.site-footer-copy, .site-footer-accuracy { color: #a3b6d2; font-size: 12px; line-height: 1.65; max-width: 85ch; }
.site-footer-copy a, .site-footer-accuracy a { color: #c3d4ed; }

/* Shared page rhythm. */
.dr-page, .public-page, .gate-main {
    box-sizing: border-box;
    width: 100%;
    max-width: 1080px;
    padding: 40px 28px;
    margin: 0 auto;
}
.public-page { max-width: 880px; }
.public-page.about-page { max-width: 1080px; }
.public-page--narrow { max-width: 820px; }
.dr-hero, .public-page-hero, .gate-hero {
    padding: 28px 32px;
    border-radius: 18px;
    border: 1px solid var(--cmt-border);
    background: linear-gradient(120deg, #122e52, #102544);
    box-shadow: none;
    margin-bottom: 24px;
    gap: 10px;
}
.dr-title, .public-page h1, .gate-title {
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.22;
    letter-spacing: -.025em;
    font-weight: 700;
    margin: 0;
}
.dr-subtitle, .public-page-sub, .public-page-hero .public-page-sub, .gate-sub {
    font-size: 16px;
    line-height: 1.6;
    color: var(--cmt-muted);
    max-width: 66ch;
    margin: 0;
}
.public-page > h1 { margin-bottom: 12px; }
.public-page > .public-page-sub { margin-bottom: 28px; }
.dr-kicker, .public-page-kicker, .gate-kicker {
    font-size: 13px; line-height: 1.4; color: #bbd6fa; font-weight: 600;
}
.dr-panel, .public-form-card, .about-summary-card, .about-note-card, .public-card, .gate-panel {
    background: var(--cmt-surface);
    border: 1px solid var(--cmt-border);
    box-shadow: none;
    border-radius: 16px;
    padding: 28px;
}
.dr-shell { gap: 24px; }
.dr-panel-head { gap: 8px; margin-bottom: 24px; }
.dr-panel-title, .public-page h2, .about-summary-title, .gate-panel-title {
    font-size: 21px; line-height: 1.35; font-weight: 650; letter-spacing: -.015em;
}
.dr-panel-copy { font-size: 15px; line-height: 1.6; color: var(--cmt-muted); max-width: 68ch; }
.public-page p, .public-page ul { font-size: 15px; line-height: 1.75; color: #c5d3e7; }
.public-page :is(p,li,a), .user-links { overflow-wrap: anywhere; }
.public-page h2 { margin: 32px 0 12px; }
.public-card-title { font-size: 18px; line-height: 1.4; margin-bottom: 10px; }
.public-card + .public-card { margin-top: 16px; }
.public-card p:last-child, .about-note-card p:last-child { margin-bottom: 0; }
.about-summary { gap: 16px; margin-bottom: 24px; }
.about-summary-card { padding: 24px; }
.about-summary-title { font-size: 19px; margin-bottom: 12px; }
.about-summary-copy { font-size: 15px; }
.about-note-card h2 { margin-top: 0; }
.about-action { margin: 24px 0; }

/* Form labels, controls and help text share one scale. */
.dr-row { gap: 20px; margin-bottom: 20px; }
.dr-row--search { grid-template-columns: minmax(170px, 1fr) minmax(155px, 1fr) minmax(170px, 1.35fr); }
.dr-field { gap: 8px; }
.dr-field label, .public-label, .user-box label {
    font-size: 14px; line-height: 1.5; font-weight: 600;
    letter-spacing: 0; text-transform: none; color: #dce6f4;
}
.dr-field label { display: block; }
.dr-optional { font-weight: 400; color: #b7c7df; }
.public-install-link {
    align-self: flex-start; min-height: 44px; padding: 10px 14px;
    font-size: 14px; line-height: 1.5; color: #d8e8ff;
    background: #132f50; border: 1px solid #49617f; border-radius: 10px; cursor: pointer;
}
.public-install-link[hidden] { display: none; }
.dr-field :is(input,select), .public-input, .public-textarea,
.user-box input:not([type=checkbox]):not([type=hidden]), .user-box select {
    min-height: 48px; border: 1px solid #49617f; border-radius: 10px;
    background: #0a1d38; color: #f3f6fc; font-size: 16px; line-height: 1.5;
    padding: 11px 14px; box-sizing: border-box; width: 100%; min-width: 0;
}
.dr-field input::placeholder, .public-input::placeholder, .user-box input::placeholder { color: #92a8c4; opacity: 1; }
.dr-field input[type="date"]::-webkit-calendar-picker-indicator { filter: none; opacity: .9; }
.dr-field input:focus, .dr-field select:focus, .public-input:focus, .public-textarea:focus,
.user-box input:focus, .user-box select:focus { border-color: #9acaff; }
.dr-btn, .public-btn, .account-btn, .dr-page-btn, .gate-btn {
    box-sizing: border-box; min-height: 48px; padding: 12px 20px;
    font-size: 15px; line-height: 1.5; font-weight: 650; border-radius: 10px;
}
.dr-btn, .public-btn--primary, .account-btn-primary { background: #176ada; }
.public-page .public-btn--primary { color: #fff; }
.dr-form-note { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: var(--cmt-muted); }
.public-field { min-width: 0; margin-bottom: 0; gap: 8px; }
.public-form-grid { gap: 24px; }
.public-actions { margin-top: 24px; gap: 20px; }
.public-note, .contact-file-help { font-size: 13px; line-height: 1.6; color: #b7c7df; }
.public-input[type=file] { font-size: 14px; padding: 10px; }
.public-input::file-selector-button { background: #23466f; border: 0; border-radius: 6px; padding: 8px 10px; color: #fff; margin-right: 10px; }
.user-wrap { box-sizing: border-box; padding: 40px 28px; background: transparent; font-family: inherit; }
.user-box { padding: 36px; border-radius: 18px; border-color: var(--cmt-border); background: var(--cmt-surface); }
.user-box.account-box { max-width: 580px; }
.user-box h1 { font-size: 28px; line-height: 1.25; margin-bottom: 12px; }
.user-box .sub { font-size: 15px; color: var(--cmt-muted); line-height: 1.65; margin: 0 0 28px; }
.user-box label { margin-bottom: 8px; }
.user-box input:not([type=checkbox]):not([type=hidden]) { margin-bottom: 22px; }
.user-check-row { gap: 12px; }
.user-check-row input { width: 18px; height: 18px; margin-top: 3px; }
.user-check-row label { font-size: 14px; line-height: 1.65; color: #c5d3e7; font-weight: 400; }
.user-links { font-size: 14px; line-height: 2; margin-top: 24px; }
.user-logo { width: 180px; margin-bottom: 24px; }
.lm-overlay, .lm-overlay * { box-sizing: border-box; }
.lm-card { width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 32px 28px; background: var(--cmt-surface); border-color: var(--cmt-border); }
.lm-close { width: 44px; height: 44px; top: 8px; right: 8px; color: #dce6f4; }
.lm-title { font-size: 26px; line-height: 1.3; margin-bottom: 24px; }
.lm-field { gap: 8px; margin-bottom: 20px; }
.lm-label { font-size: 14px; line-height: 1.5; text-transform: none; letter-spacing: 0; color: #dce6f4; }
.lm-input { height: 48px; font-size: 16px; padding: 11px 14px; border-radius: 10px; border-color: #49617f; background: #0a1d38; }
.lm-btn { min-height: 48px; font-size: 15px; line-height: 1.5; border-radius: 10px; }
.lm-links { font-size: 14px; line-height: 1.7; }
.lm-links a { color: #bcd5f8; }
.lm-body { font-size: 15px; color: #c5d3e7; }
.pf-overview { gap: 16px; }
.pf-overview-card { padding: 18px; }
.pf-overview-kicker { font-size: 12px; color: #b7c7df; }
.pf-overview-title { font-size: 17px; line-height: 1.4; margin-bottom: 8px; }
.pf-overview-copy { font-size: 14px; line-height: 1.6; color: #c5d3e7; }

/* Scan departure time first, then outcome, then arrival details. */
.dr-results-toolbar { gap: 16px; flex-wrap: wrap; margin-bottom: 20px; align-items: end; }
.dr-filter { width: auto; max-width: 100%; flex-direction: row; align-items: center; gap: 10px; }
.dr-filter select { width: 190px; }
.dr-section-label { font-size: 14px; color: var(--cmt-muted); padding-bottom: 4px; }
.dr-svc-card { padding: 18px; gap: 16px; border-radius: 12px; background: #132d50; border-color: #324864; }
.dr-svc-time { font-size: 20px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.dr-svc-op { font-size: 15px; line-height: 1.4; }
.dr-svc-sub { font-size: 13px; line-height: 1.55; color: #c5d3e7; margin-top: 5px; }
.dr-badge { font-size: 13px; line-height: 1.4; padding: 6px 11px; font-weight: 650; }
.dr-pagination { margin-top: 20px; font-size: 14px; }
.dr-comp-title { font-size: 24px; line-height: 1.35; margin-bottom: 10px; }
.dr-comp-desc { font-size: 15px; line-height: 1.65; color: #c5d3e7; margin-bottom: 24px; }
.dr-fare-row { gap: 20px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); max-width: 520px; margin-bottom: 24px; }
.dr-result { padding: 24px; border-radius: 12px; }
.dr-result-head { font-size: 20px; line-height: 1.4; }
.dr-result-amount { font-size: 36px; line-height: 1.2; margin: 8px 0; }
.dr-result.eligible .dr-result-head, .dr-result-amount { color: #91edb9; }
.dr-amount-slot { min-height: 64px; }
.dr-result-sub, .dr-result-prompt { font-size: 14px; line-height: 1.6; color: #c5d3e7; }
.dr-notes { min-height: 48px; font-size: 13px; line-height: 1.65; color: #b8cbe3; }
.dr-claim-link { font-size: 14px; padding: 12px 16px; min-height: 44px; line-height: 1.5; }
.dr-claim-warning { font-size: 13px; color: #b8cbe3; line-height: 1.65; }
.dr-next { padding: 20px; }
.dr-next-label { color: #e8d8aa; font-size: 14px; margin-bottom: 8px; }
.dr-result-status { line-height: 1.6; min-height: 26px; margin-top: 8px; }

@media (max-width: 1100px) {
    .about-summary { grid-template-columns: 1fr; }
    .dr-row--search { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .dr-field--action { grid-column: 1 / -1; }
    .dr-label-spacer { display: none !important; }
}
@media (max-width: 800px) {
    :root { --page-pad-x: 16px; }
    .site-content { padding-bottom: calc(84px + env(safe-area-inset-bottom,0px)); }
    .dr-page, .public-page, .gate-main { padding: 24px 16px 32px; }
    .dr-hero, .public-page-hero, .gate-hero { padding: 24px; }
    .dr-panel, .public-form-card, .about-summary-card, .about-note-card, .public-card, .gate-panel { padding: 24px; }
    .user-wrap { padding: 24px 16px 32px !important; }
    .user-box { padding: 28px 24px; }
    .nav-sidebar-inner { padding: 16px 20px 28px; }
    .nav-mobile-close, .nav-hamburger { min-width: 44px; min-height: 44px; }
    .site-footer { padding: 24px 20px; }
    .dr-row--search { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .dr-field--action { grid-column: 1 / -1; }
    .dr-label-spacer { display: none !important; }
}
@media (max-width: 520px) {
    .dr-hero, .public-page-hero, .gate-hero { padding: 22px 20px; border-radius: 14px; }
    .dr-panel, .public-form-card, .about-summary-card, .about-note-card, .public-card, .gate-panel { padding: 22px 20px; border-radius: 14px; }
    .dr-title, .public-page h1, .gate-title { font-size: 27px; }
    .dr-subtitle, .public-page-sub { font-size: 15px; }
    .dr-panel-title, .public-page h2 { font-size: 20px; }
    .dr-row, .dr-row--search, .dr-fare-row { grid-template-columns: minmax(0,1fr); gap: 18px; }
    .dr-field--action { grid-column: auto; }
    .dr-svc-card { grid-template-columns: minmax(0,1fr) auto; padding: 16px; gap: 10px 12px; }
    .dr-svc-time { grid-column: 1; grid-row: 1; font-size: 20px; }
    .dr-badge { grid-column: 2; grid-row: 1; justify-self: end; white-space: normal; text-align: center; max-width: 178px; }
    .dr-svc-body { grid-column: 1 / -1; grid-row: 2; }
    .dr-page-btn { padding-inline: 12px; }
    .dr-filter { width: auto; }
    .dr-filter select { width: 174px; }
    .dr-filter label {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
    }
    .dr-section-label { font-size: 13px; }
    .dr-result { padding: 20px; }
    .dr-notes { min-height: 88px; }
    .dr-result-head { font-size: 19px; min-height: 54px; }
    .dr-claim-link { display: flex; justify-content: center; text-align: center; }
    .public-form-grid { gap: 20px; }
    .public-actions .public-btn { width: 100%; }
    .pf-overview { grid-template-columns: 1fr; }
    .user-box { padding: 28px 20px; }
    .user-box h1 { font-size: 26px; }
}
@media (min-width: 381px) and (max-width: 520px) {
    .dr-row--search { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px 12px; }
    .dr-field--action { grid-column: 1 / -1; }
    .dr-row--search input { padding-inline: 10px; }
}
@media (max-width: 380px) {
    .dr-page, .public-page, .gate-main, .user-wrap { padding-inline: 12px; }
    .dr-panel, .dr-hero, .public-page-hero, .public-form-card, .public-card { padding-inline: 16px; }
    .dr-filter { width: 100%; }
    .dr-filter select { width: 100%; }
    .dr-pagination { font-size: 13px; gap: 6px; }
    .dr-page-btn { padding-inline: 10px; font-size: 13px; }
    .dr-badge { max-width: 158px; }
}
@media (prefers-reduced-motion: reduce) {
    .nav-sidebar, .dr-svc-card, .pwa-install-prompt { transition: none; }
}
