:root {
  --paper: #f5efdc;
  --card: #fffdf6;
  --ink: #1e1b15;
  --ink-2: #6a6253;
  --rule: #ddd3b8;
  --grid: #e9e2cc;
  --sure: #b2451f;
  --timetable: #2a5ea6;
  --average: #8d7658;
  --average-line: #9a8160;
  --bike: #2c7a4b;
  --due: #b9b2a0;
  --serif: Charter, "Iowan Old Style", "Bitstream Charter", Georgia, serif;
  --sans: -apple-system, "Helvetica Neue", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.4 var(--sans); }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

header.top { border-bottom: 1px solid var(--rule); }
header.top .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 18px; }
.brand { font: 700 24px/1.1 var(--serif); text-decoration: none; display: block; padding-bottom: 4px; }
.brand span { font-weight: 400; }
.strap { font: 15px/1.3 var(--serif); color: var(--ink-2); margin: 0 0 14px; }
nav { display: flex; gap: 22px; }
nav a { font: 600 14px/1 var(--sans); text-decoration: none; padding: 0 0 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
nav a.on { border-color: var(--ink); }

.pick { display: grid; grid-template-columns: 1fr 44px 1fr; gap: 8px; align-items: end; margin: 22px 0 12px; }
.field { position: relative; }
.field label { display: block; font: 13px/1 var(--sans); color: var(--ink-2); margin-bottom: 6px; }
.field .box { display: flex; align-items: center; height: 46px; padding: 0 14px; background: var(--card); border: 1px solid #cfc4a4; font: 600 19px/1 var(--serif); white-space: nowrap; overflow: hidden; }
.field .box.focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); font-weight: 400; }
.field .box .caret { width: 1px; height: 22px; background: var(--ink); margin-left: 1px; }
.field .box .ph { color: #a39a85; font-weight: 400; }
.swap { height: 46px; width: 44px; border: 0; background: none; font-size: 22px; color: var(--ink); cursor: pointer; }
.list { position: absolute; z-index: 1200; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--card); border: 1px solid var(--ink); box-shadow: 0 8px 24px rgb(40 30 0 / .18); }
.list .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 14px; min-height: 44px; border-top: 1px solid var(--grid); font: 17px/44px var(--serif); }
.list .row:first-child { border-top: 0; }
.list .row.on { background: #f3ecd6; }
.list .row small { font: 13px/1 var(--sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .head { padding: 10px 14px 8px; font: 13px/1.2 var(--sans); color: var(--ink-2); }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.seg { display: flex; }
.seg button { height: 36px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; font: 15px/1 var(--sans); color: var(--ink); cursor: pointer; }
.seg button.on { font-weight: 700; border-color: var(--ink); }
.speed { display: flex; align-items: center; gap: 2px; font: 14px/1 var(--sans); color: var(--bike); }
.speed span:first-child { margin-right: 4px; } .speed span:last-child { margin-left: 2px; }
.speed button { height: 30px; min-width: 34px; padding: 0 6px; border: 1px solid transparent; border-radius: 15px; background: none; font: inherit; color: inherit; cursor: pointer; }
.speed button.on { border-color: var(--bike); font-weight: 700; }

.card { background: var(--card); padding: 22px 24px 14px; }
.card h1 { font: 400 25px/1.2 var(--serif); margin: 0 0 4px; letter-spacing: -0.005em; }
.card .by { font: 14px/1.3 var(--sans); color: var(--ink-2); margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.card .by button { height: 30px; padding: 0 12px; border: 1px solid #cfc4a4; border-radius: 15px; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.card .by button.on { border-color: var(--ink); background: var(--ink); color: var(--card); }
.try { font: 15px/1.5 var(--serif); color: var(--ink-2); margin: 14px 0 0; }
.key { display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 0 0 6px; font: 15px/1.2 var(--sans); }
.key .at { color: var(--ink-2); flex-basis: 100%; font-size: 13px; height: 16px; }
.key div { display: flex; align-items: baseline; gap: 7px; }
.key b { font: 700 26px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.key .u { font-size: 13px; }
.k-sure { color: var(--sure); } .k-tt { color: var(--timetable); } .k-avg { color: #8d7658; } .k-bike { color: var(--bike); }
.chart { position: relative; height: 420px; margin: 0 -8px; }
.chart canvas, .chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart .msg { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; font: 19px/1.3 var(--serif); color: var(--ink-2); text-align: center; padding: 0 24px; }
.btn { height: 44px; padding: 0 18px; border: 1px solid var(--ink); background: var(--card); font: 600 15px/1 var(--sans); color: var(--ink); cursor: pointer; }
.foot .btn { flex: none; height: 36px; font-weight: 400; }
.foot { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin: 14px 0 0; }
.foot p { margin: 0 0 4px; }
.foot .mean { font: 16px/1.4 var(--serif); }
.foot .count { font: 13px/1.4 var(--sans); color: var(--ink-2); }
.map { height: 380px; margin: 22px 0 0; background: #e8e6e1; }
.map.tall { height: 640px; margin-top: 0; }
.leaflet-container { font: 12px var(--sans); background: #e8e6e1; }
.leaflet-tile-pane { filter: grayscale(1) contrast(.82) brightness(1.08); }
.pin { width: 26px; height: 26px; border-radius: 13px; background: var(--ink); color: #fff; font: 700 13px/26px var(--sans); text-align: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .4); }
.pin.b { background: var(--sure); }
details.more { border-top: 1px solid var(--rule); margin: 22px 0 40px; padding: 14px 0; font: 16px/1.5 var(--serif); }
details.more summary { cursor: pointer; }
details.more p { max-width: 720px; margin: 10px 0; }

/* how far */
.reachbar { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin: 22px 0 14px; align-items: end; }
.mapwrap { position: relative; }
.over { background: var(--card); padding: 18px 24px 14px; }
.over h1 { font: 400 25px/1.2 var(--serif); margin: 0 0 12px; }
.over .key b { font-size: 24px; }

/* bike */
.bikehead { margin: 26px 0 6px; }
.bikehead h1 { font: 400 25px/1.2 var(--serif); margin: 0; }
.bars { background: var(--card); padding: 20px 24px; margin: 14px 0 0; }
.bars .r { display: grid; grid-template-columns: 70px 1fr 64px; gap: 12px; align-items: center; height: 46px; font: 17px/1 var(--serif); }
.bars .track { height: 22px; background: #efe8d2; position: relative; }
.bars .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bike); min-width: 2px; }
.bars .pc { font: 700 22px/1 var(--serif); color: var(--bike); text-align: right; font-variant-numeric: tabular-nums; }
table.wins { width: 100%; border-collapse: collapse; background: var(--card); margin: 14px 0 0; font: 16px/1.25 var(--serif); }
table.wins th { font: 13px/1 var(--sans); color: var(--ink-2); font-weight: 400; text-align: right; padding: 14px 12px 8px; }
table.wins th:first-child, table.wins td:first-child { text-align: left; padding-left: 24px; }
table.wins td { padding: 10px 12px; border-top: 1px solid var(--grid); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.wins td:first-child { white-space: normal; }
table.wins td small { display: block; font: 13px/1.3 var(--sans); color: var(--ink-2); }
table.wins td:last-child, table.wins th:last-child { padding-right: 24px; }
table.wins .g { color: var(--bike); font-weight: 700; }

@media (max-width: 700px) {
  .wrap { padding: 0 12px; }
  header.top .wrap { display: block; padding-top: 12px; }
  .brand { font-size: 21px; }
  .strap { margin-bottom: 10px; font-size: 14px; }
  nav { gap: 18px; overflow-x: auto; }
  nav a { padding-bottom: 10px; font-size: 13px; }
  .pick { grid-template-columns: 1fr 40px; margin: 12px 0 8px; gap: 6px 4px; }
  .pick .field { grid-column: 1; }
  .pick .swap { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-top: 18px; transform: rotate(90deg); }
  .field label { display: none; }
  .field .box { height: 44px; font-size: 17px; }
  .field .box::before { content: attr(data-l); font: 13px/1 var(--sans); color: var(--ink-2); width: 44px; flex: none; font-weight: 400; }
  .bar { margin-bottom: 8px; }
  .seg button { padding: 0 8px; font-size: 14px; }
  .speed { font-size: 13px; } .speed button { min-width: 28px; padding: 0 3px; }
  .foot .btn { margin-top: 8px; }
  .card { padding: 14px 12px 8px; margin: 0 -12px; }
  .card h1 { font-size: 20px; }
  .card .by { font-size: 13px; margin-bottom: 10px; }
  .key { gap: 6px 0; display: grid; grid-template-columns: 1fr 1fr; font-size: 13px; }
  .key .at { grid-column: 1 / -1; }
  .key b { font-size: 22px; }
  .chart { height: 290px; margin: 0 -6px; }
    .foot { display: block; }
  .foot .mean { font-size: 15px; }
  .map { height: 300px; margin: 14px -12px 0; }
  .map.tall { height: 560px; }
  .reachbar { grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 8px; }
  .reachbar .field:first-child { grid-column: 1 / -1; }
  .mapwrap { margin: 0 -12px; }
  .over { padding: 12px; }
  .bar { flex-wrap: wrap; gap: 4px 12px; }
  .over h1 { font-size: 18px; }
  .bikehead h1 { font-size: 20px; }
  .bars { margin: 10px -12px 0; padding: 12px; }
  .bars .r { grid-template-columns: 56px 1fr 54px; }
  table.wins { margin: 10px -12px 0; width: calc(100% + 24px); font-size: 15px; }
  table.wins th:first-child, table.wins td:first-child { padding-left: 12px; }
  table.wins td:last-child, table.wins th:last-child { padding-right: 12px; }
  table.wins .hide { display: none; }
}

.warn { color: var(--sure); font-size: 15px; }
.toast { position: absolute; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 6px 6px 6px 16px; display: flex; gap: 14px; align-items: center; font: 15px/1 var(--sans); white-space: nowrap; }
.toast[hidden] { display: none; }
.toast .btn { height: 36px; background: var(--ink); color: var(--card); border-color: #6a6253; }
.bikehead h1 b { font-weight: 700; }
.bars .r.on span:first-child { font-weight: 700; }
.bars .r { cursor: pointer; }
main > .count { font: 13px/1.4 var(--sans); color: var(--ink-2); margin: 10px 0 0; }
.none { font: 19px/1.3 var(--serif); color: var(--ink-2); background: var(--card); padding: 40px 24px; margin: 14px 0 0; text-align: center; }
@media (max-width: 700px) { .bikehead { align-items: flex-start; flex-direction: column; gap: 6px; margin-top: 14px; } .none { margin: 10px -12px 0; } }
.list .row.off span { color: #a39a85; }
.chart .msg small { font: 16px/1.5 var(--serif); display: block; margin-top: 10px; }
.mapwrap .map { margin: 0; }
.mapkey { background: var(--card); padding: 6px 10px; font: 13px/1 var(--sans); display: flex; align-items: center; gap: 6px; }
.mapkey i { display: inline-block; width: 22px; height: 0; border-top: 4px solid var(--sure); }
.mapkey i.bk { border-top: 4px dotted var(--bike); margin-left: 8px; }
table.wins td.go { color: var(--ink-2); font-size: 20px; padding-left: 0; width: 20px; }
table.wins tr { cursor: pointer; }
.box.sel::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translateY(-3px); flex: none; }
@media (max-width: 700px) { table.wins td, table.wins th { padding-left: 4px; padding-right: 6px; } table.wins td.go, table.wins th:last-child { padding-right: 10px; } table.wins td:nth-last-child(2), table.wins th:nth-last-child(2) { padding-right: 4px; } }
.bars .r.on { background: #f3ecd6; margin: 0 -12px; padding: 0 12px; }
table.wins th a { color: var(--ink); }
.none { display: block; }
.none[hidden] { display: none; }
.box .loc { margin-left: auto; width: 44px; height: 44px; margin-right: -12px; border: 0; background: none; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.chart { margin-bottom: 18px; }
.chart svg { overflow: visible; }

/* the built site: real inputs and links where the mock-ups had pictures of them */
input.box { width: 100%; border-radius: 0; color: var(--ink); appearance: none; outline: none; text-overflow: ellipsis; }
input.box::placeholder { color: #a39a85; font-weight: 400; }
input.box:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); font-weight: 400; }
.list[hidden] { display: none; }
.list .row { cursor: pointer; }
.list .row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg a { display: flex; align-items: center; height: 36px; padding: 0 12px; border-bottom: 2px solid transparent; font: 15px/1 var(--sans); text-decoration: none; }
.seg a.on { font-weight: 700; border-color: var(--ink); }
.card .by a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid #cfc4a4; border-radius: 15px; color: var(--ink); text-decoration: none; }
.card .by a.on { border-color: var(--ink); background: var(--ink); color: var(--card); }
.chart { touch-action: pan-y; }
.chart.short { height: 220px; }
.chart .tip { position: absolute; z-index: 5; max-width: 300px; padding: 8px 10px; background: var(--ink); color: var(--card); font: 13px/1.4 var(--sans); pointer-events: none; }
.chart .tip b { font: 700 16px/1.2 var(--serif); }
.chart .tip[hidden] { display: none; }
.chart .msg a { color: inherit; }
.acts { display: flex; gap: 8px; flex: none; }
.acts[hidden] { display: none; }
.count a { color: inherit; }
.speed button { font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .field label { display: block; position: absolute; left: 14px; top: 0; line-height: 44px; margin: 0; pointer-events: none; }
  .field input.box { padding-left: 58px; }
  .seg a { padding: 0 8px; font-size: 14px; }
  .acts { margin-top: 8px; }
}
.reachbar .field { position: relative; }
.reachbar input.box { padding-right: 48px; }
.reachbar .loc { position: absolute; right: 0; bottom: 1px; width: 46px; height: 44px; margin: 0; border: 0; background: none; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.field select.box { width: 100%; border-radius: 0; color: var(--ink); appearance: none; cursor: pointer; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231e1b15' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center; }
.box.sel::after { content: none; }
.over .btn { height: 36px; margin-left: 10px; }
.bars a.r { text-decoration: none; }
.bars .track, .bars .fill { display: block; }
.bars .msg, .line .msg { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 30px 0; font: 19px/1.3 var(--serif); color: var(--ink-2); }
table.wins[hidden] { display: none; }
table.wins td a { color: inherit; text-decoration: none; }
.none a { color: inherit; }
main > .count a { color: inherit; }
@media (max-width: 700px) { .reachbar .field label { display: none; } .reachbar .field input.box { padding-left: 14px; } }

/* the line page */
.linehead { margin: 24px 0 14px; }
.linehead h1 { font: 400 25px/1.2 var(--serif); margin: 0 0 10px; }
.linehead .by { display: flex; flex-wrap: wrap; gap: 6px; font: 14px/1.3 var(--sans); }
.linehead .by a { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border: 1px solid #cfc4a4; border-radius: 15px; color: var(--ink); text-decoration: none; }
.linehead .by a.on { border-color: var(--ink); background: var(--ink); color: var(--card); }
.line h2 { font: 400 22px/1.2 var(--serif); margin: 0; }
.dayhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.daypick { display: flex; gap: 6px; }
.daypick .btn { width: 44px; padding: 0; font-size: 20px; }
.daypick .btn:disabled { opacity: .3; cursor: default; }
.daypick input.box { width: auto; height: 44px; padding: 0 10px; background: var(--card); border: 1px solid #cfc4a4; font: 15px/1 var(--sans); }
.daykey { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font: 13px/1.3 var(--sans); color: var(--ink-2); margin: 0 0 12px; }
.daykey i { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--sure); margin-left: 10px; }
.daykey i:first-child { margin-left: 0; }
.daykey i.due { border-top-color: var(--due); }
.daykey i.not { border-top: 2px dashed var(--ink-2); }
.daykey i.usual, .daykey i.worst { height: 10px; border: 0; background: var(--sure); }
.daykey i.worst { background: #e3b9a6; }
.daykey i.tick { width: 2px; height: 14px; border: 0; background: var(--timetable); margin-right: 2px; }
.marey { display: flex; }
.marey-stops { position: relative; flex: none; width: 190px; font: 12px/1 var(--sans); color: var(--ink); }
.marey-stops span { position: absolute; right: 10px; left: 0; transform: translateY(-50%); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marey-scroll { position: relative; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; }
.marey-scroll canvas { display: block; }
.marey-scroll .tip { position: absolute; z-index: 5; max-width: 280px; padding: 8px 10px; background: var(--ink); color: var(--card); font: 13px/1.4 var(--sans); pointer-events: none; }
.marey-scroll .tip b { font: 700 15px/1.2 var(--serif); }
.marey-scroll .tip[hidden] { display: none; }
.card.slow { margin-top: 22px; padding-bottom: 20px; }
.card.slow h2 { margin-bottom: 8px; }
.hop { display: grid; grid-template-columns: minmax(0, 300px) 1fr 150px; gap: 14px; align-items: center; min-height: 34px; border-top: 1px solid var(--grid); font: 15px/1.25 var(--serif); }
.hop .track { position: relative; height: 14px; }
.hop .track span { position: absolute; left: 0; top: 0; bottom: 0; }
.hop .track .usual { background: var(--sure); }
.hop .track .worst { background: #e3b9a6; }
.hop .track .tick { width: 2px; top: -3px; bottom: -3px; background: var(--timetable); }
.hop .num { font: 14px/1.2 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hop .num small { display: block; font-size: 12px; color: var(--ink-2); }
.line .msg { padding: 0; font-size: 16px; }
@media (max-width: 700px) {
  .linehead { margin: 14px 0 10px; } .linehead h1 { font-size: 20px; }
  .line h2 { font-size: 18px; }
  .marey-stops { width: 104px; font-size: 11px; }
  .hop { grid-template-columns: 1fr 96px; gap: 2px 10px; padding: 6px 0; }
  .hop .name { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .list .row { display: block; padding: 8px 14px; line-height: 1.25; min-height: 44px; }
  .list .row span, .list .row small { display: block; white-space: normal; }
  .list .row small { margin-top: 3px; }
}
.map[hidden] { display: none; }
.key.stale { opacity: .35; }
.list .row span { flex: none; max-width: 70%; }
.list .row small { min-width: 0; }
@media (max-width: 700px) {
  .over .key { display: block; }
  .over .key div { margin-top: 4px; }
  .list .row span { max-width: none; }
  .marey-stops { width: 118px; }
}
@media (max-width: 700px) { .bars .r { grid-template-columns: 56px 1fr 62px; } .bars .pc { font-size: 19px; white-space: nowrap; } }
