/* Harta proiectelor și a rețelei — componenta de pe prima pagină.
 *
 * Refăcută de la zero pe 23 septembrie 2026, odată cu `ui/harta.js`. Din foaia
 * veche a rămas doar paleta de date: culorile tehnologiilor, ale rețelei și
 * ale stațiilor, alese atunci cu verificarea de daltonism. Totul e scris
 * întâi pentru telefon; desktopul primește coloana din dreapta.
 *
 * Culorile desenului se citesc din JavaScript, din proprietățile `--hx-*` și
 * din cele de date de mai jos, deci harta urmează tema fără cod în plus.
 */

/* ------------------------------------------------------- paleta de date */
:root {
  --solar: var(--teh-solar);
  --stocare: var(--teh-stocare);
  --eolian: var(--teh-eolian);
  --hidro: var(--teh-hidro);
  --altele: #8b9196;
  --context: #7b6cf5;
  --good: var(--state-good);
  --warn: var(--state-warn);
  --kv400: #e8e8ee;
  --kv220: #9a9aa4;
  --kv110: #5a5a62;
  --st400: #fd3f92;
  --st220: #fa7fb6;
  --st110: #f6b3d2;
}
:root[data-theme="light"] {
  --altele: #6b7072;
  --context: #4c3bd6;
  --kv400: #2b2b2e;
  --kv220: #57575c;
  --kv110: #8b8b90;
  --st400: #b81243;
  --st220: #e0557f;
  --st110: #f2a3c0;
}

/* Culorile desenului, citite de script. */
.hx {
  --hx-afara: color-mix(in oklab, var(--paper-sunken) 70%, var(--ink) 4%);
  --hx-land: var(--wash-1);
  --hx-linie: color-mix(in oklab, var(--ink) 16%, transparent);
  --hx-contur: color-mix(in oklab, var(--ink) 55%, transparent);
  --hx-text: var(--ink);
  --hx-halo: var(--paper);
  --hx-paper: var(--paper);
  /* Sagetile fluxului si pulsul: chihlimbarul marcii, si pe tema deschisa. */
  --hx-accent: var(--accent-fill);
  --hx-font: var(--font-body);
}

/* ------------------------------------------------------------ sectiunea */
.hx-sec { padding-block: var(--space-xl) var(--space-2xl); scroll-margin-top: 4.5rem; }
.hx-cap { max-width: 44rem; margin-bottom: var(--space-md); }
.hx-cap .h3 { margin: 0 0 var(--space-2xs); }
.hx-cap .lede { margin-top: 0; }

.hx-grid {
  display: grid; gap: var(--space-md);
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}
.hx-stage { min-width: 0; }

/* ---------------------------------------------------------------- harta */
.hx-map {
  position: relative;
  height: clamp(460px, 68vh, 660px);
  border: var(--rule) solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--hx-afara);
  isolation: isolate;
}
.hx-canvas {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.hx-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.hx-load {
  position: absolute; inset: 0; margin: 0;
  display: grid; place-items: center;
  color: var(--ink-3); font-size: var(--text-sm);
}

/* Bara de peste harta: judetul la stanga, filtrele si straturile la dreapta. */
.hx-bar {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3;
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.hx-bar > * { pointer-events: auto; }
.hx-bar-sp { flex: 1; }
.hx-b {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: var(--rule) solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--paper-raised) 94%, transparent);
  backdrop-filter: blur(8px);
  color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 600;
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.hx-b:hover { border-color: var(--line-strong); }
.hx-b[aria-expanded="true"], .hx-b.is-on {
  border-color: var(--accent); background: var(--accent-wash);
}
.hx-b--jud { max-width: 55%; }
.hx-b--jud span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-b--jud i { font-style: normal; color: var(--ink-3); }
.hx-b.is-on i { color: var(--accent); font-size: 1.1em; }
.hx-n {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent-fill); color: var(--accent-ink);
  font-size: 11px; font-weight: 700;
}

