:root {
  --paper: #f4edda; --paper2: #ece1c6; --ink: #221a10; --ink2: #4a3f2c;
  --sepia: #7a5a2e; --sepia-soft: #b89b62; --green: #2f6b3c; --green-deep: #1d4a27;
  --brass: #7e631b; --line: #d8c89e; --card: #faf5e6; --shadow: rgba(34, 26, 16, .28);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="dark"] {
  --paper: #141a13; --paper2: #1c241c; --ink: #ece4cc; --ink2: #c9bfa4;
  --sepia: #c9a15e; --sepia-soft: #8a6f3e; --green: #6fae7d; --green-deep: #3f7a4e;
  --brass: #d9b44a; --line: #37402f; --card: #1a211a; --shadow: rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; text-wrap: balance; }
a { color: var(--green-deep); }
[data-theme="dark"] a { color: var(--green); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper);
  padding: .5rem 1rem; z-index: 99;
}
.skip:focus { left: 0; }

/* topbar / progress / rail */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem;
  padding: .45rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line);
}
.home { font-family: var(--serif); font-size: 1rem; text-decoration: none; color: var(--ink); }
.topnav { display: flex; gap: 1rem; font-size: .9rem; }
.topnav a { text-decoration: none; color: var(--ink2); }
.spacer { flex: 1; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: .1rem .7rem;
  font-size: .85rem; text-decoration: none; color: var(--ink);
}
.icon-btn { background: none; border: 0; color: var(--ink); cursor: pointer; padding: .4rem; }
.icon-btn .i-sun { display: none; }
[data-theme="dark"] .icon-btn .i-sun { display: inline; }
[data-theme="dark"] .icon-btn .i-moon { display: none; }
.progress { position: sticky; top: 0; z-index: 49; height: 3px; background: var(--line); opacity: 0; }
.progress.on { opacity: 1; }
.progress i { display: block; height: 100%; background: var(--sepia); transform-origin: 0 50%; transform: scaleX(0); }
#pstamp { position: absolute; top: -7px; width: 18px; height: 16px; color: var(--sepia); }
.rail { display: none; }
@media (min-width: 80rem) {
  .rail {
    display: block; position: fixed; right: 1rem; top: 30%; z-index: 40;
    font-size: .8rem;
  }
  .rail a { display: flex; align-items: center; gap: .4rem; text-decoration: none; color: var(--ink); padding: .15rem .55rem; background: color-mix(in srgb, var(--paper) 90%, transparent); border-radius: 999px; }
  .rail i { width: 1.2rem; height: 2px; background: var(--line); }
  .rail a:hover i { background: var(--sepia); }
}

/* hero: the park fills the first screen, the title sits on it */
.hero { position: relative; min-height: calc(100svh - 3.2rem); margin: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-text {
  position: relative; z-index: 2; width: min(36rem, 42vw); max-width: none;
  margin: 0 0 1.2rem 4vw; padding: 1.15rem 1.25rem .9rem;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 40px var(--shadow);
}
.kicker {
  font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sepia); margin: 0 0 .6rem;
}
.hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); margin: 0 0 .7rem; text-shadow: none; }
.deck { font-size: 1.05rem; line-height: 1.5; color: var(--ink2); margin: 0 0 .8rem; text-shadow: none; }
.figline { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-family: var(--serif); color: var(--brass); margin: 0; }
.hero-fig { position: absolute; inset: 0; margin: 0; }
.hero-fig img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; }
.hero-fig figcaption {
  position: absolute; right: 12px; bottom: 12px; max-width: min(22rem, 32vw); margin: 0;
  padding: 8px 10px; border-radius: 8px; background: rgba(20, 16, 8, .72); color: #f4efe4;
}
figcaption {
  font-size: .85rem; color: var(--ink2); padding: .5rem 1.25rem 0; max-width: 46rem; margin: 0 auto;
}
.hero .hint { position: relative; z-index: 2; margin: 0 0 1rem 4vw; text-align: left; color: #f4efe4; }
.cr { display: block; font-size: .78rem; }
.cr a { color: inherit; }
.hint { text-align: center; color: var(--ink2); font-size: .9rem; margin: 1rem 0 0; }
.hint span { display: block; }

/* sections / prose */
.block { padding: 3rem 0 1rem; }
.block h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 .8rem; }
.anchor { color: inherit; text-decoration: none; }
.anchor:hover { text-decoration: underline; }
.lede { font-size: 1.15rem; line-height: 1.6; color: var(--ink2); margin: 0 0 1.2rem; }
.prose p { margin: 0 0 1rem; }
.prose .see-also { border-left: 3px solid var(--sepia-soft); padding-left: 1rem; }
.note { font-size: .92rem; color: var(--ink2); border-left: 3px solid var(--line); padding-left: 1rem; }
.tag { display: inline-block; font-size: .78rem; border: 1px solid var(--sepia-soft); border-radius: 999px; padding: 0 .6rem; color: var(--sepia); }
.mono { font-family: ui-monospace, monospace; font-size: .9em; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.2rem; margin: 1.5rem 0; }
.facts dt { font-weight: 700; color: var(--sepia); }
.facts dd { margin: 0; }
.claims dt { font-weight: 700; margin: 1.2rem 0 .3rem; color: var(--sepia); }
.claims dd { margin: 0; }
.claims blockquote { margin: 0 0 .3rem; padding-left: 1rem; border-left: 3px solid var(--brass); font-family: var(--serif); }
.verdict { font-size: .95rem; color: var(--ink2); margin: 0; }
.srcs { padding-left: 1.2rem; font-size: .95rem; }
.srcs li { margin-bottom: .7rem; }
.src-h { font-size: 1.1rem; margin: 1.6rem 0 .4rem; color: var(--sepia); }

