/* ==================================================================
   Conspectus — News Dashboard
   Textured paper · Serif headlines · Liquid glass · Edge diffraction
   ================================================================== */

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500&family=Raleway:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ── Paper palette ── */
  --paper:        #f0ece2;
  --paper-warm:   #ebe6da;
  --paper-sheer:  rgba(255, 253, 246, 0.62);
  --paper-sheer-hi: rgba(255, 253, 248, 0.78);
  --ink:          #23201b;
  --ink-secondary:#5c554b;
  --ink-muted:    #8a8270;
  --ink-faint:    #b0a89580;

  --accent:       #b8482a;
  --accent-hover:#a03d22;
  --accent-glow:  rgba(184, 72, 42, 0.10);
  --green:        #4a8259;
  --yellow:       #a8841a;
  --orange:       #c2691a;
  --red:          #c4452a;
  --purple:       #7c5e9e;

  /* ── Glass ── */
  --glass:          rgba(255, 253, 246, 0.62);
  --glass-hi:       rgba(255, 253, 248, 0.78);
  --glass-edge:     rgba(255, 255, 255, 0.70);
  --glass-edge-b:   rgba(180, 175, 160, 0.30);
  --glass-shadow:   0 2px 8px rgba(60, 52, 38, 0.06), 0 8px 28px rgba(60, 52, 38, 0.07);
  --glass-shadow-hi:0 2px 8px rgba(60, 52, 38, 0.08), 0 12px 44px rgba(60, 52, 38, 0.12);

  /* ── Diffraction edge (chromatic aberration at glass border) ── */
  --diffract:
    inset 0.5px 0 0 rgba(255, 220, 180, 0.45),
    inset -0.5px 0 0 rgba(180, 200, 255, 0.35),
    inset 0 0.5px 0 rgba(255, 240, 200, 0.40),
    inset 0 -0.5px 0 rgba(200, 180, 255, 0.30);

  --r-card: 14px;
  --r-pill: 999px;
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* ═══ Textured Paper Background ═══ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* SVG turbulence generated paper grain */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.38  0 0 0 0 0.32  0 0 0 0.022 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  background-size: 400px 400px;
  opacity: 1;
}