/* Butoanele de marire: jos-dreapta, cate 44 px, pentru deget. */
.hx-zoom {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  display: flex; flex-direction: column;
  border: var(--rule) solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--paper-raised) 94%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.hx-zoom button {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-bottom: var(--rule) solid var(--line-faint);
  background: transparent; color: var(--ink);
  font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
}
.hx-zoom button:last-child { border-bottom: 0; }
.hx-zoom button:hover:not(:disabled) { background: var(--paper-sunken); }
.hx-zoom button:disabled { color: var(--ink-faint); cursor: default; }
.hx-fullb { display: none !important; }
.hx-zlvl {
  position: absolute; right: 62px; bottom: 16px; z-index: 3;
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-3);
  pointer-events: none;
}

.hx-semn {
  position: absolute; left: 50%; bottom: 16px; z-index: 4; margin: 0;
  transform: translate(-50%, 8px);
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--paper);
  font-size: var(--text-xs); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out);
}
.hx-semn.is-on { opacity: .92; transform: translate(-50%, 0); }

.hx-tip {
  position: absolute; z-index: 5; max-width: 260px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 11px;
  border: var(--rule) solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-raised);
  box-shadow: var(--shadow-pop);
  font-size: var(--text-xs); color: var(--ink-2);
  pointer-events: none;
}
.hx-tip b { color: var(--ink); font-size: var(--text-sm); }

/* Panoul: filtre, straturi sau judete. Pe desktop cade sub bara, in dreapta. */
.hx-panel {
  position: absolute; top: 58px; right: 10px; z-index: 6;
  width: min(360px, calc(100% - 20px));
  max-height: calc(100% - 70px); overflow: auto;
  padding: 14px;
  border: var(--rule) solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-pop);
  overscroll-behavior: contain;
}
.hx-panel[hidden] { display: none; }
.hx.has-panel .hx-panel:has(.hx-cauta) { left: 10px; right: auto; }
.hx-ph {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px; padding-right: 36px; position: relative;
}
.hx-ph b { font-family: var(--font-display); font-size: var(--text-md); color: var(--ink); }
.hx-ph span { color: var(--ink-3); font-size: var(--text-xs); }
.hx-ph .hx-x { position: absolute; top: -6px; right: -6px; }

