@font-face {
  font-family: "Overpass";
  src: url("/static/fonts/overpass-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --concrete: #edf0f2;
  --ink: #18222d;
  --route: #0b4f8a;
  --signal: #e0a100;
  --muted: #56626e;
  --rule: #c7cfd6;
  --paper: #ffffff;
  --error: #a4261d;
  --measure: 42rem;
  --line: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  background: var(--concrete);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Overpass", system-ui, sans-serif;
}

a { color: var(--route); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; }

code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.86em; }
var { font-style: italic; }

.skip { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: var(--concrete); padding: 0.5rem 0.75rem; }
.skip:focus { top: 1rem; }

/* Header */
.top {
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; align-items: baseline; justify-content: space-between;
  max-width: 72rem; margin: 0 auto; padding: 1.25rem 1.25rem 0;
}
.brand { font-weight: 750; color: var(--ink); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.top nav a { color: var(--ink); }

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

section { padding: 3.5rem 0 1rem; }
section > p, section > dl, section > form, section > pre, .legend { max-width: var(--measure); }

/* Intro: the name set big, in signage weight */
.intro { padding-top: 4.5rem; }
h1 {
  margin: 0 0 1.5rem;
  font-weight: 850;
  font-size: clamp(2.75rem, 8.5vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  max-width: 11ch;
}
.lead { font-size: 1.3rem; line-height: 1.5; }

h2 { font-size: 1.75rem; font-weight: 800; line-height: 1.2; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; font-weight: 750; margin: 0 0 1.25rem; }
h4 { font-size: 1.1rem; font-weight: 700; margin: 0; line-height: 1.3; }

/* Stops: open ring = timetables, filled = live delays, extra ring = positions too */
.stop {
  display: inline-block; flex: none;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 4px solid var(--route); background: var(--paper);
}
.stop--live, .stop--positions { background: var(--signal); }
.stop--positions { box-shadow: 0 0 0 3px var(--concrete), 0 0 0 6px var(--signal); }

.legend { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 0.6rem; }

.lines { display: grid; gap: 2.5rem 4rem; margin-top: 2.5rem; }
@media (min-width: 60rem) { .lines { grid-template-columns: 1fr 1fr; } }

.count { color: var(--muted); font-weight: 400; }

.stops { list-style: none; margin: 0; padding: 0; position: relative; }
.stops::before {
  content: ""; position: absolute; left: calc(0.55rem - var(--line) / 2); top: 0.4rem; bottom: 0.4rem;
  width: var(--line); background: var(--route); border-radius: 3px;
}
.country { position: relative; padding: 0 0 1.4rem 2.25rem; }
.country:last-child { padding-bottom: 0; }
.country > .stop { position: absolute; left: 0; top: 0.1rem; }

.providers { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.providers li { margin-top: 0.35rem; line-height: 1.45; }
.operator { display: block; }
.kept, .credit { display: block; color: var(--muted); font-size: 0.93rem; }
.source { color: var(--route); font-size: 0.8rem; }

.note { color: var(--muted); margin-top: 2.5rem; }

/* Data */
.paths dt { font-weight: 700; margin-top: 1.25rem; }
.paths dd { margin: 0.35rem 0 0; }
.paths dd > code { display: block; overflow-wrap: anywhere; background: var(--paper); border-left: var(--line) solid var(--route); padding: 0.6rem 0.8rem; }
.paths dd p { margin: 0.5rem 0 0; color: var(--muted); }

pre {
  background: var(--ink); color: var(--concrete);
  padding: 1rem 1.2rem; line-height: 1.5; border-radius: 3px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Form */
form { margin-top: 1.5rem; }
.field { margin: 0 0 1.4rem; padding: 0; border: 0; }
label, legend { display: block; font-weight: 650; }
.optional { font-weight: 400; color: var(--muted); }
.hint { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.93rem; }
input[type="text"], input[type="email"], input[type="url"], textarea {
  display: block; width: 100%; margin-top: 0.4rem;
  font: inherit; color: inherit; background: var(--paper);
  border: 2px solid var(--rule); border-radius: 3px; padding: 0.55rem 0.7rem;
}
input:focus-visible, textarea:focus-visible { border-color: var(--route); outline-offset: 1px; }
textarea { resize: vertical; min-height: 6rem; }
.choice { font-weight: 400; display: flex; gap: 0.6rem; align-items: center; margin-top: 0.45rem; }
.choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--route); margin: 0; }

.field--error input, .field--error textarea { border-color: var(--error); }
.field-error, .error { color: var(--error); font-weight: 600; margin: 0.25rem 0 0; }
.error { margin: 1rem 0 0; }
.sent { background: var(--paper); border-left: var(--line) solid var(--signal); padding: 0.75rem 1rem; font-weight: 600; }

button {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--route); color: var(--paper);
  border: 0; border-radius: 3px; padding: 0.75rem 1.4rem;
}
button:hover { background: #083c69; }

.privacy { color: var(--muted); font-size: 0.93rem; margin-top: 1.25rem; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.bottom { max-width: 72rem; margin: 3rem auto 0; padding: 1.5rem 1.25rem 3rem; border-top: 1px solid var(--rule); color: var(--muted); }
