:root { --bg: #fff; --fg: #1a1a1a; --muted: #666; --line: #e3e3e3; --accent: #0b5cad; --err: #b3261e;
  --open: #1f7a3a; --closed: #6b6b6b; --none: #b9b9b9; --chip: #eef1f4; --row-hover: #f6f8fa; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #121212; --fg: #ececec; --muted: #9a9a9a; --line: #2c2c2c; --accent: #7fb3ff; --err: #ff8a80;
    --open: #3fa65c; --closed: #8a8a8a; --none: #5a5a5a; --chip: #262a2f; --row-hover: #1b1e22; }
}
body { background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, sans-serif; margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: .9rem; }
.err { color: var(--err); font-size: .85rem; }
code { font-size: .9em; }

/* Open share of lifts or slopes. */
.meter { width: 64px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--open); }
/* Avalanche danger level in the European (EAWS) colours. */
.badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px;
  font-weight: 700; font-size: .8rem; color: #1a1a1a; }
.lvl1 { background: #ccff66; } .lvl2 { background: #ffff00; } .lvl3 { background: #ff9900; }
.lvl4 { background: #ff0000; color: #fff; } .lvl5 { background: #1a1a1a; color: #fff; box-shadow: inset 0 0 0 2px #ff0000; }

/* Liftradar's name and logo, on every page (smaller with .compact), and the round links next to it. */
.brand { display: flex; align-items: center; gap: 11px; margin: 0; color: var(--fg); text-decoration: none; }
.brand svg { flex: none; }
.brand .name { display: grid; gap: 4px; }
.brand b { font-size: 1.6rem; line-height: 1; letter-spacing: -.015em; }
.brand small { font-size: .7rem; line-height: 1; font-weight: 500; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.brand.compact { gap: 9px; }
.brand.compact .name { gap: 3px; }
.brand.compact b { font-size: 1.3rem; }
.brand.compact small { font-size: .62rem; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px 0 11px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font-size: .9rem; font-weight: 500; text-decoration: none; }
.pill svg { flex: none; color: var(--accent); }
.pill:hover { border-color: var(--accent); color: var(--accent); }
a.brand:focus-visible, .pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The bar at the top of the sources and resort pages. */
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; gap: 8px; margin-left: auto; }

/* Leaflet's popups, tooltips and controls (map and resort pages) in the page's colours, so they follow dark mode. */
.leaflet-popup-content-wrapper, .leaflet-popup-tip, .leaflet-tooltip { background: var(--bg); color: var(--fg);
  box-shadow: 0 2px 14px rgba(0,0,0,.22); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-tooltip { border-color: var(--line); }
.leaflet-tooltip-top::before { border-top-color: var(--bg); }
.leaflet-tooltip-bottom::before { border-bottom-color: var(--bg); }
.leaflet-tooltip-left::before { border-left-color: var(--bg); }
.leaflet-tooltip-right::before { border-right-color: var(--bg); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-container a.leaflet-popup-close-button:hover { color: var(--fg); }
.leaflet-bar a, .leaflet-bar a:hover { background-color: var(--bg); color: var(--fg); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background-color: var(--chip); }
.leaflet-bar a.leaflet-disabled { background-color: var(--bg); color: var(--muted); }
.leaflet-touch .leaflet-bar { border-color: var(--line); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--accent); }

/* The footer of every page but the map: links, and who made the site. */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); text-decoration: underline; }
.made-by { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.made-by img { flex: none; border-radius: 50%; background: var(--chip); }
.made-by b { color: var(--fg); font-weight: 600; }
.made-by:hover b { color: var(--accent); }
.site-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
