/* Hallmark · shape: app screen · genre: modern-minimal · theme: Rim (deal 3/3, seed public-map-forest-changes-084c·819a74ba·2026-10-31·r0) · rim: night · redesign: full
 * nav: kept, the work pane beside the map, layers moved onto the map · signature: the Sentinel-2 pair of each zone, blinking before and after, its two dates on a mono strip · states: loading (skeleton rows), empty, no data yet, failed load, full
 * axes: dark/grotesk-sans/warm · posture: committed · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: H, filters sat above the results; the figures and daily bars now head the list, the long hints fold away, and the layers live on the map */
/* Hallmark · waive 39b · button.row stands 94px · each zone row is one button that opens the zone sheet, carrying its headline, place, date and area together */
/* Hallmark · dismissed 23 · .strip .on::before is a 2px bar marking which satellite photo is showing, never wider than its strip cell */
/* Hallmark · reworded "2001–2025" to "din 2001" · 19 names the dash */
/* Hallmark · reworded "2016–2025" to "din 2016" · 19 names the dash */
/* Hallmark · reworded "2021–2025" to "din 2021" · 19 names the dash */
/* Hallmark · reworded "2025" to "doar 2025" · the four loss-year buttons now name a start year */
/* Hallmark · reworded "acum 1–3 luni" to "acum una până la trei luni" · 19 names the dash */
/* Hallmark · dismissed render · this sandbox cannot reach unpkg.com from a disk render; the served copy loads MapLibre from a local copy and its shots carry every face */
/* Hallmark · the user named the confidence colours: red for ridicată, amber for medie, sand for scăzută, a dashed grey outline for de confirmat; orange stays the control and state signal */
/* Hallmark · finish-review: subagent · 8 findings · 8 resolved · gap: the zone list starts near the fold at 1280x800, one row in view; the map carries the zones above it */
/* Hallmark · reworded "← Înapoi la listă" to "Înapoi la listă" · 63 names the arrow glued to a button */
@import url("./fonts.css");
@import url("./tokens.css");
@import url("./base.css");

:root {
  --pane: 26.5rem;
  --color-map: var(--color-paper-3);
  --color-data-hi: oklch(62% 0.22 27);
  --color-data-mid: oklch(78% 0.15 70);
  --color-data-lo: oklch(82% 0.05 85);
  --color-data-un: oklch(64% 0.012 80);
  --color-fire: var(--color-ink-2);
  --color-protected: oklch(84% 0.15 125);
  /* stările autorizației de tăiere: de la cel mai îngrijorător la cel mai liniștitor */
  /* cald = merită verificat, cu cât mai aprins cu atât mai serios; verde = are hârtie; gri = nu știm.
     Albastrul rămâne doar al ariilor protejate, ca să nu se încurce cu starea autorizației. */
  --color-aut-fara: oklch(62% 0.22 27);
  --color-aut-neacoperit: oklch(62% 0.22 27);
  --color-aut-vegetatie: oklch(74% 0.15 80);   /* chihlimbar: copaci răzleți, de întrebat, nu de acuzat */
  --color-aut-probabil: oklch(62% 0.12 165);
  --color-aut-acoperit: oklch(62% 0.12 165);
  --color-aut-nu_taiere: oklch(58% 0.012 80);
  --color-aut-nev: oklch(78% 0.012 80);
  --color-forest-lo: oklch(23% 0.03 150);
  --color-forest-hi: oklch(43% 0.065 150);
  --color-loss-old: oklch(48% 0.02 80);
  --color-loss-new: oklch(91% 0.03 85);
}

html, body { height: 100%; }
button { color: inherit; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.num { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; }

/* ---------- the shell: a work pane beside the map ---------- */
.app { display: grid; grid-template-columns: minmax(0, var(--pane)) minmax(0, 1fr); height: 100dvh; }
.panel {
  position: relative; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  border-right: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-lg);
  padding-left: max(var(--space-lg), env(safe-area-inset-left, 0px)); padding-right: var(--space-lg);
}
.mapwrap { position: relative; min-width: 0; background: var(--color-map); }
#map, #map2 { position: absolute; inset: 0; }
.mapwrap.split #map { right: 50%; }
.mapwrap.split #map2 { left: 50%; border-left: var(--rule-hair) solid var(--color-ink-2); }

