/* The past-city pages the API renders (backend/src/city_pages.rs): /cities and
   /cities/{slug}. Colours and fonts follow src/styles/base.css; the map's
   colours are mapcolors.json's "standard" set. The CSP allows no inline
   styles, so everything those pages draw is styled here. */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/schibsted-grotesk-variable.woff2') format('woff2');
}
:root {
  color-scheme: light;
  --ink: #14181c;
  --muted: #5c646b;
  --line: #dfe1e3;
  --bar: #e9ebed;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 'Schibsted Grotesk', sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: #2563c9; }
a:hover { color: var(--ink); }
.top,
main,
footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 16px;
}
.top,
.pager,
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.brand,
h1,
h2 {
  font-family: 'Schibsted Grotesk', sans-serif;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand img {
  display: block;
}
.top .play,
.button {
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.top .play:hover, .button:hover { color: #fff; background: #2b3238; }
h1 {
  margin: 8px 0;
  font-size: 34px;
  font-weight: 800;
}
h2 { margin: 32px 0 10px; font-size: 20px; }
.crumbs, .meta, .days .country, .days time, figcaption, .clues span:last-child, footer {
  color: var(--muted);
}
.crumbs, figcaption, footer { font-size: 14px; }

/* The index: one list per month. */
.days {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.days li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.days a {
  flex: 1 1 260px;
  color: var(--ink);
  text-decoration: none;
}
.days a:hover .city { text-decoration: underline; }
.days .num {
  display: inline-block;
  min-width: 3.2em;
  color: var(--muted);
}
.days .city { font-weight: 700; }
.days time, .days .share { font-size: 14px; }
.days .share { min-width: 8.5em; text-align: right; }

/* A city's map, drawn as the game draws it. */
figure { margin: 0; text-align: center; }
.citymap {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 8px;
}
.citymap .land { fill: #f3f2ec; }
.citymap .edge {
  fill: none;
  stroke: #a9adb1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}
.citymap .a { fill-rule: evenodd; }
.citymap .l {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
/* Line widths in px, as the game draws them at about this scale. */
.m-green { fill: #bfe0a8; }
.m-water { fill: #bcd8f5; stroke: #2563c9; stroke-width: 0.7; }
.m-runway { fill: #d9d8d0; }
.m-stream { stroke: #2563c9; stroke-width: 0.6; }
.m-canal { stroke: #9cc4ee; stroke-width: 1.5; }
.m-river { stroke: #9cc4ee; stroke-width: 2; }
.m-minor { stroke: #cdccc6; stroke-width: 0.9; }
.m-secondary { stroke: #a3a5a4; stroke-width: 1.4; }
.m-primary { stroke: #787c80; stroke-width: 1.9; }
.m-rail { stroke: #3f464d; stroke-width: 0.7; }
.m-motorway { stroke: #f0531c; stroke-width: 2.5; }

/* Results: one section per daily, one bar per clue. */
.clues {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.clues li {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr) 6.5em;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 15px;
}
.clues span:first-child { white-space: nowrap; }
.clues span:last-child { text-align: right; }
progress {
  width: 100%;
  height: 12px;
  border: 0;
  border-radius: 6px;
  background: var(--bar);
  appearance: none;
}
progress::-webkit-progress-bar { background: var(--bar); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--ink); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--ink); border-radius: 6px; }
.pager {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.cta { margin: 28px 0 0; text-align: center; }
footer { justify-content: flex-start; border-top: 1px solid var(--line); }

@media (max-width: 520px) {
  h1 { font-size: 27px; }
  .top .play { padding: 7px 12px; font-size: 14px; }
  .clues li {
    grid-template-columns: 8.4em minmax(0, 1fr) 5.8em;
    gap: 8px;
    font-size: 14px;
  }
  .days .share { min-width: 0; }
  .m-minor { stroke-width: 0.6; }
  .m-secondary { stroke-width: 1; }
  .m-primary, .m-motorway, .m-river { stroke-width: 1.5; }
}

.about p { max-width: 68ch; }
