:root {
  color-scheme: light;
  --surface-overlay: rgba(255, 255, 255, 0.96);
  --globe-background: radial-gradient(circle at 50% 42%, #ffffff 0, #f8fafc 48%, #eef2f7 100%);
  --background: #f8fafc;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --input: #cbd5e1;
  --primary: #0f172a;
  --primary-foreground: #ffffff;
  --secondary: #f8fafc;
  --secondary-foreground: #334155;
  --accent: #e0f2fe;
  --accent-foreground: #075985;
  --destructive: #b45309;
  --ring: #38bdf8;
  --map-land: #1e293b;
  --map-muted: #cbd5e1;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-elevated: 0 18px 42px rgba(15, 23, 42, 0.12);
  --bg: var(--background);
  --panel: var(--card);
  --panel-soft: var(--muted);
  --ink: var(--foreground);
  --line: var(--border);
  --warning: var(--destructive);
  --blue: #2563eb;
  --chart-1: #8cc8ff;
  --chart-2: #3b82f6;
  --chart-3: #67b7ff;
  --chart-4: #2563eb;
  --chart-5: #a7d8ff;
  --chart-6: #60a5fa;
  --chart-7: #93c5fd;
  --chart-8: #38bdf8;
  --chart-9: #818cf8;
  --chart-10: #0ea5e9;
  --chart-grid: #f1f5f9;
  --chart-axis: #e5e7eb;
  --chart-muted: #737373;
}


:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #10151d;
  --foreground: #e5eaf1;
  --card: #1b2330;
  --card-foreground: #e5eaf1;
  --muted: #263140;
  --muted-foreground: #a9b7c9;
  --border: #39485b;
  --input: #4a5c73;
  --primary: #d9e5f4;
  --primary-foreground: #10151d;
  --secondary: #202b39;
  --secondary-foreground: #c0cede;
  --accent: #173c53;
  --accent-foreground: #8fd3fa;
  --destructive: #fb923c;
  --ring: #7dd3fc;
  --map-land: #9aacc0;
  --map-muted: #46566a;
  --chart-grid: #2c3a4d;
  --chart-axis: #46566a;
  --chart-muted: #b7c4d5;
  --surface-overlay: rgba(27, 35, 48, 0.97);
  --globe-background: radial-gradient(circle at 50% 42%, #263140 0, #1b2330 48%, #10151d 100%);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 18px 42px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-right: 184px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

.app-header {
  display: grid;
  grid-template-columns: auto minmax(320px, 460px) auto;
  align-items: end;
  gap: 20px;
  padding: 18px 24px;
  background: var(--surface-overlay);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.about-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.app-header > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: end;
  gap: 14px;
}

.header-right {
  display: grid;
  grid-column: 3;
  justify-self: end;
  justify-items: end;
  gap: 8px;
}

.header-right .site-nav {
  display: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--muted);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

/* Secondary navigation: left rail on wide screens, a compact row below the header otherwise. */
.has-explore-sidebar {
  padding-left: 168px;
}

.explore-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: 168px;
  padding: 16px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.explore-nav {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.explore-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.explore-nav a:hover,
.explore-nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-foreground);
}

.explore-nav a:active {
  background: var(--muted);
}

.explore-nav a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}

.explore-nav svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1240px) {
  .has-explore-sidebar {
    padding-left: 0;
  }

  .explore-sidebar {
    position: static;
    width: auto;
    padding: 10px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .explore-nav {
    display: flex;
    overflow-x: auto;
  }

  .explore-nav a {
    flex: 0 0 auto;
  }
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  align-content: start;
  gap: 12px;
  width: 184px;
  padding: 16px 14px;
  border-left: 1px solid var(--line);
  background: var(--surface-overlay);
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

.side-panel-title {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.side-nav a:hover,
.side-nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-foreground);
}

.primary-action-button,
.secondary-action-button,
.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-action-button {
  background: var(--primary);
  color: var(--primary-foreground);
}

.secondary-action-button,
.secondary-link-button {
  background: var(--panel);
  color: var(--ink);
}

.secondary-action-button:hover,
.secondary-link-button:hover,
.secondary-action-button[aria-pressed="true"] {
  border-color: var(--ring);
  background: var(--accent);
  color: var(--accent-foreground);
}

.secondary-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.search-field,
.field {
  display: grid;
  gap: 7px;
}

.search-field label,
.field span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-field {
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
}

.country-search-wrap {
  position: relative;
  min-width: 0;
}

.search-field input,
.field select {
  min-height: 40px;
  width: 260px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 8px 11px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.search-field input {
  width: 100%;
}

.country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 310px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-elevated);
}

