:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #647080;
  --line: #d8dee8;
  --paper: #fbfcfe;
  --panel: #ffffff;
  --accent: #126c6a;
  --accent-2: #b84256;
  --accent-3: #d59b22;
  --accent-4: #395b9d;
  --soft: #eef6f4;
  --shadow: 0 18px 45px rgba(36, 47, 64, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf4f8;
  --muted: #9facba;
  --line: #31404e;
  --paper: #101821;
  --panel: #172230;
  --accent: #55c4bd;
  --accent-2: #e06379;
  --accent-3: #e0aa35;
  --accent-4: #79a6ff;
  --soft: #18302f;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(18, 108, 106, 0.12), transparent 28rem),
    linear-gradient(135deg, #f8fbfd 0%, #eef2f7 52%, #fff9ed 100%);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 10% 8%, rgba(85, 196, 189, 0.16), transparent 30rem),
    radial-gradient(circle at 92% 16%, rgba(224, 170, 53, 0.1), transparent 26rem),
    linear-gradient(135deg, #0b1118 0%, #111a24 54%, #171d25 100%);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(17rem, 21rem) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 1.25rem minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 100vh;
  overflow: visible;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid rgba(216, 222, 232, 0.86);
  backdrop-filter: blur(18px);
  transition: padding 180ms ease, background 180ms ease;
}

.sidebar-inner {
  height: 100%;
  overflow: auto;
  min-width: 0;
}

.app-shell.sidebar-collapsed .sidebar {
  overflow: visible;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
}

.app-shell.sidebar-collapsed .sidebar-inner {
  display: none;
}

.sidebar-edge-toggle {
  position: absolute;
  top: 50%;
  right: -1rem;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 3.1rem;
  border: 1px solid rgba(216, 222, 232, 0.95);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(36, 47, 64, 0.14);
  cursor: pointer;
  transform: translateY(-50%);
}

.sidebar-edge-toggle span[aria-hidden="true"] {
  writing-mode: vertical-rl;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.sidebar-edge-toggle:hover,
.sidebar-edge-toggle:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.16), 0 10px 22px rgba(36, 47, 64, 0.14);
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.brand-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  color: white;
  background: linear-gradient(145deg, var(--accent), #223c50);
  box-shadow: 0 10px 25px rgba(18, 108, 106, 0.24);
  font-size: 1.7rem;
  font-weight: 750;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.24rem;
  line-height: 1.1;
}

.version-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  color: #365064;
  background: rgba(238, 246, 244, 0.9);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.25;
}

.author-credit {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}

.author-credit:hover,
.author-credit:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16rem;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.search,
.filter-block,
.toggle-row,
.theme-control,
.stats-panel {
  margin-top: 1rem;
}

.search span,
.filter-block label,
.theme-control > span {
  display: block;
  margin-bottom: 0.45rem;
  color: #3d4856;
  font-size: 0.84rem;
  font-weight: 700;
}

input[type="search"],
select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0 0.8rem;
  color: var(--ink);
  background: var(--panel);
  outline: none;
}

input[type="search"]:focus,
select:focus,
.band-card:focus-visible,
.band-row:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.16);
}

.toggle-row {
  display: grid;
  gap: 0.65rem;
  color: #344152;
  font-size: 0.92rem;
}

.toggle-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0 0.8rem;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
  font-weight: 800;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.14);
  outline: none;
}

.theme-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 2.8rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #dfe6ef;
  transition: background 160ms ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 0.2rem;
  left: 0.22rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(36, 47, 64, 0.26);
  transition: transform 160ms ease, background 160ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-track {
  background: var(--accent);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(1.3rem);
  background: #0f1822;
}

.stats-panel {
  display: grid;
  gap: 0.7rem;
}

.stats-panel div {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
}

.stats-panel strong {
  display: block;
  font-size: 1.35rem;
}

.stats-panel span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.export-panel {
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(251, 252, 254, 0.92);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.export-toggle {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.65rem;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.export-toggle .eyebrow {
  display: block;
  margin-bottom: 0.14rem;
}

.export-title {
  display: block;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.15;
}

.panel-heading > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
  color: #214079;
  background: #e8eefb;
  font-size: 0.72rem;
  font-weight: 850;
}

.export-toggle:hover .country-disclosure,
.export-toggle:focus-visible .country-disclosure {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.16);
}

.export-toggle:focus-visible {
  outline: none;
}

.export-body {
  display: block;
}

.export-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.tool-button {
  min-height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: #2b3746;
  background: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

.tool-button:hover,
.tool-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.14);
  outline: none;
}

.tool-button.primary {
  border-color: var(--accent);
  color: white;
  background: var(--accent);
}

.export-output-label {
  display: block;
  margin-top: 0.8rem;
  margin-bottom: 0.45rem;
  color: #3d4856;
  font-size: 0.78rem;
  font-weight: 800;
}

.export-output {
  width: 100%;
  min-height: 12rem;
  max-height: 20rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.7rem;
  color: #243041;
  background: #ffffff;
  font: 0.76rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: none;
}

.export-output:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.14);
}

.content {
  min-width: 0;
  padding: clamp(1rem, 3vw, 2.25rem);
}