/* Soft warm light washes (organic, no blobs) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 8% 5%,  rgba(255,225,180,0.20) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 10%, rgba(200,210,255,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 95%, rgba(180,200,170,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 75% 60%, rgba(255,200,160,0.06) 0%, transparent 45%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* === Layout === */
.container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header === */
header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--ink-faint);
  margin-bottom: 2rem;
  text-align: center;
}
.header-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
header h1 {
  font-family: 'Newsreader', serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-style: italic;
  line-height: 1;
}
header .subtitle {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-style: italic;
  letter-spacing: 0.01em;
}
header .update-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.25rem;
}
.update-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.5s infinite ease-in-out;
}
.header-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  margin-top: 0.15rem;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* === Weather Widget === */
.weather-section { margin-bottom: 1.25rem; }
.weather-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  padding: 0.9rem 1.25rem;
  box-shadow: var(--glass-shadow), var(--diffract);
  cursor: pointer;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.2s var(--ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.weather-card:active { transform: scale(0.98); }
@media (hover: hover) {
  .weather-card:hover {
    background: var(--glass-hi);
    box-shadow: var(--glass-shadow-hi), var(--diffract);
  }
}
.weather-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}
.weather-icon { font-size: 2.2rem; line-height: 1; }
.weather-temp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.weather-desc {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin-top: 0.15rem;
}
.weather-summary-compact {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--ink-muted);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.weather-summary-compact .weather-sep {
  color: var(--ink-faint);
}
.weather-later {
  display: none;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ink-faint);
  font-size: 0.78rem;
  color: var(--ink-secondary);
}
.weather-later-icon { font-size: 0.9rem; }
.weather-later-label {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.weather-later-detail {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

/* ── Weather Detail Modal ── */
.wm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
  padding-right: 2rem;
}
.wm-now {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.wm-icon { font-size: 2.5rem; line-height: 1; }
.wm-temp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.wm-desc { font-size: 0.85rem; color: var(--ink-secondary); margin-top: 0.15rem; }
.wm-location {
  font-size: 0.78rem;
  color: var(--ink-muted);
  text-align: right;
  flex-shrink: 0;
}
.wm-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.wm-detail-item {
  background: var(--paper-warm);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.wmd-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.wmd-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}
.wm-subtitle {
  font-family: 'Newsreader', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.wm-forecast { margin-bottom: 1.25rem; }
.modal-forecast-row {
  display: grid;
  grid-template-columns: 3rem 1.8rem 5rem 1fr;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--ink-faint);
  font-size: 0.82rem;
}
.modal-forecast-row:last-child { border-bottom: none; }
.mf-day { font-weight: 600; color: var(--ink); }
.mf-icon { text-align: center; font-size: 1.1rem; }
.mf-temps {
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  gap: 0.5rem;
}
.mf-high { color: var(--ink); }
.mf-low { color: var(--ink-muted); }
.mf-meta { font-size: 0.72rem; color: var(--ink-muted); text-align: right; }
.wm-aurora {
  background: var(--paper-warm);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}
.weather-modal-content { max-width: 420px; }
.strom-modal-content { max-width: 400px; }
.strom-modal-header { font-family: 'Newsreader', serif; font-size: 1rem; font-weight: 600; color: var(--accent); margin-bottom: 0.75rem; text-align: center; }

/* Population chart */
.pop-chart-wrapper {
  height: 200px;
  margin-top: 1rem;
}
.pop-chart-wrapper canvas { width: 100% !important; height: 100% !important; }

/* ═══ Trending Searches List ═══ */
.trends-section { margin-bottom: 1.5rem; }
.trends-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.trends-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
  font-size: 0.83rem;
  box-shadow: var(--glass-shadow);
  transition: background 0.25s var(--ease);
}
.trends-rank {
  flex-shrink: 0;
  width: 1.6rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.trends-item:first-child .trends-rank,
.trends-item:nth-child(2) .trends-rank,
.trends-item:nth-child(3) .trends-rank {
  color: var(--accent);
}
.trends-title {
  flex: 1;
  color: var(--ink);
  line-height: 1.3;
}
.trends-title a {
  color: var(--ink);
  text-decoration: none;
}
.trends-title a:hover { color: var(--accent); }
.trends-views {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-align: right;
}
.trends-source {
  font-size: 0.68rem;
  color: var(--ink-faint);
  margin-top: 0.5rem;
  font-style: italic;
}
.trends-source a { color: var(--accent); }

/* Forecast (legacy — kept for desktop pop-chart-wrapper compatibility) */
.weather-forecast { display: none; }
.aurora-box { display: none; }

/* ═══ Entertainment Release List ═══ */
.entertainment-section { margin-bottom: 2rem; }
.entertainment-section .section-header h2 { color: var(--accent); }
.entertainment-category {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ink-faint);
  color: var(--ink);
}
.entertainment-category:first-of-type { margin-top: 0; }
.entertainment-subcategory {
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0.75rem 0 0.35rem;
}
.entertainment-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.entertainment-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
  font-size: 0.83rem;
  box-shadow: var(--glass-shadow);
  transition: background 0.25s var(--ease);
}
.entertainment-item.recently-released {
  border-left: 3px solid var(--green);
}
.entertainment-date {
  flex-shrink: 0;
  width: 4.2rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
}
.entertainment-date .month { font-size: 0.65rem; text-transform: uppercase; color: var(--ink-muted); font-weight: 400; display: block; }
.entertainment-title {
  flex: 1;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.entertainment-title a {
  color: var(--ink);
  text-decoration: none;
}
.entertainment-title a:hover { color: var(--accent); }
.entertainment-meta {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-align: right;
}
.entertainment-source {
  font-size: 0.68rem;
  color: var(--ink-faint);
  margin-top: 0.5rem;
  font-style: italic;
}
.entertainment-type-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.entertainment-type-badge.film { background: rgba(184, 72, 42, 0.10); color: var(--accent); }
.entertainment-type-badge.tv { background: rgba(74, 130, 89, 0.10); color: var(--green); }
.entertainment-type-badge.game { background: rgba(124, 94, 158, 0.10); color: var(--purple); }

/* ═══ Scroll Animation ═══ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === News Section === */
.news-section { margin-bottom: 2rem; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.section-header h2 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-header .see-all {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* World section sub-headings (replaces inline Bebas Neue styles) */
.news-section h3.continent-heading {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
  letter-spacing: 0;
  color: var(--accent);
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 0.25rem;
}

/* === News Card (liquid glass + edge diffraction) === */
.news-card {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
  transition: background 0.35s var(--ease),
              box-shadow 0.35s var(--ease),
              transform 0.25s var(--ease),
              border-color 0.35s var(--ease);
  position: relative;
  box-shadow: var(--glass-shadow), var(--diffract);
}
@media (hover: hover) {
  .news-card:hover {
    background: var(--glass-hi);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: var(--glass-shadow-hi), var(--diffract);
    transform: translateY(-1px);
  }
}
.news-card:active {
  transform: scale(0.99);
}
.news-card.featured {
  border-left: 3px solid var(--accent);
}
.news-card.most-important { border-left: 3px solid var(--green); }
.news-card.worth-watching { border-left: 3px solid var(--yellow); }
.news-card.minor { border-left: 3px solid var(--ink-muted); }
.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.news-source-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
  flex-wrap: wrap;
}
.source-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(35, 32, 27, 0.06);
  border: 1px solid var(--ink-faint);
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--ink-secondary);
}
.news-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.news-card h3 {
  font-family: 'Newsreader', serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.news-card h3 a {
  color: var(--ink);
}
.news-card h3 a:hover { color: var(--accent); }
.news-summary {
  font-size: 0.83rem;
  color: var(--ink-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.news-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.tag {
  padding: 0.15rem 0.45rem;
  background: rgba(35, 32, 27, 0.05);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  font-size: 0.63rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* === Score Badge === */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease);
}
.score-badge:hover { transform: scale(1.08); }
.score-badge.top    { background: rgba(74, 130, 89, 0.10);  color: var(--green);  border-color: rgba(74, 130, 89, 0.22); }
.score-badge.good   { background: rgba(184, 72, 42, 0.08);  color: var(--accent);  border-color: rgba(184, 72, 42, 0.20); }
.score-badge.ok     { background: rgba(168, 132, 26, 0.10); color: var(--yellow); border-color: rgba(168, 132, 26, 0.22); }
.score-badge.mid    { background: rgba(194, 105, 26, 0.10); color: var(--orange); border-color: rgba(194, 105, 26, 0.22); }
.score-badge.low    { background: rgba(196, 69, 42, 0.10);  color: var(--red);    border-color: rgba(196, 69, 42, 0.22); }

/* === Norwegian Stories Highlight === */
.norway-section { margin-bottom: 2rem; }
.norway-section .section-header h2 { color: var(--accent); }
.norway-section .section-header h2::before { content: "🇳🇴 "; }
.compare-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.compare-item {
  flex: 1;
  min-width: 200px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: var(--glass-shadow);
}
.compare-item .source {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}
.compare-item .headline {
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--ink);
}
.compare-item .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--ink-faint);
  margin-top: 2.5rem;
}
footer .footer-name {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
footer .footer-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-style: italic;
}
footer a { color: var(--accent); }
footer .sep { margin: 0 0.5rem; color: var(--ink-faint); }

