:root {
  --bg:          #edf1f7;
  --surface:     #ffffff;
  --border:      #dde5ef;
  --text:        #18243a;
  --muted:       #627087;
  --accent:      #0058b4;
  --low:         #16a34a;
  --normal:      #0058b4;
  --high:        #b85c00;
  --flood:       #c0251b;
  --yr:          #0058b4;
  --shadow:      0 1px 3px rgba(0,40,100,.06), 0 4px 12px rgba(0,40,100,.05);
  --shadow-h:    0 4px 12px rgba(0,40,100,.1),  0 8px 24px rgba(0,40,100,.06);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

/* ── HEADER ─────────────────────────────────── */
.site-header {
  background: linear-gradient(155deg, #0063cc 0%, #004599 100%);
  color: #fff;
}

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

.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: 188px;
  height: 52px;
  max-height: 52px;
  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: 30px 28px 42px;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-sub {
  font-size: .95rem;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
  margin-bottom: 22px;
}

.search-wrap {
  position: relative;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-shell {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: text;
  transition: border-color .15s, background .15s;
}
.search-shell:focus-within {
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.13);
}
.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;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 10px 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;
}
.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(0,88,180,.07);
  border: 1px solid rgba(0,88,180,.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: #fff;
  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;
}
.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(0,88,180,.07);
  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: 32px 28px 72px;
}

/* ── TOOLBAR ─────────────────────────────────── */
.toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 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;
  padding: 5px 13px; border-radius: 20px;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all .15s;
}
.range-btn:hover { border-color: var(--accent); color: var(--accent); }
.range-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.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); }

.refresh-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .76rem; font-weight: 500;
  padding: 5px 14px; border-radius: 20px;
  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); }
.refresh-btn:disabled { opacity: .4; cursor: not-allowed; }

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

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

.section-title {
  font-family: 'Syne', sans-serif;
  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(--accent);
  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(184,92,0,.07); }
