/* Document pages (one terrain, a country's list, a championship). They reuse the app's tokens and components
   from app.css; this file only adds the reading layout. */
html:has(body.page), body.page { height: auto; min-height: 100%; }
body.page { display: flex; flex-direction: column; }
.page .bar { position: sticky; top: 0; }
.page a.brand { color: inherit; text-decoration: none; }
.links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.links a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; text-decoration: none; transition: background-color .15s var(--ease), color .15s var(--ease); }
.links a:hover { background: var(--surface-2); color: var(--ink); }
.doc { width: 100%; max-width: 880px; margin: 0 auto; padding: 28px 20px 56px; display: grid; gap: 22px; flex: 1; align-content: start; }
.doc article, .doc section { display: grid; gap: 16px; }
.doc h1 { margin: 0; font: 800 clamp(28px, 5vw, 44px)/1.04 var(--display); font-stretch: 112%; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.doc h2 { margin: 14px 0 0; font: 700 21px/1.2 var(--display); font-stretch: 108%; letter-spacing: -.01em; }
.lead { margin: 0; font-size: 18px; color: var(--muted); max-width: 65ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: inherit; }
.doc .trace { max-height: 320px; aspect-ratio: 32 / 15; }
.doc .facts { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.doc .facts div { background: var(--surface); border: 1px solid var(--line); }
.index, .dated { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.index li, .dated li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 9px 12px; border-radius: var(--r-ctl); }
.index li:nth-child(odd), .dated li:nth-child(odd) { background: var(--surface); }
.index a, .dated a { font-weight: 550; overflow-wrap: anywhere; }
.index span { color: var(--muted); font-size: 14px; text-align: right; }
.dated li { justify-content: flex-start; }
.dated span { color: var(--muted); font-size: 14px; min-width: 9.5em; font-variant-numeric: tabular-nums; }
.index.cols { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.index.cols li { background: var(--surface); border: 1px solid var(--line); }
.foot { padding: 18px 20px 28px; font-size: 13px; color: var(--muted); text-align: center; border-top: 1px solid var(--line); }
@media (max-width: 899px) {
  .page .brand span { display: inline; }
  .links a { padding: 6px 9px; font-size: 14px; }
  .index li { flex-direction: column; gap: 2px; }
  .index span { text-align: left; }
}
