/* =============================================================
   WeDefend :: SITREP
   Dark tactical console. Phosphor teal + amber, IBM Plex Mono.
   ============================================================= */

:root {
  --void:    #0a0f14;
  --void-2:  #0e1519;
  --panel:   #101820;
  --panel-2: #16202a;
  --line:    #1b2833;
  --line-2:  #253544;

  --ink:     #d8e2ea;
  --ink-2:   #a9b6c1;
  --dim:     #6b7a89;
  --faint:   #384654;

  --phosphor:    #4de3c0;
  --phosphor-2:  #22a882;
  --amber:       #f5a623;
  --amber-2:     #b5750f;
  --red:         #ff4757;
  --red-2:       #c22a38;

  --mono:    "IBM Plex Mono", ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  --sans-c:  "IBM Plex Sans Condensed", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --border:  1px solid var(--line);
  --border-lit: 1px solid var(--line-2);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image:
    linear-gradient(180deg, #0c1218 0%, var(--void) 40%, #060a0e 100%),
    radial-gradient(1200px 700px at 60% 30%, rgba(77,227,192,.05), transparent 60%);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--sans-c); font-weight: 700; letter-spacing: -0.01em; }
img, svg { display: block; }
b, strong { font-weight: 600; }
::selection { background: var(--phosphor); color: var(--void); }

/* ─────────────────────────────────── overlays: scanlines + vignette */
.scanlines {
  position: fixed; inset: 0; z-index: 300; pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom, rgba(0,0,0,.0) 0, rgba(0,0,0,.0) 2px, rgba(0,0,0,.14) 3px);
  mix-blend-mode: multiply;
}
.vignette {
  position: fixed; inset: 0; z-index: 299; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ─────────────────────────────────── HUD strip */
.hud {
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 10px 22px;
  background: linear-gradient(180deg, #10171e 0%, #0b1116 100%);
  border-bottom: var(--border-lit);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hud__left { display: inline-flex; align-items: center; gap: 12px; color: var(--phosphor); }
.hud__mark svg { width: 22px; height: 22px; color: var(--phosphor); }
.hud__title { font-family: var(--sans-c); font-weight: 700; font-size: 18px; letter-spacing: 0.02em; color: var(--ink); }
.hud__sep { color: var(--dim); }
.hud__mode { color: var(--phosphor); font-weight: 600; }
.hud__badge { font-size: 10px; color: var(--dim); border: 1px solid var(--faint); padding: 2px 6px; letter-spacing: 0.14em; }

.hud__nav {
  justify-self: center;
  display: inline-flex; gap: 22px;
}
.hud__nav a {
  color: var(--ink-2);
  padding: 4px 8px;
  border: 1px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.hud__nav a:hover { color: var(--phosphor); border-color: var(--line-2); background: rgba(77,227,192,.04); }

.hud__right { display: inline-flex; gap: 16px; align-items: center; color: var(--ink-2); }
.hud__field { display: inline-flex; align-items: baseline; gap: 6px; }
.hud__field label { color: var(--dim); font-size: 10px; }
.hud__field b { color: var(--phosphor); font-weight: 500; letter-spacing: 0.06em; min-width: 5ch; text-align: right; }
.hud__field--ok { color: var(--phosphor); }
.hud__field--ok .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--phosphor); box-shadow: 0 0 6px var(--phosphor); animation: blip 1.4s infinite; display: inline-block; margin-right: 4px; }
@keyframes blip { 0%, 60% { opacity: 1; } 70%, 100% { opacity: .35; } }

@media (max-width: 1100px) {
  .hud { grid-template-columns: 1fr; gap: 8px; padding: 10px 14px; }
  .hud__nav, .hud__right { justify-self: start; flex-wrap: wrap; }
}

/* ─────────────────────────────────── stack */
.stack { padding: 18px 22px 28px; max-width: 1520px; margin: 0 auto; }

.tactical {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 1180px) { .tactical { grid-template-columns: 1fr; } }

/* ─────────────────────────────────── panels */
.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: var(--border-lit);
  position: relative;
}
.panel + .panel { margin-top: 14px; }

.panel__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 12px;
  border-bottom: var(--border);
  background: rgba(0,0,0,.25);
}
.panel__idx {
  font-family: var(--sans-c);
  font-weight: 700;
  font-size: 12px;
  padding: 2px 6px;
  background: var(--phosphor);
  color: var(--void);
  letter-spacing: 0.02em;
}
.panel__title {
  color: var(--ink);
  font-family: var(--sans-c);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}