/* === Loading States === */
.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-muted);
}
.loading .spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink-faint);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg {
  text-align: center;
  padding: 1.5rem;
  color: var(--red);
  font-size: 0.85rem;
}

/* === Tabs === */

/* === Norwegian political compass === */
.political-compass-wrap { position: relative; padding: 1rem 3rem 1.25rem; }
.political-compass { position: relative; width: min(100%, 620px); aspect-ratio: 1 / 1.05; margin: .8rem auto 2rem; border: 1px solid var(--border); border-radius: 10px; background: #f3f0e9; overflow: visible; }
.compass-grid { position: absolute; inset: 0; border-radius: 9px; background: linear-gradient(90deg, transparent 49.5%, rgba(70,70,70,.3) 49.8%, rgba(70,70,70,.3) 50.2%, transparent 50.5%), linear-gradient(0deg, transparent 49.5%, rgba(70,70,70,.3) 49.8%, rgba(70,70,70,.3) 50.2%, transparent 50.5%), linear-gradient(90deg, rgba(215,235,225,.45) 0 50%, rgba(245,225,215,.45) 50% 100%), linear-gradient(0deg, rgba(245,230,215,.45) 0 50%, rgba(220,235,245,.45) 50% 100%); }
.compass-axis { position: absolute; background: var(--border); opacity: .55; }
.compass-axis-x { left: 0; right: 0; top: 50%; height: 1px; }
.compass-axis-y { top: 0; bottom: 0; left: 50%; width: 1px; }

.political-axis-label { position: absolute; z-index: 5; font-size: .68rem; color: var(--text-muted); font-weight: 600; letter-spacing: .03em; white-space: nowrap; pointer-events: none; }
.political-axis-top { top: calc(.5rem + 5px); left: 50%; transform: translateX(-50%); background: rgba(243,240,233,.88); border-radius: 4px; padding: .15rem .3rem; }
.political-axis-bottom { bottom: 2.3rem; left: 50%; transform: translateX(-50%); background: rgba(243,240,233,.88); border-radius: 4px; padding: .15rem .3rem; }
.political-axis-left { left: .65rem; top: 50%; transform: translateY(-50%); width: 2.2rem; text-align: center; }
.political-axis-right { right: .65rem; top: 50%; transform: translateY(-50%); width: 2.2rem; text-align: center; }
.party-marker { position: absolute; width: 48px; height: 48px; transform: translate(-50%, -50%); z-index: 2; cursor: help; }
.party-ring { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--party-bg); border: 6px solid var(--env-color); box-shadow: inset 0 0 0 2px #fff, 0 2px 7px rgba(0,0,0,.35); }
.party-letter { color: #fff; font-size: .68rem; font-weight: 800; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.political-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .45rem .75rem; margin: .5rem 0 1rem; }
.political-legend-item { display: flex; align-items: center; gap: .45rem; font-size: .72rem; color: var(--text-secondary); }
.legend-party-dot { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border: 5px solid; box-shadow: inset 0 0 0 1px #fff; border-radius: 50%; color: #fff; font-size: .55rem; font-weight: 800; }
.political-methodology { font-size: .68rem; line-height: 1.5; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: .7rem; }
.political-modal-content { max-width: 500px; }
.political-popularity-link { margin: 1rem 0 1.1rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.35); }
.political-popularity-link strong { font-size: .9rem; }
.political-popularity-link p { margin: .25rem 0 .7rem; color: var(--text-muted); font-size: .75rem; }
.political-polls-button { display: inline-block; padding: .45rem .7rem; border-radius: 7px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 600; text-decoration: none; }
.political-polls-button:hover { background: var(--accent-hover); text-decoration: none; }
.political-party-title { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.political-party-title h3 { margin: 0; font-size: 1.25rem; }
.political-party-badge { width: 48px; height: 48px; display: grid; place-items: center; border: 4px solid; border-radius: 50%; color: #fff; font-weight: 800; }
.political-party-subtitle { color: var(--text-muted); font-size: .75rem; margin-top: .2rem; }
.political-score-grid { display: grid; gap: .55rem; }
.political-score-grid > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .7rem; background: var(--bg-secondary); border-radius: 8px; font-size: .78rem; }
.political-score-grid span { color: var(--accent); font-weight: 700; text-align: right; }
.political-detail-text { color: var(--text-secondary); font-size: .78rem; line-height: 1.55; }
@media (max-width: 600px) { .political-compass-wrap { padding-inline: 1rem; } .political-axis-label { font-size: .58rem; white-space: nowrap; } .political-axis-left, .political-axis-right { font-size: .52rem; line-height: 1.05; background: rgba(243,240,233,.82); border-radius: 4px; padding: .15rem; } .party-marker { width: 41px; height: 41px; } }
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(40, 35, 28, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  padding: 2rem;
  max-width: 460px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 60px rgba(60, 52, 38, 0.18), var(--diffract);
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--ink); }
.modal-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.modal-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}
.modal-explain {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.modal-best {
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid rgba(74, 130, 89, 0.18);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.modal-best-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 0.25rem;
}
.modal-best-text {
  font-size: 0.83rem;
  color: var(--ink);
}
.modal-comparisons { margin-top: 0.5rem; }
.modal-compare-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}
.modal-compare-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ink-faint);
  font-size: 0.83rem;
}
.modal-compare-item:last-child { border-bottom: none; }
.modal-compare-item .source-name { color: var(--ink); font-weight: 500; }
.modal-compare-item .source-name a { color: var(--accent); font-weight: 500; text-decoration: none; }
.modal-compare-item .source-name a:hover { text-decoration: underline; }
.modal-compare-item .source-score {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

/* === Widget Sections === */
.world-data-group { margin-bottom: 2rem; }
.group-header h2 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ink-faint);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sub-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.sub-tab {
  background: none;
  border: 1px solid var(--ink-faint);
  border-radius: 8px;
  padding: 0.25rem 0.65rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sub-tab:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(184, 72, 42, 0.04);
}
.sub-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(184, 72, 42, 0.18);
}
.subtab-panel { display: none; touch-action: pan-y; }
.subtab-panel.active { display: block; }
.calendar-list { display: grid; gap: 0.7rem; }
.calendar-item { display: grid; grid-template-columns: 4rem 1fr; gap: 0.8rem; padding: 0.8rem; border: 1px solid var(--ink-faint); border-radius: var(--r-card); background: var(--glass); }
.calendar-year { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-weight: 500; }
.calendar-item p { margin-top: 0.2rem; color: var(--ink-secondary); font-size: 0.85rem; }
.calendar-source { margin-top: 0.8rem; color: var(--ink-muted); font-size: 0.75rem; }

