/* sumuleu-csiksomlyo: dawn road — packed-earth ochre on mountain blue-grey */
@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201F, U+2212;
}
@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: "Atkinson"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/atkinson-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201F, U+2212;
}
@font-face {
  font-family: "Atkinson"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/atkinson-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: "PlexMono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/plexmono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201F, U+2212;
}
@font-face {
  font-family: "PlexMono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/plexmono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
:root {
  --bg:#f4ecdc; --paper2:#ece0c8; --ink:#241c12; --ink-2:#5a4c38;
  --kicker:#3d5a73; --road1:#a86a12; --road2:#5c6b3c; --road3:#3d5a73;
  --muted:#6b6259; --link:#2a6f97; --card:#fffdf4;
  --btn:#3d5a73; --btnink:#ffffff;
  --line:#d8c9ab; --serif: "Newsreader", Georgia, serif; --sans: "Atkinson", system-ui, sans-serif;
  --mono: "PlexMono", ui-monospace, monospace;
}
:root[data-theme="dark"]{
  --bg:#141b24; --paper2:#1e2735; --ink:#ece1cc; --ink-2:#c9bda4;
  --kicker:#e0a83f; --road1:#e0a83f; --road2:#9db37a; --road3:#8fb4d4;
  --muted:#a89c88; --link:#8fb4d4; --card:#1e2735;
  --btn:#8fb4d4; --btnink:#141b24; --line:#3a4657;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 19px; line-height: 1.65;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--card); padding: 6px 12px; }
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; background: var(--paper2); border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: 15px;
}
.topbar a { color: var(--ink); text-decoration: none; }
.topbar .home { font-size: 20px; }
.topbar .crumb { color: var(--ink-2); }
.topbar .spacer { flex: 1; }
.topbar .lang { border: 1px solid var(--line); border-radius: 20px; padding: 2px 12px; }
.topbar .them { background: none; border: 1px solid var(--line); border-radius: 20px; width: 34px; height: 24px; cursor: pointer; }
.rail { display: none; }
main { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }
.beat { max-width: 680px; margin: 0 auto; padding: 36px 0; }
.beat.wide { max-width: none; }
.kicker {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--kicker); margin: 0 0 6px;
}
h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.08; margin: 12px 0; font-weight: 650; }
h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin: 0 0 14px; font-weight: 650; }
h3 { font-size: 22px; margin: 26px 0 8px; }
h4 { font-family: var(--sans); font-size: 16px; margin: 18px 0 4px; }
.deck { font-size: 21px; color: var(--ink-2); }
.hero figure { margin: 22px -20px 0; }
figure.still { margin: 22px 0 0; }
figure.still img { width: 100%; height: auto; display: block; border-radius: 6px; }
figcaption { font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin-top: 8px; }
figcaption .credit { opacity: 0.8; }
.hint, .skipstory { font-family: var(--sans); font-size: 15px; color: var(--ink-2); }
a { color: var(--link); }

