:root {
  color-scheme: dark;
  --ink: #f6f8fb;
  --muted: #aeb6c6;
  --soft: #d5dbe7;
  --panel: rgba(13, 17, 24, 0.8);
  --panel-strong: rgba(13, 17, 24, 0.92);
  --line: rgba(238, 243, 255, 0.14);
  --line-strong: rgba(238, 243, 255, 0.24);
  --official: #ff5f57;
  --investigation: #ffb14a;
  --surveillance: #39d39f;
  --info: #64b5ff;
  --globe-aura-opacity: 1;
}

* {
  box-sizing: border-box;
}

html,
body,
#map {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 52%, rgba(30, 82, 150, 0.48), transparent 38%),
    radial-gradient(circle at 52% 50%, rgba(8, 12, 28, 0) 0 38%, rgba(3, 9, 21, 0.88) 66%),
    #030813;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(152, 196, 255, 0.42) 0 1px, transparent 1.6px);
  background-position:
    0 0,
    38px 72px;
  background-size:
    96px 96px,
    142px 142px;
  opacity: 0.34;
}

body::after {
  z-index: 1;
  background:
    radial-gradient(circle at 52% 50%, transparent 0 36%, rgba(33, 78, 143, 0.3) 44%, transparent 55%),
    radial-gradient(circle at center, transparent 0 55%, rgba(1, 5, 14, 0.86) 88%);
  opacity: var(--globe-aura-opacity);
  transition: opacity 180ms ease;
}

#map {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: transparent;
  pointer-events: auto;
}

#map canvas {
  outline: none;
}

.alert-banner {
  position: fixed;
  inset: 0 0 auto;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  border-bottom: 1px solid rgba(255, 191, 76, 0.28);
  padding: 6px 46px 6px 18px;
  background: rgba(18, 23, 33, 0.92);
  color: #ffe6b0;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: auto;
}

.alert-banner[hidden] {
  display: none;
}

.alert-banner > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.alert-banner span {
  color: rgba(255, 244, 219, 0.82);
}

.alert-close {
  position: absolute;
  top: 4px;
  right: 10px;
  width: 24px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0;
  color: #ffe6b0;
  font-size: 16px;
  line-height: 1;
}

.maplibregl-popup-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 13px 12px;
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.maplibregl-popup-close-button {
  top: 6px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: rgba(7, 11, 18, 0.82);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  display: none;
}

.dashboard {
  position: fixed;
  inset: 48px 16px 16px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(280px, 330px) 1fr minmax(300px, 360px);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "command . feed"
    ". . feed";
  gap: 12px;
  pointer-events: none;
}

.dashboard[hidden],
.content-view[hidden] {
  display: none;
}

.panel {
  position: relative;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
  pointer-events: auto;
}

.command {
  grid-area: command;
  position: relative;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 16px;
}

.feed-panel {
  grid-area: feed;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  padding: 14px;
}

.panel-toggle {
  pointer-events: auto;
}

.panel-toggle {
  position: absolute;
  z-index: 4;
  top: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
}

.toggle-left {
  right: 12px;
}

.toggle-right {
  left: 12px;
}

.dashboard.is-left-collapsed {
  grid-template-columns: 48px 1fr minmax(300px, 360px);
}

.dashboard.is-right-collapsed {
  grid-template-columns: minmax(280px, 330px) 1fr 48px;
}

.dashboard.is-left-collapsed.is-right-collapsed {
  grid-template-columns: 48px 1fr 48px;
}

.dashboard.is-left-collapsed .command,
.dashboard.is-right-collapsed .feed-panel {
  min-height: 48px;
  padding: 6px;
  overflow: hidden;
}

.dashboard.is-left-collapsed .command > :not(.panel-toggle),
.dashboard.is-right-collapsed .feed-panel > :not(.panel-toggle) {
  display: none;
}

.dashboard.is-left-collapsed .toggle-left,
.dashboard.is-right-collapsed .toggle-right {
  inset: 6px auto auto 6px;
}

.dashboard.is-left-collapsed .toggle-left {
  right: auto;
}

.dashboard.is-left-collapsed .toggle-left::before {
  content: "›";
}

.dashboard.is-right-collapsed .toggle-right::before {
  content: "‹";
}

