:root {
  --bg: #f3f6fb; --panel: #ffffff; --text: #16202e; --muted: #64748b; --line: #dde4ee;
  --accent: #2563eb; --accent-2: #1d4ed8; --good: #16a34a; --mid: #d97706; --bad: #dc2626;
  --sun: #f5b301; --moon: #c7d2e4; --cloud: #94a3b8; --rain: #3b82f6; --snow: #7dd3fc; --bolt: #f59e0b; --warn: #d97706;
  --cloud-top: #eef3fb; --cloud-bot: #8fa2c0; --moon-mid: #dbe3f2; --moon-dark: #98a6c2; --summary: #eef4ff; --prob: #e3edff; --shadow: 0 1px 3px rgba(15, 30, 60, .08), 0 4px 14px rgba(15, 30, 60, .06);
}
/* Theme: follows the system unless the user picks one (html[data-theme]) */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1420; --panel: #151f2f; --text: #e6edf7; --muted: #94a3b8; --line: #26344a;
    --accent: #5b9bff; --accent-2: #86b4ff; --cloud: #7f8ea6; --moon: #dbe4f3;
    --cloud-top: #e4ebf7; --cloud-bot: #6b7b96; --moon-mid: #d5deef; --moon-dark: #8391b0; --summary: #1a2740; --prob: #1d3358; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #0d1420; --panel: #151f2f; --text: #e6edf7; --muted: #94a3b8; --line: #26344a;
    --accent: #5b9bff; --accent-2: #86b4ff; --cloud: #7f8ea6; --moon: #dbe4f3;
    --cloud-top: #e4ebf7; --cloud-bot: #6b7b96; --moon-mid: #d5deef; --moon-dark: #8391b0; --summary: #1a2740; --prob: #1d3358; --shadow: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 "Inter", system-ui, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.brand small { font-weight: 400; color: var(--muted); font-size: 13px; }
