:root {
  --bg:          #f8fafc;
  --surface:     #ffffff;
  --surface-soft:#f1f5f9;
  --border:      #d9e4ef;
  --text:        #102033;
  --muted:       #64748b;
  --brand:       #0f766e;
  --brand-dark:  #134e4a;
  --accent:      #0f766e;
  --low:         #059669;
  --normal:      #2563eb;
  --high:        #d97706;
  --flood:       #dc2626;
  --yr:          #0f766e;
  --shadow:      0 1px 2px rgba(15, 37, 64, .05), 0 10px 28px rgba(15, 37, 64, .07);
  --shadow-h:    0 8px 22px rgba(15, 37, 64, .11), 0 18px 38px rgba(15, 37, 64, .08);
  --hero-gradient: linear-gradient(145deg, #134e4a 0%, #0f766e 54%, #155e75 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── HEADER ─────────────────────────────────── */
.site-header {
  position: relative;
  overflow: hidden;
  background: var(--hero-gradient);
  color: #fff;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: auto -10% -42px -10%;
  height: 140px;
  background:
    repeating-linear-gradient(170deg, rgba(255,255,255,.11) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, transparent, rgba(255,255,255,.08));
  opacity: .45;
  pointer-events: none;
}
.header-nav,
.header-hero {
  position: relative;
  z-index: 1;
}

.header-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo a { display: flex; line-height: 0; }
.logo a:hover .site-logo-img { opacity: .85; transition: opacity .15s; }
.site-logo-img {
  display: block;
  width: 204px;
  height: 56px;
  max-height: 56px;
  background: transparent;
  border: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: center;
}
.logo {
  white-space: nowrap;
}

.header-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 28px 48px;
}

.hero-title {
  font-weight: 800;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  color: #fff;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 10px;
}

.hero-sub {
  max-width: 660px;
  font-size: 1rem;
  color: rgba(255,255,255,.84);
  line-height: 1.65;
  margin-bottom: 24px;
}

.search-wrap {
  position: relative;
  max-width: 780px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.search-shell {
  flex: 1 1 310px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  padding: 0 16px;
  cursor: text;
  transition: border-color .15s, background .15s;
}
.search-shell:focus-within {
  border-color: rgba(255,255,255,.64);
  background: rgba(255,255,255,.17);
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.search-shell svg { flex-shrink: 0; opacity: .6; }
.search-input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  line-height: 1;
}
.search-input::placeholder { color: rgba(255,255,255,.45); }
.search-clear {
  background: none; border: none; outline: none;
  cursor: pointer; color: rgba(255,255,255,.55);
  font-size: .9rem; padding: 0 2px; line-height: 1;
  flex-shrink: 0; display: flex; align-items: center;
}
.search-clear:hover { color: #fff; }
.nearby-btn {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  min-height: 46px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  padding: 0 13px;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.nearby-btn-label {
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 500;
  white-space: nowrap;
}
.nearby-btn:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.nearby-btn.active {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.flood-btn.active {
  background: rgba(192,37,27,.34);
  border-color: rgba(255,255,255,.72);
  color: #fff;
}
.flood-btn {
  background: rgba(192,37,27,.22);
  border-color: rgba(255,255,255,.34);
  color: #fff;
}
.flood-btn:hover {
  background: rgba(192,37,27,.34);
  border-color: rgba(255,255,255,.58);
}
.high-flow-btn {
  background: rgba(245,158,11,.18);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.high-flow-btn:hover,
.high-flow-btn.active {
  background: rgba(245,158,11,.32);
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.nearby-btn.spinning svg {
  animation: nearby-spin .9s linear infinite;
}
@keyframes nearby-spin { to { transform: rotate(360deg); } }
.dist-badge {
  display: inline-block;
  margin-left: 7px;
  font-size: .7rem; font-weight: 600;
  color: var(--accent);
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 5px;
  padding: 1px 6px;
  vertical-align: middle;
}
/* ── SØKERESULTATER ──────────────────────────── */
.search-results {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,40,100,.18);
  z-index: 2000;
  max-height: 440px; overflow-y: auto;
}
.search-results[hidden] { display: none; }
.search-result-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item:focus { background: #f0f5ff; outline: none; }
.search-result-name { font-size: .88rem; font-weight: 600; color: var(--text); }
.search-result-meta { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.search-result-tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.search-result-tag {
  font-size: .64rem; font-weight: 500; padding: 2px 7px;
  border-radius: 10px; background: var(--bg); color: var(--muted);
  border: 1px solid var(--border); white-space: nowrap;
}
.search-no-results {
  padding: 18px 14px; color: var(--muted);
  font-size: .84rem; text-align: center;
}

/* ── INFO BAND ───────────────────────────────── */
.info-band {
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--border);
}
.info-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  box-sizing: border-box;
}
.info-inner::-webkit-scrollbar { display: none; }
.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.info-item:first-child { padding-left: 0; }
.info-item:last-child  { border-right: none; }
.info-icon {
  width: 30px; height: 30px;
  background: rgba(15,118,110,.09);
  color: var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem;
  flex-shrink: 0;
}
.info-lbl  { font-size: .78rem; font-weight: 600; color: var(--text); }
.info-desc { font-size: .68rem; color: var(--muted); margin-top: 1px; }

/* ── MAIN ────────────────────────────────────── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 28px 76px;
}

/* ── TOOLBAR ─────────────────────────────────── */
.toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: .74rem; color: var(--muted); font-weight: 500;
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.controls { display: flex; align-items: center; gap: 8px; }
.range-lbl { font-size: .76rem; color: var(--muted); font-weight: 500; }

.range-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .76rem; font-weight: 500;
  min-height: 34px;
  padding: 6px 14px; border-radius: 999px;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all .15s;
}
.range-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(37,99,235,.06); }
.range-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.range-btn span {
  margin-left: 4px;
  color: inherit;
  opacity: .72;
  font-size: .68rem;
}

.load-status {
  max-width: 1200px;
  margin: -6px auto 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--muted);
  font-size: .82rem;
}
.load-status-main {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.load-status-text { font-weight: 600; color: var(--text); }
.load-status-time { font-size: .74rem; white-space: nowrap; }
.load-status.done .spinner { display: none; }
.load-status.done .load-status-text { color: var(--low); }

.front-explainer {
  max-width: 1200px;
  margin: -2px auto 18px;
}
.front-explainer-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.front-explainer h2,
.dynamic-explainer h2 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: .92rem;
  font-weight: 800;
}
.front-explainer p,
.dynamic-explainer p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.65;
}
.front-explainer-inner > div,
.dynamic-explainer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 15px 17px;
}
.dynamic-explainer {
  max-width: 1200px;
  margin: 0 auto 16px;
}

.refresh-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .76rem; font-weight: 500;
  min-height: 34px;
  padding: 6px 14px; border-radius: 999px;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all .15s;
  display: flex; align-items: center; gap: 5px;
}
.refresh-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: rgba(37,99,235,.06); }
.refresh-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── SECTION ─────────────────────────────────── */
.section-block { margin-bottom: 48px; }