/* ---------- pane: the brand and the data stamp ---------- */
.brand { display: flex; flex-direction: column; gap: var(--space-2xs); padding-bottom: var(--space-md); }
.brand h1 { font-size: var(--text-display); letter-spacing: -0.03em; line-height: 1.02; }
.tag { color: var(--color-ink-2); }
.updated { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); padding-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.updated .cell { display: flex; flex-direction: column; gap: var(--space-3xs); }
.updated .v { color: var(--color-ink-2); }
.updated .z { font-family: var(--font-body); color: var(--color-muted); }

.block { display: flex; flex-direction: column; gap: var(--space-xs); padding-block: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); }
.lbl { margin: 0; max-width: none; font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; line-height: 1.3; color: var(--color-muted); }
.hint { font-size: var(--text-sm); color: var(--color-muted); }
.range { font-size: var(--text-sm); color: var(--color-ink-2); }

/* ---------- segmented controls ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--rule-hair); background: var(--color-rule); border: var(--rule-hair) solid var(--color-rule); }
.seg button {
  position: relative; min-height: 36px; padding: var(--space-2xs) var(--space-xs); border: 0;
  background: var(--color-paper); color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.seg button:hover { color: var(--color-ink); }
.seg button:active { background: var(--color-paper-3); }
.seg button:focus-visible { outline-offset: -2px; }
.seg button[aria-pressed="true"] { background: var(--color-paper-2); color: var(--color-ink); }
.seg button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--color-accent); }
.seg button[disabled] { display: none; }
.seg.small button { min-height: 32px; }
#periods button { padding-inline: var(--space-3xs); }
#base { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
#years { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- the period slider ---------- */
.slider { display: flex; flex-direction: column; gap: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.slider b { font-weight: 500; color: var(--color-ink); }
.slider input[type=range] { appearance: none; -webkit-appearance: none; width: 100%; height: 24px; margin: 0; background: none; cursor: pointer; }
.slider input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--color-rule); }
.slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: calc(-1 * (var(--space-2xs) + var(--space-3xs))); border: 0; background: var(--color-accent); }
.slider input[type=range]::-moz-range-track { height: 2px; background: var(--color-rule); }
.slider input[type=range]::-moz-range-progress { height: 2px; background: var(--color-accent); }
.slider input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 0; background: var(--color-accent); }
.slider input[type=range]:active::-webkit-slider-thumb { background: var(--color-focus); }
.slider input[type=range]:active::-moz-range-thumb { background: var(--color-focus); }

/* ---------- confidence toggles, which double as the key ---------- */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
.chip {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs);
  min-height: 40px; padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-rule); background: none;
  color: var(--color-muted); font-size: var(--text-sm); text-align: left; cursor: pointer;
  transition: color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.chip:hover { color: var(--color-ink); border-color: var(--color-muted-2); }
