/* ─────────────────────────────────────────────────────────────
   NATO Defence 2026 — Night Briefing
   Deep navy · cold paper · gold for Romania
───────────────────────────────────────────────────────────── */

:root {
  --bg: #070b14;
  --bg-elev: #0c1220;
  --bg-card: #10182a;
  --bg-card-hover: #142033;
  --ink: #e8edf5;
  --ink-soft: #b4c0d4;
  --muted: #7a8aa3;
  --line: rgba(232, 237, 245, 0.08);
  --line-strong: rgba(232, 237, 245, 0.14);
  --nato: #4a90d9;
  --nato-dim: rgba(74, 144, 217, 0.18);
  --gold: #f2c14e;
  --gold-dim: rgba(242, 193, 78, 0.15);
  --gold-glow: rgba(242, 193, 78, 0.35);
  --signal: #3ecf8e;
  --signal-dim: rgba(62, 207, 142, 0.12);
  --warn: #e07a5f;
  --threshold: rgba(232, 237, 245, 0.25);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --max: 1120px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(74, 144, 217, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(242, 193, 78, 0.06), transparent 45%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(74, 144, 217, 0.05), transparent 50%),
    var(--bg);
}

a {
  color: var(--nato);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1a3a6b, #0d1f3c);
  border: 1px solid rgba(74, 144, 217, 0.35);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.logo-text span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.nav-desktop {
  display: none;
  flex: 1;
  justify-content: center;
  gap: 0.15rem;
}

.nav-desktop a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-desktop a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.lang-switch {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 2px;
}

.lang-btn {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  color: var(--muted);
  transition: all 0.15s;
  letter-spacing: 0.04em;
}

.lang-btn.active {
  background: var(--gold-dim);
  color: var(--gold);
}

.lang-btn:hover:not(.active) {
  color: var(--ink);
}

.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink-soft);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(12, 18, 32, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1.25rem 1.25rem;
  z-index: 99;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

/* ── Layout ── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.section {
  padding: 3.5rem 0 1rem;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: none;
  padding-top: 2rem;
}

.kicker {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.65rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

/* ── Sticky Romania strip ── */
.ro-sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: rgba(12, 18, 32, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(242, 193, 78, 0.25);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}

.ro-sticky.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ro-sticky[hidden] {
  display: none !important;
}

.ro-sticky-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.ro-sticky-inner strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  font-weight: 600;
}

.ro-sticky-inner #sticky-rank {
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.sticky-label {
  color: var(--ink-soft);
  flex: 1;
  min-width: 120px;
}

.sticky-cta {
  font-weight: 650;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.78rem;
}

.sticky-cta:hover {
  color: var(--ink);
}

/* ── Hook grid (Romania numbers in hero) ── */
.hook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.hook-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  transition: border-color 0.2s, background 0.2s;
}

.hook-card.primary {
  border-color: rgba(242, 193, 78, 0.28);
  background: linear-gradient(145deg, rgba(242, 193, 78, 0.1), var(--bg-card) 55%);
}

.hook-card:hover {
  border-color: var(--line-strong);
}

.hook-value {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gold);
  line-height: 1.05;
  margin-bottom: 0.35rem;
}

.hook-card:not(.primary) .hook-value {
  color: var(--ink);
  font-size: clamp(1.35rem, 3.5vw, 1.7rem);
}

.hook-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
}

.hook-from {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.scroll-cue {
  margin: 0 0 1.5rem;
  text-align: center;
}

.scroll-cue a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.scroll-cue a:hover {
  color: var(--ink);
}

.alliance-fold {
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
  padding: 0.15rem 0.85rem 0.85rem;
}

.alliance-fold summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.75rem 0.15rem;
  list-style: none;
}

.alliance-fold summary::-webkit-details-marker {
  display: none;
}

.alliance-fold summary::before {
  content: "▸ ";
  color: var(--nato);
}

.alliance-fold[open] summary::before {
  content: "▾ ";
}

.alliance-fold[open] summary {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.85rem;
}

.alliance-fold .kpi-grid {
  margin-top: 0.25rem;
}

.ro-next {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.ro-next a {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--gold);
  text-decoration: none;
}

.ro-next a:hover {
  color: var(--ink);
}

/* ── Hero ── */
.hero {
  padding: 2rem 0 0.5rem;
}

.hero h1 {
  max-width: 22ch !important;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nato);
  margin-bottom: 1rem;
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-dim);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 18ch;
  margin-bottom: 1.1rem;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  align-items: center;
  margin-bottom: 2.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.kpi {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  transition: border-color 0.2s, background 0.2s;
}