/* NTB Press Releases */
.press-release-list { display: grid; gap: 0.65rem; }
.press-release-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  background: var(--glass);
  box-shadow: var(--glass-shadow), var(--diffract);
}
.press-release-item.has-image { grid-template-columns: minmax(0, 1fr) 120px; }
.press-release-body { min-width: 0; }
.press-release-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.67rem;
  line-height: 1.3;
}
.press-release-meta > span:first-child { color: var(--accent); font-weight: 600; }
.press-release-meta > span + span::before { content: '·'; margin-right: 0.45rem; color: var(--ink-faint); }
.press-release-title { margin: 0; font-family: 'Newsreader', serif; font-size: 1.08rem; line-height: 1.2; font-weight: 600; }
.press-release-title a { color: var(--ink); text-decoration: none; }
.press-release-title a:hover, .press-release-title a:focus-visible { color: var(--accent); text-decoration: underline; }
.press-release-summary { margin: 0.4rem 0 0; color: var(--ink-secondary); font-size: 0.8rem; line-height: 1.45; }
.press-release-link { display: inline-block; margin-top: 0.55rem; color: var(--accent); font-size: 0.7rem; text-decoration: none; }
.press-release-link:hover, .press-release-link:focus-visible { text-decoration: underline; }
.press-release-image { width: 120px; height: 88px; object-fit: cover; border-radius: calc(var(--r-card) - 4px); background: var(--paper); }
.press-release-attribution { line-height: 1.45; }

.news-section-header {
  margin-bottom: 0.75rem;
}
.news-section-header h2 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.news-update-badge {
  font-family: 'Raleway', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--ink-muted);
  font-style: italic;
  letter-spacing: 0;
  margin-left: 0.5rem;
  white-space: nowrap;
}
.news-subtitle {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.widget-section { margin-bottom: 1.25rem; }
.widget-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.widget-section .section-header h2 {
  font-family: 'Newsreader', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
}
.chart-note {
  font-size: 0.68rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* Population Grid */
.population-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  padding: 1.25rem;
  box-shadow: var(--glass-shadow), var(--diffract);
}
.pop-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.15rem 0;
}
.pop-row.world-total {
  padding: 0.6rem 0 0.5rem;
  border-bottom: 1px solid var(--ink-faint);
  margin-bottom: 0.4rem;
}
.pop-emoji { font-size: 1rem; width: 1.5rem; text-align: center; flex-shrink: 0; }
.pop-name { font-size: 0.78rem; color: var(--ink-secondary); width: 100px; flex-shrink: 0; }
.pop-bar-track {
  flex: 1; height: 8px;
  background: rgba(35, 32, 27, 0.05);
  border-radius: 4px; overflow: hidden;
}
.pop-bar-fill {
  height: 100%; border-radius: 4px; width: 0%;
  transition: width 1.5s var(--ease);
  background: var(--accent);
}
.world-total .pop-bar-fill { background: var(--green); }
.pop-asia .pop-bar-fill { background: var(--yellow); }
.pop-africa .pop-bar-fill { background: var(--orange); }
.pop-europe .pop-bar-fill { background: var(--purple); }
.pop-namerica .pop-bar-fill { background: var(--accent); }
.pop-samerica .pop-bar-fill { background: var(--green); }
.pop-oceania .pop-bar-fill { background: #06b6d4; }
.pop-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  color: var(--ink);
  width: 110px;
  text-align: right;
  flex-shrink: 0;
}
.world-total .pop-number {
  font-size: 0.95rem;
  font-weight: 700;
  width: 140px;
}

/* Climate Chart */
.chart-wrapper {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  padding: 1rem;
  position: relative;
  box-shadow: var(--glass-shadow), var(--diffract);
}
#climate-chart { width: 100% !important; height: 280px !important; }

