/* EU Democracy Hub — Dark Premium Styles */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Homepage v2 entrance motion ── */
@keyframes v2-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ambient-drift-hero {
  from { transform: translate(0, 0); }
  to   { transform: translate(2%, 1.5%); }
}
@keyframes ambient-drift-featured {
  from { transform: translate(0, 0); }
  to   { transform: translate(-1.5%, 2%); }
}
@keyframes pulse-pill {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  70%  { box-shadow: 0 0 0 5px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Apply to v2 sections only — legacy .section is handled separately */
.command-layer,
.signal-rail,
.home-v2-now,
.featured-governance-event,
.active-files-section,
.recent-activity-section,
.calendar-rail-section,
.institution-index-section,
.footer-v2 {
  animation: v2-enter 420ms var(--ease-snap) both;
}

.command-layer          { animation-delay:   0ms; }
.signal-rail            { animation-delay:  40ms; }
.home-v2-now            { animation-delay:  80ms; }
.featured-governance-event { animation-delay: 120ms; }
.active-files-section   { animation-delay: 160ms; }
.recent-activity-section { animation-delay: 200ms; }
.calendar-rail-section  { animation-delay: 240ms; }
.institution-index-section { animation-delay: 280ms; }
.footer-v2              { animation-delay: 320ms; }

/* Reduced-motion: honour system preference explicitly for v2 sections.
   The global rule at line ~961 also covers this via animation-duration:0ms,
   but this is an unambiguous belt-and-suspenders declaration. */
@media (prefers-reduced-motion: reduce) {
  .command-layer,
  .signal-rail,
  .home-v2-now,
  .featured-governance-event,
  .active-files-section,
  .recent-activity-section,
  .calendar-rail-section,
  .institution-index-section,
  .footer-v2 {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .home-v2-now::before,
  .featured-governance-event::before {
    animation: none;
    transform: none;
  }
  /* Infinite animations not covered by the global animation-duration:0ms block */
  .signal-dot::after,
  .command-live-dot::after,
  .footer-v2-cap-dot::after {
    animation: none;
    opacity: 0.7;
  }
  .gcard-pill.is-live::before {
    animation: none;
  }
}

/* ── Reveal rhythm — applied by JS to feed-rendered card/list children ──
 * Each rendered child gets .reveal; nth-child stagger offsets siblings.
 * animation-fill-mode:both keeps items invisible before the delay fires.
 * ─────────────────────────────────────────────────────────────────── */
.reveal {
  animation: rise 700ms var(--ease-snap) both;
}
.reveal:nth-child(2) { animation-delay:  60ms; }
.reveal:nth-child(3) { animation-delay: 120ms; }
.reveal:nth-child(4) { animation-delay: 180ms; }
.reveal:nth-child(5) { animation-delay: 240ms; }
.reveal:nth-child(6) { animation-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ── Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root {
  /* Type stacks — Batch 1 */
  --sans:  "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono:  "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --blue:       #5A9DFF;
  --yellow:     #D8B24C;
  --blue-pale:  rgba(90,157,255,.16);
  --text:       #F4F8FF;
  --muted:      #8FA3C0;
  --border:        rgba(135,170,220,.18);
  --border-strong: rgba(135,170,220,.34);
  --bg:            #0a1628;
  --bg-elevated:   #111e32;
  --surface:       rgba(20,36,62,.9);
  --surface-2:     rgba(24,42,72,.9);
  --radius:        14px;
  /* Premium surface tokens */
  --bg-card:        #132240;
  --bg-card-hover:  #172848;
  --bg-card-active: #1c3258;
  --accent-blue:    #5A9DFF;
  --accent-blue-soft: #93C2FF;
  --text-secondary: #C2D0E5;
  --status-pass:    #3DDC91;
  --status-reject:  #FF6B6B;
  --status-pending: #F2B84B;
  --status-live:    #73B7FF;
  /* Institution accent colours — bright for dark bg */
  --ep:    #5b9bff;
  --ec:    #8a80ff;
  --gc:    #c47aff;
  --cu:    #4ade80;
  --ecb:   #34d399;
  --cj:    #5b9bff;
  --eca:   #fb923c;
  --glow:  rgba(90,157,255,.32);

  /* ── Batch 2: Brass accent ── */
  --brass:      oklch(0.83 0.10 80);
  --brass-2:    oklch(0.72 0.11 75);
  --brass-deep: oklch(0.55 0.10 70);
  --brass-soft: oklch(0.30 0.05 75);

  /* ── Batch 2: Supplemental surface/depth tokens ── */
  --bg-deep:    oklch(0.105 0.005 260);
  --surface-3:  oklch(0.235 0.013 260);

  /* ── Batch 2: Line tokens ── */
  --line:        oklch(0.27 0.012 260);
  --line-2:      oklch(0.34 0.014 260);
  --line-strong: oklch(0.44 0.016 260);

  /* ── Batch 2: Ink tokens ── */
  --ink:   oklch(0.97 0.004 90);
  --ink-2: oklch(0.82 0.008 90);
  --ink-3: oklch(0.62 0.012 260);
  --ink-4: oklch(0.46 0.014 260);

  /* ── Batch 2: Motion timing ── */
  --spring:    cubic-bezier(0.34, 1.36, 0.64, 1);
  --ease-out:  cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-snap: cubic-bezier(0.32, 0.72, 0, 1);
  --t-fast:    140ms;
  --t-base:    280ms;
  --t-slow:    480ms;
}

/* ── Base ── */
html {
  max-width: 100%;
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html { overflow-x: hidden; }
}
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Batch 3: Atmospheric grain overlay (reference body::before) ── */
/* Two soft radial gradients — warm brass hint top-right, cool hint left.
   mix-blend-mode: screen adds depth without changing solid colours.
   pointer-events: none so it never blocks clicks.                   */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(1200px 800px at 70% -10%, oklch(0.22 0.03 80 / 0.18), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, oklch(0.18 0.04 250 / 0.12), transparent 60%);
  mix-blend-mode: screen;
}

/* Ambient glow blobs */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(0,60,180,.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 80% 70%, rgba(0,20,120,.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 55% 45%, rgba(0,80,220,.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Batch 3: Cursor spotlight — card surfaces ──────────────────────────
   JS sets --mx/--my (percentage) on each card via mousemove.
   Default fallback 50%/50% centres the gradient when no cursor data.
   opacity 0 → 1 on :hover so the shine only appears on interaction.
   pointer-events: none prevents blocking child clicks.
   z-index: 0 keeps shine below card text (children are z-index auto).
   .featured-event-grid uses ::after because ::before is the brass stripe.
   ─────────────────────────────────────────────────────────────────── */
.featured-mini-card::before,
.active-file-card::before,
.iix-cell::before,
.crd::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 280px at var(--mx, 50%) var(--my, 50%),
              oklch(1 0 0 / 0.05), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
  pointer-events: none;
  z-index: 0;
}
.featured-mini-card:hover::before,
.active-file-card:hover::before,
.iix-cell:hover::before,
.crd:hover::before {
  opacity: 1;
}

/* featured-event-grid: ::before is taken by brass stripe → use ::after */
.featured-event-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 350px at var(--mx, 50%) var(--my, 50%),
              oklch(1 0 0 / 0.04), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
  pointer-events: none;
  z-index: 0;
}
.featured-event-grid:hover::after {
  opacity: 1;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ── Institution nav bar ── */
.header-nav { background: rgba(8,14,26,.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(148,178,218,.08); border-bottom: 1px solid rgba(148,178,218,.06); }
.header-nav-inner { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; height: 38px; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.header-nav-inner::-webkit-scrollbar { display: none; }
.header-nav-inner a { flex: 0 0 auto; color: var(--text-secondary, #B8C8DD); text-decoration: none; font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 7px; white-space: nowrap; transition: background 160ms ease, color 160ms ease, opacity 160ms ease; letter-spacing: .2px; background: transparent; border: none; opacity: .7; }
.header-nav-inner a:hover { background: rgba(148,178,218,.07); color: var(--text); opacity: 1; }
.header-nav-inner a.active { background: rgba(92,158,224,.12); color: var(--text); opacity: 1; }

/* ── Header ── */
header {
  background: rgba(10,18,32,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(148,178,218,.1);
}
.header-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo-stars { font-size: 13px; font-weight: 900; letter-spacing: .5px; background: linear-gradient(135deg, #003399, #0066ff); color: white; padding: 5px 9px; border-radius: 6px; border: 1px solid rgba(91,155,255,.4); }
.logo-text strong {
  display: block; font-size: 17px; font-weight: 800;
  color: var(--text);
}
.logo-text span { font-size: 11px; opacity: .55; text-transform: uppercase; letter-spacing: .6px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.lang-switcher {
  display: flex;
  background: rgba(24,37,59,.8);
  border: 1px solid rgba(148,178,218,.14);
  border-radius: 8px; padding: 3px; gap: 2px;
}
.lang-btn {
  background: transparent; border: none;
  color: var(--text-secondary, #B8C8DD); font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 5px; cursor: pointer;
  letter-spacing: .5px; transition: background 160ms ease, color 160ms ease; font-family: inherit;
}
.lang-btn:hover { color: var(--text); background: rgba(92,158,224,.14); }
.lang-btn.active {
  background: rgba(92,158,224,.22);
  color: var(--accent-blue-soft, #7EB2F0);
  border: 1px solid rgba(92,158,224,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.lang-btn:active { opacity: .75; transition-duration: 60ms; }
.lang-btn:focus-visible { outline: 2px solid var(--line-2); outline-offset: 2px; }
.header-badge {
  background: rgba(216,178,76,.12);
  color: #D8B24C;
  border: 1px solid rgba(216,178,76,.28);
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 6px;
  letter-spacing: .5px;
}

/* ── Index Hero ── */
.hero {
  background: linear-gradient(170deg, #070f1e 0%, #0a1628 35%, #0d1d3a 65%, #0e1e3c 100%);
  color: white; text-align: center; padding: 24px 24px 36px;
  position: relative; z-index: 1; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 35%, rgba(92,158,224,.09) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 64px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(28px, 4.5vw, 46px); font-weight: 800;
  letter-spacing: -.4px; margin-bottom: 14px; position: relative;
}
.hero h1 span {
  background: linear-gradient(90deg, #C9A040, #A8821C);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero > p { font-size: 15px; color: var(--text-secondary, #B8C8DD); max-width: 520px; margin: 0 auto 24px; font-weight: 400; line-height: 1.65; }
.hero-stats { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; position: relative; }
.hero-stat { text-align: center; }
.hero-stat strong {
  display: block; font-size: 28px; font-weight: 800; line-height: 1;
  color: var(--yellow);
}
.hero-stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-top: 4px; display: block; }

/* ── Index: Institution sections ── */
main.index-main { max-width: 1100px; margin: 0 auto; padding: 8px 24px 24px; position: relative; z-index: 1; }
.section { margin-bottom: 34px; }
.section-top {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--blue);
  box-shadow: inset 0 1px 0 rgba(160,195,255,.07), 0 1px 2px rgba(0,0,0,.16), 0 3px 10px rgba(0,0,0,.08);
  border-radius: var(--radius); padding: 13px 18px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.section-top:hover { background: var(--bg-card-hover); border-color: var(--border-strong); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.section--ep .section-top    { border-top-color: var(--ep); }
.section--ec .section-top    { border-top-color: var(--ec); }
.section--gc .section-top    { border-top-color: var(--gc); }
.section--cu .section-top    { border-top-color: var(--cu); }
.section--ecb .section-top   { border-top-color: var(--ecb); }
.section--court .section-top { border-top-color: var(--cj); }
.section--eca .section-top   { border-top-color: var(--eca); }

.section-title { display: flex; align-items: center; gap: 10px; }
.section-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; color: white;
  border: 1px solid rgba(255,255,255,.08);
}
.section--ep .section-icon    { background: rgba(91,155,255,.18);  }
.section--ec .section-icon    { background: rgba(138,128,255,.18); }
.section--gc .section-icon    { background: rgba(196,122,255,.18); }
.section--cu .section-icon    { background: rgba(74,222,128,.18);  }
.section--ecb .section-icon   { background: rgba(52,211,153,.18);  }
.section--court .section-icon { background: rgba(91,155,255,.18);  }
.section--eca .section-icon   { background: rgba(251,146,60,.18);  }
/* Index icon classes */
.icon-blue   { background: rgba(91,155,255,.18); }
.icon-yellow { background: rgba(255,200,0,.14);  }
.icon-green  { background: rgba(74,222,128,.16); }
.icon-purple { background: rgba(196,122,255,.18);}
.icon-red    { background: rgba(248,113,113,.16);}
.icon-teal   { background: rgba(52,211,153,.16); }
.icon-orange { background: rgba(251,146,60,.18); }

.section-title h2 { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -.1px; }
.section-title p  { font-size: 12px; color: var(--muted); margin-top: 1px; line-height: 1.35; }
.section-meta { display: flex; align-items: center; gap: 10px; }
.section-badge {
  font-size: 10px; font-weight: 700;
  background: var(--blue-pale); color: #90b8ff;
  padding: 3px 8px; border-radius: 10px; white-space: nowrap;
}
.section-link {
  font-size: 12px; color: var(--muted); text-decoration: none; font-weight: 600;
  white-space: nowrap; transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  padding: 5px 12px; border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(148,178,218,.04);
}
.section-link:hover {
  background: rgba(90,157,255,.08);
  border-color: rgba(90,157,255,.3);
  color: var(--text-secondary);
}
.institution-note {
  font-size: 12px; color: var(--muted);
  background: transparent;
  border-left: 2px solid rgba(135,170,220,.18);
  padding: 4px 12px; border-radius: 0; margin-bottom: 12px; line-height: 1.6;
}
.section--ep .institution-note    { border-left-color: var(--ep); }
.section--ec .institution-note    { border-left-color: var(--ec); }
.section--gc .institution-note    { border-left-color: var(--gc); }
.section--cu .institution-note    { border-left-color: var(--cu); }
.section--ecb .institution-note   { border-left-color: var(--ecb); }
.section--court .institution-note { border-left-color: var(--cj); }
.section--eca .institution-note   { border-left-color: var(--eca); }

/* ── Cards ── */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards--2col { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards--2col { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 1px 0 rgba(160,195,255,.08),
    0 1px 2px rgba(0,0,0,.18),
    0 4px 14px rgba(0,0,0,.10);
  border-radius: var(--radius); padding: 20px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  cursor: pointer; display: flex; flex-direction: column; gap: 12px;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(148,178,255,.32);
  box-shadow:
    inset 0 1px 0 rgba(160,195,255,.13),
    0 2px 4px rgba(0,0,0,.16),
    0 8px 22px rgba(0,0,0,.11);
  transform: translateY(-1px);
}
.card:active { background: var(--bg-card); transform: translateY(0); transition-duration: 80ms; }

/* ── Card hierarchy utilities (CSS only — do not apply in HTML yet) ── */
.card-primary {
  border-color: rgba(90,157,255,.3);
  box-shadow:
    inset 0 1px 0 rgba(90,157,255,.10),
    0 1px 2px rgba(0,0,0,.18),
    0 4px 16px rgba(0,0,0,.12);
}
.card-live {
  border-left-width: 2px;
  border-color: rgba(115,183,255,.28);
}
.card-secondary {
  background: var(--bg-elevated);
  border-color: rgba(135,170,220,.11);
  box-shadow:
    inset 0 1px 0 rgba(160,195,255,.04),
    0 1px 2px rgba(0,0,0,.10);
}

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-shrink: 0; }
.tag {
  font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; white-space: nowrap; flex-shrink: 0;
}
.tag-passed  { background: rgba(53,208,138,.14);  color: var(--status-pass);    border: 1px solid rgba(53,208,138,.28);  }
.tag-failed  { background: rgba(240,100,100,.13); color: var(--status-reject);  border: 1px solid rgba(240,100,100,.28); }
.tag-pending { background: rgba(240,178,74,.13);  color: var(--status-pending); border: 1px solid rgba(240,178,74,.28);  }
.tag-new     { background: rgba(105,174,255,.13); color: var(--status-live);    border: 1px solid rgba(105,174,255,.28); }
.tag-summit  { background: rgba(196,122,255,.13); color: #d8b4fe;               border: 1px solid rgba(196,122,255,.26); }

.card-date  { font-size: 11px; color: var(--muted); white-space: nowrap; }
.card h3    { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text); flex-shrink: 0; }
.card p     { font-size: 13px; color: var(--text-secondary); line-height: 1.55; flex-grow: 1; flex-shrink: 0; }

.vote-bar { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; padding-top: 2px; }
.vote-bar-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .2px; }
.vote-bar-label span { display: flex; align-items: center; gap: 4px; }
.vote-bar-label span::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.vote-bar-label span:first-child::before  { background: var(--status-pass,    #35D08A); }
.vote-bar-label span:nth-child(2)::before { background: var(--status-reject,  #F06464); }
.vote-bar-label span:last-child::before   { background: rgba(148,178,218,.3); }
.vote-bar-track { height: 7px; border-radius: 4px; background: rgba(24,37,59,.8); border: 1px solid rgba(148,178,218,.1); overflow: hidden; display: flex; gap: 1px; }
.vote-bar-for     { background: var(--status-pass,   #35D08A); }
.vote-bar-against { background: var(--status-reject, #F06464); }
.vote-bar-abstain { background: rgba(148,178,218,.25); }

.participants { display: flex; flex-wrap: wrap; gap: 6px; }
.participant-chip { font-size: 10px; background: var(--blue-pale); color: #93c5fd; padding: 2px 7px; border-radius: 10px; font-weight: 600; border: 1px solid rgba(91,155,255,.2); }
.commission-meta { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Why it matters (index) ── */
.why-section {
  background: linear-gradient(135deg, #020c2e 0%, #001668 50%, #002590 100%);
  color: white; padding: 72px 24px; margin-top: 8px;
  position: relative; z-index: 1; overflow: hidden;
}
.why-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0,100,255,.18) 0%, transparent 70%);
}
.why-section h2 {
  text-align: center; font-size: 28px; font-weight: 900; margin-bottom: 10px;
  background: linear-gradient(90deg, #fff 0%, #a8c4ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.why-section .why-sub { text-align: center; opacity: .7; font-size: 15px; max-width: 540px; margin: 0 auto 40px; }
.why-grid { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; position: relative; }
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(3, 1fr); } }
.why-item {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 22px 16px; text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.why-item:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.16); }
.why-emoji { font-size: 30px; display: block; margin-bottom: 10px; line-height: 1; }
.why-item p { font-size: 13px; line-height: 1.55; opacity: .9; }

/* ── Institution page: Header nav (used in institution pages) ── */
.nav {
  background: rgba(13,20,34,.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148,178,218,.1);
  padding: 0 24px; position: sticky; top: 0; z-index: 200;
}
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 8px; height: 56px; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-logo { font-size: 15px; font-weight: 800; color: white; text-decoration: none; white-space: nowrap; margin-right: 8px; }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a {
  color: var(--text-secondary, #B8C8DD); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 7px; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s; border: 1px solid transparent;
}
.nav-links a:hover { color: var(--text); background: rgba(92,158,224,.1); border-color: rgba(92,158,224,.2); }
.nav-links a.active { color: var(--text); background: rgba(92,158,224,.16); border-color: rgba(92,158,224,.3); }

/* ── Institution page: Hero ── */
.page-hero { color: white; padding: 40px 24px 52px; position: relative; z-index: 1; overflow: hidden; }
.page-hero::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.page-hero .container { display: flex; flex-direction: column; align-items: flex-start; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary, #B8C8DD); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(148,178,218,.2);
  background: rgba(24,37,59,.7);
  margin-bottom: 28px; transition: background .15s, border-color .15s, color .15s; backdrop-filter: blur(8px);
}
.back-btn:hover { background: rgba(32,48,74,.9); color: var(--text); border-color: rgba(92,158,224,.35); }
.page-hero-body { width: 100%; text-align: center; position: relative; z-index: 1; }
.page-hero-icon { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: var(--radius); margin-bottom: 18px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: white; }
.page-hero-icon svg { width: 32px; height: 32px; stroke: white; fill: none; }
.page-hero h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; margin-bottom: 14px; }
.page-hero .tagline { font-size: 16px; color: rgba(255,255,255,.82); max-width: 520px; margin: 0 auto 28px; font-weight: 400; }
.inst-stat-badge {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.2);
  padding: 10px 24px; border-radius: 14px;
}
.inst-stat-badge strong { font-size: 28px; font-weight: 800; color: var(--yellow); line-height: 1; }
.inst-stat-badge span { font-size: 13px; color: var(--text-secondary); }

/* Institution hero backgrounds — rich dark gradients */
.bg-ep    { background: linear-gradient(135deg, #020c2e 0%, #001a6e 40%, #0044cc 100%); }
.bg-ec    { background: linear-gradient(135deg, #001a5e 0%, #003399 55%, #0055cc 100%); }
.bg-gc    { background: linear-gradient(135deg, #001a5e 0%, #003399 55%, #0055cc 100%); }
.bg-cu    { background: linear-gradient(135deg, #020c2e 0%, #001a6e 40%, #003fa8 100%); }
.bg-ecb   { background: linear-gradient(135deg, #020c2e 0%, #001a6e 40%, #0044cc 100%); }
.bg-court { background: linear-gradient(135deg, #020c2e 0%, #001a6e 40%, #0044cc 100%); }
.bg-eca   { background: linear-gradient(135deg, #180800 0%, #431407 40%, #c2410c 100%); }

/* ── Institution page: hero label & tags ── */
.hero-label {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  padding: 4px 12px; border-radius: 20px; margin-bottom: 16px;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px; border-radius: 5px; white-space: nowrap; flex-shrink: 0; }
.hero-tags .tag {
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.18); border-radius: 12px; font-size: 12px; padding: 5px 12px;
}
.hero-sub { font-size: 16px; opacity: .8; max-width: 580px; margin: 12px auto 0; font-weight: 400; }

/* ── Institution page: About ── */
.page-about {
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--border); padding: 52px 24px;
  position: relative; z-index: 1;
}
.page-about-inner { max-width: 820px; margin: 0 auto; }
.page-about h2 { font-size: 22px; font-weight: 800; margin-bottom: 18px; color: var(--text); }
.page-about p { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }

/* ── Institution page: Sections ── */
.page-section { padding: 52px 24px; position: relative; z-index: 1; }
.page-section--alt { background: rgba(255,255,255,.02); }
.page-section h2 {
  font-size: 22px; font-weight: 800; margin-bottom: 22px; color: var(--text);
}
.section-inner { max-width: 1100px; margin: 0 auto; }

/* Override page-specific light backgrounds from embedded <style> blocks */
.leader-section, .council-section, .decisions-section,
.structure-section, .cases-section, .pending-section,
.rights-section, .complaint-section, .upcoming-section,
.inflation-section, .digital-section, .rate-dashboard ~ *,
.ecb-section, .cj-section, .eca-section {
  background: rgba(255,255,255,.025) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* ── Leader cards (institution pages) ── */
.leader-section {
  background: rgba(255,255,255,.025) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 48px 24px !important;
}
.leader-inner h2, .leader-inner > h2 { color: var(--text) !important; }
.leader-card {
  background: rgba(14,26,46,.9) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: var(--radius) !important;
}
.leader-card:hover {
  background: rgba(16,30,54,.95) !important;
  border-color: rgba(255,255,255,.18) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.22) !important;
}
.leader-name  { color: var(--text) !important; }
.leader-role  { color: var(--ep) !important; }
.leader-meta  { color: var(--text-secondary) !important; }
.leader-bio   { color: var(--text-secondary) !important; }
.leader-tag   { background: var(--blue-pale) !important; color: #93c5fd !important; }

/* ── Committee / area / chamber cards ── */
.committee-card, .chamber-card, .area-card, .struct-card {
  background: rgba(14,26,46,.75) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease !important;
}
.committee-card:hover, .chamber-card:hover, .area-card:hover, .struct-card:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(91,155,255,.3) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.18) !important;
}
.committee-name, .chamber-name, .area-name { color: var(--text) !important; }
.committee-desc, .chamber-desc, .area-desc { color: var(--text-secondary) !important; }
.committee-members, .chamber-members, .area-budget { color: rgba(255,255,255,.4) !important; }

/* Committee / chamber / area / config icons */
.committee-icon, .chamber-icon, .area-icon, .config-icon {
  font-size: 16px !important; color: white !important;
}

/* ── Event cards ── */
.event-card {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-left-color: var(--ep) !important;
  transition: transform 160ms ease, box-shadow 160ms ease !important;
}
.event-card:hover { transform: translateY(-1px) !important; box-shadow: 0 4px 14px rgba(0,0,0,.15) !important; }
.event-date-block { background: var(--blue-pale) !important; }
.event-day   { color: #93c5fd !important; }
.event-month { color: #93c5fd !important; }
.event-type  { color: #7eb6ff !important; }
.event-title { color: var(--text) !important; }
.event-desc  { color: var(--muted) !important; }
.event-location { color: var(--muted) !important; }

/* ── Why it matters (institution pages) ── */
.matters-section {
  background: linear-gradient(135deg, #010610 0%, #020e3a 50%, #001668 100%) !important;
  color: white; padding: 60px 24px;
  position: relative; overflow: hidden;
}
.matters-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0,80,220,.2) 0%, transparent 70%);
  pointer-events: none;
}
.matters-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.matters-section h2 { font-size: 24px; font-weight: 800; margin-bottom: 28px; }
.matters-list { list-style: none; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .matters-list { grid-template-columns: repeat(2, 1fr); } }
.matters-list li {
  background: rgba(255,255,255,.11) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 11px; padding: 18px 20px;
  font-size: 14px; line-height: 1.65;
  transition: transform 160ms ease, background 160ms ease;
}
.matters-list li:hover { transform: translateY(-1px); background: rgba(255,255,255,.12) !important; }

/* ── Footer ── */
footer {
  background: #050c18 !important;
  border-top: 1px solid rgba(148,178,218,.1);
  color: white; padding: 48px 24px 32px; font-size: 13px;
  position: relative; z-index: 1;
}
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 48px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-about { flex: 1; min-width: 220px; }
.footer-about strong { font-size: 14px; font-weight: 700; color: var(--text); display: block; margin-bottom: 10px; }
.footer-about p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }
.footer-links { min-width: 160px; }
.footer-links strong { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255,255,255,.4); display: block; margin-bottom: 12px; }
.footer-links a { display: block; color: var(--text-secondary); text-decoration: none; font-size: 13px; padding: 4px 0; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { max-width: 1100px; margin: 0 auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.07); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom span { color: var(--muted); font-size: 12px; }
.footer-bottom a { color: var(--muted); font-size: 12px; text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: var(--text); }

/* ── Bright blue (#0066ff) accents on dark section backgrounds ── */
.matters-section a,
.why-section a,
.hero a,
.page-hero a:not(.back-btn) {
  color: var(--blue);
  font-weight: 600;
}

/* ── General text overrides for dark theme ── */
h2, h3, h4 { color: var(--text); }
p { color: var(--muted); }
strong { color: var(--text); }

/* ── Official source link inside cards ── */
.card-source-link {
  font-size: 11px; font-weight: 600; color: #7eb6ff;
  text-decoration: none; opacity: .75;
  transition: opacity .2s, color .2s;
  align-self: flex-start;
  display: block; margin-top: 6px;
}
.card-source-link:hover { opacity: 1; text-decoration: underline; }

/* Why this matters block — hidden by default, toggled per card */
.why-matters {
  display: none;
  margin-top: 4px;
  padding: 10px 13px;
  background: rgba(91,155,255,.07);
  border-left: 3px solid rgba(91,155,255,.45);
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.card.details-open .why-matters,
.summit-card.details-open .why-matters,
.meeting-card.details-open .why-matters,
.decision-card.details-open .why-matters { display: block; }
.why-matters-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #7eb6ff;
  margin-bottom: 5px;
}

/* Details toggle button */
.details-btn {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; padding: 5px 12px;
  background: rgba(91,155,255,.1); border: 1px solid rgba(91,155,255,.3);
  border-radius: 6px; color: #7eb6ff; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.details-btn:hover { background: rgba(91,155,255,.18); border-color: rgba(91,155,255,.5); }
.card.details-open .details-btn,
.summit-card.details-open .details-btn,
.meeting-card.details-open .details-btn,
.decision-card.details-open .details-btn { background: rgba(91,155,255,.15); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.04); }
::-webkit-scrollbar-thumb { background: rgba(91,155,255,.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(91,155,255,.55); }

/* Selection */
::selection { background: var(--brass-soft); color: var(--ink); }

/* ── Static pages ── */
.static-hero { border-bottom: 1px solid rgba(255,255,255,.08); padding: 48px 24px 40px; background: linear-gradient(135deg, rgba(0,51,153,.1) 0%, rgba(0,20,60,.06) 100%); }
.static-hero-inner { max-width: 1100px; margin: 0 auto; }
.static-hero h1 { font-size: 36px; font-weight: 800; color: var(--text); margin-bottom: 10px; line-height: 1.2; }
.static-hero .page-tagline { font-size: 16px; color: var(--muted); max-width: 600px; line-height: 1.6; margin: 0; }
.static-main { max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; }
.content-section { margin-bottom: 48px; }
.content-section h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.content-section h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 18px 0 6px; }
.content-section p { color: var(--muted); line-height: 1.7; margin-bottom: 12px; font-size: 14px; }
.content-section ul, .content-section ol { color: var(--muted); line-height: 1.7; padding-left: 20px; font-size: 14px; }
.content-section li { margin-bottom: 6px; }
.explain-box { background: var(--bg-elevated, #101c31); border: 1px solid var(--border); border-left: 3px solid var(--accent-blue, #5C9EE0); border-radius: 10px; padding: 20px 24px; margin: 24px 0; }
.explain-box .box-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #5b9bff; margin-bottom: 8px; display: block; }
.explain-box p { color: var(--text-secondary); margin: 0; line-height: 1.7; font-size: 14px; }
.matters-box { background: var(--bg-elevated, #101c31); border: 1px solid var(--border); border-left: 3px solid #E8C240; border-radius: 10px; padding: 20px 24px; margin: 24px 0; }
.matters-box .box-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #FFCC00; margin-bottom: 8px; display: block; }
.matters-box p { color: var(--text-secondary); margin: 0; line-height: 1.7; font-size: 14px; }
.inst-overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 24px; }
.inst-overview-card { background: var(--bg-card, #18253B); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; text-decoration: none; display: block; transition: background 160ms ease, border-color 160ms ease; }
.inst-overview-card:hover { background: var(--bg-card-hover, #20304A); border-color: rgba(92,158,224,.38); }
.inst-overview-card .ioc-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.inst-overview-card .ioc-role { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.inst-overview-card .ioc-fact { font-size: 11px; color: #5b9bff; font-weight: 600; }
.steps-list { list-style: none; padding: 0; counter-reset: steps; margin-top: 8px; }
.steps-list li { counter-increment: steps; display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.steps-list li:last-child { border-bottom: none; }
.steps-list li::before { content: counter(steps); flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#003399,#0066ff); color: white; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.steps-list .step-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.steps-list .step-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.compare-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 20px; border-radius: 10px; border: 1px solid var(--border); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th { background: rgba(0,51,153,.18); color: rgba(255,255,255,.9); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 12px 16px; text-align: left; white-space: nowrap; }
.compare-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: rgba(255,255,255,.03); }
.compare-table td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
.glossary-grid { display: grid; gap: 10px; margin-top: 20px; }
.glossary-item { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; }
.glossary-term { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.glossary-def { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.principle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.principle-card { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; }
.principle-card h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.principle-card p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.act-card { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.act-card h3 { font-size: 13px; font-weight: 700; color: #5b9bff; margin-bottom: 4px; }
.act-card p { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 0; }

/* ── Main Navigation ── */
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.main-nav a { color: rgba(255,255,255,.7); text-decoration: none; font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 6px; white-space: nowrap; transition: all .2s; }
.main-nav a:hover { color: white; background: rgba(255,255,255,.1); }
.main-nav a.active { color: white; background: rgba(255,255,255,.13); }

/* ── Burger button ── */
.burger { display: none; background: none; border: 1px solid rgba(255,255,255,.2); color: white; font-size: 15px; cursor: pointer; padding: 6px 10px; border-radius: 6px; line-height: 1; transition: background .2s; }
.burger:hover { background: rgba(255,255,255,.1); }

/* ── Breadcrumbs ── */
.breadcrumbs-wrapper { background: rgba(0,0,0,.25); border-bottom: 1px solid rgba(255,255,255,.06); }
.breadcrumbs { max-width: 1100px; margin: 0 auto; padding: 9px 24px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumbs a { color: rgba(255,255,255,.45); text-decoration: none; font-size: 12px; transition: color .2s; }
.breadcrumbs a:hover { color: rgba(255,255,255,.85); }
.breadcrumbs .bc-sep { color: rgba(255,255,255,.25); font-size: 12px; }
.breadcrumbs .bc-current { color: rgba(255,255,255,.85); font-size: 12px; font-weight: 500; }

/* ── Footer disclaimer ── */
.footer-disclaimer { max-width: 1100px; margin: 16px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); font-size: 11px; line-height: 1.6; opacity: .7; }

/* ── Mobile nav ── */
@media (max-width: 860px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(1,4,20,.98); flex-direction: column; align-items: stretch;
    padding: 8px 16px 16px; border-top: 1px solid rgba(255,255,255,.1);
    z-index: 200; gap: 2px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 14px; font-size: 14px; border-radius: 8px; }
  .burger { display: block; }
}

/* ── Institution pages: Structural insight blocks ── */

/* Explain Simply */
.inst-explain { padding: 28px 24px 32px; background: rgba(0,51,153,.06); border-bottom: 1px solid var(--border); position: relative; z-index: 1; }
.inst-explain-inner { max-width: 820px; margin: 0 auto; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-left: 4px solid var(--ep); border-radius: var(--radius); padding: 22px 24px; display: flex; gap: 14px; align-items: flex-start; }
.inst-explain-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.inst-explain-content { flex: 1; }
.inst-explain-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #5b9bff; margin-bottom: 8px; display: block; }
.inst-explain-inner p { font-size: 15px; color: var(--text); line-height: 1.75; margin: 0; opacity: .92; }

/* Shared wrapper for How it works / Who controls / Key facts */
.inst-section { padding: 48px 24px; border-bottom: 1px solid var(--border); position: relative; z-index: 1; }
.inst-section--alt { background: rgba(255,255,255,.02); }
.inst-section-inner { max-width: 820px; margin: 0 auto; }
.inst-section h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; color: var(--text); }
.inst-section-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; display: block; }
.inst-section-link { font-size: 13px; color: var(--accent-blue-soft, #7EB2F0); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 18px; padding: 5px 12px; border-radius: 14px; border: 1px solid rgba(92,158,224,.22); background: rgba(92,158,224,.07); transition: background .15s, border-color .15s, color .15s; }
.inst-section-link:hover { background: rgba(92,158,224,.16); border-color: rgba(92,158,224,.4); color: var(--text); }

/* Numbered steps (How it works) */
.inst-steps { list-style: none; padding: 0; counter-reset: inst-steps; }
.inst-steps li { counter-increment: inst-steps; display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.inst-steps li:last-child { border-bottom: none; }
.inst-steps li::before { content: counter(inst-steps); flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #003399, #0066ff); color: white; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.inst-step-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.inst-step-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }

/* Who controls it — grid */
.inst-control-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .inst-control-grid { grid-template-columns: repeat(2, 1fr); } }
.inst-control-item { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.inst-control-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.inst-control-desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }

/* Key facts grid */
.inst-facts-grid { display: grid; gap: 12px; }
@media (min-width: 480px) { .inst-facts-grid { grid-template-columns: repeat(2, 1fr); } }
.inst-fact { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.inst-fact-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; display: block; }
.inst-fact-value { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 2px; }
.inst-fact-note { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 0; }

/* Explore further bar */
.inst-explore { padding: 18px 24px; background: rgba(0,51,153,.04); border-bottom: 1px solid var(--border); position: relative; z-index: 1; }
.inst-explore-inner { max-width: 820px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inst-explore-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-right: 4px; white-space: nowrap; }
.inst-explore-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #7eb6ff; text-decoration: none; padding: 5px 12px; border-radius: 16px; border: 1px solid rgba(91,155,255,.22); background: rgba(91,155,255,.06); transition: all .2s; }

/* ── Live tracker preview ── */
.live-tracker-preview { max-width: 820px; margin: 0 auto 40px; padding: 0 20px; }
.live-tracker-preview > h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.live-tracker-preview > p { font-size: 14px; color: var(--muted); margin: 0 0 16px; line-height: 1.55; }

.tracker-note { font-size: 12px; color: var(--muted); background: rgba(255,204,0,.08); border: 1px solid rgba(255,204,0,.25); border-radius: 8px; padding: 8px 14px; margin-bottom: 16px; }

.live-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; position: relative; }
.live-card:hover { border-color: rgba(91,155,255,.32); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.14); }

.example-card { border-style: dashed; }

.status-label { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; margin-bottom: 10px; }

.live-card h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.live-card > p { font-size: 14px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.live-card ul { margin: 0 0 16px; padding-left: 18px; }
.live-card ul li { font-size: 13px; color: var(--muted); line-height: 1.6; }
.live-card > a { font-size: 13px; font-weight: 600; color: #7eb6ff; text-decoration: none; }
.live-card > a:hover { text-decoration: underline; }
.inst-explore-link:hover { background: rgba(91,155,255,.15); border-color: rgba(91,155,255,.4); color: white; }

/* ── AI explain preview ── */
.ai-explain-preview { max-width: 820px; margin: 0 auto 40px; padding: 0 20px; }
.ai-explain-preview > h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.ai-explain-preview > p { font-size: 14px; color: var(--muted); margin: 0 0 16px; line-height: 1.55; }

.ai-explain-box { display: flex; flex-direction: column; gap: 12px; }
.ai-explain-box label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
#topic-input { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 15px; color: var(--text); outline: none; cursor: default; }

/* ── Global impact-row (chips) ── */
.impact-row { display: flex; align-items: flex-start; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.impact-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; padding-top: 1px; font-weight: 700; }
.impact-text { font-size: 12px; color: var(--text); font-weight: 600; line-height: 1.4; }

/* ── Global details.card-details ── */
details.card-details { margin-top: 8px; flex-shrink: 0; }
details.card-details summary {
  font-size: 12px; font-weight: 600; cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent-blue-soft, #7EB2F0);
  background: rgba(92,158,224,.08);
  border: 1px solid rgba(92,158,224,.2);
  border-radius: 6px; padding: 4px 10px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  user-select: none;
}
details.card-details summary::-webkit-details-marker { display: none; }
details.card-details summary::before { content: '▸'; font-size: 9px; transition: transform 160ms ease; }
details[open].card-details summary::before { transform: rotate(90deg); }
details.card-details summary:hover { background: rgba(92,158,224,.16); border-color: rgba(92,158,224,.38); color: var(--text); }
details.card-details summary:active { background: rgba(92,158,224,.05); transition-duration: 60ms; }
details.card-details .detail-body {
  font-size: 13px; color: var(--text-secondary); line-height: 1.7;
  margin-top: 10px; padding: 12px 14px;
  background: rgba(8,18,38,.6);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ── Skeleton and fallback states ── */
.skeleton {
  background: var(--bg-card, #18253B);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.skeleton-line {
  height: 11px; border-radius: 4px;
  background: rgba(148,178,218,.1);
}
.skeleton-line:first-child { width: 35%; height: 9px; }
.skeleton-line:nth-child(2) { width: 80%; height: 13px; }
.skeleton-line:nth-child(3) { width: 92%; }
.skeleton-line:nth-child(4) { width: 70%; }
.skeleton-badge {
  width: 64px; height: 18px; border-radius: 4px;
  background: rgba(148,178,218,.08);
  border: 1px solid rgba(148,178,218,.1);
}
.live-fallback {
  font-size: 13px; color: var(--muted);
  padding: 14px 0 4px;
  line-height: 1.6;
}
.live-fallback a {
  color: var(--accent-blue-soft, #7EB2F0);
  text-decoration: none; font-weight: 600;
}
.live-fallback a:hover { text-decoration: underline; }

/* ── Language-specific typography tuning ── */

html[lang="ru"] .hero h1,
html[lang="uk"] .hero h1 {
  font-size: clamp(24px, 4.1vw, 40px);
  line-height: 1.15;
  letter-spacing: -.3px;
}

html[lang="ru"] .section-title h2,
html[lang="uk"] .section-title h2 {
  font-size: 15px;
  line-height: 1.35;
}

html[lang="ru"] .card h3,
html[lang="uk"] .card h3 {
  font-size: 14px;
  line-height: 1.45;
}

html[lang="ru"] .card p,
html[lang="uk"] .card p {
  line-height: 1.6;
}

html[lang="ru"] .impact-text,
html[lang="uk"] .impact-text {
  font-size: 11px;
  line-height: 1.45;
}

html[lang="es"] .hero h1 { line-height: 1.12; }
html[lang="es"] .card p  { line-height: 1.6; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
  .card:hover { transform: none; }
}

/* ════════════════════════════════════════════════════════════════════
   Batch 4 — gcard material system
   Standalone card class hierarchy based on the reference design.
   These classes are layered on top of existing card classes — no
   existing selectors are removed or overridden by this block.
   ════════════════════════════════════════════════════════════════════ */

/* ── Base card ── */
.gcard {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  display: grid;
  gap: 16px;
  overflow: hidden;
  transition:
    border-color var(--t-base) var(--ease-out),
    background   var(--t-base) var(--ease-out),
    transform    var(--t-fast) var(--ease-out);
}
.gcard:hover {
  border-color: var(--line-2);
  background: var(--bg-card-hover);
}
.gcard:active { transform: scale(0.997); }

/* ── Pinned (featured) variant ──
   Note: brass left-edge stripe is already provided by
   .featured-event-grid::before, so we do NOT add ::after here.
   That would conflict with the Batch 3 spotlight on ::after. */
.gcard.is-pinned {
  padding: 34px 36px;
  background: linear-gradient(180deg, var(--bg-card-hover) 0%, var(--bg-card) 100%);
  border-color: var(--line-2);
  box-shadow: inset 3px 0 0 var(--brass), inset 0 0 0 1px oklch(1 0 0 / 0.03);
}

/* When .featured-event-grid also carries .gcard: preserve its 2-col layout.
   The grid-template-columns from .featured-event-grid wins by source order,
   but gap would default to 16px — zero it out to keep columns flush. */
.featured-event-grid.gcard { gap: 0; }

/* ── Compact (companion) variant ── */
.gcard.is-compact {
  padding: 18px 20px;
  gap: 12px;
}

/* ── Row layout ── */
.gcard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Institution chip ── */
.gcard-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-2);
  transition: all var(--t-fast) var(--ease-out);
  text-decoration: none;
}
.gcard-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.gcard-chip-mark {
  width: 12px; height: 12px;
  border-radius: 4px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.14);
}

/* ── Status pill ── */
.gcard-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.gcard-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
/* Live — animated dot ring */
.gcard-pill.is-live {
  color: oklch(0.78 0.12 145);
  background: oklch(0.30 0.06 145 / 0.55);
  border-color: oklch(0.78 0.12 145 / 0.28);
}
.gcard-pill.is-live::before {
  animation: pulse-pill 2.4s var(--ease-out) infinite;
}
/* Vote */
.gcard-pill.is-vote {
  color: oklch(0.78 0.12 35);
  background: oklch(0.30 0.06 35 / 0.55);
  border-color: oklch(0.78 0.12 35 / 0.28);
}
/* Review — brass-toned */
.gcard-pill.is-review {
  color: var(--brass);
  background: oklch(0.30 0.05 75 / 0.55);
  border-color: oklch(0.83 0.10 80 / 0.28);
}
/* Archived */
.gcard-pill.is-archived {
  color: var(--ink-3);
  background: oklch(0.26 0.008 260);
  border-color: transparent;
}

/* ── Action buttons ── */
.gcard-actions {
  display: flex;
  gap: 5px;
}
.gcard-act {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--ink-3);
  border: 1px solid transparent;
  background: none;
  font: inherit;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.gcard-act:hover {
  color: var(--ink);
  border-color: var(--line-2);
  background: var(--bg-deep);
}
.gcard-act:active { transform: scale(0.9); }
.gcard-act[aria-pressed="true"] {
  color: var(--brass);
  border-color: oklch(0.83 0.10 80 / 0.35);
  background: oklch(0.30 0.05 75 / 0.4);
}

/* ── Card title / summary ── */
.gcard-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin: 0;
  color: var(--ink);
}
.gcard.is-pinned .gcard-title {
  font-size: 38px;
  line-height: 1.1;
  max-width: 22ch;
}
.gcard.is-compact .gcard-title {
  font-size: 18px;
  line-height: 1.25;
}
.gcard-summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

/* ── Expand toggle ── */
.gcard-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 7px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-deep);
  align-self: start;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.gcard-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-3);
}
.gcard-toggle:active { transform: scale(0.96); }
.gcard-toggle .chev {
  display: inline-block;
  transition: transform var(--t-base) var(--spring);
}
.gcard[data-open="true"] .gcard-toggle .chev { transform: rotate(180deg); }

/* ── Divider ── */
.gcard-divider {
  height: 1px;
  background: var(--line);
}

/* ── Expand / collapse — grid-row technique (no display:none) ──
   grid-template-rows animates from 0fr → 1fr, revealing inner height.
   .gcard-expand-inner must overflow:hidden to clamp at 0 height. */
.gcard-expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-base) var(--ease-snap);
}
.gcard[data-open="true"] .gcard-expand {
  grid-template-rows: 1fr;
}
.gcard-expand-inner {
  overflow: hidden;
  display: grid;
  gap: 20px;
}

/* ── Homepage v2 hero ── */
.home-v2-now {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.home-v2-now::before {
  content: '';
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(ellipse 55% 50% at 18% 38%, rgba(90,157,255,.05) 0%, transparent 68%),
    radial-gradient(ellipse 42% 58% at 80% 62%, rgba(90,157,255,.04) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-drift-hero 22s ease-in-out infinite alternate;
}
.home-v2-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 24px 56px;
}
.home-v2-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 28px;
}
.home-v2-eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--brass);
}
.home-v2-title {
  font-family: var(--serif);
  font-size: clamp(56px, 7.4vw, 104px);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.04;
  color: var(--text);
  margin: 0 0 24px;
  max-width: 18ch;
}
.home-v2-subtitle {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 44px;
}
.home-v2-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.home-v2-kpi {
  background: var(--surface);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: background var(--t-fast) var(--ease-out);
}
.home-v2-kpi:hover { background: var(--surface-2); }
.home-v2-kpi-val {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--text);
}
.home-v2-kpi-val small {
  font: 400 14px/1 var(--mono);
}
.home-v2-kpi-label {
  font: 500 11px/1 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-v2-kpi-meta {
  font: 400 11.5px/1 var(--mono);
  color: rgba(135,170,220,.45);
}
@media (max-width: 768px) {
  .home-v2-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ── Recent activity section ── */
.recent-activity-section {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.ras-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 32px;
}
.ras-head {
  margin-bottom: 28px;
}
.ras-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 6px;
}
.ras-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -.01em;
}
.ras-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.ras-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 18px;
  padding: 16px 22px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast) var(--ease-out);
}
.ras-item:last-child {
  border-bottom: none;
}
.ras-item:hover {
  background: var(--bg-card-hover);
}
.ras-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ras-mark {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.ras-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: .01em;
}
.ras-item-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.ras-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.ras-inst {
  flex-shrink: 0;
  max-width: 210px;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .015em;
  text-transform: none;
  color: rgba(232,238,248,.88);
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.032)),
    color-mix(in oklab, var(--surface-2) 78%, transparent);
  border: 1px solid color-mix(in oklab, var(--line) 82%, #f4c873);
  padding: 4px 8px 4px 5px;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.075),
    0 8px 20px rgba(4,10,22,.12);
}
.ras-inst span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ras-inst-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in oklab, #f4c873 16%, transparent);
  font-size: 12px;
  line-height: 1;
}
.ras-inst-ep .ras-inst-icon {
  background: color-mix(in oklab, var(--ep) 18%, transparent);
}
.ras-inst-ec .ras-inst-icon {
  background: color-mix(in oklab, var(--ec) 18%, transparent);
}
.ras-inst-council .ras-inst-icon {
  background: color-mix(in oklab, var(--cu) 18%, transparent);
}
.ras-event {
  min-width: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}
.ras-context {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}
.ras-insight {
  display: block;
  max-width: 72ch;
  padding: 7px 9px;
  border: 1px solid color-mix(in oklab, #ffb176 17%, transparent);
  border-radius: 10px;
  background: color-mix(in oklab, #ffb176 6%, transparent);
  color: rgba(216,225,238,.78);
  font-size: 12px;
  line-height: 1.42;
}
.ras-who {
  border-color: color-mix(in oklab, var(--blue) 16%, transparent);
  background: color-mix(in oklab, var(--blue) 5%, transparent);
}
.ras-insight strong {
  color: #ffb176;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ras-source {
  display: block;
  font: 400 11px/1.35 monospace;
  color: var(--ink-4);
  letter-spacing: .025em;
}
.ras-source a {
  color: var(--text-secondary);
  text-decoration: none;
}
.ras-source a:hover,
.ras-source a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}
.ras-phase {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(90,157,255,.1);
  border: 1px solid rgba(90,157,255,.16);
  padding: 3px 7px;
  border-radius: 999px;
}
.ras-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
}
.ras-badge-vote     { color: #e05a4a; background: rgba(224,90,74,.1); }
.ras-badge-review   { color: #3a9a6e; background: rgba(58,154,110,.1); }
.ras-badge-update   { color: var(--blue); background: rgba(90,157,255,.1); }
.ras-badge-calendar { color: #8a80c4; background: rgba(138,128,196,.1); }
.ras-badge-hearing  { color: #c07840; background: rgba(192,120,64,.1); }
@media (max-width: 700px) {
  .ras-item { grid-template-columns: 1fr; gap: 8px; }
  .ras-item-left { justify-content: flex-start; }
  .ras-badge { align-self: flex-start; }
}

/* ── Institution index section ── */
/* ── Institution index section — Dock v2 ── */
.institution-index-section {
  background: var(--bg);
  border-bottom: none;
}
.iis-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 48px;
}
.iis-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}
.iis-eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}
.iis-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -.012em;
  color: var(--text);
  margin: 0;
}
/* 7 equal columns — full-width dock rail on desktop */
.iis-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.iix-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.iix-cell:hover {
  border-color: var(--line-2);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,.28), 0 1px 6px rgba(0,0,0,.12);
}
.iix-cell:focus-visible { outline: 2px solid var(--line-2); outline-offset: 2px; }
.iix-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Vivid colored dot — remove dark overlay so mark color shows through */
.iix-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}
.iix-mark::after {
  display: none;
}
.iix-code {
  font: 600 10px/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text);
}
.iix-name {
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -.005em;
}
.iix-stats {
  display: flex;
  gap: 10px;
  font: 500 10.5px/1 var(--mono);
  color: var(--ink-4);
}
.iix-stats b {
  color: var(--text);
  font-weight: 600;
}
.iix-status {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
  margin-top: auto;
  opacity: .75;
}
.iix-arrow {
  display: block;
  font-size: 12px;
  color: oklch(from var(--brass) l c h / .4);
  transition: color .18s;
  margin-top: auto;
}
.iix-cell:hover .iix-arrow { color: var(--brass); }
/* Tablet: 4 columns */
@media (max-width: 1080px) {
  .iis-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

/* ── Institutions Dock ── */
.institutions-dock {
  position: sticky;
  top: 56px;
  z-index: 199;
  background: rgba(10,18,32,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148,178,218,.1);
}
.institutions-dock-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.institutions-dock-label {
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .6;
  white-space: nowrap;
  flex-shrink: 0;
}
.institutions-dock-rail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.institutions-dock-rail::-webkit-scrollbar { display: none; }
.institutions-dock-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--t-fast) var(--ease-out);
  position: relative;
}
.institutions-dock-cell:hover {
  background: var(--bg-card-hover);
}
.institutions-dock-cell:focus-visible {
  outline: 2px solid var(--line-2);
  outline-offset: 2px;
  border-radius: 8px;
}
.institutions-dock-mark {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.institutions-dock-code {
  font: 600 9.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--t-fast) var(--ease-out);
}
.institutions-dock-cell:hover .institutions-dock-code { color: var(--text); }
.institutions-dock-name {
  font-size: 12px;
  color: var(--text);
  opacity: .75;
  transition: opacity var(--t-fast) var(--ease-out);
}
.institutions-dock-cell:hover .institutions-dock-name { opacity: 1; }
.institutions-dock-count {
  font: 500 9px/1 var(--mono);
  color: var(--ink-4);
  opacity: .45;
}

/* ── Calendar rail section ── */
.calendar-rail-section {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.crs-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 36px;
}
.crs-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}
.crs-eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}
.crs-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -.012em;
  color: var(--text);
  margin: 0;
}
.crs-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.crd {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.crd-today {
  border-color: var(--brass);
  background: linear-gradient(170deg, oklch(0.83 0.10 80 / 0.05) 0%, var(--bg-card) 60%);
}
.crd-weekend { opacity: .65; }
.crd:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.24), 0 1px 6px rgba(0,0,0,.14); }
.crd-head {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}
.crd-num {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--text);
}
.crd-today .crd-num { color: var(--brass); }
.crd-dow {
  font: 500 10px/1 monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.crd-today-badge {
  font: 700 8.5px/1 monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass);
  background: oklch(0.83 0.10 80 / 0.10);
  border: 1px solid oklch(0.83 0.10 80 / 0.22);
  border-radius: 999px;
  padding: 2px 7px;
  position: absolute;
  top: 10px;
  right: 10px;
}
.crd-events {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.cre-event {
  padding: 5px 8px;
  border-radius: 5px;
  border-left: 2px solid var(--border);
  background: rgba(10,22,40,.3);
}
.cre-event-name {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
}
.cre-event-inst {
  display: block;
  font: 500 9.5px/1 monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 3px;
}
.crd-empty {
  font: 400 11px/1.5 monospace;
  color: rgba(135,170,220,.28);
  font-style: italic;
  flex: 1;
  display: flex;
  align-items: center;
}
@media (max-width: 860px) {
  .crs-grid {
    grid-template-columns: repeat(7, minmax(128px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }
  .crd { scroll-snap-align: start; min-height: 156px; }
}

/* ── Featured companion cards ── */
.featured-companions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.featured-mini-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.featured-mini-card:hover {
  border-color: var(--line-2);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.24), 0 1px 6px rgba(0,0,0,.14);
}
.fmc-head {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.fmc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fmc-status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 5px;
}
.fmc-status-review {
  color: var(--status-pending);
  background: rgba(242,184,75,.1);
}
.fmc-status-live {
  color: #4ade80;
  background: rgba(74,222,128,.1);
}
.fmc-inst-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .02em;
}
.fmc-inst-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fmc-category {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: .7;
}
.fmc-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -.01em;
}
.fmc-summary {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}
.fmc-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fmc-metric {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .01em;
}
.fmc-metric-val {
  font-weight: 700;
  color: var(--text);
}
.fmc-metric-sep {
  width: 1px;
  height: 12px;
  background: var(--border);
  flex-shrink: 0;
}
.fmc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.fmc-foot-sep {
  width: 1px;
  height: 10px;
  background: var(--border);
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .featured-companions { grid-template-columns: 1fr; }
}

/* ── Active files section ── */
.active-files-section {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.afs-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 44px;
}
.afs-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.afs-head-left { display: flex; flex-direction: column; gap: 6px; }
.afs-eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}
.afs-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -.012em;
  color: var(--text);
  margin: 0;
}
.afs-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.afs-filter {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font: 500 11.5px/1 monospace;
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.afs-filter:hover {
  color: var(--text-secondary);
  border-color: var(--line-2);
  background: rgba(135,170,220,.05);
}
.afs-filter:focus-visible {
  outline: 2px solid var(--line-2);
  outline-offset: 2px;
}
.afs-filter:active { transform: scale(0.95); }
.afs-filter.afs-filter-active {
  color: var(--brass);
  border-color: oklch(0.83 0.10 80 / 0.30);
  background: oklch(0.83 0.10 80 / 0.06);
}
.afs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: rgba(10,18,36,.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.afs-toolbar-count {
  font: 500 11.5px/1 monospace;
  letter-spacing: .04em;
  color: var(--muted);
}
.afs-sort {
  display: flex;
  gap: 4px;
}
.afs-sort-chip {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font: 500 11px/1 monospace;
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.afs-sort-chip:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(135,170,220,.06);
}
.afs-sort-chip:active { transform: scale(0.93); }
.afs-sort-chip:focus-visible { outline: 2px solid var(--line-2); outline-offset: 2px; }
.afs-sort-chip.afs-sort-active {
  color: var(--brass);
  border-color: oklch(0.83 0.10 80 / 0.28);
  background: oklch(0.83 0.10 80 / 0.07);
}
.afs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: stretch;
}
/* Card */
.active-file-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.active-file-card:hover {
  border-color: var(--line-2);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.24), 0 1px 6px rgba(0,0,0,.14);
}
.active-file-card.afc-weak {
  background:
    radial-gradient(circle at 92% 8%, rgba(143,163,192,.08), transparent 34%),
    color-mix(in oklab, var(--bg-card) 88%, #050b14 12%);
  border-color: color-mix(in oklab, var(--border) 80%, transparent);
  box-shadow: none;
}
.active-file-card.afc-weak:hover {
  background: color-mix(in oklab, var(--bg-card-hover) 72%, #050b14 28%);
}
.active-file-card.afc-weak .afc-title {
  color: color-mix(in oklab, var(--text) 84%, var(--muted) 16%);
}
.active-file-card.afc-weak .afc-status {
  opacity: .82;
}
.afc-priority {
  border-color: rgba(90,157,255,.32);
  background: rgba(19,34,64,.85);
}
.afc-priority:hover {
  border-color: rgba(90,157,255,.5);
  background: rgba(23,40,72,.9);
}
.afc-live-note {
  font: 600 9.5px/1 monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  flex: 0 0 auto;
}
.afc-live-note-urgent {
  color: #f2b84b;
  background: rgba(242,184,75,.1);
  border: 1px solid rgba(242,184,75,.2);
}
.afc-live-note-info {
  color: var(--blue);
  background: rgba(90,157,255,.08);
  border: 1px solid rgba(90,157,255,.18);
}
.afc-live-note-done {
  color: var(--muted);
  background: rgba(143,163,192,.06);
  border: 1px solid rgba(143,163,192,.12);
}
.afc-status-trilogue {
  color: #8a80c4;
  background: rgba(138,128,196,.08);
  border: 1px solid rgba(138,128,196,.2);
}
.afc-status-vote {
  color: #e05a4a;
  background: rgba(224,90,74,.08);
  border: 1px solid rgba(224,90,74,.18);
}
.afc-top {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
}
.afc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-right: 112px;
  min-height: 28px;
}
.afc-inst-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10,22,40,.4);
  font: 500 10.5px/1 monospace;
  letter-spacing: .03em;
  color: var(--muted);
  flex: 0 0 auto;
}
.afc-inst-mark {
  width: 8px; height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
  opacity: .85;
}
.afc-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font: 600 9.5px/1 monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.afc-status-inprogress {
  color: var(--status-pending);
  background: rgba(242,184,75,.08);
  border: 1px solid rgba(242,184,75,.18);
}
.afc-status-scheduled {
  color: var(--muted);
  background: rgba(143,163,192,.06);
  border: 1px solid rgba(143,163,192,.14);
}
.afc-status-hearing {
  color: #e09060;
  background: rgba(224,144,96,.08);
  border: 1px solid rgba(224,144,96,.18);
}
.afc-category {
  font: 500 10px/1 monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.afc-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.012em;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
  max-width: 100%;
}
.afc-summary {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.afc-explain-toggle {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: var(--text-secondary);
  width: fit-content;
  padding: 7px 11px;
  font: 600 11px/1 monospace;
  letter-spacing: .02em;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.afc-explain-toggle:hover,
.afc-explain-toggle:focus-visible {
  border-color: var(--line-2);
  color: var(--text);
  background: rgba(255,255,255,.06);
  outline: none;
}
.afc-expanded {
  position: static;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-2px);
  padding: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  transition: max-height 260ms var(--ease-out), opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
}
.active-file-card[aria-expanded="true"] {
  z-index: 8;
}
.active-file-card[aria-expanded="true"] .afc-expanded {
  max-height: 640px;
  opacity: 1;
  transform: translateY(0);
  padding: 0;
  border-color: transparent;
  overflow: visible;
  pointer-events: auto;
}
.afc-expanded .afc-summary {
  display: grid;
  gap: 5px;
  margin: 0 0 8px;
  padding: 11px 12px;
  border: 1px solid color-mix(in oklab, var(--border) 82%, var(--accent-blue) 12%);
  border-radius: 12px;
  background: color-mix(in oklab, var(--bg-card-hover) 86%, var(--accent-blue) 4%);
}
.afc-expanded .afc-summary:last-child {
  margin-bottom: 0;
}
.afc-expanded .afc-summary strong {
  color: var(--text);
  font: 800 12px/1.25 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.afc-expanded .afc-summary span {
  display: block;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .afc-expanded {
    transition: none;
    transform: none;
  }
}
/* Timeline */
.afc-timeline {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}
.afc-tl-step {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
}
.afc-tl-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.afc-tl-rail::after {
  content: "";
  width: 1px;
  flex: 1;
  background: var(--border);
  margin-top: 3px;
  min-height: 10px;
}
.afc-tl-step:last-child .afc-tl-rail::after { display: none; }
.afc-tl-node {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(135,170,220,.22);
  background: var(--bg-card);
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  margin-top: 2px;
}
.afc-tl-done .afc-tl-node { background: var(--muted); border-color: var(--muted); }
.afc-tl-current .afc-tl-node {
  background: var(--brass);
  border-color: var(--brass);
  box-shadow: 0 0 0 2px oklch(from var(--brass) l c h / .2);
}
.afc-tl-body { padding-bottom: 11px; }
.afc-tl-step:last-child .afc-tl-body { padding-bottom: 0; }
.afc-tl-name {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-bottom: 2px;
}
.afc-tl-current .afc-tl-name { color: var(--text); font-weight: 600; }
.afc-tl-future .afc-tl-name { color: var(--muted); font-weight: 400; }
.afc-tl-meta {
  display: block;
  font: 400 10.5px/1 monospace;
  color: var(--ink-4);
}
.afc-tl-current .afc-tl-meta { color: oklch(from var(--brass) l c h / .55); }
/* Metrics */
.afc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.afc-metric {
  background: rgba(8,18,36,.5);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.afc-metric-val {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.014em;
  color: var(--text);
  line-height: 1;
}
.afc-metric-label {
  font: 400 10px/1.3 monospace;
  letter-spacing: .04em;
  color: var(--ink-4);
}
/* Footer */
.afc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font: 400 10.5px/1 monospace;
  color: var(--ink-4);
  letter-spacing: .03em;
  margin-top: 0;
  flex-wrap: wrap;
}
.afc-foot-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--line);
  flex: 0 0 auto;
}
@media (max-width: 860px) {
  .afs-cards { grid-template-columns: repeat(2, 1fr); }
  .afs-head { flex-direction: column; align-items: flex-start; }
}

/* ── Featured governance event ── */
.featured-governance-event {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,177,118,.032), transparent 34%),
    linear-gradient(180deg, var(--bg), oklch(0.164 0.020 260) 58%, var(--bg));
  border-bottom: 0;
  position: relative;
  overflow: hidden;
}
.featured-governance-event::before {
  content: '';
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(ellipse 50% 62% at 84% 28%, rgba(90,157,255,.04) 0%, transparent 65%),
    radial-gradient(ellipse 62% 42% at 12% 72%, rgba(90,157,255,.03) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-drift-featured 24s ease-in-out infinite alternate;
}
.fge-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 24px 48px;
}
.fge-eyebrow {
  display: inline-block;
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  opacity: .7;
}
.featured-event-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.featured-event-grid::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brass) 0%, transparent 80%);
  z-index: 1;
}
.featured-event-main {
  padding: 32px 36px 34px 42px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--border);
}
.featured-event-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.fge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font: 600 10px/1 monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.fge-status-inprogress {
  color: var(--status-pending);
  background: rgba(242,184,75,.08);
  border: 1px solid rgba(242,184,75,.2);
}
.fge-inst-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10,22,40,.4);
  font: 500 11px/1 monospace;
  letter-spacing: .03em;
  color: var(--muted);
  flex: 0 0 auto;
}
.fge-inst-mark {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
  opacity: .85;
}
.fge-category {
  font: 500 10px/1 monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.fge-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.14;
  color: var(--text);
  margin: 0;
  max-width: 26ch;
}
.fge-summary {
  font-size: 14.5px;
  line-height: 1.48;
  color: var(--muted);
  margin: 0;
  max-width: 52ch;
}
.fge-proc {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 11px/1 monospace;
  margin-top: 4px;
}
.fge-proc-label {
  color: var(--ink-4);
  letter-spacing: .04em;
}
.fge-proc-val {
  color: var(--ink-3);
  letter-spacing: .03em;
}
.fge-details-btn {
  align-self: flex-start;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(90,157,255,.25);
  background: rgba(90,157,255,.06);
  font: 500 12px/1 monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.fge-details-btn:hover {
  border-color: rgba(90,157,255,.45);
  background: rgba(90,157,255,.12);
}
.fge-details-btn:active { transform: scale(0.97); }
.featured-event-side {
  padding: 30px 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.038), rgba(255,255,255,.016)),
    color-mix(in oklab, var(--surface) 78%, transparent);
}
/* Timeline */
.fge-tl-label {
  font: 500 10px/1 monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 12px;
}
.fge-tl-steps { display: flex; flex-direction: column; }
.fge-tl-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
}
.fge-tl-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.fge-tl-rail::after {
  content: "";
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 4px;
}
.fge-tl-step:last-child .fge-tl-rail::after { display: none; }
.fge-tl-node {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(135,170,220,.25);
  background: var(--bg-card);
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  margin-top: 2px;
}
.fge-tl-done .fge-tl-node {
  background: var(--muted);
  border-color: var(--muted);
}
.fge-tl-current .fge-tl-node {
  background: var(--brass);
  border-color: var(--brass);
  box-shadow: 0 0 0 3px oklch(from var(--brass) l c h / .2);
}
.fge-tl-body { padding-bottom: 12px; }
.fge-tl-step:last-child .fge-tl-body { padding-bottom: 0; }
.fge-tl-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-bottom: 3px;
}
.fge-tl-current .fge-tl-name { color: var(--text); font-weight: 600; }
.fge-tl-future .fge-tl-name { color: var(--muted); font-weight: 400; }
.fge-tl-meta {
  font: 400 11px/1 monospace;
  color: var(--ink-4);
}
.fge-tl-current .fge-tl-meta { color: oklch(from var(--brass) l c h / .55); }
.fge-side-block {
  padding-top: 14px;
  border-top: 1px solid color-mix(in oklab, var(--line) 80%, transparent);
}
.fge-dashboard-meta {
  display: grid;
  gap: 0;
  padding-top: 0;
  border: 1px solid color-mix(in oklab, var(--line) 86%, #ffb176);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.034), rgba(255,255,255,.014)),
    color-mix(in oklab, var(--surface) 86%, transparent);
}
.fge-dashboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(8,18,36,.54);
}
.fge-dashboard-row span {
  font: 500 10px/1.2 monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.fge-dashboard-row strong {
  font: 500 12px/1.25 monospace;
  color: var(--text-secondary);
  text-align: right;
}
.fge-latest-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.fge-latest-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-secondary);
}
.fge-latest-item small {
  flex: 0 0 auto;
  font: 400 11px/1.35 monospace;
  color: var(--ink-4);
}
/* Metrics */
.fge-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.fge-metric {
  background: rgba(8,18,36,.6);
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fge-metric-val {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1;
}
.fge-metric-label {
  font: 400 10px/1.35 monospace;
  letter-spacing: .04em;
  color: var(--ink-4);
}
/* Footer */
.fge-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in oklab, var(--line) 80%, transparent);
  font: 400 11px/1 monospace;
  color: var(--ink-4);
  letter-spacing: .03em;
  margin-top: auto;
}
.fge-foot-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--line);
  flex: 0 0 auto;
}
@media (max-width: 860px) {
  .featured-event-grid { grid-template-columns: 1fr; }
  .featured-event-main { border-right: none; border-bottom: 1px solid var(--border); padding: 28px 28px; }
  .featured-event-side { padding: 26px 28px; }
  .fge-metrics { grid-template-columns: repeat(3, 1fr); }
}

/* ── Command layer ── */
.command-layer {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.command-layer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.command-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.command-shell:hover {
  border-color: var(--line-2);
  background: rgba(10,18,35,.7);
}
.command-shell:active { transform: scale(0.98); }
.command-shell-icon {
  flex-shrink: 0;
  color: var(--muted);
  width: 15px;
  height: 15px;
}
.command-shell-placeholder {
  flex: 1;
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: .01em;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.command-shell-kbd {
  flex-shrink: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: var(--muted);
  background: rgba(135,170,220,.1);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 7px;
  letter-spacing: .04em;
}
.command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 10px;
}
.command-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.command-filters::-webkit-scrollbar { display: none; }
.command-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
  white-space: nowrap;
}
.command-chip:hover {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.command-chip:focus-visible { outline: 2px solid var(--line-2); outline-offset: 2px; }
.command-chip-divider {
  flex-shrink: 0;
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 2px;
}
.command-live {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
}
.command-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  position: relative;
}
.command-live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #4ade80;
  animation: signal-ripple 2.4s var(--ease-out) infinite;
  opacity: 0.7;
}
@media (max-width: 700px) {
  .command-layer-inner { padding: 10px 16px 0; }
  .command-shell { height: 38px; }
  .command-live { display: none; }
}

/* ── Footer v2 ── */
.footer-v2 {
  background: rgba(2,8,24,.96);
  border-top: 1px solid var(--line);
  /* override legacy footer rule */
  padding: 0;
}
.footer-v2-cap {
  border-bottom: 1px solid var(--line);
}
.footer-v2-cap-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 12px/1 monospace;
  letter-spacing: .05em;
  color: rgba(143,163,192,.5);
}
.footer-v2-cap-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  position: relative;
}
.footer-v2-cap-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #4ade80;
  animation: signal-ripple 2.4s var(--ease-out) infinite;
  opacity: 0.7;
}
.footer-v2-body {
  border-bottom: 1px solid var(--line);
}
.footer-v2-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 44px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-v2-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-v2-brand-name {
  font-size: 14px;
  font-weight: 700;
  color: rgba(244,248,255,.75);
  letter-spacing: -.01em;
}
.footer-v2-brand-desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(143,163,192,.55);
  margin: 0;
}
.footer-v2-beta {
  display: inline-block;
  font: 600 9.5px/1 monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(90,157,255,.08);
  border: 1px solid rgba(90,157,255,.18);
  border-radius: 4px;
  padding: 3px 7px;
  align-self: flex-start;
}
.footer-v2-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-v2-col-label {
  font: 600 10px/1 monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(143,163,192,.4);
  margin-bottom: 6px;
}
.footer-v2-link {
  font-size: 12.5px;
  color: rgba(143,163,192,.6);
  text-decoration: none;
  padding: 2px 0;
  transition: color var(--t-fast) var(--ease-out);
  line-height: 1.5;
}
.footer-v2-link:hover { color: rgba(244,248,255,.85); }
.footer-v2-status {
  border-top: none;
}
.footer-v2-status-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-v2-verified {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 500 11px/1 monospace;
  letter-spacing: .04em;
  color: rgba(143,163,192,.42);
}
.footer-v2-verified-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(74,222,128,.5);
  flex-shrink: 0;
}
.footer-v2-status-sep {
  width: 1px;
  height: 12px;
  background: var(--line);
  flex-shrink: 0;
}
.footer-v2-copy {
  font: 400 11.5px/1 monospace;
  color: rgba(143,163,192,.35);
  margin-left: auto;
}
.footer-v2-link-quiet {
  font: 400 11.5px/1 monospace;
  color: rgba(143,163,192,.35);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
.footer-v2-link-quiet:hover { color: rgba(143,163,192,.7); }
@media (max-width: 860px) {
  .footer-v2-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ── Signal rail ── */
.signal-rail {
  background: rgba(2,8,24,.75);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.signal-rail-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 38px;
}
.signal-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 10px/1 monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex: 0 0 auto;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}
.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex: 0 0 auto;
  position: relative;
}
.signal-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #4ade80;
  animation: signal-ripple 2.4s var(--ease-out) infinite;
  opacity: 0.7;
}
@keyframes signal-ripple {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(2.8); opacity: 0;   }
  100% { transform: scale(2.8); opacity: 0;   }
}
@keyframes signal-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.5); }
  70%  { box-shadow: 0 0 0 5px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.signal-items {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  min-width: 0;
}
.signal-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.signal-inst {
  font: 600 10.5px/1 monospace;
  letter-spacing: .06em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.signal-text {
  font-size: 12px;
  color: var(--ink-3);
}
.signal-meta {
  font: 400 11px/1 monospace;
  color: var(--ink-4);
}
.signal-sep {
  width: 1px;
  height: 16px;
  background: var(--line);
  flex: 0 0 auto;
}
@media (max-width: 900px) {
  .signal-item:nth-child(n+6) { display: none; }
}

/*
 * TODO: migrate legacy explainer content into /learn architecture
 *
 * The .legacy-homepage section in en/index.html (hidden via HTML `hidden` attribute)
 * contains the original 7-institution explainer card layout.
 * It is preserved intentionally and should NOT be deleted until:
 *  1. An equivalent /learn/ or /institutions/ page exists for each section
 *  2. All i18n keys (en/es/ru/uk) have been migrated
 *  3. The language switcher no longer relies on hero_h1 / hero_p keys
 *     being bound to visible elements on this page
 *
 * When ready to remove: delete .legacy-homepage wrapper and its contents,
 * then audit T{} object in the inline <script> for orphaned keys.
 */

/* ── Command palette overlay ── */
body.cp-open { overflow: hidden; }

.command-palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(2,8,24,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}
.command-palette-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.command-palette {
  width: min(572px, calc(100vw - 32px));
  background: var(--bg-card);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0,0,8,.72),
    0 8px 24px rgba(0,0,0,.36),
    0 1px 0 var(--line-2) inset;
  transform: translateY(-12px) scale(.98);
  transition: transform var(--t-base) var(--spring);
}
.command-palette-backdrop.is-open .command-palette {
  transform: translateY(0) scale(1);
}
/* Search row */
.command-palette-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 52px;
  border-bottom: 1px solid var(--border);
}
.cp-search-icon {
  flex-shrink: 0;
  color: var(--muted);
  width: 16px;
  height: 16px;
}
.command-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font: 400 17px/1 var(--sans);
  color: var(--text);
  letter-spacing: .01em;
}
.command-palette-input::placeholder {
  color: var(--muted);
  opacity: .6;
}
.cp-esc-badge {
  flex-shrink: 0;
  font: 500 11px/1 monospace;
  letter-spacing: .06em;
  color: var(--muted);
  background: rgba(135,170,220,.08);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 7px;
}
/* Body */
.command-palette-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(135,170,220,.15) transparent;
}
.command-palette-body::-webkit-scrollbar { width: 4px; }
.command-palette-body::-webkit-scrollbar-thumb {
  background: rgba(135,170,220,.15);
  border-radius: 2px;
}
/* Groups */
.command-palette-group {
  margin-bottom: 4px;
}
.command-palette-group:last-child { margin-bottom: 0; }
.command-palette-group-label {
  display: block;
  font: 600 10px/1 monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 8px 10px 6px;
}
/* Items */
.command-palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast) var(--ease-out);
}
.command-palette-item:hover {
  background: var(--surface-3);
}
.command-palette-item:focus-visible {
  outline: 2px solid var(--line-2);
  outline-offset: -2px;
  background: var(--surface-3);
}
.command-palette-item:hover .cp-item-name {
  color: var(--text);
}
.cp-item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(135,170,220,.07);
  border: 1px solid rgba(135,170,220,.1);
  color: var(--muted);
}
.cp-item-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(244,248,255,.8);
  letter-spacing: .005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .1s ease;
}
.cp-item-meta {
  flex-shrink: 0;
  font: 500 11px/1 monospace;
  letter-spacing: .04em;
  color: var(--ink-4);
}