.overview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.chart-section,
.map-section,
.detail-panel {
  border: 1px solid rgba(216, 222, 232, 0.9);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.chart-section {
  padding: 1rem;
  margin-bottom: 1rem;
}

.map-section {
  padding: 1rem;
  margin-bottom: 1rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  color: var(--muted);
}

.section-heading span {
  font-size: 0.84rem;
}

.map-heading {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(31rem, 31rem) minmax(15rem, 1fr);
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.map-heading h3 {
  font-size: 1.05rem;
}

.map-controls {
  display: grid;
  grid-template-columns: 100%;
  align-items: center;
  justify-self: center;
  width: 31rem;
  min-width: 0;
}

.map-view-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.18rem;
  background: var(--panel);
}

.map-view-options legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.map-controls::before {
  content: "Map view";
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.map-view-options label {
  position: relative;
  display: block;
  min-width: 0;
}

.map-view-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.map-view-options span {
  display: grid;
  place-items: center;
  min-height: 1.85rem;
  border-radius: 0.4rem;
  padding: 0.38rem 0.62rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

#mapHint {
  justify-self: end;
  width: min(100%, 18rem);
  min-height: 1.85rem;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-view-options label:hover span {
  color: var(--ink);
  background: var(--soft);
}

.map-view-options input:checked + span {
  color: #071316;
  background: var(--accent);
}

.map-view-options label:hover input:checked + span {
  color: #071316;
  background: #71d5cf;
}

.map-tone-control,
.zone-tone-control {
  display: grid;
  grid-template-columns: auto minmax(7rem, 1fr) auto;
  align-items: center;
  gap: 0.38rem;
  width: min(13rem, 100%);
  justify-self: center;
  margin-top: 0.32rem;
  color: var(--muted);
}

.zone-tone-control[hidden] {
  display: none;
}

.map-tone-control span,
.zone-tone-control span {
  display: grid;
  place-items: center;
  width: 0.85rem;
  height: 0.85rem;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1;
}

.map-tone-control input,
.zone-tone-control input {
  width: 100%;
  height: 0.35rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.country-tone-control {
  margin-top: 0.22rem;
}

.country-tone-control input {
  accent-color: #7bd8cf;
}

.zone-tone-control[data-display="cq"] input {
  accent-color: #15b8be;
}

.zone-tone-control[data-display="itu"] input {
  accent-color: #f4c94c;
}

.zone-map-attribution {
  justify-self: center;
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}

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

.zone-map-attribution a {
  color: inherit;
  text-decoration-color: rgba(85, 196, 189, 0.55);
  text-underline-offset: 0.14em;
}

.zone-map-attribution a:hover,
.zone-map-attribution a:focus-visible {
  color: var(--accent);
}

.map-view-options input:focus-visible + span {
  outline: 3px solid rgba(85, 196, 189, 0.3);
  outline-offset: 2px;
}

.world-map {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(238, 246, 244, 0.82), rgba(232, 238, 251, 0.6));
}

.world-map svg {
  display: block;
  width: 100%;
  min-height: 18rem;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.world-map.is-zoomed svg {
  cursor: grab;
}

.world-map.panning svg {
  cursor: grabbing;
}

.map-coordinate-readout {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.62rem;
  border: 1px solid rgba(85, 196, 189, 0.34);
  border-radius: 0.45rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  pointer-events: none;
  backdrop-filter: blur(10px) saturate(1.08);
}

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

.world-map.has-spotlight > svg {
  filter: saturate(0.92) brightness(0.96);
  opacity: 0.78;
  transition: filter 180ms ease, opacity 180ms ease;
}

.country-spotlight {
  position: absolute;
  left: clamp(24rem, var(--spotlight-x, 50%), calc(100% - 24rem));
  top: clamp(1rem, var(--spotlight-y, 48%), calc(100% - 1rem));
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(15rem, 0.9fr) minmax(19rem, 1fr);
  width: min(48rem, calc(100% - 1.5rem));
  overflow: visible;
  transform: translate(-50%, -50%);
  gap: clamp(0.75rem, 1.7vw, 1rem);
  align-items: stretch;
  padding: clamp(0.9rem, 1.9vw, 1.15rem);
  border: 1px solid rgba(85, 196, 189, 0.5);
  border-radius: 0.75rem;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(239, 248, 247, 0.48)),
    radial-gradient(circle at 18% 18%, rgba(85, 196, 189, 0.18), transparent 38%);
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.62) inset;
  backdrop-filter: blur(18px) saturate(1.12);
  cursor: grab;
  animation: spotlight-pop 170ms ease-out;
}

.world-map.dragging-spotlight .country-spotlight {
  cursor: grabbing;
  user-select: none;
}

.country-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(85, 196, 189, 0.18), transparent 34%, rgba(224, 170, 53, 0.12));
}

.country-spotlight-glow {
  position: absolute;
  right: -2.2rem;
  bottom: -2.4rem;
  width: 9rem;
  height: 9rem;
  pointer-events: none;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(224, 170, 53, 0.25), transparent 68%);
}

@keyframes spotlight-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.country-spotlight-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid rgba(85, 196, 189, 0.28);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.country-spotlight-close:hover,
.country-spotlight-close:focus-visible {
  border-color: rgba(18, 108, 106, 0.38);
  background: var(--soft);
}

