/* ================================================================
   Angola 2027 · Projeção Eleitoral — main.css
   Shared styles across all pages · v2.0
   ================================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens ── */
:root {
  --bg:          #0b0c10;
  --surface:     #111217;
  --surface2:    #17191f;
  --border:      #1f2130;
  --border2:     rgba(255,255,255,0.06);
  --text:        #eceef4;
  --muted:       #636978;
  --muted2:      rgba(255,255,255,0.45);
  --gold:        #f0b429;
  --gold-dim:    rgba(240,180,41,0.18);
  --tossup:      #2e3040;

  /* Semantic */
  --ok:          #22c55e;
  --warn:        #f0b429;
  --bad:         #ef4444;

  /* Typography */
  --font-display:  'Bebas Neue', sans-serif;
  --font-mono:     'IBM Plex Mono', monospace;
  --font-body:     'IBM Plex Sans', sans-serif;

  /* Motion */
  --ease-out:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast:    0.14s;
  --dur-med:     0.28s;
  --dur-slow:    0.55s;

  /* Layout */
  --sidebar-w:   300px;
  --content-max: 1200px;
  --radius-sm:   10px;
  --radius:      14px;
  --radius-lg:   18px;

  /* Shadows */
  --shadow:      0 8px 28px rgba(0,0,0,0.4);
  --shadow-lg:   0 18px 50px rgba(0,0,0,0.55);

  /* Focus ring */
  --focus-ring:  0 0 0 3px rgba(240,180,41,0.25);
}

/* ── Base ── */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 540px at 50% -200px, rgba(240,180,41,0.08), transparent 60%),
    radial-gradient(900px 480px at 8%  0%, rgba(26,107,196,0.08), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, rgba(196,43,26,0.08),  transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Typography ── */
h1, h2, h3 { line-height: 1.15; }
b, strong   { font-weight: 700; }
a           { color: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: rgba(255,255,255,0.03); border-radius: 99px; }
::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HEADER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-header {
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(11,12,16,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 200;
}

/* header-row: brand left, nav right, toggle hidden desktop */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 54px;           /* fixed height — no wrapping on single line */
  flex-wrap: nowrap;      /* NEVER wrap — toggle handles mobile */
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 1;
  text-decoration: none;
  color: inherit;
}
.brand-flag  { font-size: 20px; flex-shrink: 0; }
.brand-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 2.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 1px;
  white-space: nowrap;
}

/* Desktop nav sits inline in header */
#menuSlot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Menu toggle — only visible on mobile */
.menu-toggle {
  display: none;
  touch-action: manipulation;   /* eliminates 300ms tap delay on iOS */
  -webkit-tap-highlight-color: transparent;  /* removes grey flash on tap */
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 1px;
  flex-shrink: 0;
  transition: border-color var(--dur-fast), background var(--dur-fast);
  z-index: 201;
  /* ── Zero-delay touch on mobile ── */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  /* Minimum tap target size (WCAG 2.5.5) */
  min-width: 44px;
  min-height: 44px;
}
.menu-toggle:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.07); }
.menu-toggle .bar {
  display: flex; flex-direction: column; gap: 4px; width: 14px;
}
.menu-toggle .bar span {
  display: block; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: all var(--dur-fast);
}
.menu-toggle.open .bar span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle.open .bar span:nth-child(2) { opacity: 0; }
.menu-toggle.open .bar span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAVBAR (loaded via menu.html)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.navlinks a {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.8px;
  text-decoration: none;
  color: rgba(255,255,255,0.68);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  transition: all var(--dur-fast);
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.navlinks a:hover {
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
}
.navlinks a.active {
  color: #fff;
  border-color: rgba(240,180,41,0.45);
  background: rgba(240,180,41,0.06);
  box-shadow: 0 0 0 1px rgba(240,180,41,0.12);
}
/* Vote link — always highlighted */
.navlinks a[data-nav="vote"] {
  color: rgba(255,255,255,0.9);
  border-color: rgba(240,180,41,0.3);
  background: rgba(240,180,41,0.08);
}
.navlinks a[data-nav="vote"]:hover {
  background: rgba(240,180,41,0.14);
  border-color: rgba(240,180,41,0.5);
  color: #fff;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOPBAR (status strip)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  padding: 10px 20px;
}
.statusbar {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ATOMS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.2);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 1px;
  white-space: nowrap;
}
.badge.api-on  { border-color: rgba(34,197,94,0.3);  color: rgba(150,255,180,0.9); }
.badge.api-off { border-color: rgba(240,180,41,0.28); color: rgba(255,235,160,0.9); }

