:root {
  --paper: #F6F3EC; --ink: #141414; --muted: #6B665C; --rule: #D9D3C6; --yellow: #FFD100; --red: #C4161C; --gone: #B5AE9F;
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: "Barlow", "Helvetica Neue", Arial, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px 40px; }

/* masthead */
.mast { background: var(--yellow); }
.mast .inner { max-width: 1240px; margin: 0 auto; padding: 18px 20px 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: start; }
.kicker { font-size: 12px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.kicker svg { flex: none; }
h1 { margin: 0; font-family: var(--cond); font-weight: 700; font-size: clamp(34px, 5vw, 54px); line-height: 1; letter-spacing: -.01em; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-block; font-family: var(--sans); font-size: 14px; font-weight: 800; letter-spacing: .04em; padding: 3px 9px 2px; border-radius: 3px; background: var(--ink); color: var(--yellow); line-height: 1.2; }
.pill.p632 { background: var(--red); color: #fff; }
.sub { margin: 8px 0 0; font-size: 15px; }
.when { text-align: right; }
.clock { font-family: var(--cond); font-weight: 700; font-size: clamp(36px, 4.5vw, 56px); line-height: 1; font-variant-numeric: tabular-nums; }
.dateline { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.status { margin-top: 10px; font-size: 13px; }
.status a { text-decoration: underline; }
.status .err { color: var(--red); font-weight: 700; }

/* cards */
.section { font-size: 13px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; margin: 22px 0 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.card { background: #FFFDF8; border: 1px solid var(--rule); border-radius: 3px; padding: 11px 12px 11px; display: flex; flex-direction: column; min-height: 128px; }
.card.gone { opacity: .5; }
.cardtop { display: flex; align-items: center; gap: 8px; }
.dest { font-size: 12.5px; color: var(--muted); line-height: 1.1; }
.time { font-family: var(--cond); font-weight: 700; font-size: 44px; line-height: 1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.arr { font-size: 13.5px; margin-top: 5px; }
.arr b.late { color: var(--red); } .arr b.early { color: #1f7a3a; }
.sub, .arr2 { font-size: 12px; color: var(--muted); margin-top: 2px; }
.empty { padding: 14px; border: 1px dashed var(--rule); border-radius: 3px; font-size: 14px; color: var(--muted); grid-column: 1 / -1; }

/* notices */
#notices { margin-top: 12px; display: grid; gap: 6px; }
.notice { background: var(--ink); color: #F3EFE6; border-radius: 3px; padding: 10px 14px; font-size: 13.5px; line-height: 1.4; }
.notice b { color: var(--yellow); } .notice .dates { color: #cfc9bb; margin-left: 6px; }

/* chart */
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; align-items: center; margin: -4px 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; width: 26px; height: 0; border-top: 3.5px solid var(--ink); }
.sw.s632 { border-color: var(--red); } .sw.past { border-color: #cfc9bb; } .sw.now { width: 0; height: 14px; border-left: 2px dashed var(--muted); } .sw.dot { width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); }
#chart { width: 100%; display: block; font-family: var(--sans); }
#chart text { user-select: none; }
.past-shade, .past { fill: rgba(20, 20, 20, .045); }
.grid { stroke: var(--rule); stroke-width: 1; } .grid.minor { stroke-dasharray: 2 6; }
.midnight { stroke: #b8b1a2; stroke-width: 1.5; stroke-dasharray: 6 4; }
.hour { font-size: 12.5px; fill: var(--muted); font-weight: 700; letter-spacing: .06em; } .hour.next { fill: var(--ink); }
.band { fill: #EAE5DA; } .band.yellow { fill: var(--yellow); }
.spine { stroke: var(--ink); stroke-width: 2; } .tick { stroke: var(--muted); stroke-width: 1.2; }
.stop { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.stoplbl { font-size: 12.5px; fill: #3d3a34; } .stoplbl.major { font-size: 13.5px; font-weight: 700; fill: var(--ink); } .stoplbl.onyellow { font-size: 14.5px; }
.stopsub { font-size: 11px; fill: var(--muted); } .stopsub.onyellow { fill: #4a3d00; }
.journey { fill: none; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.journey.s631 { stroke: var(--ink); } .journey.s632 { stroke: var(--red); }
.journey.past { opacity: .28; } .journey.hl { stroke-width: 5; }
.journey.live.past { opacity: .55; stroke-dasharray: 7 5; }
.journey.live { stroke-width: 3.8; }
.arrow { fill: none; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; } .arrow.s632 { stroke: var(--red); }
.dep { stroke: #FFFDF8; stroke-width: 2; } .dep.s631 { fill: var(--ink); } .dep.s632 { fill: var(--red); }
.deplbl { font-size: 14px; font-weight: 800; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.deplbl.s631 { fill: var(--ink); } .deplbl.s632 { fill: var(--red); }
.arrlbl { font-size: 12.5px; font-weight: 700; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.arrlbl.s631 { fill: var(--ink); } .arrlbl.s632 { fill: var(--red); }
.now { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 4; }
.nowlbl { font-size: 12px; fill: var(--ink); font-weight: 800; letter-spacing: .06em; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; }
.delln { stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 3 3; }
.sch { fill: var(--paper); stroke: var(--muted); stroke-width: 1.3; }
g.veh { cursor: pointer; }
.vehhalo { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.5; transition: r .2s; }
g.veh.s632 .vehhalo { stroke: var(--red); }
.vehdot { fill: var(--ink); } g.veh.s632 .vehdot { fill: var(--red); }
g.veh.hl .vehhalo { r: 15; } g.veh.stale { opacity: .4; }
.vehlbl { font-size: 12px; font-weight: 800; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.vehlbl.s631 { fill: var(--ink); } .vehlbl.s632 { fill: var(--red); } .vehlbl.stale { opacity: .5; }

/* bus list */
#buslist { margin-top: 8px; display: grid; gap: 6px; font-size: 13.5px; }
.bus { background: #FFFDF8; border: 1px solid var(--rule); border-radius: 3px; padding: 8px 12px; cursor: pointer; }
.bus.hl { border-color: var(--ink); }
.bus .late { color: var(--red); font-weight: 700; }
.source { margin-top: 22px; font-size: 11.5px; line-height: 1.55; color: var(--muted); }

@media (max-width: 640px) {
  .mast .inner { grid-template-columns: 1fr; }
  .when { text-align: left; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card { min-height: 118px; } .time { font-size: 38px; }
}