/* ── Watch / Alert event actions ── */
.event-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.event-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(135,170,220,.14);
  background: transparent;
  color: rgba(143,163,192,.45);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
  flex-shrink: 0;
}
.event-action-btn:hover {
  color: var(--muted);
  border-color: rgba(135,170,220,.3);
  background: rgba(135,170,220,.06);
}
.event-action-btn:active { transform: scale(0.88); }
.event-action-btn:focus-visible {
  outline: 2px solid oklch(from var(--brass) l c h / .55);
  outline-offset: 2px;
}
.event-action-btn.is-active[data-action="watch"] {
  color: var(--blue);
  border-color: rgba(90,157,255,.35);
  background: rgba(90,157,255,.1);
}
.event-action-btn.is-active[data-action="watch"] svg {
  fill: var(--blue);
}
.event-action-btn.is-active[data-action="alert"] {
  color: #f2b84b;
  border-color: rgba(242,184,75,.35);
  background: rgba(242,184,75,.1);
}
/* Toast */
.event-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 600;
  background: var(--surface-3, var(--bg-card));
  border: 1px solid var(--line-2, var(--border));
  border-radius: 999px;
  padding: 11px 20px;
  font: 500 12.5px/1 var(--mono);
  color: var(--text);
  letter-spacing: .04em;
  box-shadow: 0 12px 40px rgba(0,0,8,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--spring);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.event-toast::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  flex: 0 0 auto;
}
.event-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Homepage V3 visual pass: reference-inspired overrides, live-data safe ── */
:root {
  --bg:        oklch(0.195 0.022 258);
  --bg-deep:   oklch(0.160 0.018 260);
  --surface:   oklch(0.225 0.020 257);
  --surface-2: oklch(0.252 0.022 256);
  --surface-3: oklch(0.282 0.024 255);
  --line:      oklch(0.305 0.016 258);
  --line-2:    oklch(0.365 0.018 257);
  --bg-card:   oklch(0.225 0.020 257);
  --bg-card-hover: oklch(0.252 0.022 256);
  --border:    oklch(0.305 0.016 258);
  --euco:      #a78bfa;
}