.dashboard.is-left-collapsed .toggle-left,
.dashboard.is-right-collapsed .toggle-right {
  color: transparent;
}

.dashboard.is-left-collapsed .toggle-left::before,
.dashboard.is-right-collapsed .toggle-right::before {
  color: var(--ink);
}

.mobile-tabs {
  display: none;
}

.brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-right: 42px;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 191, 76, 0.16), 0 10px 22px rgba(0, 0, 0, 0.22);
}

.mark {
  display: grid;
  grid-template-columns: repeat(3, 7px);
  align-items: end;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.mark i {
  display: block;
  border-radius: 5px;
  background: linear-gradient(180deg, #72f0bd, #ffbf5b 54%, #ff625c);
}

.mark i:nth-child(1) {
  height: 14px;
}

.mark i:nth-child(2) {
  height: 24px;
}

.mark i:nth-child(3) {
  height: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-top: 12px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.18;
  letter-spacing: 0;
}

.brand p,
.section-title small,
.feed-time,
.feed-item span,
.empty-state span,
dd {
  color: var(--muted);
}

.brand p {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 760;
}

.brand p.is-scanning {
  color: #ff6b62;
}

.brand p.is-scan-complete {
  color: #47e6a6;
}

.brand p.is-no-updates {
  color: #ff6b62;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stats article,
.metrics article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.stats span,
.metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats strong,
.metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 1;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 11, 18, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

button:focus-visible,
a:focus-visible,
.feed-item:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.filter.is-active {
  border-color: rgba(100, 181, 255, 0.74);
  background: rgba(100, 181, 255, 0.2);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title button {
  min-height: 34px;
  padding: 0 12px;
}

.feed-panel .section-title {
  padding-left: 42px;
}

.flag {
  font-size: 18px;
  line-height: 1;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--dot-color);
  box-shadow: 0 0 18px var(--dot-color);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

dl {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
}

dt {
  color: var(--ink);
  font-weight: 850;
}

dd {
  margin: 0;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.source-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.feed {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.feed-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-height: 104px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 11, 18, 0.72);
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.feed-item.is-breaking-card {
  border-color: rgba(255, 95, 87, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 95, 87, 0.22);
}

.feed-item .feed-title {
  display: block;
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 2.4em;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  max-height: 2.4em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  white-space: normal;
}

.feed-time.is-breaking {
  color: #ffd9d6;
  font-weight: 900;
  text-transform: uppercase;
}

.feed-item span {
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.2;
}

.feed-item.is-selected {
  border-color: rgba(100, 181, 255, 0.72);
  background: rgba(100, 181, 255, 0.16);
}

.feed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.feed-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin-top: 2px;
}

.feed-read {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(100, 181, 255, 0.14);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.feed-item .badge {
  min-height: 19px;
  padding: 0 6px;
  font-size: 10px;
}

.status-official {
  color: var(--official);
}

.status-investigation {
  color: var(--investigation);
}

.status-positive {
  color: var(--surveillance);
}

.country-tag,
.icon-tag {
  background: rgba(255, 255, 255, 0.06);
}

.icon-tag {
  min-width: 28px;
  justify-content: center;
  padding: 0 6px;
}

.hot {
  border-color: rgba(255, 95, 87, 0.82);
  background: rgba(255, 95, 87, 0.16);
  color: #ffd9d6;
}

.see-more {
  width: 100%;
  margin-top: 10px;
}

.info-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.info-menu a,
.related-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.info-menu a:hover,
.related-links a:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.headline-popup .maplibregl-popup-tip {
  border-top-color: var(--panel-strong);
}

.callout {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 7px 9px;
  padding: 5px 24px 2px 2px;
}

.callout strong,
.callout p,
.callout small,
.callout a {
  grid-column: 2;
}

.callout strong {
  font-size: 14px;
  line-height: 1.22;
}

.callout p {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.35;
}

.callout small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.callout a {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(100, 181, 255, 0.18);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.content-view {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: auto;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(3, 8, 19, 0.96), rgba(3, 8, 19, 0.74)),
    rgba(3, 8, 19, 0.92);
}

.content-shell {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(7, 11, 18, 0.82);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.article-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.article-row {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  text-decoration: none;
}

.article-row span,
.article-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.article-row strong {
  font-size: 17px;
}

.article-row p,
.article-head p,
.article-body p {
  color: var(--soft);
  line-height: 1.55;
}

.article-head {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.article-head h1 {
  max-width: 760px;
  margin-top: 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
}

.article-body {
  display: grid;
  gap: 15px;
  max-width: 720px;
  margin-top: 20px;
}

.article-body:not(.static-body) section {
  display: grid;
  gap: 18px;
}

.article-body:not(.static-body) p {
  margin: 0;
}

.static-body {
  gap: 22px;
}

.static-body section {
  display: grid;
  gap: 9px;
}

.article-body h2,
.original-sources h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.original-sources {
  display: grid;
  gap: 9px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.original-sources a {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  color: var(--ink);
  text-decoration: none;
}

.original-sources span {
  color: var(--muted);
  font-size: 12px;
}

.back-map.bottom {
  margin-top: 24px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  gap: 6px;
  color: var(--ink);
  text-align: center;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(3, 8, 19, 0.68);
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.loading.is-hidden {
  display: none;
}

@media (max-width: 1040px) {
  .dashboard {
    grid-template-columns: minmax(280px, 330px) 1fr minmax(280px, 340px);
    grid-template-areas:
      "command . feed"
      "countries . feed"
      ". . feed";
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  html,
  body {
    min-height: 100%;
  }

  #map {
    position: relative;
    order: 2;
    inset: auto;
    z-index: 1;
    height: min(58vh, 500px);
    min-height: 360px;
  }

  .dashboard {
    position: relative;
    inset: auto;
    z-index: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: calc(100vh - 48px);
    margin-top: 48px;
    padding: 0;
    pointer-events: auto;
  }

  .panel {
    border-radius: 0;
    box-shadow: none;
  }

  .command {
    order: 1;
    position: relative;
    z-index: 3;
    border-width: 0 0 1px;
    padding: 24px 20px 14px;
    background: var(--panel-strong);
  }

  .brand {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding-right: 0;
  }

  .mark {
    width: 42px;
    height: 42px;
  }

  .alert-banner {
    min-height: 48px;
    justify-content: flex-start;
    padding: 7px 42px 7px 12px;
    font-size: 10px;
    line-height: 1.25;
    text-align: left;
  }

  .alert-banner > div {
    justify-content: flex-start;
    gap: 2px 7px;
  }

  h1 {
    font-size: clamp(26px, 7vw, 38px);
  }

  .brand p {
    font-size: 16px;
  }

  .stats {
    margin-top: 16px;
  }

  .stats article {
    padding: 11px;
  }

  .stats span {
    font-size: 13px;
  }

  .stats strong {
    font-size: 28px;
  }

  .filters,
  .feed-panel {
    display: none;
  }

  .panel-toggle {
    display: none;
  }

  .mobile-tabs {
    order: 3;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    background: var(--panel-strong);
  }

  .mobile-tab {
    min-height: 58px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(7, 11, 18, 0.72);
    color: var(--ink);
    font-size: clamp(16px, 4.2vw, 20px);
    font-weight: 850;
  }

  .mobile-tab.is-active {
    border-color: var(--info);
    background: rgba(100, 181, 255, 0.2);
  }

  .dashboard[data-mobile-panel="news"] .feed-panel {
    display: grid;
    order: 4;
    position: relative;
    z-index: 3;
  }

  .dashboard[data-mobile-panel="news"] .feed-panel {
    grid-area: feed;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: none;
    border-width: 1px 0 0;
    padding: 16px 20px 24px;
    background: var(--panel-strong);
  }

  .dashboard[data-mobile-panel="news"] .feed {
    overflow: visible;
  }

  .info-menu {
    justify-content: center;
  }

  .section-title {
    min-height: 32px;
  }

  .feed-item strong {
    font-size: 15px;
  }

  .headline-popup .maplibregl-popup-content {
    max-width: min(310px, calc(100vw - 36px));
  }

  .dashboard.is-left-collapsed,
  .dashboard.is-right-collapsed,
  .dashboard.is-left-collapsed.is-right-collapsed {
    grid-template-columns: 1fr;
  }

  .content-view {
    padding: 10px;
  }

  .article-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