.section-header { margin-bottom: 16px; }

.section-title {
  font-size: 1.2rem; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 1.1em;
  background: var(--brand);
  border-radius: 2px; flex-shrink: 0;
}
.section-sub { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.back-to-overview {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .78rem; color: var(--accent);
  background: none; border: none; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
  margin-top: 6px;
}
.back-to-overview:hover { opacity: .72; }

/* ── HØYFILTER ───────────────────────────────── */
.high-filter-btn { border-color: var(--high); color: var(--high); }
.high-filter-btn:hover { border-color: var(--high); color: var(--high); background: rgba(217,119,6,.08); }
.high-filter-btn.active { background: var(--high); border-color: var(--high); color: #fff; }
.high-filter-note {
  margin-top: 10px;
  font-size: .72rem; color: var(--muted);
  background: var(--bg); border-left: 3px solid var(--border);
  border-radius: 0 6px 6px 0; padding: 6px 10px;
  width: 100%;
}
.high-filter-empty {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: .84rem;
}
.section-load-status {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: .78rem;
  display: flex; align-items: center; gap: 10px;
}
.section-load-status[hidden] { display: none; }

/* ── GRID ────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 16px;
  min-height: 60px;
}
.station-grid + .station-grid { margin-top: 16px; }

/* ── CARD ────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s, transform .15s, border-color .15s;
  animation: fadeIn .35s ease forwards;
  box-shadow: var(--shadow);
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); border-color: rgba(15,118,110,.24); }
/* Knapper og lenker inne i kortet beholder sin egen cursor */
.card button, .card a { cursor: pointer; }

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
}
.card.lav::before    { background: var(--low);    }
.card.normal::before { background: var(--normal);  }
.card.høy::before    { background: var(--high);   }
.card.flom::before   { background: var(--flood);  }
.card.ukjent::before { background: var(--border); }

.card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}

.station-name {
  font-size: 1.04rem; font-weight: 750;
  color: var(--text); line-height: 1.25;
}
.station-id { font-size: .71rem; color: var(--muted); margin-top: 3px; }

.header-right {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 6px; flex-shrink: 0;
}
.header-right-actions {
  display: flex; align-items: center; gap: 5px;
}