/* ---- pinned story ---- */
.story { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 28px; align-items: start; }
.story .col { min-width: 0; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 20px; margin: 0 0 70vh;
}
.step:first-child { margin-top: 12px; }
.step:last-child { margin-bottom: 12px; }
.step.on { border-color: var(--road1); border-left-width: 6px; }
.step p { margin: 10px 0; font-size: 18px; }
.stage {
  position: sticky; top: 56px; height: calc(100vh - 72px); min-height: 480px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; display: flex; flex-direction: column;
}
.stagebar {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: 14px;
}
.stagebar .hud-step { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#map { flex: 1; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: manipulation; }
.county { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.road { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.road.m01 { stroke: var(--road1); stroke-width: 3; }
.road.m05s { stroke: var(--road2); stroke-width: 3; }
.road.m05e { stroke: var(--road3); stroke-width: 3; }
.road.dim, .road.dim2 { opacity: 0.22; }
.road.rest { stroke-width: 4.5; }
.town { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.6; }
.monastery { fill: var(--road1); stroke: var(--card); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dot .halo { fill: transparent; }
.dot .pip { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.dot.on .pip { fill: var(--road1); stroke: var(--card); }
.dot:focus { outline: none; }
.dot:focus .pip { stroke: var(--link); stroke-width: 2.6; }
#map.live .town { display: none; }
.pin .ping { fill: none; stroke: var(--road1); stroke-width: 2; opacity: 0.8; vector-effect: non-scaling-stroke; }
.pin .core { fill: var(--road1); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.connector { stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.lab { font-family: var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 3px; }
.lab.big { font-weight: 700; }
.lab.pinlab { font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .pin .ping { animation: ping 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }
}

/* ---- lookup + verdict ---- */
.lookup { position: relative; padding: 10px 12px 4px; }
.lookup label { font-family: var(--sans); font-size: 14px; display: block; margin-bottom: 4px; }
.lookup .row { display: flex; gap: 8px; }
.lookup input {
  flex: 1; font: inherit; font-family: var(--sans); font-size: 16px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink);
}
.lookup button.go {
  font-family: var(--sans); font-size: 16px; padding: 8px 16px; border: none; border-radius: 6px;
  background: var(--btn); color: var(--btnink); cursor: pointer;
}
#town-list {
  position: absolute; z-index: 20; left: 12px; right: 12px; top: 100%; margin: 2px 0 0; padding: 4px;
  list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--sans); font-size: 15px; max-height: 240px; overflow: auto;
}
#town-list li { padding: 6px 8px; cursor: pointer; }
#town-list li:hover { background: var(--paper2); }
.resetline { margin: 6px 0 0; }
button.reset, button.more, .examples button, .v-morelink {
  font-family: var(--sans); font-size: 14px; padding: 6px 12px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
}
.verdict {
  margin: 10px 12px; padding: 12px 14px; border-radius: 8px; background: var(--paper2);
  border-left: 6px solid var(--road1); font-family: var(--sans);
}
.v-verdict { font-size: 24px; font-weight: 700; margin: 0; font-family: var(--serif); }
.v-town { margin: 2px 0 6px; color: var(--ink-2); }
.v-rows { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 15px; }
.v-secs h4 { margin: 10px 0 4px; }
.v-seclist { margin: 0; padding-left: 20px; font-size: 14px; }
.v-seclist li { margin-bottom: 2px; }
.v-morelink { margin-top: 6px; }
.v-also, .v-note { font-size: 14px; color: var(--ink-2); }
.v-link { font-size: 14px; }
.examples { font-size: 18px; }
.examples li { margin-bottom: 10px; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; margin: 12px 0; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
td.num { font-family: var(--mono); white-space: nowrap; }
.related ul { list-style: none; display: flex; gap: 16px; padding: 0; font-family: var(--sans); }
footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 12px; font-family: var(--sans); font-size: 14px; color: var(--ink-2); }

@media (min-width: 1100px) {
  .rail { display: block; position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 40; }
  .rail ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .rail a {
    display: block; width: 12px; height: 12px; border-radius: 50%;
    background: var(--line); overflow: hidden; text-indent: -999px; white-space: nowrap;
  }
  .rail a.on { background: var(--road1); }
}
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .stage { position: sticky; top: 48px; height: 40vh; min-height: 200px; order: -1; }
  .step { margin-bottom: 46vh; }
  body { font-size: 18px; }
  .topbar { font-size: 13px; gap: 8px; }
  .topbar .crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
@media (max-width: 420px) {
  main { padding: 0 14px 50px; }
  .v-verdict { font-size: 20px; }
}


/* share row (standards/v2/tools/share_row.py) */
.share-row{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.share-row .lab{font-size:.95rem;margin-inline-end:.3rem}
.share-row a,.share-row button{display:inline-grid;place-items:center;flex:none;width:2.5rem;height:2.5rem;padding:0;border-radius:50%;border:1px solid var(--sr-line,color-mix(in srgb,currentColor 28%,transparent));background:transparent;color:var(--sr-ink,inherit);text-decoration:none;cursor:pointer;font:inherit;transition:color .15s,border-color .15s}
.share-row a:hover,.share-row button:hover,.share-row a:focus-visible,.share-row button:focus-visible{color:var(--sr-acc,inherit);border-color:var(--sr-acc,currentColor)}
.share-row [hidden]{display:none}
@media (pointer:coarse){.share-row a,.share-row button{width:2.75rem;height:2.75rem}}
@media (max-width:30rem){.share-row .lab{flex-basis:100%;margin:0 0 .15rem}}
.share-status{font-size:.92rem;color:var(--sr-ok,inherit);min-height:1.2em;margin:.4rem 0 0}
.share-status:empty{display:none}
.share-field{display:block;width:100%;max-width:36rem;margin-top:.4rem;font:inherit;font-size:.9rem}