.hx-seg { border: 0; margin: 0 0 12px; padding: 0; }
.hx-seg legend {
  margin-bottom: 6px; padding: 0;
  font-family: var(--font-mono); font-size: var(--text-2xs);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3);
}
.hx-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-seg legend { width: 100%; }
.hx-seg button, .hx-teh button, .hx-lk {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px;
  border: var(--rule) solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper); color: var(--ink-2);
  font: inherit; font-size: var(--text-xs); cursor: pointer;
}
.hx-seg button[aria-pressed="true"] {
  border-color: var(--accent); background: var(--accent-wash); color: var(--ink);
  font-weight: 600;
}
.hx-seg--teh button[aria-pressed="false"], .hx-teh button[aria-pressed="false"] {
  color: var(--ink-faint); text-decoration: line-through;
}
.hx-seg--teh button[aria-pressed="false"] .hx-dot,
.hx-teh button[aria-pressed="false"] .hx-dot { opacity: .3; }
.hx-pf { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

.hx-str { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hx-str label {
  display: grid; grid-template-columns: auto 22px minmax(0, 1fr);
  align-items: center; gap: 10px;
  min-height: 48px; padding: 6px 4px; cursor: pointer;
  border-bottom: var(--rule) solid var(--line-faint);
}
.hx-str input { width: 20px; height: 20px; accent-color: var(--accent); }
.hx-str b { display: block; color: var(--ink); font-size: var(--text-sm); }
.hx-str small { color: var(--ink-3); font-size: var(--text-2xs); }
.hx-sw { width: 20px; height: 20px; border-radius: 50%; }
.hx-sw--noduri { background: var(--solar); box-shadow: inset 0 0 0 2px var(--paper); }
.hx-sw--pregatire { border: 2px dashed var(--eolian); }
.hx-sw--linii { height: 3px; border-radius: 2px; background: var(--kv400); }
.hx-sw--statii { width: 10px; height: 10px; margin-left: 5px; background: var(--st400); }
.hx-sw--repere { width: 12px; height: 12px; margin-left: 4px; border-radius: 2px; transform: rotate(45deg); background: var(--context); }
.hx-sw--flux { border-radius: 0; background: none; color: var(--accent); }
.hx-sw--flux::before { content: "↓↑"; font-weight: 700; font-size: 13px; }

.hx-cauta {
  width: 100%; min-height: 44px; margin-bottom: 8px; padding: 0 12px;
  border: var(--rule) solid var(--line); border-radius: var(--radius-md);
  background: var(--paper); color: var(--ink); font: inherit;
}
.hx-jl { list-style: none; margin: 0; padding: 0; }
.hx-jl button {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  min-height: 44px; padding: 0 8px;
  border: 0; border-bottom: var(--rule) solid var(--line-faint);
  background: transparent; color: var(--ink); font: inherit; font-size: var(--text-sm);
  text-align: left; cursor: pointer;
}
.hx-jl button:hover, .hx-jl button[aria-pressed="true"] { background: var(--accent-wash); }
.hx-jl small { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--text-2xs); }

/* Legenda-filtru de sub harta: tehnologiile, apasabile. */
.hx-legenda { margin-top: 10px; }
.hx-teh { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-teh small { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--text-2xs); }
.hx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ------------------------------------------------ coloana din dreapta */
.hx-side { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.hx-card, .hx-lcard {
  position: relative;
  padding: 14px 16px;
  border: var(--rule) solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
}
.hx-card.is-open { border-color: var(--accent-line); box-shadow: var(--shadow-pop); }
.hx-x {
  position: absolute; top: 6px; right: 6px;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--ink-3); font-size: 24px; line-height: 1; cursor: pointer;
}
.hx-x:hover { background: var(--paper-sunken); color: var(--ink); }
.hx-eyebrow {
  margin: 0 0 4px; padding-right: 36px;
  font-family: var(--font-mono); font-size: var(--text-2xs);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3);
}
.hx-h { margin: 0 0 8px; padding-right: 30px; font-family: var(--font-display); font-size: var(--text-lg); line-height: var(--leading-snug); color: var(--ink); }
.hx-big { margin: 0 0 10px; font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.hx-big small { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; color: var(--ink-3); }
.hx-p { margin: 0 0 8px; color: var(--ink-2); font-size: var(--text-sm); }
.hx-fine { margin: 8px 0 0; color: var(--ink-3); font-size: var(--text-xs); }
.hx-fine a, .hx-lh a { color: var(--accent); }
.hx-kv { margin: 10px 0 0; display: grid; gap: 0; }
.hx-kv > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; border-bottom: var(--rule) solid var(--line-faint);
  font-size: var(--text-sm);
}
.hx-kv > div:last-child { border-bottom: 0; }
.hx-kv dt { color: var(--ink-3); }
.hx-kv dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }
.hx-lista { list-style: none; margin: 10px 0 0; padding: 0; font-size: var(--text-sm); }
.hx-lista li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: var(--rule) solid var(--line-faint); }
.hx-lista span { color: var(--ink-3); text-align: right; }
.hx-cta { width: 100%; justify-content: center; margin-top: 12px; }
.hx-mai { display: none; }
@media (max-width: 979px) {
  .hx-card.is-open:not(.is-mare) .hx-mai {
    display: block; width: 100%; min-height: 40px; margin-top: 6px;
    border: 0; background: none; color: var(--accent); font: inherit;
    font-size: var(--text-sm); cursor: pointer;
  }
}