.country-spotlight-map {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 15.5rem;
  border: 1px solid rgba(85, 196, 189, 0.22);
  border-radius: 0.65rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(85, 196, 189, 0.24), transparent 38%),
    linear-gradient(135deg, rgba(230, 244, 242, 0.78), rgba(224, 233, 249, 0.58));
}

.country-spotlight-map svg {
  width: 100%;
  height: 100%;
  min-height: 14rem;
  max-height: 18rem;
  cursor: default;
  touch-action: auto;
}

.country-spotlight-map path {
  fill: rgba(85, 196, 189, 0.28);
  stroke: var(--accent);
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 18px 24px rgba(18, 108, 106, 0.22));
}

.capital-marker {
  pointer-events: none;
}

.capital-marker-pulse {
  fill: rgba(224, 170, 53, 0.25);
  stroke: rgba(224, 170, 53, 0.44);
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}

.capital-marker-dot {
  fill: #f3c44f;
  stroke: rgba(6, 34, 34, 0.82);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.32));
}

.capital-marker-label {
  fill: var(--ink);
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-linejoin: round;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
}

.capital-marker-leader {
  stroke: rgba(224, 170, 53, 0.82);
  stroke-width: 0.45;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.country-spotlight-info {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.7rem;
  padding-right: 1.05rem;
}

.country-spotlight-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}

.country-spotlight-flag {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.56);
  font-size: 1.65rem;
  box-shadow: 0 8px 22px rgba(18, 108, 106, 0.1);
}

.country-spotlight-title h4 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  line-height: 1;
}

.country-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
}

.country-spotlight-fact {
  min-width: 0;
  border: 1px solid rgba(82, 109, 132, 0.18);
  border-radius: 0.55rem;
  padding: 0.52rem 0.62rem;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.country-spotlight-fact span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.country-spotlight-fact strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.25;
}