.country-option {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.country-option:last-child {
  border-bottom: 0;
}

.country-option:hover,
.country-option.active {
  background: var(--accent);
  color: var(--accent-foreground);
}

.country-option small {
  color: var(--muted-foreground);
  font-weight: 800;
}

.country-option small:not(:empty) {
  white-space: nowrap;
}

.field select {
  width: 100%;
}

.search-field input:focus,
.field select:focus {
  border-color: var(--ring);
  outline: 3px solid rgba(56, 189, 248, 0.22);
}

.status {
  min-width: 160px;
  color: var(--muted-foreground);
  font-size: 13px;
  text-align: right;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 360px;
  grid-template-areas:
    "map country"
    "topics country";
  gap: 14px;
  padding: 16px;
  min-height: calc(100vh - 83px);
}

.subject-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
  background: var(--muted);
}

.subject-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.subject-button:hover,
.subject-button.active {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.subject-button.active {
  box-shadow: var(--shadow);
}

.subject-button span {
  font-size: 13px;
  font-weight: 700;
}


.data-log-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.about-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.profile-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.global-issues-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.issue-detail-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.issue-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.globe-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  padding: 18px;
}

.globe-panel,
.globe-side-panel {
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.globe-side-panel {
  align-self: start;
}

.globe-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.globe-layer-field {
  min-width: 260px;
}

.globe-stage {
  position: relative;
  height: min(72vh, 740px);
  min-height: 520px;
  background: var(--globe-background);
  overflow: hidden;
  touch-action: none;
}

#globeSvg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#globeSvg:active {
  cursor: grabbing;
}

.globe-ocean {
  fill: var(--secondary);
  stroke: var(--input);
  stroke-width: 1.4;
}

.globe-rim {
  fill: none;
  stroke: rgba(15, 23, 42, 0.14);
  stroke-width: 2;
}

.globe-country {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 0.45;
  transition: fill 120ms ease;
}

.globe-country:hover {
  fill: #075985;
}

.globe-layer-list {
  display: grid;
  padding: 8px 18px 18px;
}

.globe-layer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.globe-layer-row:last-child {
  border-bottom: 0;
}

.globe-layer-row strong {
  display: block;
  margin-bottom: 4px;
}

.globe-layer-row p {
  color: var(--muted-foreground);
  font-size: 13px;
}

.future-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.future-panel {
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.future-list {
  display: grid;
  gap: 12px;
  padding: 10px 18px 18px;
}

.future-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--secondary);
}

.future-feature h3 {
  margin: 10px 0 6px;
  font-size: 17px;
  line-height: 1.25;
}

.future-feature p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.future-feature dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.future-feature dl div {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
}

.future-feature dt {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.future-feature dd {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}

.compare-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.compare-panel {
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.compare-actions {
  display: flex;
  justify-content: flex-end;
}

.compare-action-button,
.compare-country-field button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.compare-action-button {
  padding: 7px 12px;
}

.compare-action-button:hover,
.compare-country-field button:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.compare-action-button:disabled,
.compare-country-field button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.compare-selectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 18px 18px;
}

.compare-country-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.compare-country-field span {
  grid-column: 1 / -1;
}

.compare-country-field button {
  padding: 7px 10px;
}

.compare-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  background: var(--muted);
  overflow-x: auto;
}

.compare-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.compare-tab:hover,
.compare-tab.active {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.compare-view-head {
  padding: 14px 18px 8px;
}

.compare-view-head h2 {
  margin-bottom: 4px;
}

.compare-view-head p {
  color: var(--muted-foreground);
  font-size: 13px;
}

.comparison-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 8px 18px 18px;
  border-bottom: 1px solid var(--line);
}