/* News Map */
.news-map { height: 140px; margin-top: 0.75rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--ink-faint); position: relative; }
.news-map .leaflet-container { background: #ddd8cc; }
.news-score {
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
}
.score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.score-team {
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
  text-align: center;
  line-height: 1.3;
}
.score-numbers {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.score-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1;
}
.score-num.winner {
  color: var(--ink);
}
.score-dash {
  font-size: 1rem;
  color: var(--ink-faint);
}
.score-fallback {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.news-marker-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  white-space: nowrap;
}
.news-marker-label span {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: rgba(35, 32, 27, 0.78);
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
  position: relative;
  transform: translate(-50%, -100%);
}
.news-marker-label span::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: rgba(35, 32, 27, 0.78);
}
.news-map-inset {
  position: absolute;
  top: 6px; right: 6px;
  width: 75px; height: 75px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(184, 72, 42, 0.35);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(60, 52, 38, 0.2);
  pointer-events: none;
}
.leaflet-popup-content-wrapper {
  background: rgba(255, 253, 248, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  color: var(--ink) !important;
  border-radius: 10px !important;
  border: 1px solid var(--glass-edge) !important;
}
.leaflet-popup-tip { background: rgba(255, 253, 248, 0.92) !important; }

/* === Politiloggen Cards === */
.politi-section { margin-bottom: 2rem; }
.politi-section .section-header h2 { color: var(--accent); }

.p-card {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  padding: 0.9rem 1.15rem;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  box-shadow: var(--glass-shadow), var(--diffract);
  cursor: pointer;
}
.p-card:hover {
  background: var(--glass-hi);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: var(--glass-shadow-hi), var(--diffract);
}
.p-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.p-source-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
}
.p-district {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  background: rgba(35, 32, 27, 0.06);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
}
.p-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-muted);
}
.p-has-image { font-size: 0.72rem; }
.p-status {
  font-size: 0.68rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.p-status.active { color: var(--green); }
.p-status.resolved { color: var(--ink-muted); }
.p-category {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  margin-bottom: 0.25rem;
}
.p-location {
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.p-text {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}
.p-card-link { display: block; text-decoration: none; color: inherit; }
.p-card-link:hover .p-card { border-color: var(--accent); }
.p-card-link:hover .p-card .p-location { text-decoration: underline; }
.p-attribution {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ink-faint);
  font-size: 0.68rem;
  color: var(--ink-muted);
}
.p-attribution a { color: var(--accent); }
.police-subtabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.product-warning-subtabs { flex-wrap: wrap; }
.product-warning-panel { display: none; }
.product-warning-panel.active { display: block; }
.product-warning-intro {
  margin: 0.5rem 0 0.9rem;
  color: var(--ink-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}
.product-warning-source-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  background: var(--glass);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.product-warning-source-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.product-warning-list { display: grid; gap: 0.55rem; }
.product-warning-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--ink-faint); border-radius: var(--r-card); background: var(--glass); color: var(--ink); text-decoration: none; }
.product-warning-item:hover { border-color: var(--accent); }
.product-warning-item-icon { font-size: 1.15rem; flex-shrink: 0; }
.product-warning-item strong, .product-warning-item small { display: block; }
.product-warning-item strong { font-size: 0.82rem; line-height: 1.35; }
.product-warning-item small { margin-top: 0.2rem; color: var(--ink-muted); font-size: 0.68rem; line-height: 1.35; }
.product-warning-icon { font-size: 1.5rem; }
.product-warning-source-card strong, .product-warning-source-card small { display: block; }
.product-warning-source-card small { margin-top: 0.2rem; color: var(--ink-muted); font-size: 0.72rem; }
.product-warning-arrow { margin-left: auto; color: var(--accent); font-size: 1.1rem; }

/* Politiloggen Detail Modal */
.politi-modal-content {
  max-width: 700px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.politi-modal-header {
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--ink-faint);
  flex-shrink: 0;
}
.politi-modal-header h3 {
  font-family: 'Newsreader', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
#politi-modal-frame {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 0 0 18px 18px;
  background: #fff;
}
#politi-modal-close { z-index: 10; }

/* Strømpriser Detail Modal */
.strom-modal-content {
  max-width: 480px;
}
.strom-modal-header {
  font-family: 'Newsreader', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ink-faint);
}
.strom-modal-bars {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
}
.strom-modal-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
}
.strom-modal-hour {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-muted);
  width: 1.8rem;
  text-align: right;
  flex-shrink: 0;
}
.strom-modal-track {
  flex: 1; height: 8px;
  background: rgba(35, 32, 27, 0.05);
  border-radius: 4px; overflow: hidden;
}
.strom-modal-fill {
  height: 100%; border-radius: 4px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.strom-modal-fill.peak { background: var(--red); }
.strom-modal-fill.cheap { background: var(--green); }
.strom-modal-price {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-secondary);
  width: 3.2rem;
  text-align: right;
  flex-shrink: 0;
  font-size: 0.7rem;
}
.strom-modal-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ink-faint);
}
.strom-modal-stat {
  font-size: 0.7rem;
  color: var(--ink-muted);
}
.strom-modal-stat strong {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink);
  display: block;
  font-size: 0.85rem;
}
.strom-modal-attribution {
  font-size: 0.6rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
}
.strom-modal-attribution a {
  color: var(--accent);
  text-decoration: none;
}

/* === Aurora === */
.aurora-box {
  margin-top: 0.75rem;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  padding: 0.75rem 1rem;
  box-shadow: var(--glass-shadow), var(--diffract);
}
.aurora-header {
  font-family: 'Newsreader', serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 0.4rem;
}
.aurora-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.aurora-kp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}
.aurora-desc { font-size: 0.78rem; color: var(--ink-secondary); }
.aurora-sub {
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--ink-muted);
  gap: 1rem;
}

