/* Static line and country pages (build_line_pages.py); same palette as index.html */
:root {
  color-scheme: light;
  --bg: #f4f2ed; --surface: #fff; --ink: #1d2733; --ink-2: #3d4652; --muted: #737069;
  --line: #e3dfd5; --accent: #e0592a; --accent-soft: #fbe9e1; --route: #24618f;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--route); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; height: 56px; background: var(--ink); }
.top a { color: #fff; text-decoration: none; }
.logo { font-weight: 800; letter-spacing: -.01em; font-size: 18px; }
.top nav { display: flex; gap: 16px; font-size: 15px; }
.top nav a { opacity: .85; }
main { max-width: 820px; margin: 0 auto; padding: 16px 16px 40px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 4px 0 14px; }
h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; margin: 4px 0 12px; letter-spacing: -.015em; overflow-wrap: anywhere; }
h2 { font-size: 20px; margin: 30px 0 10px; }
.type { margin: 0; color: var(--accent); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.lead { font-size: 17px; color: var(--ink-2); }
.hero { margin: 0 0 14px; }
.hero img { display: block; width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius); background: var(--line); }
.hero figcaption, .profile figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.hero figcaption a { color: inherit; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 18px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat:first-child { border-color: var(--accent); background: var(--accent-soft); }
.stat .k { display: block; font-size: 12px; color: var(--muted); }
.stat b { display: block; font-size: 22px; }
.stat small { color: var(--muted); font-size: 12px; }
.profile { margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.chart { display: block; width: 100%; height: auto; }
.chart .ground { fill: #d9d3c6; stroke: #a59d8c; stroke-width: 1; }
.chart .wire { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .pylon { stroke: var(--ink-2); stroke-width: 2; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font: 12px var(--font); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 18px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 14px; }
.chip.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.ride { background: var(--surface); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 10px 10px 0; color: var(--ink-2); }
.nearby { padding-left: 18px; }
.nearby li { margin: 4px 0; }
.nearby span, .countries span { color: var(--muted); font-size: 14px; }
.notes { font-size: 13px; color: var(--muted); margin-top: 26px; }
.countries { columns: 2 220px; padding-left: 18px; }
.countries li { margin: 3px 0; break-inside: avoid; }
.list { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; font-size: 14px; }
.list th, .list td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.list th:first-child, .list td:first-child { overflow-wrap: anywhere; }
.list th { font-weight: 600; color: var(--muted); font-size: 12px; }
.list td:nth-child(n+3), .list th:nth-child(n+3) { text-align: right; white-space: nowrap; }
@media (max-width: 560px) { .list th:nth-child(2), .list td:nth-child(2), .list th:nth-child(4), .list td:nth-child(4) { display: none; } }
footer { max-width: 820px; margin: 0 auto; padding: 20px 16px 30px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
footer a { color: inherit; }
@media (max-width: 560px) { .chart .ax { font-size: 22px; } .profile { padding: 6px; } }
.chart .mark { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .mark-label { fill: var(--ink); font: 600 13px var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.scare { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 10px; margin: 0 0 18px; }
.scare h2 { margin-top: 12px; }
.meter { margin: 0; }
.meter b { font-size: 40px; color: var(--accent); }
.meter span { color: var(--muted); font-weight: 600; }
.scare ul { padding-left: 18px; }
.small { font-size: 14px; color: var(--muted); }
.scare-list td:first-child, .scare-list th:first-child { width: 2em; color: var(--muted); white-space: nowrap; }
.scare-list th:nth-child(2), .scare-list td:nth-child(2) { overflow-wrap: anywhere; }
@media (max-width: 560px) { .chart .mark-label { font-size: 22px; } }
@media (max-width: 560px) {
  .scare-list th:nth-child(2), .scare-list td:nth-child(2), .scare-list th:nth-child(4), .scare-list td:nth-child(4) { display: table-cell; }
  .scare-list th:nth-child(3), .scare-list td:nth-child(3), .scare-list th:nth-child(6), .scare-list td:nth-child(6) { display: none; }
}
.start { margin: 0 0 18px; }
.start p { color: var(--ink-2); }
.near { margin: 18px 0 0; }
.near h2 { margin-top: 22px; }
.near button:disabled { opacity: .6; }
