/* Design tokens shared by every site in sites/ (see README). Each build puts this in front of its own style.css. */
:root {
  --sign-blue: #1E4B8F; --ink: #16202B; --ink-2: #4A5763; --ink-3: #5E6B76;
  --page: #F5F5F2; --card: #FFFFFF; --line: #DDE0DB; --divider: #E6E8E3; --pill-border: #C9CEC8;
  --sky: #D6E2E2; --sky-top: #C7D7DA; --ridge-far: #2E6E73; --ridge-near: #1C4A50;
}
/* Bringeland. Colours from ../../shared/tokens.css, plus direction and flight-state colours. Light only.
   Departures are sign blue (up into the sky), arrivals green (down to the ground); delays amber, cancellations red. */
:root {
  --dep: #1E4B8F; --dep-bg: #E5EDF8; --arr: #1D6B45; --arr-bg: #E2F1E8;
  --delayed: #8A4B08; --delayed-bg: #FFF1D6; --cancelled: #B42318; --cancelled-bg: #FDECEA; --live: #2E8B57; --now: #C0392B;
  color-scheme: light;
}

* { box-sizing: border-box }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Barlow, system-ui, sans-serif; -webkit-text-size-adjust: 100% }
a { color: inherit }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px }
:is(a, button):focus-visible { outline: 3px solid var(--sign-blue); outline-offset: 2px }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }

/* Header: the small BYGSTAD sign (links home to bygstad.com) and the page name, as on the other apps */
.top { padding: calc(28px + env(safe-area-inset-top)) 16px 4px; text-align: center }
.sign { display: inline-block; background: var(--sign-blue); border-radius: 6px; padding: 3px; box-shadow: 0 3px 8px rgba(18, 52, 59, .25); text-decoration: none }
.sign-inner { display: block; border: 2px solid #fff; border-radius: 4px; padding: 4px 12px 3px }
.sign-text { display: block; font: 700 22px/.95 'Barlow Condensed', sans-serif; letter-spacing: .02em; color: #fff; text-transform: uppercase }
.top h1 { margin: 14px 0 0; font-size: 30px; font-weight: 600; line-height: 1.1 }
.tagline { margin: 4px 0 0; font-size: 17px; color: var(--ink-2) }

/* Day picker: ‹ I dag / onsdag 18. november › */
.days { margin: 22px auto 0; max-width: 420px; display: flex; align-items: center; justify-content: space-between; gap: 8px }
.days button { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--pill-border); background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center }
.days button:disabled { opacity: .35; cursor: default }
.day-label { margin: 0; text-align: center; line-height: 1.2 }
#day-name { display: block; font-size: 21px; font-weight: 600 }
#day-name::first-letter { text-transform: uppercase }
#day-date { display: block; font-size: 15px; color: var(--ink-2) }

/* "Oppdatert 14:32": always say how old the data is */
.status { margin: 12px 0 18px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: center }
.status .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--pill-border) }
.status.live .dot { background: var(--live) }
.status.stale { color: var(--delayed) }
.status.stale .dot { background: #D98E04 }

/* The list: departures and arrivals together, by time */
.summary { display: flex; justify-content: center; gap: 18px; margin: 0 0 10px; font-size: 15px; font-weight: 600; min-height: 22px }
.tally { display: inline-flex; align-items: center; gap: 6px }
.tally .plane { width: 20px; height: 20px }
.tally.dep { color: var(--dep) }
.tally.arr { color: var(--arr) }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px }
.board { max-width: 640px; margin: 0 auto }
.flights { margin: 0; padding: 0; list-style: none; overflow: hidden }
.flights li + li { border-top: 1px solid var(--divider) }
.empty { padding: 18px 16px; color: var(--ink-2); text-align: center }

/* One flight: direction badge | time | to/from + flight · airline · gate | status */
.flight { display: grid; grid-template-columns: 40px 54px 1fr auto; align-items: center; gap: 4px 12px; min-height: 68px; padding: 10px 14px 10px 12px; font-variant-numeric: tabular-nums }
.badge { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center }
.badge .plane { width: 26px; height: 26px }
.dep .badge { background: var(--dep-bg); color: var(--dep) }
.arr .badge { background: var(--arr-bg); color: var(--arr) }
.when { font-size: 20px; font-weight: 600; line-height: 1.15 }
.when s { display: block; font-size: 15px; font-weight: 400; color: var(--ink-3) }
.when strong { font-weight: 600 }
.what { min-width: 0 }
.where { display: block; font-size: 17px; font-weight: 600 }
.dir { font-weight: 600 }
.dep .dir { color: var(--dep) }
.arr .dir { color: var(--arr) }
.via { font-weight: 400; color: var(--ink-2) }
.meta { display: block; font-size: 14px; color: var(--ink-2) }
.state { justify-self: end; padding: 3px 9px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--ink-2); background: var(--page) }

.flight.delayed .when strong, .flight.delayed .state { color: var(--delayed) }
.flight.delayed .state { background: var(--delayed-bg) }
.flight.cancelled .state { color: var(--cancelled); background: var(--cancelled-bg) }
.flight.cancelled .when s { font-size: 20px; font-weight: 600; color: var(--cancelled) }
.flight.cancelled .where { text-decoration: line-through; text-decoration-color: var(--cancelled) }
/* Done: landed or departed. Faded, but the direction colour stays readable. */
.flight.done .when, .flight.done .where { color: var(--ink-2); font-weight: 500 }
.flight.done .badge { opacity: .55 }

/* "No 15:12": where the day is now */
.flights li.now { position: relative; height: 0; border-top: 2px solid var(--now) }
.flights li.now + li { border-top: 0 }
.now span { position: absolute; left: 12px; top: -11px; padding: 1px 8px; border-radius: 999px; background: var(--now); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 18px; font-variant-numeric: tabular-nums }

@media (max-width: 380px) {
  .flight { grid-template-columns: 34px 50px 1fr auto; gap: 4px 10px; padding-inline: 10px }
  .badge { width: 34px; height: 34px; border-radius: 10px }
  .badge .plane { width: 22px; height: 22px }
}

/* Source credit (Avinor asks for it next to the data), about, footer */
.source { margin: 12px 4px 0; font-size: 15px; font-weight: 600; color: var(--ink); text-align: center }
.source a, .about a, footer a { text-decoration: underline; text-decoration-color: var(--pill-border); text-underline-offset: 3px }
.about { margin: 36px auto 0; padding: 0 4px; max-width: 640px; font-size: 15px; line-height: 1.5; color: var(--ink-2) }
.about h2 { margin: 0 0 8px; font: 700 15px 'Barlow Condensed', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2) }
.about p { margin: 0 0 10px }
footer { margin: 28px auto 0; max-width: 640px; padding: 18px 4px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); text-align: center }
