/* Command Center — production stylesheet for ukrainewarlosses.com */

:root {
  --ua-blue: #0057b7;
  --ua-gold: #ffd700;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}
[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-2: #0e141f;
  --surface: #131a28;
  --surface-2: #19233475;
  --border: #223048;
  --text: #e8edf5;
  --text-2: #93a1b8;
  --accent: #4d8dff;
  --gold: #ffd75e;
  --up: #ffb454;
  --chart-accent: #4d8dff;
  --chart-accent2: #ffb454;
  --chart-grid: #22304877;
  --chart-text: #7484a0;
  --shadow: 0 10px 30px rgb(0 0 0 / .35);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #dde4ef;
  --text: #16202e;
  --text-2: #5b6980;
  --accent: #0057b7;
  --gold: #b98a00;
  --up: #c2410c;
  --chart-accent: #0057b7;
  --chart-accent2: #d97706;
  --chart-grid: #dde4ef;
  --chart-text: #7c8aa0;
  --shadow: 0 8px 24px rgb(22 32 46 / .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.spacer { flex: 1; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-inner { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700;
  font-size: 17px; color: var(--text); white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.flag {
  display: flex; flex-direction: column; width: 22px; height: 15px;
  border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--border);
}
.flag i { flex: 1; }
.flag i:first-child { background: var(--ua-blue); }
.flag i:last-child { background: var(--ua-gold); }
.day-chip {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px;
  white-space: nowrap;
}
.controls { display: flex; align-items: center; gap: 8px; }
select.lang-select {
  appearance: none; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 28px 6px 10px;
  font: 500 13.5px var(--font-sans); cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%23888" stroke-width="1.5" stroke-linecap="round"/></svg>');
  background-repeat: no-repeat; background-position: right 9px center;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="dark"] .only-dark { display: none; }
[data-theme="light"] .only-light { display: none; }
.only-dark, .only-light { display: inline-flex; }

/* ---------- hero ---------- */
.hero { padding: 44px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: stretch; }
.hero-main {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0%, var(--surface) 55%);
  border: 1px solid var(--border); border-radius: 16px; padding: 26px 28px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero-main::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 220px at 85% -20%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%);
}
.hero-title { font-size: 23px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 14px; }
.kicker {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12px;
  font-weight: 600; color: var(--text-2); margin: 0 0 4px;
}
.big-number {
  font-family: var(--font-mono); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(46px, 7.2vw, 78px); line-height: 1.02; margin: 2px 0 4px;
  font-variant-numeric: tabular-nums;
}
.hero-sub { color: var(--text-2); margin: 0; font-size: 15.5px; max-width: 46ch; }
.delta-badges { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; position: relative; }
.delta {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; color: var(--up); white-space: nowrap;
}
.delta span { color: var(--text-2); font-family: var(--font-sans); font-weight: 500; margin-left: 5px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.side-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.side-card .label { font-size: 13px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.side-card .value { font-family: var(--font-mono); font-size: clamp(26px, 3vw, 34px); font-weight: 600; font-variant-numeric: tabular-nums; }
.side-card .foot { font-size: 13.5px; color: var(--text-2); }
.updated-line { display: flex; align-items: center; gap: 8px; margin: 18px 2px 0; font-size: 13.5px; color: var(--text-2); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #34c07c; flex: none; animation: pulse 2.2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(52 192 124 / .5); }
  55% { box-shadow: 0 0 0 7px rgb(52 192 124 / 0); }
}

/* ---------- sections ---------- */
main section { padding: 26px 0; }
h2.sec { font-size: 21px; margin: 0 0 16px; letter-spacing: -.01em; }

/* ---------- stat grid ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 15px 17px 13px; cursor: pointer; text-align: left; color: inherit; font: inherit;
  transition: transform .15s ease, border-color .15s ease; position: relative;
  display: block; width: 100%;
}
.stat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.stat[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.stat-top { display: flex; align-items: center; gap: 9px; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.stat-top .ic { color: var(--accent); flex: none; }
.stat-num { display: block; font-family: var(--font-mono); font-size: 26px; font-weight: 600; margin: 7px 0 1px; font-variant-numeric: tabular-nums; }
.stat-delta { display: block; font-size: 12.5px; color: var(--up); font-family: var(--font-mono); font-weight: 600; }
.stat-delta i { color: var(--text-2); font-style: normal; font-family: var(--font-sans); font-weight: 500; }
.stat .spark-box { position: absolute; right: 14px; bottom: 12px; width: 88px; opacity: .8; }

/* ---------- chart panel ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-title { font-size: 18px; font-weight: 700; margin: 0; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.seg button {
  border: 0; background: transparent; color: var(--text-2); font: 600 13px var(--font-sans);
  padding: 6px 12px; border-radius: 7px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / .18); }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  box-shadow: var(--shadow); font-size: 12.5px; display: flex; flex-direction: column;
}
.chart-tip strong { font-family: var(--font-mono); font-size: 14px; }
.chart-tip span { color: var(--text-2); }
#main-chart { min-height: 180px; }

/* ---------- resources ---------- */
.res-intro { color: var(--text-2); margin: -8px 0 16px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.res {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; color: inherit; transition: transform .15s ease, border-color .15s ease;
}
.res:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.res > .ic { color: var(--accent); flex: none; margin-top: 2px; }
.res b { display: flex; align-items: center; gap: 6px; font-size: 15.5px; }
.res b .ic { width: 13px; height: 13px; color: var(--text-2); flex: none; }
.res p { margin: 8px 0 0; font-size: 13.5px; color: var(--text-2); }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--border); margin-top: 28px; padding: 30px 0 44px;
  background: var(--bg-2); color: var(--text-2); font-size: 14px;
}
footer.site .cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; }
footer.site h3 { color: var(--text); font-size: 15px; margin: 0 0 8px; }
footer.site h3.mt { margin-top: 18px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.share-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text); font: 500 13px var(--font-sans); padding: 5px 13px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.legal { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 14px; }
.legal details { margin-bottom: 8px; }
.legal summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 4px 0; }
.legal-body {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; margin: 8px 0 4px; max-height: 420px; overflow: auto;
}
.legal-body h2 { font-size: 16px; color: var(--text); }
.legal-body a { overflow-wrap: anywhere; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  footer.site .cols { grid-template-columns: 1fr; }
  .day-chip { display: none; }
}
@media (max-width: 560px) {
  .hero-side { grid-template-columns: 1fr; }
  .stat .spark-box { width: 70px; }
  .brand-text { font-size: 15px; white-space: normal; line-height: 1.15; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .stat, .res { transition: none; }
}
