:root {
  --bg: #f6f1e5;
  --bg-soft: #efe7d6;
  --ink: #221c12;
  --ink-soft: #5b5142;
  --line: #d8ccb2;
  --accent: #7a1f1a;
  --accent-soft: #f0ddd3;
  --gold: #9a6b1f;
  --card: #fffdf6;
  --map-land: #e7dcbf;
  --map-line: #b3a37e;
  --map-water: #cfd9d4;
  --ok: #2e6b2e;
  --bad: #a11f1f;
  --focus: #1f5fa8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161310;
    --bg-soft: #1e1a15;
    --ink: #ece4d2;
    --ink-soft: #b3a88f;
    --line: #3a332a;
    --accent: #e08073;
    --accent-soft: #3a2422;
    --gold: #d3a24e;
    --card: #201b16;
    --map-land: #2a251c;
    --map-line: #5c5340;
    --map-water: #232b2a;
    --ok: #7cc47c;
    --bad: #e08073;
    --focus: #7fb3e8;
  }
}
:root[data-theme="dark"] {
  --bg: #161310;
  --bg-soft: #1e1a15;
  --ink: #ece4d2;
  --ink-soft: #b3a88f;
  --line: #3a332a;
  --accent: #e08073;
  --accent-soft: #3a2422;
  --gold: #d3a24e;
  --card: #201b16;
  --map-land: #2a251c;
  --map-line: #5c5340;
  --map-water: #232b2a;
  --ok: #7cc47c;
  --bad: #e08073;
  --focus: #7fb3e8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.075rem;
  line-height: 1.62;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.45rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.85rem;
}
.topbar .home { font-weight: 700; text-decoration: none; white-space: nowrap; }
.topnav { display: flex; gap: 0.8rem; overflow-x: auto; }
.topnav a { text-decoration: none; white-space: nowrap; color: var(--ink-soft); }
.topnav a:hover { color: var(--accent); }
.spacer { flex: 1; }
.langmenu { position: relative; }
.langmenu summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.3rem; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu ul {
  position: absolute;
  right: 0;
  margin: 0.4rem 0 0;
  padding: 0.4rem 0;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  min-width: 8rem;
}
.langmenu li a { display: block; padding: 0.3rem 0.9rem; text-decoration: none; }
.icon-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}
/* the UA stylesheet does not hide svg[hidden]: without this the theme icons never swap */
[hidden] { display: none !important; }
main { display: block; }
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.1rem; }
.hero { padding: 2.2rem 0 1rem; }
.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0 0 0.6rem;
  font-weight: 700;
}
h1 { font-size: 2.5rem; line-height: 1.08; margin: 0 0 0.9rem; letter-spacing: -0.01em; }
.deck { font-size: 1.25rem; line-height: 1.5; margin: 0 0 0.8rem; }
.byline { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.figure { margin: 1.6rem 0; }
.figure img { width: 100%; height: auto; display: block; border-radius: 0.4rem; border: 1px solid var(--line); }
.figure figcaption { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.5rem; }
.figure figcaption .credit { overflow-wrap: anywhere; }
section.block { padding: 1.6rem 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 0.6rem; }
section.block .lede { font-size: 1.12rem; margin: 0 0 1rem; }
.answer-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 0.4rem;
  padding: 1rem 1.2rem;
  margin: 1rem 0 0;
}
.map-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem;
  margin: 1rem 0;
}
.map-svg { width: 100%; height: auto; display: block; }
.map-svg .land { fill: var(--map-land); stroke: var(--map-line); stroke-width: 2; }
.map-svg .water { fill: var(--map-water); }
.map-svg .region { fill: none; stroke: var(--map-line); stroke-width: 1.4; stroke-dasharray: 7 5; opacity: 0.8; }
.map-svg .region-label { font-family: var(--sans); font-size: 17px; letter-spacing: 3px; fill: var(--ink-soft); }
.map-svg .route { fill: none; stroke-width: 3.4; stroke-linecap: round; opacity: 0.9; }
.map-svg .route.r1595 { stroke: #b3541e; }
.map-svg .route.r1599 { stroke: #7a1f1a; }
.map-svg .route.r1600 { stroke: #1f5fa8; }
.map-svg .route.r1601 { stroke: #5b5142; }
.map-svg .route.rpraga { stroke: #9a6b1f; stroke-dasharray: 6 5; }
.map-svg .route.future { opacity: 0.14; }
.map-svg .place-dot { fill: var(--card); stroke: var(--ink-soft); stroke-width: 1.6; }
.map-svg .place-name { font-family: var(--sans); font-size: 13.5px; fill: var(--ink); }
.map-svg .event-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.map-svg .event-dot.done { fill: var(--gold); }
.map-svg .marker { fill: none; stroke: var(--accent); stroke-width: 2.4; }
.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  align-items: baseline;
  font-family: var(--sans);
  margin-top: 0.8rem;
}
.hud .hud-date { font-weight: 700; font-size: 1.02rem; }
.hud .hud-text { flex: 1 1 16rem; font-size: 0.95rem; }
.treasury {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: baseline;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  margin-top: 0.8rem;
  font-family: var(--sans);
}
.treasury .t-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.treasury .t-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.treasury .t-value.low { color: var(--bad); }
.treasury .t-note { flex-basis: 100%; font-size: 0.8rem; color: var(--ink-soft); }
.badge-ilustrativ {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 0.3rem;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
}
.map-controls { display: flex; gap: 0.6rem; margin-top: 0.8rem; font-family: var(--sans); }
.btn {
  font-family: var(--sans);
  font-size: 0.92rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 0.45rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}
:root[data-theme="dark"] .btn, :root:not([data-theme="light"]) .btn { color: #161310; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: default; }
.event-list { margin: 1rem 0 0; padding: 0; list-style: none; font-family: var(--sans); font-size: 0.9rem; }
.event-list li { padding: 0.35rem 0; border-top: 1px dotted var(--line); }
.event-list li.current { font-weight: 700; }
.event-list .ev-date { color: var(--gold); font-weight: 700; margin-right: 0.5rem; }
.chapter { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: none; }
.chapter-head { display: flex; gap: 0.9rem; align-items: baseline; }
.seal {
  flex: none;
  font-family: var(--sans);
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 0.35rem;
  padding: 0.1rem 0.55rem;
  font-size: 0.95rem;
}
:root[data-theme="dark"] .seal, :root:not([data-theme="light"]) .seal { color: #161310; }
.chapter h3 { margin: 0; font-size: 1.45rem; }
.chapter .dates { font-family: var(--sans); color: var(--gold); font-weight: 700; margin: 0.2rem 0 0.6rem; }
.scene {
  background: var(--bg-soft);
  border-left: 5px solid var(--gold);
  border-radius: 0.3rem;
  padding: 0.9rem 1.1rem;
  margin: 1.1rem 0;
}
.scene h4 { font-family: var(--sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin: 0 0 0.5rem; }
.scene blockquote { margin: 0; font-style: italic; }
.scene .src { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); margin: 0.5rem 0 0; }
.meanwhile {
  border: 1px dashed var(--gold);
  border-radius: 0.4rem;
  padding: 0.7rem 1rem;
  margin: 1rem 0;
  font-size: 0.98rem;
}
.meanwhile h4 { font-family: var(--sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin: 0 0 0.3rem; }
.meanwhile p { margin: 0; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.8rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.numbers li { background: var(--card); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.8rem 1rem; }
.numbers .n-value { font-size: 1.3rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.numbers .n-label { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.game-shell { background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; padding: 1rem; margin: 1rem 0 0; }
.game-shell ol.rules { margin: 0 0 1rem; padding-left: 1.3rem; font-size: 0.98rem; }
.game-board { border-top: 1px solid var(--line); padding-top: 1rem; font-family: var(--sans); }
.game-top { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; align-items: baseline; margin-bottom: 0.8rem; }
.game-top .g-month { font-weight: 700; font-size: 1.1rem; }
.game-top .g-money { font-variant-numeric: tabular-nums; }
.claimants { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.7rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.claimant { border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.7rem 0.8rem; background: var(--bg); }
.claimant.paid { border-color: var(--ok); }
.claimant h4 { margin: 0 0 0.2rem; font-size: 1rem; }
.claimant .c-demand { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 0.3rem; }
.claimant .c-loyal { font-size: 0.85rem; margin: 0 0 0.5rem; }
.claimant .c-throne { font-size: 0.8rem; color: var(--gold); margin: 0 0 0.5rem; }
.claimant button { font-size: 0.85rem; padding: 0.35rem 0.8rem; }
.thrones { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 1rem; padding: 0; list-style: none; font-size: 0.9rem; }
.thrones li { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.8rem; }
.thrones li.lost { opacity: 0.45; text-decoration: line-through; }
.game-result { border-radius: 0.5rem; padding: 0.9rem 1rem; margin: 1rem 0 0; font-size: 1.02rem; }
.game-result.win { background: var(--accent-soft); border: 1px solid var(--ok); }
.game-result.lose { background: var(--accent-soft); border: 1px solid var(--bad); }
.game-log { font-size: 0.82rem; color: var(--ink-soft); max-height: 9rem; overflow: auto; margin: 0.8rem 0 0; padding-left: 1.2rem; }
.myth { background: var(--card); border: 1px solid var(--line); border-radius: 0.5rem; padding: 1rem 1.1rem; margin: 0.9rem 0; }
.myth h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.myth .verdict { display: inline-block; font-family: var(--sans); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; background: var(--accent); color: #fff; border-radius: 0.3rem; padding: 0.15rem 0.6rem; margin-bottom: 0.5rem; }
:root[data-theme="dark"] .myth .verdict, :root:not([data-theme="light"]) .myth .verdict { color: #161310; }
.myth p { margin: 0; }
.sources-group h3 { font-size: 1.15rem; margin: 1.2rem 0 0.4rem; }
.sources-group ul { margin: 0; padding-left: 1.2rem; font-size: 0.95rem; overflow-wrap: anywhere; }
.scene .src, .figure figcaption, .event-list li { overflow-wrap: anywhere; }
.sources-group li { margin: 0.3rem 0; }
.method-list { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.method-list li { margin: 0.4rem 0; }
footer.site { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.2rem 0 2.5rem; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.rail { position: fixed; right: 0.7rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0.55rem; z-index: 15; }
.rail-dot { display: flex; align-items: center; gap: 0.4rem; text-decoration: none; }
.rail-dot .dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--ink-soft); background: var(--bg); }
.rail-dot.active .dot { background: var(--accent); border-color: var(--accent); }
.rail-label { display: none; font-family: var(--sans); font-size: 0.75rem; color: var(--ink-soft); }
@media (max-width: 70rem) { .rail { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  h1 { font-size: 2rem; }
  .deck { font-size: 1.1rem; }
  .topnav { display: none; }
  .map-svg .place-name { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
/* brancoveanu-1714: the 1714 road, clickable places, verdict cards */
.no-js .card-buttons, .no-js #game-restart { display: none; }
.map-svg .route.r1714 { stroke: #7a1f1a; }
.map-svg .place-dot { cursor: pointer; }
.map-svg .place-dot:focus { outline: none; stroke: var(--accent); stroke-width: 3; }
.cards { display: grid; gap: 0.9rem; margin: 1rem 0 0; }
.card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.9rem 1rem; }
.card-claim { font-weight: 700; margin: 0 0 0.6rem; }
.card-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.card-buttons .btn { min-height: 44px; }
.card-answer { margin-top: 0.7rem; }
.card-answer summary { cursor: pointer; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.card.answered.right { border-color: var(--ok); }
.card.answered.wrong { border-color: var(--bad); }
.game-score { font-family: var(--sans); font-weight: 700; margin: 1rem 0 0; }