.chip:active { background: var(--color-paper-3); }
.chip[aria-pressed="true"] { color: var(--color-ink); border-color: var(--color-ink-2); background: var(--color-paper-2); }
.chip[aria-pressed="false"] .key { opacity: 0.4; }
.chip .n { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; color: var(--color-ink-2); }
.chip.cty { grid-template-columns: minmax(0, 1fr) auto; }
.chip.cty .x { font-family: var(--font-outlier); color: var(--color-muted); }
.chip.cty:hover .x { color: var(--color-ink); }
.ctys .more { grid-column: 1 / -1; }
.pick {
  width: 100%; min-height: 40px; padding: 0 calc(var(--space-sm) + 20px) 0 var(--space-sm); border: var(--rule-hair) solid var(--color-rule); border-radius: 0;
  background-color: var(--color-paper-2); color: var(--color-ink); font: inherit; font-size: var(--text-sm); cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.pick:hover { border-color: var(--color-muted-2); }
.pick option { background: var(--color-paper-2); color: var(--color-ink); }
.chip[aria-pressed="false"] .n { color: var(--color-muted); }

.key { display: inline-block; flex: none; width: 10px; height: 10px; background: var(--color-data-lo); }
.key.hi { background: var(--color-data-hi); }
.key.mid { background: var(--color-data-mid); }
.key.lo { background: var(--color-data-lo); }
.key.un { background: none; border: 1.5px dashed var(--color-data-un); }
.key.a-fara { background: var(--color-aut-fara); }
.key.a-neacoperit { background: var(--color-aut-neacoperit); }
.key.a-vegetatie { background: var(--color-aut-vegetatie); }
.key.a-probabil { background: none; border: 2px solid var(--color-aut-probabil); }
.key.a-nu_taiere { background: var(--color-aut-nu_taiere); }
.key.a-acoperit { background: var(--color-aut-acoperit); }
.key.a-nev { background: none; border: 1.5px dashed var(--color-aut-nev); }
.key.fire { position: relative; background: none; }
.key.arie { background: color-mix(in oklch, var(--color-protected) 22%, transparent); border: 1px solid var(--color-protected); }
/* chenarul albastru: aceeași culoare a încrederii, dar zona e într-o arie protejată (ca pe hartă) */
.key.p { box-shadow: 0 0 0 1.5px var(--color-paper-3), 0 0 0 3.5px var(--color-protected); }
.key.frame { background: var(--color-paper-3); box-shadow: inset 0 0 0 2px var(--color-protected); }
.key.fire::before, .key.fire::after { content: ""; position: absolute; left: calc(50% - 1px); top: -2px; width: 2px; height: 14px; background: var(--color-fire); transform: rotate(45deg); }
.key.fire::after { transform: rotate(-45deg); }

.explain summary, .about summary, .layers summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.explain summary::-webkit-details-marker, .about summary::-webkit-details-marker, .layers summary::-webkit-details-marker { display: none; }
.explain summary::after, .about summary::after, .layers summary::after { content: "+"; font-family: var(--font-outlier); color: var(--color-muted); }
.explain[open] summary::after, .about[open] summary::after, .layers[open] summary::after { content: "\2212"; }
.explain summary { min-height: 32px; font-size: var(--text-sm); color: var(--color-ink-2); }
.explain summary:hover { color: var(--color-ink); }
.explain .hint { padding-top: var(--space-2xs); }

/* ---------- results: figures, the daily bars, ruled rows ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: var(--space-2xs); }
.stats div { display: flex; flex-direction: column; gap: var(--space-2xs); padding-inline: var(--space-sm); border-left: var(--rule-hair) solid var(--color-rule); min-width: 0; }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats b { font-family: var(--font-outlier); font-weight: 400; font-size: var(--text-2xl); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--color-ink); }
.stats span { font-size: var(--text-sm); color: var(--color-muted); }

.spark { display: flex; flex-direction: column; gap: var(--space-2xs); }
.spark:empty { display: none; }
.spark .bars { display: flex; align-items: flex-end; gap: var(--space-3xs); height: 32px; border-bottom: var(--rule-hair) solid var(--color-rule); }
.spark .bars i { flex: 1 1 0; min-width: 2px; background: var(--color-muted); }
.spark .bars i.z { height: 0; }
.spark .ax { display: flex; justify-content: space-between; gap: var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); }
.spark .ax span:first-child, .spark .ax span:last-child { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; }

.grow { flex: 1 0 auto; }
.list { list-style: none; margin: 0; padding: 0; border-top: var(--rule-hair) solid var(--color-rule-2); }
.list li { border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.list .row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; column-gap: var(--space-sm); row-gap: var(--space-3xs); align-items: baseline;
  position: relative; width: 100%; padding: var(--space-sm) var(--space-xs); border: 0; background: none; color: var(--color-ink-2); text-align: left; cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out);
}
.list .row:hover { background: var(--color-paper-2); }
.list .row:active { background: var(--color-paper-3); }
.list .row:focus-visible { outline-offset: -2px; }
.list .row .key { grid-column: 1; grid-row: 1; align-self: center; }
.list .t { grid-column: 2; grid-row: 1; min-width: 0; font-size: var(--text-md); font-weight: 500; line-height: 1.3; color: var(--color-ink); }
.list .p { grid-column: 2; grid-row: 2; min-width: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.list .s { grid-column: 2 / 4; grid-row: 3; font-size: var(--text-sm); color: var(--color-muted); }
.list .d, .list .a { grid-column: 3; justify-self: end; white-space: nowrap; font-family: var(--font-outlier); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.list .d { grid-row: 1; color: var(--color-ink-2); }
.list .a { grid-row: 2; color: var(--color-ink); }
.list .skel { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-sm) var(--space-xs); }
.list .skel span { display: block; width: 70%; height: 12px; background: var(--color-paper-2); }
.list .skel span + span { width: 42%; }
.empty { margin: 0; padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); font-size: var(--text-sm); color: var(--color-ink-2); }
div.empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-sm); }

/* ---------- buttons ---------- */
.mini, .back, .more {
  display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule); background: none; color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.mini:hover, .back:hover, .more:hover { border-color: var(--color-muted); }
.mini:active, .back:active, .more:active { background: var(--color-paper-3); }
.mini { position: relative; }
.mini[aria-pressed="false"] { color: var(--color-muted); }
.mini[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--color-accent); }
.back, .more { align-self: flex-start; }