/* === Economy: Strømpriser Map === */
.strom-section { margin-bottom: 1.5rem; }
.strom-header {
  font-family: 'Newsreader', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 0.5rem;
}

.strom-layout { display: flex; gap: 1rem; align-items: start; }
@media (max-width: 640px) { .strom-layout { flex-direction: column; } }

.strom-map-svg {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
@media (max-width: 640px) {
  .strom-map-svg { width: 100%; }
}
.strom-map-svg svg { width: 100%; height: auto; display: block; }

.zone-path { cursor: pointer; transition: opacity 0.2s, filter 0.2s; }
.zone-path:hover { opacity: 0.85; filter: brightness(1.15); }

.strom-sidebar { flex: 1; min-width: 0; }
.strom-zone { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--ink-faint); cursor: pointer; }
.strom-zone:hover { background: rgba(35, 32, 27, 0.06); }
.strom-zone:last-child { border-bottom: none; }
.strom-zone-info { display: flex; align-items: center; gap: 0.4rem; flex: 1; min-width: 0; }
.strom-zone-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.strom-zone-name { font-size: 0.78rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strom-zone-price { font-size: 0.95rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; text-align: right; white-space: nowrap; min-width: 5em; }
.strom-unit { font-size: 0.6rem; font-weight: 400; color: var(--ink-muted); }
.strom-range { font-size: 0.65rem; color: var(--ink-muted); white-space: nowrap; min-width: 4em; text-align: right; }
.econ-attribution {
  text-align: center;
  font-size: 0.68rem;
  color: var(--ink-muted);
  padding: 0.5rem 0;
}
.econ-attribution a { color: var(--accent); }

/* Scale bar below map */
.strom-scale { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.6rem 1rem 0.2rem; }
.strom-scale-bar { width: 100%; max-width: 320px; height: 12px; border-radius: 6px; overflow: hidden; }
.strom-scale-gradient { width: 100%; height: 100%; background: linear-gradient(90deg, #4a8259, #a8841a, #c4452a); }
.strom-scale-labels { display: flex; justify-content: space-between; width: 100%; max-width: 320px; }
.strom-scale-label { font-size: 0.6rem; color: var(--ink-muted); font-family: 'JetBrains Mono', monospace; }
.strom-scale-endlabels { display: flex; justify-content: space-between; width: 100%; max-width: 320px; }
.strom-scale-low { font-size: 0.6rem; color: var(--ink-muted); font-weight: 500; }
.strom-scale-high { font-size: 0.6rem; color: var(--red); font-weight: 600; }

@media (max-width: 640px) {
  .strom-zone-name { min-width: 70px; font-size: 0.72rem; }
  .strom-zone-price { font-size: 0.85rem; }
}

/* === Economy: Fuel === */
.fuel-section {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  padding: 0.75rem 1rem;
  box-shadow: var(--glass-shadow), var(--diffract);
}
.fuel-header {
  font-family: 'Newsreader', serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 0.5rem;
}
.fuel-list { display: flex; flex-direction: column; gap: 0.4rem; }
.fuel-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.3rem 0;
}
.fuel-row + .fuel-row { border-top: 1px solid var(--ink-faint); }
.fuel-name { font-size: 0.82rem; color: var(--ink); width: 90px; flex-shrink: 0; }
.fuel-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.fuel-unit { font-size: 0.62rem; font-weight: 400; color: var(--ink-muted); }
.fuel-range { font-size: 0.68rem; color: var(--ink-muted); margin-left: auto; }
.econ-attribution {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ink-faint);
  font-size: 0.62rem;
  color: var(--ink-muted);
}
.econ-attribution a { color: var(--accent); }

/* ═══ Calendar Section ═══ */
.cal-header { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.cal-header h3 { font-family: 'Raleway', sans-serif; font-size: 1rem; font-weight: 600; color: var(--ink); margin: 0; }
.cal-header .cal-date { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--ink-muted); }
.cal-category { font-family: 'Raleway', sans-serif; font-size: 0.8rem; font-weight: 600; color: var(--accent); margin: 1rem 0 0.4rem 0; padding-bottom: 0.2rem; border-bottom: 1px solid var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.cal-event { background: var(--glass); backdrop-filter: blur(18px) saturate(1.12); -webkit-backdrop-filter: blur(18px) saturate(1.12); border: 1px solid var(--glass-edge); border-radius: var(--r-card); padding: 0.65rem 0.9rem; margin-bottom: 0.35rem; box-shadow: var(--glass-shadow), var(--diffract); }
.cal-event .year { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--accent); font-weight: 700; margin-right: 0.5rem; display: inline-block; min-width: 3em; }
.cal-event .text { font-size: 0.85rem; color: var(--ink); line-height: 1.4; }
.cal-event .text a { color: var(--ink-secondary); text-decoration: underline; text-decoration-color: var(--ink-faint); text-underline-offset: 1px; }
.cal-event .text a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.cal-event-headline { font-family: 'Raleway', sans-serif; font-size: 0.88rem; font-weight: 600; color: var(--ink); margin-bottom: 0.2rem; }
.cal-event-headline a { color: var(--ink); text-decoration: none; }
.cal-event-headline a:hover { color: var(--accent); text-decoration: underline; }
.cal-event-desc { font-size: 0.78rem; color: var(--ink-secondary); line-height: 1.35; }
.cal-event .text ul, .cal-event .text ol { margin: 0; padding: 0 0 0 1.2em; list-style: none; }
.cal-event .text li { margin: 0; padding: 0; font-size: inherit; line-height: inherit; border: none; background: none; display: inline; }
.cal-event .text li::before { content: "· "; color: var(--ink-faint); }
.cal-event .text li:first-child::before { content: ""; }
.cal-event .text sup { font-size: 0.6em; color: var(--ink-faint); }
.cal-attribution { text-align: center; font-size: 0.65rem; color: var(--ink-faint); padding: 0.5rem 0; }
.cal-attribution a { color: var(--ink-muted); }

@media (max-width: 640px) {
  .cal-event { padding: 0.5rem 0.7rem; }
  .cal-event .text { font-size: 0.8rem; }
  .cal-category { font-size: 0.75rem; }
}
/* === Stocks === */
.stocks-section { margin-bottom: 1.5rem; }
.stocks-header {
  font-family: 'Newsreader', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 0.5rem;
}
.stocks-list {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  box-shadow: var(--glass-shadow), var(--diffract);
}
.stocks-list > .stocks-inner { min-width: 0; }
.stock-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
}
.stock-row + .stock-row { border-top: 1px solid var(--ink-faint); }
.stock-flag { font-size: 1rem; flex-shrink: 0; }
.stock-name { color: var(--ink); font-weight: 600; width: 100px; flex: 1 1 auto; min-width: 0; text-decoration: none; }
.stock-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.stock-price {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink);
  margin-left: auto;
}
.stock-change {
  font-family: 'JetBrains Mono', monospace;
  width: 70px;
  text-align: right;
  flex-shrink: 0;
}
.stock-pct {
  font-family: 'JetBrains Mono', monospace;
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}
.stock-up { color: var(--green); }
.stock-down { color: var(--red); }

