/* Slopewatch / Pistenradar. Every design value below is explained in DESIGN.md (research behind it). */

/* Fira Sans (humanist sans, SIL OFL 1.1, vendor/fonts/OFL.txt), served from our own server. Only the subsets a page
   needs are loaded (unicode-range); latin-ext for Polish, Czech and other later languages. */
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url(/vendor/fonts/fira-sans-latin-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-display: swap; src: url(/vendor/fonts/fira-sans-latin-600.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-weight: 700; font-display: swap; src: url(/vendor/fonts/fira-sans-latin-700.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url(/vendor/fonts/fira-sans-latin-ext-400.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-display: swap; src: url(/vendor/fonts/fira-sans-latin-ext-600.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-weight: 700; font-display: swap; src: url(/vendor/fonts/fira-sans-latin-ext-700.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Light is the default (positive polarity), also when the phone is set to dark: the page is mostly read outdoors in
   daylight. Dark only by the visitor's own choice (button in the header, data-theme set by theme.js). */
:root {
  /* brand: deep navy (owner's choice, close to Lufthansa blue #05164D). Navy is much darker than the "icy" snow blue
     (3.3:1), so buttons are not read as data. Links 9.7:1, white on navy 13-17:1. */
  --navy: #05164d; --navy-2: #0b2a6f; --navy-3: #1a4aa8;
  --bg: #f3f5f8; --card: #ffffff; --text: #141a21; --muted: #444c56; --line: #d3d9e0; --accent: #0b2a6f; --link: #12408f;
  --on-accent: #ffffff; --edge: rgba(20, 26, 33, .45);
  /* Okabe-Ito: distinguishable with the common kinds of colour blindness; lines and cells get a dark edge so even the
     light ones keep 3:1 against white (WCAG 1.4.11) */
  --fresh: #56b4e9; --grippy: #009e73; --soft: #e69f00; --icy: #0072b2; --wet: #d55e00; --bare: #7b5a3a; --sun: #ffd23f; --sun-hazy: #e6e0c4;
  --note-bg: #fff4d6; --note-text: #4a3700; --note-line: #d9b44a;
  --tap: 48px;               /* minimum touch target (~8-9 mm on phones); gloves: see DESIGN.md */
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1020; --card: #131a2c; --text: #e9eef4; --muted: #b8c3cf; --line: #2a3550; --accent: #8cbcff; --link: #8cbcff;
  --on-accent: #0b1320; --edge: rgba(0, 0, 0, .6);
  --note-bg: #3a3014; --note-text: #f6e2a8; --note-line: #7a6424;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.5 "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); }
a { color: var(--link); text-underline-offset: .15em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* times, temperatures, heights: figures of equal width so values do not jump when they change */
output, .what, .wx, .hours-head, table.runs, .issued, .ref { font-variant-numeric: tabular-nums; }

/* header and title on a navy gradient over the resort's own relief (build/hero.py). The overlay is at least 88 %
   opaque, so white text keeps >= 7.8:1 even over the brightest relief (DESIGN.md); content below stays on plain surfaces. */
.hero { color: #fff; background-color: var(--navy);
  background-image: linear-gradient(100deg, rgba(5, 22, 77, .95) 0%, rgba(5, 22, 77, .9) 45%, rgba(14, 52, 130, .88) 100%), var(--hero, none);
  background-size: cover; background-position: center 40%; }
.hero-in { max-width: 1180px; margin: 0 auto; padding: .6rem 1.2rem 1.7rem; }
.hero h1 { color: #fff; }
.hero .lead { color: #dde6f5; margin-bottom: 0; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 1.2rem;
  min-height: 64px; max-width: 1180px; margin: 0 auto; }
.brand { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: #fff; display: flex; gap: .6rem;
  align-items: center; min-height: var(--tap); letter-spacing: .01em; }
.brand svg { width: 34px; height: 34px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); border-radius: 8px; }
/* the name in Saira Semi Condensed Bold as vector outlines (build/wordmark.py), no font download */
.brand svg.wordmark { width: auto; height: 1.28em; box-shadow: none; border-radius: 0; overflow: visible; }
.hero.slim .brand svg.wordmark { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)) drop-shadow(0 0 6px rgba(5, 22, 77, .9)); }
.tools { display: flex; align-items: center; gap: .5rem; }
.lang a, .theme { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .8rem; font-size: 1rem; color: #fff; }
.theme { border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08); border-radius: 999px; cursor: pointer; }
.theme:hover { background: rgba(255, 255, 255, .16); }

main { max-width: 1180px; margin: 0 auto; padding: 1.2rem; }
main > .season:first-child { margin-top: .2rem; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .3rem 0 .4rem; font-weight: 700; }
h2 { font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 1rem; max-width: 38em; }
.season { font-size: .95rem; color: var(--muted); margin: 0 0 .8rem; max-width: 46em; }

/* controls: big, well separated targets (gloves, cold fingers, moving chairlift) */
.controls { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; margin: .6rem 0 1rem; }
.days, .modes { display: flex; gap: .5rem; flex-wrap: wrap; }
.days button, .modes button { min-height: var(--tap); min-width: var(--tap); border: 1px solid var(--line); background: var(--card);
  color: var(--text); padding: 0 1rem; border-radius: 999px; cursor: pointer; font-weight: 600; }
.days button[aria-pressed="true"], .modes button[aria-pressed="true"] { background: linear-gradient(180deg, var(--navy-3), var(--navy));
  border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .days button[aria-pressed="true"], :root[data-theme="dark"] .modes button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hour { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 280px; font-weight: 600; }
.hour output { font-weight: 700; min-width: 7.5rem; font-size: 1.05rem; }
.play { width: 52px; height: 52px; flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.play:hover, .days button:hover, .modes button:hover { border-color: var(--accent); }
/* slider: tall track and a large thumb */
input[type="range"] { flex: 1; height: var(--tap); margin: 0; accent-color: var(--accent); background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: var(--line); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -11px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--edge); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 5px; background: var(--line); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); border: 3px solid var(--card); }
input[type="range"] { -webkit-appearance: none; appearance: none; }

.layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1rem; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
#map { height: 620px; border-radius: 10px; border: 1px solid var(--line); background: #e9e9e9; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(5, 22, 77, .06), 0 4px 14px rgba(5, 22, 77, .05); }
.now { border-top: 4px solid var(--navy-2); }
.card h2 { font-size: 1.1rem; margin: 0 0 .6rem; }

/* the answer first: larger text for the Now card, read in a glance */
.now { margin: 0 0 1rem; }
.now h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
.now p { margin: .25rem 0; font-size: 1.06rem; }
.now p.wx { font-size: .95rem; color: var(--muted); margin-top: .5rem; }
.now p.example { font-weight: 600; color: var(--note-text); background: var(--note-bg); border: 1px solid var(--note-line);
  border-radius: 8px; padding: .4rem .6rem; }
.example-link { font-weight: 600; }
.day-note { background: var(--note-bg); color: var(--note-text); border: 1px solid var(--note-line); border-radius: 8px;
  padding: .6rem .9rem; margin: 0 0 .9rem; }

/* day, hour and legend stay at the top while scrolling, so the colours of map and bars are always explained */
.bar { position: sticky; top: 0; z-index: 1001; background: var(--bg); margin: 0 -1.2rem .6rem; padding: .5rem 1.2rem .55rem;
  border-bottom: 1px solid var(--line); }
.bar .controls { margin: 0 0 .45rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .9rem; margin: 0; }
.key.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.key { width: 28px; height: 10px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px var(--edge); }
.key.sun { background: var(--sun); } .key.shade { background: #3d4f66; }
.k-f { background: var(--fresh); } .k-g { background: var(--grippy); } .k-s { background: var(--soft); }
.k-i { background: var(--icy); } .k-w { background: var(--wet); } .k-b { background: var(--bare); }

.best ol { list-style: none; margin: 0; padding: 0; }
.best li { display: grid; grid-template-columns: 2.8rem 1fr; gap: .15rem .7rem; padding: .6rem 0; border-top: 1px solid var(--line);
  cursor: pointer; min-height: var(--tap); }
.best li:first-child { border-top: 0; }
.best li.msg { display: block; cursor: default; color: var(--muted); }
.ref { font-weight: 700; text-align: center; border-radius: 6px; padding: .1rem .25rem; color: #fff; height: fit-content; }
.d-novice, .d-easy { background: #1f5fc4; } .d-intermediate { background: #b8241f; } .d-advanced, .d-expert { background: #141a21; }
.d-freeride { background: #a85a00; } .d- { background: #5f6872; }
.what { font-size: .95rem; color: var(--muted); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; margin-top: .35rem; }
.strip i { height: 14px; border-radius: 3px; position: relative; box-shadow: inset 0 0 0 1px var(--edge); }
.strip i.now { outline: 3px solid var(--text); outline-offset: 1px; }
.strip i.lit::after { content: ""; position: absolute; left: 50%; top: -7px; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 1px var(--edge); }
.hours-head { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; font-size: .8rem; color: var(--muted); }
.run-card { margin-top: .8rem; }

table.runs { width: 100%; border-collapse: collapse; font-size: .98rem; }
table.runs th, table.runs td { text-align: left; padding: .5rem .45rem; border-top: 1px solid var(--line); vertical-align: middle; }
table.runs tr { cursor: pointer; }
table.runs td.tl { width: 46%; }

.explain { margin-top: 1.6rem; max-width: 38em; }      /* ~70 characters per line */
.explain h2 { font-size: 1.2rem; margin: 1.4rem 0 .3rem; }
.note { font-size: .92rem; color: var(--muted); }
.issued { font-size: .92rem; color: var(--muted); margin-top: .5rem; }
footer { max-width: 1180px; margin: 2rem auto; padding: 0 1.2rem 1.5rem; font-size: .92rem; color: var(--muted); }
footer a { color: var(--muted); display: inline-block; padding: .6rem .2rem; }
.leaflet-container { font: inherit; }
.leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }

/* home page */
ol.resorts { list-style: none; margin: 0; padding: 0; }
ol.resorts li { padding: .7rem 0; border-top: 1px solid var(--line); }
ol.resorts li:first-child { border-top: 0; }
ol.resorts a { font-weight: 700; font-size: 1.12rem; display: inline-block; padding: .25rem 0; }
.share { display: flex; height: 12px; border-radius: 4px; overflow: hidden; margin-top: .4rem; background: var(--line); max-width: 36rem;
  box-shadow: inset 0 0 0 1px var(--edge); }
.share i { display: block; height: 100%; }

/* legal pages */
main.legal { max-width: 46em; }
main.legal h2 { font-size: 1.15rem; margin: 1.4rem 0 .3rem; }
main.legal button { min-height: var(--tap); border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 0 1rem; border-radius: 8px; cursor: pointer; margin: 0 .5rem .5rem 0; font-weight: 600; }

/* labels on our own map */
.lbl { white-space: nowrap; font: 600 13px/1.1 "Fira Sans", system-ui, sans-serif; color: #1d232a; transform: translate(-50%, -50%);
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; pointer-events: none; }
.lbl-town { font-size: 15px; font-weight: 700; }
.lbl-hamlet { font-weight: 400; font-size: 12px; color: #39414a; }
.lbl-peak { font-weight: 400; font-size: 12px; color: #4d3f31; }

/* phones */
@media (max-width: 640px) {
  main { padding: .8rem; }
  header.top { padding: .3rem .7rem; }
  .hero-in { padding: .2rem .8rem 1.2rem; }
  .brand span { font-size: 1.1rem; }
  h1 { font-size: 1.45rem; }
  .lead { font-size: 1rem; }
  .controls { gap: .5rem; }
  .bar { margin: 0 -.8rem .5rem; padding: .4rem .8rem .45rem; }
  .bar .controls { margin-bottom: .3rem; }
  .legend { gap: .15rem .8rem; font-size: .85rem; }
  .key { width: 20px; }
  .key.dot { width: 10px; }
  .days { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: .2rem; scrollbar-width: none; }
  .days button { flex: none; }
  .hour { min-width: 0; width: 100%; }
  .hour { gap: .55rem; }
  .hour output { min-width: 0; text-align: right; white-space: nowrap; }
  /* the word "Time" stays for screen readers; the slider needs the width */
  .hour-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #map { height: 440px; }
  .card { padding: .9rem .8rem; }
  table.runs thead { display: none; }
  table.runs, table.runs tbody { display: block; }
  table.runs tr { display: grid; grid-template-columns: 3rem 1fr auto; gap: .2rem .55rem; padding: .6rem 0;
    border-top: 1px solid var(--line); align-items: center; }
  table.runs td { border: 0; padding: 0; }
  table.runs td.tl { grid-column: 1 / -1; width: auto; }
  table.runs td:nth-child(3) { font-size: .9rem; color: var(--muted); }
}
.hero :focus-visible { outline-color: #ffffff; }

/* sun under a forecast overcast sky (cloud >= 80 %): pale, and hollow dots in the day bars */
.key.sun-hazy { background: var(--sun-hazy); }
.key.dot.hazy { background: transparent; box-shadow: inset 0 0 0 2px #8a7a2a; }
.strip i.lit.hazy::after { background: var(--card); box-shadow: inset 0 0 0 1.5px #8a7a2a; }
/* piste difficulty keys (home map) */
.key.d-blue { background: #1f5fc4; } .key.d-red { background: #b8241f; } .key.d-black { background: #141a21; }
.key.d-route { background: repeating-linear-gradient(90deg, #a85a00 0 6px, transparent 6px 10px); }
.calc-note { font-size: .9rem; color: var(--muted); margin: .45rem 0 .45rem; max-width: 60em; }
.map-msg { margin: .4rem 0 0; padding: .5rem .7rem; border-radius: 6px; background: var(--note-bg); color: var(--note-text);
  border: 1px solid var(--note-line); }
/* resort pins on the home map: coloured dot plus name */
.resort-pin { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.resort-pin i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(20,26,33,.6);
  flex: none; background: var(--navy); }
.resort-pin span { font: 600 13.5px/1.2 "Fira Sans", system-ui, sans-serif; color: #141a21; background: rgba(255,255,255,.85);
  padding: 1px 5px; border-radius: 4px; }
/* "show my position": a full-size touch target */
.leaflet-control.locate { width: 48px; height: 48px; display: grid; place-items: center; background: #fff; color: var(--navy);
  border: 2px solid rgba(0,0,0,.2); border-radius: 6px; cursor: pointer; padding: 0; }
.leaflet-control.locate:hover { color: var(--navy-3); }
.leaflet-control.locate.busy { animation: sw-pulse 1s ease-in-out infinite; }
@keyframes sw-pulse { 50% { opacity: .45; } }


/* live stations: temperature label on the map, red "live" dot in the toggle and popup */
.live-pin span { display: inline-block; font: 700 13.5px/1 "Fira Sans", system-ui, sans-serif; color: #fff; background: #b8241f;
  padding: 4px 6px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); white-space: nowrap; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d1281f; margin-right: .45rem;
  vertical-align: 1px; box-shadow: 0 0 0 2px rgba(209,40,31,.25); }
.live-when { color: #b8241f; font-weight: 700; font-size: .85rem; margin: .1rem 0 .25rem; }
.wx.live { border-left: 3px solid #b8241f; padding-left: .5rem; }

/* "measured now" legend: colour bar with ticks (inside the map legend) */
.now-legend .scale { height: 12px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--edge); margin-top: .2rem; }
.now-legend .scale-ticks { position: relative; height: 1.2rem; font-size: .78rem; color: var(--muted); margin: 0 .6rem; }
.now-legend .scale-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.now-legend .note { margin: .2rem 0 0; }

/* map controls after Lagescan (maplayers.js): layer menu top right, legend bottom right, both on the card colour */
.legend[hidden] { display: none; }
/* the map is its own stacking context: its controls never cover the sticky bar; the open layer menu lies over the legend */
#map { isolation: isolate; }
#map .leaflet-top { z-index: 1001; }
.sw-layers.leaflet-control-layers-expanded { padding: .35rem .8rem .5rem .7rem; min-width: 210px; overflow-y: auto;
  background: var(--card); color: var(--text); }
.sw-layers .leaflet-control-layers-toggle { width: 48px; height: 48px; background-color: #fff; border-radius: 6px; }
.sw-layers-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .95rem; }
.sw-close { width: 40px; height: 40px; border: 0; background: none; color: var(--text); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.sw-group { border: 0; margin: 0; padding: 0; }
.sw-group legend { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  padding: .3rem 0 .15rem; }
.sw-group label { display: flex; align-items: center; gap: .5rem; min-height: 38px; font-size: .95rem; cursor: pointer; }
.sw-group input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.sw-hint { font-size: .78rem; color: var(--muted); margin-left: auto; padding-left: .5rem; white-space: nowrap; }
.sw-disabled { color: var(--muted); cursor: default; }
.sw-layers .leaflet-control-layers-separator { border-top-color: var(--line); margin: .3rem 0; }
.sw-legend { background: var(--card); color: var(--text); border-radius: 8px; box-shadow: 0 1px 5px rgba(0,0,0,.35);
  max-width: min(300px, calc(100vw - 90px)); font-size: .85rem; line-height: 1.35; }
.sw-legend-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .6rem; min-height: 40px;
  padding: 0 .75rem; border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.sw-legend-toggle::after { content: "▾"; font-size: .8rem; }
.sw-legend.folded .sw-legend-toggle::after { content: "▴"; }
.sw-legend.folded .sw-legend-body { display: none; }
.sw-legend-body { padding: 0 .75rem .6rem; max-height: 320px; overflow-y: auto; }
.sw-legend-sec + .sw-legend-sec { border-top: 1px solid var(--line); margin-top: .45rem; padding-top: .45rem; }
.sw-legend-title { font-weight: 600; margin-bottom: .25rem; }
.sw-legend .legend { display: grid; grid-template-columns: repeat(2, auto); gap: .2rem .9rem; font-size: .85rem; }
.sw-legend-body { overflow-x: hidden; }
.sw-legend .legend span:last-child:nth-child(odd), .sw-legend .legend span:has(.k-closed), .sw-legend .legend span:has(.live-pin) { grid-column: 1 / -1; }
.sw-legend .note { font-size: .8rem; margin: .3rem 0 0; }
.key.k-closed { background: #9aa3ad; } .key.k-cloud { background: rgba(72, 88, 112, .55); }
.live-pin.sample { display: inline-block; flex: none; }
.live-pin.sample span { font-size: 11.5px; padding: 2px 5px; border-width: 1.5px; }

/* home: the map comes first, as tall as the screen allows */
/* home: the satellite image of the Stubai Glacier with its white snow untouched (owner, 5 Dec 2026). No tint over the
   picture: navy only where text sits - a fade from the left behind logo and title that is clear from 55 % of the width,
   and own dark backgrounds for the buttons on the right; text shadow on top. Phones: the text spans the whole width,
   so there the fade covers it all, lighter. */
.hero.slim { background-image: linear-gradient(90deg, rgba(5, 22, 77, .82) 0%, rgba(5, 22, 77, .6) 22%, rgba(5, 22, 77, .25) 40%, rgba(5, 22, 77, 0) 55%), var(--hero, none);
  background-position: center 50%; }
.hero.slim h1, .hero.slim .brand, .hero.slim .lang a, .hero.slim .theme { text-shadow: 0 1px 2px rgba(0, 0, 0, .8), 0 0 10px rgba(5, 22, 77, .95); }
.hero.slim .theme, .hero.slim .lang a { background: rgba(5, 22, 77, .7); border-radius: 999px; }
.hero.slim .lang a { margin-left: .3rem; }
@media (max-width: 640px) {
  .hero.slim { background-image: linear-gradient(180deg, rgba(5, 22, 77, .62), rgba(5, 22, 77, .5)), var(--hero, none); }
}
.hero.slim .hero-in { padding: 0 1.2rem .9rem; }
.hero.slim h1 { font-size: 1.15rem; font-weight: 600; margin: 0; }
main.home { padding-top: .6rem; }
main.home .home-map { margin: 0 0 .6rem; }
main.home .home-map #map { height: clamp(420px, calc(100vh - 210px), 760px); background: #f3f5f8; }
main.home > .lead, .page-lead { margin: .8rem 0 0; max-width: 46em; }
main.home > #map-credit { margin-top: 1rem; }
@media (max-width: 640px) {
  .hero.slim .hero-in { padding: 0 .8rem .6rem; }
  .hero.slim h1 { font-size: 1rem; }
  main.home .home-map #map { height: clamp(380px, calc(100vh - 230px), 560px); }
  .sw-group label { min-height: 44px; }
}

/* Lagescan's map details (maplayers.js): drag bar for the map height, dark theme map, aerial photo on the relief */
.sw-full-ctl a { display: flex; align-items: center; justify-content: center; }
#map:fullscreen { width: 100% !important; height: 100% !important; border-radius: 0; border: 0; }
#map.sw-full { position: fixed !important; inset: 0; z-index: 2000; width: 100vw; height: 100vh !important; height: 100dvh !important;
  border-radius: 0; border: 0; margin: 0; }
html.sw-full-page, html.sw-full-page body { overflow: hidden; }
.map-resize { display: flex; align-items: center; justify-content: center; height: 26px; margin-top: 2px; cursor: row-resize;
  touch-action: none; user-select: none; border-radius: 0 0 10px 10px; }
.map-resize span { width: 56px; height: 6px; border-radius: 3px; background: var(--muted); opacity: .5; }
.map-resize:hover span, .map-resize:focus-visible span { opacity: .85; }
.map-resize.dragging span { opacity: 1; background: var(--accent); }
.map-resize:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* dark theme: darken the light base maps only, never the aerial photo or the data on top (as on Lagescan) */
:root[data-theme="dark"] #map { background: #1b2233; }
:root[data-theme="dark"] #map .sw-base { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.88) saturate(.6); }
:root[data-theme="dark"] #map.base-aerial .sw-relief { filter: brightness(.8); }
.credit-dark { display: none; }   /* licence: notice of changes, only while the dark theme recolours the map */
:root[data-theme="dark"] .credit-dark, #map.blend-aerial.base-aerial .credit-dark { display: inline; }
/* zoomed out, the aerial photo (white outside Austria) is multiplied onto the relief of the Alps */
#map.blend-aerial .sw-aerial { mix-blend-mode: multiply; }
.legend-zoom { margin-top: .3rem; min-height: 32px; padding: 0 .8rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--navy-2); color: #fff; font: inherit; font-size: .8rem; font-weight: 600; }
:root[data-theme="dark"] .legend-zoom { background: var(--accent); color: var(--on-accent); }
/* Leaflet's buttons, popups and credit line in the dark theme */
:root[data-theme="dark"] .leaflet-bar a, :root[data-theme="dark"] .leaflet-control.locate { background-color: var(--card); color: var(--text);
  border-bottom-color: var(--line); }
:root[data-theme="dark"] .leaflet-popup-content-wrapper, :root[data-theme="dark"] .leaflet-popup-tip { background: var(--card); color: var(--text); }
:root[data-theme="dark"] .leaflet-container .leaflet-control-attribution, :root[data-theme="dark"] .leaflet-control-scale-line {
  background: rgba(19, 26, 44, .8); color: var(--muted); }
:root[data-theme="dark"] .leaflet-control-attribution a { color: var(--link); }
:root[data-theme="dark"] .leaflet-control-scale-line { border-color: var(--muted); }