.comparison-chart-card {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: none;
  overflow: hidden;
}

.comparison-chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.comparison-chart-head strong,
.comparison-chart-head small {
  display: block;
}

.comparison-chart-head strong {
  color: var(--card-foreground);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.comparison-chart-head small,
.comparison-chart-head span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}

.compare-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  padding: 10px 14px 0;
  overflow: visible;
}

.compare-chart-axis {
  fill: var(--chart-muted);
  font-size: 12px;
  font-weight: 500;
}

.compare-chart-grid {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.compare-chart-axis-line {
  stroke: transparent;
  stroke-width: 0;
}

.compare-chart-area {
  stroke: none;
  opacity: 0.88;
}

.compare-chart-line {
  fill: none;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compare-chart-dot {
  stroke: var(--card);
  stroke-width: 1.5;
}

.chart-hit-point {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
  cursor: crosshair;
}

.chart-hit-point:hover {
  fill: color-mix(in oklch, var(--chart-1) 16%, transparent);
  stroke: var(--chart-1);
  stroke-width: 1;
}

.chart-tooltip {
  position: fixed;
  z-index: 100;
  max-width: 280px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.97);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(10px);
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip span {
  margin-top: 3px;
  color: #dbe4ef;
  font-weight: 600;
}

.compare-chart-line.one,
.compare-chart-key.one {
  stroke: var(--chart-1);
  background: var(--chart-1);
}

.compare-chart-fill-stop.one {
  stop-color: var(--chart-1);
}

.compare-chart-line.two,
.compare-chart-key.two {
  stroke: var(--chart-2);
  background: var(--chart-2);
}

.compare-chart-fill-stop.two {
  stop-color: var(--chart-2);
}

.compare-chart-line.three,
.compare-chart-key.three {
  stroke: var(--chart-3);
  background: var(--chart-3);
}

.compare-chart-fill-stop.three {
  stop-color: var(--chart-3);
}

.compare-chart-line.four,
.compare-chart-key.four {
  stroke: var(--chart-4);
  background: var(--chart-4);
}

.compare-chart-fill-stop.four {
  stop-color: var(--chart-4);
}

.compare-chart-line.five,
.compare-chart-key.five {
  stroke: var(--chart-5);
  background: var(--chart-5);
}

.compare-chart-fill-stop.five {
  stop-color: var(--chart-5);
}

.compare-chart-line.six,
.compare-chart-key.six {
  stroke: var(--chart-6);
  background: var(--chart-6);
}

.compare-chart-fill-stop.six {
  stop-color: var(--chart-6);
}

.compare-chart-line.seven,
.compare-chart-key.seven {
  stroke: var(--chart-7);
  background: var(--chart-7);
}

.compare-chart-fill-stop.seven {
  stop-color: var(--chart-7);
}

.compare-chart-line.eight,
.compare-chart-key.eight {
  stroke: var(--chart-8);
  background: var(--chart-8);
}

.compare-chart-fill-stop.eight {
  stop-color: var(--chart-8);
}

.compare-chart-line.nine,
.compare-chart-key.nine {
  stroke: var(--chart-9);
  background: var(--chart-9);
}

.compare-chart-fill-stop.nine {
  stop-color: var(--chart-9);
}

.compare-chart-line.ten,
.compare-chart-key.ten {
  stroke: var(--chart-10);
  background: var(--chart-10);
}

.compare-chart-fill-stop.ten {
  stop-color: var(--chart-10);
}

.compare-chart-dot.one {
  fill: var(--chart-1);
}

.compare-chart-dot.two {
  fill: var(--chart-2);
}

.compare-chart-dot.three {
  fill: var(--chart-3);
}

.compare-chart-dot.four {
  fill: var(--chart-4);
}

.compare-chart-dot.five {
  fill: var(--chart-5);
}

.compare-chart-dot.six {
  fill: var(--chart-6);
}

.compare-chart-dot.seven {
  fill: var(--chart-7);
}

.compare-chart-dot.eight {
  fill: var(--chart-8);
}

.compare-chart-dot.nine {
  fill: var(--chart-9);
}

.compare-chart-dot.ten {
  fill: var(--chart-10);
}

.compare-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin: 0;
  padding: 0 14px 10px;
}

.compare-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 500;
}