/* ---------- one zone ---------- */
.detail { gap: var(--space-md); padding-top: var(--space-lg); }
.kind { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-sm); align-items: start; padding-top: var(--space-xs); }
.kind svg { width: 28px; height: 28px; fill: none; stroke: var(--color-ink-2); stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.kind div { display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 0; }
.kind h3 { max-width: none; font-size: var(--text-xl); letter-spacing: -0.03em; line-height: 1.1; }
.kind span { font-size: var(--text-sm); color: var(--color-muted); }
.where { color: var(--color-ink-2); }
.badges { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.badge { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 28px; padding: 0 var(--space-xs); border: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-ink-2); }
.badge.ok { border-color: var(--color-muted-2); color: var(--color-ink); }
.badge.arie { border-color: var(--color-protected); color: var(--color-ink); }
.badge.aut { color: var(--color-ink); }
.badge.aut .key { margin-right: var(--space-2xs); }
.lgset { display: contents; }
.lgset[hidden] { display: none; }
.lg-acop { color: var(--color-muted); }
.lg-acop:empty { display: none; }
.topcty { display: flex; flex-direction: column; gap: var(--space-2xs); margin-top: var(--space-sm); }
.topcty ol { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: top; }
.topcty li { counter-increment: top; }
.tophead { display: grid; grid-template-columns: 1.6em 1fr 3.2em 3.6em 4em; gap: var(--space-xs); padding: 0 var(--space-2xs); font-size: var(--text-xs); color: var(--color-muted); }
.tophead span:nth-child(n+3) { text-align: right; }
.tophead .r { color: var(--color-aut-fara); }
.topcty button { display: grid; grid-template-columns: 1.6em 1fr 3.2em 3.6em 4em; align-items: center; gap: var(--space-xs); width: 100%; min-height: 36px;
  padding: 0 var(--space-2xs); background: none; border: 0; border-top: var(--rule-hair) solid var(--color-rule-2); color: var(--color-ink); font: inherit; text-align: left; cursor: pointer; }
.topcty button::before { content: counter(top); font-family: var(--font-outlier); color: var(--color-muted); font-size: var(--text-xs); }
.topcty button:hover { background: var(--color-paper-2); }
.topcty button[aria-pressed="true"] { color: var(--color-accent); }
.topcty .n, .topcty .h { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; text-align: right; }
.topcty .h { color: var(--color-ink-2); }
.topcty .r { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; color: var(--color-aut-fara); text-align: right; }
.topcty .r:empty { visibility: hidden; }
.sesizare { display: flex; flex-direction: column; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.sesizare b { color: var(--color-ink); font-weight: 500; }
.sesizare a { color: var(--color-ink); text-decoration-color: var(--color-muted-2); }
.sesizare a:hover { text-decoration-color: var(--color-ink); }
.aut-head { display: flex; align-items: center; gap: var(--space-xs); color: var(--color-ink); }
.aut-head b { font-weight: 500; }
.sum { color: var(--color-ink-2); max-width: 65ch; }
.detail .lbl { padding-top: var(--space-xs); }

/* the signature: the before and after pair */
.cmp { display: flex; flex-direction: column; gap: var(--space-sm); }
.cmp-top { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.cmp-top .seg { flex: 1 1 100%; }
.cmp-stage { position: relative; }
.cmp-stage::before, .cmp-stage::after { content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--color-muted); pointer-events: none; z-index: var(--z-raised); }
.cmp-stage::before { top: calc(-1 * var(--space-xs)); left: calc(-1 * var(--space-xs)); border-width: 1px 0 0 1px; }
.cmp-stage::after { right: calc(-1 * var(--space-xs)); bottom: calc(-1 * var(--space-xs)); border-width: 0 1px 1px 0; }
.compare { position: relative; overflow: hidden; aspect-ratio: 1 / 1; max-width: 100%; background: var(--color-paper-2); touch-action: pan-y; outline: var(--rule-hair) solid color-mix(in oklab, var(--color-ink) 8%, transparent); outline-offset: -1px; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) contrast(1.1); }
.compare .after { clip-path: inset(0 0 0 50%); transition: opacity var(--dur-short) var(--ease-out); }
.compare.clickable { cursor: pointer; }
.compare:focus-visible, .compare:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.compare .bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); background: var(--color-ink); pointer-events: none; }
.compare input[type=range] { position: absolute; inset: 0; z-index: var(--z-raised); width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare .outline { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.compare .outline path { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: miter; }
.compare .outline .halo { stroke: var(--color-paper-3); stroke-width: 4; }
.compare .outline .line { stroke: var(--color-accent); stroke-width: 2; }
.strip { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: color-mix(in oklab, var(--color-paper) 78%, transparent); pointer-events: none; }
.strip .cell { position: relative; display: flex; flex-direction: column; gap: var(--space-3xs); padding: var(--space-xs) var(--space-sm); color: var(--color-muted); }
.strip .cell + .cell { border-left: var(--rule-hair) solid var(--color-rule); }
.strip .k { font-size: var(--text-xs); font-weight: 500; }
.strip .v { font-family: var(--font-outlier); font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-ink-2); }
.strip .on { color: var(--color-ink); }
.strip .on .v { color: var(--color-ink); }
.strip .on::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--color-accent); }
.strip .state { position: absolute; right: 0; bottom: 100%; padding: var(--space-2xs) var(--space-xs); background: color-mix(in oklab, var(--color-paper) 78%, transparent); font-size: var(--text-xs); color: var(--color-ink); }
.strip .state:empty { display: none; }
.side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
.side figure { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; margin: 0; }
.side figcaption { display: flex; flex-direction: column; gap: var(--space-3xs); }
.side figcaption .k { font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); }
.side figcaption .v { font-family: var(--font-outlier); font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-ink-2); }
.maprow { display: flex; flex-direction: column; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.map-missing { position: absolute; inset: 0; display: grid; place-content: center; padding: var(--space-lg); text-align: center; color: var(--color-muted); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); font-size: var(--text-sm); }
.actions a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-muted-2); }
.actions a:hover { text-decoration-color: var(--color-ink); }