.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: 12px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s, transform .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); }
/* 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-family: 'Syne', sans-serif;
  font-size: 1rem; font-weight: 700;
  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: 5px; flex-shrink: 0;
}

.status-badge {
  font-size: .68rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap;
}
.badge-lav    { background: #dcfce7; color: #15803d; }
.badge-normal { background: #dbeafe; color: #1d4ed8; }
.badge-høy    { background: #fef3c7; color: #92400e; }
.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: #f4f7fc;
  border-radius: 8px; padding: 10px 12px;
}
.metric-label {
  font-size: .65rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
  font-weight: 600; margin-bottom: 4px;
}
.metric-value {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--text); line-height: 1;
}
.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; }

/* ── 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: #0058b4; 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: #f4f8fd;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
}


/* ── YR SECTION ──────────────────────────────── */
.yr-section {
  background: #eef5ff;
  border: 1px solid #c4d9f5;
  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: 'Syne', sans-serif;
  font-size: .74rem; font-weight: 800;
  color: var(--accent); letter-spacing: .04em;
}
.yr-tag {
  font-size: .62rem; color: #4d80c0;
  background: rgba(0,88,180,.1);
  border: 1px solid rgba(0,88,180,.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: 'Syne', sans-serif; font-weight: 700;
}
.yr-note { font-size: .63rem; color: #89b1d9; margin-top: 7px; font-style: italic; }

/* ── TIMESTAMP ───────────────────────────────── */
.timestamp { font-size: .67rem; color: var(--muted); }
/* 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: 5px;
  font-size: .72rem; font-weight: 500; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 9px; text-decoration: none;
  transition: color .15s, border-color .15s;
}
.maps-btn:hover { color: #1a73e8; border-color: #1a73e8; }
.share-btn {
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); cursor: pointer; padding: 4px 7px; 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); }
.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;
  margin-top: 4px;
}

/* ── 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;
}
.nav-link-btn {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 9px;
  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;
}

/* ── SUBPAGE ─────────────────────────────────── */
.subpage[hidden] { display: none; }
.subpage-hero {
  background: linear-gradient(155deg, #0063cc 0%, #004599 100%);
  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;
}
.subpage-back:hover { background: rgba(255,255,255,.2); color: #fff; }
.subpage-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  color: #fff;
  letter-spacing: -0.025em;
  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: 'Syne', 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: 'Syne', 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: 'Syne', 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(--accent);
  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(0,88,180,.07);
  border: 1px solid rgba(0,88,180,.14);
  border-radius: 20px; padding: 2px 10px;
  font-size: .7rem; font-weight: 500; color: 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: 'Syne', sans-serif;
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.magasin-national-pct {
  font-family: 'Syne', 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(0,88,180,.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, #0069d0, #2986e8); }
.fill-bar-fill.normal { background: linear-gradient(90deg, #0069d0, #2986e8); }
.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(0,88,180,.15); border: 1px solid rgba(0,88,180,.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: 'Syne', sans-serif;
  font-size: .94rem; font-weight: 700;
  color: var(--text); margin-bottom: 12px;
}
.magasin-card-pct {
  font-family: 'Syne', 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-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 ───────────────────────────── */
.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: 'Syne', 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: #0058b4; }
.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: #1a3050;
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 44px 28px 32px;
  color: #a8bdd0;
}
.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-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1rem; color: #fff;
  margin-bottom: 8px;
}
.footer-logo em { font-style: normal; color: #6baed6; }
.footer-tagline {
  font-size: .76rem; color: #8899b0; line-height: 1.65; max-width: 240px;
}
.footer-col-title {
  font-family: 'Inter', sans-serif;
  font-size: .78rem; font-weight: 600;
  color: #d0e4f0; margin-bottom: 12px;
}
.footer-col a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .82rem; color: #9ec5de;
  text-decoration: none; margin-bottom: 8px;
  transition: color .15s;
}
.footer-col a:hover { color: #d0e8f5; }
.footer-disclaimer {
  font-family: 'Inter', sans-serif;
  font-size: .78rem; color: #a8bdd0; line-height: 1.65;
}
.footer-disclaimer strong { color: #c8dce8; font-weight: 600; }
.footer-disclaimer a { color: #9ec5de; display: inline; }
.footer-contact {
  display: inline-block; margin-top: 10px;
  color: #9ec5de; font-size: .8rem; text-decoration: none;
}
.footer-contact:hover { color: #d0e8f5; 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: #a8bdd0;
  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 {
  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; }

/* ── MAP ─────────────────────────────────────── */
.map-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}
.map-header {
  padding: 18px 20px 12px;
}
.map-title {
  font-family: 'Syne', 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: #dbe5f0;
}
.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;
}
.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);
}
.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(0,88,180,.18); }
.marker-cluster-small div,
.marker-cluster-medium div { background-color: rgba(0,88,180,.55); color: #fff; font-weight: 600; }
.marker-cluster-large { background-color: rgba(184,92,0,.2); }
.marker-cluster-large div { background-color: rgba(184,92,0,.6); color: #fff; font-weight: 600; }
.map-popup {
  font-size: .78rem;
  color: var(--text);
  line-height: 1.45;
}
.map-popup strong {
  display: block;
  font-size: .88rem;
  margin-bottom: 2px;
}
.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) {
  .header-nav  { padding: 12px 16px; }
  .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; }
  #station-map { height: 340px; }
  .map-header  { padding: 16px 16px 10px; }
  .legend      { gap: 10px; }
  .search-wrap  { max-width: 100%; }
  .search-shell { max-width: 100%; }
  .grid        { grid-template-columns: 1fr; gap: 12px; }
  .about-section { padding: 36px 16px 40px; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  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: 'Syne', 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-county-section { margin-bottom: 28px; }
.blank-county-title {
  font-family: 'Syne', 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(0,88,180,.05);
}

.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: 'Syne', 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: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); cursor: pointer; padding: 4px 7px; gap: 4px;
  font-size: .72rem; font-weight: 500; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.fav-btn:hover         { color: #b45309; border-color: #b45309; }
.fav-btn.fav-active    { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.fav-btn.fav-active:hover { background: #fef3c7; }

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