/* Chip (larger pill) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.8);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
  user-select: none;
}
.chip.gold {
  border-color: rgba(240,180,41,0.4);
  box-shadow: 0 0 0 1px rgba(240,180,41,0.15);
  color: rgba(255,255,255,0.95);
}

/* Color dot */
.cdot {
  width: 9px; height: 9px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.8);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
  transition: all var(--dur-fast);
  white-space: nowrap;
}
.btn:hover  { border-color: rgba(255,255,255,0.24); background: rgba(255,255,255,0.06); color: #fff; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn.primary {
  border-color: rgba(240,180,41,0.3);
  background: rgba(240,180,41,0.1);
  color: rgba(255,255,255,0.95);
}
.btn.primary:hover { border-color: rgba(240,180,41,0.5); background: rgba(240,180,41,0.16); }

/* Form elements */
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  background: rgba(0,0,0,0.2);
  color: rgba(255,255,255,0.88);
  font-family: var(--font-body);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(240,180,41,0.45);
  box-shadow: var(--focus-ring);
}
input:disabled, select:disabled { opacity: 0.6; cursor: not-allowed; }
label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARD / PANEL / BOX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(175deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  box-shadow: var(--shadow);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med), border-color var(--dur-med);
}
.panel:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(255,255,255,0.14); }

.box {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.14);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.box-title {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}

/* KPI */
.kpi { border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.14); border-radius: var(--radius); padding: 11px 13px; }
.kpi-label { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.kpi-value { font-weight: 900; font-size: 1.05rem; margin-top: 6px; line-height: 1.15; }
.kpi-sub   { font-family: var(--font-mono); font-size: 0.58rem; color: rgba(255,255,255,0.5); margin-top: 3px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT: MAIN + SIDEBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.main-panel {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}
.sidebar {
  width: var(--sidebar-w);
  border-left: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-title {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(17,18,23,0.95);
  backdrop-filter: blur(10px);
  z-index: 5;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HORIZONTAL SLIDER (party cards)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

/* Party card */
.pcard {
  scroll-snap-align: start;
  position: relative;
  min-width: 270px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  box-shadow: var(--shadow);
  flex-shrink: 0;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast), border-color var(--dur-fast);
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(255,255,255,0.16); }
.pcard-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.18; transform: scale(1.04);
  pointer-events: none;
}
.pcard-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.72));
}
.pcard-body { position: relative; padding: 12px; display: flex; flex-direction: column; gap: 9px; }

