:root {
  --bg: #f6f1e5; --bg-surface: #fffdf7; --text-primary: #1e1c15; --text-secondary: #5c5747;
  --text-muted: #8a8474; --border: #e2d9c4; --border-strong: #c9bfa4; --accent: #1d3a5f;
  --accent2: #4d7a3a; --oxide: #a34a2a; --focus: #1d3a5f; --map-bg: #ece5d2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191713; --bg-surface: #22201a; --text-primary: #ece7d8; --text-secondary: #b7b09c;
    --text-muted: #8a8474; --border: #3a362c; --border-strong: #57503d; --accent: #7aa8e0;
    --accent2: #8fb573; --oxide: #d08a6a; --focus: #7aa8e0; --map-bg: #22262b;
  }
}
[data-theme="dark"] {
  --bg: #191713; --bg-surface: #22201a; --text-primary: #ece7d8; --text-secondary: #b7b09c;
  --text-muted: #8a8474; --border: #3a362c; --border-strong: #57503d; --accent: #7aa8e0;
  --accent2: #8fb573; --oxide: #d08a6a; --focus: #7aa8e0; --map-bg: #22262b;
}
[data-theme="light"] {
  --bg: #f6f1e5; --bg-surface: #fffdf7; --text-primary: #1e1c15; --text-secondary: #5c5747;
  --text-muted: #8a8474; --border: #e2d9c4; --border-strong: #c9bfa4; --accent: #1d3a5f;
  --accent2: #4d7a3a; --oxide: #a34a2a; --focus: #1d3a5f; --map-bg: #ece5d2;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif; line-height: 1.65; }
main { max-width: 46rem; margin: 0 auto; padding: 0 1rem 3rem; }
h1 { font-size: 2.1rem; line-height: 1.12; margin: 0.4rem 0 0.8rem; }
h2 { font-size: 1.5rem; margin: 2.8rem 0 0.8rem; line-height: 1.25; }
h3 { font-size: 1.12rem; margin: 1.7rem 0 0.5rem; }
h4 { font-size: 1rem; margin: 0 0 0.5rem; }
p { margin: 0.7rem 0; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; border-radius: 8px; }
.kicker { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.8rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); margin: 1.2rem 0 0; }
.kicker2 { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--oxide); margin: 0; }
.deck { font-size: 1.12rem; color: var(--text-secondary); }
.byline { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.82rem; color: var(--text-muted); }
.note, .gloss { font-size: 0.9rem; color: var(--text-secondary); }
.tagline { font-style: italic; color: var(--text-secondary); border-left: 3px solid var(--accent);
  padding-left: 0.7rem; }
.topbar { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 10; }
.topbar .brand { font-weight: bold; color: var(--text-primary); text-decoration: none;
  font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.9rem; white-space: nowrap; }