.panel__badge {
  color: var(--phosphor);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  border: 1px solid var(--line-2);
  padding: 2px 6px;
}

/* ─────────────────────────────────── stations list */
.stations { list-style: none; margin: 0; padding: 0; }
.stn { border-bottom: 1px dashed var(--line); }
.stn:last-child { border-bottom: 0; }
.stn > a, .stn > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto auto;
  column-gap: 8px; row-gap: 3px;
  padding: 12px 14px 10px;
  transition: background .15s;
}
.stn a:hover { background: rgba(77,227,192,.05); }
.stn__code {
  grid-row: 1 / span 3;
  align-self: center;
  font-family: var(--sans-c);
  font-weight: 700;
  font-size: 22px;
  color: var(--phosphor);
  letter-spacing: 0.04em;
  min-width: 42px;
}
.stn--live .stn__code { color: var(--phosphor); }
.stn--planned .stn__code { color: var(--dim); }
.stn__name {
  grid-column: 2 / 3; grid-row: 1;
  color: var(--ink); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.stn__host {
  grid-column: 2 / 3; grid-row: 2;
  color: var(--ink-2); font-size: 11.5px;
}
.stn__state {
  grid-column: 3 / 4; grid-row: 1 / span 2;
  align-self: center;
  color: var(--red);
  font-size: 10.5px; letter-spacing: 0.16em;
  display: inline-flex; align-items: center; gap: 5px;
}
.stn--planned .stn__state { color: var(--dim); }
.stn__arrow {
  grid-column: 3 / 4; grid-row: 3;
  align-self: end; text-align: right;
  color: var(--phosphor); font-size: 15px;
}
.stn__scope {
  grid-column: 2 / 4; grid-row: 3;
  font-size: 10.5px; color: var(--dim);
  letter-spacing: 0.04em; line-height: 1.6;
  padding-top: 4px; border-top: 1px dotted var(--line);
  margin-top: 4px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,71,87,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(255,71,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,71,87,0); }
}
.pulse--red { color: var(--red); background: var(--red); }

/* ─────────────────────────────────── scan panel */
.scan { padding: 12px 14px 14px; }
.scan__bar {
  height: 8px;
  background: var(--void-2);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.scan__fill {
  display: block; height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    var(--phosphor) 0 2px,
    var(--phosphor-2) 2px 4px);
  transition: width .1s linear;
}
.scan__labels {
  display: flex; justify-content: space-between;
  margin-top: 4px;
  color: var(--dim); font-size: 9.5px; letter-spacing: 0.06em;
}
.scan__log {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--phosphor);
  min-height: 88px;
  max-height: 88px;
  overflow: hidden;
}
.scan__log div { line-height: 1.4; }