.status-badge {
  font-size: .68rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.badge-lav    { background: #d1fae5; color: #047857; }
.badge-normal { background: #dbeafe; color: #1d4ed8; }
.badge-høy    { background: #ffedd5; color: #9a3412; }
.badge-flom   { background: #fee2e2; color: #991b1b; }
.badge-ukjent { background: #f1f5f9; color: var(--muted); }

.trend { font-size: 1rem; line-height: 1; font-weight: 600; }
.change-up   { color: var(--flood); }
.change-down { color: var(--low);   }
.change-flat { color: var(--muted); }

/* ── METRICS ─────────────────────────────────── */
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 14px;
}
.metrics.metrics-3 { grid-template-columns: 1fr 1fr 1fr; }

.metric {
  background: var(--surface-soft);
  border: 1px solid rgba(217,228,239,.75);
  border-radius: 8px; padding: 11px 12px;
}
.metric-label {
  font-size: .65rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
  font-weight: 600; margin-bottom: 4px;
}
.metric-value {
  font-size: 1.48rem; font-weight: 800;
  color: var(--text); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.metrics.metrics-3 .metric-value { font-size: 1.15rem; }
.metric-unit {
  font-size: .7rem; color: var(--muted);
  margin-left: 2px; font-family: 'Inter', sans-serif;
}
.metric-change { font-size: .67rem; margin-top: 4px; font-weight: 500; }

.extra-measurements {
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: -2px 0 14px;
}
.extra-measurements-title {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.extra-measurements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.extra-measurement { min-width: 0; }
.extra-measurement-label {
  font-size: .68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.extra-measurement-value {
  font-family: 'Inter', sans-serif;
  font-size: .98rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}
.extra-measurement-unit {
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}

/* ── NORMAL COMPARE ──────────────────────────── */
.normal-compare { margin-bottom: 16px; }
.nc-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 8px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.nc-title {
  font-size: .75rem; font-weight: 600;
  color: var(--muted); margin-bottom: 3px;
}
.nc-last { font-size: .82rem; color: var(--text); font-weight: 600; }
.nc-last span { color: var(--muted); font-weight: 400; }
.nc-chip {
  font-size: .8rem; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  white-space: nowrap; flex-shrink: 0;
}
.nc-under { background: #eff6ff; color: #1e40af; }
.nc-ok    { background: #f0fdf4; color: #166534; }
.nc-over  { background: #fffbeb; color: #92400e; }
.nc-flood { background: #fef2f2; color: #991b1b; }
.norm-chart-wrap { margin-bottom: 2px; }
.norm-chart-svg {
  width: 100%; height: 110px;
  display: block; border-radius: 6px;
}
.chart-outer { display: flex; gap: 4px; align-items: stretch; }
.chart-yaxis {
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: .6rem; color: var(--muted); width: 32px; text-align: right;
  flex-shrink: 0; padding-bottom: 18px;
}
.chart-inner { flex: 1; min-width: 0; }
.chart-xaxis {
  display: flex; justify-content: space-between;
  font-size: .6rem; color: var(--muted); margin-top: 2px; padding: 0 2px;
}
.chart-unit {
  font-size: .58rem; color: var(--muted); font-weight: 400;
}
.stage-chart .nc-header { margin-bottom: 4px; }
.nc-footer {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  margin-top: 6px; flex-wrap: wrap;
}
.norm-chart-legend {
  display: flex; gap: 12px;
  font-size: .62rem; color: var(--muted);
}
.ncl-band { display: flex; align-items: center; gap: 4px; }
.ncl-band::before {
  content: ''; width: 14px; height: 8px; flex-shrink: 0;
  display: inline-block;
  background: rgba(34,197,94,.22); border: 1px solid #86c5a0; border-radius: 2px;
}
.ncl-obs { display: flex; align-items: center; gap: 4px; }
.ncl-obs::before {
  content: ''; width: 14px; height: 2px; flex-shrink: 0;
  display: inline-block; background: var(--accent); border-radius: 1px;
}
.nc-trend { font-size: .72rem; font-weight: 600; white-space: nowrap; }
.nc-trend.change-up   { color: var(--flood); }
.nc-trend.change-down { color: var(--low);   }
.nc-trend.change-flat { color: var(--muted); }
.chart-fallback {
  font-size: .72rem;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
}


/* ── YR SECTION ──────────────────────────────── */
.yr-section {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
}
.yr-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.yr-logo {
  font-family: 'Inter', sans-serif;
  font-size: .74rem; font-weight: 800;
  color: var(--accent); letter-spacing: .04em;
}
.yr-tag {
  font-size: .62rem; color: #4d80c0;
  background: rgba(37,99,235,.1);
  border: 1px solid rgba(37,99,235,.15);
  padding: 1px 7px; border-radius: 8px; font-weight: 500;
}
.yr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.yr-item { text-align: center; }
.yr-item-label {
  font-size: .62rem; color: #5586be;
  text-transform: uppercase; letter-spacing: .05em;
  font-weight: 600; margin-bottom: 2px;
}
.yr-item-value {
  font-size: .88rem; color: #89b1d9;
  font-family: 'Inter', sans-serif; font-weight: 700;
}
.yr-note { font-size: .63rem; color: #89b1d9; margin-top: 7px; font-style: italic; }

/* ── TIMESTAMP ───────────────────────────────── */
.timestamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  font-size: .7rem;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 8px;
  margin-top: 8px;
  font-weight: 600;
}
/* Wikipedia-seksjon */
.wiki-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 12px;
}
.wiki-inner {
  display: flex; gap: 16px; align-items: flex-start;
}
.wiki-thumb {
  width: 90px; height: 90px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
}
.wiki-content { flex: 1; min-width: 0; }
.wiki-label {
  font-size: .67rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.wiki-title {
  font-size: .95rem; font-weight: 600; color: var(--text); margin-bottom: 6px;
}
.wiki-extract {
  font-size: .82rem; color: var(--text); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.wiki-link {
  display: inline-block; margin-top: 8px;
  font-size: .75rem; font-weight: 500; color: var(--accent);
  text-decoration: none;
}
.wiki-link:hover { text-decoration: underline; }

/* ── Vann-Nett tilstandsbadge ──────────────────────────────────────────── */
.vn-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.vn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.vn-info { flex: 1; min-width: 0; }
.vn-label {
  font-size: .67rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 3px;
}
.vn-wb-name {
  font-size: .82rem; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vn-link {
  font-size: .72rem; color: var(--accent); text-decoration: none;
  white-space: nowrap; font-weight: 500;
}
.vn-link:hover { text-decoration: underline; }

/* ── Historiske rekorddata ── */
.rekord-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  margin-top: 12px;
}
.rekord-header {
  font-size: .67rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.rekord-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; flex-wrap: wrap;
  padding: 4px 0;
  border-top: 1px solid var(--bg);
}
.rekord-row:first-of-type { border-top: none; }
.rekord-label {
  font-size: .78rem; color: var(--muted);
}
.rekord-val {
  font-size: .78rem; font-weight: 600; color: var(--text);
  white-space: nowrap;
}

.card-footer-actions {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.maps-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px;
  font-size: .78rem; font-weight: 600; color: var(--accent);
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 7px;
  padding: 6px 12px; text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s;
}
.maps-btn:hover { background: #dbeafe; border-color: var(--accent); transform: translateY(-1px); }
.share-btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 32px;
  background: none; border: 1px solid var(--border); border-radius: 7px;
  color: var(--muted); cursor: pointer; padding: 5px 8px; gap: 4px;
  font-size: .72rem; font-weight: 500; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.share-btn:hover { color: var(--accent); border-color: var(--accent); background: rgba(37,99,235,.06); }
.share-btn.copied { color: var(--low); border-color: var(--low); }
.timestamp.stale-warning {
  display: flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 500;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 4px 8px;
}

/* ── LOADING ─────────────────────────────────── */
.loading-placeholder {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: .82rem;
  padding: 24px 0; grid-column: 1 / -1;
}
.skeleton-card {
  min-height: 190px;
  pointer-events: none;
}
.skeleton-line {
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf3fa 25%, #f7faff 45%, #edf3fa 65%);
  background-size: 220% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  margin-bottom: 12px;
}
.skeleton-line.wide { width: 70%; height: 16px; }
.skeleton-line.mid { width: 48%; }
.skeleton-line.short { width: 30%; }
.skeleton-box {
  height: 64px;
  border-radius: 8px;
  background: #f4f8fd;
  border: 1px solid var(--border);
  margin-top: 18px;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid #dde5ef;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -220% 0; } }

/* ── HEADER NAV LINKS ────────────────────────── */
.header-nav-links {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
  min-width: 0;
}
.header-nav-links::-webkit-scrollbar {
  display: none;
}
.nav-link-btn {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  min-height: 38px;
  border-radius: 8px;
  color: rgba(255,255,255,.85);
  font-family: 'Inter', sans-serif;
  font-size: .8rem; font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.nav-link-btn:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.nav-link-btn.active {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.55);
  color: #fff;
}

/* ── INNHOLDSSIDER ──────────────────────────── */
.content-hero {
  background: var(--hero-gradient);
  color: #fff;
  padding: 34px 28px 46px;
}
.content-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.content-eyebrow {
  font-size: .76rem;
  font-weight: 600;
  color: rgba(255,255,255,.72);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.content-title {
  font-weight: 800;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.15;
  margin-bottom: 12px;
}
.content-lead {
  max-width: 720px;
  color: rgba(255,255,255,.82);
  font-size: .98rem;
  line-height: 1.65;
}
.content-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 38px 28px 74px;
}
.content-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 18px;
}
.content-section h2,
.content-section h3 {
  color: var(--text);
  line-height: 1.25;
}
.content-section h2 {
  font-size: 1.18rem;
  margin-top: 32px;
  margin-bottom: 12px;
}
.content-section h2:first-child {
  margin-top: 0;
}
.content-section h3 {
  font-size: 1rem;
  margin: 22px 0 8px;
}
.content-section p,
.content-section li {
  font-size: .92rem;
  line-height: 1.75;
  color: var(--text);
}
.content-section p + p {
  margin-top: 13px;
}
.content-section ul {
  margin: 10px 0 0 20px;
}
.content-section a {
  color: var(--accent);
}
.content-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: var(--surface-soft);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.65;
}
.station-static-info {
  width: 100%;
  margin: 0;
  padding: 28px 0 0;
}
.station-static-inner {
  max-width: 720px;
  background: var(--surface-soft);
  border-radius: 10px;
  padding: 20px 24px;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.7;
}
.station-static-inner h2 {
  margin: 20px 0 10px;
  color: var(--text);
  font-size: .96rem;
  line-height: 1.3;
}
.station-static-inner h2:first-child {
  margin-top: 0;
}
.station-static-inner p {
  margin: 0 0 10px;
}
.station-static-inner p:last-child {
  margin-bottom: 0;
}
.station-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}
.station-fact {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.station-fact span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.35;
}
.station-fact strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: .88rem;
  line-height: 1.35;
}
.station-fact em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .72rem;
  font-style: normal;
  line-height: 1.35;
}
.station-static-links {
  font-size: .88rem;
}
.station-static-links a {
  color: var(--accent);
  text-decoration: none;
}
.station-static-links a:hover {
  text-decoration: underline;
}
.lakse-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 6px;
  padding: 10px 14px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s;
}
.lakse-badge:hover { background: #d1fae5; }
.lakse-badge--nlv {
  background: #fffbeb;
  border-color: #fcd34d;
}
.lakse-badge--nlv:hover { background: #fef3c7; }
.lakse-badge__icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}
.lakse-badge__body { display: flex; flex-direction: column; gap: 2px; }
.lakse-badge__title {
  font-size: .82rem;
  font-weight: 700;
  color: #065f46;
  line-height: 1.2;
}
.lakse-badge--nlv .lakse-badge__title { color: #92400e; }
.lakse-badge__desc {
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.45;
}
.fun-facts-box {
  margin-top: 16px;
  padding: 14px 18px;
  background: #eef4ff;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.fun-facts-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 8px;
}
.fun-facts-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fun-facts-list li {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.6;
}
@media (max-width: 560px) {
  .station-static-info {
    padding-left: 14px;
    padding-right: 14px;
  }
  .station-static-inner {
    padding: 18px 16px;
  }
  .station-fact-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 920px) {
  .station-static-inner {
    max-width: calc((100% - 16px) / 2);
  }
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.guide-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 22px;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s, border-color .15s;
}
.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-h);
  border-color: rgba(15,118,110,.3);
}
.guide-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.guide-card p {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.6;
}
.guide-card-date {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 12px;
  opacity: .75;
}
.article-meta {
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: baseline;
}
.article-meta-source {
  font-weight: 600;
  color: var(--text);
}
.article-meta-dates {
  color: var(--muted);
}

/* ── SUBPAGE ─────────────────────────────────── */
.subpage[hidden] { display: none; }
.subpage-hero {
  background: var(--hero-gradient);
  color: #fff;
  padding: 32px 28px 40px;
}
.subpage-hero-inner { max-width: 1200px; margin: 0 auto; }
.subpage-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 7px;
  color: rgba(255,255,255,.8);
  font-family: 'Inter', sans-serif;
  font-size: .78rem; font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background .15s;
  text-decoration: none;
}
.subpage-back:hover { background: rgba(255,255,255,.2); color: #fff; }
.subpage-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  color: #fff;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: 8px;
}
.subpage-sub {
  font-size: .95rem;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
  max-width: 560px;
}
.subpage-body {
  background: var(--bg);
}

/* ── FORKLARING ──────────────────────────────── */
.magasin-explainer {
  padding: 48px 28px 56px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.magasin-explainer-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem; font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}
.magasin-explainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.explainer-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}
.explainer-icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
  line-height: 1;
}
.explainer-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: .92rem; font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.explainer-card p {
  font-size: .81rem;
  color: var(--muted);
  line-height: 1.7;
}
.explainer-card a { color: var(--accent); text-decoration: none; }
.explainer-card a:hover { text-decoration: underline; }

@media (max-width: 680px) {
  .subpage-hero { padding: 24px 16px 32px; }
  .magasin-explainer { padding: 36px 16px 40px; }
  .nav-link-btn span.nav-link-label { display: none; }
}

/* ── MAGASIN SECTION ─────────────────────────── */
.magasin-section {
  background: #f0f5fb;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 28px 52px;
}
.magasin-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.magasin-header {
  margin-bottom: 24px;
}
.magasin-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.magasin-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 1.1em;
  background: var(--brand);
  border-radius: 2px; flex-shrink: 0;
}
.magasin-meta {
  font-size: .76rem; color: var(--muted);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.magasin-meta-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(15,118,110,.08);
  border: 1px solid rgba(15,118,110,.14);
  border-radius: 20px; padding: 2px 10px;
  font-size: .7rem; font-weight: 500; color: var(--accent);
}

.magasin-chart-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.98)),
    linear-gradient(120deg, rgba(15,118,110,.08), transparent 42%);
  border: 1px solid rgba(15,118,110,.14);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 18px 45px rgba(15, 37, 64, .10);
}
.magasin-chart-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}
.magasin-chart-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}
.magasin-chart-subtitle {
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}
.magasin-chart-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}
.magasin-chart-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.magasin-metric-controls {
  background: #edf5ff;
  border: 1px solid rgba(37,99,235,.10);
  border-radius: 9px;
  padding: 3px;
}
.magasin-chart-btn {
  border: 1px solid var(--border);
  background: #f8fbff;
  color: var(--muted);
  border-radius: 7px;
  padding: 6px 9px;
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
}
.magasin-chart-btn:hover {
  border-color: rgba(37,99,235,.35);
  color: var(--accent);
}
.magasin-chart-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.magasin-chart-stats {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) repeat(2, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.magasin-stat-tile {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(15,118,110,.12);
  border-radius: 10px;
  padding: 12px 14px;
}
.magasin-stat-tile.primary {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  border-color: transparent;
}
.magasin-stat-tile.above { background: #f0fdf4; border-color: rgba(22,101,52,.13); }
.magasin-stat-tile.below { background: #fff7ed; border-color: rgba(146,64,14,.13); }
.magasin-stat-label {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 5px;
}
.magasin-stat-tile.primary .magasin-stat-label,
.magasin-stat-tile.primary small { color: rgba(255,255,255,.75); }
.magasin-stat-tile strong {
  display: block;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.25;
}
.magasin-stat-tile.primary strong {
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.35rem;
}
.magasin-stat-tile small {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  margin-top: 3px;
}
.magasin-chart {
  position: relative;
  min-height: 315px;
}
.magasin-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 300px;
  border-radius: 12px;
  touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(15,118,110,.08);
}
.magasin-chart-axis {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  fill: #6c7d90;
}
.magasin-chart-hover-line {
  stroke: var(--brand);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
  opacity: .75;
}
.magasin-chart-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  fill: var(--brand);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}
.magasin-chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 150px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 28px rgba(15,23,42,.14);
  padding: 9px 10px;
  color: var(--text);
  pointer-events: none;
}
.magasin-chart-tooltip strong,
.magasin-chart-tooltip span {
  display: block;
  font-size: .7rem;
  line-height: 1.45;
}
.magasin-chart-tooltip strong {
  font-size: .76rem;
  margin-bottom: 2px;
}
.magasin-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: .68rem;
  color: var(--muted);
}
.magasin-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.magasin-chart-legend span::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 8px;
  border-radius: 4px;
}
.magasin-chart-legend .legend-range::before { background: rgba(37,99,235,.13); }
.magasin-chart-legend .legend-median::before { height: 2px; background: #16a34a; }
.magasin-chart-legend .legend-current::before { height: 3px; background: var(--accent); }

/* National summary card */
.magasin-national {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.magasin-national-label {
  font-family: 'Inter', sans-serif;
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.magasin-national-pct {
  font-family: 'Inter', sans-serif;
  font-size: 2rem; font-weight: 800;
  color: var(--accent); line-height: 1;
  flex-shrink: 0;
}
.magasin-national-bar-wrap {
  flex: 1; min-width: 200px;
}
.magasin-national-stats {
  font-size: .74rem; color: var(--muted);
  flex-shrink: 0;
  line-height: 1.65;
  text-align: right;
}
.magasin-national-stats strong { color: var(--text); font-weight: 600; }

/* Fill bar */
.fill-bar-wrap {
  position: relative; width: 100%; height: 22px;
  display: flex; align-items: center;
}
.fill-bar-track {
  position: relative; width: 100%; height: 14px;
  background: #e0e9f4; border-radius: 7px; overflow: visible;
}
.fill-bar-range {
  position: absolute; top: 0; height: 100%;
  background: rgba(37,99,235,.15);
  border-radius: 7px;
  pointer-events: none;
}
.fill-bar-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  border-radius: 7px;
  transition: width .5s ease;
  min-width: 6px;
}
.fill-bar-fill.above  { background: linear-gradient(90deg, #0f766e, #0d9488); }
.fill-bar-fill.normal { background: linear-gradient(90deg, #0f766e, #0d9488); }
.fill-bar-fill.below  { background: linear-gradient(90deg, #e07b00, #f59e0b); }
.fill-bar-median {
  position: absolute; top: -3px;
  width: 2px; height: 20px;
  background: #16a34a;
  border-radius: 1px;
  pointer-events: none;
}
.fill-bar-legend {
  display: flex; justify-content: space-between;
  font-size: .59rem; color: var(--muted);
  margin-top: 4px;
  padding: 0 1px;
}
.fill-bar-legend-item {
  display: flex; align-items: center; gap: 3px;
}
.fill-bar-legend-item::before {
  content: ''; display: inline-block;
  width: 8px; height: 8px; border-radius: 2px;
  background: rgba(37,99,235,.15); border: 1px solid rgba(37,99,235,.2);
}
.fill-bar-legend-item.median-item::before {
  width: 2px; height: 10px; border-radius: 1px;
  background: #16a34a; border: none;
}

/* Regional grid */
.magasin-regions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.magasin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  animation: fadeIn .35s ease forwards;
}
.magasin-card-region {
  font-size: .68rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; margin-bottom: 2px;
}
.magasin-card-name {
  font-family: 'Inter', sans-serif;
  font-size: .94rem; font-weight: 700;
  color: var(--text); margin-bottom: 12px;
}
.magasin-card-pct {
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent); line-height: 1;
  margin-bottom: 10px;
}
.magasin-card-change {
  font-size: .72rem; font-weight: 600;
  margin-left: 6px; vertical-align: middle;
}
.magasin-card-vs {
  font-size: .7rem; color: var(--muted);
  margin-top: 8px;
  display: flex; align-items: center; gap: 6px;
}
.magasin-vs-chip {
  display: inline-flex; align-items: center;
  font-size: .66rem; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  white-space: nowrap;
}
.magasin-vs-chip.above  { background: #f0fdf4; color: #166534; }
.magasin-vs-chip.below  { background: #fffbeb; color: #92400e; }
.magasin-vs-chip.normal { background: #eff6ff; color: #1e40af; }

/* Skeleton for magasin */
.magasin-skeleton {
  background: linear-gradient(90deg, #e8eef6 25%, #f0f5fb 45%, #e8eef6 65%);
  background-size: 220% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: 12px;
  min-height: 140px;
}

@media (max-width: 680px) {
  .magasin-section { padding: 36px 16px 40px; }
  .magasin-chart-panel { padding: 14px; }
  .magasin-chart-top { display: block; }
  .magasin-chart-actions {
    justify-items: stretch;
    margin-top: 12px;
  }
  .magasin-chart-controls { justify-content: flex-start; }
  .magasin-chart-stats { grid-template-columns: 1fr; }
  .magasin-national { gap: 16px; padding: 18px 16px; }
  .magasin-national-stats { text-align: left; }
  .magasin-regions { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 480px) {
  .magasin-regions { grid-template-columns: 1fr; }
}

/* ── ABOUT SECTION ───────────────────────────── */
.articles-section {
  border-top: 1px solid var(--border);
  padding: 44px 28px 48px;
  background: var(--bg);
}
.articles-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.articles-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}
.articles-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.articles-all-link {
  font-size: .8rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.articles-all-link:hover { text-decoration: underline; }
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.article-list-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: background .12s, border-color .12s, transform .12s, box-shadow .12s;
}
.article-list-item:hover {
  background: #f8fbff;
  border-color: rgba(15,118,110,.26);
  box-shadow: 0 8px 18px rgba(15,37,64,.06);
  transform: translateY(-1px);
}
.article-list-item-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.article-list-item-date {
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .article-list-item { flex-direction: column; gap: 3px; }
  .article-list-item-date { font-size: .7rem; }
}
.about-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 28px 52px;
}
.about-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 260px;
  gap: 48px; align-items: start;
}
.about-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem; font-weight: 800;
  color: var(--text); margin-bottom: 14px;
}
.about-text p {
  font-size: .86rem; color: var(--muted); line-height: 1.75;
  margin-bottom: 12px;
}
.about-text a { color: var(--accent); text-decoration: none; }
.about-text a:hover { text-decoration: underline; }
.about-disclaimer {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 6px; padding: 11px 14px;
  font-size: .8rem; color: #78350f; line-height: 1.65;
}
.about-disclaimer strong { font-weight: 600; }
.about-disclaimer a { color: var(--accent); }
.about-facts {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 20px;
}
.fact-item {
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.fact-item:last-child { border-bottom: none; padding-bottom: 0; }
.fact-item:first-child { padding-top: 0; }
.fact-label {
  font-size: .6rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 600; margin-bottom: 2px;
}
.fact-value { font-size: .81rem; color: var(--text); font-weight: 500; }

/* ── FOOTER ──────────────────────────────────── */
footer {
  background: #0d2e2b;
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 44px 28px 32px;
  color: #8cb5b1;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 32px 24px;
  padding-bottom: 32px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-logo {
  font-weight: 800; font-size: 1rem; color: #fff;
  margin-bottom: 8px;
}
.footer-logo em { font-style: normal; color: #5ecdc7; }
.footer-tagline {
  font-size: .76rem; color: #7aa5a1; line-height: 1.65; max-width: 240px;
}
.footer-col-title {
  font-family: 'Inter', sans-serif;
  font-size: .78rem; font-weight: 600;
  color: #b8d8d5; margin-bottom: 12px;
}
.footer-col a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .82rem; color: #7ecec8;
  text-decoration: none; margin-bottom: 8px;
  transition: color .15s;
}
.footer-col a:hover { color: #b2dfdb; }
.footer-disclaimer {
  font-family: 'Inter', sans-serif;
  font-size: .78rem; color: #8cb5b1; line-height: 1.65;
}
.footer-disclaimer strong { color: #a5ceca; font-weight: 600; }
.footer-disclaimer a { color: #7ecec8; display: inline; }
.footer-contact {
  display: inline-block; margin-top: 10px;
  color: #7ecec8; font-size: .8rem; text-decoration: none;
}
.footer-contact:hover { color: #b2dfdb; text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: .7rem; color: #8cb5b1;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 20px; margin-top: 4px;
}

/* ── COOKIE BANNER ───────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,.18);
}
.cookie-banner__inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 14px 20px;
}
.cookie-banner__text { flex: 1; min-width: 220px; }
.cookie-banner__title { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.cookie-banner__text p { font-size: .78rem; color: var(--muted); margin: 0; }
.cookie-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-banner__btn {
  min-height: 36px;
  padding: 7px 16px; border-radius: 7px; font-size: .8rem;
  font-weight: 600; cursor: pointer; border: 1px solid var(--border);
  transition: opacity .15s;
}
.cookie-banner__btn:hover { opacity: .82; }
.cookie-banner__btn--secondary { background: transparent; color: var(--muted); }
.cookie-banner__btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── FYLKE-FILTER ────────────────────────────── */
.fylke-filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 28px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.fylke-filter-bar .range-lbl { font-size: .76rem; color: var(--muted); font-weight: 500; }
.snapshot-filter-bar {
  margin-top: -8px;
}

/* ── MAP ─────────────────────────────────────── */
.map-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}
.map-header {
  padding: 18px 20px 12px;
}
.map-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
}
.map-sub {
  font-size: .76rem;
  color: var(--muted);
  margin-top: 4px;
}
#station-map {
  height: 420px;
  width: 100%;
  background: #dbe7ef;
}
.map-loading-overlay {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 500;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  color: var(--muted);
  font-size: .78rem;
}
.map-loading-overlay[hidden] { display: none; }
.leaflet-container {
  font-family: 'Inter', sans-serif;
}
.leaflet-vannNett-pane .vann-nett-waterbody {
  filter: drop-shadow(0 1px 2px rgba(8, 22, 48, .55));
}
.map-marker {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(24,36,58,.25), 0 0 0 2px rgba(255,255,255,.35);
}
.map-marker.lav { background: var(--low); }
.map-marker.normal { background: var(--normal); }
.map-marker.høy { background: var(--high); }
.map-marker.flom { background: var(--flood); }
.map-marker.ukjent { background: var(--muted); }
.map-marker.nøytral {
  width: 16px; height: 16px;
  background: #5b85a8;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 5px rgba(0,0,0,.3);
  opacity: 0.9;
}
/* Cluster-ikoner — match nettstedets farger */
.marker-cluster-small,
.marker-cluster-medium { background-color: rgba(15,118,110,.18); }
.marker-cluster-small div,
.marker-cluster-medium div { background-color: rgba(15,118,110,.68); color: #fff; font-weight: 600; }
.marker-cluster-large { background-color: rgba(217,119,6,.2); }
.marker-cluster-large div { background-color: rgba(217,119,6,.68); color: #fff; font-weight: 600; }
.map-popup {
  font-size: .78rem;
  color: var(--text);
  line-height: 1.45;
  min-width: 180px;
}
.map-popup strong {
  display: block;
  font-size: .92rem;
  margin-bottom: 4px;
  line-height: 1.25;
}
.map-popup a {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  margin-top: 6px;
  text-decoration: none;
}
.map-popup a:hover { text-decoration: underline; }

/* ── FILTER ──────────────────────────────────── */
.filter-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; width: 100%;
}
.filter-row + .filter-row {
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.filter-select {
  font-family: 'Inter', sans-serif;
  font-size: .76rem; font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 30px 5px 13px;
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5l3 3 3-3' stroke='%23627087' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .15s;
}
.filter-select:hover, .filter-select:focus { border-color: var(--accent); outline: none; }
.filter-count {
  font-size: .68rem; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 2px 8px; white-space: nowrap;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 680px) {
  .site-header { overflow: visible; }
  .header-nav  {
    position: sticky;
    top: 0;
    z-index: 1500;
    padding: 12px 16px;
    align-items: flex-start;
    flex-direction: column;
    background: rgba(19,78,74,.94);
    border-bottom: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(12px);
  }
  .header-nav-links { width: 100%; padding-bottom: 2px; }
  .nav-link-btn { min-height: 40px; font-size: .76rem; padding: 8px 12px; }
  .site-logo-img { width: 152px; height: 42px; max-height: 42px; }
  .header-hero { padding: 22px 16px 32px; }
  .info-inner  { padding: 0 16px; }
  main         { padding: 24px 16px 56px; }
  .toolbar     { padding: 12px 14px; }
  .load-status { margin: -6px 0 18px; align-items: flex-start; flex-direction: column; }
  .front-explainer { margin: -2px 0 18px; }
  .front-explainer-inner { grid-template-columns: 1fr; }
  .dynamic-explainer { margin: 0 0 16px; }
  #station-map { height: 340px; }
  .map-header  { padding: 16px 16px 10px; }
  .legend      { gap: 10px; }
  .search-wrap  { max-width: 100%; }
  .search-shell { max-width: 100%; min-height: 48px; }
  .nearby-btn { min-height: 44px; }
  .controls { width: 100%; flex-wrap: wrap; }
  .range-btn,
  .refresh-btn,
  .filter-select,
  .blank-county-btn,
  .cookie-banner__btn { min-height: 40px; }
  .grid        { grid-template-columns: 1fr; gap: 12px; }
  .card        { padding: 18px 16px; }
  .card-header { gap: 12px; }
  .about-section { padding: 36px 16px 40px; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .content-hero { padding: 28px 16px 36px; }
  .content-page { padding: 28px 16px 56px; }
  .content-section { padding: 22px 18px; }
  .guide-grid { grid-template-columns: 1fr; }
  footer       { padding: 36px 16px 28px; }
  .footer-top  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  /* Skjul "Nær meg"-teksten på smale skjermer så knappen ikke presser søkefeltet ut */
  .nearby-btn-label { display: none; }
}
@media (max-width: 420px) {
  .hero-title  { font-size: 1.3rem; }
  .site-logo-img { width: 137px; height: 38px; max-height: 38px; }
  .hero-sub    { font-size: .84rem; }
  .metrics.metrics-3 { grid-template-columns: 1fr 1fr; }
  .legend-item:nth-child(n+3) { display: none; }
  .footer-top  { grid-template-columns: 1fr; }
}

/* ── BLANK START ─────────────────────────────────────────────────────────── */
.seasonal-hint {
  display: inline-block;
  font-size: .74rem; font-weight: 500;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 18px;
  letter-spacing: .01em;
}
.seasonal-hint[hidden] { display: none; }

body.blank-start #station-map { height: 560px; }
body.blank-start .load-status { display: none; }
body.blank-start .toolbar     { display: none; }

.blank-start-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.blank-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 14px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  user-select: none;
}
.blank-tile:hover { box-shadow: var(--shadow-h); transform: translateY(-3px); }
.blank-tile-icon  { font-size: 1.9rem; line-height: 1; }
.blank-tile-label {
  font-family: 'Inter', sans-serif;
  font-size: .92rem; font-weight: 700; color: var(--text);
}
.blank-tile-desc  { font-size: .72rem; color: var(--muted); line-height: 1.4; }
.blank-tile--fav {
  border-color: #fde68a;
  background: #fffbeb;
}
.blank-tile--fav:hover { border-color: #f59e0b; }
.blank-tile--fav .blank-tile-label { color: #78350f; }
.blank-tile--fav-empty {
  border-color: var(--border);
  border-style: dashed;
  background: var(--surface);
  opacity: .85;
}
.blank-tile--fav-empty:hover { opacity: 1; border-color: #f59e0b; border-style: solid; }

.blank-county-section { margin-bottom: 28px; }
.blank-county-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.blank-county-title::before {
  content: ''; display: inline-block; width: 4px; height: 1.1em;
  background: var(--accent); border-radius: 2px; flex-shrink: 0;
}
.blank-county-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.blank-county-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-family: 'Inter', sans-serif;
  font-size: .82rem; font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.blank-county-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(37,99,235,.06);
}

.blank-tip {
  display: flex; align-items: baseline; gap: 8px;
  font-size: .82rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 24px;
  line-height: 1.45;
}
.blank-tip-icon { font-size: 1rem; flex-shrink: 0; }
.blank-tip strong { color: var(--text); }

.hva-skjer-sub { margin-bottom: 14px; }
.hva-skjer-sub-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .7rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 8px;
}
.hva-skjer-dismiss {
  background: none; border: 1px solid transparent; cursor: pointer;
  color: var(--muted); font-size: 1rem; line-height: 1;
  padding: 1px 7px; border-radius: 6px; transition: background .15s, color .15s;
}
.hva-skjer-dismiss:hover { background: var(--border); color: var(--text); border-color: var(--border); }

.hva-skjer-section { margin-bottom: 32px; }
.hva-skjer-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.hva-skjer-title::before {
  content: ''; display: inline-block; width: 4px; height: 1.1em;
  background: var(--accent); border-radius: 2px; flex-shrink: 0;
}
.hva-skjer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.hva-skjer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 14px 18px;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  box-shadow: var(--shadow);
  position: relative;
}
.hva-skjer-card:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.hva-skjer-card-x {
  position: absolute; top: 6px; right: 7px;
  background: none; border: none; cursor: pointer;
  color: var(--border); font-size: .85rem; line-height: 1;
  padding: 2px 4px; border-radius: 4px;
  transition: color .15s, background .15s;
  z-index: 1;
}
.hva-skjer-card:hover .hva-skjer-card-x { color: var(--muted); }
.hva-skjer-card-x:hover { color: var(--text) !important; background: var(--border); }
.hva-skjer-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 6px;
}
.hva-skjer-info  { flex: 1; min-width: 0; }
.hva-skjer-name {
  font-family: 'Inter', sans-serif;
  font-size: .88rem; font-weight: 600; color: var(--text);
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hva-skjer-meta  { font-size: .67rem; color: var(--muted); margin-top: 2px; }
.hva-skjer-nums  { flex-shrink: 0; text-align: right; }
.hva-skjer-val {
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem; font-weight: 700; color: var(--accent);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.hva-skjer-unit  { font-size: .68rem; color: var(--muted); }
.hva-skjer-age   { font-size: .68rem; color: var(--muted); margin-top: 5px; }

.fav-btn {
  display: flex; align-items: center; justify-content: center;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px;
  color: #92400e; cursor: pointer; padding: 5px 10px; gap: 5px;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.fav-btn:hover         { background: #fef3c7; border-color: #f59e0b; color: #78350f; }
.fav-btn.fav-active    { color: #78350f; border-color: #f59e0b; background: #fef3c7; }
.fav-btn.fav-active:hover { background: #fde68a; }

@media (max-width: 680px) {
  body.blank-start #station-map { height: 380px; }
}
@media (max-width: 420px) {
  .blank-tile-desc { display: none; }
}

/* ── DARK MODE ─────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0f172a;
    --surface:     #172033;
    --surface-soft:#111c2e;
    --border:      #29384d;
    --text:        #e5edf7;
    --muted:       #9aa8ba;
    --brand:       #2dd4bf;
    --brand-dark:  #0f766e;
    --accent:      #60a5fa;
    --low:         #34d399;
    --normal:      #60a5fa;
    --high:        #f59e0b;
    --flood:       #f87171;
    --yr:          #60a5fa;
    --shadow:      0 1px 2px rgba(0,0,0,.24), 0 10px 28px rgba(0,0,0,.28);
    --shadow-h:    0 8px 22px rgba(0,0,0,.34), 0 18px 38px rgba(0,0,0,.28);
  }

  .info-band,
  .station-fact,
  .search-results,
  .map-loading-overlay {
    background: var(--surface);
  }

  .metric,
  .extra-measurements,
  .chart-fallback,
  .content-note,
  .about-facts,
  .station-static-inner,
  .explainer-card,
  .blank-tip,
  .fun-facts-box {
    background: var(--surface-soft);
  }

  .search-result-item:hover,
  .search-result-item:focus,
  .article-list-item:hover {
    background: #1d2a40;
  }

  .badge-lav    { background: rgba(52,211,153,.16); color: #a7f3d0; }
  .badge-normal { background: rgba(96,165,250,.16); color: #bfdbfe; }
  .badge-høy    { background: rgba(245,158,11,.18); color: #fde68a; }
  .badge-flom   { background: rgba(248,113,113,.18); color: #fecaca; }

  #station-map {
    background: #1d2a40;
  }

  /* Yr-seksjon og -tag */
  .yr-section {
    background: var(--surface-soft);
    border-color: var(--border);
  }
  .yr-tag {
    background: var(--surface);
    border-color: var(--border);
    color: var(--accent);
  }

  /* Kart-lenke og delingsknapp */
  .maps-btn {
    background: var(--surface-soft);
    border-color: var(--border);
    color: var(--accent);
  }
  .maps-btn:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: #bfdbfe;
  }

  /* Foreldet-advarsel på tidsstempel */
  .timestamp.stale-warning {
    background: rgba(245,158,11,.15);
    border-color: rgba(245,158,11,.3);
    color: #fde68a;
  }

  /* Skeleton-boks (loading-placeholder) */
  .skeleton-box { background: var(--surface); }

  /* Normalt-chart-chips (under/ok/over/flom) */
  .nc-under { background: rgba(96,165,250,.16);  color: #bfdbfe; }
  .nc-ok    { background: rgba(52,211,153,.16);  color: #a7f3d0; }
  .nc-over  { background: rgba(245,158,11,.18);  color: #fde68a; }
  .nc-flood { background: rgba(248,113,113,.18); color: #fecaca; }

  /* Laksekort-lenker */
  .lakse-badge              { background: rgba(52,211,153,.08);  border-color: rgba(52,211,153,.22); }
  .lakse-badge:hover        { background: rgba(52,211,153,.15); }
  .lakse-badge--nlv         { background: rgba(245,158,11,.08);  border-color: rgba(245,158,11,.22); }
  .lakse-badge--nlv:hover   { background: rgba(245,158,11,.15); }
  .lakse-badge .lakse-badge__title { color: #a7f3d0; }
  .lakse-badge--nlv .lakse-badge__title { color: #fde68a; }
  .lakse-badge .lakse-badge__desc { color: var(--muted); }

  /* Magasinfylling-seksjonen */
  .magasin-section          { background: var(--bg); }
  .magasin-metric-controls  { background: var(--surface); border-color: var(--border); }
  .magasin-chart-panel      { background: var(--surface); border-color: var(--border); }
  .magasin-chart-btn        { background: var(--surface-soft); border-color: var(--border); color: var(--muted); }
  .magasin-chart-btn:hover  { background: var(--surface); border-color: var(--accent); color: #bfdbfe; }
  .magasin-chart-btn.active { background: var(--accent); border-color: var(--accent); color: #0f172a; }
  .magasin-stat-tile        { background: rgba(255,255,255,.04); border-color: var(--border); }
  .magasin-stat-tile.above  { background: rgba(52,211,153,.10);  border-color: rgba(52,211,153,.22); }
  .magasin-stat-tile.below  { background: rgba(245,158,11,.10);  border-color: rgba(245,158,11,.22); }
  .magasin-stat-tile strong { color: var(--text); }
  .magasin-stat-tile small  { color: var(--muted); }
  .magasin-vs-chip.above    { background: rgba(52,211,153,.16);  color: #a7f3d0; }
  .magasin-vs-chip.below    { background: rgba(245,158,11,.15);  color: #fde68a; }
  .magasin-vs-chip.normal   { background: rgba(96,165,250,.16);  color: #bfdbfe; }
  .magasin-skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-soft) 45%, var(--surface) 65%);
  }
  .fill-bar-track           { background: var(--surface); }
  .fill-bar-range           { background: rgba(96,165,250,.14); }
  .fill-bar-legend-item::before { background: rgba(96,165,250,.14); border-color: rgba(96,165,250,.24); }
  .fill-bar-legend-item.median-item::before { background: var(--low); }

  /* Ansvarsfraskrivelse */
  .about-disclaimer {
    background: rgba(245,158,11,.10);
    border-color: rgba(245,158,11,.25);
    color: #fde68a;
  }

  /* Favorittkort-tomt-tile */
  .blank-tile--fav          { background: rgba(245,158,11,.07); border-color: rgba(245,158,11,.28); }
  .blank-tile--fav .blank-tile-label { color: #fde68a; }

  /* Favoritt-knapp */
  .fav-btn                  { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.28); color: #fde68a; }
  .fav-btn:hover            { background: rgba(245,158,11,.20); border-color: #f59e0b; color: #fef3c7; }
  .fav-btn.fav-active       { background: rgba(245,158,11,.20); border-color: #f59e0b; color: #fef3c7; }
  .fav-btn.fav-active:hover { background: rgba(245,158,11,.28); }
}