.country-spotlight-link {
  align-self: flex-start;
  border: 0;
  border-radius: 0.45rem;
  padding: 0.62rem 0.82rem;
  color: #062222;
  background: linear-gradient(135deg, var(--accent), #d9bf58);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.country-spotlight-source {
  margin: -0.08rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.country-spotlight-source a {
  color: var(--accent);
  text-decoration: none;
}

.country-spotlight-source a:hover,
.country-spotlight-source a:focus-visible {
  text-decoration: underline;
}

.country-spotlight-link:hover,
.country-spotlight-link:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.map-zoom-control {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  min-height: 7rem;
  border: 1px solid rgba(216, 222, 232, 0.28);
  border-radius: 0.55rem;
  padding: 0.5rem 0.35rem;
  color: rgba(23, 32, 42, 0.72);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(36, 47, 64, 0.08);
  backdrop-filter: blur(6px);
}

.map-zoom-control span {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1;
}

.map-zoom-control input {
  width: 5.8rem;
  accent-color: var(--accent);
  transform: rotate(-90deg);
  margin: 2rem -1.8rem;
}

.map-reset-button {
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.18rem 0.35rem;
  color: var(--ink);
  background: var(--panel);
  font-size: 0.64rem;
  font-weight: 850;
  cursor: pointer;
}

.map-reset-button:hover,
.map-reset-button:focus-visible {
  border-color: rgba(18, 108, 106, 0.38);
  background: var(--soft);
}

.map-ocean {
  fill: url("#mapSea");
}

.map-region {
  cursor: pointer;
  outline: none;
}

.map-country {
  fill: rgba(255, 255, 255, 0.86);
  stroke: rgba(101, 116, 136, 0.5);
  stroke-opacity: var(--country-map-stroke-alpha, 0.84);
  stroke-width: 0.7;
  filter: brightness(var(--country-map-brightness, 1)) saturate(var(--country-map-saturation, 1));
  transition: fill 160ms ease, stroke 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.map-country.neutral {
  fill: rgba(222, 229, 238, 0.78);
  stroke: rgba(160, 171, 186, 0.55);
}

.map-country.region-north-america,
.map-country.region-east-asia {
  fill: rgba(225, 239, 248, 0.96);
}

.map-country.region-central-america,
.map-country.region-south-asia,
.map-country.region-southeast-asia {
  fill: rgba(238, 246, 244, 0.98);
}

.map-country.region-south-america,
.map-country.region-oceania {
  fill: rgba(255, 249, 235, 0.98);
}

.map-country.region-europe {
  fill: rgba(238, 242, 252, 0.98);
}

.map-country.region-middle-east {
  fill: rgba(250, 235, 219, 0.98);
}

.map-country.region-africa {
  fill: rgba(239, 239, 224, 0.98);
}

.zone-overlay {
  pointer-events: none;
}

.zone-overlay-cq,
.zone-overlay-itu {
  pointer-events: auto;
}

.zone-boundary {
  fill: rgba(255, 255, 255, 0.001);
  fill-rule: evenodd;
  vector-effect: non-scaling-stroke;
}

.zone-overlay-cq .zone-boundary {
  stroke: rgba(21, 184, 190, 0.9);
  stroke-width: var(--zone-overlay-cq-width, 1.4);
  stroke-opacity: var(--zone-overlay-alpha, 0.75);
  stroke-dasharray: 5 3.5;
  pointer-events: visiblePainted;
  cursor: pointer;
  transition: stroke 140ms ease, stroke-width 140ms ease, stroke-opacity 140ms ease, filter 140ms ease, fill 140ms ease;
}

.zone-overlay-cq .zone-boundary.zone-hover {
  fill: rgba(21, 184, 190, 0.08);
  stroke: rgba(119, 244, 255, 1);
  stroke-width: 3.6;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 5px rgba(119, 244, 255, 0.86));
}

.zone-overlay-cq .zone-boundary.zone-selected {
  fill: rgba(21, 184, 190, 0.12);
  stroke: rgba(119, 244, 255, 1);
  stroke-width: var(--zone-overlay-cq-selected-width, 2.2);
  stroke-opacity: var(--zone-overlay-selected-alpha, 1);
  stroke-dasharray: none;
  filter: drop-shadow(0 0 8px rgba(119, 244, 255, 0.9));
}

.zone-overlay-itu .zone-boundary {
  stroke: rgba(224, 170, 53, 0.95);
  stroke-width: var(--zone-overlay-itu-width, 1.45);
  stroke-opacity: var(--zone-overlay-alpha, 0.75);
  pointer-events: visiblePainted;
  cursor: pointer;
  transition: stroke 140ms ease, stroke-width 140ms ease, stroke-opacity 140ms ease, filter 140ms ease, fill 140ms ease;
}

.zone-overlay-itu .zone-boundary.zone-hover {
  fill: rgba(244, 201, 76, 0.075);
  stroke: rgba(255, 238, 121, 1);
  stroke-width: 3.8;
  filter: drop-shadow(0 0 5px rgba(255, 238, 121, 0.88));
}

.zone-overlay-itu .zone-boundary.zone-selected {
  fill: rgba(244, 201, 76, 0.12);
  stroke: rgba(255, 238, 121, 1);
  stroke-width: var(--zone-overlay-itu-selected-width, 2.3);
  stroke-opacity: var(--zone-overlay-selected-alpha, 1);
  filter: drop-shadow(0 0 8px rgba(255, 238, 121, 0.92));
}

.zone-label {
  font-size: 20px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke fill;
  cursor: pointer;
  opacity: var(--zone-overlay-alpha, 0.75);
  pointer-events: visiblePainted;
  transition: filter 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.zone-overlay-cq .zone-label {
  fill: rgba(21, 184, 190, 0.96);
  stroke: rgba(4, 13, 22, 0.74);
  stroke-width: 3.5;
}

.zone-overlay-cq .zone-label.zone-hover {
  filter: drop-shadow(0 0 7px rgba(119, 244, 255, 0.9));
}

.zone-overlay-cq .zone-label.zone-selected {
  opacity: var(--zone-overlay-selected-alpha, 1);
  filter: drop-shadow(0 0 8px rgba(119, 244, 255, 0.95));
}

.zone-overlay-itu .zone-label {
  fill: rgba(244, 201, 76, 0.98);
  stroke: rgba(4, 13, 22, 0.78);
  stroke-width: 3.7;
}

.zone-overlay-itu .zone-label.zone-hover {
  filter: drop-shadow(0 0 7px rgba(255, 238, 121, 0.9));
}

.zone-overlay-itu .zone-label.zone-selected {
  opacity: var(--zone-overlay-selected-alpha, 1);
  filter: drop-shadow(0 0 8px rgba(255, 238, 121, 0.95));
}

.zone-overlay-status {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
  paint-order: stroke fill;
  stroke: var(--panel);
  stroke-width: 4;
}

.itu-zone-map {
  background: linear-gradient(135deg, rgba(43, 103, 154, 0.95), rgba(31, 77, 129, 0.92));
}

.itu-map-ocean {
  fill: url("#ituMapSea");
}

.itu-map-country {
  fill: rgba(38, 45, 43, 0.76);
  stroke: rgba(222, 228, 218, 0.35);
  stroke-width: 0.45;
  transition: fill 160ms ease, stroke 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.itu-map-country.muted {
  opacity: 0.25;
}

.itu-map-country.highlight {
  fill: rgba(85, 196, 189, 0.82);
  stroke: #f6f62a;
  stroke-width: 1.25;
  opacity: 1;
  filter: drop-shadow(0 4px 8px rgba(4, 11, 16, 0.46));
}

.itu-map-grid {
  fill: none;
  stroke: rgba(236, 243, 247, 0.34);
  stroke-width: 0.8;
}

.itu-zone-cell {
  cursor: pointer;
  outline: none;
}

.itu-zone-cell rect {
  fill: rgba(243, 243, 31, 0.1);
  stroke: rgba(243, 243, 31, 0.82);
  stroke-width: 1.2;
  transition: fill 160ms ease, stroke 160ms ease, filter 160ms ease;
}

.itu-zone-cell text {
  fill: #f6f62a;
  stroke: rgba(13, 21, 25, 0.72);
  stroke-width: 3;
  paint-order: stroke fill;
  font-size: 22px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.itu-zone-cell:hover rect,
.itu-zone-cell:focus-visible rect,
.itu-zone-cell.active rect {
  fill: rgba(85, 196, 189, 0.45);
  stroke: var(--accent);
  filter: drop-shadow(0 5px 8px rgba(10, 18, 24, 0.34));
}

.itu-zone-cell.no-matches rect {
  fill: rgba(243, 243, 31, 0.08);
}

.map-country:hover,
.map-country:focus-visible,
.map-country.active {
  fill: rgba(18, 108, 106, 0.2);
  stroke: var(--accent);
  stroke-width: 1.4;
  filter:
    brightness(var(--country-map-brightness, 1))
    saturate(var(--country-map-saturation, 1))
    drop-shadow(0 4px 7px rgba(36, 47, 64, 0.18));
}

.map-region.muted {
  opacity: 0.42;
}

.map-region.muted:hover,
.map-region.muted:focus-visible {
  opacity: 0.82;
}



.coverage-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-width: 0;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--accent);
  background: white;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible,
.tool-button.compact:hover,
.tool-button.compact:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.14);
  outline: none;
}

.icon-button:disabled,
.tool-button.compact:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.zoom-label {
  min-width: 3rem;
  color: #334154;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.tool-button.compact {
  min-height: 2rem;
  padding: 0 0.55rem;
  font-size: 0.76rem;
}

.clear-marks {
  justify-self: start;
  margin-top: 0.15rem;
}

.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 850;
}

.section-toggle:hover .country-disclosure,
.section-toggle:focus-visible .country-disclosure {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.16);
}