@media (max-width: 600px) {
  .stock-row { gap: .45rem; padding-inline: .55rem; font-size: .72rem; }
  .stock-name { width: auto; font-size: .72rem; }
  .stock-price { font-size: .72rem; }
  .stock-change { width: auto; min-width: 48px; font-size: .7rem; }
  .stock-pct { width: auto; min-width: 43px; font-size: .7rem; }
}

/* === Political 3D ideology map === */
.political-3d-wrap { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--r-card); padding: .8rem; box-shadow: var(--glass-shadow), var(--diffract); }
.political-3d-toolbar, .political-3d-legend { display: flex; justify-content: space-between; gap: .75rem; align-items: center; color: var(--ink-muted); font-size: .7rem; }
.political-view-button { border: 1px solid var(--ink-faint); border-radius: 999px; background: transparent; color: var(--ink-secondary); padding: .3rem .65rem; cursor: pointer; font: inherit; }
.political-3d-stage { height: 390px; display: grid; place-items: center; perspective: 900px; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.political-3d-stage:active { cursor: grabbing; }
.political-cube { --cube-size: min(65vw, 300px); width: var(--cube-size); height: var(--cube-size); position: relative; transform-style: preserve-3d; transform: rotateX(-20deg) rotateY(28deg); transition: transform .25s var(--ease); }
.cube-face { position: absolute; inset: 0; border: 1px solid rgba(35,32,27,.18); background: linear-gradient(135deg, rgba(70,120,170,.06), rgba(190,80,55,.08)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.cube-front { transform: translateZ(calc(var(--cube-size) / 2)); background-image: linear-gradient(rgba(35,32,27,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(35,32,27,.12) 1px, transparent 1px); background-size: 25% 25%; }
.cube-back { transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2)); } .cube-left { transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2)); } .cube-right { transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2)); } .cube-top { transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2)); } .cube-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-axis-label { position: absolute; z-index: 3; font-size: .62rem; color: var(--ink-secondary); white-space: nowrap; pointer-events: none; text-shadow: 0 1px var(--paper); }
.cube-label-left { left: -1.4rem; top: 50%; transform: translate(-100%,-50%); } .cube-label-right { right: -1.4rem; top: 50%; transform: translate(100%,-50%); } .cube-label-top { left: 50%; top: -1.4rem; transform: translateX(-50%); } .cube-label-bottom { left: 50%; bottom: -1.4rem; transform: translateX(-50%); }
.party-marker { position: absolute; z-index: 5; width: 38px; height: 38px; transform: translate(-50%,-50%) translateZ(var(--party-depth)); transform-style: preserve-3d; cursor: pointer; transition: transform .2s var(--ease); } .party-marker:hover { transform: translate(-50%,-50%) translateZ(calc(var(--party-depth) + 12px)) scale(1.12); }
.party-ring { transform: rotateY(calc(-1 * var(--cube-rotate-y, 28deg))) rotateX(calc(-1 * var(--cube-rotate-x, -20deg))); transform-origin: center; }
.cube-depth-label { position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; color: var(--ink-muted); font-size: .6rem; white-space: nowrap; opacity: .06; pointer-events: none; text-shadow: 0 1px var(--paper); transition: opacity .25s ease; }
.cube-depth-liberal { transform: translateZ(calc(var(--cube-size) / 2 + 18px)) rotateY(90deg); }
.cube-depth-restrictive { transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2 + 18px)) rotateY(-90deg); }
.cube-depth-label { text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.political-cube.has-rotated .cube-depth-label { opacity: .8; }
.political-cube.depth-face-hidden .cube-depth-label { opacity: .06; }
.party-ring { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--party-bg); border: 3px solid var(--env-color); box-shadow: 0 3px 8px rgba(35,32,27,.25); } .party-letter { color: white; font: 700 .62rem 'Raleway', sans-serif; text-align: center; }
.political-3d-legend { padding: .25rem .2rem .65rem; opacity: .35; font-size: .62rem; } .political-legend { display: flex; flex-wrap: wrap; gap: .35rem .7rem; border-top: 1px solid var(--ink-faint); padding-top: .65rem; } .political-legend-item { display: flex; align-items: center; gap: .3rem; color: var(--ink-secondary); font-size: .68rem; cursor: pointer; border-radius: 6px; padding: .15rem .25rem; } .political-legend-item:hover, .political-legend-item:focus-visible { background: rgba(184,72,42,.08); outline: 2px solid var(--accent); outline-offset: 1px; } .legend-party-dot { display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid; border-radius: 50%; color: white; font-size: .5rem; font-weight: 700; }
@media (max-width: 480px) { .political-3d-stage { height: 320px; } .political-cube { --cube-size: min(68vw, 245px); } .cube-axis-label { font-size: .55rem; } }