.compare-chart-key {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.compare-chart-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.compare-table {
  min-width: 1120px;
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
  min-width: 170px;
}

.about-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 18px 18px;
}

.about-details {
  display: grid;
  gap: 12px;
  padding: 12px 18px 18px;
}

.issue-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 18px 18px;
}

.issue-list {
  display: grid;
  gap: 0;
  padding: 8px 18px 18px;
}

.issue-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.issue-row:last-child {
  border-bottom: 0;
}

.issue-row span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.issue-row p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.popular-issues {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 18px 18px;
}

.popular-issue {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 128px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--secondary);
}

.popular-issue-link {
  color: inherit;
  text-decoration: none;
}

.popular-issue-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.popular-issue span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.popular-issue p {
  color: var(--muted-foreground);
  font-size: 13px;
}

.issue-copy {
  display: grid;
  gap: 10px;
  padding: 8px 18px 18px;
}

.issue-copy p {
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
}

.issue-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.issue-status-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
}

.issue-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 18px 18px;
}

.issue-metric-grid .summary-tile small {
  display: block;
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.issue-chart-wrap {
  padding: 10px 18px 18px;
}

.issue-chart {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--secondary);
}

.issue-ranking-table {
  min-width: 720px;
}

.log-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.summary-tile,
.log-panel,
.roadmap-panel,
.roadmap-card,
.data-guide-panel,
.data-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.summary-tile {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
}

.summary-tile span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-tile strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.data-guide-panel,
.data-card {
  min-width: 0;
  overflow: hidden;
}

.data-guide-grid,
.data-insight-grid,
.source-mapping-grid {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.data-guide-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.data-insight-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  padding: 0;
}

.source-mapping-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.data-guide-grid article,
.mapping-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--secondary);
}

.data-guide-grid span,
.mapping-card span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-guide-grid strong,
.mapping-card strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.data-guide-grid p,
.mapping-card p,
.mapping-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.35;
}

.data-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--secondary);
}

.data-card-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.data-card-head p {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.data-source-list,
.group-list {
  display: grid;
}

.data-source-row,
.group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.data-source-row:last-child,
.group-row:last-child {
  border-bottom: 0;
}

.data-source-row strong,
.group-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.data-source-row small,
.group-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.data-source-row p,
.group-row p {
  margin-top: 5px;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.35;
}

.source-stats {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 190px;
}

.source-stats span,
.group-row > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 11px;
  font-weight: 700;
}

.group-row > span {
  align-self: start;
  max-width: 180px;
  line-height: 1.2;
}

.log-panel {
  min-width: 0;
  overflow: hidden;
}

.log-toolbar,
.roadmap-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 220px;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--muted);
}

.log-toolbar .search-field input,
.roadmap-toolbar .search-field input {
  width: 100%;
}

.roadmap-panel {
  min-width: 0;
  overflow: hidden;
}

.roadmap-count {
  color: var(--muted-foreground);
  font-size: 13px;
  text-align: right;
}

.roadmap-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 18px;
}

.roadmap-card {
  box-shadow: none;
  overflow: hidden;
}

.roadmap-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--secondary);
}

