:root {
  --ink: #14213d;
  --muted: #5b6577;
  --paper: #f6f4ef;
  --card: #ffffff;
  --line: #dcd8cf;
  --brand: #0b6e4f;
  --amber: #b45309;
  --red: #b42318;
  --blue: #1d4ed8;
  --grey: #6b7280;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f1ea;
    --muted: #a8b0bf;
    --paper: #10151f;
    --card: #182030;
    --line: #2b3548;
    --brand: #4ad6a4;
    --amber: #fbbf24;
    --red: #f87171;
    --blue: #93c5fd;
    --grey: #9ca3af;
  }
}

* {
  box-sizing: border-box;
}

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

.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.top p {
  margin: 0;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.25rem;
}

.picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
}

.picker label {
  font-weight: 600;
}

.picker select {
  font: inherit;
  color: inherit;
  min-width: 15rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--card);
}

.heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 0.75rem;
}

h1 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
}

#updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-left: 0.35rem solid var(--amber);
  border-radius: 0.5rem;
  background: var(--card);
}

.notice h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.notice p {
  margin: 0;
}

.notice-down,
.notice-offline {
  border-left-color: var(--red);
}

.notice-unknown {
  border-left-color: var(--blue);
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--card);
}

th,
td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.destination {
  font-weight: 600;
}

.operator {
  color: var(--muted);
}

.bay {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-ontime {
  color: var(--brand);
}

.status-boarding {
  color: var(--blue);
}

.status-delayed {
  color: var(--red);
}

.status-changed {
  color: var(--amber);
}

.status-departed {
  color: var(--grey);
}

footer {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

footer p {
  margin: 0.15rem 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (max-width: 34rem) {
  .operator,
  th:nth-child(3) {
    display: none;
  }

  th,
  td {
    padding: 0.6rem 0.5rem;
  }
}