.kpi:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.kpi-value .unit {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Timeline ── */
.timeline {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 0;
  border-left: 2px solid var(--line-strong);
  margin-left: 0.35rem;
}

.timeline-item {
  position: relative;
  padding: 0 0 1.35rem 1.35rem;
}

.timeline-item:last-child {
  padding-bottom: 0.25rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--nato);
}

.timeline-item.current::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-dim);
}

.tl-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

.tl-year {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.tl-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 550;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.timeline-item.current .tl-title {
  color: var(--gold);
}

.tl-desc {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 52ch;
}

@media (min-width: 800px) {
  .timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-left: none;
    gap: 0.75rem;
    margin-left: 0;
    position: relative;
    padding-top: 1.25rem;
  }

  .timeline::before {
    content: "";
    position: absolute;
    top: 0.35rem;
    left: 4%;
    right: 4%;
    height: 2px;
    background: var(--line-strong);
  }

  .timeline-item {
    padding: 1.1rem 0 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    padding: 1rem 0.9rem;
  }

  .timeline-item::before {
    left: 50%;
    top: -1.35rem;
    transform: translateX(-50%);
  }

  .timeline-item.current {
    border-color: rgba(242, 193, 78, 0.35);
    background: linear-gradient(180deg, rgba(242, 193, 78, 0.08), var(--bg-card));
  }
}

/* ── Ankara summit outcomes ── */
.ankara-block {
  margin: 2.25rem 0 0.5rem;
}

.ankara-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.ankara-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.ankara-card.focus {
  border-color: rgba(242, 193, 78, 0.35);
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.08), var(--bg-card));
}

.ankara-card h3 {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.ankara-card.focus h3 {
  color: var(--gold);
}

.ankara-card p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

@media (min-width: 700px) {
  .ankara-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .ankara-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Primer cards ── */
.primer-kicker {
  margin-top: 2.5rem;
}

.primer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.primer-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
}

.primer-card h3 {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 0.55rem;
}

.primer-card p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 800px) {
  .primer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Insights ── */
.insights-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.insight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  align-items: start;
}

.insight.focus {
  border-color: rgba(242, 193, 78, 0.35);
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.07), var(--bg-card));
}

.insight-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
  min-width: 2rem;
}

.insight.focus .insight-num {
  color: var(--gold);
}

.insight h3 {
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.insight.focus h3 {
  color: var(--gold);
}

.insight p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

/* ── Romania focus ── */
.ro-hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(242, 193, 78, 0.07), transparent 50%),
    var(--bg-card);
  border: 1px solid rgba(242, 193, 78, 0.22);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 0 1px rgba(242, 193, 78, 0.05), var(--shadow);
}

.ro-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}

.ro-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ro-stat {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.ro-stat:nth-last-child(-n + 2) {
  border-bottom: none;
}

.ro-stat-value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gold);
  line-height: 1.1;
}

.ro-stat-value.ink {
  color: var(--ink);
}

.ro-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

.ro-stat-from {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.gap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.gap-chip {
  flex: 1;
  min-width: 140px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.gap-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--warn);
  margin-bottom: 0.2rem;
}

.gap-chip span {
  font-size: 0.75rem;
  color: var(--muted);
}

.story-box {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  border-left: 3px solid var(--gold);
}