.coverage-rail {
  display: block;
}

.coverage-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.9rem;
  scrollbar-color: rgba(18, 108, 106, 0.45) #e7ebf1;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}

.coverage-scroll::after {
  content: "Scroll horizontally to inspect zoomed frequencies";
  position: sticky;
  left: 0;
  display: none;
  width: fit-content;
  margin-top: 0.35rem;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: #365064;
  background: #eef3f8;
  font-size: 0.72rem;
  font-weight: 800;
}

.coverage-scroll.is-scrollable::after {
  display: block;
}

.coverage-scroll::-webkit-scrollbar {
  height: 0.9rem;
}

.coverage-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e1e7ef;
}

.coverage-scroll::-webkit-scrollbar-thumb {
  border: 0.22rem solid #e1e7ef;
  border-radius: 999px;
  background: var(--accent);
}

.coverage-scroll::-webkit-scrollbar-thumb:hover {
  background: #0c5453;
}

.coverage-scroll:focus-visible {
  outline: 3px solid rgba(18, 108, 106, 0.18);
  outline-offset: 0.25rem;
}

.coverage-plot {
  display: grid;
  gap: 0.55rem;
  min-width: 100%;
  transition: width 160ms ease;
}

.frequency-axis {
  display: grid;
  grid-template-columns: 5.5rem minmax(30rem, 1fr) 7rem;
  align-items: end;
  gap: 0.7rem;
  min-height: 2.05rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.axis-track {
  position: relative;
  height: 1.55rem;
  border-bottom: 1px solid #cfd7e4;
}

.axis-tick {
  position: absolute;
  bottom: -0.05rem;
  width: 1px;
  height: 0.7rem;
  background: #aeb9c8;
}

.axis-tick span {
  position: absolute;
  bottom: 0.72rem;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.axis-spacer,
.axis-meta {
  padding-bottom: 0.1rem;
}

.coverage-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(30rem, 1fr) 7rem;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
}

.rail-label {
  font-weight: 800;
}

.rail-track-wrap {
  min-width: 0;
}

.rail-track {
  position: relative;
  display: block;
  height: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf1;
}

.rail-fill {
  position: absolute;
  inset-block: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.rail-meta {
  color: var(--muted);
  text-align: right;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(26rem, 1fr) minmax(21rem, 0.72fr);
  gap: 1rem;
  align-items: start;
}

.country-groups {
  display: grid;
  gap: 0.85rem;
}

.zone-results-heading {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

#bandGrid[hidden] + .detail-panel {
  grid-column: 1 / -1;
}

.region-section {
  overflow: hidden;
  border: 1px solid rgba(216, 222, 232, 0.95);
  border-radius: 0.5rem;
  background: rgba(247, 250, 252, 0.9);
  box-shadow: 0 12px 28px rgba(36, 47, 64, 0.09);
}

.region-section.expanded {
  border-color: rgba(18, 108, 106, 0.34);
}

.region-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  border: 0;
  padding: 1rem 1rem 1rem 0.72rem;
  color: inherit;
  text-align: left;
  background: linear-gradient(90deg, rgba(240, 247, 246, 0.98), rgba(255, 250, 239, 0.78));
  cursor: pointer;
  user-select: none;
}

.region-section:hover .region-header {
  background: linear-gradient(90deg, #eef7f5, #fff5df);
}

.region-head-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.72rem;
}

.region-title {
  display: grid;
  min-width: 0;
  gap: 0.16rem;
}

.region-title strong {
  font-size: 1.18rem;
}

.region-title span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.region-body {
  display: grid;
  gap: 0.75rem;
  padding: 0 0.85rem 0.85rem;
}

.country-section {
  overflow: hidden;
  border: 1px solid rgba(216, 222, 232, 0.95);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(36, 47, 64, 0.08);
}

.country-section.expanded {
  border-color: rgba(18, 108, 106, 0.32);
}

.country-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  border: 0;
  padding: 1rem;
  color: inherit;
  text-align: left;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(238, 246, 244, 0.74));
  cursor: pointer;
  user-select: none;
}