body::before {
  background:
    radial-gradient(1400px 900px at 60% -14%, oklch(0.34 0.06 250 / .22), transparent 58%),
    radial-gradient(1000px 800px at -8% 36%, oklch(0.27 0.05 258 / .18), transparent 55%),
    radial-gradient(900px 700px at 108% 64%, oklch(0.26 0.05 252 / .16), transparent 55%),
    radial-gradient(1200px 800px at 70% -10%, oklch(0.25 0.04 80 / .14), transparent 58%);
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(520px 360px at 28% 30%, oklch(0.30 0.08 259 / .22), transparent 68%),
    radial-gradient(560px 380px at 78% 42%, oklch(0.24 0.07 278 / .18), transparent 70%),
    radial-gradient(460px 340px at 50% 82%, oklch(0.22 0.05 230 / .14), transparent 70%);
  filter: blur(32px);
  opacity: .82;
  animation: premium-field-drift 28s ease-in-out infinite alternate;
}

@keyframes premium-field-drift {
  from { transform: translate3d(-1%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}

header {
  background: color-mix(in oklab, #070c17 88%, transparent);
  border-bottom-color: rgba(148,178,218,.16);
  box-shadow: 0 1px 0 rgba(255,255,255,.025), 0 16px 42px rgba(0,0,0,.18);
}

.header-inner {
  max-width: 1280px;
  height: 58px;
}

.logo-stars {
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(91,116,156,.88), rgba(47,58,82,.94));
  border-color: rgba(201,215,238,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.logo-text strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .01em;
}

.logo-text span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .36em;
  opacity: .66;
}

.main-nav {
  gap: 10px;
}

.main-nav a {
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  color: rgba(231,238,249,.73);
  border: 1px solid transparent;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
}

.main-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.10);
  border-radius: 999px;
}