.story-box h3 {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.story-box ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.story-box li {
  margin-bottom: 0.5rem;
}

.story-box li:last-child {
  margin-bottom: 0;
}

/* ── Charts ── */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.chart-card h3 {
  font-size: 0.95rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.chart-caption {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.chart-wrap {
  position: relative;
  width: 100%;
}

.chart-wrap.tall {
  height: min(720px, 85vh);
}

.chart-wrap.med {
  height: 360px;
}

.chart-wrap.short {
  height: 280px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Ranking bars — custom SVG/HTML for better control */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  max-height: min(720px, 85vh);
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.rank-row {
  display: grid;
  grid-template-columns: 28px 100px 1fr 52px;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  min-height: 26px;
}

.rank-row.focus {
  background: var(--gold-dim);
  border-radius: 6px;
  margin: 0 -0.35rem;
  padding: 0.2rem 0.35rem;
}

.rank-num {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 0.72rem;
}

.rank-row.focus .rank-num {
  color: var(--gold);
  font-weight: 700;
}

.rank-name {
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row.focus .rank-name {
  color: var(--gold);
  font-weight: 700;
}

.rank-bar-track {
  position: relative;
  height: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: visible;
}

.rank-bar-track .thr {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}

.rank-bar-track .thr-2 { background: var(--signal); }
.rank-bar-track .thr-35 { background: var(--gold); }
.rank-bar-track .thr-5 { background: var(--warn); }

.rank-bar {
  position: relative;
  z-index: 2;
  height: 100%;
  border-radius: 3px;
  background: var(--nato);
  opacity: 0.75;
  min-width: 2px;
  transition: width 0.6s var(--ease);
}

.rank-row.focus .rank-bar {
  background: var(--gold);
  opacity: 1;
  box-shadow: 0 0 12px var(--gold-glow);
}

.rank-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: right;
  font-size: 0.75rem;
}

.rank-row.focus .rank-val {
  color: var(--gold);
}

.threshold-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.threshold-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.threshold-legend i {
  display: inline-block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
}

.t-2 { background: var(--signal); opacity: 0.7; }
.t-35 { background: var(--gold); opacity: 0.7; }
.t-5 { background: var(--warn); opacity: 0.8; }

/* Toggle */
.toggle-group {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 2px;
  margin-bottom: 1rem;
}

.toggle-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  color: var(--muted);
  transition: all 0.15s;
}

.toggle-btn.active {
  background: var(--nato-dim);
  color: var(--nato);
}

/* Composition bars */
.comp-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.comp-year h4 {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.stack-bar {
  display: flex;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.stack-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #070b14;
  min-width: 0;
  transition: flex 0.5s var(--ease);
}

.stack-seg.equip { background: var(--gold); }
.stack-seg.personnel { background: var(--nato); color: #fff; }
.stack-seg.infra { background: #6b8cae; color: #fff; }
.stack-seg.other { background: #3d4f66; color: var(--ink-soft); }

.stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.stack-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.stack-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Flank cards */
.flank-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.flank-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  transition: border-color 0.2s;
}

.flank-card.focus {
  border-color: rgba(242, 193, 78, 0.4);
  background:
    linear-gradient(135deg, rgba(242, 193, 78, 0.08), transparent 60%),
    var(--bg-card);
  box-shadow: 0 0 0 1px rgba(242, 193, 78, 0.08);
}

.flank-card h3 {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.flank-card.focus h3 {
  color: var(--gold);
}

.flank-card h3 .code {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.flank-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.flank-m label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.flank-m strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Explorer */
.explorer-controls {
  margin-bottom: 1rem;
}

.explorer-search {
  width: 100%;
  max-width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.explorer-search:focus {
  border-color: var(--nato);
}

.explorer-search::placeholder {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

table.explorer {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 640px;
}

table.explorer th {
  text-align: left;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

table.explorer th:hover {
  color: var(--ink);
}

table.explorer th.num,
table.explorer td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.explorer td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

table.explorer tr:last-child td {
  border-bottom: none;
}

table.explorer tr.focus td {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 600;
}

table.explorer tr:hover:not(.focus) td {
  background: rgba(255, 255, 255, 0.02);
}

.table-foot {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.65rem;
}

/* Method */
.method-body {
  max-width: 65ch;
}

.method-body p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.method-body p:last-of-type {
  margin-bottom: 1.5rem;
}

.source-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}

.source-block strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.source-block span {
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: block;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.85rem;
}

.source-links a {
  font-size: 0.88rem;
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.25rem 3rem;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.site-footer .footer-source {
  color: var(--nato);
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.35rem;
}

.site-footer .footer-source:hover {
  color: var(--gold);
}

/* Charts grid for rebalance */
.charts-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rank-bar,
  .stack-seg {
    transition: none;
  }
}

/* ── Breakpoints ── */
@media (min-width: 560px) {
  .hook-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hook-card:nth-child(4),
  .hook-card:nth-child(5) {
    grid-column: span 1;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ro-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .ro-stat:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .ro-stat:nth-last-child(-n + 3) {
    border-bottom: none;
  }
  .flank-grid {
    grid-template-columns: 1fr 1fr;
  }
  .comp-compare {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 800px) {
  .nav-desktop {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .kpi-grid .kpi:nth-child(4),
  .kpi-grid .kpi:nth-child(5) {
    grid-column: span 1;
  }
  .ro-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .flank-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .charts-2 {
    grid-template-columns: 1fr 1fr;
  }
  .rank-row {
    grid-template-columns: 32px 130px 1fr 56px;
  }
}

@media (min-width: 1000px) {
  .hook-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .kpi-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .ro-hero {
    padding: 2rem 2rem;
  }
  .hero h1 {
    max-width: 24ch !important;
  }
}