/* ─────────────────────────────────── kv table */
.kv { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.kv th, .kv td { padding: 6px 12px; border-bottom: 1px dashed var(--line); text-align: left; }
.kv th { color: var(--dim); font-weight: 400; letter-spacing: 0.12em; width: 34%; text-transform: uppercase; font-size: 10.5px; }
.kv td { color: var(--ink); }
.kv .ok { color: var(--phosphor); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

/* ─────────────────────────────────── plate (map) */
.plate {
  position: relative;
  background: linear-gradient(180deg, var(--void-2) 0%, #070c11 100%);
  border: var(--border-lit);
  padding: 12px 14px 14px;
  min-height: 640px;
  display: flex; flex-direction: column;
}
.plate__brackets { position: absolute; inset: 6px; pointer-events: none; }
.bkt {
  position: absolute; width: 18px; height: 18px;
  border-color: var(--phosphor); border-style: solid; border-width: 0;
}
.bkt--tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.bkt--tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.bkt--bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.bkt--br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.plate__top, .plate__bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--dim);
  padding: 2px 6px;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.plate__top { border-bottom: 1px dotted var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.plate__bottom { border-top: 1px dotted var(--line); padding-top: 8px; margin-top: 8px; }
.plate__k { color: var(--phosphor); margin-right: 4px; }
.plate__top__coord b { color: var(--phosphor); font-weight: 500; }
.ok { color: var(--phosphor); }
.warn { color: var(--amber); }

.plate__map {
  position: relative;
  flex: 1;
  min-height: 520px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgba(77,227,192,.04) 0%, transparent 60%),
    var(--void);
  border: 1px solid var(--line);
}

/* Grid overlay */
.grid { position: absolute; inset: 0; pointer-events: none; opacity: .8; z-index: 1; }
.grid__h, .grid__v {
  position: absolute; inset: 0;
  background-repeat: repeat;
}
.grid__h {
  background-image: linear-gradient(to bottom, rgba(77,227,192,.08) 1px, transparent 1px);
  background-size: 100% 40px;
}
.grid__v {
  background-image: linear-gradient(to right, rgba(77,227,192,.08) 1px, transparent 1px);
  background-size: 60px 100%;
}

/* Radar sweep */
.sweep {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    rgba(77,227,192,0) 0deg,
    rgba(77,227,192,0) 340deg,
    rgba(77,227,192,.10) 355deg,
    rgba(77,227,192,.25) 360deg);
  animation: rotate 12s linear infinite;
  mix-blend-mode: screen;
  opacity: .8;
}
@keyframes rotate { to { transform: rotate(360deg); } }

/* Crosshair */
.xhair { position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: 0; transition: opacity .1s; }
.xhair.is-on { opacity: 1; }
.xhair__h, .xhair__v {
  position: absolute; background: var(--phosphor); opacity: .35;
}
.xhair__h { left: 0; right: 0; height: 1px; }
.xhair__v { top: 0; bottom: 0; width: 1px; }
.xhair__dot {
  position: absolute;
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid var(--phosphor);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px var(--phosphor);
}

/* Map inline (SVG) */
.plate__inline { position: relative; z-index: 3; width: 100%; height: 100%; display: flex; align-items: center; }
.plate__inline svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
}

/* Countries — base */
.plate__inline path {
  fill: #0e1a20;
  stroke: #24384a;
  stroke-width: 0.5;
  transition: fill .12s ease, stroke .12s ease, stroke-width .12s ease;
}

/* Interactive regions — rest */
.plate__inline path[data-region] { cursor: pointer; }
.plate__inline path[data-region="ru"] {
  fill: rgba(77,227,192,.10);
  stroke: rgba(77,227,192,.55);
  stroke-width: 0.7;
}
.plate__inline path[data-region="me"] {
  fill: rgba(245,166,35,.10);
  stroke: rgba(245,166,35,.55);
  stroke-width: 0.7;
}

/* Group hover — the fix (all RU or all ME light together) */
.plate__inline.is-hover-ru path[data-region="ru"],
.plate__inline path[data-region="ru"]:hover {
  fill: rgba(77,227,192,.55);
  stroke: var(--phosphor);
  stroke-width: 1.1;
  filter: drop-shadow(0 0 8px rgba(77,227,192,.9));
}
.plate__inline.is-hover-me path[data-region="me"],
.plate__inline path[data-region="me"]:hover {
  fill: rgba(245,166,35,.55);
  stroke: var(--amber);
  stroke-width: 1.1;
  filter: drop-shadow(0 0 8px rgba(245,166,35,.9));
}