.pcard.major { min-width: 400px; max-width: 500px; }
.major-bar {
  height: 9px; background: rgba(255,255,255,0.06);
  border-radius: 999px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.major-bar::after {
  content: ''; position: absolute;
  left: 50%; top: -5px; bottom: -5px; width: 2px;
  background: var(--gold); transform: translateX(-50%); opacity: 0.9;
}
.major-fill { height: 100%; width: 0; transition: width var(--dur-slow); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MAP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.map-host { width: 100%; max-width: 700px; filter: drop-shadow(0 4px 22px rgba(0,0,0,0.55)); }
.map-host svg { width: 100%; height: auto; display: block; }
.prov {
  cursor: pointer; stroke: #090a0d; stroke-width: 1.2;
  transition: filter var(--dur-fast), stroke-width var(--dur-fast);
  vector-effect: non-scaling-stroke; fill: var(--tossup);
}
.prov:hover { stroke-width: 2.6; filter: brightness(1.15); }

/* Tooltip */
#tt {
  position: fixed;
  background: rgba(9,10,14,0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 13px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  z-index: 999;
  opacity: 0;
  transition: opacity var(--dur-fast);
  backdrop-filter: blur(12px);
  max-width: 520px;
}
#tt.vis { opacity: 1; }
#tt-name { font-weight: 900; color: var(--text); margin-bottom: 4px; font-family: var(--font-body); font-size: 0.9rem; }
#tt-stat { color: var(--muted); line-height: 1.4; }
#tt-hint { margin-top: 6px; font-size: 0.56rem; color: rgba(255,255,255,0.25); border-top: 1px solid var(--border); padding-top: 6px; }

/* Province list item */
.pitem {
  display: flex; align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  transition: background var(--dur-fast);
  gap: 8px;
}
.pitem:hover { background: rgba(255,255,255,0.04); }
.pitem-dot  { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; background: var(--tossup); }
.pitem-name { font-size: 0.76rem; flex: 1; }
.pitem-seats { font-family: var(--font-mono); font-size: 0.58rem; color: var(--muted); }

/* Legend */
.legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-family: var(--font-mono); font-size: 0.6rem; color: var(--muted);
  justify-content: center;
}
.leg-item { display: flex; align-items: center; gap: 5px; }
.leg-dot  { width: 9px; height: 9px; border-radius: 2px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESULTS BAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.rrow {
  display: grid;
  grid-template-columns: 78px 1fr 52px;
  gap: 9px; align-items: center; margin: 5px 0;
}
.rtag  { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 1px; }
.rbar  { height: 9px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.rfill { height: 100%; width: 0; transition: width var(--dur-slow); }
.rpct  { font-family: var(--font-mono); font-size: 0.6rem; color: rgba(255,255,255,0.65); text-align: right; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MODAL / OVERLAY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(6,7,10,0.7);
  display: none; align-items: center; justify-content: center;
  padding: 16px; z-index: 200;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.overlay.open { display: flex; }
.modal {
  width: min(700px,100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(175deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  box-shadow: 0 24px 72px rgba(0,0,0,0.55);
  animation: modalIn var(--dur-med) var(--ease-out) both;
}
@keyframes modalIn { from { opacity:0; transform: scale(0.96) translateY(12px); } to { opacity:1; transform: none; } }
.modal-hdr {
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.12);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.modal-hdr h3 { font-weight: 900; font-size: 1rem; }
.modal-hdr p  { margin-top: 5px; font-family: var(--font-mono); font-size: 0.6rem; color: rgba(255,255,255,0.52); letter-spacing: 1px; line-height: 1.4; }
.modal-close {
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.8); border-radius: var(--radius-sm);
  width: 34px; height: 34px; cursor: pointer; font-weight: 900; font-size: 0.9rem;
  display: grid; place-items: center; transition: all var(--dur-fast); flex-shrink: 0;
}
.modal-close:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.05); }
.modal-body { padding: 14px 16px; }
.modal-foot {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

/* Status messages */
.status-msg {
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.82rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.14);
  display: none;
}
.status-msg.show   { display: block; }
.status-msg.ok     { border-color: rgba(34,197,94,0.3);  background: rgba(34,197,94,0.1);  color: rgba(180,255,210,0.95); }
.status-msg.warn   { border-color: rgba(240,180,41,0.3); background: rgba(240,180,41,0.1); color: rgba(255,235,180,0.95); }
.status-msg.bad    { border-color: rgba(239,68,68,0.3);  background: rgba(239,68,68,0.1);  color: rgba(255,200,200,0.95); }

/* Honeypot */
.hp { position: absolute!important; left:-9999px!important; width:1px!important; height:1px!important; overflow:hidden!important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 1px;
  text-align: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.enter-anim {
  opacity: 0; transform: translateY(14px) scale(0.985);
  animation: enterUp 0.6s var(--ease-out) forwards;
}
@keyframes enterUp { to { opacity:1; transform: none; } }

/* Stagger helpers */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABLES (shared)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
thead th {
  text-align: left; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 0.58rem;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky; top: 0;
  background: rgba(17,18,23,0.96); backdrop-filter: blur(8px);
}
tbody tr { border-bottom: 1px solid rgba(255,255,255,0.03); transition: background var(--dur-fast); }
tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody td { padding: 9px 12px; vertical-align: middle; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 980px) {
  .app-body     { flex-direction: column; }
  .sidebar      { width: 100%; border-left: none; border-top: 1px solid var(--border); max-height: 50vh; }
  :root         { --sidebar-w: 100%; }
}
@media (max-width: 720px) {
  .site-header  { padding: 0 14px; }
  .topbar       { padding: 9px 14px; }
  .brand-title  { font-size: 1.18rem; letter-spacing: 1.5px; }
  .brand-sub    { display: none; }
  .menu-toggle  { display: inline-flex; }

  .navbar {
    /* Drop directly below the sticky header — no hardcoded px */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(9,9,11,0.99);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(240,180,41,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.8);
    padding: 12px 16px 16px;
    z-index: 9999;
    /* hidden by default — display:none is fine here, toggled by .open */
    display: none;
  }
  .navbar.open {
    display: flex;
  }

  .navlinks {
    flex-direction: column;
    width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .navlinks a {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
  }
  .navlinks a.active {
    background: rgba(240,180,41,0.08);
  }
  .navlinks a[data-nav="vote"] {
    background: rgba(240,180,41,0.1);
    border-color: rgba(240,180,41,0.35);
  }

  .pcard        { min-width: 240px; }
  .pcard.major  { min-width: 300px; }
}
@media (max-width: 500px) {
  .statusbar    { flex-direction: column; align-items: flex-start; gap: 7px; }
  .rrow         { grid-template-columns: 65px 1fr 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none!important; transition: none!important; }
}