nav.rail { display: flex; gap: 0.9rem; overflow-x: auto; font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem; }
nav.rail a { color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
nav.rail a[aria-current="true"] { color: var(--text-primary); font-weight: bold; }
a.lang { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.82rem; font-weight: bold;
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 0.15rem 0.5rem;
  text-decoration: none; color: var(--text-primary); white-space: nowrap; }
button.theme { background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 2rem; height: 2rem; cursor: pointer; color: var(--text-primary); font-size: 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
figure { margin: 1rem 0; }
figcaption { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.35rem; }
.credit { font-size: 0.8rem; color: var(--text-muted); margin: 0.2rem 0; }
.duo { display: grid; gap: 1rem; margin: 1rem 0; }
@media (min-width: 720px) { .duo { grid-template-columns: 1fr 1.4fr; align-items: start; } }
blockquote { border-left: 3px solid var(--border-strong); margin: 1rem 0; padding: 0.2rem 0 0.2rem 1rem;
  font-style: italic; }
section.answer { border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg-surface);
  padding: 0.4rem 1.1rem 1.1rem; margin-top: 1.4rem; }
section.answer h2, section.interlude h2 { margin-top: 1rem; }
section.interlude { border-left: 4px solid var(--accent); background: var(--bg-surface);
  border-radius: 0 10px 10px 0; padding: 0.4rem 1rem 1rem; margin-top: 2.4rem; }
.keylist { list-style: none; padding: 0; margin: 1rem 0; }
.keylist li { padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.keylist strong { display: block; }
.keylist span { display: block; color: var(--text-primary); font-size: 0.95rem; }
.keylist li > em { display: block; font-style: normal; font-size: 0.82rem; color: var(--text-secondary);
  font-family: -apple-system, "Segoe UI", sans-serif; }
.journey svg, .locus { width: 100%; height: auto; background: var(--map-bg); border-radius: 10px; }
.journey .track { stroke: var(--border-strong); stroke-width: 2; }
.journey .runner { stroke: var(--oxide); stroke-width: 2.5; stroke-dasharray: 60 560;
  animation: run 3.2s linear infinite; }
@keyframes run { from { stroke-dashoffset: 620; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .journey .runner { animation: none; stroke-dasharray: none; }
  .vleft, .vright { transition: none; }
}
.node { fill: var(--accent); }
.node.hot { fill: var(--oxide); }
.jy { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 14px; font-weight: bold; fill: var(--text-primary); }
.jlab { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 13px; fill: var(--text-primary); }
.jlab.dim { fill: var(--text-secondary); }
.locus .street { stroke: var(--border-strong); stroke-width: 3; }
.locus .zone { fill: none; stroke: var(--oxide); stroke-width: 2.5; stroke-dasharray: 8 5; }
.chain { list-style: none; padding: 0; margin: 1rem 0; }
.chain li { position: relative; padding: 0.5rem 0 0.9rem 1.6rem; border-left: 2px solid var(--border-strong); margin-left: 0.4rem; }
.chain li::before { content: ""; position: absolute; left: -7px; top: 0.9rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.chain li:last-child::before { background: var(--oxide); border-color: var(--oxide); }
.chain strong { display: block; }
.chain span { font-size: 0.88rem; color: var(--text-secondary); }
.tabbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0; }
.tabbar button { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.85rem;
  padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--bg-surface); color: var(--text-primary); cursor: pointer; }
.tabbar button[aria-pressed="true"] { background: var(--text-primary); color: var(--bg);
  border-color: var(--text-primary); }
.apanel { border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem;
  margin: 0.4rem 0; background: var(--bg-surface); }
.apanel[hidden] { display: none; }
.apanel .scaieni { border-top: 1px dashed var(--border-strong); padding-top: 0.5rem; }
.kgrid { display: grid; gap: 1rem; margin: 1rem 0; }
@media (min-width: 720px) { .kgrid { grid-template-columns: 1fr 1fr 1fr; } }
.kgrid h3 { margin-top: 0.4rem; }
.kgrid ul { padding-left: 1.1rem; margin: 0.4rem 0; font-size: 0.9rem; }
.kgrid li { margin-bottom: 0.4rem; }
.contract { display: grid; gap: 1rem; margin: 1rem 0; }
.cpair { border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem; background: var(--bg-surface); }
.cpair.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plab { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.75rem; font-weight: bold;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); margin: 0.4rem 0 0.2rem; }
.rcol { border-top: 1px dashed var(--border-strong); margin-top: 0.4rem; }
@media (min-width: 720px) {
  .cpair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
  .cpair h4 { grid-column: 1 / -1; }
  .rcol { border-top: none; border-left: 1px dashed var(--border-strong); padding-left: 1.2rem; margin-top: 0; }
}
.dotfield { display: flex; flex-wrap: wrap; gap: 5px; margin: 0.6rem 0; }
.dotfield .dot { width: 13px; height: 13px; border-radius: 50%; background: var(--text-muted); }
.dot.o-scaieni { background: #1d5fae; }
.dot.o-bucuresti { background: #4d7a3a; }
.dot.o-pitesti, .dot.o-focsani, .dot.o-gorj, .dot.o-mehedinti { background: #b3702a; }
.dot.o-absent { background: transparent; border: 2px solid var(--text-muted); width: 11px; height: 11px; }
.dotfield .dot.dim { opacity: 0.15; }
.dotfield.small .dot { width: 11px; height: 11px; }
.dot.alive { background: var(--accent2); }
.dot.gone { background: transparent; border: 1px solid var(--border-strong); }
.dot.unknown { background: var(--text-muted); }
.versus .vslider { display: block; font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.88rem; margin: 0.8rem 0; }
.versus .vslider input { width: 100%; accent-color: var(--accent); }
.vpairs { display: grid; gap: 1rem; }
.vpair { display: grid; gap: 0.6rem; border: 1px solid var(--border); border-radius: 10px;
  padding: 0.8rem 1rem; background: var(--bg-surface); }
@media (min-width: 720px) { .vpair { grid-template-columns: 1fr 1fr; } }
.vlab { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.75rem; font-weight: bold;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 0.2rem; }
.vleft { transition: opacity 0.2s; }
.vright { transition: opacity 0.2s; }
.collapse .cstatus { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.9rem;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.8rem; }
.ccontrols { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0; }
.ccontrols button { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.85rem;
  padding: 0.4rem 0.8rem; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--bg-surface); color: var(--text-primary); cursor: pointer; }
.ccontrols button:disabled { opacity: 0.4; cursor: default; }
.csteps { list-style: none; padding: 0; margin: 1rem 0; counter-reset: st; }
.csteps li { padding: 0.5rem 0 0.5rem 2rem; border-bottom: 1px solid var(--border); position: relative; }
.csteps li::before { counter-increment: st; content: counter(st); position: absolute; left: 0; top: 0.55rem;
  width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--bg-surface);
  border: 1px solid var(--border-strong); font-size: 0.75rem; text-align: center; line-height: 1.4rem;
  font-family: -apple-system, "Segoe UI", sans-serif; }
.csteps li.past::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.csteps li.now { font-weight: bold; }
.csteps strong { display: block; }
.csteps span { font-size: 0.92rem; color: var(--text-secondary); font-weight: normal; }
em.st-documentat, em.st-documented { color: var(--accent2); font-weight: bold; }
em.st-propus, em.st-proposed { color: var(--oxide); font-weight: bold; }
em.st-relatat, em.st-reported { color: #8a5a17; font-weight: bold; }
em.st-necunoscut, em.st-unknown { color: var(--text-muted); font-weight: bold; }
details.faq, details.ev { border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem;
  margin: 0.6rem 0; background: var(--bg-surface); }
details.faq summary, details.ev summary { cursor: pointer; font-weight: bold; }
details.faq p, details.ev p { font-size: 0.95rem; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem; font-size: 0.88rem;
  margin: 0.6rem 0; }
dl.facts dt { color: var(--text-secondary); }
dl.facts dd { margin: 0; }
footer { border-top: 1px solid var(--border); padding: 1.2rem 1rem 2rem; text-align: center;
  font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.85rem; color: var(--text-secondary); }
footer a { color: var(--text-secondary); }