/* ─────────────────────────────────── target panel */
.target { padding: 14px; }
.target__iso {
  font-family: var(--sans-c);
  font-weight: 700; font-size: 44px;
  color: var(--phosphor);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.target__name {
  font-size: 12px; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.target[data-tone="ru"] .target__iso { color: var(--phosphor); }
.target[data-tone="me"] .target__iso { color: var(--amber); }
.target[data-tone="me"] .panel__badge { color: var(--amber); border-color: var(--amber); }
.target__go {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--phosphor);
  color: var(--phosphor);
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: background .15s, color .15s;
}
.target__go:hover { background: var(--phosphor); color: var(--void); }
.target[data-tone="me"] .target__go { border-color: var(--amber); color: var(--amber); }
.target[data-tone="me"] .target__go:hover { background: var(--amber); color: var(--void); }

/* ─────────────────────────────────── caps micro-list */
.caps { list-style: none; margin: 0; padding: 0; }
.caps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  padding: 10px 14px;
  border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.caps li:last-child { border-bottom: 0; }
.caps__k {
  font-family: var(--sans-c);
  font-weight: 700; font-size: 12px;
  color: var(--phosphor);
  letter-spacing: 0.04em;
  grid-row: 1 / span 2; align-self: center;
}
.caps li > span:nth-child(2) {
  color: var(--ink);
  font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
}
.caps__d {
  grid-column: 2; grid-row: 2;
  color: var(--dim); font-size: 11px;
}

/* ─────────────────────────────────── ticker */
.ticker {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: var(--border-lit);
  padding: 8px 14px;
  background: rgba(0,0,0,.35);
  overflow: hidden;
}
.ticker__lbl {
  color: var(--void); background: var(--phosphor);
  padding: 2px 8px;
  font-size: 10.5px; letter-spacing: 0.16em;
  font-weight: 700;
}
.ticker__track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  color: var(--phosphor);
  font-size: 11.5px;
  animation: ticker 40s linear infinite;
}
.ticker__track span::after { content: "  ◆"; color: var(--faint); margin-left: 24px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─────────────────────────────────── link (contact) */
.link {
  margin-top: 22px;
  padding: 32px 22px;
  border: var(--border-lit);
  background:
    linear-gradient(180deg, var(--panel) 0%, var(--void-2) 100%);
}
.link__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  max-width: 1200px; margin: 0 auto;
}
.link__k { font-size: 11px; color: var(--phosphor); letter-spacing: 0.16em; }
.link h2 {
  font-size: 28px;
  margin-top: 6px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.link p { margin: 6px 0 0; color: var(--dim); font-size: 12.5px; }
.link__addr {
  font-family: var(--sans-c);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 34px);
  color: var(--phosphor);
  letter-spacing: 0.02em;
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 10px 4px;
  transition: color .15s;
}
.link__addr:hover { color: var(--amber); }
.link__brk { color: var(--dim); font-weight: 400; font-size: 20px; }
@media (max-width: 720px) { .link__inner { grid-template-columns: 1fr; } }

/* ─────────────────────────────────── footer */
.fut {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 22px;
  border-top: var(--border-lit);
  margin-top: 22px;
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.fut a { color: var(--phosphor); }

/* ─────────────────────────────────── reveal */
.panel, .plate, .link, .ticker, .fut {
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}
.rail--left .panel:nth-child(1) { animation-delay: 30ms; }
.rail--left .panel:nth-child(2) { animation-delay: 110ms; }
.rail--left .panel:nth-child(3) { animation-delay: 190ms; }
.plate { animation-delay: 60ms; animation-duration: .9s; }
.rail--right .panel:nth-child(1) { animation-delay: 130ms; }
.rail--right .panel:nth-child(2) { animation-delay: 210ms; }
.ticker { animation-delay: 260ms; }
.link { animation-delay: 320ms; }
.fut { animation-delay: 380ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, .sweep, .ticker__track, .pulse, .hud__field--ok .dot {
    animation: none !important;
    transition: none !important;
  }
}

/* ─────────────────────────────────── responsive tightening */
@media (max-width: 1180px) {
  .plate { min-height: 520px; }
  .plate__map { min-height: 420px; }
}
@media (max-width: 720px) {
  .stack { padding: 12px 12px 20px; }
  .hud__nav { display: none; }
}