.nav-search-trigger {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  color: rgba(231,238,249,.76);
  background: rgba(255,255,255,.055);
  cursor: pointer;
  transition:
    color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    background var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-out);
}

.nav-search-trigger:hover,
.nav-search-trigger:focus-visible {
  color: #fff;
  border-color: rgba(255,177,118,.32);
  background: rgba(255,177,118,.10);
  transform: translateY(-1px);
}

.header-badge {
  display: none;
}

.lang-switcher {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.08);
  border-radius: 8px;
}

.lang-btn {
  font-size: 10px;
  padding: 4px 7px;
}

.lang-btn.active {
  background: rgba(226,232,240,.18);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}

.home-v2-title {
  font-size: clamp(62px, 8.2vw, 116px);
  max-width: 17ch;
  text-wrap: balance;
}
.home-v2-title em {
  color: #ffb176;
  font-style: italic;
}
.home-v2-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 60ch;
}

.command-layer {
  background: linear-gradient(180deg, var(--bg) 0%, oklch(0.175 0.022 260) 100%);
  border-bottom: 1px solid var(--line);
}
.command-layer-inner {
  max-width: 1100px;
  padding: 0 24px 38px;
}
.command-shell {
  height: 56px;
  max-width: 700px;
  padding: 0 18px 0 20px;
  gap: 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  box-shadow:
    0 2px 20px oklch(0 0 0 / .22),
    inset 0 1px 0 oklch(1 0 0 / .04);
  cursor: text;
  transition: border-color var(--t-base) var(--ease-out),
    background var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out),
    transform var(--t-fast) var(--ease-out);
}
.command-shell:hover,
.command-shell:focus-within {
  border-color: var(--line-2);
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow:
    0 6px 28px oklch(0 0 0 / .30),
    inset 0 1px 0 oklch(1 0 0 / .05);
}
.command-shell-placeholder {
  font-size: 15.5px;
  color: var(--ink-4);
}
.command-shell-kbd {
  border-color: var(--line-2);
  background: var(--bg-deep);
  color: var(--ink-4);
}
.command-bar {
  margin-top: 14px;
  gap: 14px;
}
.command-chip {
  padding: 7px 14px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink-3);
}
.command-chip:hover,
.command-chip:focus-visible {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.command-chip-hot,
.command-chip.is-active {
  color: oklch(0.20 0.04 55);
  border-color: color-mix(in oklab, #ffb176 52%, transparent);
  background: #f59d26;
  box-shadow: 0 8px 28px rgba(245,157,38,.16);
}
.command-chip-hot:hover,
.command-chip.is-active:hover,
.command-chip-hot:focus-visible,
.command-chip.is-active:focus-visible {
  color: oklch(0.16 0.03 55);
  background: #ffad3d;
  border-color: rgba(255,194,117,.72);
}

.institutions-dock {
  background: color-mix(in oklab, var(--bg-deep) 92%, transparent);
  border-bottom-color: var(--line);
}
.institutions-dock-inner {
  height: 46px;
}
.institutions-dock-cell {
  border: 1px solid transparent;
}
.institutions-dock-cell:hover,
.institutions-dock-cell:focus-visible {
  border-color: var(--line);
  background: var(--surface);
}
.institutions-dock-mark {
  border-radius: 3px;
  box-shadow: 0 0 8px color-mix(in oklab, currentColor 25%, transparent);
}

.featured-event-grid,
.active-file-card,
.ras-list,
.iis-grid {
  box-shadow: inset 0 1px 0 oklch(1 0 0 / .035);
}
.featured-event-grid {
  border-color: var(--line-2);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.featured-event-main {
  padding: 36px 40px 38px;
}
.fge-title {
  font-size: clamp(28px, 3.3vw, 42px);
  max-width: 22ch;
  text-wrap: balance;
}
.fge-summary {
  color: var(--text-secondary);
}
.featured-event-side {
  background:
    linear-gradient(180deg, rgba(255,255,255,.038), rgba(255,255,255,.016)),
    color-mix(in oklab, var(--surface) 78%, transparent);
}
.fge-dashboard-row {
  background: color-mix(in oklab, var(--surface-2) 78%, transparent);
}

.active-file-card {
  border-color: var(--line);
  background: var(--surface);
}
.active-file-card:hover,
.active-file-card:focus-within {
  border-color: var(--line-2);
  background: var(--surface-2);
}
.afc-title {
  font-size: 16px;
  line-height: 1.32;
}
.afc-summary {
  color: var(--text-secondary);
}
.afc-explain-toggle {
  background: var(--bg-deep);
  border-color: var(--line);
}
.afc-expanded {
  background:
    linear-gradient(180deg, rgba(255,255,255,.040), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface-2) 86%, transparent);
}

.ras-list {
  border-color: var(--line);
}
.ras-item {
  align-items: center;
  padding: 18px 22px;
  background: var(--surface);
  border-bottom-color: var(--line);
}
.ras-item:hover {
  background: var(--surface-2);
}
.ras-inst {
  width: auto;
  height: auto;
  display: inline-flex;
  place-items: initial;
  padding: 4px 8px 4px 5px;
  border-radius: 999px;
}
.ras-event {
  font-size: 14.5px;
}
.ras-context {
  color: var(--ink-3);
}
.ras-phase {
  border-radius: 6px;
  color: var(--brass);
  border-color: color-mix(in oklab, var(--brass) 32%, transparent);
  background: color-mix(in oklab, var(--brass-soft) 42%, transparent);
}

.iix-cell {
  background: var(--surface);
  border-color: var(--line);
}
.iix-cell:hover,
.iix-cell:focus-visible {
  background: var(--surface-2);
  border-color: var(--line-2);
}

@media (max-width: 760px) {
  .command-bar { display: none; }
  .command-shell { max-width: 100%; }
}

/* Homepage information architecture — product-first live stack */
#main-content {
  display: flex;
  flex-direction: column;
}
.home-v2-now { order: 0; }
.command-layer {
  order: 1;
  display: none;
}
.featured-governance-event { order: 2; }
.active-files-section { order: 3; }
.recent-activity-section { order: 4; }
.institution-index-section { order: 5; }

.command-layer-inner {
  align-items: center;
  padding-top: 30px;
  padding-bottom: 58px;
}

.home-v2-inner {
  max-width: 1180px;
  min-height: 72vh;
  padding: 104px 24px 68px;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-v2-eyebrow {
  justify-content: center;
  margin-bottom: 20px;
  color: #ffb176;
  letter-spacing: .28em;
}
.home-v2-title {
  font-size: clamp(46px, 6.2vw, 78px);
  line-height: .98;
  max-width: 18ch;
  margin: 0 auto 24px;
}
.home-v2-subtitle {
  max-width: 76ch;
  margin: 0 auto 38px;
  font-size: 15px;
  line-height: 1.65;
}
.home-v2-kpis {
  max-width: 780px;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.home-v2-kpi {
  min-height: 118px;
  padding: 22px 26px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  border: 1px solid rgba(148,178,218,.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
    color-mix(in oklab, var(--surface) 82%, transparent);
  box-shadow:
    0 18px 54px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.055);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    background 220ms var(--ease-out);
}
.home-v2-kpi:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(255,177,118,.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035)),
    color-mix(in oklab, var(--surface-2) 86%, transparent);
  box-shadow:
    0 24px 68px rgba(0,0,0,.32),
    0 0 42px rgba(91,157,255,.08),
    inset 0 1px 0 rgba(255,255,255,.07);
}
.home-v2-kpi-val {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 48px);
  line-height: .9;
}
.home-v2-kpi-label {
  margin-top: 6px;
  color: rgba(231,238,249,.72);
  font-size: 10px;
  letter-spacing: .20em;
}
.home-v2-kpi-meta {
  margin-top: 10px;
  color: rgba(176,193,220,.58);
  font-size: 10px;
  letter-spacing: .12em;
}
.home-v2-live-summary {
  max-width: 760px;
  margin-top: 30px;
  margin-bottom: 0;
  font-size: 14px;
  color: rgba(216,225,238,.68);
}
.command-shell {
  width: min(760px, 100%);
}
.command-bar {
  width: min(640px, 100%);
  justify-content: center;
}
.command-live {
  display: none;
}

