/* Winter climate-zone map (home-lab-3/zone-map.js): the same map in the
   Calculator rapid, the Auditor and TEO. Uses the page tokens --card, --ln,
   --ink, --txt, --mut, --brand, --bg, --soft-2, --font, --display; a page
   without them (TEO) defines them on .hl3-zmap and .hl3-zm-dialog. */
/* ------------------------------------------------- climate-zone map (laptop) */
/* A real physical map (Copernicus DEM: elevation tints and hill shading) with
   the rivers and lakes of Natural Earth, and the winter zones of Mc 001-2022
   fig. 2.1 on top as a translucent imprint, in the colours of the normative
   figure. */
:root {
  --zi-1: #f08a4b; --zi-2: #f3d65c; --zi-3: #7dbe72; --zi-4: #6ec5d9; --zi-5: #4a68b7;
  --zi-alpha: .3; --zi-alpha-off: .24; --zi-alpha-on: .46;
  --zm-sea: #cfe2ef; --zm-sea-ink: #3f6f96; --zm-outline: #44505e; --zm-seam: rgba(255, 255, 255, .9);
  --zm-grid: rgba(30, 52, 74, .2); --zm-label: #24303d; --zm-relief-ink: #5e4630; --zm-country-ink: #7b8796;
  --zm-halo: rgba(255, 255, 255, .9); --zm-shadow: rgba(11, 21, 38, .2);
  --zm-river: #3b82c4; --zm-lake: #a8d0ec; --zm-zone-ink: rgba(30, 36, 44, .72);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --zi-alpha: .36; --zi-alpha-off: .28; --zi-alpha-on: .55;
    --zm-sea: #13293d; --zm-sea-ink: #8fbbe0; --zm-outline: #b4c1d0; --zm-seam: rgba(10, 15, 24, .7);
    --zm-grid: rgba(190, 210, 230, .16); --zm-label: #e6ecf3; --zm-relief-ink: #e2c9a8; --zm-country-ink: #8e9aab;
    --zm-halo: rgba(12, 18, 28, .88); --zm-shadow: rgba(0, 0, 0, .5);
    --zm-river: #5c9fdc; --zm-lake: #1f4a6e; --zm-zone-ink: rgba(232, 238, 244, .82);
  }
}
:root[data-theme="dark"] {
  --zi-alpha: .36; --zi-alpha-off: .28; --zi-alpha-on: .55;
  --zm-sea: #13293d; --zm-sea-ink: #8fbbe0; --zm-outline: #b4c1d0; --zm-seam: rgba(10, 15, 24, .7);
  --zm-grid: rgba(190, 210, 230, .16); --zm-label: #e6ecf3; --zm-relief-ink: #e2c9a8; --zm-country-ink: #8e9aab;
  --zm-halo: rgba(12, 18, 28, .88); --zm-shadow: rgba(0, 0, 0, .5);
  --zm-river: #5c9fdc; --zm-lake: #1f4a6e; --zm-zone-ink: rgba(232, 238, 244, .82);
}
.hl3-zmap { padding: 14px 14px 12px; overflow: hidden; }
.hl3-zm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hl3-zm-head h3 { margin: 0; }
.hl3-zm-head h3 b { font-weight: 800; }
.hl3-zm-sub { margin: 2px 0 0 !important; color: var(--mut); font-size: 13px; }
.hl3-zm-open { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ln); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; }
.hl3-zm-open:hover { border-color: var(--brand); color: var(--brand); }
.hl3-zm-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hl3-zm-stage { position: relative; margin: 10px -6px 2px; border-radius: 12px; overflow: hidden; }
.hl3-zm-stage .hl3-zm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hl3-zm-svg { overflow: hidden; }
.hl3-zm-sea { fill: var(--zm-sea); }
.hl3-zm-relief-out { filter: url(#hl3ZmNeighbour); }
.hl3-zm-z { fill-opacity: var(--zi-alpha); stroke: var(--zm-seam); stroke-width: 1px; stroke-dasharray: 3 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill-opacity .25s ease; }
.hl3-zm-z[data-zone="I"] { fill: var(--zi-1); }
.hl3-zm-z[data-zone="II"] { fill: var(--zi-2); }
.hl3-zm-z[data-zone="III"] { fill: var(--zi-3); }
.hl3-zm-z[data-zone="IV"] { fill: var(--zi-4); }
.hl3-zm-z[data-zone="V"] { fill: var(--zi-5); }
.hl3-zm-svg[data-zone] .hl3-zm-z { fill-opacity: var(--zi-alpha-off); }
.hl3-zm-svg[data-zone] .hl3-zm-z.is-on { fill-opacity: var(--zi-alpha-on); }
.hl3-zm-sel { fill: none; stroke: color-mix(in srgb, var(--ink) 85%, transparent); stroke-width: 1.6px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hl3-zm-outline { fill: none; stroke: var(--zm-outline); stroke-width: 1.1px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hl3-zm-graticule { fill: none; stroke: var(--zm-grid); stroke-width: .7px; vector-effect: non-scaling-stroke; }
.hl3-zm-river { fill: none; stroke: var(--zm-river); stroke-width: 1.4px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hl3-zm-stream { fill: none; stroke: var(--zm-river); stroke-width: .7px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .8; }
.hl3-zm-stream.is-major { stroke-width: 1px; opacity: .95; }
.hl3-zm-lake { fill: var(--zm-lake); stroke: var(--zm-river); stroke-width: .5px; vector-effect: non-scaling-stroke; }
.hl3-zm-zl { position: absolute; transform: translate(-50%, -50%); pointer-events: none; font-size: 10.5px; font-weight: 700; line-height: 1; letter-spacing: .04em; color: var(--zm-zone-ink); text-shadow: 0 0 2px var(--zm-halo), 0 0 3px var(--zm-halo); }
.hl3-zm-label, .hl3-zm-city, .hl3-zm-pin { position: absolute; pointer-events: none; white-space: nowrap; }
.hl3-zm-sea-label { transform: translateY(-50%); font-size: 10.5px; line-height: 1.15; font-style: italic; text-align: right; color: var(--zm-sea-ink); }
.hl3-zm-city { transform: translate(-3px, -50%); padding-left: 9px; font-size: 11px; font-weight: 600; color: var(--zm-label); text-shadow: 0 0 2px var(--zm-halo), 0 0 3px var(--zm-halo), 0 0 5px var(--zm-halo); }
.hl3-zm-city::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--zm-label); box-shadow: 0 0 0 1.5px var(--zm-halo); }
.hl3-zm-city.is-end { transform: translate(calc(-100% + 3px), -50%); padding: 0 9px 0 0; }
.hl3-zm-city.is-end::before { left: auto; right: 0; }
.hl3-zm-pin { display: flex; align-items: center; gap: 6px; transform: translate(-8px, -50%); z-index: 1; }
.hl3-zm-pin.is-left { flex-direction: row-reverse; transform: translate(calc(-100% + 8px), -50%); }
.hl3-zm-pin i { position: relative; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(11, 21, 38, .45); }
.hl3-zm-pin i::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: hl3-zm-pulse 2.2s ease-out 2; }
.hl3-zm-pin b { padding: 2px 8px; border-radius: 8px; background: var(--card); color: var(--ink); font-size: 12.5px; font-weight: 700; box-shadow: 0 1px 6px rgba(11, 21, 38, .22); }
@keyframes hl3-zm-pulse { 0% { opacity: .7; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.3); } }
.hl3-zm-legend { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.hl3-zm-legend li { display: grid; justify-items: center; gap: 2px; padding: 6px 2px 5px; border-radius: 10px; color: var(--mut); font-size: 11.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hl3-zm-legend li i { width: 100%; max-width: 46px; height: 9px; border-radius: 5px; opacity: .78; box-shadow: inset 0 0 0 1px rgba(11, 21, 38, .1); }
.hl3-zm-legend li b { color: var(--txt); font-size: 12.5px; }
.hl3-zm-legend li.is-on { background: var(--soft-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.hl3-zm-legend li.is-on b { color: var(--ink); }
.hl3-zm-legend li[data-zone="I"] i { background: var(--zi-1); }
.hl3-zm-legend li[data-zone="II"] i { background: var(--zi-2); }
.hl3-zm-legend li[data-zone="III"] i { background: var(--zi-3); }
.hl3-zm-legend li[data-zone="IV"] i { background: var(--zi-4); }
.hl3-zm-legend li[data-zone="V"] i { background: var(--zi-5); }
.hl3-zm-src { margin: 10px 0 0 !important; color: var(--mut); font-size: 12px; line-height: 1.45; }
.hl3-zm-credit { margin: 4px 0 0 !important; color: var(--mut); font-size: 10.5px; line-height: 1.35; opacity: .85; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hl3-zm-relief-out { filter: url(#hl3ZmNeighbourDark); }
  :root:not([data-theme="light"]) .hl3-zm-relief-in { filter: url(#hl3ZmDim); }
}
:root[data-theme="dark"] .hl3-zm-relief-out { filter: url(#hl3ZmNeighbourDark); }
:root[data-theme="dark"] .hl3-zm-relief-in { filter: url(#hl3ZmDim); }
@media (max-width: 959px) {
  .hl3-zmap { display: none !important; }
}

/* Full-screen view: the same map for a large display. Text inside the SVG is
   sized in map units (km), so labels grow with the screen. */
html.hl3-zm-locked { overflow: hidden; }
.hl3-zm-dialog { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--txt); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.hl3-zm-dialog:not([open]) { display: none; }
.hl3-zm-dialog::backdrop { background: rgba(10, 15, 24, .55); }
.hl3-zm-big-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(12px, 1.6vw, 28px) clamp(16px, 2.4vw, 44px) 6px; }
.hl3-zm-big-head h2 { margin: 0; color: var(--ink); font-family: var(--display); font-weight: 750; font-size: clamp(20px, 1.9vw, 40px); letter-spacing: -.01em; }
.hl3-zm-big-head p { margin: 2px 0 0; color: var(--mut); font-size: clamp(14px, 1.05vw, 22px); }
.hl3-zm-big-actions { display: flex; gap: 8px; flex: none; }
.hl3-zm-btn { min-height: clamp(38px, 2.6vw, 54px); padding: 0 clamp(14px, 1.2vw, 24px); border-radius: 999px; border: 1px solid var(--ln); background: var(--card); color: var(--ink); font-weight: 600; font-size: clamp(14px, .95vw, 20px); }
.hl3-zm-btn:hover { border-color: var(--brand); color: var(--brand); }
.hl3-zm-btn-close { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hl3-zm-btn-close:hover { color: var(--bg); opacity: .88; }
.hl3-zm-big-stage { min-height: 0; padding: 4px clamp(10px, 1.6vw, 36px); display: grid; }
.hl3-zm-big-stage .hl3-zm-svg { width: 100%; height: 100%; display: block; }
.hl3-zm-big-foot { display: grid; grid-template-columns: minmax(280px, 520px) minmax(0, 1fr); gap: clamp(12px, 2vw, 40px); align-items: center; padding: 6px clamp(16px, 2.4vw, 44px) clamp(12px, 1.4vw, 26px); }
.hl3-zm-big-foot .hl3-zm-legend { margin: 0; }
.hl3-zm-big-foot .hl3-zm-legend li { font-size: clamp(11.5px, .8vw, 17px); }
.hl3-zm-big-foot .hl3-zm-legend li b { font-size: clamp(12.5px, .9vw, 19px); }
.hl3-zm-big-foot .hl3-zm-legend li i { max-width: 72px; height: clamp(9px, .6vw, 14px); }
.hl3-zm-big-foot .hl3-zm-src { margin: 0 !important; font-size: clamp(11px, .72vw, 15px); }
.hl3-zm-svg-big text { paint-order: stroke; stroke: var(--zm-halo); stroke-linejoin: round; font-family: var(--font); }
.hl3-zm-name { stroke-width: 2.2px; }
.hl3-zm-name.is-covered { display: none; }
.hl3-zm-name-relief { fill: var(--zm-relief-ink); font-family: var(--display); font-weight: 700; text-transform: uppercase; }
.hl3-zm-name-region { fill: color-mix(in srgb, var(--zm-relief-ink) 78%, var(--zm-label)); font-weight: 500; font-style: italic; }
.hl3-zm-name-water { fill: var(--zm-sea-ink); font-weight: 500; font-style: italic; }
.hl3-zm-name-country { fill: var(--zm-country-ink); font-family: var(--display); font-weight: 650; text-transform: uppercase; }
.hl3-zm-numeral { fill: rgba(255, 255, 255, .62); stroke: rgba(36, 48, 61, .32) !important; stroke-width: .7px !important; font-family: var(--display) !important; font-weight: 800; font-style: italic; }
.hl3-zm-degree { fill: color-mix(in srgb, var(--zm-label) 60%, transparent); font-size: 7.2px; stroke-width: 1.6px; }
.hl3-zm-peak path { fill: var(--zm-relief-ink); stroke: var(--zm-halo); stroke-width: .8px; }
.hl3-zm-peak text { fill: var(--zm-relief-ink); font-weight: 600; stroke-width: 1.8px; }
.hl3-zm-seat circle { fill: var(--zm-label); stroke: var(--zm-halo); stroke-width: 1px; }
.hl3-zm-seat text { fill: var(--zm-label); font-weight: 600; stroke-width: 2.2px; }
.hl3-zm-scale rect { fill: var(--zm-label); }
.hl3-zm-scale rect.is-alt { fill: var(--zm-halo); stroke: var(--zm-label); stroke-width: .6px; }
.hl3-zm-scale text { fill: var(--zm-label); font-size: 6.8px; stroke-width: 1.6px; }
.hl3-zm-big-dot { fill: var(--brand); stroke: #fff; stroke-width: 2px; }
.hl3-zm-big-tag rect { fill: var(--card); stroke: rgba(11, 21, 38, .18); stroke-width: .8px; }
.hl3-zm-big-tag text { fill: var(--ink); font-weight: 750; stroke: none !important; }
@media (max-width: 700px) {
  .hl3-zm-big-foot { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hl3-zm-pin i::after { animation: none; }
}