.verif { display: flex; flex-direction: column; }
.verif .lbl { padding-bottom: var(--space-xs); }
.vitem { display: flex; flex-direction: column; gap: var(--space-2xs); padding-block: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule-2); font-size: var(--text-sm); color: var(--color-ink-2); }
.vitem p:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2xs) var(--space-xs); color: var(--color-ink); }
.vitem b { font-weight: 500; }
.vitem a { align-self: flex-start; color: var(--color-ink); text-decoration-color: var(--color-muted-2); }
.vitem a:hover { text-decoration-color: var(--color-ink); }
.vfit { font-size: var(--text-xs); color: var(--color-muted); }
.owner { display: flex; flex-direction: column; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.owner ol { display: flex; flex-direction: column; gap: var(--space-xs); margin: 0; padding-left: var(--space-lg); }
.owner li::marker { color: var(--color-muted); font-family: var(--font-outlier); }
.near { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }
.arii ul { display: flex; flex-direction: column; gap: var(--space-xs); margin: 0; padding-left: var(--space-lg); color: var(--color-ink); }
.arii li::marker { color: var(--color-protected); }
.owner a { color: var(--color-ink); text-decoration-color: var(--color-muted-2); white-space: nowrap; }
.owner a:hover { text-decoration-color: var(--color-ink); }
.vfit.sure { color: var(--color-ink); }
.vfit.maybe { color: var(--color-ink-2); }
.vitem.quiet, .vitem.quiet p:first-child { color: var(--color-muted); }
.verif.aut .vitem.quiet, .verif.aut .vitem.quiet p:first-child { color: var(--color-ink-2); }
.verif.aut > .vfit { padding-top: var(--space-xs); }
.verif.aut > a { align-self: flex-start; margin-top: var(--space-xs); color: var(--color-ink); text-decoration-color: var(--color-muted-2); }
.verif.aut > a:hover { text-decoration-color: var(--color-ink); }

.ev { display: flex; flex-direction: column; gap: var(--space-2xs); margin: 0; padding-left: var(--space-md); list-style: square; font-size: var(--text-sm); color: var(--color-ink-2); }
.ev li::marker { color: var(--color-muted-2); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: 0; border-top: var(--rule-hair) solid var(--color-rule-2); font-size: var(--text-sm); }
.kv dt, .kv dd { padding-block: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.kv dt { padding-right: var(--space-md); color: var(--color-muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: break-word; color: var(--color-ink-2); }
.mono { font-family: var(--font-outlier); font-size: var(--text-xs); color: var(--color-muted); }

/* ---------- the large pair ---------- */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--space-md); background: color-mix(in oklab, var(--color-paper-3) 92%, transparent); }
.modal-card { display: flex; flex-direction: column; gap: var(--space-md); width: min(1100px, 100%); max-height: 100%; overflow: auto; padding: var(--space-lg); border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); color: var(--color-ink); }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.modal-top h3 { max-width: none; font-size: var(--text-lg); letter-spacing: -0.02em; }
.modal-card:has(.cmp.big) { width: min(calc(72dvh + 2 * var(--space-lg)), 100%); }
.modal-card:has(.cmp.big .side) { width: min(calc(144dvh + 2 * var(--space-lg)), 1100px, 100%); }
.cmp.big .cmp-stage { width: 100%; }
body.noscroll { overflow-y: clip; }

