* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: #111; }
body { font: 16px/1.3 Arial, Helvetica, sans-serif; }
.screen { width: 100%; max-width: 800px; height: 480px; padding: 10px 12px 7px; display: flex; flex-direction: column; overflow: hidden; }
header { flex-shrink: 0; padding-bottom: 5px; }
.heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
h1 { margin: 0; font-size: 23px; line-height: 28px; letter-spacing: -.4px; }
.date { font-size: 21px; line-height: 28px; white-space: nowrap; }
.controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 3px; }
.display-switch { display: inline-flex; gap: 0; }
.display-switch button { font: inherit; font-size: 12px; line-height: 18px; padding: 0 9px; border: 1px solid #111; background: #fff; color: #111; cursor: pointer; }
.display-switch button + button { border-left: 0; }
.display-switch button[aria-pressed="true"] { background: #111; color: #fff; }
nav { display: flex; gap: 16px; margin-top: 0; font-size: 13px; }
nav a { color: inherit; text-decoration: none; }
nav a[aria-current] { font-weight: bold; text-decoration: underline; text-underline-offset: 3px; }
.columns, .connection { display: grid; grid-template-columns: minmax(0, 1fr) 75px 45px 155px 75px 36px; column-gap: 8px; }
.columns { flex-shrink: 0; align-items: center; padding: 4px 0; border-top: 2px solid #111; border-bottom: 1px solid #111; font-size: 13px; }
.columns span:not(:first-child) { text-align: right; }
.columns span:nth-child(3) { text-align: center; }
.connections { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.connection { flex: 1; min-height: 0; align-items: center; border-bottom: 1px solid #aaa; padding: 3px 0; }
.lines { font-size: 17px; line-height: 19px; font-weight: bold; min-width: 0; }
.line-name { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; vertical-align: middle; }
.mode-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 21px; width: 21px; height: 21px; }
.mode-icon.suburban, .mode-icon.subway { background: #111; color: #fff; font-size: 16px; font-weight: bold; line-height: 1; }
.mode-icon.suburban { border-radius: 50%; }
.mode-icon.subway { border-radius: 2px; }
.mode-icon.bus, .mode-icon.tram { flex-basis: 28px; width: 28px; }
.mode-icon.rail { flex-basis: auto; width: auto; min-width: 23px; padding: 0 3px; border: 1.5px solid #111; border-radius: 2px; font-size: 11px; line-height: 18px; }
.mode-icon svg { width: 100%; height: 100%; }
.departure-times { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.arrow { font-weight: normal; }
.duration { text-align: right; font-size: 20px; white-space: nowrap; }
.arrival-delay { text-align: right; font-size: 15px; font-weight: bold; font-variant-numeric: tabular-nums; }
.platform { font-size: 20px; text-align: center; white-space: nowrap; }
.platform .long { font-size: 15px; letter-spacing: -0.5px; }
.departure, .arrival { display: flex; justify-content: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.departure { flex-direction: column; align-items: flex-end; }
.time { font-size: 22px; font-weight: bold; line-height: 25px; white-space: nowrap; }
.planned { font-size: 15px; line-height: 20px; font-weight: normal; white-space: nowrap; }
.departure-note { display: block; font-size: 11px; line-height: 12px; }
.changed { outline: 1px solid #111; padding: 0 2px; }
.cancelled .time { text-decoration: line-through; }
.cancelled .departure-note, .warning { font-weight: bold; }
.empty { margin: auto 0; padding: 20px 0; text-align: center; font-size: 20px; }
.empty small { display: block; margin-top: 8px; font-size: 14px; }
footer { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-shrink: 0; padding-top: 5px; font-size: 11px; line-height: 20px; }
.status { display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; font-size: 16px; line-height: 20px; white-space: nowrap; }
.note { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
footer a { color: inherit; }
@media (max-width: 520px) {
  .screen { padding: 8px; }
  h1 { font-size: 17px; line-height: 22px; }
  .date { display: none; }
  .columns, .connection { grid-template-columns: minmax(0, 1fr) 42px 28px 78px 39px 21px; column-gap: 3px; }
  .columns { font-size: 9px; }
  .lines { font-size: 11px; line-height: 16px; }
  .platform { font-size: 14px; }
  .platform .long { font-size: 10px; letter-spacing: -0.5px; }
  .duration { font-size: 14px; }
  .arrival-delay { font-size: 11px; }
  .time { font-size: 15px; line-height: 19px; }
  .planned { font-size: 10px; line-height: 14px; }
  .departure-times { gap: 4px; }
  .line-name { gap: 1px; line-height: 14px; }
  .mode-icon { flex-basis: 14px; width: 14px; height: 14px; }
  .mode-icon.suburban, .mode-icon.subway { font-size: 10px; }
  .mode-icon.bus, .mode-icon.tram { flex-basis: 18px; width: 18px; }
  .mode-icon.rail { flex-basis: auto; min-width: 18px; width: auto; font-size: 9px; padding: 0 2px; line-height: 12px; }
  .departure-note { font-size: 9px; line-height: 10px; }
  footer { gap: 5px; }
  .status { gap: 5px; font-size: 11px; line-height: 16px; }
}