/* === Tabs (sticky on mobile) === */
.tab-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding: 0.6rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 236, 226, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--ink-faint);
  margin-left: calc(-1 * (100vw - 100%) / 2);
  margin-right: calc(-1 * (100vw - 100%) / 2);
  padding-left: max(0.5rem, calc((100vw - 960px) / 2));
  padding-right: max(0.5rem, calc((100vw - 960px) / 2));
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab {
  background: none;
  border: 1px solid var(--ink-faint);
  border-radius: 10px;
  padding: 0.5rem 1.1rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.tab:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(184, 72, 42, 0.04);
}
.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(184, 72, 42, 0.22);
}
.tab-panel { display: none; touch-action: pan-y; }
.tab-panel.active { display: block; }

/* === Responsive === */
@media (max-width: 768px) {
  .weather-card { flex-direction: column; align-items: flex-start; }
  .weather-details { margin-left: 0; flex-wrap: wrap; gap: 0.6rem; }
  .weather-details span { white-space: normal; word-break: break-word; }
  .compare-row { flex-direction: column; }
  .compare-item { min-width: unset; }
}

@media (max-width: 480px) {
  .tab-bar {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
  }
  .container { padding: 0 1rem; }
  header { padding: 1.5rem 0 1.25rem; margin-bottom: 1.5rem; }
  header h1 { font-size: 2rem; }
  header .subtitle { font-size: 0.72rem; }
  .news-card { padding: 0.85rem 1rem; }
  .news-card h3 { font-size: 1rem; }
  .news-summary { font-size: 0.78rem; -webkit-line-clamp: 3; }
  .press-release-item.has-image { grid-template-columns: minmax(0, 1fr) 84px; gap: 0.6rem; padding: 0.8rem; }
  .press-release-image { width: 84px; height: 68px; }
  .press-release-title { font-size: 0.98rem; }
  .press-release-summary { font-size: 0.75rem; }
  .news-section-header h2 { font-size: 1.3rem; }
  .section-header h2 { font-size: 1.3rem; }
  .group-header h2 { font-size: 1.3rem; }
  .sub-tab { font-size: 0.72rem; padding: 0.2rem 0.5rem; }
  .weather-details { font-size: 0.7rem; gap: 0.4rem; }
  .weather-details span { white-space: nowrap; }
  .forecast-day { flex: 0 0 48px; font-size: 0.65rem; }
  .forecast-day .icon { font-size: 1rem; }
  .forecast-day .temps { font-size: 0.6rem; gap: 0.25rem; }
  .news-map-inset { width: 60px; height: 60px; top: 4px; right: 4px; }
  .tab { padding: 0.4rem 0.9rem; font-size: 0.78rem; min-height: 38px; }
  .modal-content { padding: 1.5rem; }
  .modal-score { font-size: 2.2rem; }
  .weather-temp { font-size: 1.8rem; }
  .weather-icon { font-size: 2rem; }
  .strom-summary { gap: 0.5rem; }
  .strom-stat { padding: 0.5rem 0.75rem; }
  .strom-stat-value { font-size: 1rem; }
  .fuel-name { width: 70px; font-size: 0.75rem; }
  .fuel-price { font-size: 0.95rem; }
  .pop-name { width: 80px; font-size: 0.72rem; }
  .pop-number { width: 90px; font-size: 0.68rem; }
  .world-total .pop-number { font-size: 0.82rem; width: 110px; }
  .stock-name { width: 80px; font-size: 0.72rem; }
  .stock-price { font-size: 0.75rem; }
  .stock-change { width: 55px; }
  .stock-pct { width: 50px; }
}

@media (max-width: 375px) {
  .container { padding: 0 0.75rem; }
  header h1 { font-size: 1.7rem; }
  .news-card { padding: 0.75rem 0.85rem; }
  .news-card h3 { font-size: 0.92rem; }
  .news-summary { font-size: 0.75rem; }
  .tab { padding: 0.35rem 0.8rem; font-size: 0.72rem; }
  .weather-card { padding: 1rem; }
  .weather-temp { font-size: 1.6rem; }
}

/* Desktop: tab bar static, news card map grid */
@media (min-width: 769px) {
  .tab-bar {
    position: static;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--ink-faint);
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  .news-card:has(.news-map) {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 0 1rem;
  }
  .news-card:has(.news-map) .news-card-header { grid-column: 1; grid-row: 1; }
  .news-card:has(.news-map) h3 { grid-column: 1; grid-row: 2; }
  .news-card:has(.news-map) .news-summary { grid-column: 1; grid-row: 3; }
  .news-card:has(.news-map) .news-map {
    grid-column: 2; grid-row: 1 / 5;
    margin-top: 0;
    height: 100%;
    min-height: 150px;
  }
  .news-card:has(.news-map) .news-footer { grid-column: 1; grid-row: 4; }
}