:root {
    --board:   #0e1f2a;
    --panel:   #142c39;
    --line:    #24485a;
    --ink:     #eaf2f4;
    --muted:   #8faab8;
    --sand:    #e3a455;
    --mint:    #5cc9a4;
    --coral:   #e2685f;

    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --sans: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 2.5rem 1.5rem 4rem;
    background: var(--board);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Kopf --- */
.masthead { max-width: 78rem; margin: 0 auto 2rem; }

.eyebrow {
    margin: 0 0 .6rem;
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--sand);
}

h1 {
    margin: 0;
    font-size: clamp(1.7rem, 4.5vw, 2.9rem);
    font-weight: 650;
    letter-spacing: -.02em;
}

h1 .arrow { color: var(--sand); font-weight: 400; }

.lede {
    margin: .5rem 0 0;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* --- Reiter --- */
.tabs {
    max-width: 78rem;
    margin: 0 auto 1.5rem;
    display: flex;
    gap: .4rem;
    border-bottom: 1px solid var(--line);
}

.tab {
    padding: .55rem 1rem;
    color: var(--muted);
    text-decoration: none;
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--sand); }

/* --- Hinweise --- */
.note, .hint {
    max-width: 78rem;
    margin: 0 auto 1.25rem;
    padding: .7rem .9rem;
    border-left: 2px solid var(--sand);
    background: var(--panel);
    color: var(--muted);
    font-size: .85rem;
}

.note--error { border-left-color: var(--coral); color: var(--ink); }
.hint { border-left-color: var(--line); }

code { font-family: var(--mono); color: var(--sand); }

/* --- Filter --- */
.filters {
    max-width: 78rem;
    margin: 0 auto 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    align-items: end;
}

.filters label { display: flex; flex-direction: column; gap: .3rem; }

.filters span {
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
}

.filters input,
.filters select,
.filters button {
    font: inherit;
    padding: .45rem .6rem;
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.filters button {
    background: var(--sand);
    color: #1a1206;
    border-color: var(--sand);
    font-weight: 600;
    cursor: pointer;
    padding-inline: 1.2rem;
}

.filters button:hover { filter: brightness(1.08); }

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

/* --- Tafel --- */
.board {
    max-width: 78rem;
    margin: 0 auto;
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.board th {
    padding: .5rem .7rem;
    text-align: left;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.board td {
    padding: .6rem .7rem;
    border-bottom: 1px solid rgba(36, 72, 90, .45);
    vertical-align: middle;
}

.board tbody tr:hover { background: var(--panel); }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); font-size: .85em; }
.time .muted { margin-left: .4rem; }

.time {
    font-family: var(--mono);
    font-size: 1.05rem;
    white-space: nowrap;
}

.airlines { color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); padding: 2rem .7rem; text-align: center; }

.link { color: var(--sand); text-decoration: none; border-bottom: 1px solid transparent; }
.link:hover { border-bottom-color: var(--sand); }

/* Streckenband: der eine Ort, an dem die Tafel Charakter zeigt */
.leg {
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

.leg .code {
    font-family: var(--mono);
    font-size: 1rem;
    letter-spacing: .06em;
    color: var(--ink);
}

.leg .code--dim { color: var(--muted); }

.leg .rule {
    flex: 0 0 2.4rem;
    height: 1px;
    background: var(--line);
    position: relative;
}

.leg .rule::after {
    content: "";
    position: absolute;
    right: -1px;
    top: -2.5px;
    border-left: 5px solid var(--sand);
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
}

/* --- Status --- */
.status {
    font-size: .78rem;
    letter-spacing: .04em;
    white-space: nowrap;
}

.status::before {
    content: "";
    display: inline-block;
    width: .45rem;
    height: .45rem;
    margin-right: .45rem;
    border-radius: 50%;
    background: currentColor;
    vertical-align: baseline;
}

.is-ontime   { color: var(--mint); }
.is-done     { color: var(--muted); }
.is-late     { color: var(--sand); }
.is-cancelled { color: var(--coral); }

/* --- Fuss --- */
.foot {
    max-width: 78rem;
    margin: 2.5rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .78rem;
}

/* --- Schmale Bildschirme --- */
@media (max-width: 860px) {
    body { padding: 1.5rem 1rem 3rem; }

    .board { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