.weekly-digest-section {
  order: 1.5;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,177,118,.055), transparent 34%),
    linear-gradient(180deg, oklch(0.174 0.022 260), oklch(0.158 0.018 260) 72%, var(--bg));
  border-bottom: 0;
}
.weekly-digest-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 34px;
}
.weekly-digest-head {
  display: block;
  margin-bottom: 16px;
}
.weekly-digest-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  width: min(620px, 100%);
  margin: 18px auto 0;
  padding: 10px;
  border: 1px solid color-mix(in oklab, var(--line) 86%, #ffb176);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface) 84%, transparent);
  transition: border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.weekly-digest-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  transition: opacity .22s ease, transform .22s ease, max-height .22s ease;
}
.weekly-digest-form label span {
  font: 700 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffb176;
}
.weekly-digest-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: color-mix(in oklab, var(--bg-deep) 86%, transparent);
  color: var(--text);
}
.weekly-digest-form input[aria-invalid="true"] {
  border-color: color-mix(in oklab, #ff6b6b 58%, var(--line));
}
.weekly-digest-form button {
  align-self: end;
  height: 34px;
  border: 1px solid color-mix(in oklab, #ffb176 38%, var(--line));
  border-radius: 999px;
  padding: 0 12px;
  background: color-mix(in oklab, #ffb176 14%, transparent);
  color: var(--text);
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.weekly-digest-form button:disabled {
  cursor: default;
  opacity: .86;
}
.weekly-digest-form p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
  transition: color .2s ease;
}
.weekly-digest-form.is-submitting {
  border-color: color-mix(in oklab, #ffb176 58%, var(--line));
  box-shadow: 0 0 0 1px rgba(255,177,118,.08), 0 18px 54px rgba(0,0,0,.2);
}
.weekly-digest-form.is-saved {
  grid-template-columns: auto 1fr;
  border-color: color-mix(in oklab, #7bd88f 44%, var(--line));
  background:
    linear-gradient(180deg, rgba(123,216,143,.08), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface) 86%, transparent);
}
.weekly-digest-form.is-saved label {
  display: none;
}
.weekly-digest-form.is-saved button {
  align-self: center;
  border-color: color-mix(in oklab, #7bd88f 48%, var(--line));
  background: color-mix(in oklab, #7bd88f 16%, transparent);
  color: color-mix(in oklab, #7bd88f 76%, var(--text));
}
.weekly-digest-form.is-saved p {
  grid-column: auto;
  align-self: center;
  color: color-mix(in oklab, #7bd88f 62%, var(--muted));
}
.weekly-digest-eyebrow,
.impact-profile-eyebrow {
  display: block;
  font: 600 10px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #ffb176;
}
.weekly-digest-head h2 {
  margin: 6px 0 0;
  font: 400 28px/1.05 var(--serif);
  color: var(--text);
}
.weekly-digest-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.weekly-digest-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  box-shadow:
    0 18px 46px rgba(4,10,22,.12),
    inset 0 1px 0 rgba(255,255,255,.045);
  transition: transform var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), background var(--t-base) var(--ease-out);
}
.weekly-digest-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, #ffb176 26%, var(--line));
  background: color-mix(in oklab, var(--surface-2) 86%, transparent);
}
.weekly-digest-item-muted {
  opacity: .72;
  border-style: dashed;
}
.weekly-digest-item-muted:hover {
  opacity: .9;
}
.weekly-digest-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: #ffb176;
  box-shadow: 0 0 18px rgba(255,177,118,.24);
}
.weekly-digest-item h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}
.weekly-digest-item p {
  margin: 8px 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 32rem;
}
.weekly-digest-next {
  color: rgba(232,238,248,.74) !important;
}
.weekly-digest-next strong {
  color: #ffb176;
  font: 700 10px/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.weekly-digest-item a {
  grid-column: 2;
  align-self: end;
  width: fit-content;
  font: 600 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffb176;
  text-decoration: none;
}
.weekly-digest-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: color-mix(in oklab, var(--surface) 82%, transparent);
}

.p1-tools-section {
  order: 1.75;
  background:
    radial-gradient(circle at 82% 0%, rgba(102,166,255,.045), transparent 34%),
    linear-gradient(180deg, var(--bg), oklch(0.168 0.020 260) 62%, var(--bg));
  border-bottom: 0;
}
.p1-tools-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 46px;
}
.p1-tools-head {
  max-width: 720px;
  margin-bottom: 18px;
}
.p1-tools-eyebrow {
  display: block;
  font: 600 10px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #ffb176;
}
.p1-tools-head h2 {
  margin: 7px 0 8px;
  font: 400 clamp(26px, 3.4vw, 38px)/1.08 var(--serif);
  color: var(--text);
}
.p1-tools-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.p1-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.p1-tool-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface) 86%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
  transition: transform var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), background var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.p1-tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  background:
    linear-gradient(180deg, rgba(255,255,255,.058), rgba(255,255,255,.022)),
    color-mix(in oklab, var(--surface-2) 86%, transparent);
  box-shadow:
    0 18px 48px rgba(4,10,22,.16),
    inset 0 1px 0 rgba(255,255,255,.052);
}
.p1-tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.p1-tool-status,
.p1-tool-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  font: 700 9.5px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.p1-tool-status.is-live {
  color: oklch(0.84 0.14 145);
  border: 1px solid oklch(0.68 0.16 145 / .32);
  background: oklch(0.35 0.08 145 / .16);
}
.p1-tool-status.is-gated {
  color: #ffb176;
  border: 1px solid rgba(255,177,118,.28);
  background: rgba(255,177,118,.08);
}
.p1-tool-count {
  color: var(--ink-4);
  background: var(--bg-deep);
  border: 1px solid var(--line);
}
.p1-tool-card h3 {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.25;
  color: var(--text);
}
.p1-tool-card[data-p1-tool="consultations"] {
  border-color: color-mix(in oklab, #ffb176 28%, var(--line));
}
.p1-tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.p1-tool-action {
  margin-top: auto;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--bg-deep);
  text-decoration: none;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.p1-tool-action.is-disabled {
  color: var(--ink-4);
  cursor: default;
}
.p1-qmv-panel {
  display: grid;
  grid-template-columns: minmax(260px, .78fr) minmax(320px, 1fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid color-mix(in oklab, var(--line) 84%, #ffb176);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,177,118,.055), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.044), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface) 88%, transparent);
  box-shadow: 0 18px 54px rgba(4,10,22,.14), inset 0 1px 0 rgba(255,255,255,.045);
}
.p1-qmv-copy h3 {
  margin: 6px 0 7px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}
.p1-qmv-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.p1-qmv-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-self: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in oklab, var(--bg-deep) 74%, transparent);
}
.p1-qmv-result.is-pass {
  border-color: color-mix(in oklab, oklch(0.72 0.16 145) 34%, var(--line));
  background: color-mix(in oklab, oklch(0.28 0.08 145) 24%, var(--bg-deep));
}
.p1-qmv-result div {
  display: grid;
  gap: 4px;
}
.p1-qmv-result strong {
  color: var(--text);
  font: 600 24px/1 var(--serif);
}
.p1-qmv-result span,
.p1-qmv-result small {
  color: var(--ink-4);
  font: 700 10px/1.25 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.p1-qmv-result p,
.p1-qmv-result small {
  grid-column: 1 / -1;
  margin: 0;
}
.p1-qmv-result p {
  color: rgba(232,238,248,.84);
  font-size: 13px;
  line-height: 1.4;
}
.p1-qmv-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}
.p1-qmv-actions button,
.p1-qmv-grid button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg-deep) 82%, transparent);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.p1-qmv-actions button {
  padding: 8px 10px;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.p1-qmv-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
}
.p1-qmv-grid button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 6px 8px;
  text-align: left;
}
.p1-qmv-grid button:hover,
.p1-qmv-actions button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklab, #ffb176 34%, var(--line));
  color: var(--text);
}
.p1-qmv-grid button[aria-pressed="true"] {
  color: oklch(0.20 0.04 55);
  border-color: color-mix(in oklab, #ffb176 62%, transparent);
  background: #f59d26;
}
.p1-qmv-grid strong {
  font: 800 11px/1 var(--mono);
  letter-spacing: .08em;
}
.p1-qmv-grid .eu-country-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
}
.eu-country-flag {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,.22), transparent 42%),
    color-mix(in oklab, var(--surface-2) 76%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 8px 18px rgba(4,10,22,.18);
  font-size: 17px;
}
.eu-country-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.p1-trilogue-tracker {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.046), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface) 88%, transparent);
  box-shadow: 0 18px 54px rgba(4,10,22,.15), inset 0 1px 0 rgba(255,255,255,.045);
}
.p1-trilogue-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.p1-trilogue-head h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}
.p1-trilogue-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.p1-trilogue-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  padding: 14px;
  border: 1px solid color-mix(in oklab, var(--line) 86%, #66a6ff);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.042), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface) 88%, transparent);
  box-shadow:
    0 16px 38px rgba(4,10,22,.12),
    inset 0 1px 0 rgba(255,255,255,.045);
}
.p1-consultation-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid color-mix(in oklab, var(--line) 86%, #f59d26);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.044), rgba(255,255,255,.020)),
    color-mix(in oklab, var(--surface) 90%, transparent);
  box-shadow:
    0 16px 38px rgba(4,10,22,.12),
    inset 0 1px 0 rgba(255,255,255,.045);
}
.p1-consultation-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.28;
}
.p1-consultation-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.p1-consultation-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}
.p1-consultation-meta div {
  display: grid;
  gap: 3px;
}
.p1-consultation-meta dt {
  margin: 0;
  color: #ffb176;
  font: 700 10px/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.p1-consultation-meta dd {
  margin: 0;
  color: rgba(216,225,238,.78);
  font-size: 12.5px;
  line-height: 1.42;
}
.p1-trilogue-top,
.p1-trilogue-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.p1-trilogue-date,
.p1-trilogue-foot {
  color: var(--ink-4);
  font: 600 10px/1.25 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.p1-trilogue-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.28;
}
.p1-trilogue-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.p1-trilogue-next {
  margin-top: auto;
  padding: 10px;
  border-radius: 12px;
  background: color-mix(in oklab, #66a6ff 8%, transparent);
  border: 1px solid color-mix(in oklab, #66a6ff 20%, transparent);
}
.p1-trilogue-next strong {
  display: block;
  margin-bottom: 5px;
  color: #9cc5ff;
  font: 700 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.p1-trilogue-next span {
  color: rgba(232,238,248,.82);
  font-size: 12.5px;
  line-height: 1.42;
}
.p1-trilogue-foot {
  padding-top: 2px;
}
.p1-trilogue-foot a {
  color: var(--text);
  text-decoration: none;
}
.p1-trilogue-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid color-mix(in oklab, var(--line) 82%, #ffb176);
  border-radius: 14px;
  color: rgba(216,225,238,.76);
  background:
    linear-gradient(180deg, rgba(255,255,255,.034), rgba(255,255,255,.016)),
    color-mix(in oklab, var(--surface) 82%, transparent);
}
.p1-trilogue-compact {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(160px, 1fr);
  align-items: center;
  gap: 8px 18px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid color-mix(in oklab, var(--line) 82%, #66a6ff);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.032), rgba(255,255,255,.014)),
    color-mix(in oklab, var(--surface) 84%, transparent);
}
.p1-trilogue-compact .p1-tools-eyebrow {
  grid-column: 1 / -1;
}
.p1-trilogue-compact strong {
  color: var(--text);
  font-size: 15px;
}
.p1-trilogue-compact p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.p2-tools-section {
  display: none;
}
.p2-tools-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 24px 46px;
}
.p2-tools-head {
  max-width: 760px;
  margin-bottom: 18px;
}
.p2-tools-head h2 {
  margin: 7px 0 8px;
  font: 400 clamp(26px, 3.2vw, 38px)/1.08 var(--serif);
  color: var(--text);
}
.p2-tools-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.p2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, .82fr));
  gap: 12px;
}
.p2-country-card,
.p2-lens-card,
.p2-export-card,
.p2-pwa-card,
.p2-topic-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.044), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface) 87%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
.p2-country-card {
  grid-row: span 2;
}
.p2-card-kicker {
  display: block;
  margin-bottom: 8px;
  color: #ffb176;
  font: 700 10px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.p2-grid h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.22;
}
.p2-grid p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.p2-lens-card strong {
  display: block;
  color: rgba(232,238,248,.86);
  font-size: 13px;
  line-height: 1.45;
}
.p2-lens-files {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.p2-lens-files > span {
  color: #ffb176;
  font: 800 10px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.p2-lens-files a {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid color-mix(in oklab, var(--line) 78%, #66a6ff);
  border-radius: 12px;
  background: color-mix(in oklab, #66a6ff 6%, transparent);
  color: rgba(232,238,248,.9);
  text-decoration: none;
}
.p2-lens-files a:hover,
.p2-lens-files a:focus-visible {
  border-color: color-mix(in oklab, #ffb176 42%, var(--line));
}
.p2-lens-files a strong {
  font-size: 12.5px;
}
.p2-lens-files a small {
  color: rgba(168,183,205,.76);
  font-size: 11px;
}
.p2-country-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 12px;
}
.p2-country-grid button,
.p2-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg-deep) 82%, transparent);
  color: var(--muted);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.p2-country-grid button {
  display: inline-grid;
  place-items: center;
  min-height: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  text-align: center;
}
.p2-country-grid button:hover,
.p2-actions button:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: color-mix(in oklab, #ffb176 34%, var(--line));
}
.p2-country-grid button[aria-pressed="true"] {
  color: oklch(0.20 0.04 55);
  border-color: color-mix(in oklab, #ffb176 62%, transparent);
  background: #f59d26;
}
.p2-country-grid strong {
  font: 800 10.5px/1 var(--mono);
  letter-spacing: .08em;
}
.p2-country-grid .eu-country-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.p2-country-grid .eu-country-copy {
  display: none;
}
.p2-honest-note {
  margin-top: 12px !important;
  padding: 10px;
  border: 1px solid color-mix(in oklab, var(--line) 82%, #66a6ff);
  border-radius: 12px;
  background: color-mix(in oklab, #66a6ff 7%, transparent);
  color: rgba(216,225,238,.76) !important;
}
.p2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.p2-actions button {
  padding: 8px 10px;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.p2-topic-card a {
  display: block;
  margin-top: 8px;
  color: rgba(232,238,248,.86);
  text-decoration: none;
  font-size: 12.5px;
  line-height: 1.4;
}
.p2-topic-card a:hover {
  color: #ffb176;
}

.impact-profile-panel {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.6fr) auto;
  gap: 18px;
  align-items: center;
  margin: 16px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    color-mix(in oklab, var(--surface) 86%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
.impact-profile-copy strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 15px;
}
.impact-profile-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.impact-profile-current {
  width: fit-content;
  margin-top: 9px !important;
  padding: 6px 8px;
  border: 1px solid color-mix(in oklab, #ffb176 20%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, #ffb176 8%, transparent);
  color: rgba(232,238,248,.78) !important;
  font: 700 10px/1 var(--mono) !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.impact-profile-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.impact-profile-field span,
.impact-profile-level legend {
  display: block;
  margin-bottom: 6px;
  font: 600 10px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.impact-profile-field select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-deep) url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%238ea3c0'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='6%209%2012%2015%2018%209'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--text);
  padding: 0 32px 0 10px;
  font: 500 12px/1 var(--sans);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.impact-profile-field select:hover {
  border-color: var(--line-2);
}
.impact-profile-field select:focus-visible {
  outline: none;
  border-color: color-mix(in oklab, #ffb176 58%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, #f59d26 22%, transparent);
}
.impact-profile-level {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.impact-profile-level legend {
  width: 100%;
}
.impact-profile-level button,
.afc-watch {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.impact-profile-level button {
  height: 36px;
  padding: 0 10px;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.impact-profile-level button[aria-pressed="true"],
.afc-watch[aria-pressed="true"] {
  color: oklch(0.20 0.04 55);
  border-color: color-mix(in oklab, #ffb176 58%, transparent);
  background: #f59d26;
}
.impact-profile-saved {
  font: 600 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(176,193,220,.55);
  white-space: nowrap;
}
.afc-watch {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  max-width: 104px;
  padding: 0 9px;
  font: 700 9px/1 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.afc-watch span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.afc-watch svg {
  width: 12px;
  height: 12px;
}
.afc-personal {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid color-mix(in oklab, #ffb176 22%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, #ffb176 8%, transparent);
  color: rgba(232,238,248,.82);
  font-size: 12.5px;
  line-height: 1.5;
}
.afc-personal strong {
  color: #ffb176;
}
body[data-explanation-level="simple"] .afc-detail-detailed,
body[data-explanation-level="simple"] .fge-detail-detailed {
  display: none;
}

@media (max-width: 760px) {
  .home-v2-inner {
    padding: 54px 18px 28px;
  }
  .home-v2-title {
    font-size: clamp(38px, 12vw, 56px);
  }
  .home-v2-kpis {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .home-v2-kpi {
    min-height: 108px;
    padding: 20px 22px;
  }
  .home-v2-live-summary {
    margin-top: 28px;
  }
  .weekly-digest-list,
  .p1-trilogue-list,
  .p1-tools-grid,
  .impact-profile-panel,
  .impact-profile-controls {
    grid-template-columns: 1fr;
  }
  .weekly-digest-inner {
    padding: 0 18px 28px;
  }
  .p1-tools-inner {
    padding: 0 18px 34px;
  }
  .impact-profile-saved {
    white-space: normal;
  }
  .afc-watch {
    position: static;
    width: max-content;
    margin: 8px 0 0;
  }
  .active-file-card .afc-meta,
  .active-file-card .afc-category,
  .active-file-card .afc-title {
    padding-right: 0;
  }
}

.fge-inner {
  max-width: 1080px;
  padding: 28px 24px 34px;
}
.fge-eyebrow {
  margin-bottom: 14px;
}
.featured-event-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
}
.featured-event-main {
  padding: 28px 32px 30px;
  gap: 10px;
}
.featured-event-side {
  padding: 24px;
}
.fge-title {
  font-size: clamp(26px, 3vw, 38px);
  max-width: 26ch;
}

.afs-inner {
  max-width: 1180px;
  padding: 36px 24px 42px;
}
.afs-head {
  margin-bottom: 20px;
}
.afs-cards {
  gap: 14px;
}
.active-file-card {
  min-height: 264px;
}
.afc-title {
  font-size: 17px;
}
.afc-foot {
  margin-top: auto;
}

@media (max-width: 860px) {
  .weekly-digest-head {
    align-items: stretch;
    flex-direction: column;
  }
  .weekly-digest-form,
  .p1-qmv-panel {
    width: 100%;
  }
  .p1-qmv-panel {
    grid-template-columns: 1fr;
  }
  .p1-qmv-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .p2-grid {
    grid-template-columns: 1fr;
  }
  .p2-country-card {
    grid-row: auto;
  }
  .p2-country-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .featured-event-grid {
    grid-template-columns: 1fr;
  }
  .featured-event-main {
    padding: 32px 28px;
  }
  .featured-event-side {
    padding: 28px;
  }
}


/* ── Source-state badges (feed validation layer) ── */
.source-state-badge {
  display: inline-block;
  margin-left: auto;
  font: 600 9.5px/1 monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}
.source-state-prototype {
  color: rgba(143,163,192,.5);
  border-color: rgba(143,163,192,.14);
  background: rgba(143,163,192,.06);
}
.source-state-verified {
  color: var(--brass);
  border-color: oklch(0.83 0.10 80 / 0.22);
  background: oklch(0.83 0.10 80 / 0.06);
}

/* Featured event — disabled institution link */
.fge-details-btn[data-disabled-link="true"] {
  cursor: default;
  opacity: .35;
  pointer-events: none;
  text-decoration: none;
}

/* Legal and trust pages */
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 88px 24px 72px;
}
.legal-hero {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 34px;
}
.legal-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.legal-hero h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(38px, 7vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.legal-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}
.legal-updated {
  font: 600 12px/1.5 var(--mono);
  letter-spacing: 0.05em;
}
.legal-section {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.legal-section h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}
.legal-section p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}
.footer-v2-data-status {
  color: var(--muted);
  font: 600 12px/1.5 var(--sans);
  text-decoration: none;
}
.footer-v2-data-status:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE LAYER — the single consolidated ≤640px system.
   Every phone rule lives here; do not add new max-width blocks below 640px
   elsewhere in this file.

   System:
   · spacing scale 4px: 8 / 12 / 16 / 24 / 32 / 40 / 48
   · page gutter 20px + iPhone safe-area  (--mob-pad-l / --mob-pad-r)
   · section padding 40px top & bottom · card padding 20px · card gap 16px
   · type: body 16/1.5 · meta 12–13 · card titles 18/600 · section H2 26/1.2
     · hero H1 36–40/1.15 · nothing smaller than 12px
   · tap targets ≥44px
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --mob-pad-l: max(20px, env(safe-area-inset-left));
    --mob-pad-r: max(20px, env(safe-area-inset-right));
  }

  /* ── Base type & overflow guards ── */
  body { font-size: 16px; line-height: 1.5; overflow-x: hidden; }
  .container, main { max-width: 100%; overflow-x: hidden; }

  /* ── Header ── */
  header { padding: 0 var(--mob-pad-r) 0 var(--mob-pad-l); }
  .header-inner { height: 56px; gap: 12px; }
  .logo-stars { font-size: 12px; padding: 4px 7px; }
  .logo-text strong { font-size: 15px; }
  .logo-text span, .header-badge { display: none; }
  .header-right { gap: 8px; }
  .lang-switcher { padding: 0; gap: 2px; background: transparent; border: 0; }
  .lang-btn {
    display: inline-flex; align-items: center;
    min-height: 44px; padding: 0 9px;
    font-size: 12px; letter-spacing: .3px; border-radius: 8px;
  }
  .lang-btn.active { border-color: transparent; }
  .burger { min-width: 44px; min-height: 44px; }
  .nav-search-trigger { min-width: 44px; min-height: 44px; }

  /* Institution tab bar (institution pages) */
  .header-nav-inner { padding: 0 var(--mob-pad-r) 0 var(--mob-pad-l); -webkit-overflow-scrolling: touch; }
  .header-nav-inner a {
    display: inline-flex; align-items: center;
    min-height: 44px; padding: 0 12px; font-size: 12px;
  }

  /* ── Institutions dock (sticky rail under the header) ── */
  .institutions-dock-inner { padding: 0 0 0 var(--mob-pad-l); height: 48px; gap: 0; }
  .institutions-dock-label,
  .institutions-dock-name { display: none; }
  .institutions-dock-rail {
    -webkit-overflow-scrolling: touch;
    padding-right: var(--mob-pad-r);
    scroll-padding-right: 16px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
  }
  .institutions-dock-cell { min-height: 44px; padding: 0 12px; gap: 6px; }
  .institutions-dock-code { font-size: 12px; }
  .institutions-dock-count { display: none; }

  /* ── Signal ticker ── */
  .signal-rail-inner { padding: 0 var(--mob-pad-r) 0 var(--mob-pad-l); height: 40px; }
  .signal-items { gap: 12px; }
  .signal-inst { font-size: 12px; }
  .signal-text { font-size: 12px; }
  .signal-meta { display: none; }
  .signal-item:nth-child(n+4) { display: none; }
  .signal-sep:nth-child(n+3) { display: none; }

  /* ── Hero ── */
  .home-v2-inner {
    min-height: auto;
    padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l);
  }
  .home-v2-eyebrow { font-size: 12px; letter-spacing: .18em; margin-bottom: 16px; }
  .home-v2-title {
    font-size: clamp(36px, 10vw, 40px);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 auto 16px;
  }
  .home-v2-subtitle { font-size: 16px; line-height: 1.5; margin: 0 auto 24px; }
  /* KPI cards: 3 per row, equal height (grid stretch), readable numbers.
     !important beats the `1fr !important` in the ≤760px tablet block. */
  .home-v2-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; }
  .home-v2-kpi { min-height: 0; padding: 16px 12px; gap: 4px; border-radius: 12px; }
  .home-v2-kpi-val { font-size: clamp(26px, 8vw, 32px); line-height: 1; }
  .home-v2-kpi-val small { font-size: 12px; }
  .home-v2-kpi-label { margin-top: 6px; font-size: 12px; letter-spacing: .05em; line-height: 1.35; }
  .home-v2-kpi-meta { display: none; }
  .home-v2-live-summary { margin-top: 24px; font-size: 13px; line-height: 1.5; }

  /* ── Search layer (pages where it is visible) & command palette ── */
  .command-layer-inner { padding: 16px var(--mob-pad-r) 24px var(--mob-pad-l); }
  .command-shell { height: 48px; padding: 0 16px; border-radius: 12px; }
  .command-shell-placeholder { font-size: 15px; }
  .command-shell-kbd { display: none; }
  .command-palette-backdrop {
    padding-top: 8vh;
    padding-left: var(--mob-pad-l);
    padding-right: var(--mob-pad-r);
  }
  .command-palette { border-radius: 14px; }
  .cp-item-meta { display: none; }

  /* ── Featured governance event ── */
  .fge-inner { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .fge-eyebrow { font-size: 12px; margin-bottom: 12px; }
  .featured-event-main { padding: 20px; gap: 12px; }
  .featured-event-side { padding: 20px; }
  .fge-title { font-size: 26px; line-height: 1.2; }
  .fge-summary {
    font-size: 16px; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  }
  .fge-status-pill, .fge-inst-chip { height: 26px; font-size: 12px; }
  .fge-category { font-size: 12px; }
  .fge-proc { font-size: 12px; }
  .fge-details-btn { height: 44px; padding: 0 20px; font-size: 12px; }
  .fge-tl-label { font-size: 12px; }
  .fge-tl-name { font-size: 14px; }
  .fge-tl-meta { font-size: 12px; }
  .fge-dashboard-row span { font-size: 12px; }
  .fge-dashboard-row strong { font-size: 12px; }
  .fge-latest-item { font-size: 14px; line-height: 1.5; }
  .fge-latest-item small { font-size: 12px; }
  .fge-metric { padding: 12px; }
  .fge-metric-val { font-size: 22px; }
  .fge-metric-label { font-size: 12px; line-height: 1.35; }
  .fge-foot { font-size: 12px; line-height: 1.4; }

  /* ── Active files ── */
  .afs-inner { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .afs-head { margin-bottom: 16px; gap: 16px; }
  .afs-eyebrow { font-size: 12px; }
  .afs-title { font-size: 26px; line-height: 1.2; }
  .afs-filter { min-height: 44px; height: auto; padding: 0 16px; font-size: 12px; }
  .afs-toolbar { padding: 8px 12px; }
  .afs-toolbar-count { font-size: 12px; }
  .afs-sort-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 12px; }
  .afs-cards { grid-template-columns: 1fr; gap: 16px; }
  .active-file-card { min-height: 0; padding: 20px; gap: 12px; border-radius: 14px; }
  .afc-meta { padding-right: 0; min-height: 0; }
  .afc-watch {
    position: static;
    width: max-content; max-width: none;
    margin: 8px 0 0;
    min-height: 44px; padding: 0 14px;
    font-size: 12px;
  }
  .active-file-card .afc-meta,
  .active-file-card .afc-category,
  .active-file-card .afc-title { padding-right: 0; }
  .afc-inst-chip { height: 26px; font-size: 12px; }
  .afc-status { height: 26px; font-size: 12px; }
  .afc-live-note { font-size: 12px; padding: 3px 8px; }
  .afc-category { font-size: 12px; }
  .afc-title { font-size: 18px; font-weight: 600; line-height: 1.35; }
  .afc-summary {
    font-size: 16px; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  }
  .afc-expanded .afc-summary {
    display: grid;
    -webkit-line-clamp: none; line-clamp: none;
    overflow: visible;
  }
  .afc-expanded .afc-summary strong { font-size: 13px; }
  .afc-explain-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: 12px; }
  .afc-personal { font-size: 13px; }
  .afc-tl-name { font-size: 14px; }
  .afc-tl-meta { font-size: 12px; }
  .afc-metric-val { font-size: 18px; }
  .afc-metric-label { font-size: 12px; line-height: 1.35; }
  .afc-foot { font-size: 12px; line-height: 1.4; }

  /* ── Recent activity ── */
  .ras-inner { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .ras-head { margin-bottom: 16px; }
  .ras-eyebrow { font-size: 12px; }
  .ras-title { font-size: 26px; line-height: 1.2; }
  .ras-item { padding: 16px 20px; gap: 12px; }
  .ras-time { font-size: 12px; }
  .ras-inst { font-size: 12px; }
  .ras-event { font-size: 16px; line-height: 1.4; }
  .ras-context {
    font-size: 13px; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  }
  .ras-insight { font-size: 13px; line-height: 1.5; padding: 8px 10px; }
  .ras-insight strong { font-size: 12px; }
  .ras-source { font-size: 12px; }
  .ras-phase, .ras-badge { font-size: 12px; }

  /* ── Calendar rail ── */
  .crs-inner { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }

  /* ── Institution index ── */
  .iis-inner { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .iis-head { margin-bottom: 16px; }
  .iis-eyebrow { font-size: 12px; }
  .iis-title { font-size: 26px; line-height: 1.2; }
  .iis-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .iix-cell { padding: 16px; gap: 8px; }
  .iix-code { font-size: 12px; }
  .iix-name { font-size: 14px; }
  .iix-stats { font-size: 12px; }
  .iix-status { font-size: 12px; line-height: 1.4; }
  .iix-arrow { font-size: 12px; }

  /* ── Footer (v2) ── */
  .footer-v2-cap-inner { padding: 16px var(--mob-pad-r) 16px var(--mob-pad-l); font-size: 12px; }
  .footer-v2-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l);
  }
  .footer-v2-brand { grid-column: 1 / -1; }
  .footer-v2-brand-desc { font-size: 13px; }
  .footer-v2-beta { font-size: 12px; }
  .footer-v2-col { gap: 0; }
  .footer-v2-col-label { font-size: 12px; margin-bottom: 8px; }
  .footer-v2-link { font-size: 14px; padding: 12px 0; }
  .footer-v2-status-inner { padding: 16px var(--mob-pad-r) 16px var(--mob-pad-l); gap: 12px; }
  .footer-v2-verified { font-size: 12px; }
  .footer-v2-copy { font-size: 12px; margin-left: 0; }
  .footer-v2-link-quiet { font-size: 12px; }
  /* Legacy footer (static pages) */
  .footer-inner { flex-direction: column; gap: 32px; padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }

  /* ── Feed collapse — hide overflow cards + "Show all (N)" toggle (JS-driven).
       Scoped to ≤640px so desktop never hides cards or shows the button. ── */
  .feed-collapsed-hidden { display: none !important; }
  .feed-show-more {
    display: block;
    width: 100%;
    margin: 16px 0 0;
    min-height: 48px;
    padding: 14px 16px;
    font: 600 12px/1 var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text);
    background: color-mix(in oklab, var(--surface) 85%, transparent);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
  }
  .feed-show-more[hidden] { display: none; }
  .feed-show-more:hover { border-color: var(--line-2); background: color-mix(in oklab, var(--surface-2) 88%, transparent); }
  .feed-show-more:focus-visible { outline: 2px solid var(--line-2); outline-offset: 2px; }

  /* ── Weekly digest ── */
  .weekly-digest-inner { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .weekly-digest-head h2 { font-size: 26px; line-height: 1.2; }
  .weekly-digest-list { gap: 16px; }
  .weekly-digest-item { min-height: 0; padding: 20px; border-radius: 14px; }
  .weekly-digest-item h3 { font-size: 16px; line-height: 1.35; }
  .weekly-digest-item p {
    font-size: 16px; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  }
  .weekly-digest-item a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
  .weekly-digest-form { padding: 12px; }
  .weekly-digest-form label span { font-size: 12px; }
  .weekly-digest-form input { height: 48px; font-size: 16px; }
  .weekly-digest-form button { height: 48px; padding: 0 16px; font-size: 12px; }
  .weekly-digest-form p { font-size: 12px; line-height: 1.4; }

  /* ── Tools hub (trilogues, consultations, QMV) ── */
  .p1-tools-inner { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .p1-tools-head { margin-bottom: 16px; }
  .p1-tools-head h2 { font-size: 26px; line-height: 1.2; }
  .p1-tools-head p { font-size: 14px; line-height: 1.5; }
  .p1-tool-card { min-height: 0; padding: 20px; border-radius: 14px; }
  .p1-trilogue-head { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 12px; }
  .p1-trilogue-head h3 { font-size: 20px; line-height: 1.2; }
  .p1-trilogue-card,
  .p1-consultation-card { min-height: 0; padding: 20px; border-radius: 14px; }
  .p1-trilogue-card h3,
  .p1-consultation-card h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }
  .p1-trilogue-card p,
  .p1-consultation-card p {
    font-size: 16px; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  }
  .p1-consultation-meta { gap: 8px; }
  .p1-consultation-meta dt { font-size: 12px; }
  .p1-consultation-meta dd {
    font-size: 14px; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  }
  .p1-consultation-card .p1-trilogue-foot span { display: none; }
  .p1-trilogue-next strong { font-size: 12px; }
  .p1-trilogue-next span { font-size: 14px; line-height: 1.5; }
  .p1-trilogue-foot { font-size: 12px; line-height: 1.3; }
  .p1-trilogue-compact strong { font-size: 16px; }
  .p1-trilogue-compact p { font-size: 14px; line-height: 1.5; }
  .p1-qmv-panel { padding: 16px; }
  .p1-qmv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p2-tools-inner { padding-left: var(--mob-pad-l); padding-right: var(--mob-pad-r); }
  .p2-country-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* ── Legacy hero + card sections (static & institution pages) ── */
  .hero { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .hero h1 { font-size: 36px; line-height: 1.15; letter-spacing: -.3px; }
  .hero > p { font-size: 16px; line-height: 1.5; margin-bottom: 24px; }
  .hero-stats { gap: 24px; }
  .hero-stat strong { font-size: 26px; }
  .static-hero { padding: 40px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .static-hero h1 { font-size: 30px; line-height: 1.2; }
  .inst-overview-grid { grid-template-columns: 1fr; }
  main.index-main { padding: 24px var(--mob-pad-r) 40px var(--mob-pad-l); }
  .section { margin-bottom: 40px; }
  .section-top { padding: 12px 16px; margin-bottom: 12px; }
  .section-icon { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
  .section-title { gap: 8px; }
  .section-title h2 { font-size: 16px; }
  .section-title p { font-size: 12px; }
  .section-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 12px; }
  .cards { gap: 16px; }
  .card { padding: 20px; gap: 12px; }
  .card h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }
  .card p { font-size: 16px; line-height: 1.5; }
  .card-date { font-size: 12px; }
  .tag { font-size: 12px; padding: 4px 8px; }
  .vote-bar-label { font-size: 12px; }
  .vote-bar-track { height: 6px; }
  details.card-details summary { display: flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 13px; }
  details.card-details .detail-body { font-size: 14px; line-height: 1.6; }
  .impact-label { font-size: 12px; }
  .impact-text { font-size: 13px; }
  .why-matters { font-size: 14px; line-height: 1.6; }

  /* ── Live tool widgets (QMV calculator, impact profile, source badges) ── */
  .weekly-digest-eyebrow, .p1-tools-eyebrow { font-size: 12px; }
  .weekly-digest-next strong { font-size: 12px; }
  .p1-tool-status { font-size: 12px; }
  .p1-tool-count { font-size: 12px; }
  .p1-tool-action { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
  .p1-trilogue-date { font-size: 12px; }
  .p1-qmv-result span,
  .p1-qmv-result small { font-size: 12px; }
  .p1-qmv-actions button { min-height: 44px; padding: 0 16px; font-size: 12px; }
  .eu-country-copy strong { font-size: 12px; }
  .p1-qmv-grid .eu-country-copy > span,
  .p2-country-grid .eu-country-copy > span { font-size: 12px; }
  .source-state-badge { font-size: 12px; }
  .impact-profile-eyebrow, .impact-profile-saved { font-size: 12px; }
  /* base uses `font: 700 10px !important` — must counter with !important */
  .impact-profile-copy p.impact-profile-current { font-size: 12px !important; }
  .impact-profile-field span { font-size: 12px; }
  .impact-profile-level legend { font-size: 12px; }
  .impact-profile-level button { min-height: 44px; font-size: 12px; }
  .cp-esc-badge { font-size: 12px; }
}