.brand .wi { width: 34px; height: 34px; }
.nav-btn { background: none; border: 0; padding: 8px 14px; border-radius: 8px; font: inherit; color: var(--muted); cursor: pointer; }
.nav-btn.active { background: var(--accent); color: #fff; }
main { padding: 16px 20px; max-width: 1500px; margin: 0 auto; }
footer { padding: 16px 20px 28px; color: var(--muted); font-size: 12.5px; max-width: 1500px; margin: 0 auto; }
.view { display: none; } .view.active { display: block; }
[hidden] { display: none !important; }

.toolbar { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
select, input[type=text], input[type=number], input[type=search] { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost:hover { border-color: var(--accent); }
.meta { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.notice { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.notice.error { border-color: var(--bad); color: var(--bad); }
.loading { display: flex; align-items: center; gap: 12px; padding: 30px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ημέρες */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day { flex: 0 0 auto; min-width: 104px; background: var(--panel); border: 2px solid transparent; border-radius: 12px; padding: 8px 10px; text-align: center; cursor: pointer; box-shadow: var(--shadow); font: inherit; color: var(--text); }
.day.active { border-color: var(--accent); }
.day b { display: block; font-size: 13px; }
.day small { color: var(--muted); font-size: 11.5px; }
.day .wi { width: 46px; height: 46px; }
.day .hilo { font-size: 13px; }
.day .hilo span { color: var(--muted); }
.day .chips { display: flex; justify-content: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.day .chips i { font-style: normal; }

/* Καρτέλες παραμέτρων */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 10px; }
.tab { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 7px 13px; border-radius: 999px; cursor: pointer; font: inherit; }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Πίνακας */
.table-wrap { overflow-x: auto; overflow-y: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.grid th, .grid td { padding: 9px 8px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); min-width: 78px; vertical-align: top; }
.grid tbody tr:not(.summary):not(.prob):nth-child(even) .rowh { background-color: color-mix(in srgb, var(--summary) 60%, var(--panel)); }
.grid tbody tr:not(.summary):not(.prob):hover td { filter: brightness(.96); }
.grid thead th { position: sticky; top: 0; background: var(--panel); z-index: 3; font-weight: 700; font-size: 12.5px; letter-spacing: .02em; color: var(--muted); border-bottom: 2px solid var(--line); }
.grid .rowh { position: sticky; left: 0; z-index: 2; background: var(--panel); text-align: left; min-width: 180px; max-width: 210px; font-weight: 600; border-right: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; box-shadow: 4px 0 8px -6px rgba(15, 30, 60, .25); }
.grid thead .rowh { z-index: 4; }
.grid tr.summary td, .grid tr.summary .rowh { background: var(--summary); }
.grid tr.summary .rowh, .grid tr.prob .rowh { color: var(--accent-2); }
.grid tr.prob td, .grid tr.prob .rowh { background: var(--prob); font-weight: 700; border-top: 2px solid var(--accent); border-bottom: 0; }
.grid td.past, .grid th.past { opacity: .9; }
.grid th.now { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.grid td small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.grid td .na { color: var(--muted); }
.grid td.cell { font-variant-numeric: tabular-nums; font-weight: 500; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.hi { background: rgba(22, 163, 74, .18); color: var(--good); }
.pill.mid { background: rgba(217, 119, 6, .18); color: var(--mid); }
.pill.lo { background: rgba(220, 38, 38, .16); color: var(--bad); }
.pct { font-size: 16px; font-weight: 700; }
.legend { color: var(--muted); font-size: 12.5px; margin-top: 12px; line-height: 1.55; }

@media (max-width: 700px) {
  .grid { font-size: 13px; }
  .grid th, .grid td { padding: 7px 5px; min-width: 62px; }
  .grid .rowh { min-width: 104px; max-width: 118px; font-size: 12px; white-space: normal; line-height: 1.2; }
  .wi { width: 30px; height: 30px; } .wi.big { width: 36px; height: 36px; }
  .table-wrap { border-radius: 12px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .tab { flex: 0 0 auto; }
  .topbar { padding: 8px 12px; } .brand small { display: none; }
}

/* Εικονίδια καιρού (3D με gradients και σκιά) */
.wi { width: 36px; height: 36px; vertical-align: middle; overflow: visible; filter: drop-shadow(0 3px 2px rgba(20, 40, 80, .3)); }
.wi .sun { fill: url(#g-sun); } .wi .ray { stroke: #ffb800; stroke-width: 3.5; stroke-linecap: round; fill: none; }
.wi .moon { fill: url(#g-moon); }
.wi .cloud { fill: url(#g-cloud); stroke: rgba(80, 100, 135, .45); stroke-width: 1; }
.wi .drop { fill: url(#g-drop); }
.wi .snowc circle { fill: url(#g-snow); }
.wi .bolt { fill: url(#g-bolt); stroke: #ffd54a; stroke-width: .8; stroke-linejoin: round; }
.wi .fogl { fill: url(#g-cloud); }
.wi.big { width: 44px; height: 44px; }
.arrow { width: 14px; height: 14px; fill: var(--muted); vertical-align: -2px; margin-right: 3px; }
.bolt-i { width: 14px; height: 14px; fill: var(--bolt); vertical-align: -2px; }

/* Τοποθεσίες */
.places-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.panel h2 { margin: 0; font-size: 16px; }
.panel h2:not(:first-child) { margin-top: 10px; }
.panel input { width: 100%; }
.coords { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { margin: 0; color: var(--muted); font-size: 12.5px; }
.hint.ok { color: var(--good); } .hint.err { color: var(--bad); }
.map { height: 620px; border-radius: 12px; border: 1px solid var(--line); z-index: 1; }
.search { position: relative; }
.results { position: absolute; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 0; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; z-index: 1200; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); max-height: 280px; overflow: auto; }
.results li { padding: 8px 12px; cursor: pointer; font-size: 13.5px; }
.results li:hover { background: var(--summary); }
ul.saved { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.saved li { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
ul.saved .nm { flex: 1; cursor: pointer; min-width: 0; }
ul.saved .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.saved .nm small { color: var(--muted); }
ul.saved button { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 6px; padding: 5px 9px; cursor: pointer; font: inherit; font-size: 13px; }
ul.saved button.del:hover { border-color: var(--bad); color: var(--bad); }

@media (max-width: 900px) {
  .places-layout { grid-template-columns: 1fr; }
  .map { height: 420px; }
  main { padding: 12px; }
  .meta { margin-left: 0; width: 100%; }
}

/* Τρέχον διάστημα: σκίαση ολόκληρης στήλης */
.grid td.now { position: relative; }
.grid td.now::after { content: ""; position: absolute; inset: 0; background: rgba(37, 99, 235, .06); border-left: 1px solid rgba(37, 99, 235, .25); border-right: 1px solid rgba(37, 99, 235, .25); pointer-events: none; }
.grid tbody tr:last-child td.now::after { border-bottom: 1px solid rgba(37, 99, 235, .25); }
.grid th.now { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.grid td.now::after { }
:root[data-theme="dark"] .grid td.now::after { background: rgba(91, 155, 255, .09); border-color: rgba(91, 155, 255, .3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grid td.now::after { background: rgba(91, 155, 255, .09); border-color: rgba(91, 155, 255, .3); } }

/* Στάθμιση & αξιοπιστία */
.chk { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; padding-bottom: 8px; }
.chk input { accent-color: var(--accent); width: 16px; height: 16px; }
.chk span { color: var(--muted); }
.rel { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.rel.hi, .score.hi { background: rgba(22, 163, 74, .18); color: var(--good); }
.rel.mid, .score.mid { background: rgba(217, 119, 6, .18); color: var(--mid); }
.rel.lo, .score.lo { background: rgba(220, 38, 38, .16); color: var(--bad); }
.score { display: inline-block; margin-top: 3px; padding: 1px 9px; border-radius: 999px; font-size: 13px; }
.bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #16a34a); border-radius: 999px; }
.grid td.pad { padding: 28px; color: var(--muted); }
.grid thead th { line-height: 1.25; }

/* Πιθανότερος καιρός: λίστα κατηγοριών με ποσοστά */
.wlist { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; min-width: 128px; }
.wline { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; }
.wline span { flex: 1; }
.wline b { font-variant-numeric: tabular-nums; font-weight: 700; }
.wline.top { color: var(--text); font-size: 13px; font-weight: 700; }
.wi.mini { width: 20px; height: 20px; filter: drop-shadow(0 1px 1px rgba(20, 40, 80, .25)); }

/* Head-to-head: named single-model AI forecasts (ECMWF AIFS, Google WeatherNext), shown as their own
   rows right after "Most likely weather" for direct comparison with the weighted result above them */
.grid tr.ai { border-top: 2px solid var(--accent); }
.grid tr.ai td, .grid tr.ai .rowh { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.grid tr.ai .rowh::after { content: "AI"; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .03em; background: var(--accent); color: #fff; vertical-align: 2px; }

/* Επιλογή μοντέλων */
.models { position: relative; padding-bottom: 0; }
.models summary { list-style: none; cursor: pointer; font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 8px 14px; border-radius: 8px; user-select: none; }
.models summary::-webkit-details-marker { display: none; }
.models[open] summary { border-color: var(--accent); }
.models summary span { color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.mdl-panel { position: absolute; z-index: 1100; top: calc(100% + 6px); left: 0; min-width: 270px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.mdl { flex-direction: row; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.mdl:hover { background: var(--summary); }
.mdl input { accent-color: var(--accent); width: 16px; height: 16px; }
.mdl span:first-of-type { flex: 1; }
.btn.small { font-size: 13px; padding: 6px 10px; margin-top: 6px; }
.grid tr.off td, .grid tr.off .rowh { opacity: .45; }
.mdl-panel { max-height: 70vh; overflow-y: auto; min-width: 340px; max-width: 92vw; }
.mdl { align-items: flex-start; }
.mdl input { margin-top: 3px; }
.mdl .mtxt { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.mdl .mtxt b { font-weight: 600; font-size: 14px; }
.mdl .mtxt small { color: var(--muted); font-size: 11.5px; }
.mdl.off { opacity: .5; cursor: default; padding-left: 32px; }
.mdl.off:hover { background: none; }
.mdl .rel { margin-top: 2px; }
.mdl-sep { margin: 8px 8px 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* Ίδιο ύψος και label για όλα τα στοιχεία της γραμμής εργαλείων */
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld .lbl { font-size: 12.5px; color: var(--muted); }
.toolbar select, .models summary, .toolbar .btn { height: 38px; box-sizing: border-box; }
.models summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 132px; padding: 0 12px; font-size: inherit; }
.models summary::after { content: "▾"; color: var(--muted); font-size: 12px; }
.models summary span { margin: 0; color: var(--text); font-size: inherit; }
.toolbar .chk { height: 38px; padding-bottom: 0; }

/* Ίδια γραμματοσειρά σε όλα τα στοιχεία της γραμμής εργαλείων */
.toolbar select, .models summary, .models summary span, .toolbar .btn, .toolbar .chk { font-family: "Inter", system-ui, "Segoe UI", Roboto, sans-serif; font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--text); }
.toolbar .chk { font-size: 13px; }

/* Language switch */
.topright { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang button { border: 0; background: var(--panel); color: var(--muted); font: 600 12.5px "Inter", system-ui, sans-serif; padding: 7px 10px; cursor: pointer; }
.lang button.active { background: var(--accent); color: #fff; }

/* METAR values inside the reliability table */
.grid td small.obs { color: var(--accent); font-weight: 600; }

/* Reliability cells with explicit source labels */
.src { display: flex; align-items: baseline; justify-content: center; gap: 5px; line-height: 1.35; white-space: nowrap; }
.src i { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: var(--muted); }
.src b { font-weight: 600; }
.src small { display: inline !important; }
.src.obs, .src.obs i { color: var(--accent); }
.relnote { margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--panel); color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Theme switch button */
.themebtn { width: 34px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); cursor: pointer; padding: 0; }
.themebtn:hover { border-color: var(--accent); }
.themebtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.themebtn .i-sun { display: none; }
.themebtn.is-dark .i-sun { display: block; } .themebtn.is-dark .i-moon { display: none; }
/* Dark map: soften the bright OpenStreetMap tiles */
:root[data-theme="dark"] .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9); } }
/* Radar tiles keep their true colours in the dark theme */
:root[data-theme="dark"] .lm-radar-pane .leaflet-tile { filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lm-radar-pane .leaflet-tile { filter: none; } }
/* Better contrast of active controls on the dark accent colour */
:root[data-theme="dark"] .nav-btn.active, :root[data-theme="dark"] .tab.active, :root[data-theme="dark"] .lang button.active, :root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .grid tr.ai .rowh::after { color: #0b1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-btn.active, :root:not([data-theme="light"]) .tab.active, :root:not([data-theme="light"]) .lang button.active, :root:not([data-theme="light"]) .btn.primary, :root:not([data-theme="light"]) .grid tr.ai .rowh::after { color: #0b1220; } }

/* History dialog */
.histsec { position: relative; margin-top: 18px; padding: 20px 22px 24px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); scroll-margin-top: 76px; }
.h-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font-size: 15px; }
.histsec h2 { margin: 0 44px 12px 0; font-size: 20px; }
.histsec h3 { margin: 22px 0 8px; font-size: 15px; }
.h-info { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.h-info .muted { color: var(--muted); font-size: 12.5px; }
.h-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--good); font-weight: 600; font-size: 13px; margin-top: 4px; }
.h-status .btn { margin: 0; }
.rcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.rcard span { font-size: 12px; color: var(--muted); } .rcard b { font-size: 19px; } .rcard small { font-size: 12px; color: var(--muted); }
.h-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.h-charts > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 10px; }
.hchart { width: 100%; height: auto; } .hchart .gl { stroke: var(--line); stroke-width: 1; } .hchart .tx { fill: var(--muted); font-size: 10.5px; }
.h-tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.h-tablewrap.tall { max-height: 340px; }
.htable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.htable th, .htable td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.htable th:first-child { text-align: left; } .htable thead th { position: sticky; top: 0; background: var(--panel); font-size: 12px; color: var(--muted); }
.pbar { position: relative; min-width: 90px; height: 18px; } .pbar i { position: absolute; left: 0; top: 2px; bottom: 2px; background: color-mix(in srgb, var(--rain) 35%, transparent); border-radius: 4px; } .pbar span { position: relative; padding-right: 2px; }
@media (max-width: 760px) { .h-charts { grid-template-columns: 1fr; } .saved li { flex-wrap: wrap; } }

/* History: spacing between sections, period selector, climate diagram */
.rcards { margin-bottom: 18px; }
.h-toolbar { display: flex; justify-content: flex-end; margin: 4px 0 10px; }
.hperiod { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.hperiod select { height: 34px; font-size: 13.5px; padding: 0 10px; }
.h-charts { margin-top: 4px; }
.h-charts h3 { margin-top: 12px; }
.h-climate { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; }
.clegend { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.clegend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* Heatmap */
.h-heathead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.h-heathead h3 { margin: 0 !important; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); color: var(--muted); font: 600 12.5px "Inter", system-ui, sans-serif; padding: 7px 12px; cursor: pointer; }
.seg button.active { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .seg button.active { color: #0b1220; }
.hchart.heat rect { shape-rendering: crispEdges; }
.hlegend { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.hlegend svg { width: 240px; height: 10px; }
.h-climate .hint { margin: 6px 0 0; text-align: center; }

/* Full-width history charts, each with its own month selector */
.h-chartbox { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 12px; margin-top: 14px; }
.h-charthead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.h-charthead h3 { margin: 6px 0 !important; }

/* Footer attribution, location tools, privacy page */
footer { line-height: 1.55; }
footer a { color: var(--accent); }
.pl-tools { margin-top: -4px; }
.brand a { color: inherit; text-decoration: none; }
.prose { max-width: 780px; font-size: 15px; line-height: 1.6; }
.prose h1 { font-size: 24px; margin: 8px 0 12px; }
.prose h2 { font-size: 17px; margin: 22px 0 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* Native-looking but self-drawn selects: iOS / WebKit clips the text of a padded fixed-height <select> otherwise */
select { -webkit-appearance: none; appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px 14px; line-height: 1.2; }
.toolbar select { padding-top: 0; padding-bottom: 0; }
@media (max-width: 700px) { .topright { gap: 8px; } .brand { font-size: 18px; } }

/* ===================== Glett landing: place bar, chips, summary strip, model toggle ===================== */
.placebar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.pb-row { display: flex; gap: 8px; align-items: stretch; }
.pb-search { flex: 1; position: relative; }
.pb-search .i-search { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.pb-search input { width: 100%; height: 44px; padding-left: 38px; font-size: 16px; border-radius: 12px; }
.pb-search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.btn.geo { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600; white-space: nowrap; }
.btn.geo svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn.geo.busy svg { animation: spin 1s linear infinite; }
.btn.geo:disabled { opacity: .6; cursor: progress; }
.chips { display: flex; gap: 6px 14px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.chipgrp { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.chiplbl { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.chip { display: inline-flex; align-items: stretch; flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; overflow: hidden; }
.chip .pick { border: 0; background: none; color: var(--text); font: inherit; font-weight: 500; padding: 8px 14px; cursor: pointer; min-height: 38px; }
.chip.recent .pick { color: var(--muted); }
.chip.saved .pick::before { content: "★"; color: var(--sun); margin-right: 5px; font-size: 12px; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); }
.chip.active .pick { color: #fff; font-weight: 600; padding-right: 8px; }
.chip.active.saved .pick::before { color: #fff; }
.chip .star { border: 0; border-left: 1px solid rgba(255, 255, 255, .35); background: none; color: #fff; font-size: 16px; padding: 0 12px 0 8px; cursor: pointer; }
.chip .star:hover { background: rgba(255, 255, 255, .15); }
.toolbar .meta { margin-left: auto; }
.set-panel { min-width: 260px; gap: 10px; padding: 12px; }
.set-panel .chk { height: auto; padding: 0; }
.set-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.set-row select { height: 34px; font-size: 14px; }
.models.settings summary { min-width: 0; width: 44px; padding: 0; justify-content: center; }
.models.settings summary::after { content: none; }
.models.settings summary svg { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linejoin: round; }
.sumstrip { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.sum { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.sum .arrow { width: 16px; height: 16px; }
.sum .wi.mini { width: 22px; height: 22px; }
.sum .agr { font-weight: 800; color: var(--muted); font-size: 16px; }
.sum.wet { border-color: color-mix(in srgb, var(--rain) 50%, var(--line)); background: color-mix(in srgb, var(--rain) 8%, var(--panel)); }
.sum.dry { border-color: color-mix(in srgb, var(--sun) 50%, var(--line)); }
.sum.hi .agr { color: var(--good); } .sum.mid .agr { color: var(--mid); } .sum.lo .agr { color: var(--bad); }
.sum.nowcast { font-weight: 500; }
.sum.nowcast b { font-weight: 700; color: var(--accent-2); }
.btn.toggle { display: block; margin: 10px auto 0; }
.grid tr.prob .rowh { font-size: 15px; }
.grid tr.prob td { border-bottom: 2px solid var(--accent); }
.grid tr.prob td, .grid tr.prob .rowh { border-top: 0; }
.grid tr.summary td, .grid tr.summary .rowh { border-bottom: 2px solid var(--line); }
.grid tr.ai { border-top: 0; }
.grid tr.ai td, .grid tr.ai .rowh { border-top: 2px solid var(--accent); }
.grid thead th, .grid td, .grid th { font-size: 14px; }
@media (max-width: 700px) {
  .btn.geo span { display: none; }
  .btn.geo { width: 44px; padding: 0; justify-content: center; }
  .toolbar { gap: 10px; }
  .toolbar .meta { width: 100%; margin: 0; font-size: 11.5px; }
  .chip .pick { padding: 8px 12px; }
  select, input[type=search], input[type=text], input[type=number] { font-size: 16px; }   /* iOS zooms into smaller inputs */
}

/* ===================== Weather icon animations: large icons only, transform/opacity only, off with reduced motion ===================== */
.wi .rays, .wi .cloudg, .wi .dropg, .wi .snowc, .wi .fogg, .wi .bolt { transform-box: fill-box; transform-origin: center; }
.wi.anim .rays { animation: rays 48s linear infinite; }
.wi.anim .cloudg { animation: bob 4.5s ease-in-out infinite alternate; }
.wi.anim .dropg { animation: fall 1.3s ease-in infinite; }
.wi.anim .dropg:nth-child(2) { animation-delay: -.45s; }
.wi.anim .dropg:nth-child(3) { animation-delay: -.9s; }
.wi.anim .dropg:nth-child(4) { animation-delay: -.2s; }
.wi.anim .snowc { animation: sway 3.2s ease-in-out infinite alternate; }
.wi.anim .fogg { animation: drift 5s ease-in-out infinite alternate; }
.wi.anim .bolt { animation: flicker 3.5s ease-in-out infinite; }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes fall { 0% { transform: translateY(-1px); opacity: .2; } 30% { opacity: 1; } 100% { transform: translateY(4px); opacity: 0; } }
@keyframes sway { from { transform: translate(-1px, 0); } to { transform: translate(1px, 2px); } }
@keyframes drift { from { transform: translateX(-2px); } to { transform: translateX(2px); } }
@keyframes flicker { 0%, 88%, 100% { opacity: 1; } 90% { opacity: .35; } 92% { opacity: 1; } 95% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .wi.anim * { animation: none !important; } .btn.geo.busy svg { animation: none; } }
.sum.link { cursor: pointer; }
.sum.link:hover { border-color: var(--accent); }
@media (max-width: 700px) { .wline:nth-child(n+3) { display: none; } .wlist { min-width: 96px; } }

/* Week strip: day header row, day boundaries */
.grid { --rowh: 180px; }
.grid thead tr.dayrow th.dh { text-align: left; padding: 6px 8px 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); cursor: pointer; }
.grid thead tr.dayrow th.dh span { position: sticky; left: calc(var(--rowh) + 10px); display: inline-block; padding: 1px 8px; border-radius: 999px; }
.grid thead tr.dayrow th.dh.cur span { background: var(--accent); color: #fff; }
.grid thead tr.dayrow th.dh:hover span { text-decoration: underline; }
:root[data-theme="dark"] .grid thead tr.dayrow th.dh.cur span { color: #0b1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grid thead tr.dayrow th.dh.cur span { color: #0b1220; } }
.grid th.dstart, .grid td.dstart { border-left: 2px solid var(--line); }
.grid thead tr.dayrow th.dh:first-of-type { border-left: 0; }
.grid thead .rowh { vertical-align: bottom; }
@media (max-width: 700px) { .grid { --rowh: 104px; } .grid thead tr.dayrow th.dh span { left: calc(var(--rowh) + 6px); } }

/* Phones: popovers (models, settings) span the toolbar instead of hanging off the right edge of the screen */
@media (max-width: 700px) {
  .toolbar { position: relative; }
  .models { position: static; }
  .mdl-panel { left: 0; right: 0; top: auto; min-width: 0; max-width: none; width: auto; }
}
.chip.geo .pick::before { content: "◎"; color: var(--accent); margin-right: 5px; font-size: 13px; }
.chip.active.geo .pick::before { color: #fff; }
.btn.hist { display: inline-flex; align-items: center; gap: 6px; height: 38px; align-self: flex-end; }
.btn.hist svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.histsec { margin-top: 18px; }
.spinner { flex: 0 0 22px; }   /* a flex item shrinks next to a long message: keep the ring round */
.spinner.small { width: 16px; height: 16px; border-width: 2px; flex-basis: 16px; display: inline-block; vertical-align: middle; }

/* History chart tooltips */
.hchart { touch-action: pan-y; cursor: crosshair; }
.hchart .hl-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.hchart .hl-dot { fill: var(--panel); stroke: var(--accent); stroke-width: 2.5; }
.hchart .hl-cell { fill: none; stroke: var(--text); stroke-width: 2; }
.ctip { position: absolute; z-index: 1300; pointer-events: none; background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.35; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); white-space: nowrap; }
.ctip b { font-size: 13px; }
.ctip .warm { color: #fca5a5; } .ctip .cold { color: #93c5fd; }
:root[data-theme="dark"] .ctip .warm, :root[data-theme="dark"] .ctip .cold { filter: brightness(.7); }
.h-stations { margin-top: 2px; font-size: 13px; }
.h-stations summary { cursor: pointer; color: var(--accent); }
.h-stations ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.h-stations li small { color: var(--muted); }

/* Map tile seams: Kartverket's PNG tiles carry a transparent outer pixel row/column, so every tile border showed the
   backdrop as a hairline (bright when the tiles are colour-inverted). Clip that pixel off and scale the tile back up to
   its slot (`scale` composes with Leaflet's own translate transform). The backdrop matches the theme as a second guard. */
/* (the tiles themselves are made opaque in js/app.js, see KartverketLayer) */
.map { background: var(--bg); }
.leaflet-container { background: var(--bg); }
:root[data-theme="dark"] .leaflet-container, :root[data-theme="dark"] .map { background: #0d1420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-container, :root:not([data-theme="light"]) .map { background: #0d1420; } }

/* Wind inside the weather cells */
.grid td small .wnd, .grid td small.wnd { white-space: nowrap; }
.grid td .wnd .arrow { width: 12px; height: 12px; margin-right: 1px; }

/* Orientation switch (above the table) */
.tablebar { display: flex; justify-content: flex-end; align-items: center; margin: 0 0 8px; }
.tablebar .seg button { padding: 7px 12px; font-size: 13px; }
.grid.vert tr.nextday td { text-align: center; padding: 10px; background: var(--panel); border-bottom: 0; }
@media (max-width: 700px) { .tablebar { justify-content: stretch; } .tablebar .seg { width: 100%; } .tablebar .seg button { flex: 1; } }

/* Vertical table: time runs downwards, the page scrolls, columns are the probability / average / models */
.table-wrap.vert { overflow-x: auto; overflow-y: hidden; }
.grid.vert thead th.rowh { width: 56px; }
.grid.vert thead th.summary { width: 104px; }
.grid.vert thead th.model, .grid.vert thead th.ai { width: 92px; }
.grid.vert thead th.prob { min-width: 170px; }
.grid.vert th, .grid.vert td { white-space: normal; }
.grid.vert thead th { position: static; text-align: center; font-size: 12px; max-width: 110px; }
.grid.vert thead th.prob, .grid.vert thead th.summary { color: var(--accent-2); }
.grid.vert .rowh { min-width: 0; max-width: none; width: 56px; font-size: 13px; white-space: nowrap; padding-left: 8px; padding-right: 6px; }
.grid.vert tr.dayrow th.dh { text-align: left; padding: 8px 10px 5px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--summary); border-bottom: 1px solid var(--line); position: sticky; left: 0; cursor: pointer; z-index: 2; }
.grid.vert tr.dayrow th.dh span { position: static; padding: 1px 8px; border-radius: 999px; }
.grid.vert tr.dayrow th.dh.cur span { background: var(--accent); color: #fff; }
.grid.vert tr.hr.now .rowh { box-shadow: inset 4px 0 0 var(--accent); color: var(--accent); }
.grid.vert tr.hr.now td { background-image: linear-gradient(rgba(37, 99, 235, .07), rgba(37, 99, 235, .07)); }
.grid.vert td.prob { text-align: left; background: var(--prob); font-weight: 700; border-bottom: 1px solid var(--line); border-top: 0; min-width: 150px; }
.grid.vert td.prob .wi.big { width: 40px; height: 40px; vertical-align: middle; margin-right: 6px; }
.grid.vert td.prob .wlist { display: inline-flex; vertical-align: middle; margin-top: 0; min-width: 0; }
.grid.vert td.prob .wline:nth-child(n+3) { display: none; }
.grid.vert td.summary { background: var(--summary); font-weight: 600; }
.grid.vert td.summary small { display: block; }
.grid.vert td.ai { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.grid.vert td .pct { font-size: 15px; }
.grid.vert tr.hr td { vertical-align: middle; border-bottom: 1px solid var(--line); }
.grid.vert td.now::after { content: none; }
@media (max-width: 700px) {
  .grid.vert td.prob { min-width: 0; }
  .grid.vert td.prob .wline { font-size: 12px; }
  .grid.vert td.prob .wline.top { font-size: 13px; }
  .grid.vert .rowh { width: 50px; padding-left: 6px; padding-right: 4px; }
  .grid.vert thead th.rowh { width: 50px; }
  .grid.vert thead th.summary { width: 92px; }
  .grid.vert thead th.prob { min-width: 0; }
}
.grid.vert tr.nextday td { padding: 12px 10px; }
.grid.vert .vfoot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; position: sticky; left: 0; }
.grid.vert .vfoot .until { width: 100%; text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: normal; }
.table-wrap.vert { overflow-anchor: none; }
.grid.vert tr.hr.night .rowh, .grid.vert tr.hr.night td { filter: brightness(.965); }
.nowpill { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1200; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 600 13.5px "Inter", system-ui, sans-serif; padding: 10px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); cursor: pointer; }
:root[data-theme="dark"] .nowpill { color: #0b1220; }
/* Collapsible explanations: the table legend and the long attribution */
.legend-d { margin-top: 10px; }
.legend-d summary, .attr-more summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; list-style: none; }
.legend-d summary::before, .attr-more summary::before { content: "▸ "; }
.legend-d[open] summary::before, .attr-more[open] summary::before { content: "▾ "; }
.legend-d summary::-webkit-details-marker, .attr-more summary::-webkit-details-marker { display: none; }
.legend-d .legend { margin-top: 6px; }
footer .attr-short { font-size: 13px; color: var(--muted); }
footer .attr-more { margin-top: 8px; }
footer .attr-more div { margin-top: 6px; }
body.haspill footer { padding-bottom: 96px; }
footer .brandline { white-space: nowrap; color: var(--text); font-weight: 600; }

/* "Now" card */
.hero { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 12px; margin-bottom: 14px; box-shadow: var(--shadow); }
.hero-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hero .place { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.hero .hstar { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; align-self: center; }
.hero .hstar.on { color: var(--sun); }
.hero-head .meta { margin-left: auto; font-size: 12px; }
.hero .now { display: flex; align-items: center; gap: 14px; margin: 8px 0 10px; }
.hero .wi.xl { width: 72px; height: 72px; flex: 0 0 auto; }
.hero .now-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero .temp { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.hero .cat { font-size: 16px; font-weight: 600; }
.hero .cat small, .hero .wind small { color: var(--muted); font-weight: 500; font-size: 13px; }
.hero .wind { font-size: 14px; color: var(--text); font-weight: 500; }
.hero .wind .arrow { width: 14px; height: 14px; }
.hero .sumstrip { margin: 6px 0 10px; }
.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.hero .btn.hist { align-self: auto; height: 36px; }
/* Table controls next to the orientation switch */
.tablebar { justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tblctl { display: flex; align-items: center; gap: 8px; }
.tblctl select { height: 38px; font-size: 14px; }
.tblctl .models { padding-bottom: 0; }
.tblctl .models summary { height: 38px; min-width: 0; }
.tblctl .models.settings summary { width: 40px; }
.tblctl .models .mdl-panel { left: auto; right: 0; }
@media (max-width: 700px) {
  .hero { padding: 12px 14px 10px; }
  .hero .place { font-size: 24px; }
  .hero-head .meta { width: 100%; margin-left: 0; }
  .tablebar { position: relative; }
  .tblctl { width: 100%; justify-content: space-between; }
  .tblctl select { flex: 1; }
  .tblctl .models { position: static; }
  .tblctl .models .mdl-panel { left: 0; right: 0; }
}

}
.day .chips.more { margin-top: 3px; color: var(--muted); }
.day .chips.more .arrow { transform: none !important; opacity: .7; }
@media (max-width: 700px) { .day .chips.more { font-size: 11px; } }
.wline.top b em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.grid .hint2 { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; text-transform: none; line-height: 1.2; }
.grid.vert thead th .hint2 { margin-top: 2px; }

/* ===== Grafts from the design round: verdict dots, segmented agreement bars, meteogram, expert charts ===== */
:root { --c-clear: #f5b301; --c-partly: #fcd980; --c-cloudy: #94a3b8; --c-fog: #cbd5e1; --c-drizzle: #93c5fd; --c-rain: #3b82f6; --c-snow: #67e8f9; --c-thunder: #8b5cf6; }
.verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -2px 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--summary); font-size: 14px; }
.verdict b { font-weight: 700; }
.verdict small { color: var(--muted); font-size: 12.5px; width: 100%; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.dots.hi i.on { background: var(--good); } .dots.mid i.on { background: var(--mid); } .dots.lo i.on { background: var(--bad); }
@media (min-width: 700px) { .verdict small { width: auto; margin-left: auto; } }
.segbar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--line); margin-top: 5px; min-width: 96px; }
.segbar i { display: block; height: 100%; }
.c-clear { background: var(--c-clear); } .c-partly { background: var(--c-partly); } .c-cloudy { background: var(--c-cloudy); } .c-fog { background: var(--c-fog); }
.c-drizzle { background: var(--c-drizzle); } .c-rain { background: var(--c-rain); } .c-snow { background: var(--c-snow); } .c-thunder { background: var(--c-thunder); }
.grid.vert td.prob .segbar { margin-top: 3px; }
.grid tr.prob .wlist .segbar { margin-top: 4px; }
/* meteogram */
.table-wrap.meteo-mode { overflow: visible; background: none; border: 0; box-shadow: none; }
.mglabels { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 2px 6px; }
.mgday { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 0 8px; margin-bottom: 12px; }
.mgday h3 { margin: 0 14px 6px; font-size: 15px; }
.mgscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 8px; }
.mrow { display: flex; }
.mc { flex: 0 0 auto; text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.mc.night { background: color-mix(in srgb, var(--text) 4%, transparent); }
.mc.now { color: var(--accent); font-weight: 700; }
.mrow.icons .wi.mini { width: 24px; height: 24px; }
.mrow.agree span { font-weight: 700; font-size: 11.5px; } .mrow.agree .hi { color: var(--good); } .mrow.agree .mid { color: var(--mid); } .mrow.agree .lo { color: var(--bad); }
.mrow.wind .mc { display: flex; flex-direction: column; align-items: center; gap: 1px; padding-top: 6px; color: var(--text); }
.mrow.wind .arrow { margin: 0; } .mrow.wind small { color: var(--muted); font-size: 10.5px; }
.mgsvg { display: block; overflow: visible; }
.mgsvg .nt { fill: color-mix(in srgb, var(--text) 4%, transparent); }
.mgsvg .gl { stroke: var(--line); stroke-width: 1; } .mgsvg .gl.d { stroke-dasharray: 3 3; }
.mgsvg .gt { fill: var(--muted); font-size: 10.5px; }
.mgsvg .band { fill: rgba(220, 38, 38, .12); }
.mgsvg .tline { fill: none; stroke: #dc2626; stroke-width: 2; stroke-linejoin: round; }
.mgsvg .tl { fill: var(--text); font-size: 11.5px; font-weight: 700; }
.mgsvg .nowl { stroke: var(--accent); stroke-width: 1.5; }
.mgsvg .rmax { fill: rgba(59, 130, 246, .22); } .mgsvg .rmean { fill: var(--rain); }
.mgsvg .rl { fill: var(--rain); font-size: 10.5px; font-weight: 700; }
/* expert charts */
.expert { margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.expert summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13.5px; list-style: none; }
.expert summary::before { content: "▸ "; } .expert[open] summary::before { content: "▾ "; }
.expert summary::-webkit-details-marker { display: none; }
.expert h4 { margin: 12px 0 4px; font-size: 13px; }
.expert .hint { margin: 8px 0 0; }
.exscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.exsvg { display: block; max-width: none; }
.exsvg .tl { font-size: 11px; }
.exsvg .gl { stroke: var(--line); stroke-width: 1; } .exsvg .gl.d { stroke-dasharray: 3 3; }
.exsvg .gt { fill: var(--muted); font-size: 11px; }
.exsvg .ml { fill: none; stroke: var(--muted); stroke-opacity: .45; stroke-width: 1; }
.exsvg .cl { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.exsvg .rmax { fill: rgba(59, 130, 246, .22); } .exsvg .rmean { fill: var(--rain); }
@media (max-width: 700px) { .tablebar .seg button { padding: 7px 8px; font-size: 12.5px; } }
/* Never wrap inside the weather cells: long category names get an ellipsis, "enige" is dropped on narrow screens */
.wline span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wline b { white-space: nowrap; }
.grid.vert td.prob { white-space: nowrap; }
.grid.vert td.prob .wlist { max-width: calc(100% - 52px); }
@media (max-width: 700px) { .wline.top b em { display: none; } .grid.vert td.prob .wi.big { width: 34px; height: 34px; margin-right: 4px; } }
.hero .local { font-size: 13.5px; margin: -4px 0 10px; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--line); }
.hero .local .lbl { font-weight: 700; color: var(--accent-2); }
.hero .local small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.hero .local .muted { color: var(--muted); font-size: 12.5px; }
.hero .place .geo { color: var(--accent); font-weight: 400; }
.hero .place .tag { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .01em; }
:root[data-theme="dark"] .hero .place .tag { color: #0b1220; }
.hero .temp .feels { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.hero .local .feels { color: var(--muted); font-weight: 500; }
/* Radar strip (next 2 h, 5-minute bars) and radar badges on table cells */
.radarstrip { margin: 0 0 10px; padding: 8px 12px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.rs-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }   /* title left, the map button right, always one line */
.rs-status { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.rs-bars { display: flex; align-items: flex-end; gap: 2px; height: 36px; margin-top: 6px; border-bottom: 1px solid var(--line); }
.rs-bars i { flex: 1; display: block; background: var(--line); border-radius: 2px 2px 0 0; }
.rs-bars i.wet { background: var(--rain); }
.rs-ticks { position: relative; height: 14px; font-size: 10.5px; color: var(--muted); }
.rs-ticks span { position: absolute; top: 1px; }
.radar { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.radar.wet { background: color-mix(in srgb, var(--rain) 18%, var(--panel)); color: var(--rain); }
.radar.dry { background: var(--summary); color: var(--muted); }
.grid.vert td.prob .radar { display: block; width: max-content; }
.mgsvg .rradar { fill: none; stroke: var(--rain); stroke-width: 1.2; stroke-dasharray: 3 2; }
.mgsvg .rradar.bad { stroke: var(--warn, #d97706); }
.mgsvg text.rl.radar { fill: var(--warn, #d97706); font-size: 9px; font-weight: 700; }
/* Enlarged UI (iOS/Android page zoom shrinks the CSS viewport: 390 px at 125 % = 312 px, at 150 % = 260 px) */
@media (max-width: 360px) {
  .hero .temp .feels { display: block; margin-left: 0; margin-top: -2px; }
  .hero .now-txt { min-width: 0; }
  #orientSeg button > span[aria-hidden] { display: none; }
  .tablebar .seg button { padding: 7px 4px; font-size: 12px; white-space: nowrap; }
  .tblctl { flex-wrap: wrap; }
  .tblctl select { min-width: 0; flex: 1 1 90px; }
  .grid.vert { table-layout: fixed; width: 100%; }
  .grid.vert thead th.rowh, .grid.vert .rowh { width: 50px; padding-left: 4px; padding-right: 2px; font-size: 12px; letter-spacing: -.2px; }
  .grid.vert thead th.summary { width: 74px; }
  .grid.vert td.summary { padding-left: 4px; padding-right: 4px; font-size: 13px; }
  .grid.vert td.prob { white-space: normal; padding-left: 6px; padding-right: 4px; }
  .grid.vert td.prob .wi.big { width: 32px; height: 32px; margin-right: 3px; }
  .grid.vert td.prob .wlist { max-width: calc(100% - 38px); }
  .grid.vert td.prob .wline { min-width: 0; }
  .grid.vert td.prob .wline .lbl, .grid.vert td.prob .wline span:not(.pct) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .grid.vert thead th { font-size: 11px; }
  .days .day { min-width: 118px; }
}
@media (max-width: 300px) {
  /* 150 % zoom: the big icon moves above the list so the labels keep their words; the small line icons go */
  .grid.vert td.prob { text-align: center; }
  .grid.vert td.prob .wi.big { display: block; margin: 0 auto 2px; }
  .grid.vert td.prob .wlist { display: flex; width: 100%; max-width: none; text-align: left; }
  .grid.vert td.prob .wline .wi { display: none; }
}

/* ============================================================ Final layout: "Rolig pluss med kort" (2026-09-29) */
:root { --accent-soft: #e8efff; --accent-faint: #f3f6fd; --night: #f1f3f7; }
:root[data-theme="dark"] { --accent-soft: #1a2740; --accent-faint: #131d2e; --night: #111a29; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent-soft: #1a2740; --accent-faint: #131d2e; --night: #111a29; } }

/* Top bar: one clear link to the map page (and a back link on that page) */
.topbar { padding: 8px 20px; }
.brand { font-size: 19px; }
.navlink { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px 7px 10px; color: var(--accent); font-weight: 600; font-size: 13.5px; background: var(--panel); line-height: 1; }
.navlink svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.navlink .chev { width: 14px; height: 14px; opacity: .75; }
.navlink[data-view="route"] svg:first-child { width: 22px; height: 22px; margin: -3px; }   /* the sun-over-road icon has finer detail than the outline icons */
.navlink:hover { background: var(--accent-faint); border-color: var(--accent); }
.navlink.back { padding-left: 8px; }

/* Place headline above the cards */
.placehead { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.placehead .hrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.placehead .place { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.placehead .place .geo { color: var(--accent); font-weight: 400; font-size: 26px; }
.placehead .place .tag { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; margin-left: 0; vertical-align: middle; letter-spacing: 0; }
.placehead .hstar { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.placehead .hstar.on { color: var(--sun); }
.placehead .meta { margin-left: 0; font-size: 13px; }
.placehead .meta span { white-space: nowrap; }   /* coordinates and the model count each stay whole; the line breaks between them */

/* Cards and the two-column top grid */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px 12px; }
.topgrid { display: flex; flex-direction: column; gap: 16px; margin-bottom: 4px; }
.topleft { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hero { margin-bottom: 0; }
.hero.card { padding: 16px 16px 12px; }

/* Now card */
.hero .now { display: flex; align-items: center; gap: 14px; margin: 0 0 2px; }
.hero .wi.xl { width: 62px; height: 62px; flex: none; }
.hero .now .big { min-width: 0; }
.hero .now .big-temp { font-size: 46px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.hero .now .feels { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; white-space: nowrap; }
.hero .now .desc { flex: none; margin-left: auto; text-align: right; min-width: 0; }
.hero .now .desc b { font-size: 17px; font-weight: 600; display: block; }
.hero .now .desc > span { color: var(--muted); font-size: 13.5px; display: block; margin-top: 2px; }
.hero .now .desc .wind { color: var(--text); font-size: 14px; margin-top: 4px; white-space: nowrap; font-weight: 500; }
.hero .now .desc .wind .arrow { width: 14px; height: 14px; }
.hero .verdict { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--summary); display: flex; gap: 12px; align-items: flex-start; flex-wrap: nowrap; }
.hero .verdict .dots { margin-top: 6px; gap: 5px; flex: none; }
.hero .verdict .dots i { width: 10px; height: 10px; background: var(--accent-soft); }
.dots.hi i.on, .dots.mid i.on, .dots.lo i.on { background: var(--accent); }
.hero .verdict b { font-weight: 600; font-size: 15px; line-height: 1.35; display: block; }
.hero .verdict small { display: block; width: auto; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.hero .local { margin: 10px 0 0; padding: 8px 12px; font-size: 14px; line-height: 1.5; }
.hero .sumstrip { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; }
.hero .sumstrip .sum { display: flex; gap: 9px; align-items: center; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 14.5px; font-weight: 500; }
.hero .sumstrip .sum.wet, .hero .sumstrip .sum.dry { border-color: color-mix(in srgb, var(--rain) 35%, var(--panel)); background: color-mix(in srgb, var(--rain) 6%, var(--panel)); }
.hero .sumstrip .sum.nowcast { border-color: color-mix(in srgb, var(--bolt) 45%, var(--panel)); background: color-mix(in srgb, var(--bolt) 7%, var(--panel)); }
.hero .radarstrip { margin: 10px 0 0; }
.hero .hero-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.hero .hist { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 14px; padding: 4px 0; cursor: pointer; font-family: inherit; }
.hero .hist svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero .hist:hover { text-decoration: underline; }

/* The week: aligned columns with a header row */
.sec-h h2 { font-size: 17px; margin: 0 0 8px; font-weight: 600; }
.week { --wk: minmax(56px, 1fr) 30px auto auto auto; --wkgap: 10px; }
.week .days { display: block; overflow: visible; padding: 0; }
.week .wk-h, .week .d { display: grid; grid-template-columns: var(--wk); gap: var(--wkgap); align-items: center; }
.week .wk-h { font-size: 12px; color: var(--muted); font-weight: 500; padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.week .wk-h span:nth-child(4), .week .wk-h span:nth-child(5), .week .d .pr, .week .d .gu { text-align: right; }
.week .wk-h .hu { display: none; }
.week .d { width: 100%; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; border-radius: 0; box-shadow: none; }
.week .d:last-child { border-bottom: 0; }
.week .d:hover { background: var(--accent-faint); }
.week .d .lab { font-size: 15px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.week .d .lab small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.week .d.sel .lab { color: var(--accent); font-weight: 600; }
.week .d .wi { width: 30px; height: 30px; }
.week .d .hl { font-size: 16px; font-weight: 600; white-space: nowrap; }
.week .d .hl span { color: var(--muted); font-weight: 400; }
.week .d .pr { font-size: 13px; color: var(--muted); white-space: nowrap; line-height: 1.25; }
.week .d .pr b { display: block; color: var(--accent); font-weight: 600; }
.week .d .pr > span { display: block; }
.week .d .pr small { display: block; font-size: 12px; }
.week .d .pr .storm svg { width: 11px; height: 11px; vertical-align: -1px; }
.week .d .gu { font-size: 13px; color: var(--muted); white-space: nowrap; }
.week .d .gu b { color: var(--text); font-weight: 500; }
.week .d .gu .arrow { width: 12px; height: 12px; margin-right: 2px; }
.week .note { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }

/* Hour-by-hour card */
.hours { min-width: 0; }
.hours-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.hours-h h2 { font-size: 17px; margin: 0; font-weight: 600; }
.hours-h h2 small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.hours .seg { border-radius: 9px; }
.hours .seg button + button { border-left: 1px solid var(--line); }
.tabsrow { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.tabsrow .tabs { margin: 0; flex: 1 1 auto; min-width: 0; }
.tabsrow .tablebar { margin: 0; flex: 0 0 auto; }
.hours .table-wrap { border-radius: 12px; box-shadow: none; }
.hours .relnote { margin-bottom: 10px; }
.hours .legend-d, .hours .toggle { margin-top: 10px; }
@media (max-width: 700px) { .hours .seg { width: 100%; } .hours .seg button { flex: 1; } .tabsrow .tablebar { width: 100%; } }

/* Horizontal strip, Vær tab: five lanes (weather, agreement, temperature, rain, wind) */
.grid.lanes .rowh { min-width: 82px; max-width: 110px; font-weight: 500; font-size: 12.5px; color: var(--muted); white-space: normal; line-height: 1.2; }
.grid.lanes tr.lane td { border-bottom: 1px solid var(--line); vertical-align: middle; padding: 6px 6px; }
.grid.lanes tr.lane .rowh { border-bottom: 1px solid var(--line); background: var(--panel); }
.grid.lanes tr.lane.wx td .wi.big { width: 30px; height: 30px; }
.grid.lanes tr.lane.agree td { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.grid.lanes tr.lane.agree .agr.hi { color: var(--text); font-weight: 600; }
.grid.lanes tr.lane.agree .segbar { width: 44px; min-width: 0; height: 4px; margin: 3px auto 0; }
.grid.lanes tr.lane.temp td b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.grid.lanes tr.lane td .pct { font-size: 13.5px; font-weight: 600; display: inline; }
.grid.lanes tr.lane td .pct.dim, .grid.lanes tr.lane td.dim { color: var(--muted); font-weight: 400; }
.grid.lanes tr.lane.rain td small, .grid.lanes tr.lane.wind td small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.grid.lanes tr.lane.wind td { font-size: 13.5px; font-weight: 500; }
.grid.lanes tr.lane .radar { display: block; width: max-content; margin: 3px auto 0; }
.grid.lanes tr.lane.wind td, .grid.lanes tr.lane.wind .rowh { border-bottom: 2px solid var(--line); }
.grid.lanes tr.ai td, .grid.lanes tr.ai .rowh { border-top: 0; }

/* Vertical list always fits the screen on phones: fixed layout, the weather column takes what is left */
@media (max-width: 700px) {
  .grid.vert { table-layout: fixed; width: 100%; }
  .grid.vert thead th.rowh, .grid.vert .rowh { width: 50px; padding-left: 5px; padding-right: 3px; }
  table.grid.vert thead th.summary { width: 72px; }
  table.grid.vert thead th.rainc { width: 50px; }
  .grid.vert td.rainc { padding-left: 3px; padding-right: 3px; }
  .grid.vert td.rainc .pct { font-size: 13px; }
  .grid.vert td.prob .wline.top { font-size: 12.5px; } .grid.vert td.prob .wline { font-size: 11.5px; gap: 4px; }
  .grid.vert td.summary { padding-left: 4px; padding-right: 4px; }
  .grid.vert td.prob { white-space: normal; padding-left: 6px; padding-right: 4px; }
  .grid.vert td.prob .wi.big { width: 36px; height: 36px; margin-right: 4px; }
  .grid.vert td.prob .wline .wi { display: none; }   /* the big icon shows the weather; the words need the room */
  .grid.vert td.prob .wlist { max-width: calc(100% - 40px); min-width: 0; }
  .grid.vert td.prob .wline { min-width: 0; }
  .grid.vert td.prob .wline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Vertical list, Vær tab: rain column */
.grid.vert thead th.rainc { width: 66px; }
.grid.vert td.rainc { text-align: center; font-weight: 600; }
.grid.vert td.rainc .pct { font-size: 14px; display: inline; }
.grid.vert td.rainc.dim, .grid.vert td.rainc .pct.dim { color: var(--muted); font-weight: 400; }
.grid.vert td.rainc small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.grid.vert td.rainc .radar { display: block; width: max-content; margin: 3px auto 0; }

/* Desktop: now card and the week on the left, the hours on the right */
@media (min-width: 1000px) {
  .placehead .place { font-size: 36px; }
  .topgrid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
  .hero .radarstrip { margin: 10px 0 0; }
  .hero .wi.xl { width: 68px; height: 68px; } .hero .now .big-temp { font-size: 52px; }
}
@media (min-width: 1300px) { .topgrid { grid-template-columns: 420px minmax(0, 1fr); } }

/* Enlarged text (page zoom): 312 and 260 px wide views */
@media (max-width: 360px) {
  .hero .now { flex-wrap: wrap; gap: 8px 10px; }
  .hero .now .desc { flex: 1 1 100%; margin-left: 0; text-align: left; padding-left: 64px; }
  .hero .wi.xl { width: 54px; height: 54px; } .hero .now .big-temp { font-size: 40px; }
  .hero .verdict { gap: 10px; padding: 10px 12px; }
  .placehead .place { font-size: 25px; } .placehead .place .geo { font-size: 22px; }
  .card { padding: 12px; } .hero.card { padding: 12px 12px 10px; }
  .week { --wk: minmax(44px, 1fr) 24px auto auto auto; --wkgap: 6px; }
  .week .d .wi { width: 24px; height: 24px; }
  .week .d .lab { font-size: 13.5px; } .week .d .hl { font-size: 14px; } .week .d .pr, .week .d .gu { font-size: 12.5px; }
  .hours-h h2 { font-size: 16px; }
  .grid.vert thead th.rainc { width: 52px; } .grid.vert td.rainc { padding-left: 3px; padding-right: 3px; font-size: 12.5px; }
}
@media (max-width: 360px) {   /* enlarged text: the rain column leaves the list (the Nedbør tab still has it), the side columns tighten */
  .grid.vert th.rainc, .grid.vert td.rainc { display: none; }
  .grid.vert thead th.summary { width: 74px; }
  .grid.vert td.summary { font-size: 13px; }
}
@media (max-width: 279px) {
  .week { --wk: minmax(56px, 1fr) auto auto auto; }
  .week .wk-h span:nth-child(2), .week .d .wi, .week .d > span:empty, .week .d .gu .u { display: none; }
  .week .wk-h .hu { display: inline; }
  .hero .now .desc { padding-left: 0; }
}
/* Radar strip: scale lines, intensity shades, readout */
.rs-plot { position: relative; margin-top: 8px; padding-top: 6px; touch-action: pan-y; cursor: crosshair; }
.rs-plot .rs-bars { height: 42px; margin-top: 0; }
.rs-gl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.rs-gl.top { top: 0; } .rs-gl.mid { top: 50%; }
.rs-gl em { position: absolute; right: 0; top: -14px; font-style: normal; font-size: 10.5px; color: var(--muted); background: var(--panel); padding: 0 3px; line-height: 1.2; }
.rs-plot .rs-bars i { cursor: pointer; }
.rs-bars i.wet { background: color-mix(in srgb, var(--rain) 55%, var(--panel)); }
.rs-bars i.mod { background: var(--rain); }
.rs-bars i.heavy { background: var(--accent-2); }
.rs-bars i.sel { outline: 2px solid var(--text); outline-offset: 0; }
.rs-read { min-height: 18px; margin-top: 4px; font-size: 12.5px; color: var(--text); }
.rs-read .hint { color: var(--muted); }
.rs-read b { font-weight: 600; }
/* Vertical list: temperature, wind and rain share one column; room at the right edge */
.grid.vert td.summary small.rn { color: var(--accent); font-weight: 600; }
.grid.vert td.summary small.rn.dim { color: var(--muted); font-weight: 400; }
.grid.vert th:last-child, .grid.vert td:last-child { padding-right: 8px; }
@media (max-width: 700px) { table.grid.vert thead th.summary { width: 104px; } .grid.vert td.summary { font-size: 13px; } .hours.card { padding-left: 12px; padding-right: 12px; } }
.exsize { display: block; margin: 10px auto 2px; }
/* Vertical list: the weather column's list and bar span the whole column */
.grid.vert td.prob .wlist { display: inline-flex; width: calc(100% - 48px); max-width: none; }
@media (max-width: 700px) { .grid.vert td.prob .wlist { width: calc(100% - 42px); } }
/* Model charts: legend swatches, crosshair and readout */
.exlegend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); margin: 2px 0 4px; }
.exlegend span { display: inline-flex; align-items: center; gap: 6px; }
.exlegend .sw { display: inline-block; width: 18px; height: 10px; border-radius: 2px; }
.exlegend .sw.l-model { height: 0; border-top: 1.5px solid var(--muted); opacity: .6; }
.exlegend .sw.l-glett { height: 0; border-top: 3px solid var(--accent); }
.exlegend .sw.b-mean { background: var(--rain); }
.exlegend .sw.b-max { background: rgba(59, 130, 246, .22); }
.exread { min-height: 18px; font-size: 12.5px; color: var(--text); margin: 0 0 4px; }
.exread .hint { color: var(--muted); }
.exread b { font-weight: 600; }
.exscroll { touch-action: pan-y; cursor: crosshair; }
.exsvg .xl { stroke: var(--text); stroke-width: 1; stroke-dasharray: 2 3; }
.exsvg .xd { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.exsvg .xh { display: none; } .exsvg .xh.on { display: block; }
/* Phones: the parameter row scrolls sideways; a fade at the right edge shows that more tabs follow */
@media (max-width: 700px) {
  .tabsrow .tabs { scrollbar-width: none; }
  .tabsrow .tabs.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
  .tabsrow .tabs::-webkit-scrollbar { display: none; }
}
/* Vertical list: plain white columns; only night rows and the current hour are shaded (colour that means something) */
.grid.vert td.prob, .grid.vert td.summary { background: var(--panel); }
.grid.vert td.prob { border-right: 1px solid var(--line); }
/* ============================================================ Less spreadsheet: hairlines between hours, no cell frames */
:root { --hair: color-mix(in srgb, var(--line) 75%, transparent); }
/* Vertical list: a plain list inside the card */
.table-wrap.vert { border: 0; border-radius: 0; background: none; box-shadow: none; }
.grid.vert th, .grid.vert td, .grid.vert tr.hr td, .grid.vert td.prob { border: 0; border-bottom: 1px solid var(--hair); }
.grid.vert .rowh, .grid.vert thead th.rowh { border-right: 0; }
.grid.vert thead th { border-bottom: 1px solid var(--line); font-weight: 600; letter-spacing: 0; font-size: 12.5px; padding-bottom: 8px; }
.grid.vert thead th.prob, .grid.vert thead th.summary { color: var(--muted); }
.grid.vert thead th.prob .hint2 { font-weight: 400; }
.grid.vert tr.dayrow th.dh { background: transparent; border-bottom: 0; padding: 16px 0 6px; font-size: 14px; color: var(--text); }
.grid.vert tr.dayrow th.dh span { padding: 0; border-radius: 0; background: none; }
.grid.vert tr.dayrow th.dh.cur span { background: none; color: var(--accent); }
.grid.vert tr.dayrow:first-child th.dh { padding-top: 8px; }
.grid.vert tr.hr td, .grid.vert tr.hr .rowh { padding-top: 10px; padding-bottom: 10px; }
.grid.vert tr.hr.night .rowh, .grid.vert tr.hr.night td { filter: none; background: var(--night); }
.grid.vert tr.hr.night td:last-child { border-radius: 0 8px 8px 0; }
.grid.vert tr.hr.night .rowh { border-radius: 8px 0 0 8px; }
.grid.vert tr.hr.now td { background-image: none; }
.grid.vert tr.hr.now .rowh { box-shadow: inset 3px 0 0 var(--accent); }
.grid.vert tr.nextday td { border-bottom: 0; }
/* Sideways strip: same idea; the pinned first column keeps a soft shadow instead of a frame */
.hours .table-wrap:not(.vert):not(.meteo-mode) { border: 0; border-radius: 0; background: none; box-shadow: none; }
.grid th, .grid td { border-bottom: 1px solid var(--hair); }
.grid thead th { border-bottom: 1px solid var(--line); font-weight: 600; letter-spacing: 0; }
.grid .rowh { border-right: 0; box-shadow: 6px 0 8px -7px rgba(15, 30, 60, .25); }
.grid thead tr.dayrow th.dh { border-bottom: 0; }
.grid th.dstart, .grid td.dstart { border-left: 1px solid var(--line); }
.grid tr.prob td { border-bottom: 1px solid var(--line); }
.grid tr.prob td, .grid tr.prob .rowh { border-top: 0; }
.grid tr.summary td, .grid tr.summary .rowh { border-bottom: 1px solid var(--line); }
.grid tr.ai, .grid tr.ai td, .grid tr.ai .rowh { border-top: 0; }
.grid.lanes tr.lane td, .grid.lanes tr.lane .rowh { border-bottom: 1px solid var(--hair); }
.grid.lanes tr.lane.wind td, .grid.lanes tr.lane.wind .rowh { border-bottom: 1px solid var(--line); }
.grid td.now::after { border: 0; }
.grid tbody tr:last-child td.now::after { border: 0; }
.grid.vert .rowh { box-shadow: none; }
.grid.vert tr.hr.now .rowh { box-shadow: inset 3px 0 0 var(--accent); }
/* The strip's zebra tint on the pinned column does not belong in the vertical list (it striped the time column) */
.grid.vert tbody tr:not(.summary):not(.prob):nth-child(even) .rowh { background-color: var(--panel); }
.grid.vert tbody tr.hr.night:not(.summary):not(.prob):nth-child(even) .rowh { background-color: var(--night); }
/* Meteogram tooltip and column highlight */
.mgin { position: relative; }
.mghl { position: absolute; top: 0; bottom: 0; display: none; background: color-mix(in srgb, var(--accent) 9%, transparent); border-left: 1px dashed var(--accent); border-right: 1px dashed var(--accent); pointer-events: none; box-sizing: border-box; }
.mgtip { position: absolute; display: none; z-index: 6; transform: translateX(-50%); max-width: 250px; padding: 7px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.4; color: var(--text); pointer-events: none; white-space: normal; }
.mgtip b { font-weight: 600; }
.mgtip .agr { color: var(--muted); }
.mgscroll { cursor: crosshair; }
.rs-near { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 13px; color: var(--text); }
.rs-near .arrow { width: 14px; height: 14px; margin-top: 2px; flex: none; }
.rs-near { margin-bottom: 14px; }
/* Desktop (2026-09-29): now card and "Dagene fremover" side by side, the hours card full width below.
   (The old left/right split was sized for all 13 model rows; collapsed, it left a large empty area.) */
@media (min-width: 1000px) {
  .topgrid { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(380px, 1fr); grid-template-areas: "now week" "hours hours"; gap: 20px; align-items: start; }   /* start, not stretch: an open map makes the now card tall, and the day rows must not spread out to match */
  .topgrid .topleft { display: contents; }
  .topgrid #hero { grid-area: now; }
  .topgrid #weekCard { grid-area: week; }
  .topgrid #hoursCard { grid-area: hours; }
  .topgrid #bigMap { grid-area: hours; }
}
@media (min-width: 1300px) { .topgrid { grid-template-columns: minmax(420px, 5fr) minmax(420px, 4fr); } }
.rs-plot { margin-top: 16px; }
/* Desktop "Tid nedover" (models collapsed): 360 px overview column + hour list capped at ~780 px, page centred at 1200 px */
@media (min-width: 1000px) {
  body.vlayout main { max-width: 1200px; }
  body.vlayout .topgrid { grid-template-columns: 360px minmax(0, 1fr); grid-template-areas: "now hours" "week hours"; grid-template-rows: auto 1fr; gap: 16px 24px; align-items: start; }
  body.vlayout .topgrid #weekCard { position: sticky; top: 64px; align-self: start; }
  body.vlayout .topgrid #weekCard #days { justify-content: flex-start; }
  body.vlayout .topgrid #hoursCard { align-self: start; }
  body.vlayout .grid.vert { table-layout: fixed; width: 100%; }
  body.vlayout .grid.vert thead th.rowh, body.vlayout .grid.vert .rowh { width: 64px; }
  body.vlayout .grid.vert thead th.summary { width: 124px; }
  body.vlayout .grid.vert td.prob .wlist { max-width: 360px; }
  body.vlayout .grid.vert td.prob .wline.top { font-size: 15px; } body.vlayout .grid.vert td.prob .wline { font-size: 13.5px; }
  body.vlayout .grid.vert td.summary b { font-size: 17px; }
  body.vlayout .tabsrow { flex-direction: column; align-items: stretch; }
  body.vlayout .tabsrow .tablebar { align-self: flex-end; }
  body.vlayout .hero .now .big-temp { font-size: 46px; }
}
@media (min-width: 1000px) {
  body.vlayout main { max-width: 1140px; }
  body.vlayout .grid.vert thead th.summary { width: 140px; }
  body.vlayout .grid.vert td.prob .wlist { max-width: none; width: calc(100% - 52px); }
  body.vlayout .grid.vert .rowh { font-size: 14px; }
}
.brand #brandIcon img { display: block; height: 26px; width: auto; }
/* Night band: square ends, so the hairline between day and night rows runs edge to edge */
.grid.vert tr.hr.night td:last-child, .grid.vert tr.hr.night .rowh { border-radius: 0; }
/* Night band: rounded as one block (only its outer corners); the hairlines inside and around it still run edge to edge */
.grid.vert tr.hr.night.n-first .rowh { border-top-left-radius: 10px; }
.grid.vert tr.hr.night.n-first td:last-child { border-top-right-radius: 10px; }
.grid.vert tr.hr.night.n-last .rowh { border-bottom-left-radius: 10px; }
.grid.vert tr.hr.night.n-last td:last-child { border-bottom-right-radius: 10px; }
.grid.vert tr.hr.night.n-last td, .grid.vert tr.hr.night.n-last .rowh { border-bottom-color: transparent; }
/* The rounded night band is its own edge: no hairline right above it (that line met the rounded corner with a gap) */
.grid.vert tr.hr:has(+ tr.hr.n-first) td, .grid.vert tr.hr:has(+ tr.hr.n-first) .rowh,
.grid.vert tr.dayrow:has(+ tr.hr.n-first) th { border-bottom-color: transparent; }
/* Bigger main weather icon per hour (easier at a glance) */
.grid.vert td.prob .wi.big { width: 50px; height: 50px; margin-right: 8px; }
.grid.lanes tr.lane.wx td .wi.big { width: 40px; height: 40px; }
@media (max-width: 700px) {
  .grid.vert td.prob .wi.big { width: 46px; height: 46px; margin-right: 6px; }
  .grid.vert td.prob .wlist { width: calc(100% - 54px); max-width: calc(100% - 54px); }
}
@media (max-width: 360px) { .grid.vert td.prob .wi.big { width: 38px; height: 38px; margin-right: 3px; } .grid.vert td.prob .wlist { width: calc(100% - 42px); max-width: calc(100% - 42px); } }
@media (min-width: 1000px) { body.vlayout .grid.vert td.prob .wlist { width: calc(100% - 60px); } }

/* Dagene fremover: every row is its own grid, so "auto" columns sized per row and icons/temperatures zig-zagged.
   Fixed column widths line them up in all rows and under the header. */
.week { --wk: minmax(64px, 1fr) 34px 78px 70px 62px; --wkgap: 8px; }
.week .d .wi { width: 32px; height: 32px; justify-self: center; }
.week .d .hl, .week .wk-h span:nth-child(3) { text-align: right; }
@media (max-width: 360px) { .week { --wk: minmax(44px, 1fr) 26px 64px 58px 50px; --wkgap: 5px; } .week .d .wi { width: 26px; height: 26px; } }
@media (max-width: 279px) { .week { --wk: minmax(52px, 1fr) 60px 56px 46px; } }
@media (max-width: 300px) { .grid.vert td.prob .wi.big { display: block; width: 36px; height: 36px; margin: 0 auto 2px; } .grid.vert td.prob .wlist { width: 100%; max-width: none; } }
@media (max-width: 360px) { table.grid.vert thead th.summary { width: 76px; } table.grid.vert thead th.rowh, .grid.vert .rowh { width: 46px; } }
/* High and low temperature in their own right-aligned sub-columns, so both line up down the list */
.week .d .hl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; text-align: right; }
.week .d .hl b { font-weight: 600; }
/* Enlarged text: the weather words need the room more than the icon does */
@media (max-width: 360px) { .grid.vert td.prob .wi.big { width: 30px; height: 30px; margin-right: 3px; } .grid.vert td.prob .wlist { width: calc(100% - 34px); max-width: calc(100% - 34px); } }
@media (max-width: 300px) { .grid.vert td.prob .wi.big { display: block; width: 34px; height: 34px; margin: 0 auto 2px; } .grid.vert td.prob .wlist { width: 100%; max-width: none; } }
/* Dagene fremover: proportional columns (identical in every row, so still aligned) that always fit inside the card */
.week { --wk: minmax(0, 1.25fr) 34px minmax(0, 1.35fr) minmax(0, 1.1fr) minmax(0, 1fr); --wkgap: 8px; }
.week .d .gu, .week .d .pr, .week .d .hl { min-width: 0; }
@media (max-width: 360px) { .week { --wk: minmax(0, 1.2fr) 26px minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1fr); --wkgap: 5px; } }
@media (max-width: 279px) { .week { --wk: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1fr); } }
@media (max-width: 360px) { .week .d .gu .u { display: none; } .week .wk-h .hu { display: inline; } }
/* Agreement bar tooltip */
.segbar i { cursor: help; }
.segtip { position: fixed; z-index: 3000; min-width: 170px; padding: 8px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 22px rgba(15, 30, 60, .18); font-size: 12.5px; color: var(--text); pointer-events: none; }
.segtip .st-h { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.segtip .st-r { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 1px 0; color: var(--muted); }
.segtip .st-r i { width: 12px; height: 8px; border-radius: 2px; display: block; }
.segtip .st-r.on { color: var(--text); font-weight: 600; }
.segtip .st-r b { font-weight: 600; }
/* Colour key above the table */
.segkey { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.segkey .sk-l { color: var(--muted); }
.segkey .sk-i { display: inline-flex; align-items: center; gap: 5px; color: var(--text); white-space: nowrap; }
.segkey .sk-i i { width: 14px; height: 8px; border-radius: 2px; display: inline-block; }
/* Units next to the answer values (smaller, muted) */
.grid td b .un { font-size: .72em; font-weight: 500; color: var(--muted); margin-left: 1px; }
/* Footer centred */
footer { text-align: center; }
footer .attr-more summary { display: inline-block; }
footer .attr-more > div { text-align: left; max-width: 760px; margin-left: auto; margin-right: auto; }
/* "Hva er Glett?" button and dialog */
.aboutbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; padding: 6px 4px; }
.aboutbtn .q { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; line-height: 1; }
.aboutbtn:hover { color: var(--accent); }
@media (max-width: 700px) { .aboutbtn span[data-i18n] { display: none; } .aboutbtn .q { width: 30px; height: 30px; font-size: 15px; } }
.aboutdlg { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px 18px; background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(15, 30, 60, .3); }
.aboutdlg::backdrop { background: rgba(13, 20, 32, .45); }
.aboutdlg h2 { margin: 0 32px 8px 0; font-size: 22px; }
.aboutdlg h3 { margin: 16px 0 4px; font-size: 15px; }
.aboutdlg p, .aboutdlg li { font-size: 14.5px; line-height: 1.55; }
.aboutdlg .lead { font-size: 15.5px; }
.aboutdlg ul { padding-left: 20px; margin: 4px 0; }
.aboutdlg .muted { color: var(--muted); font-size: 13px; }
.aboutdlg .ad-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font-size: 14px; }
footer .aboutlink { margin: 8px 0 0; font-size: 13px; }
/* Verdict dots: unfilled dots stay visible as faded blue, so it reads "3 of 5" */
.hero .verdict .dots i { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.hero .verdict .dots i.on { background: var(--accent); }
/* Bigger wind arrows (easier to read the direction); the arrow is on its own line part, the rain line sits below it */
.grid td .wnd .arrow { width: 17px; height: 17px; margin-right: 2px; vertical-align: -4px; fill: var(--text); opacity: .75; }
.grid.lanes tr.lane.wind td .arrow { width: 18px; height: 18px; vertical-align: -4px; fill: var(--text); opacity: .75; }
.hero .now .desc .wind .arrow { width: 18px; height: 18px; vertical-align: -3px; }
.week .d .gu .arrow { width: 14px; height: 14px; }
@media (max-width: 360px) { .grid td .wnd .arrow { width: 14px; height: 14px; margin-right: 1px; } }
a.brand { color: var(--text); text-decoration: none; }
a.brand:hover small { color: var(--accent); }
/* Cookie consent (Google Analytics): bottom sheet, both answers equally prominent */
.consent { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 4000; width: min(560px, calc(100vw - 24px)); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(15, 30, 60, .25); padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.consent p { margin: 0 0 10px; }
.consent .cs-btns { display: flex; gap: 10px; justify-content: flex-end; }
.consent .btn { min-width: 110px; font-weight: 600; }
.consent .cs-yes, .consent .cs-no { background: var(--panel); color: var(--text); border: 1.5px solid var(--text); }
@media (max-width: 420px) { .consent .cs-btns .btn { flex: 1; } }
/* One star per saved place: the toggle button on the right; no extra star before the name (the group label says "Mine steder") */
.chip.saved .pick::before { content: none; }
/* Header mini summary */
.mininow { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 4px 12px 4px 8px; font: inherit; font-size: 14px; cursor: pointer; min-width: 0; max-width: 100%; margin-right: auto; animation: mnIn .18s ease-out; }
.mininow .wi.mini { width: 24px; height: 24px; flex: none; }
.mininow .mn-place { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mininow .mn-temp { font-weight: 700; }
.mininow .mn-cat { color: var(--muted); white-space: nowrap; }
.mininow:hover { border-color: var(--accent); }
@keyframes mnIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
body.minion .brand small { display: none; }   /* room for the summary on desktop */
@media (max-width: 700px) {
  .topbar .brand { flex: 0 0 auto; }
  .mininow { flex: 1 1 0; justify-content: flex-start; font-size: 13.5px; padding: 3px 10px 3px 6px; }
  .mininow .mn-cat { display: none; }
}
@media (max-width: 360px) { .mininow .mn-place { max-width: 90px; } }
@media (max-width: 700px) { .mininow { flex: 0 1 auto; } .mininow .mn-cat { display: inline; } }
@media (max-width: 380px) { .mininow .mn-cat { display: none; } }
/* ===== Phone header: one row (logo · summary · menu button), controls in a drop-down panel ===== */
.menubtn { display: none; }
@media (max-width: 700px) {
  .topbar { flex-wrap: nowrap; position: sticky; }
  .topbar .brand { flex: 0 0 auto; }
  .mininow { flex: 0 1 auto; min-width: 0; margin-right: auto; }
  .mininow .mn-place { flex: 0 1 auto; }
  .menubtn { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; margin-left: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); cursor: pointer; }
  .mininow:not([hidden]) + .menubtn { margin-left: 0; }
  .menubtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; grid-area: 1 / 1; }
  .menubtn .i-close { display: none; }
  .topbar.menu-open .menubtn .i-open { display: none; }
  .topbar.menu-open .menubtn .i-close { display: block; }
  .topbar .topright { display: none; position: absolute; top: 100%; right: 8px; left: 8px; margin-top: 6px; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(15, 30, 60, .22); }
  .topbar.menu-open .topright { display: flex; }
  .topbar .topright .aboutbtn { justify-content: flex-start; font-size: 15px; color: var(--text); padding: 8px 4px; }
  .topbar .topright .aboutbtn span[data-i18n] { display: inline; }
  .topbar .topright .aboutbtn .q { width: 22px; height: 22px; font-size: 13px; }
  .topbar .topright .mainnav { display: flex; flex-direction: column; gap: 8px; }   /* one entry per row: three side by side wrapped the names */
  .topbar .topright .navlink { width: 100%; justify-content: flex-start; padding: 12px 14px; font-size: 15px; }
  .topbar .topright .navlink .chev { margin-left: auto; }
  .topbar .topright .lang { align-self: flex-start; }
  .topbar .topright .themebtn { position: absolute; right: 14px; bottom: 14px; }
}
/* wider screens: the same one-row header with the menu button whenever the row would otherwise wrap (set by app.js) */
.topbar.compact { flex-wrap: nowrap; position: sticky; }
.topbar.compact .brand { flex: 0 0 auto; }
.topbar.compact .mininow { flex: 0 1 auto; min-width: 0; margin-right: auto; }
.topbar.compact .mininow .mn-place { flex: 0 1 auto; }
.topbar.compact .menubtn { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; margin-left: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); cursor: pointer; }
.topbar.compact .mininow:not([hidden]) + .menubtn { margin-left: 0; }
.topbar.compact .menubtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; grid-area: 1 / 1; }
.topbar.compact .menubtn .i-close { display: none; }
.topbar.compact.menu-open .menubtn .i-open { display: none; }
.topbar.compact.menu-open .menubtn .i-close { display: block; }
.topbar.compact .topright { display: none; position: absolute; top: 100%; right: 8px; left: 8px; margin-top: 6px; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(15, 30, 60, .22); }
.topbar.compact.menu-open .topright { display: flex; }
.topbar.compact .topright .aboutbtn { justify-content: flex-start; font-size: 15px; color: var(--text); padding: 8px 4px; }
.topbar.compact .topright .aboutbtn span[data-i18n] { display: inline; }
.topbar.compact .topright .aboutbtn .q { width: 22px; height: 22px; font-size: 13px; }
.topbar.compact .topright .mainnav { display: flex; flex-direction: column; gap: 8px; }   /* one entry per row: three side by side wrapped the names */
.topbar.compact .topright .navlink { width: 100%; justify-content: flex-start; padding: 12px 14px; font-size: 15px; }
.topbar.compact .topright .navlink .chev { margin-left: auto; }
.topbar.compact .topright .lang { align-self: flex-start; }
.topbar.compact .topright .themebtn { position: absolute; right: 14px; bottom: 14px; }
.topbar.compact .mininow .mn-place { max-width: 34vw; }   /* a long place name is cut, never a second line */
.topbar .mininow { max-width: 100%; } .topbar .mininow .mn-place { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 700px) { .mininow .mn-cat { display: none; } }   /* the place name gets the room; the icon already shows the weather */
/* The coloured answer column (last cell) also rounds where a day band meets a night band, and at day headings */
.grid.vert tr.hr.b-first td:last-child { border-top-right-radius: 10px; }
.grid.vert tr.hr.b-last td:last-child { border-bottom-right-radius: 10px; }
/* The time sits on the row's centre line, like the icon and the values */
.grid.vert tr.hr .rowh { vertical-align: middle; }
/* A little air before the time */
.grid.vert tr.hr .rowh { padding-left: 12px; }
table.grid.vert thead th.rowh, .grid.vert .rowh { width: 60px; }
@media (min-width: 1000px) { body.vlayout .grid.vert thead th.rowh, body.vlayout .grid.vert .rowh { width: 74px; } body.vlayout .grid.vert tr.hr .rowh { padding-left: 16px; } }
@media (max-width: 360px) { .grid.vert tr.hr .rowh { padding-left: 8px; } table.grid.vert thead th.rowh, .grid.vert .rowh { width: 52px; } }
.grid.vert thead th.rowh { padding-left: 12px; }
@media (max-width: 360px) { .grid.vert tr.hr .rowh { padding-left: 7px; padding-right: 2px; } table.grid.vert thead th.rowh, .grid.vert .rowh { width: 48px; } }
@media (max-width: 360px) { table.grid.vert thead th.summary { width: 70px; } }
/* Phones: the slogan shows at the top; once scrolled, the place summary takes its place */
@media (max-width: 700px) {
  .topbar .brand { flex: 0 1 auto; min-width: 0; }
  .topbar .brand small { display: inline; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  body.minion .topbar .brand small { display: none; }
  body.minion .topbar .brand { flex: 0 0 auto; }
}
@media (max-width: 330px) { .topbar .brand small { display: none; } }
/* Vertical list with every model: natural column widths and sideways scrolling instead of squeezing into the screen */
table.grid.vert.allm { table-layout: auto; width: max-content; min-width: 100%; }
table.grid.vert.allm thead th.rowh, .grid.vert.allm .rowh { width: 60px; min-width: 60px; position: sticky; left: 0; z-index: 3; background: var(--panel); }
.grid.vert.allm tr.hr.night .rowh { background: var(--night); }
table.grid.vert.allm thead th.prob, .grid.vert.allm td.prob { min-width: 220px; width: 220px; }
table.grid.vert.allm thead th.summary, .grid.vert.allm td.summary { min-width: 104px; width: 104px; }
table.grid.vert.allm thead th.model, table.grid.vert.allm thead th.ai { min-width: 86px; }
.grid.vert.allm td.prob .wlist { width: calc(100% - 54px); max-width: none; }
.grid.vert.allm td.prob .wline .wi { display: inline-block; }
.grid.vert.allm thead th { white-space: normal; }
.bestmark { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--good) 16%, var(--panel)); color: var(--good); font-size: 11px; font-weight: 700; }
/* Moon: dark part faintly visible (so a thin crescent or new moon still reads as the moon) */
.wi .moon-dark { fill: var(--moon-dark); opacity: .28; }
.wi .cloud.back { opacity: .82; }
.wi .moong, .wi .moong > g, .wi .cloudg2 { transform-box: fill-box; transform-origin: center; }   /* the inner g places the moon, the outer one floats it */
/* Movement: clouds drift gently sideways (two clouds in opposite directions), the moon floats slowly */
.wi.anim .cloudg { animation: cloudA 6s ease-in-out infinite alternate; }
.wi.anim .cloudg2 { animation: cloudB 7.5s ease-in-out infinite alternate; }
.wi.anim .moong { animation: moonfloat 8s ease-in-out infinite alternate; }
@keyframes cloudA { from { transform: translate(-1.2px, 0); } to { transform: translate(1.6px, -.8px); } }
@keyframes cloudB { from { transform: translate(1.8px, 0); } to { transform: translate(-1.8px, .6px); } }
@keyframes moonfloat { from { transform: translateY(.8px) rotate(-3deg); } to { transform: translateY(-1.2px) rotate(3deg); } }
.wi .moon { stroke: rgba(80, 100, 135, .45); stroke-width: 1; }
.wi .moon-dark { opacity: .16; stroke: rgba(80, 100, 135, .35); stroke-width: 1; }
:root[data-theme="dark"] .wi .moon-dark { opacity: .28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wi .moon-dark { opacity: .28; } }
/* Warmer moon with craters */
.wi .moon { stroke: rgba(150, 115, 40, .45); }
.wi .moon-dark { fill: #b99a4e; stroke: rgba(150, 115, 40, .3); }
.wi .crater { fill: #c9a24c; opacity: .38; }
.wi .crater { opacity: .3; }
/* Pull to refresh (touch): the browser's own pull-to-reload is switched off so the page does not reload from cache */
html { overscroll-behavior-y: none; }
.ptr { position: fixed; left: 50%; top: 64px; z-index: 900; width: 40px; height: 40px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(15, 30, 60, .18); display: grid; place-items: center; transform: translate(-50%, -50px); opacity: 0; pointer-events: none; }
.ptr svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ptr.ready svg { stroke: var(--accent); }
.ptr.back { transition: transform .25s ease, opacity .25s ease; }
.ptr.spin svg { stroke: var(--accent); animation: spin .8s linear infinite; }
@media (max-width: 700px) { .ptr { top: 64px; } }

/* ================= Local map (inside the now card) ================= */
.hero .local.lm-link { cursor: pointer; }
.hero .local.lm-link:hover { border-color: var(--accent); }
.hero .local.lm-link { display: flex; align-items: flex-start; gap: 10px; }   /* the text in its own column, the map toggle beside it: nothing wraps around the toggle */
.hero .local .local-txt { flex: 1 1 auto; min-width: 0; }
.hero .local .lm-chev { flex: 0 0 auto; margin-top: -2px; }   /* styled by .rs-mapbtn, the same pill as 'Vis nedbørradar' */
.hero .local .rs-mapbtn { margin-left: 0; }
.hero .local.open .lm-chev i { display: inline-block; transform: rotate(180deg); }
.hero .local .lm-chev i { font-style: normal; display: inline-block; }
.lmap { margin: -4px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 8px 10px; }
.lm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lm-chips button { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.lm-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .lm-chips button[aria-pressed="true"] { color: #0b1220; }
.lm-chips button:disabled { opacity: .45; cursor: default; }
.lm-map { height: 320px; border-radius: 8px; border: 1px solid var(--line); z-index: 1; background: var(--bg); }
@media (max-width: 700px) { .lm-map { height: 270px; } }
.lm-slider { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; }
.lm-slider input { flex: 1; min-width: 60px; accent-color: var(--accent); }
.lm-slider b { flex: 0 1 auto; min-width: 86px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lm-cap { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.lm-cap > div + div { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.lm-cap b { color: var(--text); }
.lm-cap .lg { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; white-space: nowrap; }
.lm-cap .lg i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.25); }
.lm-cap .spinner.small { display: inline-block; vertical-align: middle; width: 14px; height: 14px; border-width: 2px; }
.sum.alert { cursor: pointer; }   /* a link down to the warnings under the local map; the triangle carries the level */
.sum.alert b { font-weight: 700; color: var(--accent-2); }
.sum.alert .sum-go { margin-left: auto; padding-left: 8px; font-style: normal; font-weight: 600; color: var(--accent-2); white-space: nowrap; }
.sum.alert > span { display: flex; flex: 1; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.sum.alert > span .sum-go { align-self: center; }
.awi { width: 30px; height: 27px; flex: none; }
.awi.sm { width: 22px; height: 20px; }
/* the warnings under the local map: MET's triangle, the text, and MET's numbers held against the models (no coloured boxes) */
.lm-alerts { margin-top: 8px; color: var(--text); font-size: 14px; }
.aw { padding: 12px 0 14px; border-top: 1px solid var(--line); }
.aw:first-child { border-top: 0; padding-top: 4px; }
.aw-hd { display: flex; gap: 10px; align-items: flex-start; }
.aw-hd > div:nth-child(2) { flex: 1; min-width: 0; }
.aw-hd b { display: block; font-size: 15.5px; color: var(--text); }
.aw-hd small { color: var(--muted); font-size: 12.5px; }
.aw-hd small a { color: inherit; }
.aw-when { text-align: right; font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aw-when small { display: block; font-weight: 500; }
.aw-txt { margin: 8px 0 6px; color: var(--text); opacity: .86; }
.aw-txt a { color: var(--accent-2); }
.aw-gauge { position: relative; height: 62px; margin: 4px 2px 0; }
.aw-gauge i { position: absolute; display: block; }
.aw-gauge .base { left: 0; right: 0; top: 32px; height: 2px; background: var(--line); }
.aw-gauge .band { top: 24px; height: 18px; border-radius: 3px; background: repeating-linear-gradient(-45deg, #f5c518 0 6px, #f8dc6b 6px 12px); }
.aw-gauge .band.orange { background: repeating-linear-gradient(-45deg, #f97316 0 6px, #fdba74 6px 12px); }
.aw-gauge .band.red { background: repeating-linear-gradient(-45deg, #dc2626 0 6px, #f87171 6px 12px); }
.aw-gauge .bl { position: absolute; top: 0; font-size: 11.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.aw-gauge .dot { top: 28px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #94a3b8; border: 2px solid var(--panel); }
.aw-gauge .dot.up { top: 18px; }
.aw-gauge .gl { top: 23px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--accent); }
.aw-gauge .gll { position: absolute; top: 45px; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.aw-gauge .tk { position: absolute; top: 45px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.aw-gauge .tk.l { transform: none; } .aw-gauge .tk.r { transform: translateX(-100%); }
.aw-verdict { margin: 2px 0 0; font-size: 13.5px; color: var(--text); }
.aw-verdict b { font-weight: 600; }
.aw-none { margin: 4px 0 0; color: var(--muted); }
.aw-legend { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.lm-place { fill: var(--accent); stroke: #fff; }
.leaflet-container .lm-tip { font-size: 12px; }
.radarstrip .rs-near.link { cursor: pointer; }
.radarstrip .rs-near.link:hover { text-decoration: underline; }
/* Temperature field, number labels, radar controls */
.lm-wrap { position: relative; }
.lm-map.muted .leaflet-tile-pane { filter: saturate(.25) contrast(.92) brightness(1.03); }
.lm-lbl { background: none; border: 0; pointer-events: none; }
.lm-lbl span { display: block; text-align: center; white-space: nowrap; font: 600 11.5px/17px "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums; color: #0f172a;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 4px rgba(255,255,255,.9); paint-order: stroke fill; -webkit-text-stroke: 3px rgba(255,255,255,.9); }
.lm-lbl.one span { font-weight: 500; opacity: .9; }
:root[data-theme="dark"] .lm-lbl span { color: #f1f5f9; text-shadow: 0 0 2px #0d1420, 0 0 2px #0d1420, 0 0 3px #0d1420, 0 0 4px rgba(13,20,32,.9); -webkit-text-stroke-color: rgba(13,20,32,.85); }
.lm-scale { position: relative; display: flex; height: 10px; border-radius: 5px; margin: 4px 0 2px; border: 1px solid rgba(0,0,0,.15); margin-right: 42px; }
.lm-scale .lm-unit { position: absolute; left: 100%; top: -3px; margin-left: 8px; font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap; }
.lm-ticks { margin-right: 42px; }
.lm-scale i { flex: 1; display: block; height: 100%; }
.lm-scale i:first-child { border-radius: 5px 0 0 5px; } .lm-scale i:last-of-type { border-radius: 0 5px 5px 0; }
.lm-scale .lm-tri { position: absolute; top: 100%; width: 0; height: 0; transform: translateX(-50%); border: 5px solid transparent; border-top: 6px solid var(--text); border-bottom: 0; }
.lm-ticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.lm-ticks span { position: absolute; transform: translateX(-50%); }
.lm-cap .lg i.iso { width: 14px; height: 0; border-radius: 0; border: 0; border-top: 2px solid #1e3a8a; }
.lm-cap .lg i.hatch { border-radius: 2px; background: repeating-linear-gradient(45deg, #cbd5e1 0 2px, transparent 2px 5px); }
.lm-cap .lg i.tri { width: 0; height: 0; border-radius: 0; border: 5px solid transparent; border-top: 7px solid var(--text); border-bottom: 0; }
.lm-read { font-size: 12.5px; color: var(--text); margin-top: 6px; }
.lm-read:empty { display: none; }
.lm-badge, .lm-here { position: absolute; z-index: 1000; pointer-events: none; font: 600 12px/1 "Inter", system-ui, sans-serif; padding: 6px 9px; border-radius: 999px; background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); color: var(--text); font-variant-numeric: tabular-nums; }
.lm-badge { top: 8px; left: 50px; } .lm-badge.latest { border-color: var(--accent); } .lm-badge.stale, .lm-slider b.stale { color: var(--muted); } .lm-badge.est { border-style: dashed; color: var(--muted); } .lm-slider b.est { color: var(--muted); font-style: italic; }
.lm-radar-cv { image-rendering: auto; }
.lm-radar-pane canvas.lm-radar-cv { image-rendering: pixelated; }   /* MET's coarse tiles scaled up: crisp 1 km cells, not a blur */
.lm-here { bottom: 28px; left: 8px; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-play { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; padding: 0; display: grid; place-items: center; }
/* drawn, not font glyphs: iOS sets ▶ and ❚❚ low in the line */
.lm-play::before { content: ''; width: 11px; height: 12px; margin-left: 2px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.lm-play[aria-pressed="true"]::before { width: 10px; height: 11px; margin-left: 0; clip-path: none; background: linear-gradient(to right, currentColor 0 35%, transparent 35% 65%, currentColor 65%); }
.lm-play[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.lm-radar-pane .leaflet-layer { transition: opacity .15s linear; }
.lm-place.wet { fill: var(--rain); animation: lm-pulse 1.6s ease-out infinite; }
@keyframes lm-pulse { 0% { stroke-width: 2; stroke-opacity: 1; } 100% { stroke-width: 10; stroke-opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lm-radar-pane .leaflet-layer { transition: none; } .lm-place.wet { animation: none; } }
/* Radar map under the radar strip */
.rs-mapbtn { margin-left: auto; border: 1px solid var(--line); background: var(--bg); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.rs-mapbtn:hover { border-color: var(--accent); }
.rmopen { margin: 14px 0 12px; }
.rmap { margin: 0 0 10px; }
.rmap .lm-map { height: 340px; }
.rm-down { position: absolute; inset: 0; z-index: 1000; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 24px; text-align: center;
  background: color-mix(in srgb, var(--panel) 84%, transparent); border-radius: 8px; color: var(--text); font-size: 13.5px; line-height: 1.45; pointer-events: none; }
.rm-down[hidden] { display: none; }
.rm-down b { font-size: 16px; font-weight: 650; }
.rm-down span { max-width: 34em; color: var(--muted); }
@media (max-width: 700px) { .rmap .lm-map { height: 300px; } }
/* Map credits: a small (i) that unfolds on tap */
.leaflet-container .glett-attr { cursor: pointer; font-size: 11px; line-height: 1.3; }
.leaflet-container .glett-attr:not(.open) { width: 20px; height: 20px; padding: 0; margin: 0 6px 6px 0; border-radius: 50%; font-size: 0; background: rgba(255,255,255,.85); color: transparent; box-shadow: 0 0 0 1px rgba(15,23,42,.18); }
.leaflet-container .glett-attr:not(.open)::before { content: 'i'; display: block; width: 20px; height: 20px; line-height: 20px; text-align: center; font: italic 700 12px/20px Georgia, "Times New Roman", serif; color: #334155; }
.leaflet-container .glett-attr.open { border-radius: 8px 0 0 0; }
:root[data-theme="dark"] .leaflet-container .glett-attr:not(.open) { background: rgba(13,20,32,.8); box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
:root[data-theme="dark"] .leaflet-container .glett-attr:not(.open)::before { color: #cbd5e1; }
.lm-slider .lm-sl-lbl { font-weight: 700; color: var(--accent); white-space: nowrap; }
.lm-lbl span .arrow { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; fill: #0f172a; }
:root[data-theme="dark"] .lm-lbl span .arrow { fill: #f1f5f9; }
.lm-lbl.dry span { font-weight: 500; opacity: .75; }
.lm-ticks-bins span { transform: none; }
.lm-busy { position: absolute; z-index: 1000; top: 8px; right: 8px; pointer-events: none; display: flex; align-items: center; gap: 6px; font: 600 12px/1 "Inter", system-ui, sans-serif; padding: 6px 9px; border-radius: 999px; background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); color: var(--muted); }
.lm-busy .spinner.small { flex: 0 0 12px; width: 12px; height: 12px; border-width: 2px; }   /* the generic .spinner flex-basis (22 px) stretched it into an oval */

.sum.nowcast small { color: var(--muted); font-weight: 500; font-size: 12px; }
/* "Bigger map": an open map panel moved into the right column over the hour table (wide screens only) */
.lm-head { display: flex; align-items: flex-start; gap: 8px; }
.lm-head .lm-chips { flex: 1; }
.rm-head { justify-content: flex-end; margin-bottom: 6px; }
.lm-bigbtn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--accent); border-radius: 999px; padding: 4px 11px 4px 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.lm-bigbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lm-bigbtn:hover { border-color: var(--accent); }
.lm-bigbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .lm-bigbtn[aria-pressed="true"] { color: #0b1220; }
@media (max-width: 999px) { .lm-bigbtn { display: none !important; } }
.bigmap { min-width: 0; }
.bigmap .lmap { margin: 0; }
.bigmap .lm-map { height: calc(100vh - 240px); min-height: 520px; }
.bigmap .rmap .lm-map { height: calc(100vh - 240px); min-height: 520px; }
/* Sun and shadow map (MapLibre) */
.hero .sunbtn { margin-left: auto; }
.sm-map { height: 380px; }
@media (max-width: 700px) { .sm-map { height: 330px; } }
.bigmap .sm-map { height: calc(100vh - 240px); min-height: 520px; }
.sm-ctrl { position: absolute; z-index: 5; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; }
.sm-ctrl button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--text); font-size: 16px; line-height: 1; cursor: pointer; font-family: inherit; }
.sm-ctrl button:hover { border-color: var(--accent); color: var(--accent); }
.smap .lm-badge { left: 8px; }
.smap .maplibregl-ctrl-top-left { top: 4px; left: 4px; }   /* compass and 3D top-left, as on the planner maps */
.sm-sun { display: inline-flex; align-items: center; gap: 6px; }
.sm-sun svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.smap .sm-busy { top: auto; bottom: 36px; right: auto; left: 8px; }
.lm-slider .sm-min { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1; cursor: pointer; padding: 0; font-family: inherit; }
.lm-slider .sm-min:hover { border-color: var(--accent); color: var(--accent); }
.sm-figure { width: 45px; height: 80px; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
/* ================= Sun and shade v2: sun row, panel, sun path ================= */
.sunrow { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; padding: 7px 12px; border-radius: 10px; cursor: pointer;   /* the same box as the panels above (the whole row is the tap target) */
  background: #fff8e6; border: 1px solid #f3dfa4; color: var(--text); font-size: 14.5px; line-height: 1.45; }
.sunrow:hover { border-color: #e9c45a; }
.sunrow .sr-ico { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: #d99a00; stroke-width: 2; stroke-linecap: round; }
.sunrow .sr-ico circle { fill: #f5b301; stroke: #d99a00; }
.sunrow .sr-txt { flex: 1 1 auto; min-width: 0; }
.sunrow .sr-txt b { font-weight: 600; font-variant-numeric: tabular-nums; }
.sunrow .sr-state { color: var(--muted); }
/* columns: sun | text | button; the second line (sunrise, sunset, state) under the text and the button. Long text wraps inside its own column */
.sunrow:not(.sr-plain) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 1px; }
.sunrow:not(.sr-plain) > .sr-ico { grid-column: 1; grid-row: 1; }
.sunrow:not(.sr-plain) > .sr-txt { grid-column: 2; grid-row: 1; }
.sunrow:not(.sr-plain) > .sr-btn { grid-column: 3; grid-row: 1; }
.sunrow .sr-rs { grid-column: 2 / 4; grid-row: 2; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.sunrow .sr-rsp { white-space: nowrap; }   /* inline, not inline-flex: the times then share the baseline with the state text after them */
.sunrow .sr-rsp + .sr-rsp { margin-left: 14px; }
.sunrow .sr-rsi { display: inline-block; vertical-align: -4px; margin-right: 4px; width: 18px; height: 18px; fill: none; stroke: #d99a00; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sunrow .sr-rs-plain { font-weight: 600; font-variant-numeric: tabular-nums; } .sunrow.sr-plain .sr-rsi { width: 20px; height: 20px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* sunrise and sunset over a flat horizon, under the terrain sun */
.sunrow.sr-plain { cursor: default; } .sunrow.sr-plain:hover { border-color: #f3dfa4; }   /* outside mainland Norway: the times only, no shadow map */   /* may wrap: the English state is long, and a nowrap span ran under the button */
.sunrow .sr-btn { flex: 0 0 auto; margin: -3px 0; }   /* the pill may reach into the padding, so it does not make the row taller */
:root[data-theme="dark"] .sunrow { background: color-mix(in srgb, #f5b301 9%, var(--panel)); border-color: #4a3f22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sunrow { background: color-mix(in srgb, #f5b301 9%, var(--panel)); border-color: #4a3f22; } }
.hero .local .feels { white-space: nowrap; }

.smap { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; display: flex; flex-direction: column; }
.sm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.sm-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-close { width: 36px; height: 36px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.sm-close:hover { background: var(--line); }
.sm-back { margin-left: auto; white-space: nowrap; }
.sm-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sm-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
.sm-map { height: 420px; width: 100%; }
.bigmap .smap { margin: 0; }
.bigmap .sm-map { height: calc(100vh - 330px); min-height: 460px; }
.sm-bar { position: absolute; z-index: 6; left: 0; right: 0; top: 0; height: 3px; overflow: hidden; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.sm-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--accent); animation: smbar 1.1s ease-in-out infinite; }
@keyframes smbar { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .sm-bar::after { animation: none; left: 0; width: 100%; opacity: .5; } }
.sm-chip { position: absolute; z-index: 5; right: 10px; top: 10px; max-width: calc(100% - 70px); display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); color: #16202e; border: 1px solid rgba(15, 23, 42, .1); box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font: 600 13px/1 "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums; pointer-events: none; }
.sm-chip span { font-weight: 500; color: #475569; }
.sm-chip svg { width: 16px; height: 16px; }
.smc-sun circle { fill: #f5b301; stroke: #d99a00; stroke-width: 1.5; }
.smc-moon path { fill: #cbd5e1; stroke: #94a3b8; stroke-width: 1; }
.smc-sun.shade circle { fill: none; stroke: #94a3b8; }   /* the sun is up, but not on the figure's spot */
.sm-chip .smc-st { margin-left: -3px; }
.sm-chip .smc-st.lit { color: #b45309; }
:root[data-theme="dark"] .sm-chip .smc-st.lit { color: #fbbf24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sm-chip .smc-st.lit { color: #fbbf24; } }
/* long presses on the map and the sun path are gestures, not text selection (iOS showed its copy menu) */
.sm-wrap, .sm-time { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sm-time, .sm-time button { touch-action: manipulation; }   /* fast taps on −1/+1 step the time; Safari must not take a double tap as zoom */
:root[data-theme="dark"] .sm-chip { background: rgba(21, 31, 47, .88); color: #e6edf7; border-color: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .sm-chip span { color: #a7b3c4; }
.sm-infobtn { position: absolute; z-index: 5; left: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(15, 23, 42, .15); background: rgba(255, 255, 255, .92);
  color: #16202e; font: 700 14px/1 "Inter", system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 6px rgba(15, 23, 42, .12); }
.sm-infobtn[aria-expanded="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.sm-info { position: absolute; z-index: 7; left: 10px; bottom: 48px; max-width: min(320px, calc(100% - 20px)); padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18); font-size: 13px; line-height: 1.45; color: var(--text); }
.sm-info p { margin: 0 0 8px; } .sm-info p:last-child { margin: 0; } .sm-info .muted { color: var(--muted); }
.sm-legend { display: flex; gap: 14px; } .sm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sm-legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); }
.sm-legend .lg-shade { background: rgba(15, 23, 42, .47); } .sm-legend .lg-sun { background: #fff8e6; }
.sm-status { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 80%; padding: 10px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; text-align: center; }
.smap .maplibregl-ctrl-top-right { top: 4px; right: 4px; }
.sm-chip > * { min-width: 0; } .sm-chip .smc-st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-3d { font: 700 12px/1 "Inter", system-ui, sans-serif !important; color: #16202e !important; }
.sm-3d[aria-pressed="true"] { color: var(--accent) !important; }
@media (pointer: coarse) { .smap .maplibregl-ctrl-group button { width: 40px; height: 40px; } }

.sm-time { border-top: 1px solid var(--line); padding: 6px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.sm-path { height: 92px; touch-action: none; cursor: grab; outline: none; border-radius: 8px; }
.sm-path:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.sm-path:active { cursor: grabbing; }
.smp-svg { display: block; overflow: visible; }
.smp-fill { fill: rgba(245, 179, 1, .14); }
.smp-curve { fill: none; stroke-width: 2; stroke-linecap: round; }
.smp-curve.day { stroke: #e7a500; } .smp-curve.night { stroke: #94a3b8; stroke-dasharray: 3 4; opacity: .7; }
.smp-horizon { stroke: var(--line); stroke-width: 1.5; }
.smp-tick { stroke: var(--muted); stroke-width: 1.5; }
.smp-drop { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }
.smp-dot { fill: var(--muted); }
.smp-dir { fill: var(--muted); font: 600 10px "Inter", system-ui, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.smp-lbl { fill: var(--muted); font: 500 11px "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.smp-now { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 3; }
.smp-nowlbl { fill: var(--accent); font: 600 10.5px "Inter", system-ui, sans-serif; }
.smp-glow { fill: rgba(245, 179, 1, .25); } .smp-sun { fill: #f5b301; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.smp-moonbg { fill: rgba(148, 163, 184, .25); } .smp-moon { fill: #e2e8f0; stroke: #64748b; stroke-width: 1.2; }
.sm-btns { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sm-play { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; font-size: 13px; line-height: 1; }
.sm-play::before { content: '▶'; } .sm-play[aria-pressed="true"]::before { content: '❚❚'; font-size: 11px; }
.sm-play[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.sm-step { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.sm-step button { border: 0; background: var(--bg); color: var(--text); padding: 7px 13px; font: 600 13px "Inter", system-ui, sans-serif; cursor: pointer; font-variant-numeric: tabular-nums; }
.sm-step button + button { border-left: 1px solid var(--line); }
.sm-step button:hover { color: var(--accent); }

/* phones and tablets: the map as a full-screen sheet */
.smap.sm-full { position: fixed; inset: 0; z-index: 1200; margin: 0; border: 0; border-radius: 0; height: 100dvh; }
.smap.sm-full .sm-head { padding-top: max(10px, env(safe-area-inset-top)); }
.smap.sm-full .sm-map { height: 100%; }
.smap.sm-full .sm-time { padding: 8px 20px max(16px, calc(env(safe-area-inset-bottom) + 8px)); }   /* phone: the play and step buttons well clear of the screen's edges */
@media (pointer: coarse) { .sm-play { width: 44px; height: 44px; } .sm-step button { padding: 11px 17px; font-size: 14px; } }   /* finger-sized */
body.sm-noscroll { overflow: hidden; }


/* ================= Kjørevær (js/route.js) ================= */
:root { --kv-dry: #cfe9d4; --kv-damp: #9fd3cf; --kv-fog: #b8c2cf; --kv-wet: #7fb2f5; --kv-heavy: #2f6fd6; --kv-sleet: #a78bfa; --kv-snow: #e0f2fe; --kv-ice: #e11d48; --kv-thunder: #f59e0b;
  --kv-elev: #e7ecf3; --kv-elev-line: #b8c4d6; --kv-temp: #e4572e; --kv-zero: #0ea5e9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --kv-dry: #25523a; --kv-damp: #1f7a7a; --kv-fog: #4b5563; --kv-wet: #2f5f9e; --kv-heavy: #5b8def; --kv-snow: #cbe7f7; --kv-elev: #1c2a3d; --kv-elev-line: #34465f; --kv-temp: #ff7a52; } }
:root[data-theme="dark"] { --kv-dry: #25523a; --kv-damp: #1f7a7a; --kv-fog: #4b5563; --kv-wet: #2f5f9e; --kv-heavy: #5b8def; --kv-snow: #cbe7f7; --kv-elev: #1c2a3d; --kv-elev-line: #34465f; --kv-temp: #ff7a52; }
.kvc-dry { background: var(--kv-dry); fill: var(--kv-dry); } .kvc-damp { background: var(--kv-damp); fill: var(--kv-damp); } .kvc-fog { background: var(--kv-fog); fill: var(--kv-fog); }
.kvc-wet { background: var(--kv-wet); fill: var(--kv-wet); } .kvc-heavy { background: var(--kv-heavy); fill: var(--kv-heavy); }
.kvc-sleet { background: var(--kv-sleet); fill: var(--kv-sleet); } .kvc-ice { background: var(--kv-ice); fill: var(--kv-ice); }
.kvc-thunder { background: var(--kv-thunder); fill: var(--kv-thunder); }
.kvc-snow { background: var(--kv-snow); fill: var(--kv-snow); box-shadow: inset 0 0 0 1px #7dd3fc; stroke: #7dd3fc; stroke-width: 1.5; }
.kv { max-width: 1240px; margin: 0 auto; }
.kv-h1 { font-size: 24px; margin: 4px 0 2px; }
.kv-lead { color: var(--muted); margin: 0 0 14px; }
.kv-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .kv-grid { grid-template-columns: minmax(0, 1fr); } }
.kv-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kv .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; }
.kv h2 { font-size: 15px; margin: 0 0 8px; }
.kv-ab { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; }
.kv-ab .kv-swap { grid-column: 2; grid-row: 1 / span 2; }
.kv-field { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 6px 4px 10px; background: var(--bg); min-height: 42px; }
.kv-field > b { font-size: 12px; color: var(--muted); font-weight: 600; min-width: 26px; }
.kv-field input { border: 0; background: none; font: inherit; color: var(--text); width: 100%; min-width: 0; outline: none; padding: 6px 0; }
.kv-field .results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1200; }
#kvViaBox, #kvVias .kv-field, #tvViaBox, #tvVias .kv-field { margin-top: 6px; }
.kv-viarow span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-geo, .kv-swap, .kv-x { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 9px; cursor: pointer; font: inherit; touch-action: manipulation; }
.kv-geo { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; flex: none; }
.kv-geo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.kv-swap { width: 40px; height: 40px; font-size: 18px; }
.kv-x { width: 30px; height: 30px; padding: 0; font-size: 17px; line-height: 1; flex: none; }
.kv-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.tv-segs { display: flex; flex-wrap: wrap; gap: 0 28px; align-items: start; }   /* the two-way choices side by side when the form is wide, each at its natural width */
.tv-segs > .kv-row { flex: 0 0 auto; max-width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; }   /* label above its control, so a row is only as wide as the control */
.tv-segs .kv-seg { flex: none; }
.tv-segs .kv-seg button { white-space: nowrap; }
.kv-lbl { font-size: 12.5px; color: var(--muted); width: 100%; }
.kv-days { display: flex; gap: 6px; flex-wrap: wrap; }
.kv-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kv-seg button { border: 0; background: var(--panel); color: var(--text); padding: 8px 14px; cursor: pointer; font: inherit; touch-action: manipulation; }
.kv-seg button.on { background: var(--accent); color: #fff; }
.kv-chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 7px 13px; cursor: pointer; font: inherit; font-size: 14px; touch-action: manipulation; }
.kv-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.kv-chip.small { padding: 3px 10px; font-size: 13px; }
#kvHour { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; }
.kv-status { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--muted); }
.kv-status.err { color: var(--bad); border-color: var(--bad); }
.kv-status .spinner { width: 18px; height: 18px; border-width: 2px; flex: none; }
#kvResult { display: flex; flex-direction: column; gap: 12px; }
#kvResult[hidden] { display: none !important; }
.kv-dep { display: flex; align-items: flex-end; gap: 2px; height: 56px; overflow-x: auto; padding: 2px 2px 2px; }
.kv-dep button { flex: 1 0 4px; min-width: 4px; max-width: 12px; border: 0; border-radius: 3px 3px 0 0; padding: 0; cursor: pointer; touch-action: manipulation; }
.kv-dep button.sel { outline: 2px solid var(--text); outline-offset: 1px; }
.kv-dsep { flex: 0 0 1px; align-self: stretch; background: var(--line); margin: 0 3px; }
.kv-depaxis { display: flex; font-size: 11.5px; color: var(--muted); margin-top: 3px; padding: 0 2px; }
.kv-depsure { display: flex; align-items: center; gap: 6px; margin: 4px 2px 0; font-size: 11px; color: var(--muted); }   /* certainty along the bars: firm on the left, fading to the right */
.kv-depsure i { flex: 1; height: 2px; position: relative; background: linear-gradient(90deg, var(--muted), color-mix(in srgb, var(--muted) 15%, transparent)); }
.kv-depsure i::before { content: ''; position: absolute; left: -1px; top: 50%; width: 7px; height: 7px; border-left: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg); }   /* the arrow points back to now */
.kv-depsure span:first-child { color: var(--text); }
.kv-depaxis span { flex: 1; min-width: 0; text-align: center; white-space: nowrap; }   /* placed under its day's bars by depAxis; a short day's label may overhang */
.kv-dephint { font-size: 13px; margin-top: 6px; }
.kv-cards { display: flex; flex-direction: column; gap: 10px; }
.kv-rc { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; border: 2px solid transparent !important; }
.kv-rc.sel { border-color: var(--accent) !important; }
.kv-rc > span { display: block; }
.kv-rc-top { display: flex !important; justify-content: space-between; gap: 8px; align-items: baseline; }
.kv-rc-meta { color: var(--muted); font-size: 13px; margin-top: 1px; }
.kv-verdict { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.kv-verdict.best { background: #dcfce7; color: #166534; } .kv-verdict.ok { background: var(--summary); color: var(--accent-2); } .kv-verdict.bad { background: #fee2e2; color: #991b1b; }
.kv-mini { display: flex !important; height: 12px; border-radius: 6px; overflow: hidden; margin: 8px 0 6px; border: 1px solid var(--line); }
.kv-mini i { display: block; height: 100%; }
.kv-badges { display: flex !important; gap: 6px; flex-wrap: wrap; }
.kv-badge { font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 7px; background: var(--bg); }
.kv-badge.warn { border-color: #f59e0b; background: #fff7e6; color: #92400e; }
.kv-badge.ice { border-color: #e11d48; background: #fff1f2; color: #9f1239; font-weight: 600; }
.kv-why { font-size: 13.5px; margin-top: 6px; }
@media (max-width: 600px) { .kv-rc:not(.sel) .kv-badge:nth-child(n+3), .kv-rc:not(.sel) .kv-why { display: none !important; } }
.kv-chart { width: 100%; display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.kv-elev { fill: var(--kv-elev); stroke: var(--kv-elev-line); }
.kv-temp { fill: none; stroke: var(--kv-temp); stroke-width: 2.4; stroke-linejoin: round; } .kv-temp-t { fill: var(--kv-temp); }
.kv-zero { stroke: var(--kv-zero); stroke-width: 1.5; stroke-dasharray: 5 4; } .kv-zero-t { fill: var(--kv-zero); }
.kv-halo { fill: var(--kv-ice); opacity: .18; }
.kv-cur { stroke: var(--text); stroke-width: 1.5; }
.kv-read { font-size: 13.5px; min-height: 20px; margin-top: 4px; }
.kv-slick { color: var(--kv-ice); }
.kv-legend { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.kv-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; border: 1px solid var(--line); }
.kv-legend .kv-l-temp { background: var(--kv-temp); } .kv-legend .kv-l-elev { background: var(--kv-elev); }
.kv-map { border-radius: 14px; border: 1px solid var(--line); }   /* no z-index: a popup inside the map (webcam, street view) must be able to lie over the map buttons beside it */
.kv-xing { display: inline-block; padding: 1px 6px; border-radius: 99px; font: 700 12px/18px system-ui, sans-serif; color: #fff; white-space: nowrap; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.kv-xing.down { background: #2563eb; } .kv-xing.up { background: #ea580c; }   /* below zero blue, above zero orange */
.kv-map .maplibregl-marker.kv-xingmk { z-index: 1; }   /* above the pass tops and the route's other marks, under the map buttons (2) */
.kv-xingmk { cursor: pointer; display: flex; align-items: center; justify-content: center; background: none; border: 0; }
.kv-xingmk:focus-visible .kv-xing { outline: 2px solid var(--accent); outline-offset: 2px; }
.kv-xingpop .kv-sv-head .kv-xing { margin-right: 8px; border-color: transparent; box-shadow: none; }
.kv-mk { font-size: 20px; line-height: 22px; text-align: center; text-shadow: 0 0 3px #fff; }
.kv-abm { display: flex !important; align-items: center; justify-content: center; width: 22px !important; height: 22px !important; background: var(--accent); color: #fff; border-radius: 50%; font: 700 12px/1 Inter, system-ui, sans-serif; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); padding: 0 0 1px; }   /* the letter in the middle of the circle */
.kv-it { list-style: none; margin: 0; padding: 0; }
.kv-it li { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: start; }
.kv-it li:last-child { border-bottom: 0; }
.kv-it small { color: var(--muted); display: block; }
.kv-it small.kv-part { display: inline; font-size: .8em; font-variant-numeric: tabular-nums; }
.kv-itwhen { margin: -4px 0 6px; color: var(--muted); font-size: .9em; }
.kv-chev { cursor: default; }
.kv-clk { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; padding-top: 1px; }
.kv-rd { display: inline-block; font-weight: 700; font-size: 12px; border-radius: 5px; padding: 0 6px; margin-right: 6px; color: #fff; background: #16803c; }
.kv-rd.rv { background: #d4a017; color: #111; } .kv-rd.fv { background: #f5f5f4; color: #111; border: 1px solid #a8a29e; }
.kv-wx { font-size: 12.5px; text-align: right; white-space: nowrap; }
.kv-pass { display: inline-block; margin-top: 3px; font-size: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 1px 7px; text-decoration: none; }
.kv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.kv-actions .btn { text-decoration: none; touch-action: manipulation; }
.kv-saved { list-style: none; margin: 0; padding: 0; }
.kv-saved li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv-saved li:last-child { border-bottom: 0; }
.kv-saved small { color: var(--muted); display: block; font-size: 12.5px; }
.kv-saved .kv-empty { color: var(--muted); font-size: 14px; }
.kv-sv-act { display: flex; gap: 6px; align-items: center; flex: none; }
.kv-source { font-size: 12px; color: var(--muted); margin: 0; }
.kv-toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 9px 15px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 3000; }
.kv-toast.on { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-verdict.best { background: #14532d; color: #bbf7d0; } :root:not([data-theme="light"]) .kv-verdict.bad { background: #7f1d1d; color: #fecaca; }
  :root:not([data-theme="light"]) .kv-badge.warn { background: #3a2a0c; color: #fcd34d; } :root:not([data-theme="light"]) .kv-badge.ice { background: #3b0d18; color: #fda4af; } }
:root[data-theme="dark"] .kv-verdict.best { background: #14532d; color: #bbf7d0; } :root[data-theme="dark"] .kv-verdict.bad { background: #7f1d1d; color: #fecaca; }
:root[data-theme="dark"] .kv-badge.warn { background: #3a2a0c; color: #fcd34d; } :root[data-theme="dark"] .kv-badge.ice { background: #3b0d18; color: #fda4af; }
/* Kjørevær: the map on top, with a larger / smaller toggle like the other maps */
.kv-maptop:not(:empty) { margin-bottom: 14px; }
.kv-mapwrap { position: relative; }
.kv-mapwrap .kv-bigbtn { position: absolute; top: 10px; right: 10px; z-index: 800; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.kv-mapwrap .kv-cambtn { top: 46px; }
.kv-cambtn.busy { opacity: .6; cursor: progress; }
.kv-bigbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--accent); border-radius: 999px; padding: 5px 12px 5px 10px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; touch-action: manipulation; }
.kv-bigbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kv-bigbtn:hover { border-color: var(--accent); }
.kv-bigbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .kv-bigbtn[aria-pressed="true"] { color: #0b1220; }
.kv-map { height: 380px; }
@media (max-width: 900px) { .kv-map { height: 280px; } }
.kv-maptop .kv-chartcard { margin-top: 10px; }
/* chart rows and the legend that explains them */
.kv-gustbar { fill: #d97706; } .kv-darkbar { fill: #475569; }
.kv-alertmk { fill: #dc2626; }
.kv-hatch { fill: var(--muted); opacity: .55; }
.kv-xmk { fill: var(--panel); stroke-width: 2; } .kv-xmk.down { stroke: var(--kv-zero); } .kv-xmk.up { stroke: var(--kv-temp); }
.kv-xmk-t { fill: var(--text); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.kv-snowmark { fill: #0369a1; }
.kv-legend { flex-direction: column; gap: 4px; }
.kv-lg-row { display: flex; gap: 4px 12px; flex-wrap: wrap; }
.kv-lg-off { opacity: .45; }
.kv-legend .kv-l-zero { width: 16px; height: 0; border: 0; border-top: 2px dashed var(--kv-zero); border-radius: 0; vertical-align: 3px; }
.kv-legend .kv-l-temp { width: 16px; height: 3px; border: 0; border-radius: 2px; vertical-align: 3px; }
.kv-legend .kv-l-x { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--kv-zero); background: var(--panel); }
.kv-legend .kv-l-halo { border-radius: 50%; border: 0; background: var(--kv-ice); opacity: .35; }
.kv-legend .kv-l-gust { width: 16px; height: 6px; border: 0; border-radius: 2px; background: #d97706; vertical-align: 1px; }
.kv-legend .kv-l-dark { width: 16px; height: 6px; border: 0; border-radius: 2px; background: #475569; vertical-align: 1px; }
.kv-legend .kv-l-ferry { width: 16px; background: repeating-linear-gradient(45deg, var(--muted) 0 2px, transparent 2px 5px); opacity: .7; }
.kv-legend .kv-l-alert { width: 0; height: 0; border: 0; border-radius: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid #dc2626; }
.kv-legend .kv-l-tick { width: 1px; height: 12px; border: 0; border-radius: 0; background: var(--muted); vertical-align: -2px; margin: 0 6px 0 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-darkbar { fill: #94a3b8; } :root:not([data-theme="light"]) .kv-legend .kv-l-dark { background: #94a3b8; } :root:not([data-theme="light"]) .kv-snowmark { fill: #0c4a6e; } }
:root[data-theme="dark"] .kv-darkbar { fill: #94a3b8; } :root[data-theme="dark"] .kv-legend .kv-l-dark { background: #94a3b8; } :root[data-theme="dark"] .kv-snowmark { fill: #0c4a6e; }
/* Kjørevær: save / delete / share dialog (instead of the browser's prompt and confirm) */
.kv-dlg { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px 18px; background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(15, 30, 60, .3); }
.kv-dlg::backdrop { background: rgba(13, 20, 32, .45); }
.kv-dlg h2 { margin: 0 0 6px; font-size: 18px; }
.kv-dlg-text { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.kv-dlg input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.kv-dlg input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.kv-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.kv-dlg-actions .btn { min-width: 92px; padding: 9px 16px; border-radius: 10px; font-weight: 600; touch-action: manipulation; }
.kv-dlg-actions .btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
/* Kjørevær: the calculation starts with this button, never by itself */
.kv-go { width: 100%; margin-top: 12px; padding: 11px 16px; border-radius: 10px; font-weight: 700; font-size: 15px; touch-action: manipulation; }
.kv-go:disabled { opacity: .5; cursor: default; }
.kv-go.busy { opacity: .7; pointer-events: none; }
.kv-status.info { color: var(--accent-2); border-color: var(--accent); background: var(--summary); }
.kv-isstale .kv-depcard, .kv-isstale .kv-cards, .kv-isstale .kv-chartcard, .kv-isstale .kv-itcard { opacity: .45; filter: grayscale(.4); pointer-events: none; }
.kv-isstale .kv-map .leaflet-overlay-pane, .kv-isstale .kv-map .leaflet-marker-pane { opacity: .35; }   /* the old route fades; the map itself stays usable */

/* the legend folds away so the chart and the map fit on one screen */
.kv-lgdet { margin-top: 6px; }
.kv-lgdet > summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; }
.kv-lgdet > summary::-webkit-details-marker { display: none; }
.kv-lgdet > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.kv-lgdet[open] > summary::before { transform: rotate(45deg); }
.kv-lgdet .hint { margin: 6px 0 0; }
@media (max-width: 900px) { .kv-chartcard { padding: 10px 12px; } .kv-chartcard h2 { font-size: 14px; margin-bottom: 4px; } .kv-read { font-size: 13px; } }
/* Kjørevær on MapLibre: markers, the faded old route, controls clear of the size button */
.kv-map .maplibregl-marker.kv-mk { font-size: 20px; line-height: 22px; text-shadow: 0 0 3px #fff; cursor: default; }
.kv-map .maplibregl-marker.kv-abm { width: 22px; height: 22px; }
.kv-topmk { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #111; cursor: default; }
.kv-curmk { width: 14px; height: 14px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); pointer-events: none; }
.kv-isstale .kv-map .maplibregl-marker { opacity: .35; }
.kv-map .maplibregl-popup-content { font: 600 12.5px Inter, system-ui, sans-serif; padding: 5px 9px; color: #16202e; }
.kv-map .sm-3d { font-weight: 700; font-size: 12px; }
/* Kjørevær: open the route in a navigation app */
.kv-open { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.kv-open-lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.kv-open-links { display: flex; gap: 8px; flex-wrap: wrap; }
.kv-navbtn { text-decoration: none; color: var(--text); font-weight: 600; touch-action: manipulation; }
.kv-open-note { margin: 6px 0 0; }
/* Kjørevær: route options (avoid ferries, avoid the dark, bendy roads on a motorcycle) */
.kv-opts { margin-top: 8px; }
.kv-opt { font-size: 13.5px; padding: 6px 12px; }
.kv-opt::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 1.5px solid currentColor; border-radius: 3px; opacity: .7; }
.kv-opt.on::before { content: '✓'; opacity: 1; display: inline-grid; place-items: center; background: #fff; border-color: #fff; color: var(--accent); font: 800 11px/1 Inter, system-ui, sans-serif; }   /* a real tick, clearly different from an empty box */
.kv-badge.bend { border-color: #a78bfa; background: #f5f3ff; color: #5b21b6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-badge.bend { background: #2e1065; color: #ddd6fe; } }
:root[data-theme="dark"] .kv-badge.bend { background: #2e1065; color: #ddd6fe; }
/* the chart readout keeps a fixed height: two lines that are cut, never wrapped, so scrubbing never moves the page */
.kv-read { height: calc(2 * 1.45em); overflow: hidden; line-height: 1.45; }
.kv-read .kv-r1, .kv-read .kv-r2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Kjørevær search: street addresses show the street and number, with postcode and town under it */
.results li.kv-hit { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.results li.kv-hit b { font-weight: 600; }
.results li.kv-hit small { display: block; color: var(--muted); font-size: 12px; }
.kv-kind { flex: none; font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px; }
.kv-kind.street { color: #92400e; border-color: #f59e0b; } .kv-kind.addr { color: #166534; border-color: #86efac; }
/* Kjørevær: Street View popup on the route, and its full-screen layer */
.kv-svpop .maplibregl-popup-content, .kv-svpop .leaflet-popup-content-wrapper { padding: 8px; border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.kv-svpop .leaflet-popup-content { margin: 0; }
.kv-svpop .maplibregl-popup-close-button { font-size: 18px; width: 26px; height: 26px; right: 2px; top: 2px; color: var(--muted); }
.kv-sv { width: min(320px, 78vw); font-size: 13px; }
.kv-sv-head { padding: 0 24px 6px 2px; }
.kv-sv-body { height: 200px; border-radius: 8px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.kv-sv-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.kv-sv-msg { color: var(--muted); padding: 12px; text-align: center; }
.kv-sv-consent { padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.kv-sv-consent p { margin: 0; color: var(--muted); line-height: 1.4; }
.kv-sv-consent label { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.kv-sv-ctl { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.kv-sv-ctl button { width: 34px; height: 30px; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 8px; cursor: pointer; font-size: 15px; touch-action: manipulation; }
.kv-sv-ctl button:hover { border-color: var(--accent); }
.kv-sv-ctl a, .kv-sv-link { margin-left: auto; font-weight: 600; font-size: 12.5px; text-decoration: none; }
.kv-sv-meta { color: var(--muted); font-size: 12px; margin-top: 4px; min-height: 1em; }
.kv-svfull { position: fixed; inset: 0; z-index: 5000; background: #000; display: flex; flex-direction: column; }
.kv-svfull iframe { flex: 1; width: 100%; border: 0; }
.kv-svfull .kv-sv-ctl { margin: 0; padding: 8px 12px max(8px, env(safe-area-inset-bottom)); background: var(--panel); }
.kv-svfull .kv-sv-ctl .kv-svfull-x { width: auto; padding: 0 12px; font-size: 14px; font-weight: 600; }
body.kv-noscroll { overflow: hidden; }
.kv-svsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4500; background: var(--panel); color: var(--text); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .3); padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
.kv-svsheet .kv-sv { width: 100%; }
.kv-svsheet .kv-sv-body { height: min(240px, 34vh); }
.kv-svsheet-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 15px; cursor: pointer; }
/* Kjørevær Street View popup, the intelmap way: a clean still image, arrows on its sides, click for full screen */
.kv-sv-shot { position: relative; width: 100%; height: 100%; cursor: zoom-in; background: #1e293b; }
.kv-sv-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s; user-select: none; -webkit-user-select: none; }
.kv-sv-shot.loading img { opacity: .55; }
.kv-sv-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 52px; border: 0; border-radius: 10px; background: rgba(15, 23, 42, .55); color: #fff; font: 700 26px/1 Inter, system-ui, sans-serif; cursor: pointer; touch-action: manipulation; }
.kv-sv-arrow:hover { background: rgba(15, 23, 42, .8); }
.kv-sv-arrow.l { left: 8px; } .kv-sv-arrow.r { right: 8px; }
.kv-sv-attr { position: absolute; left: 8px; bottom: 6px; font-size: 10.5px; color: #fff; text-shadow: 0 0 3px #000; pointer-events: none; }
.kv-sv-zoom { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 7px; background: rgba(15, 23, 42, .55); color: #fff; display: grid; place-items: center; font-size: 14px; pointer-events: none; }
.kv-svfull-stage { flex: 1; display: flex; align-items: center; justify-content: center; background: #0b1220; }
.kv-svfull-stage iframe { width: 100%; height: 100%; border: 0; }
.kv-svfull-stage .kv-sv-consent { color: #e6edf7; max-width: 420px; }
.kv-svfull-hint { color: var(--muted); font-size: 13px; }
/* Kjørevær before the first route: only the form, saved routes and the map */
.kv-noroute #kvChartCard, .kv-noroute .kv-itcard, .kv-noroute #kvSource { display: none; }
/* before the first route the map has nothing to show either: one centred column with the form and saved routes */
.kv-noroute #kvMapWrap, .kv-noroute .kv-main { display: none; }
.kv-noroute .kv-grid { grid-template-columns: minmax(0, 520px); justify-content: center; }
.kv-noroute .kv-h1, .kv-noroute .kv-lead { text-align: center; }
/* "for now, Norway only" under the intro */
.kv-scope { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 14px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--summary); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 8px; }
.kv-scope-flag { width: 20px; height: 14px; border-radius: 2px; flex: none; background:
  linear-gradient(90deg, transparent 7px, #00205b 7px, #00205b 9px, transparent 9px), linear-gradient(transparent 6px, #00205b 6px, #00205b 8px, transparent 8px),
  linear-gradient(90deg, transparent 6px, #fff 6px, #fff 10px, transparent 10px), linear-gradient(transparent 5px, #fff 5px, #fff 9px, transparent 9px), #ba0c2f;   /* the blue cross on top of the white */
  background-blend-mode: normal; }
.kv-noroute .kv-scope { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }
.kv-narrow { display: block; margin-top: 3px; font-size: 12px; color: #92400e; }
/* "Smale veier": what avoiding cost, or why not, with the way to the fastest route */
.kv-narnote { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, var(--bg)); }
.kv-narnote .kv-chip { margin-left: 6px; vertical-align: baseline; }
.kv-nargap { color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-narrow { color: #fcd34d; } }
:root[data-theme="dark"] .kv-narrow { color: #fcd34d; }
/* phone panel: the close button gets its own room above the photo */
.kv-svsheet { padding-top: 10px; }
.kv-svsheet .kv-sv-head { min-height: 40px; display: flex; align-items: center; padding-right: 52px; padding-bottom: 6px; }
.kv-svsheet-x { top: 8px; right: 12px; width: 36px; height: 36px; }
/* full screen: the bar's buttons clear of the screen edges and the home indicator, finger-sized */
.kv-svfull .kv-sv-ctl { padding: 10px max(18px, env(safe-area-inset-right)) max(18px, calc(env(safe-area-inset-bottom) + 10px)) max(18px, env(safe-area-inset-left)); gap: 12px; }
.kv-svfull .kv-sv-ctl .kv-svfull-x { min-height: 44px; padding: 0 16px; font-size: 15px; }
.kv-svfull .kv-sv-ctl a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; font-size: 15px; }
@media (max-width: 480px) { .kv-svfull-hint { display: none; } }
.kv-sv-dir { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 99px; background: rgba(15, 23, 42, .62); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
/* itinerary stages: click to show on the map */
.kv-it li.kv-stage { cursor: pointer; border-radius: 8px; transition: background .15s; }
.kv-it li.kv-stage:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.kv-it li.kv-stage.on { background: color-mix(in srgb, #facc15 22%, transparent); }
.kv-it li.kv-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.kv-stage-pulse { animation: kvPulse 2.2s ease-in-out infinite; }
@keyframes kvPulse { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .kv-stage-pulse { animation: none; } }
/* departure strip: always fits, the best bar marked, a clear suggestion box */
.kv-dep { overflow: visible; padding-top: 12px; height: 68px; }
.kv-dep button { flex: 1 1 0; min-width: 2px; max-width: 12px; position: relative; }
.kv-dep button.best::after { content: '★'; position: absolute; z-index: 3; left: 50%; top: -16px; transform: translateX(-50%); font-size: 14px; line-height: 1; color: #f59e0b; text-shadow: 0 0 2px var(--panel), 0 1px 2px rgba(0, 0, 0, .35); }   /* the bars further out are paled by mixing their colour, not by opacity, so the star stays bright */
.kv-best { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line)); background: color-mix(in srgb, var(--good) 9%, var(--panel)); }
.kv-best-txt { flex: 1 1 180px; min-width: 0; }
.kv-best.wait { border-color: var(--line); background: var(--panel); color: var(--muted); font-size: 13.5px; gap: 10px; flex-wrap: nowrap; align-items: flex-start; }
.kv-best.wait > span:last-child { flex: 1 1 auto; min-width: 0; }
.kv-best.wait .spinner { margin-top: 2px; }   /* the other routes or the models still coming */
.kv-rc.wait { cursor: default; opacity: .75; }
.kv-ensfail { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.kv-rc.wait .kv-verdict { color: var(--muted); background: none; display: inline-flex; align-items: center; gap: 6px; }
.kv-rc.wait .kv-mini { background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 12px); }
.kv-best-txt b { display: block; font-size: 14.5px; }
.kv-best-txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.kv-best-txt .kv-best-l { color: var(--text); font-weight: 600; }   /* which departure the line is about: the best one, or the one you chose */
.kv-best-go { white-space: nowrap; padding: 9px 16px; border-radius: 10px; font-weight: 700; touch-action: manipulation; }
.kv-best.ok { border-color: var(--line); background: var(--bg); color: var(--muted); font-size: 13.5px; }
.kv-best.ok b { font-weight: 600; }
.kv-dephelp { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }

.kv-opt::before { vertical-align: middle; position: relative; top: -1px; }
/* labels on the alternative routes: the time against the chosen route; under the street view popup */
.kv-altlabel { padding: 2px 8px; border-radius: 99px; border: 1px solid rgba(15, 23, 42, .25); background: #fff; color: #0f172a; font: 700 11.5px/1.3 Inter, system-ui, sans-serif; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: pointer; z-index: 1 !important; }
.kv-altlabel:hover { border-color: var(--accent); }
.kv-isstale .kv-altlabel { opacity: .35; }
.kv-map .maplibregl-popup { z-index: 10; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-altlabel { background: #1e293b; color: #e2e8f0; border-color: #475569; } }
:root[data-theme="dark"] .kv-altlabel { background: #1e293b; color: #e2e8f0; border-color: #475569; }
.leaflet-tooltip.kv-altlabel-lf { font-weight: 700; font-size: 11.5px; padding: 1px 7px; border-radius: 99px; }
/* the chosen route's label: filled, so it stands apart from the alternatives' */
.kv-altlabel.sel { background: var(--accent); border-color: var(--accent); color: #fff; cursor: default; }
:root[data-theme="dark"] .kv-altlabel.sel { color: #0b1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-altlabel.sel { background: #5b9bff; border-color: #5b9bff; color: #0b1220; } }
@media (max-width: 600px) { .kv-altlabel { font-size: 10.5px; padding: 1px 6px; } }
/* stage rows: room inside the highlight; the negative margin keeps the text where it was */
.kv-it li.kv-stage { padding-left: 10px; padding-right: 10px; margin-left: -10px; margin-right: -10px; }
/* chart row names: readable size and contrast */
.kv-lab { font: 600 11.5px Inter, system-ui, sans-serif; fill: var(--text); opacity: .78; }
.kv-lab.kv-zero-t { fill: var(--kv-zero); opacity: 1; }
.kv-lab.kv-temp-t { fill: var(--kv-temp); opacity: 1; }
/* Buy Me a Coffee: a plain link styled like their button (no third-party script; the text follows the language) */
.bmc-wrap { text-align: center; margin: 4px 0 14px; }
.bmc-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px 9px 14px; border-radius: 12px; background: var(--accent); color: #fff; border: 1.5px solid var(--accent); font: 700 15px/1 "Inter", system-ui, sans-serif; text-decoration: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); transition: transform .12s, box-shadow .12s; }
.bmc-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, .3); background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.bmc-btn svg { width: 22px; height: 22px; flex: none; }
.bmc-wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; }
.bmc-lead { font-size: 15px; color: var(--muted); font-weight: 500; }
/* the coffee is hot: two wisps of steam rise and fade, out of step; still with reduced motion */
.bmc-btn svg { overflow: visible; }
.bmc-steam { transform-box: fill-box; transform-origin: 50% 100%; animation: bmcSteam 2.6s ease-in-out infinite; opacity: 0; }
.bmc-steam.s2 { animation-delay: 1.3s; }
@keyframes bmcSteam { 0% { opacity: 0; transform: translateY(2px) scaleY(.8); } 35% { opacity: .9; } 70% { opacity: .5; } 100% { opacity: 0; transform: translateY(-3px) scaleY(1.1); } }
@media (prefers-reduced-motion: reduce) { .bmc-steam { animation: none; opacity: 1; transform: none; } }

/* Kjørevær: webcams and live road reports (Statens vegvesen DATEX) */
.kv-cammk { font-size: 15px; line-height: 22px; text-align: center; background: #334155; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); cursor: pointer; }
.kv-cammk.near { background: #2563eb; } .kv-cammk.off { opacity: .45; }
.kv-cam .kv-sv-shot { aspect-ratio: 16 / 9; height: auto; cursor: zoom-in; }
.kv-cam .kv-sv-shot img { object-fit: contain; background: #0b1220; }
.kv-cam .kv-sv-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; color: #e6edf7; }
.kv-campop { width: min(420px, 82vw); }
.kv-cam-dirs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kv-cam-dirs .kv-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .kv-cam-dirs .kv-chip[aria-pressed="true"] { color: #0b1220; }
.kv-camfull .kv-svfull-stage { padding: 12px; }
.kv-cam.big { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.kv-cam.big .kv-sv-shot { width: min(100%, calc((100vh - 140px) * 16 / 9)); cursor: default; }
.kv-cam.big .kv-cam-dirs { justify-content: center; }
.kv-cam.big .kv-cam-dirs .kv-chip { color: #e6edf7; border-color: #475569; background: #1e293b; }
.kv-cam.big .kv-cam-dirs .kv-chip[aria-pressed="true"] { background: #2563eb; border-color: #2563eb; color: #fff; }
.kv-evmk { width: 24px; height: 24px; line-height: 20px; font-size: 13px; text-align: center; border-radius: 50%; border: 2px solid #fff; background: #d97706; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: pointer; }
.kv-evmk.stop { background: #dc2626; } .kv-evmk.off { opacity: .5; }
.kv-ev { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: #92400e; }
.kv-ev.stop { color: #b91c1c; } .kv-ev.off { color: var(--muted); }
.kv-ev small { display: block; color: var(--muted); }
.kv-ev i { font-style: normal; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-ev { color: #fcd34d; } :root:not([data-theme="light"]) .kv-ev.stop { color: #fca5a5; } :root:not([data-theme="light"]) .kv-ev.off { color: var(--muted); } }
:root[data-theme="dark"] .kv-ev { color: #fcd34d; } :root[data-theme="dark"] .kv-ev.stop { color: #fca5a5; } :root[data-theme="dark"] .kv-ev.off { color: var(--muted); }
.kv-passrow { display: block; }
.kv-passok { font-size: 12px; color: #15803d; white-space: nowrap; }
:root[data-theme="dark"] .kv-passok { color: #86efac; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-passok { color: #86efac; } }
.kv-evpop { max-width: 360px; font-size: 13px; } .kv-evpop p { margin: 6px 0; }
.kv-map .maplibregl-popup.kv-svpop, .kv-map .leaflet-popup.kv-svpop { z-index: 900; }   /* over the map buttons */
.kv-cam .kv-sv-dir { top: auto; bottom: 8px; }   /* the cameras print their own name and time along the top */
.kv-cam .kv-sv-zoom { top: auto; bottom: 8px; }
.kv-wx .kv-roadfc { color: var(--muted); }
.kv-wx .kv-roadfc.bad { color: #b91c1c; font-weight: 600; }
:root[data-theme="dark"] .kv-wx .kv-roadfc.bad { color: #fca5a5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-wx .kv-roadfc.bad { color: #fca5a5; } }
.kv-evmore { margin-top: 4px; font-size: 12px; }
.kv-evmore summary { cursor: pointer; color: var(--muted); }
.kv-evmore summary:hover { color: var(--accent); }
/* Kjørevær: sights along the route */
.kv-sightmk { width: 24px; height: 24px; line-height: 20px; font-size: 13px; text-align: center; border-radius: 50%; border: 2px solid #16a34a; background: var(--panel); box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: pointer; }
.kv-sightmk.r3 { width: 28px; height: 28px; line-height: 24px; font-size: 16px; }
.kv-sightmk.dark { border-color: #475569; }
.kv-viastage { background: color-mix(in srgb, var(--accent) 9%, transparent); border-left: 3px solid var(--accent); }
.kv-viatag { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: #ea580c; color: #fff; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.kv-pausepick { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.kv-pausepick select { font: inherit; font-size: 14px; padding: 4px 6px; min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.kv-abm.kv-viamk { background: #ea580c; }
.kv-nofc { fill: #94a3b8; opacity: .55; }
.kv-nofc-t { fill: #fff; font-weight: 600; }
.kv-nofc-note { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); font-style: italic; }
.kv-viastage .kv-viaplace { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 0; }
.kv-viaplace svg, .kv-viakind svg { vertical-align: -2px; color: #1d4ed8; }
.kv-viakind { white-space: nowrap; }
.kv-viapop .kv-sv-head { display: flex; align-items: center; font-size: 18px; }
.kv-viapop .kv-pausepick, .kv-it .kv-viastage .kv-pausepick { display: flex; gap: 6px; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: nowrap; width: 100%; }
.kv-nofc-w { color: var(--muted); font-style: italic; }
.kv-pauseband { fill: #ea580c; opacity: .14; }
.kv-vialine { stroke: #ea580c; stroke-width: 2; }
.kv-vialab { fill: #ea580c; font-weight: 700; }
.kv-viadot { fill: #ea580c; stroke: #fff; stroke-width: 2; }
.kv-viadot-t { fill: #fff; font-weight: 700; }
.kv-restmk { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; background: #1d4ed8; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: pointer; vertical-align: middle; }
.kv-restmk.main { width: 26px; height: 26px; }
.kv-restpop .kv-restmk { box-shadow: none; cursor: default; }
.kv-restbtn svg { vertical-align: -2px; color: #1d4ed8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-restbtn svg { color: #93c5fd; } }
:root[data-theme="dark"] .kv-restbtn svg { color: #93c5fd; }
.kv-restfacts { margin: 6px 0; padding: 0; list-style: none; }
.kv-restfacts li { margin: 2px 0; }
.kv-sightpop .kv-sv-head, .kv-restpop .kv-sv-head { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.kv-restpop .kv-sv-head .kv-restmk { flex: none; }
.kv-sights { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 5px; }
.kv-sight { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.kv-sight:hover { border-color: #16a34a; }
.kv-sight i { color: var(--muted); font-style: normal; }
.kv-sights .kv-evmore { flex-basis: 100%; }
.kv-tvg { display: inline-block; margin-top: 5px; font-size: 13px; font-weight: 600; }
.kv-badge.tvg { border-color: #16a34a; background: #effaf2; color: #166534; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-badge.tvg { background: #0c2a17; color: #86efac; } }
:root[data-theme="dark"] .kv-badge.tvg { background: #0c2a17; color: #86efac; }
.kv-show { align-items: center; }
.kv-showlab { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
/* "Vis langs ruten": the display choices (no recalculation) in one section that opens; closed it says what is on */
.kv-showbox { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: color-mix(in srgb, var(--panel) 92%, var(--bg)); }
.kv-showbox summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; }
.kv-showbox summary::-webkit-details-marker { display: none; }
.kv-showbox summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kv-showbox-t { font-weight: 600; font-size: 15px; }
.kv-showbox-sum { grid-column: 1; color: var(--muted); font-size: 13px; }
.kv-showbox[open] .kv-showbox-sum { display: none; }
.kv-showbox-car { grid-row: 1 / span 2; grid-column: 2; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-135deg); margin-top: 4px; }   /* up while closed, down while open (as the summary bar on the map) */
.kv-showbox[open] .kv-showbox-car { transform: rotate(45deg); margin-top: -4px; }
.kv-showbox-body { padding: 0 12px 12px; }
.kv-showbox-body .kv-row { margin: 4px 0 8px; }
.kv-showbox-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.kv-break { flex-basis: 100%; height: 0; }
/* "Veibredde" with its limit: one pill, the switch in blue (on), the limit outlined in the same blue (a value to change) */
.kv-pair { display: inline-flex; align-items: stretch; }
.kv-pair .kv-chip.kv-pair-l { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.kv-pair-r { font: inherit; font-size: 13.5px; line-height: 1; margin: 0; padding: 0 28px 0 11px; border: 1px solid var(--accent); border-left: 0; border-radius: 0 999px 999px 0;
  color: color-mix(in srgb, var(--text) 82%, var(--muted)); background-color: color-mix(in srgb, var(--accent) 10%, var(--panel)); cursor: pointer; color-scheme: light;
  -webkit-appearance: none; appearance: none; background-repeat: no-repeat; background-size: 5px 5px; background-position: right 15px center, right 10px center;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); }   /* our own arrow: iOS draws none, Android a different one */
.kv-pair-r[hidden] { display: none; }
.kv-pair-r:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-pair-r { color-scheme: dark; border-color: color-mix(in srgb, var(--accent) 80%, #fff); background-color: color-mix(in srgb, var(--accent) 20%, var(--panel)); } }
:root[data-theme="dark"] .kv-pair-r { color-scheme: dark; border-color: color-mix(in srgb, var(--accent) 80%, #fff); background-color: color-mix(in srgb, var(--accent) 20%, var(--panel)); }   /* a step brighter on the dark card */
.kv-sgmore:disabled { opacity: .5; cursor: not-allowed; }
.kv-ens { display: block; color: #7c3aed; }
/* iPhone: a text field under 16 px makes Safari zoom in on focus and stay zoomed, which pushes fixed sheets past the edges */
@media (max-width: 760px) { .kv-field input { font-size: 16px; } }
/* the bottom sheet (Street View, webcams, road reports, sights): room at the sides, also beside the iPhone's rounded corners */
.kv-svsheet { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.kv-svsheet-x { top: 10px; right: max(14px, env(safe-area-inset-right)); }
/* a stage: road, km and weather on the first row; everything else on a second row across the whole width */
.kv-it li .kv-stmore { grid-column: 2 / -1; min-width: 0; margin-top: -4px; }
.kv-stmore > :first-child { margin-top: 0; }
/* the doubt: first on the second row, right-aligned under the weather */
.kv-stmore .kv-ens { text-align: right; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.kv-stmore .kv-roadest { display: block; text-align: right; font-size: 12px; color: var(--muted); margin-bottom: 2px; }   /* the wet-road estimate: may wrap */
.kv-stmore .kv-gripst { color: #b45309; }   /* MC under +5 °C: the warning colour of the other road warnings */
:root[data-theme="dark"] .kv-stmore .kv-gripst { color: #f59e0b; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-stmore .kv-gripst { color: #f59e0b; } }
@media (max-width: 700px) { .kv-it li .kv-stmore { grid-column: 1 / -1; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-ens { color: #c4b5fd; } }
:root[data-theme="dark"] .kv-ens { color: #c4b5fd; }

/* ---------------- Turvær (hiking): on top of the Kjørevær styles ---------------- */
.tv-clrow { margin: 0 0 10px; }
.tv-clbtn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.tv-clbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-clcaret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); flex: none; }
.tv-clbtn[aria-expanded="true"] .tv-clcaret { transform: translateY(2px) rotate(-135deg); }
.tv-clhint { margin: 0; font-size: 12.5px; }
.tv-reset { margin-left: auto; }   /* "Nullstill": the trip and its result go (js/turvaer.js) */
.tv-cl { margin: -4px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.tv-cl-regs { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.tv-cl-list { max-height: min(62vh, 560px); overflow: auto; overscroll-behavior: contain; }
.tv-cl-reg { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 12px 3px; }
.tv-clc { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; padding: 9px 12px 10px 10px; cursor: pointer; touch-action: manipulation; }
.tv-cl-list > :last-child { border-bottom: 0; }
.tv-clc:hover { background: var(--summary); }
.tv-clc.sel { border-left-color: var(--accent); background: var(--accent-faint); }
.tv-clc > span { display: block; }
.tv-clc > .tv-clc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tv-clc-top b { font-weight: 600; font-size: 15px; }
.tv-clc-sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.tv-clc-blurb { color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-gr { font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; }
.tv-gdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; background: #2f9e55; }   /* DNT's colours: green, blue, red, black */
.tv-gdot.b { background: #2b6fd6; } .tv-gdot.r { background: #d63b3b; } .tv-gdot.s { background: #222; box-shadow: 0 0 0 1px var(--line); }
.tv-near { margin-top: 6px; }
.tv-nearlist { list-style: none; margin: 4px 0 0; padding: 0; }
.tv-nearlist li { padding: 7px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.tv-nearlist li:last-child { border-bottom: 0; }
.tv-nearlist small { display: block; color: var(--muted); font-size: 12.5px; }
.tv-pacehelp { margin: 4px 0 0; }
.tv-hd-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 17px; }
.tv-facts { margin: 6px 0 2px; font-size: 14.5px; }
.tv-headline { margin: 10px 0 8px; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; line-height: 1.35; background: var(--summary); border: 1px solid var(--line); }
.tv-headline.good { border-color: var(--good); }
.tv-headline.mid { border-color: #f59e0b; background: #fff7e6; color: #92400e; }
.tv-headline.bad { border-color: #e11d48; background: #fff1f2; color: #9f1239; }
:root[data-theme="dark"] .tv-headline.mid { background: #3b2a08; color: #fcd34d; }
:root[data-theme="dark"] .tv-headline.bad { background: #3f0d1a; color: #fda4af; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tv-headline.mid { background: #3b2a08; color: #fcd34d; } :root:not([data-theme="light"]) .tv-headline.bad { background: #3f0d1a; color: #fda4af; } }
.tv-blurb { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.tv-blurb a { color: var(--accent); }
.tv-leg { margin-top: 3px; font-size: 13px; color: var(--muted); }
.tv-ty { font-size: 12px; color: var(--muted); font-weight: 400; }
.kv-wxdot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tv-fogbar { fill: #a855f7; }
.kv-legend .tv-l-fog { width: 16px; height: 6px; border: 0; border-radius: 2px; background: #a855f7; vertical-align: 1px; }
.tv-topmk { color: #111; text-shadow: 0 0 3px #fff; }
.kv-badge.cold { border-color: #38bdf8; }
.kv-badge.bad { border-color: #e11d48; background: #fff1f2; color: #9f1239; font-weight: 600; }
.kv-badge.ens { color: var(--kv-ens, #7c3aed); border-color: currentColor; }
.kv-map .maplibregl-marker.tv-dotmk { width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid #111; box-sizing: border-box; cursor: default; }
.kv-map .maplibregl-marker.tv-curmk { width: 14px; height: 14px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-sizing: border-box; box-shadow: 0 1px 3px rgba(0,0,0,.4); pointer-events: none; }
.kv-legend .tv-l-place { width: 0; height: 14px; border: 0; border-left: 2px dashed var(--muted); border-radius: 0; vertical-align: -3px; margin-right: 7px; }
.kv-legend .tv-l-top { width: auto; height: auto; border: 0; background: none; font-style: normal; font-size: 12px; color: var(--text); }
.kv-legend .tv-l-hour { width: 0; height: 14px; border: 0; border-left: 1.5px solid var(--line); border-radius: 0; vertical-align: -3px; margin-right: 7px; }
.kv-legend .tv-l-cur { width: 10px; height: 10px; border-radius: 50%; background: #2563eb; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tv-ret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; }
.tv-ret label { font-size: 13px; color: var(--muted); }
.tv-ret select { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.kv-it li.tv-pause { background: var(--summary); border-radius: 10px; padding: 8px 8px; margin: 2px -8px; }
.tv-pauseband { fill: var(--muted); opacity: .12; }
.tv-pauselab { fill: var(--text); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; font-weight: 600; }
.tv-retrow { align-items: center; } .tv-pauselbl { width: auto; } #tvPause { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.tv-sugg { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); } .tv-sugg .kv-badges { margin-top: 4px; }
.kv-map .maplibregl-marker.kv-altlabel { cursor: pointer; }
.tv-steepbar { fill: #b45309; } .tv-steepbar.hard { fill: #991b1b; }
.kv-legend .tv-l-steep { width: 16px; height: 6px; border: 0; border-radius: 2px; background: #b45309; vertical-align: 1px; } .kv-legend .tv-l-steep.hard { background: #991b1b; }
.kv-legend .tv-l-trk { width: 18px; height: 6px; border: 0; border-radius: 2px; background: repeating-linear-gradient(90deg, #fff 0 5px, #16a34a 5px 8px); box-shadow: 0 0 0 1px #0f172a66; vertical-align: 1px; }
.tv-steepfill { fill: #b45309; opacity: .35; } .tv-steepfill.hard { fill: #991b1b; opacity: .4; }
/* Turvær in winter: NVE's snow depth (api/snow.php) as a card under the chips, strokes on the profile, a dot on the day chips, a map layer */
:root { --tv-snowbar: #7fb3d9; --tv-snowtick: #1d4f7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tv-snowbar: #9cc3e6; --tv-snowtick: #1e3a5f; } }
:root[data-theme="dark"] { --tv-snowbar: #9cc3e6; --tv-snowtick: #1e3a5f; }
.tv-snowbox, .tv-waxbox { margin-top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }   /* the card and what it opens to, in one frame */
.tv-snowbox:has(.tv-snow:hover), .tv-waxbox:has(.tv-wax:hover) { border-color: var(--accent); }
.tv-snow, .tv-wax { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 44px; padding: 8px 34px 8px 12px; position: relative; text-align: left; font: inherit; color: var(--text); background: none; border: 0; border-radius: 10px; cursor: pointer; }
/* the site's drawn chevron (as .kv-showbox-car, .tv-clcaret): down while closed, up while open */
.tv-snow::after, .tv-wax::after { content: ''; position: absolute; right: 14px; top: 13px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.tv-snow[aria-expanded="true"]::after, .tv-wax[aria-expanded="true"]::after { transform: translateY(4px) rotate(-135deg); }
.tv-snow-l1, .tv-wax-l1 { font-weight: 600; font-size: 14px; line-height: 1.35; }
.tv-snow-l2, .tv-wax-l2 { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.tv-snow-x, .tv-wax-x { padding: 2px 12px 12px; font-size: 13.5px; }
.tv-snow-x p, .tv-wax-x p { margin: 6px 0 0; }
.tv-snow-x .kv-chip { margin-top: 8px; min-height: 36px; }
.tv-snow-strip { display: block; width: 100%; max-width: 400px; height: auto; }
.tv-snow-strip .tv-snow-bar { fill: var(--tv-snowbar); }
.tv-snow-strip .tv-snow-bar.on { stroke: var(--text); stroke-width: 1.5; }
.tv-snow-strip .fc { opacity: .55; }
.tv-snow-strip .tv-snow-tick { stroke: var(--tv-snowtick); stroke-width: 2; }
.tv-snow-strip .tv-snow-base { stroke: var(--line); }
.tv-snow-strip text { font-size: 9px; fill: var(--muted); }
.tv-snow-strip text.on, .tv-snow-strip .tv-snow-val { fill: var(--text); font-weight: 700; }
.tv-snow-strip .tv-snow-val { font-size: 10px; }
.tv-snow-x .tv-snow-cap { margin-top: 2px; font-size: 12px; color: var(--muted); }
.tv-snow-muted { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.tv-snow-x .tv-snow-muted, .tv-wax-x .tv-snow-muted { margin-top: 8px; font-size: 12.5px; }
.tv-snow-sim { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.tv-snowthin, .tv-snowbare { fill: none; stroke: var(--mid); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tv-snowbare { stroke: var(--bad); stroke-dasharray: 5 3; stroke-linecap: butt; }
.kv-legend .tv-l-snowthin, .kv-legend .tv-l-snowbare { width: 16px; height: 4px; border: 0; border-radius: 2px; background: var(--mid); vertical-align: 2px; }
.kv-legend .tv-l-snowbare { border-radius: 0; background: repeating-linear-gradient(90deg, var(--bad) 0 5px, transparent 5px 8px); }
.kv-chip.snow-thin::after, .kv-chip.snow-bare::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--mid); vertical-align: 2px; }
.kv-chip.snow-bare::after { background: var(--bad); }
.kv-chip.on.snow-thin::after, .kv-chip.on.snow-bare::after { box-shadow: 0 0 0 1.5px #fff; }
.tv-snowlg { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 4; width: min(340px, calc(100% - 104px)); padding: 4px 8px 2px; font-size: 11px; line-height: 1.25; color: var(--text); background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); pointer-events: none; }   /* a bar at the top of the map, between the compass and the switches: the verdict card holds the foot */
.tv-snowlg-t { font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-snowlg .tv-snow-sim { font-size: 10px; padding: 0 6px; }
.tv-snowlg-s { display: flex; height: 8px; margin-right: 18px; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.tv-snowlg-s i { flex: 1; }
.tv-snowlg-k { position: relative; height: 14px; margin-right: 18px; font-size: 11px; color: var(--muted); }
.tv-snowlg-k span { position: absolute; top: 0; transform: translateX(-50%); }
.tv-snowlg-k b { position: absolute; right: -18px; top: 0; font-weight: 400; }
.tv-picking .tv-snowlg { display: none; }
/* Turvær in winter, the option "Vis smøretips": the grip-wax card under the snow card, and "Smør om" on a stage. The wax colours are the
   makers' shared scale (hue-true; dark: lighter); klister is striped, so it is never told from hard wax by colour alone (its name is always beside) */
:root { --wax-green: #2e9e4f; --wax-blue: #1f4fbf; --wax-bluex: #3d8fe0; --wax-violet: #7b3fa0; --wax-red: #c8282d; --wax-yellow: #e3c21a; --wax-uni: #8a8f98; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wax-green: #3fbf66; --wax-blue: #5585ea; --wax-bluex: #62aaf2; --wax-violet: #a874d4; --wax-red: #e5585c; --wax-yellow: #e8c93a; --wax-uni: #a7adb6; } }
:root[data-theme="dark"] { --wax-green: #3fbf66; --wax-blue: #5585ea; --wax-bluex: #62aaf2; --wax-violet: #a874d4; --wax-red: #e5585c; --wax-yellow: #e8c93a; --wax-uni: #a7adb6; }
.tv-waxbox { margin-top: 6px; }
.tv-wax-l2 { margin-right: -22px; }   /* the chevron sits by the first line only: the second may use its room (two lines on a phone) */
.tv-wax-l2 .tv-wax-sw { width: 10px; height: 10px; margin-right: 4px; }
.tv-wax-sw { display: inline-block; flex: none; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line); border-radius: 3px; background: var(--c); }
.tv-wax-sw.k { background: repeating-linear-gradient(135deg, var(--c) 0 3px, var(--panel) 3px 5px); }
.tv-wax-row .tv-wax-sw + .tv-wax-sw { margin-left: -3px; }   /* a merged row: its classes side by side
.tv-wax-sw.w-kuni { border-color: var(--muted); }   /* grey stripes alone read as "disabled" */
.tv-wax .tv-snow-sim { background: var(--line); color: var(--text); font-size: 10px; padding: 0 6px; }   /* sim only: small and grey beside the colour swatches (the snow card's pill above is the warning) */
.w-green { --c: var(--wax-green); } .w-blue, .w-kblue { --c: var(--wax-blue); } .w-bluex { --c: var(--wax-bluex); } .w-violet, .w-kviolet { --c: var(--wax-violet); }
.w-red, .w-kred { --c: var(--wax-red); } .w-yellow { --c: var(--wax-yellow); } .w-kuni { --c: var(--wax-uni); }
.tv-wax-x .tv-wax-row { margin-top: 4px; }
.tv-wax-x .tv-wax-ex { font-size: 12.5px; color: var(--muted); }
.tv-wax-st { margin-top: 4px; font-size: 13px; }
.tv-grade { color: var(--muted); } .tv-grade.steep { color: #b45309; font-weight: 600; } .tv-grade.hard { color: #991b1b; font-weight: 700; }
:root[data-theme="dark"] .tv-grade.steep { color: #fbbf24; } :root[data-theme="dark"] .tv-grade.hard { color: #f87171; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tv-grade.steep { color: #fbbf24; } :root:not([data-theme="light"]) .tv-grade.hard { color: #f87171; } }
.kv-field .kv-geo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.tv-pickbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600; }
.tv-pickbar .kv-chip { background: #fff; color: var(--accent); border-color: #fff; }
.tv-pickbtns { display: flex; gap: 6px; flex: none; } .tv-pickbar .kv-chip.busy { opacity: .6; pointer-events: none; }
.kv-noroute.tv-picking .kv-main { display: flex; } .kv-noroute.tv-picking .kv-main > :not(#tvMapWrap) { display: none; } .kv-noroute.tv-picking .kv-grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
@media (max-width: 900px) { .kv-noroute.tv-picking .kv-grid { grid-template-columns: minmax(0, 1fr); } }
.tv-picking #tvBig { display: none; }
.tv-pickbar.err { background: var(--bad); }
.kv-mapwrap .kv-basebtn { top: 82px; }
.tv-picking .kv-mapwrap .kv-cambtn { top: 10px; }
.kv-mapbox { position: relative; }   /* the map's buttons anchor to the map, not to the pick bar above it */

/* ===== hover tip on the "when should you go/drive" bars (all layouts) ===== */
.gl-tip { position: absolute; z-index: 1200; pointer-events: none; background: var(--text); color: var(--panel); font-size: 12.5px; line-height: 1.35; padding: 6px 9px; border-radius: 8px; max-width: 260px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); white-space: pre-line; }

/* ===== Prototype layout "Kart først" (?ui=kart): the map carries the weather, the question is one line ===== */
/* the page pills replace the old page links; only "Mine steder" stays, as a plain link like "Hva er Glett?" (a row in the menu) */
html[data-ui="kart"] .topbar .mainnav { display: flex; order: -1; }
html[data-ui="kart"] .topbar .mainnav .nav-btn:not([data-view="places"]) { display: none; }
html[data-ui="kart"] .topbar .mainnav .navlink { border: 0; background: none; border-radius: 0; color: var(--muted); font-size: 13.5px; font-weight: 500; padding: 6px 4px; gap: 6px; }
html[data-ui="kart"] .topbar .mainnav .navlink svg:first-child { width: 20px; height: 20px; }
html[data-ui="kart"] .topbar .mainnav .navlink .chev { display: none; }
html[data-ui="kart"] .topbar .mainnav .navlink:hover { color: var(--accent); }
html[data-ui="kart"] .topbar.menu-open .topright .mainnav .navlink { color: var(--text); font-size: 15px; padding: 8px 4px; }
html[data-ui="kart"] .gl-pages { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); flex: 0 0 auto; }
html[data-ui="kart"] .gl-pages button { border: 0; background: none; border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
html[data-ui="kart"] .gl-pages button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
html[data-ui="kart"] .gl-pages button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 700px) { html[data-ui="kart"] .gl-pages button { padding: 5px 9px; font-size: 13px; } html[data-ui="kart"] .topbar .brand small { display: none; } html[data-ui="kart"] #miniNow { display: none; } }
html[data-ui="kart"] #view-route .kv-h1, html[data-ui="kart"] #view-route .kv-lead, html[data-ui="kart"] #view-route .kv-scope,
html[data-ui="kart"] #view-tur .kv-h1, html[data-ui="kart"] #view-tur .kv-lead, html[data-ui="kart"] #view-tur .kv-scope { display: none; }
/* the question line */
html[data-ui="kart"] .gl-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px; }
html[data-ui="kart"] .gl-sum b { display: block; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
html[data-ui="kart"] .gl-sum small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
html[data-ui="kart"] .gl-sum-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 4px; font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums; }
html[data-ui="kart"] .gl-sum-meta[hidden] { display: none; }
/* desktop: the question line is frozen under the top bar while the trip scrolls by */
@media (min-width: 901px) {
  html[data-ui="kart"] .kv-grid > .gl-sum { position: sticky; top: var(--gl-top, 57px); z-index: 900; background: var(--bg); margin: -8px -2px; padding: 8px 4px; }
  /* while it sits there: its band reaches out into the page's side margins (--gl-side, set by ui-kart.js) and fades out there, and
     what scrolls under it fades in over 18 px below it: no hard ends left and right, no hard edge under it */
  html[data-ui="kart"] .kv-grid > .gl-sum.gl-stuck { background: transparent; }
  html[data-ui="kart"] .kv-grid > .gl-sum.gl-stuck::before { content: ''; position: absolute; z-index: -1; top: calc(-1 * var(--gl-gap, 0px)); bottom: -18px; left: calc(-1 * var(--gl-side, 0px)); right: calc(-1 * var(--gl-side, 0px)); pointer-events: none;
    background: linear-gradient(var(--bg) 0, var(--bg) calc(100% - 18px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--gl-side, 0px), #000 calc(100% - var(--gl-side, 0px)), transparent); mask-image: linear-gradient(to right, transparent, #000 var(--gl-side, 0px), #000 calc(100% - var(--gl-side, 0px)), transparent); }
}
html[data-ui="kart"] .gl-sum-btns { display: flex; gap: 8px; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { html[data-ui="kart"] .gl-sum { flex-wrap: wrap; } html[data-ui="kart"] .gl-sum-txt { flex: 1 1 100%; } html[data-ui="kart"] .gl-sum-btns { flex: 1 1 100%; justify-content: flex-start; } }   /* phones: the buttons on their own row under the title, never off the edge */
html[data-ui="kart"] .gl-edit { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 600; }
html[data-ui="kart"] .gl-edit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html[data-ui="kart"] .gl-ret { min-height: 40px; padding: 8px 14px; }
html[data-ui="kart"] #view-route:not(.gl-form-open) .kv-form, html[data-ui="kart"] #view-tur:not(.gl-form-open) .kv-form { display: none; }
/* two columns */
html[data-ui="kart"] #view-route .kv-grid, html[data-ui="kart"] #view-tur .kv-grid { display: grid; gap: 14px 18px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
html[data-ui="kart"] .kv-grid > .gl-sum, html[data-ui="kart"] .kv-grid > .kv-form, html[data-ui="kart"] .kv-grid > .kv-status { grid-column: 1 / -1; }
html[data-ui="kart"] .gl-left, html[data-ui="kart"] .gl-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
html[data-ui="kart"] #kvResult:not([hidden]), html[data-ui="kart"] #tvResult:not([hidden]) { display: contents; }
html[data-ui="kart"] .gl-left > #kvMapWrap, html[data-ui="kart"] .gl-left > #tvMapWrap { order: 0; } html[data-ui="kart"] #kvCards, html[data-ui="kart"] #tvHead { order: 1; } html[data-ui="kart"] .kv-depcard { order: 2; } html[data-ui="kart"] .kv-savedcard { order: 3; } html[data-ui="kart"] #kvSource, html[data-ui="kart"] #tvSource { order: 4; }
html[data-ui="kart"] .kv-noroute .kv-grid { grid-template-columns: minmax(0, 560px); justify-content: center; }
html[data-ui="kart"] .kv-noroute .gl-right, html[data-ui="kart"] .kv-noroute #kvMapWrap, html[data-ui="kart"] .kv-noroute #tvMapWrap, html[data-ui="kart"] .kv-noroute #kvSource, html[data-ui="kart"] .kv-noroute #tvSource { display: none; }
html[data-ui="kart"] #view-tur.kv-noroute.tv-picking .kv-grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); justify-content: stretch; }   /* the id keeps it ahead of the two-column rule above */
html[data-ui="kart"] .kv-noroute.tv-picking #tvMapWrap { display: block; } html[data-ui="kart"] .kv-noroute.tv-picking .gl-left { display: contents; }
/* aiming on the map before any trip: the form left, the map right, from the row under the question line */
html[data-ui="kart"] .kv-noroute.tv-picking .kv-grid > .kv-form, html[data-ui="kart"] .kv-noroute.tv-picking .kv-grid > .kv-status { grid-column: 1; }
html[data-ui="kart"] .kv-noroute.tv-picking .kv-grid > .kv-form { grid-row: 2; } html[data-ui="kart"] .kv-noroute.tv-picking .kv-grid > .kv-status { grid-row: 3; } html[data-ui="kart"] .kv-noroute.tv-picking .kv-savedcard { grid-column: 1; grid-row: 4; }
html[data-ui="kart"] .kv-noroute.tv-picking #tvMapWrap { grid-column: 2; grid-row: 2 / span 3; align-self: start; }
html[data-ui="kart"] .tv-picking .gl-verdict, html[data-ui="kart"] .kv-noroute .gl-verdict { display: none; }   /* no verdict from an earlier trip while aiming, or before any trip */
@media (max-width: 900px) {
  html[data-ui="kart"] #view-route .kv-grid, html[data-ui="kart"] #view-tur .kv-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  html[data-ui="kart"] .gl-left, html[data-ui="kart"] .gl-right { display: contents; }
  html[data-ui="kart"] .kv-grid > .gl-sum { order: 0; } html[data-ui="kart"] .kv-grid > .kv-form { order: 1; } html[data-ui="kart"] .kv-grid > .kv-status { order: 2; }
  html[data-ui="kart"] .gl-left > #kvStopBtn, html[data-ui="kart"] .gl-left > #kvStopCard { order: 3; }   /* the stops along the route: right under the map */
  html[data-ui="kart"] .gl-left > #kvMapWrap, html[data-ui="kart"] .gl-left > #tvMapWrap { order: 3; } html[data-ui="kart"] #kvCards, html[data-ui="kart"] #tvHead { order: 4; } html[data-ui="kart"] .kv-depcard { order: 5; }   /* .gl-left > : ahead of the desktop rule with the same selector, so the open form comes before the map on phones */
  html[data-ui="kart"] #kvChartCard, html[data-ui="kart"] #tvChartCard { order: 6; } html[data-ui="kart"] .kv-itcard { order: 7; } html[data-ui="kart"] .kv-savedcard { order: 8; } html[data-ui="kart"] #kvSource, html[data-ui="kart"] #tvSource { order: 9; }
  html[data-ui="kart"] #view-tur.kv-noroute.tv-picking .kv-grid { grid-template-columns: minmax(0, 1fr); }
  html[data-ui="kart"] .kv-noroute.tv-picking #tvMapWrap, html[data-ui="kart"] .kv-noroute.tv-picking .kv-grid > .kv-form, html[data-ui="kart"] .kv-noroute.tv-picking .kv-grid > .kv-status, html[data-ui="kart"] .kv-noroute.tv-picking .kv-savedcard { grid-column: auto; grid-row: auto; }
}
html[data-ui="kart"] .kv-map { height: 520px; }
@media (max-width: 900px) { html[data-ui="kart"] .kv-map { height: 440px; } }
/* the verdict on the map */
html[data-ui="kart"] .gl-verdict { position: absolute; left: 12px; right: 12px; bottom: 12px; max-width: 560px; z-index: 5; display: grid; grid-template-columns: 44px minmax(0, 1fr) 28px; gap: 2px 12px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: 0 4px 18px rgba(15, 23, 42, .18); border: 1px solid var(--line); }
html[data-ui="kart"] .gl-verdict:empty { display: none; }
html[data-ui="kart"] .gl-verdict .gl-vi { grid-row: 1 / span 2; width: 44px; height: 44px; } html[data-ui="kart"] .gl-verdict .gl-vi svg { width: 44px; height: 44px; }
html[data-ui="kart"] .gl-verdict h3 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
html[data-ui="kart"] .gl-verdict p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
html[data-ui="kart"] .gl-verdict.bad h3 { color: var(--bad); } html[data-ui="kart"] .gl-verdict.mid h3 { color: #b45309; }
html[data-ui="kart"] .gl-vtog { grid-column: 3; grid-row: 1 / span 2; align-self: start; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); cursor: pointer; position: relative; }
html[data-ui="kart"] .gl-vtog::before { content: ''; position: absolute; left: 9px; top: 7px; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
html[data-ui="kart"] .gl-verdict.min { grid-template-columns: 28px minmax(0, 1fr) 28px; padding: 8px 12px; gap: 0 10px; max-width: 420px; align-items: center; }
html[data-ui="kart"] .gl-verdict.min .gl-vi, html[data-ui="kart"] .gl-verdict.min .gl-vi svg { width: 28px; height: 28px; grid-row: 1; }
html[data-ui="kart"] .gl-verdict.min h3 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } html[data-ui="kart"] .gl-verdict.min p { display: none; }
html[data-ui="kart"] .gl-verdict.min .gl-vtog { grid-row: 1; } html[data-ui="kart"] .gl-verdict.min .gl-vtog::before { transform: rotate(-135deg); top: 11px; }
@media (max-width: 700px) { html[data-ui="kart"] .gl-verdict { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; grid-template-columns: 36px minmax(0, 1fr) 28px; } html[data-ui="kart"] .gl-verdict .gl-vi, html[data-ui="kart"] .gl-verdict .gl-vi svg { width: 36px; height: 36px; } html[data-ui="kart"] .gl-verdict h3 { font-size: 17px; } }
/* the weather at a few points along the way */
.gl-wxmk { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.gl-wxmk .i { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .28); display: grid; place-items: center; }
.gl-wxmk .i svg { width: 32px; height: 32px; }
.gl-wxmk .l { margin-top: 2px; font-size: 11px; font-weight: 700; color: #16202e; background: rgba(255, 255, 255, .92); border-radius: 6px; padding: 1px 5px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
@media (max-width: 700px) { .gl-wxmk .i { width: 34px; height: 34px; } .gl-wxmk .i svg { width: 27px; height: 27px; } .gl-wxmk .l { font-size: 10.5px; } }
.gl-pop .maplibregl-popup-content { font: 13px/1.45 Inter, system-ui, sans-serif; color: #16202e; padding: 8px 11px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
/* the routes as tiles compared by weather first */
html[data-ui="kart"] #kvCards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
@media (max-width: 700px) { html[data-ui="kart"] #kvCards { display: flex; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; } html[data-ui="kart"] #kvCards .kv-rc { flex: 0 0 78%; scroll-snap-align: start; } }
html[data-ui="kart"] #kvCards .kv-rc { display: flex; flex-direction: column; padding: 12px 14px; }
html[data-ui="kart"] #kvCards .kv-rc-top { order: 0; } html[data-ui="kart"] #kvCards .kv-mini { order: 1; } html[data-ui="kart"] #kvCards .kv-badges { order: 2; } html[data-ui="kart"] #kvCards .kv-why { order: 3; font-size: 12.5px; } html[data-ui="kart"] #kvCards .kv-rc-meta { order: 4; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12.5px; }
html[data-ui="kart"] #tvHead .tv-headline { display: none; }
/* Været: the now card with the radar as its graphic, the notices as plain rows */
html[data-ui="kart"] .hero { display: flex; flex-direction: column; }
html[data-ui="kart"] .hero > .now { order: 0; } html[data-ui="kart"] .hero > .sumstrip { order: 1; } html[data-ui="kart"] .hero > .radarstrip, html[data-ui="kart"] .hero > .rmopen, html[data-ui="kart"] .hero > .rmap { order: 2; }
html[data-ui="kart"] .hero > .verdict { order: 3; } html[data-ui="kart"] .hero > .sunrow, html[data-ui="kart"] .hero > .smap { order: 4; } html[data-ui="kart"] .hero > .local, html[data-ui="kart"] .hero > .lmap:not(.rmap) { order: 5; }   /* the radar map is .lmap too: it has its own place (below) */ html[data-ui="kart"] .hero > .hero-foot { order: 6; }
html[data-ui="kart"] .hero .sumstrip { display: block; margin: 8px 0 0; }
html[data-ui="kart"] .hero .sumstrip .sum { display: flex; width: 100%; box-sizing: border-box; background: none !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0; padding: 8px 0; margin: 0; }
html[data-ui="kart"] .hero .radarstrip { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 8px 0 4px; margin: 0; }
html[data-ui="kart"] .hero .radarstrip .rs-plot .rs-bars { height: 64px; }
html[data-ui="kart"] .hero .verdict { background: none; border-top: 1px solid var(--line); border-radius: 0; padding: 8px 0; margin: 0; }
html[data-ui="kart"] .hero .verdict .dots { display: none; }
html[data-ui="kart"] .hero .sunrow { background: none !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0; padding: 8px 0; margin: 0; }
html[data-ui="kart"] .hero .local { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 8px 0; margin: 0; }
html[data-ui="kart"] .hero .hero-foot { margin-top: 4px; }

/* ===== "Enda større kart": the map over the whole window under the top bar, the chart and the stages on the right ===== */
.gl-full { position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; display: grid; grid-template-columns: minmax(0, 1fr) var(--gl-side, 25%); background: var(--bg); }
.gl-full[hidden] { display: none; }
.gl-full-map { position: relative; min-width: 0; min-height: 0; }
.gl-full .kv-mapwrap, .gl-full .kv-mapbox { height: 100%; }
.gl-full .kv-map { height: 100% !important; border-radius: 0; border: 0; }
.gl-full #kvBig, .gl-full #tvBig { display: none; }   /* the map is as large as it gets */
.gl-full .kv-mapwrap .kv-cambtn { top: 10px; } .gl-full .kv-mapwrap .kv-basebtn { top: 46px; }
.gl-full .gl-verdict { bottom: 16px; left: 16px; }
.gl-full-side { position: relative; min-width: 0; overflow-y: auto; border-left: 1px solid var(--line); background: var(--bg); }
.gl-full-cards { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 12px 16px; }
.gl-full-cards .card { margin: 0; }
.gl-full-grip { position: absolute; left: 0; top: 0; bottom: 0; width: 12px; cursor: col-resize; z-index: 2; touch-action: none; }
.gl-full-grip::before { content: ''; position: absolute; left: 3px; top: 50%; width: 4px; height: 44px; margin-top: -22px; border-radius: 2px; background: var(--muted); opacity: .45; }
.gl-full-grip:hover::before, .gl-full-grip:focus-visible::before, .gl-full.dragging .gl-full-grip::before { opacity: 1; background: var(--accent); }
.gl-full-grip:focus-visible { outline: none; }
.gl-full.dragging { user-select: none; cursor: col-resize; } .gl-full.dragging .gl-full-map { pointer-events: none; }
html.gl-fullmode, html.gl-fullmode body { overflow: hidden; }
.kv-fullbtn { position: absolute; right: 10px; z-index: 800; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
@media (max-width: 999px), (pointer: coarse) { .kv-fullbtn { display: none; } }   /* computers only */

/* ===== the planners' map switches in the control column (the engines' own pill buttons are hidden) ===== */
.kv-mapwrap.has-ctrls > .kv-bigbtn, .kv-mapwrap.has-ctrls .kv-mapbox > .kv-bigbtn { display: none; }
.gl-ctrls { display: flex; flex-direction: column; gap: 10px; background: none; box-shadow: none; }
.gl-ctrls .maplibregl-ctrl-group { margin: 0; }
.gl-ctrls[hidden] { display: none; }
.kv-map .gl-ctrl.maplibregl-ctrl-group { background: #fff; border-radius: 4px; overflow: hidden; }   /* the group is the white, rounded box; the buttons paint nothing of their own */
.kv-map .gl-ctrl button { width: 29px; height: 29px; padding: 0; display: block; background: transparent; color: #16202e; border-radius: 0; }   /* like the compass and 3D: a dark icon on white in both themes */
.kv-map .gl-ctrl button:hover, .kv-map .gl-ctrl button[aria-pressed="true"]:hover { background: #e6ecf8; color: #16202e; }   /* hover: a light box, the icon dark, also for the active one */
.kv-map .gl-ctrl button .maplibregl-ctrl-icon { display: flex; align-items: center; justify-content: center; width: 29px; height: 29px; background: none; }   /* .kv-map ahead: MapLibre's own stylesheet loads later */
.kv-map .gl-ctrl svg { display: block; width: 17px; height: 17px; margin: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kv-map .gl-ctrl button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.gl-ctrl button[hidden] { display: none; }
.tv-picking .gl-ctrls { display: none; }

/* the start bars: empty slots after the last start, and the chosen trip as a band */
.kv-dep { position: relative; }
.kv-dep-ghost { flex: 1 1 0; min-width: 2px; max-width: 12px; align-self: stretch; margin-top: 12px; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--line) 55%, transparent); }   /* the hours after the last start, still inside MET Nordic's forecast */
.kv-dep-ghost.beyond { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px); opacity: .7; }   /* beyond MET Nordic: the global models only */
@media (max-width: 600px) {   /* four days of hourly bars and a long drive's arrival hours (Oslo–Alta: about 120) fit a phone */
  .kv-dep { gap: 1px; } .kv-dep button, .kv-dep-ghost { min-width: 1px; } .kv-dsep { margin: 0 2px; }
}
.kv-dep-met { position: absolute; top: 12px; bottom: 0; width: 0; border-left: 2px dashed var(--mid); z-index: 3; pointer-events: auto; }   /* above the bars: the end of MET Nordic's forecast must be seen */
.kv-dep-met::before { content: attr(data-l); position: absolute; left: 50%; transform: translateX(-50%); bottom: 2px; font-size: 9.5px; line-height: 1; color: #fff; background: var(--mid); border-radius: 3px; padding: 2px 3px; font-weight: 700; white-space: nowrap; }
.kv-dep-band { position: absolute; top: 12px; bottom: 0; z-index: 0; pointer-events: none; border-radius: 4px; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 2px solid var(--accent); border-right-style: dashed; }
.kv-dep-arr { position: absolute; top: 0; z-index: 2; font-size: 10px; line-height: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; pointer-events: none; padding: 0 2px; background: color-mix(in srgb, var(--panel) 80%, transparent); border-radius: 3px; }
.kv-dep-arr.flip { transform: translateX(-100%); }
.kv-dep button { position: relative; z-index: 1; }

/* ===== phones: "større" = the map over the whole screen under the top bar, a scrubber strip at the foot ===== */
.gl-phone { position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--bg); }
.gl-phone[hidden] { display: none; }
.gl-phone-map { position: relative; min-height: 0; }
.gl-phone .kv-mapwrap, .gl-phone .kv-mapbox { height: 100%; }
.gl-phone .kv-map { height: 100% !important; border-radius: 0; border: 0; }
html[data-ui="kart"] .gl-phone .gl-verdict { display: none; }   /* the strip tells where you are; the verdict is on the page */
.gl-strip { padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); touch-action: none; user-select: none; }
.gl-lane { position: relative; height: 16px; border-radius: 8px; overflow: hidden; background: var(--line); }
.gl-lane-seg { position: absolute; top: 0; bottom: 0; }
.gl-lane-cur { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--text); border-radius: 2px; box-shadow: 0 0 0 2px var(--panel); z-index: 1; }
.gl-read { margin-top: 8px; line-height: 1.3; }
.gl-read span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-r1 { font-size: 14px; font-weight: 600; } .gl-r2 { font-size: 12.5px; color: var(--muted); }
/* phones: the row fits with the logo at full size at the top and when scrolled, so the page pills never shift */
@media (max-width: 700px) {
  html[data-ui="kart"] .topbar { gap: 8px; }
  html[data-ui="kart"] .topbar .brand, html[data-ui="kart"] body.minion .topbar .brand { flex: 0 0 auto; }
  html[data-ui="kart"] .gl-pages { flex: 0 1 auto; min-width: 0; }
  html[data-ui="kart"] .gl-pages button { padding: 5px 8px; }
  html[data-ui="kart"] .menubtn, html[data-ui="kart"] .mininow:not([hidden]) + .menubtn { margin-left: auto; }   /* the summary is hidden on phones, so it must not take the button's margin away */
}
/* the place summary sits left of the page pills, right after the logo; the pills keep the middle, the controls the right */
html[data-ui="kart"] .topbar > .brand { order: 0; } html[data-ui="kart"] .topbar > #miniNow { order: 1; margin-right: 0; } html[data-ui="kart"] .topbar > .gl-pages { order: 2; margin-right: auto; } html[data-ui="kart"] .topbar > .menubtn, html[data-ui="kart"] .topbar > .topright { order: 3; }
/* the phone scrubber: the readout over the finger while it drags, kept inside the screen; the arrow points at the finger */
.gl-scrubtip { position: absolute; z-index: 5; max-width: calc(100% - 16px); padding: 7px 10px; border-radius: 10px; background: var(--text); color: var(--panel); box-shadow: 0 4px 16px rgba(0, 0, 0, .25); pointer-events: none; line-height: 1.3; }
.gl-scrubtip[hidden] { display: none; }
.gl-scrubtip b, .gl-scrubtip span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-scrubtip b { font-size: 14px; } .gl-scrubtip span { font-size: 12.5px; opacity: .85; }
.gl-scrubtip::after { content: ''; position: absolute; top: 100%; left: var(--ax, 50%); margin-left: -7px; border: 7px solid transparent; border-top-color: var(--text); }
.kv-rush { display: block; margin-top: 3px; font-size: 12px; color: #92400e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-rush { color: #fcd34d; } }
:root[data-theme="dark"] .kv-rush { color: #fcd34d; }
/* road reports and rush notes in the stage list are buttons: a tap flies the map there and pulses that piece of road */
.kv-fly { display: flex; align-items: flex-start; gap: 4px; width: calc(100% + 12px); margin: 2px -6px 0; padding: 6px; min-height: 36px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 12px; line-height: 1.4; text-align: left; color: inherit; cursor: pointer; touch-action: manipulation; }
.kv-fly.kv-ev { display: block; } .kv-fly.kv-rush, .kv-fly.kv-narrow { color: #92400e; }   /* amber, like the warning it is */
.kv-fly::after { content: '⌖'; margin-left: auto; padding-left: 6px; opacity: .45; font-size: 14px; line-height: 1.2; }
.kv-fly.kv-ev::after { float: right; }
.kv-fly:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); } .kv-fly:hover::after { opacity: 1; color: var(--accent); }
.kv-fly:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.kv-fly.lit { background: color-mix(in srgb, #facc15 22%, transparent); box-shadow: inset 3px 0 0 #eab308; }
.kv-restbtn.lit { background: color-mix(in srgb, #facc15 22%, transparent); border-color: #eab308; }
@media (pointer: coarse) { .kv-fly { min-height: 44px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-fly.kv-rush, :root:not([data-theme="light"]) .kv-fly.kv-narrow { color: #fcd34d; } }
:root[data-theme="dark"] .kv-fly.kv-rush, :root[data-theme="dark"] .kv-fly.kv-narrow { color: #fcd34d; }
/* rush areas on the map: a car in a round marker; the popup has the day's traffic at the counting point */
.kv-rushmk { width: 24px; height: 24px; line-height: 20px; font-size: 13px; text-align: center; border-radius: 50%; border: 2px solid #fff; background: #fde68a; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: pointer; }
.kv-rushchart { display: block; width: 100%; max-width: 260px; height: auto; margin: 6px 0 2px; }
.kv-rushchart rect { fill: #cbd5e1; } .kv-rushchart rect.r { fill: #d97706; }
.kv-rushchart rect.you { fill: none; stroke: #2563eb; stroke-width: 1.5; }
.kv-rushchart polyline { fill: none; stroke: #475569; stroke-width: 1.5; stroke-dasharray: 3 2; }
.kv-rushchart text { font-size: 9px; fill: #64748b; }
.kv-rushkey { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 11px; color: #64748b; }
.kv-rushkey span { display: inline-block; width: 10px; height: 8px; margin-left: 6px; } .kv-rushkey span:first-child { margin-left: 0; }
.kv-rushkey .b { background: #d97706; } .kv-rushkey .l { height: 0; border-top: 2px dashed #475569; } .kv-rushkey .y { border: 1.5px solid #2563eb; }
/* the other counting points of a rush area in its popup: finger-sized buttons to theirs */
.kv-rushmore { margin: 8px 0 4px; } .kv-rushmore small { color: #64748b; } .kv-rushmore > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.kv-rushgo { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border: 1px solid #fcd34d; border-radius: 10px; background: #fffbeb; font: inherit; font-size: 13px; text-align: left; color: inherit; cursor: pointer; touch-action: manipulation; }
.kv-rushgo.on { background: #d97706; border-color: #d97706; color: #fff; cursor: default; } .kv-rushgo.on span { color: #fff; }
.kv-rushgo span { color: #92400e; font-size: 12px; white-space: nowrap; }
.kv-rushgo:hover { background: #fef3c7; } .kv-rushgo:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (pointer: coarse) { .kv-rushgo { min-height: 44px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-rushgo { background: #3a2e12; border-color: #a16207; } :root:not([data-theme="light"]) .kv-rushgo span { color: #fcd34d; } }
:root[data-theme="dark"] .kv-rushgo { background: #3a2e12; border-color: #a16207; } :root[data-theme="dark"] .kv-rushgo span { color: #fcd34d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-rushgo.on { background: #d97706; border-color: #d97706; } :root:not([data-theme="light"]) .kv-rushgo.on span { color: #fff; } }
:root[data-theme="dark"] .kv-rushgo.on { background: #d97706; border-color: #d97706; } :root[data-theme="dark"] .kv-rushgo.on span { color: #fff; }
/* full-screen street view and webcam: a top strip with the title and a round close button in the upper right corner */
.kv-svfull-top { display: flex; align-items: center; gap: 12px; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); background: #0b1220; color: #e6edf7; font-size: 14px; font-weight: 600; }
.kv-svfull-top span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-svfull-cx { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.kv-svfull-cx:hover { background: rgba(255, 255, 255, .24); } .kv-svfull-cx:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
/* the page pills: the full label, a short one on phones; the row is clipped so it can never widen the page */
.gl-pages .gl-ps { display: none; }
@media (max-width: 700px) { .gl-pages .gl-pl { display: none; } .gl-pages .gl-ps { display: inline; } html[data-ui="kart"] .gl-pages { overflow: hidden; } }

/* ---- The wind map: the "Vind" side of the radar map (js/windmap.js) ---- */
.rm-head { justify-content: space-between; align-items: center; }
.rm-mode { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg); }
.rm-mode button { border: 0; background: transparent; color: var(--muted); font: 600 12.5px "Inter", system-ui, sans-serif; padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.rm-mode button[aria-pressed="true"] { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .rm-mode button[aria-pressed="true"] { color: #0b1220; }
.rm-mode button:disabled { opacity: 0.45; cursor: not-allowed; }
.rm-mode button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rmap.wind #rmSlider, .rmap.wind #rmCap, .rmap.wind #rmBadge, .rmap.wind .lm-radar-pane { display: none !important; }
.wm-field, .wm-parts { position: absolute; pointer-events: none; }
.wm-field { image-rendering: auto; }
.wm-legend { margin: 2px 0 6px; max-width: 360px; }
.wm-bar { height: 8px; border-radius: 4px; border: 1px solid var(--line); }
.wm-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.wm-ticks .wm-unit { font-weight: 600; }
.wm-cap .wm-hint { color: var(--muted); }
.wm-pop .leaflet-popup-content { margin: 7px 11px; font: 500 13px/1.35 "Inter", system-ui, sans-serif; }
.wm-pop .leaflet-popup-content small { color: var(--muted); }
/* the way in from the now card: the wind value itself, with a quiet chevron */
.wm-open { font: inherit; color: inherit; background: none; border: 0; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.wm-open:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.wm-open:hover .wm-chev, .wm-open:focus-visible .wm-chev { color: var(--accent); }
.wm-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wm-chev { margin-left: 4px; color: var(--muted); font-weight: 700; }
.wm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* and from the hour table's Vind tab */
.wm-tbtn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--accent); font: 600 13.5px "Inter", system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.wm-tbtn:hover { border-color: var(--accent); }
.wm-tbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* opened from the wind value, the radar map (on its wind side) sits right under the now block instead of under the radar strip */
/* the rain/wind map: one place (right under the now block, whichever way it was opened), its own close, one time readout */
html[data-ui="kart"] .hero > .rmap { order: 0; margin-top: 4px; }
.rmap .rm-head { justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rm-tools { display: inline-flex; align-items: center; gap: 6px; }
.rm-close { width: 34px; height: 34px; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; padding: 0; }
.rm-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.rm-close:hover { border-color: var(--accent); color: var(--accent); }
.rm-close:focus-visible, .rm-aboutbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rmap .rm-mode button { padding: 6px 15px; font-size: 13px; }
/* Leaflet's zoom buttons in the panel's own look */
.rmap .leaflet-touch .leaflet-bar, .rmap .leaflet-bar { border: 0; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(15,23,42,.12); overflow: hidden; }
.rmap .leaflet-bar a, .rmap .leaflet-touch .leaflet-bar a { width: 30px; height: 30px; line-height: 30px; font: 600 17px/30px "Inter", system-ui, sans-serif; background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--text); border-bottom: 1px solid var(--line); }
.rmap .leaflet-bar a:last-child { border-bottom: 0; }
.rmap .leaflet-bar a:hover { background: var(--bg); color: var(--accent); }
.rmap .leaflet-bar a.leaflet-disabled { color: var(--muted); opacity: .5; }
/* time row: play | slider (marks under it) | the time, at a fixed width so the slider keeps its length in both modes */
.rm-time { display: grid; grid-template-columns: 36px minmax(0, 1fr) 6.2rem; column-gap: 10px; row-gap: 1px; align-items: center; --thumb: 16px; }
.rm-time[hidden] { display: none; }
.rm-time .lm-play { grid-row: 1 / span 2; align-self: start; }
.rm-time input { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; margin: 0; height: 22px; }
.rm-time b { grid-column: 3; grid-row: 1 / span 2; align-self: start; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; font-size: 15px; line-height: 1.15; }
.rm-time b small { font-size: 11.5px; font-weight: 500; color: var(--muted); font-style: normal; }
.rm-time b.est { font-style: normal; color: var(--text); } .rm-time b.est small { font-style: italic; }
.rm-ticks { grid-column: 2; grid-row: 2; position: relative; height: 15px; font-size: 10.5px; color: var(--muted); }
.rm-ticks span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; line-height: 1; padding-top: 4px; }
.rm-ticks span::before { content: ""; position: absolute; left: 50%; top: -2px; width: 1px; height: 5px; background: var(--muted); }
.rm-ticks span.now { color: var(--text); font-weight: 600; }
.rm-ticks .rm-fc { position: absolute; top: 0; right: calc(var(--thumb) / 2); height: 0; border-top: 2px dashed var(--muted); opacity: .7; }
.rm-time.busy b::after { content: ""; width: 10px; height: 10px; margin-top: 3px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
/* the legend (one row, both sides), one short line, and the small print behind "Om kartet" */
.rmap .lm-cap { margin-top: 6px; }
.rmap .lm-cap > div + div { border-top: 0; padding-top: 0; margin-top: 4px; }
.rm-legend { min-height: 24px; display: flex; flex-wrap: wrap; align-items: center; color: var(--text); }
.rmap .rm-legend .lg { margin-right: 8px; gap: 4px; }
@media (max-width: 380px) { .rmap .rm-legend .lg { margin-right: 6px; } .rmap .rm-legend .lg i { width: 10px; height: 10px; } }
.rm-legend.wm-legend { display: block; max-width: 300px; margin: 2px 0 0; }
.rm-legend .wm-ticks b { color: var(--muted); }
.rm-line { color: var(--muted); }
.rm-aboutbtn { border: 0; background: none; padding: 2px 0; margin: 0; font: 600 12.5px "Inter", system-ui, sans-serif; color: var(--accent); cursor: pointer; white-space: nowrap; }
.rm-aboutbtn::after { content: "\00a0›"; display: inline-block; transition: transform .15s; }
.rm-aboutbtn[aria-expanded="true"]::after { transform: rotate(90deg); }
.rmap .lm-cap .rm-about { display: none; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.rmap.about .lm-cap .rm-about { display: block; }
@media (prefers-reduced-motion: reduce) { .rm-aboutbtn::after { transition: none; } }
.wm-open .wm-chev { color: var(--accent); }

/* Kjørevær while a new search loads: the planner blurred under a card with the trip, the steps and Avbryt (js/route.js: workOpen) */
#view-route .kv-grid { position: relative; }
.kv-working .kv-grid { min-height: 460px; align-content: start; }   /* a short page (the summary only): the blur still lies under the whole card */
.kv-work { position: absolute; inset: -6px; z-index: 950; border-radius: 16px; background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(6px) saturate(.8); backdrop-filter: blur(6px) saturate(.8); }
.kv-work-card { position: sticky; top: calc(50vh - 150px); width: min(380px, calc(100% - 32px)); margin: 48px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.kv-work-head { display: flex; gap: 12px; align-items: flex-start; }
.kv-work-head .spinner { width: 26px; height: 26px; flex: 0 0 26px; margin-top: 2px; }
.kv-work-head b { display: block; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.kv-work-head small { display: block; color: var(--muted); margin-top: 2px; }
.kv-work-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.kv-work-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.kv-work-steps li i { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.kv-work-steps li.on { color: var(--text); font-weight: 600; }
.kv-work-steps li.on i { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.kv-work-steps li.done i { border-color: var(--accent); background: var(--accent); position: relative; }
.kv-work-steps li.done i::after { content: ''; position: absolute; left: 3px; top: 0; width: 3px; height: 7px; border: solid var(--panel); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.kv-work-sum { margin: 10px 0 0 24px; color: var(--muted); font-size: .9rem; }
.kv-work-bar { margin: 12px 0 0 24px; }
.kv-work-bar i { display: block; height: 6px; width: 0; border-radius: 3px; background: var(--accent); position: relative; transition: width .3s ease; }
.kv-work-bar::before { content: ''; display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: -6px; }
.kv-work-bar small { display: block; margin-top: 6px; color: var(--muted); font-size: .85rem; }
.kv-work-note { margin: 10px 0 0 24px; font-size: .85rem; color: var(--muted); }
.kv-work-stop { display: block; margin: 16px 0 0 auto; }
@media (prefers-reduced-motion: reduce) { .kv-work-bar i { transition: none; } }

/* Kjørevær: "?" beside Bil | MC opens what MC changes (hidden at rest) */
.kv-infobtn { width: 30px; height: 30px; flex: none; margin: 0 10px 0 4px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; align-self: center; }
.kv-infobtn:hover { color: var(--text); }
.kv-infobtn[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.kv-vehhelp { font-size: 13px; line-height: 1.5; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 14px 0 6px; }
.kv-vehhelp ul { margin: 10px 0 0; padding-left: 18px; }
.kv-vehhelp li + li { margin-top: 8px; }
/* MC: a longer stretch under +5 °C. The chart: one amber wash over the whole height, dashed ends.
   The stage list: a heading row where it starts and an amber bracket down the stages and stops it covers */
.kv-gz-area { fill: #f59e0b; fill-opacity: .12; }
.kv-gz-edge { stroke: #d97706; stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.kv-gz-t { font: 700 11px Inter, system-ui, sans-serif; fill: #b45309; paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; }
.kv-legend .kv-l-gz { background: color-mix(in srgb, #f59e0b 22%, transparent); border-left: 1px dashed #d97706; border-right: 1px dashed #d97706; }
.kv-it li.kv-gzhead { display: block; padding: 4px 0 0; border-bottom: 0; }
.kv-it li.kv-gz { box-shadow: inset 3px 0 0 #f59e0b; padding-left: 10px; margin-left: -10px; }
.kv-it li.kv-gz-end { border-bottom-left-radius: 0; }
.kv-gzbtn { color: #92400e; background: color-mix(in srgb, #f59e0b 12%, transparent); border-left: 3px solid #f59e0b; border-radius: 8px 8px 0 0; width: calc(100% + 10px); margin: 0 0 0 -10px; padding: 6px 8px 6px 7px; }
.kv-gzbtn b { display: block; font-size: 13px; } .kv-gzbtn small { color: inherit; opacity: .85; }
:root[data-theme="dark"] .kv-gz-t { fill: #f59e0b; } :root[data-theme="dark"] .kv-gzbtn { color: #fbbf24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kv-gz-t { fill: #f59e0b; } :root:not([data-theme="light"]) .kv-gzbtn { color: #fbbf24; } }

/* ================= Nattplass ================= */
#view-natt .np-sum { display: none; }
#view-natt:not(.np-empty) .np-sum { display: flex; }
#view-natt:not(.np-empty) .kv-h1, #view-natt:not(.np-empty) .kv-lead, #view-natt:not(.np-empty) .kv-scope { display: none; }
#view-natt:not(.np-form-open) .np-form { display: none; }
#view-natt .np-form { margin: 10px 0 12px; max-width: 760px; }
#view-natt .np-ab .kv-field { display: flex; align-items: center; gap: 6px; }
#view-natt .np-ab input { flex: 1 1 auto; min-width: 0; }
#view-natt .np-opts { flex-wrap: wrap; gap: 6px; }
#view-natt .kv-status { margin: 8px 0; }
.np-grid { display: grid; gap: 14px 18px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); margin-top: 8px; }
.np-left, .np-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* computers: the map with the picked spot's details under it on the left, the list on the right; the list column stays in view
   (it scrolls by itself) while the page scrolls to read the details */
@media (min-width: 901px) {
  #view-natt:not(.np-empty) .np-right { position: sticky; top: 70px; max-height: calc(100vh - 82px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; margin: -2px; scrollbar-width: thin; }
}
#view-natt.np-empty .np-grid { grid-template-columns: minmax(0, 1fr); }
#view-natt.np-empty .np-detail { display: none; }
.np-fullbtn { display: none; }   /* the switch behind the map's "whole window" icon */
/* the whole window: the map fills the left, its buttons and the sun panel under it; the details float over its lower left corner */
.gl-full .np-mapwrap { display: flex; flex-direction: column; }
.gl-full .np-mapwrap .np-map { flex: 1 1 0; min-height: 0; height: auto !important; }
.gl-full .np-mapwrap > :not(.np-map) { flex: none; padding: 0 12px; }
.gl-full .np-mapwrap > :last-child { padding-bottom: 10px; }
.np-float { position: absolute; left: 12px; bottom: 34px; z-index: 5; width: min(400px, calc(100% - 24px)); max-height: calc(100% - 150px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .28); overflow: hidden; }
.np-float[hidden] { display: none; }
.np-float-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.np-float-bar b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-float-chev::before { content: "▾"; color: var(--muted); } .np-float.folded .np-float-chev::before { content: "▴"; }
.np-float.folded .np-float-bar { border-bottom: 0; }
.np-float.folded .np-detail { display: none; }
.np-float .np-detail { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: 12px 14px; }
.np-float .np-detail > h2 { display: none; }   /* the bar has the name */
.np-map { height: 520px; }
.np-map.np-picking { cursor: crosshair; outline: 2px solid var(--accent); outline-offset: 2px; }
.np-nogl { padding: 16px; }
.np-maprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.np-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.np-legend[hidden] { display: none; }
.np-legend i, .np-bars i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.np-mark { width: 24px; height: 24px; box-sizing: border-box; padding: calc((20px - 1cap) / 2) 0 0; border-radius: 50%; display: block; text-align: center; background: #1d4ed8; color: #fff; font: 700 12px/1 Inter, system-ui, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-box: trim-both cap alphabetic; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); border: 2px solid #fff; cursor: pointer; }   /* the digits' own height (the line trimmed to cap height and baseline) in the middle: centring the line box left them 2-3 px high in Edge on Windows, where the line is laid out from other font metrics */
.np-mark.on { background: #f59e0b; color: #111; }
.np-key .np-mark-key { display: inline-grid; width: 18px; height: 18px; font-size: 10px; border-width: 1.5px; margin-right: 6px; vertical-align: middle; position: relative; top: -1px; cursor: default; box-shadow: 0 0 0 1px var(--line); }
.np-listcard h2, .np-detail h2 { margin: 0 0 8px; font-size: 18px; }
.np-about { padding: 4px 4px 0; }
.np-about > summary { cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 600; list-style: none; }
.np-about > summary::before { content: "▸ "; } .np-about[open] > summary::before { content: "▾ "; }
.np-about > summary::-webkit-details-marker { display: none; }
.np-about > p { margin: 8px 0 0; }
.np-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.np-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; width: 100%; text-align: left; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.np-item:hover { border-color: var(--accent); }
.np-item.on { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, .35); }
.np-num { width: 24px; height: 24px; box-sizing: border-box; padding: calc((24px - 1cap) / 2) 0 0; border-radius: 12px; background: #1d4ed8; color: #fff; font-weight: 700; font-size: 12px; line-height: 1; text-align: center; text-box: trim-both cap alphabetic; display: block; }   /* as .np-mark */
.np-item.on .np-num { background: #f59e0b; color: #111; }
.np-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.np-main b { font-size: 15.5px; }
.np-main small { color: var(--muted); font-size: 13px; }
/* a row in two lines: the name with where it is beside it, then the tags and the weather */
.np-hl { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.np-hl b { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-hl small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.np-tags i.np-tagwarn { background: rgba(180, 83, 9, .14); color: #b45309; }
.np-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.np-tags i { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--accent-faint, rgba(37, 99, 235, .08)); color: var(--text); }
.np-wx { font-size: 13px; font-variant-numeric: tabular-nums; }
.np-wx.good b { color: var(--good); } .np-wx.mid b { color: #b45309; } .np-wx.bad b { color: var(--bad); } .np-wx.muted { color: var(--muted); }
.np-where { margin: -4px 0 10px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.np-why { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.np-why li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; align-items: start; }
.np-why li.warn { color: #b45309; }
.np-detail h3 { margin: 12px 0 6px; font-size: 15px; }
.np-night { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; }
.np-night span { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.np-night span b { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.np-night small { font-size: 11px; font-weight: 400; color: var(--muted); }
.np-sun { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.np-in p { margin: 0 0 6px; font-size: 14px; }
.np-bars { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.np-bars small { display: block; margin-left: 16px; color: var(--muted); font-size: 12px; }
.np-ok { color: var(--good); font-size: 14px; }
.np-acts { margin-top: 12px; flex-wrap: wrap; }
.np-route { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.np-route[hidden] { display: none; }
.np-law { margin: 8px 0 0; }
.np-notes { margin-top: 12px; }
.np-notes > summary { cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 600; list-style: none; }
.np-notes > summary::before { content: "▸ "; } .np-notes[open] > summary::before { content: "▾ "; }
.np-notes > summary::-webkit-details-marker { display: none; }
.np-vehnote { margin: 10px 0 12px; font-size: 12.5px; line-height: 1.45; }
.np-wxbtn::after { content: " ▾"; font-size: .8em; color: var(--muted); } .np-wxbtn[aria-expanded="true"]::after { content: " ▴"; }
/* the stay's weather hour by hour under the buttons */
.np-hours { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.np-hours[hidden] { display: none; }
.np-hours h3 { margin: 0 0 6px; }
.np-hlist { list-style: none; margin: 0 0 6px; padding: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.np-hlist li { display: grid; grid-template-columns: 48px 30px 40px 72px auto; justify-content: start; align-items: center; gap: 8px; padding: 2px 6px; border-radius: 6px; }
.np-hlist li:nth-child(odd):not(.np-hday) { background: var(--accent-faint, rgba(37, 99, 235, .05)); }
.np-hlist li.mid .np-hmm, .np-hlist li.mid .np-hw { color: #b45309; } .np-hlist li.bad .np-hmm, .np-hlist li.bad .np-hw { color: var(--bad); }
.np-hlist b { font-weight: 600; }
.np-hlist .np-hic svg { width: 26px; height: 26px; display: block; }
.np-hlist .np-ht { font-weight: 600; text-align: right; }
.np-hlist small { color: var(--muted); }
.np-hlist .np-hhead { font-size: 11.5px; color: var(--muted); background: none !important; }
.np-hlist .np-hhead span:nth-child(3) { text-align: right; } .np-hlist .np-hmm { text-align: right; } .np-hlist .np-hhead span:nth-child(4) { text-align: right; }
.np-hlist .np-hday { display: block; margin-top: 6px; padding: 4px 4px 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: capitalize; }
@media (max-width: 900px) {
  .np-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .np-left, .np-right { display: contents; }
  .np-mapwrap { order: 1; } .np-detail { order: 2; } .np-listcard { order: 3; } .np-savedcard { order: 4; } .np-about { order: 5; }
  .np-map { height: 420px; }
}
/* four page pills on a phone: a little tighter, so the fourth (Nattplass) fits beside the logo and the menu button */
@media (max-width: 440px) { html[data-ui="kart"] .gl-pages button { padding: 5px 7px; font-size: 12.5px; } html[data-ui="kart"] .gl-pages { gap: 0; padding: 2px; } html[data-ui="kart"] .topbar { gap: 6px; } }
@media (max-width: 430px) { html[data-ui="kart"] .topbar > .brand { font-size: 0; gap: 0; } }   /* the logo mark alone: the word gives its room to the pills */
@media (max-width: 345px) { html[data-ui="kart"] .gl-pages button { padding: 4px 4px; font-size: 11px; } html[data-ui="kart"] .topbar { padding-left: 8px; padding-right: 8px; } }
.np-sel { display: none; }
#npRad button { white-space: nowrap; }
.np-saved { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.np-saved li { display: flex; gap: 6px; align-items: center; }
.np-savedgo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.np-savedgo:hover { border-color: var(--accent); }
.np-savedgo b { font-size: 14px; } .np-savedgo small { color: var(--muted); font-size: 12.5px; }
.np-wxd { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.np-wxd > summary { cursor: pointer; padding: 10px 0; font-size: 14px; list-style-position: inside; }
.np-wxd > summary b { margin-right: 6px; }
.np-wxd[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.np-wxd > div { padding-bottom: 12px; }
.np-item .np-wx { color: var(--muted); font-size: 12.5px; }
.np-item .np-wx b { color: inherit; font-weight: 600; }
.np-filt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -2px 0 12px; }
.np-filt:empty { display: none; }
.np-filtd { flex: 1 1 100%; min-width: 0; }
.np-filtd > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: baseline; gap: 6px; }
.np-filtd > summary::-webkit-details-marker { display: none; }
.np-filtd > summary .np-filt-h { color: var(--accent); }
.np-filtd > summary .np-filt-h::before { content: "▸ "; } .np-filtd[open] > summary .np-filt-h::before { content: "▾ "; }
.np-filt-n { font-size: 12.5px; font-weight: 600; color: #b45309; }
.np-filtc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.np-filt-h { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.np-filt .kv-chip b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); margin-left: 2px; }
.np-filt .kv-chip.on b { color: inherit; }
/* the list column is narrow: smaller chips, two or three to a line */
.np-right .np-filtc, .gl-full .np-filtc { gap: 5px; }
.np-right .np-filt .kv-chip, .gl-full .np-filt .kv-chip { font-size: 12.5px; padding: 3px 9px; gap: 4px; }
.np-svc { margin-bottom: 4px; }
.np-svc b { font-weight: 600; }
.np-olnote { margin: -4px 0 12px; padding-left: 10px; border-left: 3px solid #f59e0b; }
.np-dew { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.np-dew span { margin-right: 6px; }
.np-dew.wet { color: #b45309; }
.np-star { white-space: nowrap; color: #6d28d9; }
.np-stars { position: relative; overflow: hidden; margin-top: 10px; padding: 12px 14px; border-radius: 12px; color: #e0e7ff; display: flex; flex-direction: column; gap: 2px;
  background: radial-gradient(1.2px 1.2px at 12% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 70%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 44% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 62%, #c7d2fe 50%, transparent 51%), radial-gradient(1.3px 1.3px at 71% 35%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 84% 75%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 92% 18%, #fde68a 50%, transparent 51%), radial-gradient(1px 1px at 36% 48%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 6% 82%, #c7d2fe 50%, transparent 51%),
    linear-gradient(160deg, #0b1026 0%, #1e1b4b 60%, #312e81 100%); }
.np-stars b { font-size: 15px; } .np-stars small { font-size: 12.5px; color: #c7d2fe; }
.np-stars.light { background: linear-gradient(160deg, #334155, #475569); color: #f1f5f9; }
.np-sunlab { padding: 2px 7px; border-radius: 9px; font: 600 12px/1.3 system-ui, sans-serif; white-space: nowrap; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); pointer-events: none; }
.np-sunlab.set { color: #c2410c; } .np-sunlab.rise { color: #a16207; }
.np-sundot { font-size: 20px; line-height: 1; color: #eab308; text-shadow: 0 0 3px #fff, 0 0 6px #fff; pointer-events: none; }
.np-moondot { width: 22px; height: 22px; pointer-events: none; filter: drop-shadow(0 0 2px rgba(15, 23, 42, .55)); }
.np-moondot svg { display: block; width: 100%; height: 100%; fill: #f1f5f9; stroke: #475569; stroke-width: 1.2; }
.np-moondot.down { opacity: .45; }
.np-sundot.hid { opacity: .4; filter: grayscale(1); }
.np-sunbox { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.np-sunrow { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.np-sundate { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.np-sundate input { font: inherit; font-weight: 400; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.np-sunbox input[type=range] { flex: 1 1 200px; min-width: 0; accent-color: #f59e0b; }
.np-suntxt { margin: 6px 0 2px; font-size: 14px; font-variant-numeric: tabular-nums; }
.np-sunbox .hint { margin: 2px 0 0; font-size: 12px; }
.np-warn { color: #b45309; }
@media (max-width: 900px) {
  .np-listcard { order: 2; } .np-detail { order: 3; }
  .np-sel:not([hidden]) { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 8px; padding: 10px 12px; border: 1.5px solid #f59e0b; border-radius: 12px; background: var(--panel); }
  .np-sel > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .np-sel b { font-size: 15px; } .np-sel small { color: var(--muted); font-size: 12.5px; }
  .np-selbtns { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
}

/* Kjørevær: stops along the route (Leirplass) */
.kv-stopbtn { display: block; width: 100%; margin: 10px 0 0; }
.kv-stopbtn[hidden] { display: none; }
.kv-stopcard { margin-top: 10px; }
.kv-stophead { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.kv-stophead h2 { margin: 0; flex: 1 1 auto; }
.kv-stopwin { margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.kv-stopwin > summary { cursor: pointer; padding: 9px 0; font-weight: 700; font-size: 14.5px; }
.kv-stopwin > summary small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.kv-stopwin[open] { padding-bottom: 8px; }
.kv-stoplist { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kv-stoprow { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.kv-stoprow:hover, .kv-stoprow.on { border-color: #f59e0b; }
.kv-stoprow b { display: block; font-size: 14px; } .kv-stoprow small { display: block; color: var(--muted); font-size: 12.5px; }
.kv-stoprow i { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.kv-stopic { font-size: 18px; text-align: center; }
.kv-stopmk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: #fff; border: 2px solid #f59e0b; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); cursor: pointer; }
.kv-stopmk.on { background: #f59e0b; transform: scale(1.2); }
.kv-stopbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.kv-it > li.kv-dayhead { display: block; grid-template-columns: none; border-bottom: 0; }
.kv-dayhead { list-style: none; margin: 10px 0 4px; padding: 6px 10px; border-radius: 8px; background: var(--accent-faint, rgba(37, 99, 235, .08)); font-weight: 700; font-size: 14px; }
.kv-nightstage .kv-viatag { background: #312e81; color: #fff; }

/* Leirplass on a phone: the filter chips as one row to swipe, not a screen of chips */
@media (max-width: 700px) {
  .np-filtc { flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }   /* inside the card; a fade at the right edge says there is more */
  .np-filtc::-webkit-scrollbar { display: none; }
  .np-filtc > * { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
}