.roadmap-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.roadmap-card p {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.roadmap-list {
  display: grid;
}

.roadmap-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.roadmap-item:last-child {
  border-bottom: 0;
}

.roadmap-item strong,
.roadmap-item small {
  display: block;
}

.roadmap-item strong {
  font-size: 14px;
}

.roadmap-item small {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 12px;
  font-weight: 700;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted-foreground);
  background: var(--secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.data-table td {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.data-table td strong,
.data-table td small {
  display: block;
}

.data-table td small {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.data-table code {
  color: #0f3f7a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.planned {
  border-color: var(--line);
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.status-pill.covered {
  background: var(--accent);
  color: var(--accent-foreground);
}

.status-pill.downloaded,
.status-pill.ready {
  background: var(--accent);
  color: var(--accent-foreground);
}

.status-pill.backlog,
.status-pill.queued {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted-foreground);
}

.map-panel,
.country-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-panel {
  grid-area: map;
  min-width: 0;
  overflow: hidden;
}

.country-panel {
  grid-area: country;
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
}

.country-actions,
.profile-actions,
.followed-country-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.country-disclosure {
  min-width: 0;
  grid-column: 1 / -1;
}

.country-disclosure > summary {
  grid-template-columns: 86px minmax(0, 1fr) auto;
  list-style: none;
  cursor: pointer;
}

.country-disclosure > summary::-webkit-details-marker {
  display: none;
}

.country-disclosure > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-right: 4px;
}

.country-disclosure[open] > summary::after {
  transform: rotate(225deg);
}

.country-disclosure > summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 4px;
}

.country-details-content {
  display: grid;
  gap: 18px;
  padding-top: 14px;
}

.profile-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 18px 12px;
}

.profile-actions {
  padding: 0 18px 18px;
}

.followed-country-list {
  display: grid;
  gap: 10px;
  padding: 10px 18px 18px;
}

.followed-country-row,
.empty-state {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--secondary);
}

.followed-country-row strong,
.followed-country-row span,
.empty-state strong,
.empty-state span {
  display: block;
}

.followed-country-row span,
.empty-state span {
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
}

.topic-panel {
  grid-area: topics;
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 8px;
}

.panel-head p,
.country-meta,
.topic-details,
.topic-details small {
  color: var(--muted-foreground);
  font-size: 13px;
}

.map-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.panel-tab {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.panel-tab:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.panel-tab.active {
  background: var(--accent);
  color: var(--accent-foreground);
}

.panel-intro {
  padding: 0 18px 8px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.map-actions {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(190px, 0.9fr);
  align-items: end;
  gap: 10px;
}

.data-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.metric-field,
.source-field,
.filter-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.metric-field span,
.source-field span,
.filter-field span {
  margin: 0;
  white-space: nowrap;
}

.metric-field select,
.source-field select,
.filter-field select {
  min-height: 36px;
}

.source-settings {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-self: end;
}

.source-settings-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
}

.source-settings-icon {
  color: inherit;
  font-size: 18px;
  line-height: 1;
}

.source-settings-button:hover,
.source-settings-button[aria-expanded="true"] {
  border-color: var(--ring);
  background: var(--accent);
  color: var(--accent-foreground);
}

.source-settings-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(320px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.settings-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: start;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--secondary);
}

.settings-card-head strong,
.settings-card-head small {
  display: block;
}

.settings-card-head strong {
  color: var(--ink);
  font-size: 14px;
}

.settings-card-head small {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.settings-close-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.settings-close-button:hover {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.source-settings-panel .source-field {
  align-items: stretch;
  gap: 6px;
  flex-direction: column;
  padding: 12px 12px 0;
}

.source-settings-panel .source-field span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted-foreground);
  text-transform: uppercase;
}

.source-settings-current {
  margin: 8px 12px 12px;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.35;
}

.map-stage {
  position: relative;
  height: 520px;
  background: var(--secondary);
  overflow: hidden;
}

body.map-expanded {
  overflow-x: hidden;
}

body.map-expanded .dashboard-shell {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "map"
    "country"
    "topics";
}

body.map-expanded .map-panel {
  position: sticky;
  top: 0;
  z-index: 15;
}

body.map-expanded .map-stage {
  height: min(78vh, 820px);
}

body.map-expanded .country-panel {
  grid-area: country;
}

#worldMap {
  display: block;
  width: 100%;
  height: 100%;
}

.map-expand-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-overlay);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.map-expand-button:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.map-expand-button:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.28);
  outline-offset: 2px;
}

.expand-icon {
  display: block;
  width: 22px;
  height: 22px;
}

.expand-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.expand-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-shrink {
  display: none;
}

body.map-expanded .icon-expand {
  display: none;
}

body.map-expanded .icon-shrink {
  display: block;
}

.map-water {
  cursor: pointer;
}

.map-water:focus,
.country-shape:focus {
  outline: none;
}

.country-shape:focus-visible {
  stroke: var(--ring);
  stroke-width: 1.4;
}