/* figures */
.fig { margin: 1.6rem 0; }
.fig img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.fig-plan img { background: #efe9d8; }
.fig figcaption { padding-left: 0; padding-right: 0; }
.photos { display: grid; gap: 1rem; }
@media (min-width: 60rem) {
  .photos { grid-template-columns: 1fr 1fr; }
  .photos .fig:first-child { grid-column: 1 / -1; }
}

/* map story */
.map-story { position: relative; }
.stage { position: sticky; top: 0; height: 100lvh; display: flex; align-items: stretch; }
.stage-in {
  position: relative; flex: 1; display: flex; flex-direction: column;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper2);
}
.stage-row { position: relative; flex: 1; min-height: 0; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.steps { position: relative; z-index: 2; pointer-events: none; margin-top: -100lvh; }
.step {
  pointer-events: auto; min-height: 90lvh; display: flex; flex-direction: column; justify-content: center;
  max-width: 27rem; margin: 0 auto 0 0; padding: 1rem 1.25rem;
}
.step > * { pointer-events: auto; }
.step .yr-tag {
  align-self: flex-start; font-size: .8rem; letter-spacing: .1em; color: var(--brass);
  border: 1px solid var(--brass); border-radius: 999px; padding: 0 .7rem; margin: 0 0 .5rem;
  background: var(--card);
}
.step h3 { margin: 0 0 .4rem; font-size: 1.4rem; background: var(--card); align-self: flex-start; padding: 0 .4rem; }
.step p { background: var(--card); padding: .4rem .6rem; margin: 0 0 .4rem; border-left: 3px solid var(--sepia); }
.step .note { font-size: .88rem; }
.step { opacity: .35; transition: opacity .3s; }
.step.on { opacity: 1; }
@media (min-width: 60rem) {
  .map-story { display: grid; grid-template-columns: minmax(24rem, 30rem) 1fr; }
  .stage { grid-column: 2; }
  .steps { grid-column: 1; grid-row: 1; margin-top: 0; }
  .step { margin: 0 0 0 auto; }
}
.scale { display: flex; align-items: center; gap: .5rem; padding: .35rem .8rem; font-size: .8rem; color: var(--ink2); }
.scale i { display: block; height: 4px; border: 1px solid var(--ink2); border-top: 0; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; margin: 0; padding: .3rem .8rem .6rem; font-size: .82rem; color: var(--ink2); }
.legend .dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .35em; background: var(--sepia-soft); }
.lg-fence .dot { background: var(--sepia); }
.lg-water .dot { background: #4a86b8; }
.lg-path .dot { background: var(--sepia-soft); }
.lg-mark .dot { background: #b83a2a; }
.lg-county .dot { background: var(--line); }
.lg-park3 .dot { background: var(--green); }
.lg-town .dot { background: var(--brass); }

/* svg maps */
.map text { font-family: var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--paper); }
.mark text { stroke-width: 4px; }
.town text { stroke-width: .07px; }
.dem-dark { display: none; }
[data-theme="dark"] .dem-dark { display: block; }
[data-theme="dark"] .dem-light { display: none; }
.county { fill: none; stroke: var(--sepia-soft); stroke-width: .06; opacity: .8; }
.town circle { fill: var(--brass); opacity: .75; }
.town text { display: none; font-size: .42px; font-weight: 700; }
.town.cap text, .town.sel text { display: block; }
.town.sel circle { fill: #b83a2a; opacity: 1; }
.town.sel text { font-size: .3px; transform: translateY(2.23px); }
.townring { fill: none; stroke: var(--brass); stroke-width: .05; stroke-dasharray: .22 .14; opacity: .9; }
.lg-ring .dot { background: var(--brass); }
.foot path { stroke-width: .05; fill-opacity: .3; stroke-opacity: .95; }
.f-romanescu path { fill: var(--green); stroke: var(--green-deep); }
.f-herastrau path { fill: rgba(200, 162, 94, .25); stroke: #8a5a1c; }
.f-tineretului path { fill: rgba(143, 163, 200, .25); stroke: #4a5a8a; }
.lshow-fence { fill: rgba(47, 107, 60, .12); stroke: var(--sepia); stroke-width: 5; }
[data-theme="dark"] .lshow-fence { fill: rgba(111, 174, 125, .14); }
.lshow-water { fill: #7fb3d8; stroke: #3a6a94; stroke-width: 2; opacity: .9; }
.lshow-path { fill: none; stroke: var(--sepia-soft); stroke-width: 2.4; opacity: .85; }
.lshow-road { fill: none; stroke: var(--ink2); stroke-width: 3; opacity: .5; }
.lshow-track { fill: none; stroke: #b83a2a; stroke-width: 3; stroke-dasharray: 14 8; opacity: .9; }
.mark circle { fill: #b83a2a; stroke: var(--paper); stroke-width: 2; }
.mark text { font-size: 30px; }
.stage-in[data-zoom="z3"] .mark text { font-size: 17px; }
.stage-in[data-zoom="z3"] .mark circle { r: 5px; }
.stage-in[data-zoom="z2"] .mark circle { r: 9px; }

/* town drop */
.drop-controls { display: none; }
.drop.live .drop-controls { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: end; margin-bottom: 1rem; }
.pick { display: flex; flex-direction: column; gap: .25rem; font-weight: 700; }
.pick select {
  font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--sepia-soft);
  border-radius: .4rem; padding: .55rem .7rem; min-height: 44px; min-width: 14rem;
}
.hint2 { font-weight: 400; font-size: .82rem; color: var(--ink2); }
.parks { border: 1px solid var(--line); border-radius: .4rem; margin: 0; padding: .5rem .8rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.parks legend { font-size: .82rem; color: var(--ink2); padding: 0 .4rem; }
.parks label { display: flex; align-items: center; gap: .4rem; min-height: 44px; }
.parks input { width: 1.1rem; height: 1.1rem; accent-color: var(--green-deep); }
.pha { font-size: .82rem; color: var(--ink2); }
#parkreset {
  font: inherit; background: var(--sepia); color: #fff; border: 0; border-radius: .4rem;
  padding: .55rem 1rem; min-height: 44px; cursor: pointer;
}
[data-theme="dark"] #parkreset { color: #221a10; }
.drop .stage { position: static; height: auto; display: block; }
.drop .stage-row { flex: none; width: min(100%, 150lvh); aspect-ratio: 2 / 1; margin-inline: auto; }
.readout { font-family: var(--serif); font-size: 1.15rem; margin: .8rem 0 0; min-height: 2.2em; }

/* bars */
.bars { width: 100%; height: auto; margin: 1rem 0; }
.bars text { fill: var(--ink); stroke: none; font-size: 17px; }
.bars .bname { font-weight: 700; }
.bars .bar { stroke: var(--sepia); stroke-width: 1; }
.bars .b-tineretului { fill: #8fa3c8; }
.bars .b-herastrau { fill: #c8a25e; }
.bars .b-park { fill: var(--green); }

/* share / footer */
.share-block { padding-bottom: 3rem; }
.foot { border-top: 1px solid var(--line); padding: 1.2rem 1.25rem 3rem; font-size: .9rem; color: var(--ink2); }
.foot a { color: inherit; }
.notfound { padding: 4rem 1.25rem; }

@media (max-width: 59.99rem) {
  .topnav { display: none; }
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .hero-fig { order: -1; position: relative; height: 42svh; }
  .hero-text { order: 0; width: auto; margin: 0; border-radius: 0; }
  .hero .hint { margin: .6rem 1.25rem 0; color: var(--ink2); text-align: center; }
  .hero-fig figcaption { left: 8px; right: 8px; bottom: 8px; max-width: none; }
  .stage { top: 3.4rem; height: 40svh; z-index: 3; }
  .steps { margin-top: 0; }
  .step { max-width: none; min-height: 55svh; margin: 0; background: var(--paper); }
  .mark text { font-size: 34px; }
  .stage-in[data-zoom="z3"] .mark text { font-size: 20px; }
}
@media (max-height: 30rem) {
  .step { min-height: 100lvh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step { transition: none; }
}