/* ---------- about ---------- */
.about summary { min-height: 40px; font-weight: 500; color: var(--color-ink); }
.about summary:hover::after { color: var(--color-ink); }
.prose { display: flex; flex-direction: column; gap: var(--space-sm); padding-top: var(--space-xs); color: var(--color-ink-2); }
.prose ol, .prose ul { display: flex; flex-direction: column; gap: var(--space-xs); margin: 0; padding-left: var(--space-lg); }
.prose ul { list-style: square; }
.prose li::marker { color: var(--color-muted-2); }
.prose strong { font-weight: 500; color: var(--color-ink); }
.prose a { color: var(--color-ink); text-decoration-color: var(--color-muted-2); }
.prose a:hover { text-decoration-color: var(--color-ink); }

/* ---------- on the map: tools, layers, key ---------- */
.maptools { position: absolute; left: var(--space-sm); top: var(--space-sm); z-index: var(--z-raised); display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-xs); max-width: calc(100% - 72px); }
.layers, .splitbtn { border: var(--rule-hair) solid var(--color-rule); background: color-mix(in oklab, var(--color-paper) 90%, transparent); }
.layers summary { min-height: 36px; padding: 0 var(--space-sm); }
.layers summary .lbl { color: var(--color-ink); }
.layers summary:hover::after { color: var(--color-ink); }
.layers[open] { background: var(--color-paper); }
.layers-body { display: flex; flex-direction: column; gap: var(--space-xs); width: 19rem; max-width: 100%; max-height: calc(100dvh - 7rem); overflow-y: auto; padding: 0 var(--space-sm) var(--space-sm); }
.splitbtn { min-height: 38px; padding: 0 var(--space-sm); color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; cursor: pointer; transition: border-color var(--dur-micro) var(--ease-out); }
.splitbtn:hover { border-color: var(--color-muted); }
.splitbtn:active { background: var(--color-paper-3); }
.splitbtn[aria-pressed="true"] { border-color: var(--color-accent); }
.ariibtn { display: inline-flex; align-items: center; gap: var(--space-xs); }
/* pagina județului ales: un buton separat de clicul pe hartă, care doar face zoom */
.ctycard { display: inline-flex; align-items: center; border-color: var(--color-accent); text-decoration: none; }
.ctycard:hover { border-color: var(--color-focus); background: var(--color-paper); }
.pagebtn { display: flex; align-items: center; min-height: 40px; margin-top: var(--space-xs); padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-accent); color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.pagebtn:hover { border-color: var(--color-focus); background: var(--color-paper-2); }
.ariibtn .n { font-weight: 400; color: var(--color-ink-2); }
.ariibtn .n b { font-family: var(--font-outlier); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--color-ink); }
.ariibtn[aria-pressed="true"] { border-color: var(--color-protected); background: color-mix(in oklab, var(--color-protected) 22%, var(--color-paper)); }
.note { padding: var(--space-xs) var(--space-sm); background: var(--color-paper-2); font-size: var(--text-sm); color: var(--color-ink-2); }