.country-shape {
  fill: var(--map-land);
  stroke: var(--background);
  stroke-width: 0.45;
  cursor: pointer;
  transition: fill 140ms ease, opacity 140ms ease;
}

.country-shape.no-data {
  fill: var(--map-muted);
  cursor: default;
}

.country-shape.no-map-data {
  fill: var(--map-muted);
}

.country-shape.filtered-out {
  fill: var(--border);
  opacity: 0.36;
}

.country-shape:hover {
  fill: var(--secondary-foreground);
}

.country-shape.selected {
  fill: var(--accent-foreground);
  stroke: var(--primary);
  stroke-width: 0.8;
}

.country-shape.compare {
  fill: var(--warning);
}

.country-shape.eu-member-selected {
  fill: var(--accent-foreground);
  stroke: var(--primary);
  stroke-width: 0.8;
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  transform: translate(12px, 12px);
  z-index: 2;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(20, 26, 23, 0.2);
}

.map-choice {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 4px;
  min-width: 170px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-overlay);
  box-shadow: var(--shadow-elevated);
  transform: translate(12px, 12px);
}

.map-choice[hidden] {
  display: none;
}

.map-choice button {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.map-choice button:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.map-legend {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  grid-template-columns: auto auto minmax(84px, 120px) auto;
  align-items: center;
  gap: 8px;
  max-width: min(520px, calc(100% - 28px));
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-overlay);
  color: var(--muted-foreground);
  font-size: 12px;
  box-shadow: var(--shadow);
}

.map-legend span {
  color: var(--ink);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-legend strong {
  color: var(--muted-foreground);
  font-weight: 700;
  white-space: nowrap;
}

.map-legend i {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e0f2fe, #075985);
}

.map-legend small {
  grid-column: 1 / -1;
  color: var(--muted-foreground);
  font-weight: 700;
}

.profile-head {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.country-flag {
  width: 86px;
  height: 58px;
  object-fit: contain;
}

.profile-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.profile-list div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.profile-list div:nth-child(even) {
  background: var(--secondary);
}

.profile-list div:last-child {
  border-bottom: 0;
}

.profile-list dt {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
}

.topic-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 16px 0;
  overflow-x: auto;
}

.topic-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  min-height: 38px;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
}

.topic-button:hover,
.topic-button.active {
  border-color: var(--line);
  background: var(--accent);
  color: var(--accent-foreground);
}

.topic-layout {
  display: block;
  padding: 14px 16px 16px;
}

.topic-panel,
.chart-card {
  background: var(--panel);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.chart-card {
  min-width: 0;
  overflow: hidden;
}

.metric-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 18px 6px;
}

.metric-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.metric-card span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-card small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.change-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  gap: 4px;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.change-badge .change-arrow {
  font-size: 16px;
  line-height: 1;
}

.change-badge.up .change-arrow {
  color: #00c853;
}

.change-badge.down .change-arrow {
  color: #ff0000;
}

.change-badge.flat {
  color: var(--muted-foreground);
}

.metric-card.planned {
  background: var(--secondary);
}

.metric-card.covered {
  background: var(--accent);
}

.overview-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 18px 10px;
}

.chart-period-control {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
}

.chart-period-control button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 6px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.chart-period-control button[aria-pressed="true"] {
  background: var(--muted);
  color: var(--ink);
  font-weight: 700;
}

.chart-period-control button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}

.overview-charts[hidden] {
  display: none;
}

.overview-charts.overview-charts-compact {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 8px;
}

.overview-charts-compact .overview-chart-head {
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 8px 10px;
}

.overview-charts-compact .overview-chart-head > span {
  white-space: nowrap;
}

.overview-charts-compact .overview-chart-foot {
  padding: 0 10px 6px;
}

.overview-chart-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: none;
  overflow: hidden;
}

.overview-chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.overview-chart-head strong,
.overview-chart-head small,
.overview-chart-head span {
  display: block;
}

.overview-chart-head strong {
  color: var(--card-foreground);
  font-size: 13px;
  font-weight: 700;
}

.overview-chart-head .chart-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.overview-chart-head .chart-heading-value {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chart-info-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 18px;
  cursor: pointer;
  vertical-align: middle;
}