.country-head-main {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 0.85rem;
  min-width: 0;
  text-align: left;
}

.country-section:hover .country-header {
  background: linear-gradient(90deg, #ffffff, #e8f4f1);
}

.country-disclosure {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--accent);
  background: white;
  font-size: 1.2rem;
  font-weight: 900;
}

.country-header:focus-visible .country-disclosure {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.16);
}

.country-title {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 0.85rem;
  min-width: 0;
}

.country-flag {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 14px rgba(36, 47, 64, 0.08);
  font-size: 1.28rem;
  line-height: 1;
}

.country-title strong {
  display: block;
  overflow: hidden;
  font-size: 1.28rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-title span span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-summary {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.country-body {
  display: grid;
  gap: 0.9rem;
  padding: 0 1rem 1rem;
}

.mark-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.mark-pair {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.mark-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.48rem;
  color: #344152;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  font-weight: 850;
  cursor: pointer;
}

.mark-toggle span[aria-hidden="true"] {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
}

.mark-toggle:hover,
.mark-toggle:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 108, 106, 0.13);
  outline: none;
}

.mark-toggle.active {
  border-color: rgba(18, 108, 106, 0.5);
  color: #0d4e4c;
  background: #ddf3ef;
}

.mark-toggle.partial {
  border-color: rgba(213, 155, 34, 0.55);
  background: #fff3d8;
}

.mark-toggle.active span[aria-hidden="true"] {
  color: var(--accent);
}

.mode-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.mode-card {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fbfcfe;
}

.mode-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.1rem;
}

.mode-card p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.mode-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.band-list {
  display: grid;
  gap: 0.5rem;
}

.band-row {
  display: grid;
  grid-template-columns: minmax(5rem, 0.55fr) minmax(5rem, 0.42fr) minmax(13rem, 1.25fr) minmax(9rem, 0.9fr);
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

.band-row:hover,
.band-row.active {
  border-color: rgba(18, 108, 106, 0.58);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(36, 47, 64, 0.08);
}

.band-row-main strong,
.band-row-main span {
  display: block;
}

.band-row-main strong {
  font-size: 1rem;
}

.band-row-main span,
.band-row-modes,
.band-row-meta .meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.band-row-strip {
  display: flex;
  height: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf1;
}

.band-row-modes {
  display: grid;
  gap: 0.2rem;
}

.band-row-modes span {
  overflow-wrap: anywhere;
}

.band-row-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.85rem;
}

.band-card {
  display: grid;
  gap: 0.6rem;
  min-height: 10.4rem;
  border: 1px solid rgba(216, 222, 232, 0.95);
  border-radius: 0.5rem;
  padding: 0.95rem;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(36, 47, 64, 0.08);
  cursor: pointer;
}

