:root {
  --ink: #0a1622;
  --ink-2: #0f2233;
  --panel: #12283b;
  --parchment: #f4ecd8;
  --parchment-dim: #cdc3a8;
  --gold: #c9a25a;
  --gold-bright: #e2bd78;
  --teal: #3f8f92;
  --ro-blue: #3d6fa3;
  --ua-yellow: #d9b23a;
  --ussr-red: #9c3b3b;
  --line-red: #c25a4f;
  --radius: 14px;
  font-size: 17px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--parchment);
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Noto Serif", serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

a { color: var(--gold-bright); }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.site-header {
  border-bottom: 1px solid rgba(244,236,216,0.12);
  background: rgba(10,22,34,0.9);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
}

.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.brand-link { color: var(--parchment-dim); text-decoration: none; }
.brand-link:hover { color: var(--gold-bright); }

.lang-switch a {
  color: var(--parchment-dim);
  text-decoration: none;
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-variant: small-caps;
  letter-spacing: 0.03em;
}
.lang-switch a.active { color: var(--ink); background: var(--gold-bright); }

.hero { padding: 56px 0 20px; }

.kicker {
  display: inline-block;
  font-family: -apple-system, sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.08;
  margin: 0 0 20px;
}

.lead { font-size: 1.15rem; color: var(--parchment); max-width: 62ch; }
.lead + .lead { margin-top: 14px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 34px 0 10px;
}

.metric-card {
  background: var(--panel);
  border: 1px solid rgba(201,162,90,0.25);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.metric-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  color: var(--gold-bright);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-label {
  font-family: -apple-system, sans-serif;
  font-size: 13px;
  color: var(--parchment-dim);
  line-height: 1.5;
}

section { margin: 64px 0; }

.section-header { margin-bottom: 4px; }
.section-title { font-size: 1.6rem; margin-bottom: 8px; }
.section-subtitle {
  color: var(--parchment-dim);
  max-width: 64ch;
  font-size: 1rem;
}

/* Instrument */
.instrument {
  background: linear-gradient(180deg, #0d1e2d, #0a1622);
  border: 1px solid rgba(201,162,90,0.3);
  border-radius: 18px;
  padding: 22px 22px 26px;
  margin-top: 24px;
}

.year-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.year-big {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.6rem;
  color: #fff;
}

.year-status {
  font-family: -apple-system, sans-serif;
  font-size: 13.5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  white-space: nowrap;
}
.status-ro { background: rgba(61,111,163,0.25); color: #a9c7e8; }
.status-ussr { background: rgba(156,59,59,0.25); color: #e3a9a9; }
.status-ua { background: rgba(217,178,58,0.2); color: #eccd7c; }
.status-war { background: rgba(194,90,79,0.3); color: #f0b8b0; }

.map-wrap {
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 10px;
  margin: 14px 0;
}
svg#chart { width: 100%; height: auto; display: block; }

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: rgba(244,236,216,0.25);
  border-radius: 2px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold-bright);
  border: 2px solid #fff2;
  cursor: pointer;
  margin-top: -7px;
}
input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold-bright);
  border: 2px solid #fff2;
  cursor: pointer;
}

.tick-labels {
  display: flex;
  justify-content: space-between;
  font-family: -apple-system, sans-serif;
  font-size: 11px;
  color: var(--parchment-dim);
  margin-top: 4px;
  padding: 0 2px;
}

.event-note {
  font-family: -apple-system, sans-serif;
  font-size: 14.5px;
  color: var(--parchment);
  min-height: 44px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(201,162,90,0.08);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}

.step-buttons { display: flex; gap: 8px; }
.step-buttons button {
  background: var(--panel);
  color: var(--parchment);
  border: 1px solid rgba(244,236,216,0.2);
  border-radius: 8px;
  width: 34px; height: 34px;
  cursor: pointer;
  font-size: 15px;
}
.step-buttons button:hover { border-color: var(--gold-bright); }

blockquote.legal {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold-bright);
  border-left: 3px solid var(--gold);
  padding-left: 18px;
  margin: 20px 0;
}
blockquote.legal cite {
  display: block;
  font-family: -apple-system, sans-serif;
  font-style: normal;
  font-size: 12.5px;
  color: var(--parchment-dim);
  margin-top: 8px;
}

.caveat {
  background: rgba(194,90,79,0.08);
  border: 1px solid rgba(194,90,79,0.3);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14.5px;
  color: var(--parchment);
}
.caveat strong { color: var(--gold-bright); }

.method-note {
  font-family: -apple-system, sans-serif;
  font-size: 13.5px;
  color: var(--parchment-dim);
  border-top: 1px solid rgba(244,236,216,0.12);
  padding-top: 18px;
}
.method-note a { color: var(--teal); }

footer.site-footer {
  border-top: 1px solid rgba(244,236,216,0.12);
  margin-top: 60px;
  padding-top: 24px;
  font-family: -apple-system, sans-serif;
  font-size: 13px;
  color: var(--parchment-dim);
}

@media (max-width: 560px) {
  :root { font-size: 16px; }
  .hero { padding-top: 38px; }
  .year-big { font-size: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