.chart-info-button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.chart-source-popover {
  margin: auto;
  width: min(320px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 400;
}

.chart-source-popover p {
  margin: 10px 0;
}

.chart-source-popover button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--secondary);
  color: var(--ink);
  cursor: pointer;
}

@media (pointer: coarse) {
  .chart-info-button {
    width: 44px;
    height: 44px;
  }
}

.overview-chart-head small {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 650;
}

.overview-chart-head span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.overview-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  padding: 6px 10px 0;
  overflow: visible;
}

.overview-chart-svg,
#mainChart {
  touch-action: pan-y pinch-zoom;
}

.chart-scrub-guide {
  pointer-events: none;
}

.chart-scrub-line {
  stroke: var(--muted-foreground);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-scrub-dot {
  fill: var(--chart-1);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.overview-chart-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0 12px 8px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.world-top-chart .compare-chart-area {
  opacity: 0.5;
}

.chart-card .compare-chart-area {
  opacity: 0.36;
}

.overview-top-legend {
  justify-content: flex-start;
  gap: 4px 8px;
  padding: 0 12px 8px;
  max-height: 42px;
  overflow: hidden;
}

.overview-top-legend span {
  max-width: 112px;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-chart-empty {
  min-height: 82px;
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.chart-wrap {
  height: 210px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0 10px 10px;
}

.chart-title {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--card-foreground);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

#mainChart {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px 12px 0;
}

.topic-details {
  display: grid;
  gap: 12px;
  padding: 12px 18px 18px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-row strong {
  color: var(--ink);
  text-align: right;
}

.axis {
  stroke: transparent;
  stroke-width: 0;
}

.grid-line {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.label {
  fill: var(--chart-muted);
  font-size: 11px;
  font-weight: 600;
}

.line-primary {
  fill: none;
  stroke: var(--chart-1);
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-compare {
  fill: none;
  stroke: var(--chart-2);
  stroke-width: 1.05;
  stroke-dasharray: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.area-primary,
.area-compare {
  stroke: none;
  opacity: 0.9;
}

.chart-gradient-stop-primary {
  stop-color: var(--chart-1);
}

.chart-gradient-stop-compare {
  stop-color: var(--chart-2);
}

.dot {
  fill: var(--chart-1);
  stroke: var(--card);
  stroke-width: 1.5;
}

.bar {
  fill: var(--secondary-foreground);
}

.bar.selected {
  fill: var(--accent-foreground);
}

.bar.negative {
  fill: var(--warning);
}

@media (max-width: 1050px) {
  body {
    padding-right: 0;
  }

  .app-header {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: sticky;
    top: 0;
    bottom: auto;
    width: 100%;
    padding: 10px 18px;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .side-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .side-nav a {
    flex: 0 0 auto;
  }

  .header-actions,
  .header-right {
    grid-column: 1;
    justify-self: stretch;
    justify-items: start;
    align-items: stretch;
  }

  .status {
    text-align: left;
  }

  .search-field input {
    width: 100%;
  }

  .site-nav {
    align-self: start;
    justify-content: flex-start;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "map"
      "country"
      "topics";
  }

  .globe-shell {
    grid-template-columns: 1fr;
  }

  .country-panel {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.65fr);
  }

  .subject-menu {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .log-summary,
  .data-guide-grid,
  .data-insight-grid,
  .source-mapping-grid,
  .about-grid,
  .issue-overview,
  .issue-metric-grid,
  .profile-settings-grid,
  .overview-charts,
  .popular-issues,
  .comparison-charts,
  .log-toolbar,
  .roadmap-toolbar,
  .roadmap-sections {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 760px) {
  body {
    font-size: 1rem;
    line-height: 1.5;
  }

  .side-nav a,
  .subject-button,
  .panel-tab {
    font-size: 0.875rem;
    font-weight: 600;
  }

  .panel-head h2,
  .profile-head h2 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .overview-chart-head .chart-label,
  .overview-chart-head > span,
  .chart-title {
    font-size: 1rem;
    line-height: 1.35;
  }

  .overview-chart-head > span {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
  }

  .overview-chart-head small,
  .profile-list dt {
    font-size: 0.8125rem;
    line-height: 1.45;
    font-weight: 500;
  }

  .change-badge,
  .country-meta,
  .panel-head p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .profile-list dd,
  .country-option,
  .chart-source-popover {
    font-size: 1rem;
    line-height: 1.5;
  }

  .app-header {
    position: relative;
    z-index: 60;
    gap: 12px;
    padding: 16px;
  }

  .app-header h1 {
    font-size: 24px;
  }

  .has-explore-sidebar {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .has-explore-sidebar .explore-sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 70;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }

  .has-explore-sidebar .explore-sidebar .side-panel-title,
  .side-panel > .side-panel-title {
    display: none;
  }

  .has-explore-sidebar .explore-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    gap: 2px;
  }

  .has-explore-sidebar .explore-nav a {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    font-size: 12px;
    min-height: 54px;
  }

  .side-panel {
    padding: 6px 12px;
    gap: 0;
  }

  .side-nav a,
  .subject-button,
  .panel-tab,
  .country-actions button {
    min-height: 44px;
  }

  .country-option {
    min-height: 44px;
    align-items: center;
  }

  .search-field input,
  .field select {
    min-height: 44px;
    font-size: 16px;
    max-width: 100%;
    min-width: 0;
  }

  .country-dropdown {
    max-height: 45dvh;
  }

  .map-panel > .panel-head,
  .globe-panel > .panel-head {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .map-title-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .map-title-row h2 {
    flex-basis: 100%;
  }

  .map-actions .field {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .map-actions .data-control {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .source-settings-button {
    width: 44px;
    height: 44px;
  }

  .country-panel {
    min-width: 0;
    padding: 14px;
    gap: 14px;
  }

  .country-panel .profile-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .country-panel .profile-list dd {
    overflow-wrap: anywhere;
  }

  .dashboard-shell > .topic-panel {
    margin-inline: -12px;
  }

  .topic-panel .topic-layout {
    padding: 0;
  }

  .topic-panel .overview-charts {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 0;
  }

  .topic-panel .overview-chart-card {
    border-radius: 0;
    border-inline: 0;
  }

  .topic-panel .overview-chart-head {
    display: grid;
    grid-template-columns: minmax(0, max-content) auto;
    justify-content: start;
    column-gap: 12px;
    align-items: center;
  }

  .topic-panel .overview-chart-head > div {
    display: contents;
  }

  .topic-panel .overview-chart-head .chart-label {
    grid-column: 1;
    grid-row: 1;
  }

  .topic-panel .overview-chart-head > span {
    grid-column: 2;
    grid-row: 1;
  }

  .topic-panel .overview-chart-head small {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .overview-chart-foot {
    flex-wrap: wrap;
  }

  .globe-actions {
    display: grid;
    width: 100%;
    min-width: 0;
  }

  .globe-actions button {
    min-height: 44px;
  }

  .globe-layer-field {
    min-width: 0;
  }

  .search-field {
    grid-template-columns: 1fr;
  }

  .dashboard-shell {
    padding: 12px;
  }

  .map-stage {
    height: 300px;
  }

  body.map-expanded .map-stage {
    height: 72vh;
  }

  .country-panel,
  .topic-layout,
  .map-actions,
  .subject-menu,
  .metric-summary,
  .overview-charts,
  .log-summary,
  .data-guide-grid,
  .data-insight-grid,
  .source-mapping-grid,
  .about-grid,
  .issue-detail-grid,
  .issue-overview,
  .issue-metric-grid,
  .popular-issues,
  .issue-row,
  .profile-settings-grid,
  .followed-country-row,
  .empty-state,
  .log-toolbar,
  .roadmap-toolbar,
  .roadmap-sections,
  .globe-actions,
  .globe-layer-row,
  .comparison-charts,
  .roadmap-item {
    grid-template-columns: 1fr;
  }

  .data-control {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .globe-stage {
    min-height: 420px;
    height: 62vh;
  }

  .profile-list div {
    grid-template-columns: 1fr;
  }

  .profile-list dd {
    text-align: left;
  }

  .chart-wrap {
    height: 330px;
  }

  .map-legend {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: 1fr auto;
  }

  .map-legend i {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