.hx-mix { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--paper-sunken); margin: 6px 0; }
.hx-mix i { display: block; height: 100%; }
.hx-mix i + i { box-shadow: -1px 0 0 var(--paper-raised); }
.hx-mixk { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--text-xs); color: var(--ink-2); }
.hx-mixk li { display: inline-flex; align-items: center; gap: 5px; }
.hx-mixk b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Cartonasele live. */
.hx-live { display: flex; flex-direction: column; gap: var(--space-sm); }
.hx-lh {
  display: flex; align-items: center; gap: 7px; margin: 0 0 6px;
  font-family: var(--font-mono); font-size: var(--text-2xs);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3);
}
.hx-lh time, .hx-lh a { margin-left: auto; text-transform: none; letter-spacing: 0; }
.hx-viu { width: 8px; height: 8px; border-radius: 50%; background: var(--state-good); box-shadow: 0 0 0 0 color-mix(in oklab, var(--state-good) 60%, transparent); animation: hx-puls 2s var(--ease-out) infinite; }
.hx-viu.is-pret { background: var(--accent-fill); animation: none; }
.hx-viu.is-off { background: var(--ink-faint); animation: none; }
@keyframes hx-puls { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .hx-viu { animation: none; } }
.hx-lv { margin: 0; color: var(--ink-3); font-size: var(--text-sm); }
.hx-lv b { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.hx-ls { margin: 2px 0 6px; color: var(--ink-2); font-size: var(--text-xs); }
.hx-ls b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hx-spark { display: block; width: 100%; height: 44px; margin-top: 6px; }
/* Pretul nu e al solarului: linia e in chihlimbarul marcii. */
.hx-spark .ln { fill: none; stroke: var(--accent-fill); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.hx-spark .ar { fill: color-mix(in oklab, var(--accent-fill) 16%, transparent); }
.hx-spark .now { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.hx-ax { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }
.hx-flux { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 2px 12px; font-size: var(--text-xs); }
.hx-flux li { display: flex; justify-content: space-between; gap: 6px; padding: 3px 0; border-bottom: var(--rule) solid var(--line-faint); color: var(--ink-2); }
.hx-flux b { font-variant-numeric: tabular-nums; }
.hx-flux .in { color: var(--state-good); }
.hx-flux .out { color: var(--accent); }
.hx-lk { margin-top: 10px; }
.hx-lk[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); color: var(--ink); }

/* --------------------------------------------------------- sub harta */
.hx-cifre {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-sm);
  margin: var(--space-lg) 0 0; padding-top: var(--space-sm);
  border-top: var(--rule) solid var(--line);
}
.hx-c { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-c dt { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); }
.hx-c dd { margin: 0; display: flex; flex-direction: column; }
.hx-c b { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.hx-c small { color: var(--ink-3); font-size: var(--text-xs); }

.hx-jos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg); margin-top: var(--space-lg); }
.hx-h4 { margin: 0 0 10px; font-family: var(--font-display); font-size: var(--text-md); color: var(--ink); }
.hx-top { list-style: none; margin: 0; padding: 0; }
.hx-top button {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: 40px; padding: 0 6px;
  border: 0; border-bottom: var(--rule) solid var(--line-faint);
  background: transparent; color: var(--ink); font: inherit; font-size: var(--text-sm);
  text-align: left; cursor: pointer;
}
.hx-top button:hover, .hx-top button[aria-pressed="true"] { background: var(--accent-wash); }
.hx-tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-tb { height: 8px; border-radius: 4px; background: var(--paper-sunken); overflow: hidden; }
.hx-tb i { display: block; height: 100%; background: var(--wash-5); border-radius: 4px; }
.hx-tv { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-2); white-space: nowrap; }
.hx-cheie summary { cursor: pointer; list-style-position: inside; }
.hx-kt { margin: 0 0 6px; color: var(--ink-3); font-size: var(--text-xs); }
.hx-trepte { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: var(--text-xs); color: var(--ink-2); }
.hx-trepte li { display: inline-flex; align-items: center; gap: 6px; }
.hx-trepte span { width: 18px; height: 12px; border-radius: 3px; border: var(--rule) solid var(--line); }
.hx-simb { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--text-sm); color: var(--ink-2); }
.hx-simb li { display: flex; gap: 10px; align-items: baseline; }
.hx-s { flex: none; display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
.hx-s--nod { border-radius: 50%; background: var(--solar); box-shadow: inset 0 0 0 1.5px var(--paper); }
.hx-s--prep { border-radius: 50%; border: 2px dashed var(--eolian); }
.hx-s--st { width: 9px; height: 9px; border-radius: 50%; background: var(--st400); }
.hx-s--l400 { height: 3px; border-radius: 2px; background: var(--kv400); vertical-align: 3px; }
.hx-s--l220 { height: 2px; border-radius: 2px; background: var(--kv220); vertical-align: 3px; }
.hx-s--l110 { height: 1.5px; border-radius: 2px; background: var(--kv110); vertical-align: 3px; }
.hx-s--rep { width: 10px; height: 10px; transform: rotate(45deg); background: var(--context); }
.hx-s--gr { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid var(--context); }
.hx-s--flux { width: auto; height: auto; color: var(--accent); font-weight: 700; }
.hx-s--flux::before { content: "↓↑"; }

/* ------------------------------------------------------------ telefon */
@media (max-width: 979px) {
  .hx-grid { grid-template-columns: minmax(0, 1fr); }
  /* Harta cap-coada pe latime: pe un ecran de 390, fiecare pixel din margini
     e un pixel luat tarii. */
  .hx { padding-inline: 0; }
  .hx-cap { padding-inline: 0; }
  .hx-map {
    height: clamp(360px, 60svh, 500px);
    border-radius: 0; border-inline: 0;
  }
  .hx-legenda, .hx-live, .hx-cifre, .hx-jos, .hx > noscript { padding-inline: var(--shell-pad); }
  .hx-teh { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .hx-teh::-webkit-scrollbar { display: none; }
  .hx-teh button { flex: none; }
  .hx-side { display: contents; }
  /* Cartonasele live: doua, alaturate, derulate pe orizontala. */
  .hx-live {
    order: -1; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; gap: 10px; padding: 0 var(--shell-pad) 2px;
    scroll-padding-inline: var(--shell-pad);
  }
  .hx-live::-webkit-scrollbar { display: none; }
  .hx-lcard { flex: 0 0 min(86%, 340px); scroll-snap-align: start; }
  /* `stretch`, nu `start` ca pe desktop: altfel harta lua latimea randului
     de tehnologii (657 px pe un ecran de 390) si tara iesea taiata. */
  .hx-grid { display: flex; flex-direction: column; align-items: stretch; }
  /* Cartonasul alegerii: foaie jos, peste pagina. Nu acopera harta toata,
     ca sa se vada ce ai ales. */
  .hx-card { display: none; }
  .hx-card.is-open {
    display: block;
    position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 60;
    max-height: 58svh; overflow: auto; overscroll-behavior: contain;
    padding: 18px 16px 16px;
    box-shadow: 0 -8px 40px color-mix(in oklab, var(--ink) 25%, transparent);
    animation: hx-urca var(--dur-mid) var(--ease-out);
  }
  /* Compact: capul, cifra, bara si butonul. Restul la „Mai multe detalii". */
  .hx-card.is-open:not(.is-mare) :is(.hx-kv, .hx-fine, .hx-lista, .hx-p) { display: none; }
  .hx-card.is-open .hx-big { font-size: var(--text-lg); margin-bottom: 6px; }
  .hx-card.is-open .hx-cta { margin-top: 10px; }
  .hx-card.is-open::before {
    content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px;
    margin-left: -18px; border-radius: 2px; background: var(--line-strong);
  }
  /* Panoul: tot foaie jos. */
  .hx-panel, .hx.has-panel .hx-panel:has(.hx-cauta) {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 61;
    width: auto; max-height: 78svh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 40px color-mix(in oklab, var(--ink) 30%, transparent);
    animation: hx-urca var(--dur-mid) var(--ease-out);
  }
  /* Voalul sta IN harta, iar harta urca deasupra paginii cat panoul e
     deschis. `.hx-map` e un context de stivuire (`isolation`), deci un voal
     pus pe `.hx` ajungea peste panou, iar cartonasele live -- pozitionate si
     mai jos in marcaj -- peste capul lui. */
  .hx.has-panel .hx-map { z-index: 70; }
  .hx.has-panel .hx-map::after {
    content: ""; position: fixed; inset: 0; z-index: 5;
    background: color-mix(in oklab, var(--ink) 35%, transparent);
  }
  .hx-fullb { display: grid !important; }
  /* Pe telefon butoanele de marire stau pe un rand, jos: in coloana ocupau
     176 px in dreapta, adica exact Constanta si Tulcea. */
  .hx-zoom { flex-direction: row; right: 8px; bottom: 8px; }
  .hx-zoom button { border-bottom: 0; border-right: var(--rule) solid var(--line-faint); }
  .hx-zoom button:last-child { border-right: 0; }
  .hx-zlvl { right: auto; left: 12px; bottom: 20px; }
  .hx-cifre { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm) var(--space-md); }
  .hx-cifre .hx-c:first-child { grid-column: 1 / -1; }
  .hx-jos { grid-template-columns: minmax(0, 1fr); }
  .hx-top button { grid-template-columns: 6.5rem minmax(0, 1fr) auto; }
}
@media (max-width: 420px) {
  .hx-bl { display: none; }
  .hx-b { padding: 0 12px; }
}
@keyframes hx-urca { from { transform: translateY(24px); opacity: 0; } }

/* Ecranul intreg, pe telefon: harta ia tot ecranul si degetul. */
.hx.is-full .hx-map {
  position: fixed; inset: 0; z-index: 55; height: auto;
  border: 0; border-radius: 0;
}
:root.hx-blocat, :root.hx-blocat body { overflow: hidden; }

/* Etichetele hartii -- numele cifrelor de sub ea, capetele cartonaselor --
   sunt text, nu date: fara majuscule si fara monospatiat, ca in restul
   site-ului (vezi „ETICHETE" in wattsplaza.css, 28 septembrie 2026). */
.hx-c dt, .hx-eyebrow, .hx-lh, .hx-seg legend {
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0; text-transform: none;
}

/* `hidden` trebuie sa bata regulile de `display` de mai sus: fara asta,
   eticheta goala si numarul de filtre gol stateau pe ecran. */
.hx [hidden] { display: none !important; }

/* Harta si coloana din dreapta, un singur bloc (2 octombrie 2026). Pana acum
 * harta avea inaltime fixa, iar coloana pe cat continutul: se terminau la
 * niveluri diferite si sub harta ramanea un gol. Acum randul ia inaltimea
 * celei mai inalte, harta creste sa umple, iar ultimul cartonas din dreapta
 * (reteaua) coboara pana la nivelul legendei. Panza se redeseneaza singura
 * la orice marime (`ResizeObserver` din harta.js). Pe telefon nimic nu se
 * schimba: acolo coloana sta sub harta. */
@media (min-width: 980px) {
  .hx-grid { align-items: stretch; }
  .hx-stage { display: flex; flex-direction: column; }
  .hx-map { flex: 1 1 auto; height: auto; min-height: clamp(460px, 68vh, 660px); }
  .hx-side > .hx-live { flex: 1 1 auto; }
  .hx-live > .hx-sen { flex: 1 1 auto; display: flex; flex-direction: column; }
}

/* Cartonasul de detalii apare doar cand e ales ceva pe harta. */
.hx-card:empty { display: none; }