.tg { display: flex; align-items: center; gap: var(--space-sm); min-height: 40px; font-size: var(--text-sm); color: var(--color-ink-2); cursor: pointer; }
.tg:hover { color: var(--color-ink); }
.tg input { appearance: none; -webkit-appearance: none; display: grid; place-content: center; flex: none; width: 18px; height: 18px; margin: 0; border: var(--rule-hair) solid var(--color-muted); background: var(--color-paper); cursor: pointer; }
.tg input::before { content: ""; width: 10px; height: 10px; background: var(--color-accent); transform: scale(0); transition: transform var(--dur-micro) var(--ease-out); }
.tg input:checked { border-color: var(--color-accent); }
.tg input:checked::before { transform: scale(1); }
.tg input:active { background: var(--color-paper-3); }
.tg input:disabled { opacity: 0.55; cursor: not-allowed; }
.ramp { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2xs) 0; font-family: var(--font-outlier); font-size: var(--text-xs); font-variant-numeric: tabular-nums; color: var(--color-muted); }
.ramp i { grid-column: 1 / 3; height: 8px; background: linear-gradient(90deg, var(--color-loss-old), var(--color-loss-new)); }
.ramp span:last-child { justify-self: end; }

.legend {
  position: absolute; left: var(--space-sm); bottom: var(--space-sm); z-index: var(--z-raised); display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md);
  max-width: calc(100% - 9rem); padding: var(--space-xs) var(--space-sm); border: var(--rule-hair) solid var(--color-rule);
  background: color-mix(in oklab, var(--color-paper) 85%, transparent); font-size: var(--text-xs); color: var(--color-ink-2); pointer-events: none;
}
.legend span { display: inline-flex; align-items: center; gap: var(--space-xs); }
.lgtoggle { display: none; }