.band-card:hover,
.band-card.active {
  border-color: rgba(18, 108, 106, 0.52);
  transform: translateY(-1px);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.country {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.badges {
  display: flex;
  gap: 0.3rem;
}

.badge {
  border-radius: 999px;
  padding: 0.18rem 0.42rem;
  color: #293442;
  background: #edf1f5;
  font-size: 0.7rem;
  font-weight: 850;
}

.badge.hot {
  color: #7a2633;
  background: #fde7ec;
}

.badge.mode {
  color: #214079;
  background: #e8eefb;
}

.band-name {
  font-size: 1.25rem;
}

.range {
  color: #2d3846;
  font-weight: 750;
}

.meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.mode-strip,
.detail-strip {
  display: flex;
  height: 0.64rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf1;
}

.segment {
  min-width: 0.35rem;
}

.segment.cw {
  background: var(--accent-4);
}

.segment.data {
  background: var(--accent-3);
}

.segment.ssb {
  background: var(--accent-2);
}

.detail-panel {
  position: sticky;
  top: 1rem;
  padding: 1.15rem;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-head h3 {
  font-size: 1.55rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.fact {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fbfcfe;
}

.fact span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  overflow-wrap: anywhere;
}

.mode-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.legend-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.2rem;
}

.notes {
  margin: 1rem 0;
  color: #334154;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.regulator-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.55rem;
  border-radius: 0.5rem;
  padding: 0 0.8rem;
  color: white;
  background: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: 0.5rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.top-button {
  position: fixed;
  right: clamp(1rem, 2vw, 1.6rem);
  bottom: clamp(1rem, 2vw, 1.6rem);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border: 1px solid rgba(18, 108, 106, 0.38);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #395b9d);
  box-shadow: 0 16px 34px rgba(36, 47, 64, 0.22);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.top-button:hover,
.top-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(36, 47, 64, 0.28);
}

.top-button span:first-child {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  line-height: 1;
}

:root[data-theme="dark"] .sidebar {
  background: rgba(18, 28, 38, 0.86);
  border-right-color: rgba(64, 80, 96, 0.9);
}

:root[data-theme="dark"] .app-shell.sidebar-collapsed .sidebar {
  background: rgba(18, 28, 38, 0.58);
}

:root[data-theme="dark"] .sidebar-edge-toggle,
:root[data-theme="dark"] .country-disclosure,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .tool-button,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] input[type="search"],
:root[data-theme="dark"] select {
  color: var(--ink);
  background: #172230;
}

:root[data-theme="dark"] .top-button {
  border-color: rgba(85, 196, 189, 0.44);
  color: #081117;
  background: linear-gradient(135deg, var(--accent), #e0aa35);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .map-coordinate-readout {
  border-color: rgba(85, 196, 189, 0.42);
  color: #e8f1f5;
  background: rgba(9, 18, 28, 0.82);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}

:root[data-theme="dark"] .search span,
:root[data-theme="dark"] .filter-block label,
:root[data-theme="dark"] .theme-control > span,
:root[data-theme="dark"] .toggle-row,
:root[data-theme="dark"] .meta,
:root[data-theme="dark"] .mode-card p,
:root[data-theme="dark"] .band-row-main span,
:root[data-theme="dark"] .band-row-modes,
:root[data-theme="dark"] .band-row-meta .meta,
:root[data-theme="dark"] .notes {
  color: var(--muted);
}

:root[data-theme="dark"] .brand-mark {
  background: linear-gradient(145deg, #277c78, #223a54);
  box-shadow: 0 10px 25px rgba(85, 196, 189, 0.18);
}

:root[data-theme="dark"] .version-badge {
  color: #d7e5ec;
  background: rgba(35, 52, 71, 0.92);
}

:root[data-theme="dark"] .export-panel,
:root[data-theme="dark"] .stats-panel div,
:root[data-theme="dark"] .chart-section,
:root[data-theme="dark"] .map-section,
:root[data-theme="dark"] .detail-panel,
:root[data-theme="dark"] .region-section,
:root[data-theme="dark"] .country-section,
:root[data-theme="dark"] .mode-card,
:root[data-theme="dark"] .band-row,
:root[data-theme="dark"] .band-card,
:root[data-theme="dark"] .fact,
:root[data-theme="dark"] .empty-state {
  border-color: rgba(67, 84, 101, 0.92);
  background: rgba(23, 34, 48, 0.88);
}

:root[data-theme="dark"] .world-map {
  background: linear-gradient(135deg, rgba(21, 47, 51, 0.78), rgba(25, 37, 58, 0.78));
}

:root[data-theme="dark"] .country-spotlight {
  background:
    linear-gradient(135deg, rgba(18, 28, 41, 0.66), rgba(24, 47, 50, 0.5)),
    radial-gradient(circle at 18% 18%, rgba(85, 196, 189, 0.14), transparent 38%);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.44),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

:root[data-theme="dark"] .country-spotlight-map {
  background:
    radial-gradient(circle at 28% 24%, rgba(85, 196, 189, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(12, 26, 38, 0.96), rgba(28, 42, 66, 0.82));
}

:root[data-theme="dark"] .country-spotlight-fact {
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .capital-marker-label {
  stroke: rgba(12, 20, 30, 0.82);
}

:root[data-theme="dark"] .country-spotlight-close,
:root[data-theme="dark"] .country-spotlight-flag {
  background: rgba(14, 24, 35, 0.72);
}

:root[data-theme="dark"] .map-zoom-control {
  border-color: rgba(85, 196, 189, 0.24);
  color: rgba(237, 244, 248, 0.74);
  background: rgba(18, 29, 41, 0.18);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .map-view-options input:checked + span {
  color: #061114;
}

:root[data-theme="dark"] .map-country {
  fill: rgba(45, 64, 82, 0.96);
  stroke: rgba(124, 150, 174, 0.76);
}

:root[data-theme="dark"] .map-country.neutral {
  fill: rgba(50, 63, 80, 0.78);
  stroke: rgba(112, 132, 154, 0.68);
}

:root[data-theme="dark"] .map-country.region-north-america,
:root[data-theme="dark"] .map-country.region-east-asia {
  fill: rgba(54, 83, 107, 0.98);
}

:root[data-theme="dark"] .map-country.region-central-america,
:root[data-theme="dark"] .map-country.region-south-asia,
:root[data-theme="dark"] .map-country.region-southeast-asia {
  fill: rgba(45, 91, 85, 0.98);
}

:root[data-theme="dark"] .map-country.region-south-america,
:root[data-theme="dark"] .map-country.region-oceania {
  fill: rgba(86, 75, 45, 0.98);
}

:root[data-theme="dark"] .map-country.region-europe {
  fill: rgba(60, 76, 111, 0.98);
}

:root[data-theme="dark"] .map-country.region-middle-east {
  fill: rgba(92, 67, 56, 0.98);
}

:root[data-theme="dark"] .map-country.region-africa {
  fill: rgba(72, 82, 55, 0.98);
}

:root[data-theme="dark"] .map-country:hover,
:root[data-theme="dark"] .map-country:focus-visible,
:root[data-theme="dark"] .map-country.active {
  fill: rgba(85, 214, 205, 0.72);
  stroke: var(--accent);
  filter:
    brightness(var(--country-map-brightness, 1))
    saturate(var(--country-map-saturation, 1))
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.32));
}



:root[data-theme="dark"] .region-header {
  background: linear-gradient(90deg, rgba(20, 35, 47, 0.98), rgba(44, 41, 29, 0.72));
}

:root[data-theme="dark"] .region-section:hover .region-header {
  background: linear-gradient(90deg, #1c3041, #3a3525);
}

:root[data-theme="dark"] .country-header {
  background: linear-gradient(90deg, rgba(24, 36, 50, 0.98), rgba(24, 48, 47, 0.72));
}

:root[data-theme="dark"] .country-flag {
  background: rgba(12, 19, 27, 0.72);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .country-section:hover .country-header {
  background: linear-gradient(90deg, #1d2b3c, #1a3b39);
}

:root[data-theme="dark"] .band-row:hover,
:root[data-theme="dark"] .band-row.active,
:root[data-theme="dark"] .band-card:hover,
:root[data-theme="dark"] .band-card.active {
  background: rgba(30, 45, 62, 0.98);
  border-color: rgba(85, 196, 189, 0.62);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .export-output {
  color: #dce8f1;
  background: #0f1720;
}

:root[data-theme="dark"] .badge {
  color: #d8e4ec;
  background: #223244;
  border-color: var(--line);
}

:root[data-theme="dark"] .badge.hot {
  color: #ffd6df;
  background: #4a2631;
}

:root[data-theme="dark"] .badge.mode,
:root[data-theme="dark"] .panel-heading > span {
  color: #dbe7ff;
  background: #25395d;
}

:root[data-theme="dark"] .mark-toggle {
  color: #d8e4ec;
  background: rgba(15, 24, 34, 0.82);
}

:root[data-theme="dark"] .mark-toggle.active {
  border-color: rgba(85, 196, 189, 0.64);
  color: #dffbf8;
  background: rgba(31, 78, 74, 0.86);
}

:root[data-theme="dark"] .mark-toggle.partial {
  border-color: rgba(224, 170, 53, 0.68);
  color: #ffe6a7;
  background: rgba(73, 58, 25, 0.88);
}

:root[data-theme="dark"] .mark-toggle.active span[aria-hidden="true"] {
  color: var(--accent);
}

:root[data-theme="dark"] .range,
:root[data-theme="dark"] .zoom-label,
:root[data-theme="dark"] .fact strong {
  color: var(--ink);
}

:root[data-theme="dark"] .rail-track,
:root[data-theme="dark"] .band-row-strip,
:root[data-theme="dark"] .mode-strip,
:root[data-theme="dark"] .detail-strip {
  background: #263343;
}

:root[data-theme="dark"] .axis-track {
  border-bottom-color: #506071;
}

:root[data-theme="dark"] .axis-tick {
  background: #718093;
}

:root[data-theme="dark"] .coverage-scroll {
  scrollbar-color: rgba(85, 196, 189, 0.78) #223044;
}

:root[data-theme="dark"] .coverage-scroll::after {
  color: #d7e5ec;
  background: #233447;
}

:root[data-theme="dark"] .coverage-scroll::-webkit-scrollbar-track {
  background: #223044;
}

:root[data-theme="dark"] .coverage-scroll::-webkit-scrollbar-thumb {
  border-color: #223044;
  background: var(--accent);
}

:root[data-theme="dark"] .regulator-link,
:root[data-theme="dark"] .tool-button.primary {
  color: #071316;
  background: var(--accent);
}

@media (max-width: 980px) {
  .app-shell,
  .app-shell.sidebar-collapsed,
  .workbench {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .detail-panel {
    position: static;
    height: auto;
  }

  .sidebar-edge-toggle {
    top: auto;
    right: 1rem;
    bottom: -1.55rem;
    transform: none;
  }

  .app-shell.sidebar-collapsed .sidebar {
    min-height: 3.1rem;
  }

  .overview {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading,
  .coverage-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-heading {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .map-controls {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }

  .map-view-options {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #mapHint {
    width: 100%;
    justify-self: stretch;
  }

  .world-map {
    overflow-x: auto;
  }

  .world-map svg {
    min-width: 48rem;
  }

  .country-spotlight {
    left: 50%;
    top: auto;
    bottom: 0.75rem;
    grid-template-columns: 1fr;
    width: min(34rem, calc(100% - 1.5rem));
    transform: translateX(-50%);
  }

  .country-spotlight-info {
    padding-right: 0;
  }

  .country-spotlight-map {
    min-height: 10.5rem;
  }

  .coverage-tools {
    gap: 0.55rem;
  }

  .band-row {
    grid-template-columns: minmax(5rem, 0.5fr) minmax(5rem, 0.4fr) minmax(12rem, 1fr);
  }

  .band-row-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .content,
  .sidebar {
    padding: 1rem;
  }

  .coverage-row {
    grid-template-columns: 4.4rem minmax(24rem, 1fr) 6rem;
  }

  .frequency-axis {
    grid-template-columns: 4.4rem minmax(24rem, 1fr) 6rem;
  }

  .map-section {
    padding: 0.8rem;
  }

  .country-spotlight-grid {
    grid-template-columns: 1fr;
  }

  .rail-meta {
    text-align: right;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .region-header,
  .country-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .region-head-main,
  .country-head-main {
    align-items: flex-start;
  }

  .country-summary {
    justify-content: flex-start;
  }

  .mode-summary,
  .band-row {
    grid-template-columns: 1fr;
  }

  .band-row-meta {
    grid-column: auto;
  }
}
