@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #faf9f5;
  --ink: #172822;
  --muted: #56625a;
  --line: #cdd0c6;
  --pine: #1d3c33;
  --rust: #94421d;
  --serif: "Instrument Serif", Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font: 100%/1.4 var(--ui);
  background: #e3e6df;
  color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, p, ol, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid #176e93; outline-offset: 3px; }
h1:focus { outline: none; }
[hidden] { display: none !important; }
.app {
  --gutter: clamp(1.25rem, 6vw, 2rem);
  container-type: inline-size;
  display: flex; flex-direction: column; width: min(100%, 31rem); margin: auto;
  padding-inline: var(--gutter); background: var(--paper);
}
.brand, .detail-nav, .ticket-top, .next-line, .ticket-bottom, .list-head, .fixture, .sign-header, .platform-numbers {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem;
}
.brand { padding: .8rem 0 .9rem; }
.brand-name { display: inline-flex; align-items: center; gap: .48rem; font: 400 1.95rem/1 var(--serif); }
.rails { width: .94rem; height: .95rem; display: inline-block; border-inline: .26rem solid var(--pine); transform: skew(-22deg); position: relative; }
.rails::after { content: ""; position: absolute; inset: 40% 0 auto; border-top: .19rem solid var(--pine); }
.brand-detail, .list-head > span, .fixture, .detail-heading p { color: var(--muted); font-size: .8rem; }
.station-heading { position: relative; isolation: isolate; display: grid; align-items: end; min-height: 12rem; margin-inline: calc(0px - var(--gutter)); background: var(--pine); color: white; }
.station-heading img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.station-heading::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, rgb(12 23 24 / 88%), rgb(12 23 24 / 6%) 77%); }
.station-caption { padding: 3rem var(--gutter) 1.15rem; }
.station-caption p, .detail-heading p { font-size: .875rem; font-weight: 500; }
h1, h2 { font-family: var(--serif); font-weight: 400; overflow-wrap: anywhere; }
h1 { font-size: clamp(3rem, 14vw, 4.35rem); line-height: .99; }
.ticket { display: block; padding: 1.15rem 0 1.3rem; border-bottom: 1px solid var(--ink); }
.ticket-top { font-size: .875rem; font-weight: 600; }
.service-id { color: var(--pine); border: 1px solid #89958a; border-radius: .22rem; padding: .04rem .36rem; font-size: .72rem; font-weight: 650; letter-spacing: .03em; }
.next-line { margin: .15rem 0 .05rem; }
.ticket-time, .row time, .stops time, .track, .platform-numbers strong { font-variant-numeric: tabular-nums; }
.ticket-time { font-size: clamp(3rem, 16vw, 4.5rem); font-weight: 540; letter-spacing: -.075em; line-height: 1.08; }
.round-arrow { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid #afb7aa; border-radius: 50%; font-size: 1.1rem; }
.destination { font-size: 1.08rem; font-weight: 600; }
.platform-label { font-size: .8rem; font-weight: 600; background: #e9ece3; border-radius: .25rem; padding: .25rem .48rem; }
.platform-label.changed { color: var(--rust); background: #f6e5d7; }
.later, .itinerary { margin-top: 1.15rem; }
.list-head { align-items: baseline; padding-bottom: .4rem; }
h2 { font-size: 1.65rem; line-height: 1.2; }
.departures, .stops { padding: 0; list-style: none; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: .9rem; padding: .62rem 0; border-bottom: 1px solid var(--line);
}
.row time { font-size: 1.05rem; font-weight: 620; }
.row strong { display: block; font-weight: 570; font-size: .975rem; overflow-wrap: anywhere; }
.row small { display: block; font-size: .73rem; color: var(--muted); }
.track { color: var(--pine); min-width: 1.7rem; border: 1px solid #a4ada2; border-radius: .23rem; text-align: center; font-size: .82rem; font-weight: 600; }
.detail-nav { border-bottom: 1px solid var(--line); padding: .18rem 0; }
.back, .source { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .88rem; }
.detail-heading { padding: 1.4rem 0 1.25rem; }
.detail-heading h1 { margin-top: .2rem; }
.assignment { background: var(--pine); color: #fffdf2; border-radius: .8rem; padding: .95rem 1.12rem 1rem; }
.sign-header { padding-bottom: .64rem; border-bottom: 1px solid #73897a; }
.assignment-label { font-size: .88rem; font-weight: 620; display: inline-flex; gap: .5rem; align-items: center; }
.assignment.changed .assignment-label { color: #ffd09b; }
.assignment.changed .assignment-label::before { content: ""; width: .48rem; height: .48rem; background: currentColor; border-radius: 50%; }
.departure-time { font-size: .76rem; color: #e2e7df; }
.platform-numbers { justify-content: flex-start; gap: .65rem 1.25rem; padding-top: .7rem; align-items: flex-end; }
.previous, .current { display: grid; font-size: .77rem; gap: .2rem; }
.previous, .change-arrow { color: #c2ccbd; }
.previous s { font-size: 2.6rem; line-height: 1.15; text-decoration-thickness: 2px; }
.change-arrow { align-self: center; font-size: 1.6rem; }
.platform-numbers strong { font-size: clamp(3.75rem, 20vw, 5.8rem); line-height: .95; font-weight: 530; letter-spacing: -.085em; }
.stops li { display: grid; grid-template-columns: .8rem minmax(0, 1fr) auto; gap: .72rem; align-items: center; min-height: 2.85rem; position: relative; overflow-wrap: anywhere; }
.stops li:first-child, .stops li:last-child { font-weight: 650; }
.stops li > span > small { display: block; font-size: .73rem; font-weight: 400; color: var(--muted); }
.stops li:first-child, .stops li:last-child { min-height: 3.65rem; }
.stops time { color: var(--muted); font-size: .86rem; }
.node { width: .62rem; height: .62rem; margin-inline: auto; border: 1.6px solid var(--pine); background: var(--paper); border-radius: 50%; z-index: 1; }
.stops li:first-child .node, .stops li:last-child .node { background: var(--pine); }
.stops li:not(:last-child)::after { content: ""; position: absolute; left: .4rem; top: 50%; height: 100%; border-left: 1.6px solid var(--pine); transform: translateX(-50%); }
.journey-time { border-top: 1px solid var(--line); margin-top: .7rem; padding-top: .6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; font-size: .84rem; }
.journey-time strong { font-weight: 600; }
.fixture { margin-top: auto; padding: 1.5rem 0 .75rem; }
footer { width: min(100%, 31rem); padding: .3rem clamp(1.25rem, 6vw, 2rem) 1.5rem; margin: auto; background: var(--paper); }
.simulation { min-height: 2.75rem; width: 100%; border: 1px solid #9da89d; background: transparent; color: var(--ink); padding: .5rem; border-radius: .5rem; font-weight: 600; }
.source, .credit a { text-decoration: underline; text-underline-offset: .16em; }
.credit { font-size: .75rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@container (max-width: 16em) {
  .row { grid-template-columns: 1fr auto; gap: .3rem; }
  .row > span:nth-child(2) { grid-row: 2; grid-column: 1/-1; }
  .track { grid-column: 2; grid-row: 1; }
  .round-arrow { display: none; }
}
@media (hover: hover) {
  .row:hover, .simulation:hover { background: #edf0e7; }
  .ticket:hover .destination, .back:hover { text-decoration: underline; }
}
@media (min-width: 36rem) {
  body { padding: 2rem 1rem; }
  .app { border: 1px solid var(--line); border-bottom: 0; }
  footer { border: 1px solid var(--line); border-top: 0; }
}