/* MapLibre's own controls, in the theme */
.maplibregl-map { font-family: var(--font-body); }
.maplibregl-ctrl-group:not(:empty) { border: var(--rule-hair) solid var(--color-rule); border-radius: 0; background: var(--color-paper-2); box-shadow: none; }
.maplibregl-ctrl-group button { width: 36px; height: 36px; }
.maplibregl-ctrl-group button + button { border-top: var(--rule-hair) solid var(--color-rule); }
.maplibregl-ctrl-group button:focus { box-shadow: none; }
.maplibregl-ctrl-group button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.maplibregl-ctrl-group button:active { background: var(--color-paper-3); }
.maplibregl-ctrl button .maplibregl-ctrl-icon, .maplibregl-ctrl-attrib-button { filter: invert(1) brightness(0.92); }
.maplibregl-ctrl-scale { border-color: var(--color-ink-2); background: color-mix(in oklab, var(--color-paper) 80%, transparent); color: var(--color-ink-2); font-family: var(--font-outlier); font-size: var(--text-xs); }
.maplibregl-ctrl.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib.maplibregl-compact { border-radius: 0; background: color-mix(in oklab, var(--color-paper) 85%, transparent); color: var(--color-muted); font-size: var(--text-xs); }
.maplibregl-ctrl-attrib a { color: var(--color-ink-2); }
.maplibregl-popup-content { padding: var(--space-xs) var(--space-sm); border: var(--rule-hair) solid var(--color-rule); border-radius: 0; background: var(--color-paper-2); color: var(--color-ink); font-size: var(--text-sm); box-shadow: none; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--color-rule); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip, .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--color-rule); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--color-rule); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--color-rule); }

/* ---------- phones: the map on top, the pane below ---------- */
@media (max-width: 60rem) {
  .app { display: flex; flex-direction: column; height: auto; }
  .mapwrap { order: -1; height: 56svh; min-height: 320px; }
  .panel {
    overflow: visible; border-right: 0; border-top: var(--rule-hair) solid var(--color-rule);
    padding-left: max(var(--space-md), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-md), env(safe-area-inset-right, 0px));
  }
  .mapwrap.split #map { right: 0; bottom: 50%; }
  .mapwrap.split #map2 { left: 0; top: 50%; border-left: 0; border-top: var(--rule-hair) solid var(--color-ink-2); }
  .layers-body { max-height: calc(56svh - 5rem); }
  /* pe 360 px, o hartă alături nu încape: butonul dispare */
  #splitbtn, #tg-split { display: none; }
  /* pe telefon legenda acoperea jumătate din hartă: o strângem într-un buton, iar deschisă stă pe o coloană */
  .legend {
    max-width: calc(100% - 2 * var(--space-sm)); flex-direction: column; align-items: flex-start;
    gap: var(--space-2xs); pointer-events: auto;
  }
  .legend .lgset { display: none; }
  .legend > span:not(.lgset) { display: none; }
  .legend.open .lgset { display: contents; }
  .legend.open .lgset[hidden] { display: none; }
  .legend.open > span:not(.lgset) { display: inline-flex; }
  .legend.open { max-height: 40svh; overflow-y: auto; }
  .lgtoggle {
    display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 32px; padding: 0;
    background: none; border: 0; color: var(--color-ink); font: inherit; cursor: pointer;
  }
  .lgtoggle::after { content: "+"; color: var(--color-muted); }
  .legend.open .lgtoggle::after { content: "−"; }
}
@media (max-width: 60rem), (pointer: coarse) {
  .seg button, .seg.small button, .mini, .back, .more, .chip, .pick, .explain summary, .layers summary, .splitbtn, .tg, .about summary { min-height: 44px; }
  .actions a { display: inline-flex; align-items: center; min-height: 44px; }
  .maplibregl-ctrl-group button { width: 44px; height: 44px; }
}
@media (max-width: 24rem) {
  .chips { grid-template-columns: minmax(0, 1fr); }
}

/* detaliile tehnice din fișa autorizației: pentru cine verifică */
.verif details.tech { margin: var(--space-xs) 0; }
.verif details.tech summary { cursor: pointer; color: var(--color-ink-2); font-size: 0.9em; }
.verif details.tech .prose p { margin: 4px 0; }
