:root {
    --ink: #102a43;
    --ink-soft: #486581;
    --paper: #f7f9fc;
    --white: #fff;
    --line: #d9e2ec;
    --accent: #ef6c35;
    --accent-dark: #c94c1b;
    --navy: #0b2740;
    --blue: #0f609b;
    --shadow: 0 18px 50px rgba(16, 42, 67, .09);
}

* { box-sizing: border-box; }
html { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 90% 7%, rgba(239, 108, 53, .09), transparent 24rem),
        var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a { color: var(--blue); }
small { color: var(--ink-soft); }
code {
    padding: .15rem .3rem;
    border-radius: 3px;
    background: #f0f4f8;
    color: var(--ink);
}
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.site-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
    color: white;
    background: var(--navy);
    border-bottom: 3px solid var(--accent);
}

.nav-row, .footer-row {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    color: white;
    font-size: 1.08rem;
    letter-spacing: .01em;
    text-decoration: none;
}

.brand-roundel {
    width: 30px;
    height: 30px;
    display: inline-block;
    border: 7px solid var(--accent);
    border-radius: 50%;
    position: relative;
}

.brand-roundel::after {
    content: "";
    width: 32px;
    height: 5px;
    background: white;
    position: absolute;
    left: -8px;
    top: 5px;
}

nav { display: flex; gap: 28px; }
nav a { color: #d9e2ec; text-decoration: none; font-size: .94rem; }
nav a:hover { color: white; }
.page-main { flex: 1; padding-block: 64px 90px; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 720px) 1fr;
    gap: 40px;
    align-items: center;
    padding-bottom: 58px;
}

.eyebrow {
    color: var(--accent-dark);
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .76rem;
}

h1, h2, p { margin-top: 0; }

h1 {
    max-width: 760px;
    margin: 12px 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    font-size: clamp(2.6rem, 6vw, 5.25rem);
    line-height: .98;
    letter-spacing: -.04em;
}

.hero-copy {
    max-width: 610px;
    color: var(--ink-soft);
    font-size: 1.12rem;
}

.hero-mark { height: 165px; position: relative; overflow: hidden; }
.hero-mark span {
    position: absolute;
    right: -10px;
    width: 210px;
    height: 22px;
    background: var(--navy);
    border-radius: 999px 0 0 999px;
}
.hero-mark span:nth-child(1) { top: 18px; width: 145px; background: var(--accent); }
.hero-mark span:nth-child(2) { top: 70px; }
.hero-mark span:nth-child(3) { top: 122px; width: 175px; }

.search-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.search-card {
    min-width: 0;
    padding: 30px;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.search-card-primary { border-top: 4px solid var(--accent); }
.card-number { color: #9fb3c8; font: 700 .75rem/1 monospace; padding-top: 8px; }
.search-card h2 { font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.search-card p { color: var(--ink-soft); font-size: .92rem; min-height: 42px; }
.stack-form { display: grid; gap: 9px; margin-top: 28px; }

label {
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fbfdff;
    border: 1px solid #bcccdc;
    border-radius: 3px;
    font: inherit;
}

input:focus {
    outline: 3px solid rgba(15, 96, 155, .17);
    border-color: var(--blue);
}

.station-autocomplete {
    position: relative;
    z-index: 2;
}

.station-suggestions {
    position: absolute;
    z-index: 10;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    max-height: 18rem;
    margin: 0;
    padding: 4px;
    overflow-y: auto;
    list-style: none;
    background: var(--white);
    border: 1px solid #9fb3c8;
    border-radius: 3px;
    box-shadow: 0 14px 30px rgba(16, 42, 67, .18);
}

.station-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 2px;
    cursor: pointer;
}

.station-suggestion:hover,
.station-suggestion.is-active {
    color: var(--white);
    background: var(--blue);
}

.station-suggestion-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.station-suggestion-code {
    flex: 0 0 auto;
    padding: 1px 5px;
    color: var(--ink-soft);
    background: #f0f4f8;
    border-radius: 3px;
    font: 700 .75rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.station-suggestion:hover .station-suggestion-code,
.station-suggestion.is-active .station-suggestion-code {
    color: var(--navy);
    background: var(--white);
}

.button {
    min-height: 46px;
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 15px;
    border: 0;
    border-radius: 3px;
    color: white;
    background: var(--navy);
    font-family: inherit;
    font-size: .91rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.button:hover { background: #153e5c; }
.button-primary { background: var(--accent-dark); }
.button-primary:hover { background: #a93d14; }

.alert {
    margin-bottom: 24px;
    padding: 14px 16px;
    border-left: 4px solid var(--accent);
    background: white;
    box-shadow: 0 5px 18px rgba(16, 42, 67, .06);
}
.alert-error { border-color: #ba2525; }

.page-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 30px;
}
.page-heading h1 { font-size: clamp(2.2rem, 5vw, 4rem); margin-bottom: 0; }
.page-heading p { color: var(--ink-soft); margin: 8px 0 0; }

.data-panel {
    overflow: hidden;
    background: white;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}
.table-scroll { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.data-table th {
    padding: 13px 16px;
    text-align: left;
    color: white;
    background: var(--navy);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.data-table tbody tr:hover { background: #f0f4f8; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.numeric { text-align: right !important; }
.status { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.status-removed { color: #ba2525; }
.status-bus { color: var(--blue); }

.site-footer {
    color: #bcccdc;
    background: var(--navy);
    font-size: .82rem;
}

@media (max-width: 900px) {
    .search-grid { grid-template-columns: 1fr; }
    .search-card p { min-height: auto; }
    .hero { grid-template-columns: 1fr; }
    .hero-mark { display: none; }
}

@media (max-width: 600px) {
    .site-shell { width: min(100% - 24px, 1180px); }
    .page-main { padding-block: 42px 64px; }
    .nav-row { min-height: 66px; }
    nav a:not(:first-child) { display: none; }
    .search-card { padding: 24px 18px; grid-template-columns: 28px 1fr; }
    .page-heading { display: block; }
    .footer-row {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }
}
