:root {
  --paper: #f3f6f8;
  --surface: #ffffff;
  --ink: #14212b;
  --muted: #55646f;
  --line: #d3dce2;
  --board: #0f1b24;
  --board-ink: #eef3f6;
  --board-dim: #8fa1ae;
  --signal: #f0b429;
  --ok: #4fc59b;
  --late: #ff7a6b;
  --link: #0b5f8a;
  --measure: 66ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand b { color: var(--link); }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.97rem; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

/* Hero */
.hero { padding: 3.5rem 0 3rem; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 1.1rem;
  font-weight: 800;
}
.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34ch;
  margin: 0 0 1.75rem;
}
.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 0.8rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 650;
}
.btn:hover { background: var(--link); color: #fff; }
.fine { color: var(--muted); font-size: 0.92rem; margin: 0.9rem 0 0; max-width: 40ch; }

/* The departure board */
.board {
  background: var(--board);
  color: var(--board-ink);
  border-radius: 6px;
  padding: 1.1rem 1.1rem 0.9rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px -22px rgba(15, 27, 36, 0.55);
  font-variant-numeric: tabular-nums;
}
.board-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 0.6rem;
  color: var(--board-dim);
  font-size: 0.9rem;
}
.board-title strong { color: var(--signal); font-size: 1rem; }
.row {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr) 2.2rem 5.6rem;
  gap: 0.6rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
  align-items: baseline;
}
.row.head {
  border-top: 0;
  padding: 0.2rem 0 0.4rem;
  color: var(--board-dim);
  font-size: 0.85rem;
}
.row .time { font-weight: 700; }
.row .dest { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .status { text-align: right; font-weight: 650; }
.status.ok { color: var(--ok); }
.status.late { color: var(--late); }
.board-note { margin: 0.7rem 0 0; color: var(--board-dim); font-size: 0.85rem; }

/* One-time fill-in on load */
.js .row.fill { opacity: 0; transform: translateY(6px); animation: fill 0.45s ease-out forwards; }
.js .row.fill:nth-of-type(2) { animation-delay: 0.25s; }
.js .row.fill:nth-of-type(3) { animation-delay: 0.5s; }
.js .row.fill:nth-of-type(4) { animation-delay: 0.75s; }
.js .row.fill:nth-of-type(5) { animation-delay: 1s; }
@keyframes fill { to { opacity: 1; transform: none; } }

/* Content sections */
section.block { padding: 3rem 0; border-top: 1px solid var(--line); }
section.block h2 {
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 1.4rem;
}
.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.three h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.three p { margin: 0; color: var(--muted); }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; }

/* Document pages */
.doc { padding: 3rem 0 4rem; }
.doc .prose h1 { font-size: 2.3rem; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 0.4rem; }
.doc .prose h2 { font-size: 1.3rem; margin: 2.2rem 0 0.5rem; letter-spacing: -0.01em; }
.doc .prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.doc .prose li { margin-bottom: 0.4rem; }
.updated { color: var(--muted); margin: 0 0 1.5rem; }

/* Footer */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.6rem 0 2rem;
  color: var(--muted);
  font-size: 0.93rem;
}
.site-foot .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

@media (max-width: 52rem) {
  .hero { padding-top: 2.2rem; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .three { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
}

@media (max-width: 26rem) {
  .row { grid-template-columns: 3.2rem minmax(0, 1fr) 1.8rem 4.8rem; font-size: 0.98rem; gap: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .js .row.fill { opacity: 1; transform: none; animation: none; }
}
