/*
Theme Name: ElectIndex
Theme URI: https://electionindex.com
Author: ElectIndex
Description: Lightweight, fast, data-forward block theme for ElectIndex. Light/dark toggle, brand navy + red, zero dependencies.
Version: 1.9.101
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: electindex
*/

/* ============================================================
   Design tokens — semantic vars drive light/dark via [data-theme]
   ============================================================ */
:root {
  --ei-navy: #1b4b8f;
  --ei-navy-deep: #122a4f;
  --ei-red: #e0241f;
  --ei-green: #16a34a;
  --ei-ind: #7a4fb5; /* independents (Osborn, etc.) — purple, brightens in dark */

  /* Premium gold — The ElectIndex Brief (paid) badges, flags, paywall accents. */
  --ei-gold-ink: #8a5a00;
  --ei-gold-bg: #fbf2d6;
  --ei-gold-border: #e7cd85;
  --ei-gold-accent: #caa03a;

  --ei-bg: #ffffff;
  --ei-surface: #f5f7fa;
  --ei-surface-2: #eef2f7;
  --ei-border: #e2e8f0;
  --ei-text: #1f2b3d;
  --ei-heading: #122a4f;
  --ei-muted: #5b6b82;
  --ei-link: #1b4b8f;

  --ei-radius: 10px;
  --ei-radius-lg: 16px;
  --ei-radius-xl: 22px;
  --ei-shadow: 0 1px 2px rgba(18, 42, 79, .06), 0 8px 24px rgba(18, 42, 79, .06);
  --ei-shadow-lg: 0 2px 4px rgba(18, 42, 79, .05), 0 18px 50px rgba(18, 42, 79, .10);
  --ei-header-h: 68px;

  /* Field fill — the soft navy-tinted inputs from the auth design. */
  --ei-field: color-mix(in srgb, var(--ei-navy) 7%, var(--ei-bg));
  --ei-field-border: color-mix(in srgb, var(--ei-navy) 16%, var(--ei-border));
}

[data-theme="dark"] {
  --ei-navy: #4d8fe0;
  --ei-red: #ff4d44;
  --ei-green: #34d399;
  --ei-ind: #b088ec;

  --ei-gold-ink: #f0c64e;
  --ei-gold-bg: rgba(212, 160, 40, .16);
  --ei-gold-border: rgba(212, 160, 40, .42);
  --ei-gold-accent: #e6b94e;

  --ei-bg: #0d1117;
  --ei-surface: #161b22;
  --ei-surface-2: #1c2330;
  --ei-border: #232c3a;
  --ei-text: #d7e0ec;
  --ei-heading: #f1f5fb;
  --ei-muted: #9aa7b8;
  --ei-link: #6ba4ec;
  --ei-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --ei-shadow-lg: 0 2px 4px rgba(0, 0, 0, .45), 0 18px 50px rgba(0, 0, 0, .5);
  --ei-field: color-mix(in srgb, var(--ei-navy) 14%, var(--ei-surface));
  --ei-field-border: color-mix(in srgb, var(--ei-navy) 24%, var(--ei-border));
}

html { scroll-behavior: smooth; }

/* Sticky footer: fill the viewport so short pages don't leave a gap below the footer */
.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.wp-site-blocks > main { flex: 1 0 auto; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  background-color: var(--ei-bg);
  color: var(--ei-text);
  transition: background-color .2s ease, color .2s ease;
}

/* Form controls don't inherit the page font by default — make their text (typed
   values, placeholders, options) use the site font like everything else. */
input, textarea, select, optgroup, button { font-family: inherit; }

/* Atmosphere: a faint navy wash anchored top-center so pages feel composed
   rather than floating on flat white. Fixed so it doesn't scroll-jitter. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 50% -10%, color-mix(in srgb, var(--ei-navy) 9%, transparent), transparent 70%),
    radial-gradient(700px 420px at 100% 0%, color-mix(in srgb, var(--ei-red) 5%, transparent), transparent 65%);
}

/* Tabular numerals for stats / data — the "data site" feel */
.is-style-tabular,
.ei-stat__num,
table { font-variant-numeric: tabular-nums; }

/* ============================================================
   Header
   ============================================================ */
/* Keep the topbar pinned at every scroll position. The visible bar is
   .ei-header, but it's nested inside WordPress's template-part wrapper
   (.wp-site-blocks > header.wp-block-template-part). position:sticky resolves
   against the *parent's* box, and that wrapper is only as tall as the header —
   so stickying .ei-header alone has no room to stick and it scrolls away. Pin
   the wrapper instead: it's a direct child of the tall .wp-site-blocks flex
   column, so it stays fixed to the top through any scroll position. */
.wp-site-blocks > header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
}
.ei-header {
  position: relative; /* positioning context for header popovers; pinning is on the wrapper above */
  background: color-mix(in srgb, var(--ei-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--ei-border);
}

.ei-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.ei-logo {
  display: block;
  height: 38px;
  width: auto;
}

/* Light/dark logo swap, driven by the same data-theme attribute */
.ei-logo--dark { display: none; }
[data-theme="dark"] .ei-logo--light { display: none; }
[data-theme="dark"] .ei-logo--dark { display: block; }

.ei-brand--footer .ei-logo { height: 48px; }

/* Left cluster: logo + primary nav sit together against the left edge */
.ei-headbar__left {
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
}
.ei-nav {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
}

/* Nav */
.ei-header .ei-nav a,
.ei-header .wp-block-navigation a {
  color: var(--ei-text);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}
.ei-header .ei-nav a:hover,
.ei-header .wp-block-navigation a:hover { color: var(--ei-red); }

/* Topbar search — fills the gap between the brand/nav and the button cluster on
   wide screens; hidden when the bar gets tight (the buttons take priority). */
.ei-search {
  flex: 1 1 auto;
  min-width: 0;
  margin-inline: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 38px;
  padding: 0 .9rem;
  border-radius: 999px;
  border: 1px solid var(--ei-field-border);
  background: var(--ei-field);
  color: var(--ei-muted);
  transition: border-color .15s ease, background .15s ease;
}
.ei-search:focus-within { border-color: var(--ei-navy); background: var(--ei-bg); }
.ei-search__icon { flex: none; width: 16px; height: 16px; }
.ei-search__input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ei-heading); font: inherit; font-size: .9rem; }
.ei-search__input::placeholder { color: var(--ei-muted); }
@media (max-width: 1080px) { .ei-search { display: none; } }

/* ============================================================
   Mobile topbar — collapse nav + search + actions behind a burger
   ============================================================ */
.ei-burger {
  display: none; /* desktop: hidden; shown ≤768 */
  align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; margin-left: auto;
  border: 1px solid var(--ei-border); border-radius: 999px;
  background: var(--ei-surface); color: var(--ei-heading);
  cursor: pointer; line-height: 0;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.ei-burger:hover { border-color: var(--ei-navy); transform: translateY(-1px); }
.ei-burger:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
.ei-burger svg { width: 20px; height: 20px; }
.ei-burger__close { display: none; }
.ei-header.is-open .ei-burger__open { display: none; }
.ei-header.is-open .ei-burger__close { display: block; }

@media (max-width: 768px) {
  .ei-burger { display: inline-flex; }

  /* unwrap the left cluster so the logo stays on the bar while the nav drops
     into the panel below (display:contents promotes brand + nav to flex items) */
  .ei-headbar__left { display: contents; }
  .ei-headbar { flex-wrap: wrap !important; row-gap: 0; }
  .ei-brand { order: 0; }
  .ei-burger { order: 1; }

  /* collapsible rows: hidden until the burger opens, then full-width + stacked */
  .ei-nav,
  .ei-search,
  .ei-headbar__actions {
    order: 3; flex-basis: 100%; width: 100%; display: none !important;
  }
  .ei-header.is-open .ei-nav,
  .ei-header.is-open .ei-search,
  .ei-header.is-open .ei-headbar__actions { display: flex !important; }

  /* nav as a vertical list of tap targets */
  .ei-header.is-open .ei-nav {
    flex-direction: column; align-items: stretch; gap: .1rem;
    border-top: 1px solid var(--ei-border); margin-top: .5rem; padding-top: .5rem;
  }
  .ei-header.is-open .ei-nav a {
    box-sizing: border-box; width: 100%; padding: .65rem .3rem; border-radius: 10px; font-size: 1rem;
  }
  /* keep search + actions box-sized to the same gutter as the nav rows */
  .ei-header.is-open .ei-search,
  .ei-header.is-open .ei-headbar__actions { box-sizing: border-box; }
  .ei-header.is-open .ei-nav a:hover { background: var(--ei-surface); color: var(--ei-navy); }

  /* search: force-visible in the panel (it's display:none ≤1080) and full-width */
  .ei-header.is-open .ei-search { margin: .4rem 0 0; }

  /* action buttons: a left-aligned wrapped row */
  .ei-header.is-open .ei-headbar__actions {
    justify-content: flex-start; flex-wrap: wrap; gap: .6rem;
    border-top: 1px solid var(--ei-border); margin-top: .6rem; padding-top: .8rem;
  }
}

/* ============================================================
   Theme toggle button
   ============================================================ */
.ei-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ei-border);
  border-radius: 999px;
  background: var(--ei-surface);
  color: var(--ei-heading);
  cursor: pointer;
  line-height: 0;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.ei-toggle:hover { border-color: var(--ei-navy); transform: translateY(-1px); }
.ei-toggle:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
.ei-toggle svg { width: 18px; height: 18px; }
.ei-toggle .ei-icon-moon { display: none; }
[data-theme="dark"] .ei-toggle .ei-icon-sun { display: none; }
[data-theme="dark"] .ei-toggle .ei-icon-moon { display: block; }

/* ============================================================
   Account icon (topbar) — mirrors the theme-toggle button
   ============================================================ */
/* The [ei_account_link] shortcode may be wrapped by the editor; keep the
   wrapper from breaking the header flex row. */
.ei-header .wp-block-shortcode,
.ei-header p:has(> .ei-account) {
  margin: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
}

.ei-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ei-border);
  border-radius: 999px;
  background: var(--ei-surface);
  color: var(--ei-heading);
  cursor: pointer;
  line-height: 0;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.ei-account:hover { border-color: var(--ei-navy); transform: translateY(-1px); }
.ei-account:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
.ei-account svg { width: 18px; height: 18px; }

/* ============================================================
   Accessibility menu (topbar circular button + dropdown panel)
   ============================================================ */
.ei-a11y { position: relative; display: inline-flex; }
.ei-a11y-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--ei-border); border-radius: 999px;
  background: var(--ei-surface); color: var(--ei-heading); cursor: pointer; line-height: 0;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.ei-a11y-btn:hover { border-color: var(--ei-navy); transform: translateY(-1px); }
.ei-a11y-btn:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
.ei-a11y-btn svg { width: 20px; height: 20px; }

.ei-a11y-pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 200;
  width: 250px; padding: .9rem;
  background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg);
  box-shadow: var(--ei-shadow-lg);
}
.ei-a11y-pop[hidden] { display: none; }
.ei-a11y-pop__head { margin-bottom: .7rem; }
.ei-a11y-pop__eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--ei-muted); }

.ei-a11y-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .5rem; }
.ei-a11y-row__label { font-size: .9rem; font-weight: 600; color: var(--ei-heading); }
.ei-a11y-step { display: inline-flex; align-items: center; gap: .25rem; }
.ei-a11y-step__btn {
  width: 30px; height: 30px; border: 1px solid var(--ei-field-border); border-radius: 8px;
  background: var(--ei-field); color: var(--ei-heading); font-weight: 800; font-size: .9rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.ei-a11y-step__btn:hover:not(:disabled) { border-color: var(--ei-navy); }
.ei-a11y-step__btn:disabled { opacity: .4; cursor: default; }
.ei-a11y-step__val { min-width: 3.2em; text-align: center; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ei-text); }

.ei-a11y-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%;
  padding: .5rem .15rem; border: 0; background: transparent; cursor: pointer;
  font-size: .9rem; font-weight: 600; color: var(--ei-heading); text-align: left;
}
.ei-a11y-switch {
  flex: none; width: 38px; height: 22px; border-radius: 999px; position: relative;
  background: color-mix(in srgb, var(--ei-text) 26%, transparent); transition: background .15s ease;
}
.ei-a11y-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .15s ease;
}
.ei-a11y-toggle[aria-pressed="true"] .ei-a11y-switch { background: var(--ei-navy); }
.ei-a11y-toggle[aria-pressed="true"] .ei-a11y-switch::after { transform: translateX(16px); }
.ei-a11y-toggle:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; border-radius: 6px; }

.ei-a11y-reset {
  margin-top: .6rem; width: 100%; padding: .5rem; border: 1px solid var(--ei-field-border); border-radius: 8px;
  background: var(--ei-field); color: var(--ei-heading); font-weight: 700; font-size: .85rem; cursor: pointer;
}
.ei-a11y-reset:hover { border-color: var(--ei-red); color: var(--ei-red); }
/* The merged menu sits in two columns: accessibility on the left, language right. */
.ei-a11y-pop { width: 472px; max-width: calc(100vw - 1.5rem); max-height: calc(100vh - var(--ei-header-h) - 1.5rem); overflow-y: auto; }
.ei-a11y-pop__cols { display: flex; gap: 1rem; align-items: flex-start; }
.ei-a11y-pop__main { flex: 1 1 0; min-width: 0; }
.ei-a11y-pop__lang { flex: 0 0 auto; width: 196px; border-left: 1px solid var(--ei-border); padding-left: 1rem; }
.ei-a11y-pop__lang .ei-a11y-pop__head { margin-bottom: .6rem; }
.ei-a11y-pop__lang .ei-lang-menu { grid-template-columns: 1fr; max-height: 320px; }
@media (max-width: 560px) {
  .ei-a11y-pop { width: 320px; }
  .ei-a11y-pop__cols { flex-direction: column; }
  .ei-a11y-pop__lang { width: auto; border-left: 0; padding-left: 0; border-top: 1px solid var(--ei-border); padding-top: .7rem; }
  .ei-a11y-pop__lang .ei-lang-menu { grid-template-columns: 1fr 1fr; }
}
/* Mobile: the popover can't anchor to its button (it lives mid-row in the
   collapsed menu and would open off-screen). The header's backdrop-filter makes
   it the containing block, and it's sticky at the viewport top — so anchor the
   popover to the header's top edge as a full-width sheet that can't go off-screen. */
.ei-a11y-pop__close { display: none; }
@media (max-width: 768px) {
  .ei-a11y { position: static; } /* let the popover anchor to .ei-header, not the 38px button */
  .ei-a11y-pop {
    position: absolute; left: .75rem; right: .75rem; top: .75rem; bottom: auto;
    width: auto; max-width: none; max-height: calc(100vh - 1.5rem); overflow-y: auto;
    padding-top: 2.7rem; /* room for the close button */
  }
  .ei-a11y-pop__close {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: .5rem; right: .5rem; z-index: 1;
    width: 34px; height: 34px; padding: 0;
    border: 1px solid var(--ei-border); border-radius: 999px;
    background: var(--ei-surface); color: var(--ei-heading); cursor: pointer; line-height: 0;
  }
  .ei-a11y-pop__close:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
  .ei-a11y-pop__close svg { width: 18px; height: 18px; }
}

/* Colorblind palette select */
.ei-a11y-select { font: inherit; font-size: .85rem; font-weight: 600; padding: .35rem .5rem; border-radius: 8px; border: 1px solid var(--ei-field-border); background: var(--ei-field); color: var(--ei-heading); cursor: pointer; max-width: 8.5rem; }
.ei-a11y-select:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 1px; }

/* Social (X / Bluesky) circular topbar buttons — same pill as account/theme. */
.ei-social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--ei-border); border-radius: 999px;
  background: var(--ei-surface); color: var(--ei-heading); line-height: 0; text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, color .15s ease;
}
.ei-social-btn:hover { border-color: var(--ei-navy); color: var(--ei-navy); transform: translateY(-1px); }
.ei-social-btn:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
.ei-social-btn svg { width: 17px; height: 17px; }

/* Colorblind-safe partisan palettes per deficiency type (set via data-a11y-cb).
   Recolors UI, bars and charts (the D3 choropleth maps use a fixed scale). */
html[data-a11y-cb="protanopia"]   { --ei-navy: #0072b2; --ei-red: #e69f00; --ei-green: #009e73; }
html[data-a11y-cb="deuteranopia"] { --ei-navy: #0072b2; --ei-red: #d55e00; --ei-green: #009e73; }
html[data-a11y-cb="tritanopia"]   { --ei-navy: #1a85ff; --ei-red: #d41159; --ei-green: #009e73; }
html[data-a11y-cb="protanopia"][data-theme="dark"]   { --ei-navy: #4dabe3; --ei-red: #f0b94d; }
html[data-a11y-cb="deuteranopia"][data-theme="dark"] { --ei-navy: #4dabe3; --ei-red: #f07f33; }
html[data-a11y-cb="tritanopia"][data-theme="dark"]   { --ei-navy: #5aa9ff; --ei-red: #ec5a86; }

/* ---- Effects applied to <html> by assets/a11y.js ---- */
html[data-a11y-text="1"] { font-size: 112.5%; }
html[data-a11y-text="2"] { font-size: 125%; }
html[data-a11y-text="3"] { font-size: 140%; }
html.ei-a11y-contrast { --ei-text: #000; --ei-heading: #000; --ei-muted: #2a2a2a; --ei-border: #555; --ei-link: #0a3a86; }
html.ei-a11y-contrast[data-theme="dark"] { --ei-text: #fff; --ei-heading: #fff; --ei-muted: #dcdcdc; --ei-border: #aaa; --ei-link: #9cc4ff; }
html.ei-a11y-readable body { letter-spacing: .03em; word-spacing: .09em; line-height: 1.85; }
html.ei-a11y-readable p, html.ei-a11y-readable li { line-height: 1.9; }
html.ei-a11y-underline a:where(:not(.wp-element-button):not(.ei-btn):not(.ei-account):not(.ei-support-btn):not(.ei-a11y-btn)) { text-decoration: underline !important; text-underline-offset: 2px; }
html.ei-a11y-motion *, html.ei-a11y-motion *::before, html.ei-a11y-motion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; scroll-behavior: auto !important;
}

/* Support ("$") button — same pill as the account/theme-toggle icons, in green */
/* "$ Support" — a green CTA pill that sits in the left nav, after Shuffler. */
.ei-support-btn {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .34rem .72rem;
  border: 1px solid color-mix(in srgb, var(--ei-green) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ei-green) 9%, transparent);
  color: var(--ei-green);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.ei-support-btn:hover {
  border-color: var(--ei-green);
  background: color-mix(in srgb, var(--ei-green) 16%, transparent);
  transform: translateY(-1px);
}
.ei-support-btn:focus-visible { outline: 2px solid var(--ei-green); outline-offset: 2px; }
.ei-support-btn__char {
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1;
}
.ei-support-btn__label { font-weight: 700; }
/* `.ei-header .ei-nav a` (and its red :hover) outranks `.ei-support-btn` — re-assert
   the green so the pill reads green, not the nav's link color, in the nav. */
.ei-header .ei-nav a.ei-support-btn,
.ei-header .ei-nav a.ei-support-btn:hover { color: var(--ei-green); }

/* Language switcher (topbar) — circular button + dropdown, drives GTranslate */
.ei-lang { position: relative; display: inline-flex; line-height: 0; }
.ei-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ei-border);
  border-radius: 999px;
  background: var(--ei-surface);
  color: var(--ei-heading);
  cursor: pointer;
  line-height: 0;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, color .15s ease;
}
.ei-lang-btn:hover { border-color: var(--ei-navy); transform: translateY(-1px); }
.ei-lang-btn:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
.ei-lang-btn svg { width: 18px; height: 18px; }

/* Flags: small rounded in the menu, circular (current) on the button */
.ei-lang-flag {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ei-heading) 12%, transparent);
}
.ei-lang-btn .ei-lang-flag--current {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

/* Popover panel: anchored under the button — eyebrow, sticky search, flag grid.
   Height-capped with internal scroll so a long language list never runs off-screen. */
.ei-lang-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 200;
  width: min(336px, calc(100vw - 24px));
  padding: .5rem;
  background: var(--ei-bg);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
  box-shadow: var(--ei-shadow-lg);
  transform-origin: top right;
}
.ei-lang-pop[hidden] { display: none; }
.ei-lang-pop:not([hidden]) { animation: ei-lang-pop-in .14s ease both; }
@keyframes ei-lang-pop-in {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.ei-lang-pop__head {
  display: flex;
  align-items: baseline;
  padding: .25rem .35rem .5rem;
}
.ei-lang-pop__eyebrow {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ei-muted);
}

/* Two-column grid; circular flags echo the round topbar buttons. */
.ei-lang-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  max-height: 58vh;
  margin: 0;
  padding: 0 .1rem .1rem;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ei-border) transparent;
}
.ei-lang-menu::-webkit-scrollbar { width: 9px; }
.ei-lang-menu::-webkit-scrollbar-thumb { background: var(--ei-border); border-radius: 999px; border: 2px solid var(--ei-bg); }
.ei-lang-menu li { margin: 0; }
.ei-lang-menu button {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .45rem .5rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.25; /* reset the .ei-lang ancestor's line-height:0 (icon button) */
  color: var(--ei-text);
  text-align: left;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.ei-lang-menu button span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ei-lang-menu .ei-lang-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ei-heading) 14%, transparent);
}
.ei-lang-menu button:hover { background: var(--ei-surface); color: var(--ei-navy); }
.ei-lang-menu button:focus-visible { outline: none; border-color: var(--ei-navy); background: var(--ei-surface); }
.ei-lang-menu button.is-active {
  background: color-mix(in srgb, var(--ei-navy) 10%, var(--ei-bg));
  color: var(--ei-navy);
}
.ei-lang-menu button.is-active .ei-lang-flag {
  box-shadow: 0 0 0 2px var(--ei-navy);
}

@media (prefers-reduced-motion: reduce) {
  .ei-lang-pop:not([hidden]) { animation: none; }
}

/* Hide GTranslate's own floating widget — the topbar button drives it instead.
   Kept in the DOM (not removed) so its engine still loads and applies the
   googtrans cookie on page load. */
.gtranslate_wrapper,
.gt_float_switcher { position: fixed !important; left: -9999px !important; top: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
/* Suppress Google Translate's own chrome: the top banner-frame (which shoves the
   page down and shows the spinning gadget that "loads infinitely"), the gadget,
   tooltips and highlight. The hidden #google_translate_element2 combo still drives
   the translation; only Google's visible UI is removed. */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
.goog-te-gadget,
.goog-te-gadget-icon,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-te-spinner-pos { display: none !important; visibility: hidden !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
/* Google injects `top: 40px` on <body> for its banner; we hide the banner, so
   keep the page pinned to the top. */
body { top: 0 !important; }

/* ============================================================
   Support page
   ============================================================ */
.ei-page-support .wp-block-post-title { display: none; } /* custom hero below */
.ei-support { text-align: center; }
.ei-support .ei-eyebrow { margin-bottom: .9rem; }
.ei-support__headline {
  margin: 0 0 .9rem;
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ei-heading);
}
.ei-support__subhead {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--ei-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}
.ei-support-card {
  max-width: 440px;
  margin: 2.25rem auto 0;
  padding: clamp(1.4rem, 4vw, 2.25rem);
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-xl);
  box-shadow: var(--ei-shadow-lg);
}
.ei-support-card stripe-buy-button { display: block; }
.ei-support-card__note {
  margin: 1.1rem 0 0;
  color: var(--ei-muted);
  font-size: .85rem;
}

/* ============================================================
   Payment result pages — confirmation / failed (centered card)
   ============================================================ */
.ei-page-payment .wp-block-post-title { display: none; } /* custom hero below */
.ei-payresult {
  max-width: 540px;
  margin-inline: auto;
  padding: clamp(1.75rem, 5vw, 2.75rem);
  text-align: center;
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-xl);
  box-shadow: var(--ei-shadow-lg);
}
.ei-payresult__badge {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 1.35rem;
  border-radius: 50%;
}
.ei-payresult__badge svg { width: 32px; height: 32px; }
.ei-payresult--ok .ei-payresult__badge {
  color: var(--ei-green);
  background: color-mix(in srgb, var(--ei-green) 14%, transparent);
}
.ei-payresult--error .ei-payresult__badge {
  color: var(--ei-red);
  background: color-mix(in srgb, var(--ei-red) 13%, transparent);
}
.ei-payresult__eyebrow { margin: 0 0 .65rem; }
.ei-payresult--error .ei-payresult__eyebrow { color: var(--ei-red); }
.ei-payresult__title {
  margin: 0 0 .7rem;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ei-heading);
}
.ei-payresult__sub {
  max-width: 42ch;
  margin: 0 auto;
  color: var(--ei-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
.ei-payresult .wp-block-buttons {
  justify-content: center;
  margin-top: 1.9rem;
}

/* ============================================================
   404 page — "we can't call this race"
   ============================================================ */
.ei-404page { text-align: center; }
.ei-404 { max-width: 640px; margin-inline: auto; }
.ei-404__eyebrow { margin: 0 0 .85rem; }
.ei-404__num {
  margin: 0 0 .4rem;
  font-weight: 800;
  font-size: clamp(5.5rem, 21vw, 12rem);
  line-height: .9;
  letter-spacing: -0.05em;
  color: var(--ei-heading);
  font-variant-numeric: tabular-nums;
}
.ei-404__o { color: var(--ei-red); }
.ei-404__title {
  margin: 0 0 .65rem;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ei-heading);
}
.ei-404__sub {
  max-width: 44ch;
  margin: 0 auto;
  color: var(--ei-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
.ei-404page .wp-block-buttons { justify-content: center; }
.ei-404page .wp-block-search { max-width: 420px; margin-inline: auto; }
.ei-404__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem 1.5rem;
  margin-top: 1.75rem;
}
.ei-404__links a {
  position: relative;
  color: var(--ei-muted);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}
.ei-404__links a:hover { color: var(--ei-navy); }
.ei-404__links a:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -.78rem;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ei-border);
  transform: translateY(-50%);
}
@media (prefers-reduced-motion: no-preference) {
  .ei-404 { animation: ei-404-in .5s ease both; }
  @keyframes ei-404-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ============================================================
   Buttons / accents
   ============================================================ */
.wp-block-button__link { transition: background-color .15s ease, transform .15s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }

.is-style-outline .wp-block-button__link {
  color: var(--ei-navy);
  border-color: var(--ei-navy);
  background: transparent;
}
.is-style-outline .wp-block-button__link:hover {
  color: #fff;
  background: var(--ei-navy);
}

/* ============================================================
   Search block (button-inside) — themed for light + dark
   ============================================================ */
.wp-block-search { max-width: 100%; }

.wp-block-search__inside-wrapper {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius);
  box-shadow: var(--ei-shadow);
  transition: border-color .15s ease, box-shadow .15s ease, background .2s ease;
}
.wp-block-search__inside-wrapper:focus-within {
  border-color: var(--ei-navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ei-navy) 22%, transparent);
}

.wp-block-search .wp-block-search__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 0 .4rem 0 .85rem;
  border: none;
  background: transparent;
  color: var(--ei-text);
  font-size: .95rem;
  line-height: 1.4;
}
.wp-block-search .wp-block-search__input:focus {
  outline: none;
  box-shadow: none;
}
.wp-block-search .wp-block-search__input::placeholder {
  color: var(--ei-muted);
  opacity: 1;
}

.wp-block-search .wp-block-search__button {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 1.2rem;
  min-height: 40px;
  border: none;
  border-radius: calc(var(--ei-radius) - 4px);
  background: var(--ei-navy);
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.wp-block-search .wp-block-search__button:hover {
  background: var(--ei-red);
  transform: translateY(-1px);
}
.wp-block-search .wp-block-search__button:focus-visible {
  outline: 2px solid var(--ei-navy);
  outline-offset: 2px;
}

/* ============================================================
   Cards / surfaces (utility classes for future patterns)
   ============================================================ */
.ei-card,
.is-style-ei-card {
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--ei-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* Post cards in the query grid lift on hover and reveal the navy edge. */
.wp-block-post-template .is-style-ei-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ei-shadow-lg);
  border-color: color-mix(in srgb, var(--ei-navy) 40%, var(--ei-border));
}
.is-style-ei-card .wp-block-post-title a { color: var(--ei-heading); }
.is-style-ei-card .wp-block-post-title a:hover { color: var(--ei-navy); }

.ei-eyebrow {
  display: inline-block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ei-red);
}

/* ============================================================
   Content polish
   ============================================================ */
.wp-block-post-content { line-height: 1.7; }

:where(.wp-block-post-content) > * { margin-block: 1.25rem; }

a { transition: color .15s ease; }

.wp-block-pullquote,
.wp-block-table table { border-color: var(--ei-border); }

.wp-block-table thead { border-bottom: 2px solid var(--ei-navy); }
.wp-block-table th { color: var(--ei-heading); font-weight: 700; }
.wp-block-table td, .wp-block-table th { border-color: var(--ei-border); }

/* ============================================================
   Paid Memberships Pro — theme is the ONLY stylesheet
   (PMPro's own CSS + color block are dequeued in inc/pmpro.php;
   everything below styles PMPro markup with ElectIndex tokens.)
   ============================================================ */
.pmpro { max-width: 100%; }

/* Card container. The .pmpro_section wrapper is layout-only so cards don't
   nest visually. Cards span their section by default (account/checkout
   dashboards); auth forms (login) get a narrow, centered card. */
.pmpro_section { margin: 0 0 2rem; }
.pmpro_section:last-child { margin-bottom: 0; }

.pmpro_card {
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-xl);
  box-shadow: var(--ei-shadow-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.pmpro-login .pmpro_card,
.pmpro-checkout .pmpro_login_wrap {
  max-width: 460px;
  margin-inline: auto;
}
.pmpro_card_content > :first-child { margin-top: 0; }
.pmpro_card_content > :last-child { margin-bottom: 0; }

/* Headings + PMPro size utilities (PMPro's own sizing CSS is dequeued) */
.pmpro h1, .pmpro h2, .pmpro h3 { color: var(--ei-heading); }
.pmpro_section_title { margin: 0 0 1rem; }
.pmpro_card_title { margin: 0 0 1.1rem; }
.pmpro_font-x-large { font-size: 1.5rem; line-height: 1.2; }
.pmpro_font-large { font-size: 1.2rem; line-height: 1.25; }

/* Account: avatar heading, info lists, action row */
.pmpro_heading-with-avatar { display: flex; align-items: center; gap: .75rem; }
.pmpro_heading-with-avatar .avatar { border-radius: 50%; flex: 0 0 auto; }

.pmpro_list { list-style: none; margin: 0; padding: 0; }
.pmpro_list_item { padding: .4rem 0; }
.pmpro_list_item + .pmpro_list_item { border-top: 1px solid var(--ei-border); }

.pmpro_card_actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ei-border);
}
.pmpro_card_action { font-weight: 600; }
.pmpro_card_action_separator { display: none; } /* spacing handled by gap */

/* Notices */
.pmpro_message {
  padding: .85rem 1rem;
  margin: 0 0 1.25rem;
  border: 1px solid var(--ei-border);
  border-left-width: 4px;
  border-radius: var(--ei-radius);
  background: var(--ei-surface-2);
  color: var(--ei-text);
}
.pmpro_message.pmpro_error { border-left-color: var(--ei-red); }
.pmpro_message.pmpro_success { border-left-color: var(--ei-navy); }

/* PMPro 3.x wraps groups in <fieldset>/<legend> and hides the honeypot via its
   own (dequeued) CSS. Reset that chrome site-wide so every PMPro page is clean. */
.pmpro fieldset,
.pmpro .pmpro_form_fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.pmpro legend,
.pmpro .pmpro_form_legend { width: 100%; padding: 0; }
.pmpro .pmpro_hidden { display: none !important; }
.pmpro .pmpro_cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
/* Grid children need min-width:0 and inputs need border-box, or the two
   columns blow past their tracks and overlap. */
.pmpro .pmpro_cols-2 > * { min-width: 0; }
.pmpro input,
.pmpro select,
.pmpro textarea,
.ei-auth-remote input,
.ei-auth-remote select { box-sizing: border-box; }
@media (max-width: 540px) { .pmpro .pmpro_cols-2 { grid-template-columns: 1fr; } }

/* Field hint text (e.g. password requirements) */
.pmpro .pmpro_form_field-description,
.ei-pw-hint { margin: .45rem 0 0; color: var(--ei-muted); font-size: .82rem; }

/* Form rows + labels */
.pmpro form p,
.pmpro .pmpro_form_field,
#loginform p { margin: 0 0 1.1rem; }
.pmpro label { display: block; margin-bottom: .35rem; font-weight: 600; color: var(--ei-heading); }
.pmpro .login-remember label,
.pmpro .pmpro_form_field-checkbox label {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; margin: 0;
}

/* Inputs */
.pmpro input[type="text"],
.pmpro input[type="email"],
.pmpro input[type="password"],
.pmpro input[type="tel"],
.pmpro input[type="number"],
.pmpro select,
.pmpro textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 .85rem;
  background: var(--ei-bg);
  color: var(--ei-text);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius);
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pmpro textarea { padding: .6rem .85rem; min-height: 96px; }
.pmpro input:focus,
.pmpro select:focus,
.pmpro textarea:focus {
  outline: none;
  border-color: var(--ei-navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ei-navy) 22%, transparent);
}
.pmpro input[type="checkbox"],
.pmpro input[type="radio"] { width: auto; min-height: 0; accent-color: var(--ei-navy); }

/* Primary buttons */
.pmpro .button,
.pmpro input[type="submit"],
.pmpro button[type="submit"],
.pmpro_btn:not(.pmpro_btn-plain) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.5rem;
  border: none;
  border-radius: var(--ei-radius);
  background: var(--ei-navy);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}
.pmpro .button:hover,
.pmpro input[type="submit"]:hover,
.pmpro button[type="submit"]:hover,
.pmpro_btn:not(.pmpro_btn-plain):hover { background: var(--ei-red); transform: translateY(-1px); }
.pmpro .button:focus-visible,
.pmpro_btn:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
.pmpro .login-submit #wp-submit { width: 100%; }

/* Plain/link-style button (show-password toggle, etc.) */
.pmpro_btn-plain {
  background: none; border: none; padding: 0;
  color: var(--ei-muted); font-weight: 600; font-size: .85rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .35rem;
}
.pmpro_btn-plain:hover { color: var(--ei-navy); }
.pmpro_btn-plain .pmpro_icon,
.pmpro_btn-plain .pmpro_icon svg { width: 1em; height: 1em; }
/* PMPro's icon SVG references a removed CSS var for its color — force it. */
.pmpro_btn-plain svg { stroke: currentColor; }

/* Secondary / cancel button (cancel page, "no thanks" actions) */
.pmpro .pmpro_btn-cancel {
  background: transparent;
  color: var(--ei-red);
  border: 1px solid color-mix(in srgb, var(--ei-red) 40%, var(--ei-border));
}
.pmpro .pmpro_btn-cancel:hover {
  background: color-mix(in srgb, var(--ei-red) 10%, transparent);
  color: var(--ei-red);
  transform: translateY(-1px);
}

/* Definition-style lists (account details, confirmation + invoice summaries) */
.pmpro .pmpro_list-with-labels .pmpro_list_item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.pmpro .pmpro_list_item_label { color: var(--ei-muted); font-weight: 600; }
.pmpro .pmpro_list_item_value { color: var(--ei-text); font-weight: 600; text-align: right; }

/* Tables (order history, invoices) */
.pmpro .pmpro_table { width: 100%; border-collapse: collapse; }
.pmpro .pmpro_table th,
.pmpro .pmpro_table td {
  padding: .7rem .85rem;
  text-align: left;
  border-bottom: 1px solid var(--ei-border);
}
.pmpro .pmpro_table thead th {
  color: var(--ei-heading);
  font-weight: 700;
  border-bottom: 2px solid var(--ei-navy);
}
.pmpro .pmpro_table tbody tr:last-child td { border-bottom: 0; }

/* ============================================================
   Join / Levels page ([ei_levels])
   ============================================================ */
.ei-join { max-width: 920px; margin-inline: auto; }
.ei-join__hero { text-align: center; max-width: 620px; margin: 0 auto 2.5rem; }
.ei-join__hero .ei-eyebrow { margin-bottom: .8rem; }
.ei-join__title {
  margin: 0 0 .7rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ei-heading);
}
.ei-join__sub { margin: 0 auto; max-width: 48ch; color: var(--ei-muted); font-size: 1.1rem; line-height: 1.6; }
.ei-join__plans {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 900px;
  margin: 0 auto;
}
.ei-join__plans[data-count="1"] { max-width: 420px; }
.ei-plan {
  position: relative;
  overflow: hidden;
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-xl);
  box-shadow: var(--ei-shadow-lg);
  padding: clamp(1.6rem, 4vw, 2.25rem);
}
.ei-plan::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--ei-navy), var(--ei-red)); }
/* Best-value plan (Annual): gold ring, flag, and a savings line. */
.ei-plan--best { border-color: var(--ei-gold-border); box-shadow: 0 0 0 2px var(--ei-gold-border), var(--ei-shadow-lg); }
.ei-plan--best::before { background: linear-gradient(90deg, var(--ei-gold-accent), #f0c64e); }
.ei-plan__flag { position: absolute; top: 1rem; right: 1rem; font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ei-navy-deep); background: var(--ei-gold-accent); padding: .25rem .6rem; border-radius: 999px; }
.ei-plan__save { margin: -.6rem 0 1rem; font-size: .85rem; font-weight: 700; color: var(--ei-green); }
.ei-plan__name { margin: .2rem 0 .3rem; font-size: 1.05rem; font-weight: 800; color: var(--ei-heading); }
.ei-plan__price { margin: 0 0 1rem; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--ei-heading); }
.ei-plan__per { font-size: 1rem; font-weight: 600; color: var(--ei-muted); }
.ei-plan__desc { margin: 0 0 1rem; color: var(--ei-muted); }
.ei-plan__features { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: .65rem; }
.ei-plan__features li { display: flex; align-items: flex-start; gap: .6rem; color: var(--ei-text); }
.ei-check { width: 18px; height: 18px; flex: 0 0 auto; margin-top: .15rem; color: var(--ei-green); }
.ei-plan__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  background: var(--ei-navy);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}
.ei-plan__cta:hover { background: var(--ei-navy-deep); transform: translateY(-1px); color: #fff; }
.ei-join__note { margin: 2rem 0 0; text-align: center; color: var(--ei-muted); }

/* ============================================================
   Checkout page ([ei_checkout]) — summary rail + form
   ============================================================ */
.ei-checkout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 980px;
  margin-inline: auto;
}
@media (max-width: 820px) { .ei-checkout { grid-template-columns: 1fr; gap: 1.5rem; } }
.ei-checkout__summary {
  position: sticky;
  top: calc(var(--ei-header-h) + 1rem);
  background: linear-gradient(160deg, #122a4f, #1b4b8f);
  color: #fff;
  border-radius: var(--ei-radius-xl);
  box-shadow: var(--ei-shadow-lg);
  padding: clamp(1.5rem, 4vw, 2rem);
}
@media (max-width: 820px) { .ei-checkout__summary { position: static; } }
.ei-checkout__summary .ei-eyebrow { color: rgba(255, 255, 255, .7); }
.ei-checkout__plan { margin: .55rem 0 .15rem; font-size: 1.3rem; font-weight: 800; }
.ei-checkout__price { margin: 0 0 1.4rem; font-size: 2rem; font-weight: 800; }
.ei-checkout__due { font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .7); }
.ei-checkout__perks { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.ei-checkout__perks li { display: flex; align-items: flex-start; gap: .55rem; font-size: .95rem; color: rgba(255, 255, 255, .92); }
.ei-checkout__perks .ei-check { color: #fff; opacity: .9; }
.ei-checkout__fineprint { margin: 0; font-size: .82rem; color: rgba(255, 255, 255, .65); }
.ei-checkout__form {
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-xl);
  box-shadow: var(--ei-shadow-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.ei-checkout__form #pmpro_pricing_fields { display: none; } /* the summary rail covers this */
.ei-checkout__form .pmpro_card,
.ei-checkout__form .pmpro_card_content { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }

/* Account-creation fields styled to match the /log-in create-account card:
   navy-tinted inputs, muted labels, 2-col name row, no PMPro section headings. */
.ei-checkout__form .pmpro_form_heading,
.ei-checkout__form .pmpro_checkout-h2,
.ei-checkout__form .pmpro_card_title,
.ei-checkout__form .pmpro_level-name { display: none; }
.ei-checkout__form .pmpro_form_fieldset,
.ei-checkout__form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.ei-checkout__form .pmpro_form_legend,
.ei-checkout__form legend { width: 100%; padding: 0; }
.ei-checkout__form .pmpro_level_group::before { content: none; }
.ei-checkout__form .pmpro_form_field { margin-bottom: 1.1rem; }
.ei-checkout__form .pmpro_form_label,
.ei-checkout__form .pmpro_form_field > label {
  display: block; margin-bottom: .35rem; color: var(--ei-muted); font-weight: 700; font-size: .92rem;
}
.ei-checkout__form .pmpro_form_input,
.ei-checkout__form input[type="text"],
.ei-checkout__form input[type="email"],
.ei-checkout__form input[type="password"] {
  width: 100%; min-height: 52px; padding: 0 .9rem; box-sizing: border-box;
  background: var(--ei-field); border: 1px solid var(--ei-field-border); border-radius: 12px;
}
.ei-checkout__form .pmpro_cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ei-checkout__form .pmpro_form_field-description,
.ei-checkout__form .lite { color: var(--ei-muted); font-size: .82rem; }
.ei-checkout__form .pmpro_btn-submit-checkout,
.ei-checkout__form input[type="submit"] {
  width: 100%; min-height: 54px; margin-top: .4rem; border: 0; border-radius: 14px;
  background: var(--ei-navy); color: #fff; font-weight: 700; font-size: 1.02rem; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.ei-checkout__form .pmpro_btn-submit-checkout:hover,
.ei-checkout__form input[type="submit"]:hover { transform: translateY(-1px); opacity: .95; background: var(--ei-navy-deep); }

/* ============================================================
   Account app shell ([ei_account]) — sidebar + sectioned main
   ============================================================ */
/* These pages render their own hero/title, so hide the template post-title. */
.pmpro-account .wp-block-post-title,
.pmpro-levels .wp-block-post-title,
.pmpro-checkout .wp-block-post-title { display: none; }

.ei-account-app {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 1040px;
  margin-inline: auto;
  align-items: start;
}
@media (max-width: 820px) {
  .ei-account-app { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Sidebar: identity + nav */
.ei-account-side { position: sticky; top: calc(var(--ei-header-h) + 1rem); }
@media (max-width: 820px) { .ei-account-side { position: static; } }
.ei-account-user {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--ei-border);
}
.ei-account-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ei-navy) 10%, var(--ei-bg));
  border: 1.5px solid var(--ei-navy);
  color: var(--ei-navy);
  font-weight: 800;
  font-size: 1.2rem;
  overflow: hidden;
}
.ei-account-avatar--img { background: var(--ei-surface); border-color: var(--ei-border); padding: 0; }
.ei-account-avatar__img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* Profile photo upload */
.ei-avatar-form { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.ei-avatar-form__preview { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--ei-surface-2); }
.ei-avatar-form__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ei-avatar-form__controls { display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.ei-avatar-form__file { display: inline-flex; align-items: center; gap: .7rem; flex-wrap: wrap; cursor: pointer; }
.ei-avatar-form__file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.ei-avatar-form__name { font-size: .82rem; color: var(--ei-muted); }
.ei-avatar-form__actions { display: flex; align-items: center; gap: 1rem; }
.ei-avatar-form__remove { border: 0; background: none; padding: 0; font: inherit; font-size: .88rem; font-weight: 700; color: var(--ei-muted); cursor: pointer; }
.ei-avatar-form__remove:hover { color: var(--ei-red); }
.ei-account-id { display: flex; flex-direction: column; min-width: 0; }
.ei-account-name { font-weight: 800; color: var(--ei-heading); }
.ei-account-email { font-size: .88rem; color: var(--ei-muted); overflow: hidden; text-overflow: ellipsis; }

.ei-account-nav { display: flex; flex-direction: column; gap: .12rem; }
@media (max-width: 820px) { .ei-account-nav { flex-direction: row; flex-wrap: wrap; gap: .35rem; } }
.ei-account-nav a,
.ei-account-nav__tab {
  display: block;
  width: 100%;
  appearance: none;
  background: none;
  border: 0;
  padding: .6rem .85rem;
  border-radius: 10px;
  color: var(--ei-text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.ei-account-nav a:hover,
.ei-account-nav__tab:hover { background: var(--ei-surface); color: var(--ei-navy); }
.ei-account-nav a.is-active,
.ei-account-nav__tab.is-active {
  background: color-mix(in srgb, var(--ei-navy) 10%, var(--ei-bg));
  color: var(--ei-navy);
}
.ei-account-nav__tab:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
.ei-account-nav__out { color: var(--ei-muted) !important; margin-top: .3rem; }
.ei-account-nav__out:hover { color: var(--ei-red) !important; background: color-mix(in srgb, var(--ei-red) 8%, transparent) !important; }

/* Tab panels (one-page account) */
.ei-account-panel[hidden] { display: none; }

/* Flatten PMPro's own card/table chrome when embedded inside an account panel
   card, so we don't get a card-in-a-card. */
.ei-acard .ei-pmpro-embed,
.ei-acard .ei-pmpro-embed .pmpro_card,
.ei-acard .ei-pmpro-embed .pmpro_card_content {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  max-width: none;
}
.ei-acard .ei-pmpro-embed .pmpro_form_heading { display: none; } /* the card label already names it */
/* Email is shown for reference but changed via the form below — give it a
   read-only look so it doesn't invite editing. */
.ei-acard .ei-pmpro-embed input[readonly] {
  background: var(--ei-surface);
  color: var(--ei-muted);
  cursor: not-allowed;
}
.ei-acard .ei-pmpro-embed input[readonly]:focus {
  border-color: var(--ei-border);
  box-shadow: none;
}

/* Change-password form (Profile tab) */
.ei-pw-form .ei-pw-field { margin-bottom: 1rem; }
.ei-pw-form label {
  display: block;
  margin-bottom: .35rem;
  color: var(--ei-muted);
  font-weight: 700;
  font-size: .92rem;
}
.ei-pw-form input[type="password"],
.ei-pw-form input[type="email"],
.ei-pw-form input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0 .9rem;
  background: var(--ei-field);
  border: 1px solid var(--ei-field-border);
  border-radius: 12px;
  box-sizing: border-box;
}
.ei-pw-form input[type="password"]:focus,
.ei-pw-form input[type="email"]:focus,
.ei-pw-form input[type="text"]:focus {
  outline: none;
  border-color: var(--ei-navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ei-navy) 18%, transparent);
}
.ei-pw-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .ei-pw-cols { grid-template-columns: 1fr; } }
.ei-pw-hint { margin: .3rem 0 1.15rem; color: var(--ei-muted); font-size: .82rem; }
/* Newsletter auto opt-in disclosure on the create-account form */
.ei-nl-consent {
  margin: 0 0 1.1rem; padding: .7rem .85rem;
  background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: 10px;
  color: var(--ei-muted); font-size: .85rem; line-height: 1.5;
}
.ei-nl-consent strong { color: var(--ei-heading); }

/* Required-field markers: red asterisk on PMPro required fields (core use the
   `required` attribute; theme fields use the -required class) + manual `.ei-req`
   on the custom account forms. `.ei-optional` softens optional-field hints. */
.pmpro_form_field-required > label::after,
.pmpro_form_field:has(:required) > label::after,
.pmpro_form_field:has(.pmpro_form_input-required) > label::after { content: " *"; color: var(--ei-red); font-weight: 700; }
.ei-req { color: var(--ei-red); font-weight: 700; }
.ei-optional { color: var(--ei-muted); font-weight: 500; font-size: .85em; }
/* Username is internal-only — never shown on signup or in the profile editor. */
.pmpro_form_field-username { display: none !important; }

/* Password show/hide toggle (replaces PMPro's, which doesn't bind on the AJAX form) */
.ei-pw-wrap { position: relative; display: block; }
.ei-pw-wrap > input { width: 100%; box-sizing: border-box; padding-right: 2.7rem; }
.ei-pw-toggle {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent;
  color: var(--ei-muted); cursor: pointer; line-height: 0;
}
.ei-pw-toggle:hover, .ei-pw-toggle[aria-pressed="true"] { color: var(--ei-navy); }
.ei-pw-toggle:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 1px; }
.ei-pw-toggle svg { width: 20px; height: 20px; }
.pmpro_form_field-password-toggle { display: none !important; }
.ei-acard-notice {
  padding: .7rem .9rem;
  margin: 0 0 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .92rem;
}
.ei-acard-notice--ok { background: color-mix(in srgb, var(--ei-green) 14%, var(--ei-surface)); color: var(--ei-green); }
.ei-acard-notice--err { background: color-mix(in srgb, var(--ei-red) 12%, var(--ei-surface)); color: var(--ei-red); }

/* Main panel */
.ei-account-main { min-width: 0; }
.ei-account-title {
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ei-border);
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ei-heading);
}

/* Section cards */
.ei-acard {
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
  box-shadow: var(--ei-shadow);
  padding: clamp(1.25rem, 3vw, 1.6rem);
  margin-bottom: 1.25rem;
}
.ei-acard:last-child { margin-bottom: 0; }
.ei-acard__label {
  margin: 0 0 .9rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--ei-border);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ei-muted);
}
/* In-card section divider + sub-heading (e.g. Email address under Profile details) */
.ei-acard__sep {
  height: 1px;
  margin: 1.6rem 0 1.4rem;
  background: var(--ei-border);
  border: 0;
}
.ei-acard__subhead {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ei-heading);
}
.ei-acard__lead { margin: 0; font-size: 1.05rem; color: var(--ei-heading); }
.ei-acard__muted { color: var(--ei-muted); }
.ei-acard__hint { margin: .4rem 0 0; font-size: .86rem; line-height: 1.5; color: var(--ei-muted); }
.ei-acard__hint a { color: var(--ei-link); font-weight: 600; }
.ei-acard__actions { margin-top: 1.1rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
/* Newsletter card: show the right status line for the subscribed state. */
[data-ei-nl-card] .ei-nl-on { display: none; }
[data-ei-nl-card].is-subscribed .ei-nl-on { display: inline; }
[data-ei-nl-card].is-subscribed .ei-nl-off { display: none; }
.ei-nl-msg { font-size: .85rem; color: var(--ei-green); }
.ei-account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.4rem;
  border: 0;
  box-sizing: border-box;
  border-radius: 12px;
  background: var(--ei-navy);
  color: #fff;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.ei-account-btn:hover { background: var(--ei-navy-deep); transform: translateY(-1px); color: #fff; }
/* Secondary action — outline, matches the site's ghost buttons. */
.ei-account-btn--ghost { background: transparent; color: var(--ei-navy); border: 1px solid var(--ei-field-border); }
.ei-account-btn--ghost:hover { background: var(--ei-surface); color: var(--ei-navy); border-color: var(--ei-navy); }
[data-theme="dark"] .ei-account-btn--ghost { color: var(--ei-heading); }

.ei-tag {
  display: inline-block;
  margin-left: .4rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.ei-tag--ok { background: color-mix(in srgb, var(--ei-green) 16%, var(--ei-surface)); color: var(--ei-green); }

/* Account link rows (label + arrow) */
.ei-acard__rows { display: flex; flex-direction: column; }
.ei-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ei-border);
  padding: .9rem .25rem;
  color: var(--ei-text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s ease;
}
.ei-account-row:last-child { border-bottom: 0; }
.ei-account-row:hover { color: var(--ei-navy); }
.ei-account-row__arrow { width: 18px; height: 18px; flex: 0 0 auto; color: var(--ei-muted); transition: transform .15s ease, color .15s ease; }
.ei-account-row:hover .ei-account-row__arrow { color: var(--ei-navy); transform: translateX(3px); }

/* ============================================================
   Modern brand treatments for PMPro pages
   ============================================================ */
/* Brand accent strip (navy → red, echoing the ElectIndex wordmark) along the
   top of the hero cards. */
.pmpro-login .pmpro_card,
.pmpro .pmpro_level_group {
  position: relative;
  overflow: hidden;
}
.pmpro-login .pmpro_card::before,
.pmpro .pmpro_level_group::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ei-navy), var(--ei-red));
}

/* Order/invoice rows get a subtle hover. */
.pmpro .pmpro_table tbody tr { transition: background-color .12s ease; }
.pmpro .pmpro_table tbody tr:hover { background: color-mix(in srgb, var(--ei-navy) 5%, transparent); }

/* Status / level tags */
.pmpro .pmpro_tag {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  background: var(--ei-surface-2);
  color: var(--ei-heading);
}
.pmpro .pmpro_tag-success { background: color-mix(in srgb, var(--ei-green) 16%, var(--ei-surface)); color: var(--ei-green); }
.pmpro .pmpro_tag-error,
.pmpro .pmpro_tag-cancelled { background: color-mix(in srgb, var(--ei-red) 14%, var(--ei-surface)); color: var(--ei-red); }

.pmpro .pmpro_spacer { height: 1rem; }
.pmpro .pmpro_actions_nav-right { margin-left: auto; }

/* Show/Hide password toggle: compact, right-aligned under the field. */
.pmpro_form_field-password-toggle {
  margin: .45rem 0 0;
  text-align: right;
}

/* Links */
.pmpro a, .pmpro_actions_nav a { color: var(--ei-link); }
.pmpro a:hover { color: var(--ei-red); }

/* Reset is skipped (no SMTP locally) — hide PMPro's own lost-password entry
   points, but keep the inline "Forgot?" link inside the login card. */
.pmpro a[href*="action=lostpassword"]:not(.ei-forgot),
.pmpro a[href*="action=reset_pass"]:not(.ei-forgot),
#lostpasswordform { display: none; }

/* ============================================================
   Auth card — the "Log In" login screen
   ============================================================ */
/* Title lives inside the card; the actions row only held the hidden lost-
   password link, so drop both to avoid a stray divider + empty space. */
.pmpro-login .wp-block-post-title { display: none; }
.pmpro-login .pmpro_card_actions { display: none; }

.pmpro-login .pmpro_card,
.pmpro-login .pmpro_login_wrap {
  max-width: 520px;
  margin-inline: auto;
  border-radius: var(--ei-radius-xl);
  box-shadow: var(--ei-shadow-lg);
  padding: clamp(1.6rem, 4vw, 2.75rem);
}

/* Brand header */
.ei-login-head { text-align: center; margin-bottom: 1.75rem; }
.ei-login-eyebrow {
  color: var(--ei-navy);
  letter-spacing: .14em;
  margin: 0 0 .55rem;
}
.ei-login-heading {
  font-size: clamp(1.7rem, 4.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ei-heading);
  margin: 0;
}

/* Sign in / Create account tabs */
.ei-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--ei-border);
  margin-bottom: 1.7rem;
}
.ei-auth-tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: center;
  padding: .85rem .5rem;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ei-muted);
  text-decoration: none;
  margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}
.ei-auth-tab:hover { color: var(--ei-text); }
.ei-auth-tab.is-active { color: var(--ei-navy); border-bottom-color: var(--ei-navy); }
.ei-auth-tab:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }

/* Auth panels (Sign in / Create account swap in place, no reload) */
.ei-auth-panel[hidden] { display: none; }
.ei-auth-note { color: var(--ei-muted); }
.ei-auth-loading { text-align: center; padding: 1.5rem 0; }

/* PMPro checkout form, pulled into the Create account panel. Scoped to
   .ei-auth-remote so none of this touches the Sign in panel's login form. */

/* The form is already inside the auth card: flatten PMPro's own nested cards
   so we don't get a card-in-a-card with stray borders. */
.ei-auth-remote .pmpro_card,
.ei-auth-remote .pmpro_card_content {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  max-width: none;
}

/* PMPro 3.x wraps field groups in <fieldset>/<legend>; strip the default
   browser chrome so they sit flush inside the auth card. */
.ei-auth-remote fieldset,
.ei-auth-remote .pmpro_form_fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.ei-auth-remote legend,
.ei-auth-remote .pmpro_form_legend {
  width: 100%;
  padding: 0;
}

/* Things we don't want on a free, inline signup: the level/price recap, the
   honeypot, and PMPro's level headings (the "Create account" tab says it all). */
.ei-auth-remote #pmpro_pricing_fields,
.ei-auth-remote .pmpro_hidden,
.ei-auth-remote .pmpro_card_title,
.ei-auth-remote .pmpro_checkout-h2,
.ei-auth-remote .pmpro_level-name { display: none !important; }

/* The "Create account" tab already labels this panel — drop PMPro's heading. */
.ei-auth-remote .pmpro_form_heading { display: none; }

/* The gradient top-bars (.pmpro_card::before / .pmpro_level_group::before) cap a
   card on the Levels/Checkout pages, but here the fieldset chrome is stripped, so
   they float as a stray line above the first field — remove them. */
.ei-auth-remote .pmpro_card::before,
.ei-auth-remote .pmpro_level_group::before { content: none; }

.ei-auth-remote .pmpro_form_field { margin-bottom: 1.1rem; }
.ei-auth-remote .pmpro_form_label,
.ei-auth-remote .pmpro_form_field > label {
  display: block;
  margin-bottom: .35rem;
  color: var(--ei-muted);
  font-weight: 700;
  font-size: .92rem;
}
.ei-auth-remote .pmpro_form_input,
.ei-auth-remote input[type="text"],
.ei-auth-remote input[type="email"],
.ei-auth-remote input[type="password"] {
  width: 100%;
  min-height: 52px;
  padding: 0 .9rem;
  background: var(--ei-field);
  border: 1px solid var(--ei-field-border);
  border-radius: 12px;
}
.ei-auth-remote .pmpro_cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.ei-auth-remote .pmpro_form_field-description,
.ei-auth-remote .lite { color: var(--ei-muted); font-size: .82rem; }

/* Primary action: only the checkout submit button. */
.ei-auth-remote .pmpro_btn-submit-checkout,
.ei-auth-remote input[type="submit"] {
  width: 100%;
  min-height: 54px;
  margin-top: .4rem;
  border: 0;
  border-radius: 14px;
  background: var(--ei-navy);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.ei-auth-remote .pmpro_btn-submit-checkout:hover,
.ei-auth-remote input[type="submit"]:hover { transform: translateY(-1px); opacity: .95; }

/* Secondary/plain buttons (e.g. the password show/hide toggle) stay quiet. */
.ei-auth-remote .pmpro_btn-plain,
.ei-auth-remote .pmpro_btn-password-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: auto;
  min-height: 0;
  margin-top: .5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ei-muted);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
}
.ei-auth-remote .pmpro_btn-password-toggle:hover { color: var(--ei-navy); }
.ei-auth-remote .pmpro_btn-password-toggle svg { width: 16px; height: 16px; }
.ei-auth-remote .pmpro_btn-cancel { display: none; } /* no "cancel" on a free signup */

@media (max-width: 480px) {
  .ei-auth-remote .pmpro_cols-2 { grid-template-columns: 1fr; }
}

/* Form fields — soft navy-tinted, matching the design */
.pmpro-login #loginform label {
  color: var(--ei-muted);
  font-weight: 700;
  font-size: .92rem;
}
.pmpro-login .login-password label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.ei-forgot {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ei-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ei-forgot:hover { color: var(--ei-navy); }

.pmpro-login #loginform input[type="text"],
.pmpro-login #loginform input[type="password"] {
  min-height: 52px;
  background: var(--ei-field);
  border-color: var(--ei-field-border);
  border-radius: 12px;
}
.pmpro-login .login-remember label { color: var(--ei-text); font-weight: 500; }
.pmpro-login #wp-submit {
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  font-size: 1.02rem;
  margin-top: .25rem;
}
.pmpro-login .pmpro_form_field-password-toggle { margin-top: .1rem; }

/* ============================================================
   Single article — Substack-style reading experience
   ============================================================ */
.ei-article { --ei-read: 700px; }

/* Pull the editorial column to a comfortable measure and center each piece.
   Descendant selectors so it works whether the shortcode block wraps its
   output or not. */
.ei-article__head,
.ei-byline,
.ei-share,
.ei-article__body,
.ei-article > .wp-block-separator,
.ei-article__tags,
.ei-article .wp-block-comments {
  max-width: var(--ei-read);
  margin-inline: auto;
}
.ei-article .wp-block-shortcode { margin-block: 1.6rem; }
.ei-article p:empty { display: none; } /* tidy any wpautop stragglers */

/* Hero image — a touch wider than the text for presence */
.ei-article__hero { max-width: var(--ei-read); margin-inline: auto; }
.ei-article__hero img { width: 100%; border-radius: 16px; }

/* Head: category eyebrow, title, byline */
.ei-article__cat { margin: 0; }
.ei-article__cat a { color: var(--ei-red); text-decoration: none; }
.ei-article__cat a:hover { color: var(--ei-navy); }
.ei-article__title { color: var(--ei-heading); margin: 0; }

.ei-byline { display: flex; align-items: center; gap: .8rem; margin-top: .4rem; }
.ei-byline__avatar-link { flex: 0 0 auto; line-height: 0; }
.ei-byline__avatar { width: 44px; height: 44px; border-radius: 50%; display: block; }
.ei-byline__meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ei-byline__author { font-weight: 700; color: var(--ei-heading); text-decoration: none; }
.ei-byline__author:hover { color: var(--ei-navy); }
.ei-byline__sub { font-size: .88rem; color: var(--ei-muted); }

/* Share / actions bar */
.ei-share {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .65rem 0;
  border-top: 1px solid var(--ei-border);
  border-bottom: 1px solid var(--ei-border);
}
.ei-share__label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ei-muted);
}
.ei-share__btns { display: flex; gap: .5rem; margin-left: auto; }
.ei-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ei-border);
  border-radius: 999px;
  background: var(--ei-surface);
  color: var(--ei-heading);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.ei-share__btn:hover { border-color: var(--ei-navy); color: var(--ei-navy); transform: translateY(-1px); }
.ei-share__copied {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  padding: .2rem .5rem;
  border-radius: 6px;
  background: var(--ei-heading);
  color: var(--ei-bg);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.ei-share__copy.is-copied .ei-share__copied { opacity: 1; }

/* Reading body */
.ei-article__body { font-size: 1.18rem; line-height: 1.8; }
.ei-article__body > * { margin-block: 1.5rem; }
.ei-article__body > :first-child { margin-top: 0; }
.ei-article__body :is(h2, h3, h4) { margin-top: 2.4rem; margin-bottom: .85rem; }
.ei-article__body h2 { font-size: clamp(1.5rem, 3.4vw, 1.9rem); }
.ei-article__body h3 { font-size: 1.4rem; }
.ei-article__body a {
  color: var(--ei-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.ei-article__body a:hover { color: var(--ei-red); }
.ei-article__body figure img { border-radius: 12px; }
.ei-article__body figcaption { text-align: center; font-size: .85rem; color: var(--ei-muted); margin-top: .55rem; }
.ei-article__body :is(ul, ol) { padding-left: 1.4rem; }
.ei-article__body li { margin-block: .4rem; }
.ei-article__body blockquote {
  margin: 2rem 0;
  padding: .25rem 0 .25rem 1.4rem;
  border-left: 4px solid var(--ei-red);
  font-size: 1.3rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ei-heading);
}
.ei-article__body blockquote p { margin: 0; }

/* Tags */
.ei-article__tags { color: var(--ei-muted); }
.ei-article__tags a { color: var(--ei-link); }

/* ============================================================
   Comments & reply form
   ============================================================ */
.ei-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ei-border);
}
.ei-comments .wp-block-comments-title { color: var(--ei-heading); margin: 0 0 1.5rem; }

/* Comment list — clean, divided rows */
.ei-comments .wp-block-comment-template { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.ei-comments .wp-block-comment-template > li { padding: 1.4rem 0; border-top: 1px solid var(--ei-border); }
.ei-comments .wp-block-comment-template > li:first-child { border-top: 0; padding-top: 0; }
.ei-comments .wp-block-comment-template ol { list-style: none; margin: 1rem 0 0; padding-left: 1.5rem; }
.ei-comments .wp-block-columns { gap: 1rem; margin: 0; }
.ei-comments .wp-block-avatar img { border-radius: 50%; display: block; }
.ei-comments .wp-block-comment-author-name,
.ei-comments .wp-block-comment-author-name a {
  color: var(--ei-heading);
  font-weight: 700;
  text-decoration: none;
}
.ei-comments .wp-block-comment-author-name a:hover { color: var(--ei-navy); }
.ei-comments .wp-block-comment-date,
.ei-comments .wp-block-comment-date a {
  color: var(--ei-muted);
  font-size: .85rem;
  text-decoration: none;
}
.ei-comments .wp-block-comment-content { margin: .5rem 0 .65rem; line-height: 1.7; }
.ei-comments .wp-block-comment-reply-link a {
  display: inline-flex;
  align-items: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--ei-navy);
  text-decoration: none;
}
.ei-comments .wp-block-comment-reply-link a:hover { color: var(--ei-red); }

/* Pagination */
.ei-comments .wp-block-comments-pagination { margin-top: 1.5rem; }
.ei-comments .wp-block-comments-pagination a { color: var(--ei-link); }

/* Reply / comment form */
.comment-respond {
  margin-top: 2.5rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
  box-shadow: var(--ei-shadow);
}
.comment-reply-title {
  margin: 0 0 1rem;
  color: var(--ei-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.comment-reply-title small { font-weight: 500; font-size: .9rem; margin-left: .5rem; }
.comment-reply-title small a { color: var(--ei-muted); }
.comment-form .comment-notes,
.comment-form .logged-in-as {
  margin: 0 0 1.2rem;
  color: var(--ei-muted);
  font-size: .9rem;
}
.comment-form .logged-in-as a { color: var(--ei-link); }

/* Logged-out: "sign in to comment" prompt (commenting is account-gated) */
.comment-respond .ei-must-login {
  margin: .35rem 0 0;
  color: var(--ei-muted);
  font-size: 1rem;
  line-height: 1.6;
}
.comment-respond .ei-must-login a {
  color: var(--ei-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.comment-respond .ei-must-login a:hover { color: var(--ei-red); }
.comment-form p { margin: 0 0 1.1rem; }
.comment-form label {
  display: block;
  margin-bottom: .35rem;
  font-weight: 600;
  color: var(--ei-heading);
  font-size: .92rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  min-height: 46px;
  padding: .55rem .85rem;
  background: var(--ei-field);
  border: 1px solid var(--ei-field-border);
  border-radius: var(--ei-radius);
  color: var(--ei-text);
  font: inherit;
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.comment-form textarea { min-height: 130px; line-height: 1.6; resize: vertical; }
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--ei-navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ei-navy) 22%, transparent);
}
.comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.comment-form .comment-form-cookies-consent input { width: auto; min-height: 0; accent-color: var(--ei-navy); }
.comment-form .comment-form-cookies-consent label { display: inline; margin: 0; font-weight: 500; color: var(--ei-text); }
.comment-form .form-submit { margin-bottom: 0; }
.comment-form .form-submit input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.6rem;
  border: none;
  border-radius: var(--ei-radius);
  background: var(--ei-navy);
  color: #fff;
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.comment-form .form-submit input[type="submit"]:hover { background: var(--ei-red); transform: translateY(-1px); }
.comment-form .form-submit input[type="submit"]:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }

/* Logged-out: name/email/url side by side on wider screens */
@media (min-width: 600px) {
  .comment-form .comment-form-author,
  .comment-form .comment-form-email,
  .comment-form .comment-form-url { width: 100%; }
}

/* ============================================================
   Footer
   ============================================================ */
.ei-footer {
  background: var(--ei-surface);
  border-top: 1px solid var(--ei-border);
  color: var(--ei-muted);
}
.ei-footer a { color: var(--ei-muted); }
.ei-footer a:hover { color: var(--ei-red); }
.ei-footer h2, .ei-footer h3, .ei-footer .ei-foot-title {
  color: var(--ei-heading);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
/* Brand + the three link columns spread evenly across the full footer width
   (a 4-column grid: brand a touch wider for the tagline, three equal link
   columns). Overrides the block row's flex/space-between. Collapses to a tidy
   stack on small screens. */
.ei-footer .alignwide {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  align-items: start;
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
}
/* Brand column: centered logo + tagline, tagline wrapped to ~2 lines. */
.ei-footer .ei-foot-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ei-foot-brand p { max-width: 13.5rem; margin-inline: auto; }
/* The constrained footer puts the separator + bottom bar at content width
   (760px) while the columns above use the wide width (1240px); widen them to
   match so the top columns and the bottom bar share the same left/right edges. */
.ei-footer > .wp-block-separator,
.ei-footer > .ei-foot-bottom {
  max-width: var(--wp--style--global--wide-size);
}
@media (max-width: 700px) {
  .ei-footer .alignwide { grid-template-columns: 1fr 1fr; }
  .ei-footer .alignwide > .ei-foot-brand { grid-column: 1 / -1; margin-bottom: .25rem; }
}

/* ============================================================
   Election Shuffler page (/shuffler)
   A flagship layout: a full-bleed navy "command deck" hero frames the tool,
   and the workspace sheet rises onto it (rounded top + lift) so the map reads
   as emerging from the brand band. The widget owns its own cards; the page
   gives them a tonal sheet to lift off and edge-to-edge room to breathe.
   ============================================================ */
.ei-shuffler-page {
  background: var(--ei-surface);
  margin-top: 0; /* hero sits flush under the header — no block-gap buffer */
  padding: 0;
}

[data-theme="dark"] .ei-shuffler-page {
  background: var(--ei-bg);
}

/* Hero — navy band, identical in light/dark so the brand anchors the page */
.ei-shuffler__hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: clamp(2.75rem, 6vw, 5.5rem) clamp(1rem, 4vw, 3rem) clamp(4.5rem, 8vw, 7.5rem);
  background:
    radial-gradient(1100px 420px at 82% -40%, rgba(224, 36, 31, .28), transparent 60%),
    linear-gradient(135deg, #1b4b8f 0%, #163d75 50%, #112648 100%);
}

/* faint precinct grid, fading out toward the seam */
.ei-shuffler__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(125% 100% at 50% 0%, #000 38%, transparent 80%);
          mask-image: radial-gradient(125% 100% at 50% 0%, #000 38%, transparent 80%);
  pointer-events: none;
}

.ei-shuffler__hero-inner {
  position: relative;
  max-width: 1860px;
  margin: 0 auto;
}

.ei-shuffler__beta {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  margin: 0 0 1.25rem; padding: .5rem .85rem;
  font-size: .88rem; line-height: 1.5; color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px;
}
.ei-shuffler__beta a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ei-shuffler__beta-tag { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; background: var(--ei-gold-accent); color: var(--ei-navy-deep); }
/* Shuffler "What's new" changelog */
.ei-shuffler__betarow { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: 0 0 .7rem; }
.ei-shuffler__betarow .ei-shuffler__beta { margin: 0; }
.ei-shuffler__warn {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: 0 0 1.1rem; padding: .45rem .8rem;
  font-size: .8rem; line-height: 1.45; color: #ffe6a8;
  background: rgba(245, 178, 60, .12); border: 1px solid rgba(245, 178, 60, .32); border-radius: 999px;
}
.ei-shuffler__warn-icon { font-size: .9rem; line-height: 1; }
.ei-sh-changelog { position: relative; }
.ei-sh-changelog__btn { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; list-style: none; font-size: .8rem; font-weight: 700; color: rgba(255, 255, 255, .92); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: .35rem .55rem .35rem .72rem; }
.ei-sh-changelog__btn::-webkit-details-marker { display: none; }
.ei-sh-changelog__btn:hover { background: rgba(255, 255, 255, .14); }
.ei-sh-changelog__badge { font-size: .68rem; font-weight: 800; color: var(--ei-navy-deep); background: var(--ei-gold-accent); border-radius: 999px; padding: .06rem .4rem; }
.ei-sh-changelog__panel { position: absolute; z-index: 40; top: calc(100% + .5rem); left: 0; width: min(360px, 86vw); max-height: 50vh; overflow-y: auto; padding: 1rem 1.1rem; text-align: left; background: var(--ei-bg); color: var(--ei-text); border: 1px solid var(--ei-border); border-radius: 14px; box-shadow: 0 20px 55px rgba(0, 0, 0, .4); }
.ei-sh-changelog__title { margin: 0 0 .75rem; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ei-muted); }
.ei-sh-changelog__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.ei-sh-changelog__entry { padding-bottom: .85rem; border-bottom: 1px solid var(--ei-border); }
.ei-sh-changelog__entry:last-child { border-bottom: 0; padding-bottom: 0; }
.ei-sh-changelog__metarow { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .4rem; }
.ei-sh-changelog__ver { font-size: .82rem; font-weight: 800; color: var(--ei-heading); }
.ei-sh-changelog__date { font-size: .73rem; color: var(--ei-muted); }
.ei-sh-changelog__entry ul { margin: 0; padding-left: 1.05rem; display: flex; flex-direction: column; gap: .25rem; }
.ei-sh-changelog__entry li { font-size: .85rem; line-height: 1.45; color: var(--ei-text); }
.ei-shuffler__eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #bcd2f0;
}

.ei-shuffler__eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--ei-red);
}

.ei-shuffler__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 5.4vw, 3.85rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.02;
}

.ei-shuffler__lede {
  max-width: 62ch;
  margin: 1.05rem 0 0;
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.62;
  color: rgba(233, 240, 250, .86);
}

.ei-shuffler__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.7rem;
}

.ei-shuffler__chip {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .42rem .9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: .82rem;
  color: rgba(233, 240, 250, .9);
}

.ei-shuffler__chip strong {
  color: #fff;
  font-weight: 800;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

/* Workspace sheet — rises onto the hero (the page's one signature move) */
.ei-shuffler__deck {
  position: relative;
  z-index: 1;
  margin-top: clamp(-3.25rem, -4.5vw, -4.25rem);
  padding: clamp(1.5rem, 2.8vw, 2.75rem) clamp(.75rem, 3.5vw, 3rem) var(--wp--preset--spacing--60);
  background: var(--ei-surface);
  border-radius: var(--ei-radius-xl) var(--ei-radius-xl) 0 0;
  box-shadow: 0 -20px 44px rgba(18, 42, 79, .12);
}

[data-theme="dark"] .ei-shuffler__deck {
  background: var(--ei-bg);
  box-shadow: 0 -20px 44px rgba(0, 0, 0, .5);
}

#ei-shuffler-host {
  display: block;
}

/* Server-rendered boot loader (shows instantly, before the shadow-DOM widget
   builds + the map loads). The app hides [data-shuffler-boot] when ready. */
.ei-shuffler__stage {
  position: relative;
  min-height: 640px;
}
.ei-shuffler__boot {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 5rem 1rem;
  color: var(--ei-muted);
  background: var(--ei-surface);
  border-radius: var(--ei-radius-lg);
}
[data-theme="dark"] .ei-shuffler__boot { background: var(--ei-bg); }
.ei-shuffler__boot[hidden] { display: none; }
.ei-shuffler__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--ei-border);
  border-top-color: var(--ei-navy);
  border-radius: 50%;
  animation: ei-shuffler-spin .8s linear infinite;
}
@keyframes ei-shuffler-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .ei-shuffler__deck {
    border-radius: var(--ei-radius-lg) var(--ei-radius-lg) 0 0;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Forecast Viewer (/forecasts) — full-bleed 2026 forecast app.
   Shares the Shuffler's "command deck" hero + workspace sheet; the
   app chrome lives under the .ei-fc- namespace.
   ============================================================ */
.ei-forecasts-page { background: var(--ei-surface); margin-top: 0; padding: 0; }
[data-theme="dark"] .ei-forecasts-page { background: var(--ei-bg); }

/* Hero — reuse the Shuffler band */
.ei-fc__hero {
  position: relative; overflow: hidden; color: #fff;
  padding: clamp(2.5rem, 5.5vw, 4.75rem) clamp(1rem, 4vw, 3rem) clamp(4rem, 7vw, 6.5rem);
  background:
    radial-gradient(1100px 420px at 82% -40%, rgba(224,36,31,.28), transparent 60%),
    linear-gradient(135deg, #1b4b8f 0%, #163d75 50%, #112648 100%);
}
.ei-fc__hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(125% 100% at 50% 0%, #000 38%, transparent 80%);
          mask-image: radial-gradient(125% 100% at 50% 0%, #000 38%, transparent 80%);
  pointer-events: none;
}
.ei-fc__hero-inner { position: relative; max-width: 1640px; margin: 0 auto; }
.ei-fc__eyebrow {
  display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #bcd2f0;
}
/* Beta / bug-report notice (mirrors the Shuffler's), on the dark forecast hero. */
.ei-fc__beta {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  margin: 0 0 1.1rem; padding: .5rem .85rem;
  font-size: .88rem; line-height: 1.5; color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px;
}
.ei-fc__beta a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ei-fc__beta-tag { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; background: var(--ei-gold-accent); color: var(--ei-navy-deep); }
.ei-fc__beta-msg, .ei-shuffler__beta-msg { min-width: 0; }
/* Beta/Errors notice pills: once the text wraps on a phone, drop the giant
   stadium radius and top-align the tag so it doesn't float mid-block. */
@media (max-width: 768px) {
  .ei-fc__beta, .ei-shuffler__beta { align-items: flex-start; border-radius: 14px; font-size: .82rem; gap: .45rem; }
  .ei-fc__beta-tag, .ei-shuffler__beta-tag { flex: none; margin-top: .08rem; }
  .ei-fc__beta a, .ei-shuffler__beta a { word-break: break-word; }
}
.ei-fc__eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--ei-red); }
.ei-fc__title { margin: 0; color: #fff; font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.02; }
.ei-fc__lede { max-width: 68ch; margin: 1.05rem 0 0; font-size: clamp(1rem, 1.3vw, 1.14rem); line-height: 1.6; color: rgba(233,240,250,.86); }
.ei-fc__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; align-items: center; }
.ei-fc__chip {
  display: inline-flex; align-items: baseline; gap: .4rem; padding: .42rem .9rem; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .82rem; color: rgba(233,240,250,.9);
}
.ei-fc__chip strong { color: #fff; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ei-fc__chip--stamp { background: rgba(224,36,31,.22); border-color: rgba(255,140,135,.4); }

/* Deck (workspace sheet rising onto the hero) */
/* The footer's top margin showed the white body as a band between the (#f5f7fa)
   content deck and the (#f5f7fa) footer — close the gap so they read as one surface. */
.wp-site-blocks > footer.wp-block-template-part { margin-top: 0; margin-block-start: 0; }

.ei-fc__deck {
  position: relative; z-index: 1; margin-top: clamp(-3rem, -4vw, -3.75rem);
  scroll-margin-top: calc(var(--ei-header-h) + 1rem);
  padding: clamp(1.1rem, 2vw, 1.9rem) clamp(.75rem, 3vw, 2.5rem) var(--wp--preset--spacing--60);
  background: var(--ei-surface); border-radius: var(--ei-radius-xl) var(--ei-radius-xl) 0 0;
  box-shadow: 0 -20px 44px rgba(18,42,79,.12);
}
[data-theme="dark"] .ei-fc__deck { background: var(--ei-bg); box-shadow: 0 -20px 44px rgba(0,0,0,.5); }

/* Switcher */
.ei-fc__switcher {
  display: flex; gap: .25rem; max-width: 1640px; margin: 0 auto 1.25rem; padding: .35rem;
  background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: 999px; width: fit-content;
  max-width: 100%; box-shadow: var(--ei-shadow); overflow-x: auto; -webkit-overflow-scrolling: touch;
}
[data-theme="dark"] .ei-fc__switcher { background: var(--ei-surface); }
.ei-fc__tab {
  border: 0; background: transparent; color: var(--ei-muted); font-weight: 600; font-size: .92rem;
  padding: .5rem 1.15rem; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.ei-fc__tab:hover { color: var(--ei-heading); }
.ei-fc__tab.is-active { background: var(--ei-navy); color: #fff; }

.ei-fc__viewhost, .ei-fc__root { max-width: 1640px; margin: 0 auto; }
.ei-fc__view { display: block; }
.ei-fc__view[hidden] { display: none; }
.ei-fc__muted { color: var(--ei-muted); }

/* Boot + error */
.ei-fc__boot { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 5rem 1rem; color: var(--ei-muted); }
.ei-fc__spinner { width: 34px; height: 34px; border: 3px solid var(--ei-border); border-top-color: var(--ei-navy); border-radius: 50%; animation: ei-fc-spin .8s linear infinite; }
@keyframes ei-fc-spin { to { transform: rotate(360deg); } }
.ei-fc__error { max-width: 460px; margin: 4rem auto; text-align: center; padding: 2rem; background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); }
.ei-fc__error-icon { font-size: 2.2rem; }
.ei-fc__error h2 { margin: .5rem 0; color: var(--ei-heading); }

/* Cards + grids */
.ei-fc-card { background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); padding: 1.25rem 1.35rem; box-shadow: var(--ei-shadow); }
[data-theme="dark"] .ei-fc-card { background: var(--ei-surface); }
.ei-fc-card__title { margin: 0 0 .85rem; font-size: 1.02rem; font-weight: 700; color: var(--ei-heading); }
/* Dashboard card refresh — applies to every non-dial card (.ei-fc-dcard); the
   Senate/House/Governors dial cards keep the plain .ei-fc-card look. A branded
   header with a navy→red accent tick + a hairline rule, and a lift on hover. */
.ei-fc-dcard { border-radius: 16px; transition: border-color .14s ease, box-shadow .14s ease; }
.ei-fc-dcard .ei-fc-card__title { position: relative; padding-left: .75rem; font-size: 1.06rem; font-weight: 800; letter-spacing: -.012em; }
.ei-fc-dcard .ei-fc-card__title::before { content: ''; position: absolute; left: 0; top: .12em; bottom: .12em; width: 3px; border-radius: 2px; background: linear-gradient(var(--ei-navy), var(--ei-red)); }
.ei-fc-dcard > .ei-fc-card__title,
.ei-fc-dcard > .ei-fc-trend__head,
.ei-fc-dcard > .ei-fc-snap__head { border-bottom: 1px solid var(--ei-border); padding-bottom: .7rem; margin-bottom: 1rem; }
.ei-fc-dcard.ei-fc-snapcard:hover { border-color: var(--ei-navy); box-shadow: 0 6px 18px rgba(16, 24, 40, .1); }
.ei-fc-grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 900px) { .ei-fc-grid2 { grid-template-columns: 1fr; } }

/* Buttons */
.ei-fc-btn, .ei-fc__btn { border: 1px solid var(--ei-border); background: var(--ei-bg); color: var(--ei-heading); font-weight: 600; padding: .5rem 1rem; border-radius: var(--ei-radius); cursor: pointer; font-size: .88rem; }
.ei-fc-btn--ghost:hover { border-color: var(--ei-navy); color: var(--ei-navy); }
.ei-fc__btn--primary, .ei-fc-btn--primary { background: var(--ei-navy); color: #fff; border-color: var(--ei-navy); }

/* Segmented control */
.ei-fc-seg { display: inline-flex; background: var(--ei-surface-2); border: 1px solid var(--ei-border); border-radius: 999px; padding: .25rem; gap: .15rem; }
[data-theme="dark"] .ei-fc-seg { background: var(--ei-bg); }
.ei-fc-seg__btn { border: 0; background: transparent; color: var(--ei-muted); font-weight: 600; font-size: .85rem; padding: .4rem .9rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.ei-fc-seg__btn.is-active { background: var(--ei-navy); color: #fff; }
.ei-fc-seg--sm .ei-fc-seg__btn { font-size: .8rem; padding: .32rem .7rem; }

/* ---------- Dashboard (data-terminal) ---------- */
/* Dense module grid. The three dial cards (plain .ei-fc-card) are kept as-is;
   every other module (.ei-fc-dcard) is tightened for the terminal feel. */
.ei-fc-term { display: flex; flex-direction: column; gap: 1rem; }
.ei-fc-term__dials { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.ei-fc-term__mid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1rem; align-items: start; }
.ei-fc-term__bot { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.ei-fc-term__mid > *, .ei-fc-term__bot > * { min-width: 0; }
@media (max-width: 1080px) {
	.ei-fc-term__dials { grid-template-columns: repeat(2, 1fr); }
	.ei-fc-term__mid, .ei-fc-term__bot { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .ei-fc-term__dials { grid-template-columns: 1fr; } }

/* Terminal tightening — scoped to the non-dial modules only. */
.ei-fc-term .ei-fc-dcard { padding: .85rem 1rem; border-radius: 12px; }
.ei-fc-term .ei-fc-dcard .ei-fc-card__title { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; padding-left: .6rem; margin-bottom: .7rem; }
.ei-fc-term .ei-fc-dcard > .ei-fc-card__title,
.ei-fc-term .ei-fc-dcard > .ei-fc-snap__head,
.ei-fc-term .ei-fc-dcard > .ei-fc-trend__head { padding-bottom: .5rem; margin-bottom: .75rem; }
.ei-fc-term .ei-fc-strip, .ei-fc-term .ei-fc-grid2, .ei-fc-term .ei-fc-trends { margin-top: 0; }
.ei-fc-term .ei-fc-strip__grid { grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.ei-fc-term .ei-fc-stat { padding: .5rem .6rem .45rem .8rem; border-radius: 9px; }
.ei-fc-term .ei-fc-stat__value { font-size: 1.2rem; }
.ei-fc-term .ei-fc-stat::before { width: 3px; }
.ei-fc-term .ei-fc-trend__chart, .ei-fc-term .ei-fc-snap__svg { width: 100%; }

/* National environment — the reframed dashboard lead */
.ei-fc-env { display: flex; flex-direction: column; gap: 1rem; margin-bottom: .9rem; }
.ei-fc-env__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 1080px) { .ei-fc-env__row { grid-template-columns: 1fr; } }

.ei-fc-envhero { border-left: 4px solid var(--ei-navy); }
.ei-fc-envhero.is-rep { border-left-color: var(--ei-red); }
.ei-fc-envhero__eyebrow { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--ei-muted); }
.ei-fc-envhero__head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin: .4rem 0 .55rem; }
.ei-fc-envhero__tilt { font-size: 1.7rem; font-weight: 800; color: var(--ei-heading); line-height: 1; }
.ei-fc-envhero__val { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ei-fc-envhero__val.is-dem { color: var(--ei-navy); }
.ei-fc-envhero__val.is-rep { color: var(--ei-red); }
.ei-fc-envhero__say { margin: 0; font-size: .94rem; color: var(--ei-text); line-height: 1.5; max-width: 70ch; }

.ei-fc-drivers__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
@media (max-width: 720px) { .ei-fc-drivers__grid { grid-template-columns: repeat(2, 1fr); } }
.ei-fc-drv { background: var(--ei-bg); border: 1px solid var(--ei-border); border-left: 3px solid var(--ei-border); border-radius: 10px; padding: .55rem .7rem; }
[data-theme="dark"] .ei-fc-drv { background: var(--ei-surface); }
.ei-fc-drv.is-dem { border-left-color: var(--ei-navy); }
.ei-fc-drv.is-rep { border-left-color: var(--ei-red); }
.ei-fc-drv__val { display: block; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ei-heading); line-height: 1.1; }
.ei-fc-drv.is-dem .ei-fc-drv__val { color: var(--ei-navy); }
.ei-fc-drv.is-rep .ei-fc-drv__val { color: var(--ei-red); }
.ei-fc-drv__lab { display: block; font-size: .76rem; font-weight: 600; color: var(--ei-heading); margin-top: .12rem; }
.ei-fc-drv__sub { display: block; font-size: .68rem; color: var(--ei-muted); }

.ei-fc-econ__head { font-size: .9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ei-fc-econ__head.is-dem { color: var(--ei-navy); }
.ei-fc-econ__head.is-rep { color: var(--ei-red); }
.ei-fc-econ__list { display: flex; flex-direction: column; }
.ei-fc-econ__row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .7rem; padding: .4rem 0; border-bottom: 1px solid var(--ei-border); }
.ei-fc-econ__row:last-child { border-bottom: 0; }
.ei-fc-econ__name b { display: block; font-size: .88rem; color: var(--ei-heading); }
.ei-fc-econ__sub { font-size: .72rem; color: var(--ei-muted); }
.ei-fc-econ__badge { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .14rem .5rem; border-radius: 999px; white-space: nowrap; }
.ei-fc-econ__badge.is-good { background: rgba(31, 157, 87, .14); color: #1f8a4d; }
.ei-fc-econ__badge.is-bad { background: rgba(224, 36, 31, .12); color: var(--ei-red); }
[data-theme="dark"] .ei-fc-econ__badge.is-good { color: #45c97f; }
.ei-fc-econ__val { font-size: .92rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ei-heading); min-width: 3.2rem; text-align: right; }

/* Environment section when placed below the forecast terminal */
.ei-fc-env--below { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--ei-border); }

/* Control-over-the-cycle chart (own full-width row) */
.ei-fc-ctrlhist__segs { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.ei-fc-ctrlhist .ei-fc-fhist__holder { margin-top: .2rem; }

/* 3-up dial row (no 4th cell now that popular vote is its own row) */
.ei-fc-term__dials--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1080px) { .ei-fc-term__dials--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ei-fc-term__dials--3 { grid-template-columns: 1fr; } }

/* Projected popular-vote card (own full-width row) */
.ei-fc-pv__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.4rem; align-items: center; }
@media (max-width: 720px) { .ei-fc-pv__grid { grid-template-columns: 1fr; gap: 1rem; } }
.ei-fc-pv__margin { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.ei-fc-pv__margin.is-dem { color: var(--ei-navy); }
.ei-fc-pv__margin.is-rep { color: var(--ei-red); }
.ei-fc-pv__bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; margin: .55rem 0; }
.ei-fc-pv__seg { display: flex; align-items: center; min-width: 0; }
.ei-fc-pv__seg b { color: #fff; font-size: .85rem; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0 .6rem; white-space: nowrap; }
.ei-fc-pv__seg.is-dem { background: var(--ei-navy); justify-content: flex-start; }
.ei-fc-pv__seg.is-rep { background: var(--ei-red); justify-content: flex-end; }
.ei-fc-pv__counts { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.ei-fc-pv__vc { display: flex; flex-direction: column; }
.ei-fc-pv__vc.is-rep { text-align: right; }
.ei-fc-pv__vc b { font-size: .9rem; }
.ei-fc-pv__vc.is-dem b { color: var(--ei-navy); }
.ei-fc-pv__vc.is-rep b { color: var(--ei-red); }
.ei-fc-pv__vc span { font-size: .8rem; color: var(--ei-muted); font-variant-numeric: tabular-nums; }
.ei-fc-pv__vctot { font-size: .76rem; color: var(--ei-muted); font-variant-numeric: tabular-nums; }
.ei-fc-pv__stats { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.ei-fc-pv__stat { background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: 10px; padding: .5rem .7rem; }
[data-theme="dark"] .ei-fc-pv__stat { background: var(--ei-surface); }
.ei-fc-pv__statlab { display: block; font-size: .68rem; color: var(--ei-muted); text-transform: uppercase; letter-spacing: .03em; }
.ei-fc-pv__statval { display: block; font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ei-heading); margin-top: .1rem; }
.ei-fc-pv__statval.is-dem { color: var(--ei-navy); }
.ei-fc-pv__statval.is-rep { color: var(--ei-red); }

/* Races-to-watch fills the row height (matched to the forecast-map card) */
.ei-fc-term__mid { align-items: stretch; }
.ei-fc-watchcard { display: flex; flex-direction: column; }
.ei-fc-watchcard .ei-fc-watch { flex: 1 1 0; min-height: 0; overflow-y: auto; }

/* Seat-ratings distribution bars */
.ei-fc-rdist { display: flex; flex-direction: column; gap: .32rem; }
.ei-fc-rdist__row { display: grid; grid-template-columns: 62px 1fr 28px; align-items: center; gap: .5rem; font-size: .76rem; }
.ei-fc-rdist__lab { color: var(--ei-muted); font-weight: 600; white-space: nowrap; }
.ei-fc-rdist__track { height: 12px; background: var(--ei-border); border-radius: 3px; overflow: hidden; }
.ei-fc-rdist__fill { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.ei-fc-rdist__n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ei-heading); }

.ei-fc-chambers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 820px) { .ei-fc-chambers { grid-template-columns: 1fr; } }
.ei-fc-chamber__head { display: flex; align-items: baseline; justify-content: space-between; }
.ei-fc-chamber__title { margin: 0; font-size: 1.1rem; color: var(--ei-heading); }
.ei-fc-chamber__sub { font-size: .78rem; color: var(--ei-muted); }
.ei-fc-chamber__split { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: .9rem 0 .35rem; }
.ei-fc-chamber__side { display: flex; flex-direction: column; align-items: center; }
.ei-fc-chamber__seats { font-size: 2.1rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ei-fc-chamber__side--dem .ei-fc-chamber__seats { color: var(--ei-navy); }
.ei-fc-chamber__side--rep .ei-fc-chamber__seats { color: var(--ei-red); }
.ei-fc-chamber__party { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ei-muted); margin-top: .15rem; }
.ei-fc-chamber__vs { color: var(--ei-muted); }
.ei-fc-seatbar { position: relative; height: 12px; border-radius: 999px; background: var(--ei-red); overflow: hidden; margin-top: .5rem; }
.ei-fc-seatbar__dem { position: absolute; inset: 0 auto 0 0; background: var(--ei-navy); }
.ei-fc-seatbar__marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ei-heading); transform: translateX(-1px); }
.ei-fc-chamber__legend { display: flex; justify-content: space-between; font-size: .74rem; color: var(--ei-muted); margin-top: .4rem; }
.ei-fc-prob { height: 8px; border-radius: 999px; background: var(--ei-surface-2); overflow: hidden; margin-top: .9rem; }
.ei-fc-prob__fill { display: block; height: 100%; }
.ei-fc-prob__fill.is-dem { background: var(--ei-navy); }
.ei-fc-prob__fill.is-rep { background: var(--ei-red); }
.ei-fc-chamber__ctrl-label { margin: .45rem 0 0; font-size: .82rem; font-weight: 600; color: var(--ei-heading); }

.ei-fc-strip { margin-top: 1rem; }
.ei-fc-strip__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; }
@media (max-width: 720px) { .ei-fc-strip__grid { grid-template-columns: repeat(3, 1fr); } }
.ei-fc-stat { position: relative; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: 11px; padding: .65rem .85rem .6rem 1rem; text-align: left; overflow: hidden; transition: transform .12s ease, border-color .12s ease; }
.ei-fc-stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ei-border); }
.ei-fc-stat.is-dem::before { background: var(--ei-navy); }
.ei-fc-stat.is-rep::before { background: var(--ei-red); }
.ei-fc-stat:hover { transform: translateY(-1px); border-color: var(--ei-navy); }
[data-theme="dark"] .ei-fc-stat { background: var(--ei-bg); }
.ei-fc-stat__value { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--ei-heading); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ei-fc-stat.is-dem .ei-fc-stat__value { color: var(--ei-navy); }
.ei-fc-stat.is-rep .ei-fc-stat__value { color: var(--ei-red); }
.ei-fc-stat__label { display: block; font-size: .72rem; font-weight: 600; color: var(--ei-muted); margin-top: .15rem; text-transform: uppercase; letter-spacing: .04em; }
.ei-fc-strip__note { margin: .8rem 0 0; font-size: .8rem; color: var(--ei-muted); }
.ei-fc-fund__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }

.ei-fc-trend__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.ei-fc-trend__legend, .ei-fc-trend__key { display: inline-flex; align-items: center; gap: .8rem; font-size: .78rem; color: var(--ei-muted); }
.ei-fc-trend__key { gap: .35rem; }
.ei-fc-trend__key i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.ei-fc-trend__ref { stroke: var(--ei-muted); stroke-dasharray: 3 3; opacity: .5; }
.ei-fc-axis text { fill: var(--ei-muted); font-size: 10px; }
.ei-fc-axis line, .ei-fc-axis path { stroke: var(--ei-border); }

/* ---------- Map ---------- */
.ei-fc-mapctl { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.ei-fc-mapstage { padding: 1rem; }
.ei-fc-mapsvg, .ei-fc-mapstage .ei-fc-mapsvg { width: 100%; }
.ei-fc-usmap { width: 100%; height: auto; display: block; }
/* Pan/zoom controls (core.mapZoom) */
.ei-fc-usmap.ei-fc-zoomable { cursor: grab; touch-action: none; }
.ei-fc-usmap.ei-fc-zoomable:active { cursor: grabbing; }
.ei-fc-zoomctl { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.ei-fc-zoomctl__btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; line-height: 1; border: 1px solid var(--ei-border); background: var(--ei-surface); color: var(--ei-heading); border-radius: 8px; cursor: pointer; box-shadow: 0 1px 3px rgba(16,24,40,.12); transition: border-color .12s ease, color .12s ease; }
.ei-fc-zoomctl__btn:hover { border-color: var(--ei-navy); color: var(--ei-navy); }
/* Keep the Map / Approval stage on-screen without scrolling, but as tall as it
   can be (preserveAspectRatio letterboxes; no distortion). */
.ei-fc-mapstage .ei-fc-usmap { max-height: 78vh; }
/* White borders for state/district units; heavier white state mesh on top. */
.ei-fc-usmap__unit { stroke: #fff; stroke-width: .5; stroke-linejoin: round; cursor: pointer; transition: fill .25s ease; }
.ei-fc-usmap__smesh { fill: none; stroke: #fff; stroke-width: 1; stroke-linejoin: round; pointer-events: none; }
.ei-fc-usmap__outline { fill: none; stroke: #fff; stroke-width: 1; stroke-linejoin: round; pointer-events: none; }
/* White county borders (approval county view), thinner than the state mesh. */
.ei-fc-usmap__cmesh { fill: none; stroke: #fff; stroke-width: .4; stroke-linejoin: round; pointer-events: none; }
/* County state-mesh keeps its subtle (background-toned) borders. */
.ei-fc-usmap__mesh { fill: none; stroke: var(--ei-bg); stroke-width: .8; stroke-linejoin: round; pointer-events: none; }
.ei-fc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .75rem; font-size: .76rem; color: var(--ei-muted); }
.ei-fc-legend__item { display: inline-flex; align-items: center; gap: .3rem; }
.ei-fc-legend__item i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.ei-fc-legend__title { font-weight: 700; color: var(--ei-heading); }
.ei-fc-legend__grad { width: 160px; height: 11px; border-radius: 3px; display: inline-block; }
.ei-fc-legend__labels { display: inline-flex; gap: .6rem; }

/* Tooltip */
.ei-fc-tip {
  position: fixed; z-index: 9999; pointer-events: none; max-width: 250px;
  background: var(--ei-navy-deep); color: #fff; padding: .6rem .75rem; border-radius: 10px;
  font-size: .82rem; box-shadow: 0 12px 30px rgba(0,0,0,.3); line-height: 1.4;
}
.ei-fc-tip strong { color: #fff; }
/* Toast for the tooltip-freeze toggle (auto-fades, so it's gone before a shot). */
.ei-fc-tiptoast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(10px);
  z-index: 10000; max-width: min(92vw, 420px); padding: .6rem 1.05rem; border-radius: 999px;
  background: var(--ei-navy-deep); color: #fff; font-size: .85rem; font-weight: 600; text-align: center;
  box-shadow: var(--ei-shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.ei-fc-tiptoast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.ei-fc-tip__cands { margin: .25rem 0; opacity: .92; }
.ei-fc-tip__cands .is-dem { color: #9fc1ee; } .ei-fc-tip__cands .is-rep { color: #ffb0ac; }
.ei-fc-tip__row { display: flex; justify-content: space-between; gap: 1rem; }
.ei-fc-tip__row span { opacity: .75; } .ei-fc-tip__row b { font-variant-numeric: tabular-nums; }
.ei-fc-tip__muted { opacity: .7; } .ei-fc-tip__hint { margin-top: .3rem; font-size: .72rem; opacity: .65; }

/* ---------- Swingometer ---------- */
.ei-fc-swing { display: grid; grid-template-columns: minmax(380px, 420px) 1fr; gap: 1rem; }
@media (max-width: 980px) { .ei-fc-swing { grid-template-columns: 1fr; } }
.ei-fc-swing__controls { position: sticky; top: calc(var(--ei-header-h) + 1rem); align-self: start; display: flex; flex-direction: column; box-sizing: border-box; padding: 1rem 1.1rem; max-height: calc(100vh - var(--ei-header-h) - 2rem); overflow-y: auto; overflow-x: hidden; }
/* Two-up demographic dials so the full set fits a desktop screen without scrolling. */
.ei-fc-swing__sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
@media (max-width: 520px) { .ei-fc-swing__sliders { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .ei-fc-swing__controls { position: static; max-height: none; } }
.ei-fc-swing__lede { font-size: .84rem; color: var(--ei-muted); margin: 0 0 .5rem; }
.ei-fc-swing__tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.ei-fc-swing__tab { flex: 1 1 auto; border: 1px solid var(--ei-border); background: var(--ei-surface); color: var(--ei-muted); padding: .4rem .5rem; border-radius: var(--ei-radius); font-size: .78rem; font-weight: 600; cursor: pointer; }
.ei-fc-swing__tab.is-active { background: var(--ei-navy); color: #fff; border-color: var(--ei-navy); }
.ei-fc-slider { margin-bottom: .32rem; min-width: 0; }
.ei-fc-slider__head { display: flex; justify-content: space-between; font-size: .8rem; }
.ei-fc-slider__label { color: var(--ei-text); font-weight: 600; }
.ei-fc-slider__val { font-variant-numeric: tabular-nums; font-weight: 700; }
.ei-fc-slider__val.is-dem { color: var(--ei-navy); } .ei-fc-slider__val.is-rep { color: var(--ei-red); }
.ei-fc-range { width: 100%; min-width: 0; margin: 0; accent-color: var(--ei-navy); }
.ei-fc-swing__uniform { border-top: 1px solid var(--ei-border); margin-top: .8rem; padding-top: .8rem; }
.ei-fc-swing__actions { display: flex; gap: .5rem; margin-top: auto; padding-top: 1rem; }
.ei-fc-swing__actions .ei-fc-btn { flex: 1; }
/* National environment readout — projected House popular vote, live as you swing. */
.ei-fc-swing__env { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.ei-fc-swing__env-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ei-muted); }
.ei-fc-swing__env-margin { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.ei-fc-swing__env-margin.is-dem { color: var(--ei-navy); }
.ei-fc-swing__env-margin.is-rep { color: var(--ei-red); }
.ei-fc-swing__env-bar { height: 10px; border-radius: 999px; overflow: hidden; background: var(--ei-red); margin-top: .15rem; }
.ei-fc-swing__env-bar-dem { display: block; height: 100%; background: var(--ei-navy); }
.ei-fc-swing__env-delta { font-size: .85rem; font-weight: 700; color: var(--ei-muted); }
.ei-fc-swing__env-delta.is-dem { color: var(--ei-navy); }
.ei-fc-swing__env-delta.is-rep { color: var(--ei-red); }

.ei-fc-swing__results { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1rem; }
@media (max-width: 620px) { .ei-fc-swing__results { grid-template-columns: 1fr; } }
.ei-fc-swing__result { background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); padding: .9rem 1rem; box-shadow: var(--ei-shadow); }
[data-theme="dark"] .ei-fc-swing__result { background: var(--ei-surface); }
.ei-fc-swing__result-ch { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ei-muted); }
.ei-fc-swing__result-seats { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.ei-fc-swing__result-seats .is-dem { color: var(--ei-navy); } .ei-fc-swing__result-seats .is-rep { color: var(--ei-red); }
.ei-fc-swing__result-vs { color: var(--ei-muted); font-weight: 400; }
.ei-fc-swing__result-delta { display: inline-block; font-size: .76rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--ei-surface-2); color: var(--ei-muted); }
.ei-fc-swing__result-delta.is-dem { background: rgba(27,75,143,.14); color: var(--ei-navy); }
.ei-fc-swing__result-delta.is-rep { background: rgba(224,36,31,.14); color: var(--ei-red); }
.ei-fc-swing__result-ctrl { display: block; font-size: .74rem; color: var(--ei-muted); margin-top: .35rem; }
.ei-fc-swing__result-odds { display: flex; align-items: center; gap: .5rem; margin-top: .55rem; }
.ei-fc-swing__result-oddslab { font-size: .72rem; color: var(--ei-muted); white-space: nowrap; }
.ei-fc-swing__result-oddsbar { flex: 1; min-width: 36px; }
.ei-fc-swing__result-oddsval { font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ei-fc-swing__result-oddsval.is-dem { color: var(--ei-navy); } .ei-fc-swing__result-oddsval.is-rep { color: var(--ei-red); }
.ei-fc-swing__legend { margin-top: .6rem; }
.ei-fc-swing__maptop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem .55rem; margin-bottom: .5rem; }
.ei-fc-swing__drill-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ei-fc-swing__drill-grid { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: center; margin-top: .5rem; }
@media (max-width: 620px) { .ei-fc-swing__drill-grid { grid-template-columns: 1fr; } }
.ei-fc-swing__metric { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--ei-border); }
.ei-fc-swing__metric-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.ei-fc-swing__metric-val.is-dem { color: var(--ei-navy); } .ei-fc-swing__metric-val.is-rep { color: var(--ei-red); }
.ei-fc-swing__tip { font-size: .8rem; color: var(--ei-muted); margin: .6rem 0 0; }
.ei-fc-donut { width: 150px; height: 150px; }
.ei-fc-donut__legend { display: flex; flex-wrap: wrap; gap: .3rem .7rem; margin-top: .5rem; font-size: .74rem; color: var(--ei-muted); }
.ei-fc-donut__key { display: inline-flex; align-items: center; gap: .3rem; }
.ei-fc-donut__key i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.ei-fc-fliplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .4rem; }
.ei-fc-flip { display: grid; grid-template-columns: auto auto 1fr; gap: .5rem; align-items: center; text-align: left; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius); padding: .45rem .6rem; cursor: pointer; font-size: .8rem; }
[data-theme="dark"] .ei-fc-flip { background: var(--ei-bg); }
.ei-fc-flip__code { font-weight: 700; color: var(--ei-heading); }
.ei-fc-flip__dir { font-size: .7rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; }
.ei-fc-flip__dir.is-dem { background: rgba(27,75,143,.14); color: var(--ei-navy); }
.ei-fc-flip__dir.is-rep { background: rgba(224,36,31,.14); color: var(--ei-red); }
.ei-fc-flip__margins { font-variant-numeric: tabular-nums; color: var(--ei-muted); }
.ei-fc-flip__cands { grid-column: 1 / -1; color: var(--ei-muted); font-size: .72rem; }
.ei-fc-swing__mapcard, .ei-fc-swing__drill, .ei-fc-swing__flipped { margin-bottom: 1rem; }

/* ---------- Race table ---------- */
.ei-fc-racebar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem; }
.ei-fc-search { flex: 1 1 240px; min-width: 200px; padding: .55rem .9rem; border: 1px solid var(--ei-field-border); background: var(--ei-field); border-radius: 999px; color: var(--ei-text); font-size: .9rem; }
.ei-fc-tablecard { padding: 0; overflow: hidden; }
.ei-fc-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ei-fc-th { text-align: left; padding: .7rem 1rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ei-muted); border-bottom: 1px solid var(--ei-border); position: sticky; top: 0; background: var(--ei-bg); }
[data-theme="dark"] .ei-fc-th { background: var(--ei-surface); }
.ei-fc-th.is-sortable { cursor: pointer; } .ei-fc-th.is-sortable:hover { color: var(--ei-navy); }
.ei-fc-tr { border-bottom: 1px solid var(--ei-border); cursor: pointer; transition: background .12s ease; }
.ei-fc-tr:hover { background: var(--ei-surface); }
[data-theme="dark"] .ei-fc-tr:hover { background: var(--ei-bg); }
.ei-fc-tr td { padding: .6rem 1rem; vertical-align: middle; }
.ei-fc-tr__code { display: block; font-weight: 700; color: var(--ei-heading); }
.ei-fc-tr__seat { display: block; font-size: .73rem; color: var(--ei-muted); }
.ei-fc-tr__cands { line-height: 1.3; }
.ei-fc-tr__cand { font-size: .82rem; } .ei-fc-tr__cand.is-lead { font-weight: 700; }
.ei-fc-tr__cand.is-dem { color: var(--ei-navy); } .ei-fc-tr__cand.is-rep { color: var(--ei-red); }
.ei-fc-tr__vs { color: var(--ei-muted); font-size: .72rem; margin: 0 .35rem; }
.ei-fc-tr__num { text-align: right; font-variant-numeric: tabular-nums; }
.ei-fc-tr__num .is-dem { color: var(--ei-navy); } .ei-fc-tr__num .is-rep { color: var(--ei-red); }
.ei-fc-rating { display: inline-block; font-size: .74rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; color: #fff; background: var(--rt, #8A94A6); white-space: nowrap; }
.ei-fc-rating--lg { font-size: .82rem; padding: .3rem .8rem; }
/* Merged Races tab: ratings board on top, then the race directory. */
.ei-fc-races__ratings { margin-bottom: 1.5rem; }
.ei-fc-races__title { font-size: 1.25rem; color: var(--ei-heading); margin: 1.75rem 0 1rem; padding-top: 1.4rem; border-top: 1px solid var(--ei-border); }
.ei-fc-racecount { font-size: .8rem; color: var(--ei-muted); margin: .8rem 0 0; }
.ei-fc-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: .8rem 0 0; }
.ei-fc-pager__btn { background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: 999px; padding: .35rem .9rem; font-weight: 600; font-size: .82rem; color: var(--ei-heading); cursor: pointer; transition: border-color .12s ease; }
[data-theme="dark"] .ei-fc-pager__btn { background: var(--ei-surface); }
.ei-fc-pager__btn:hover:not(:disabled) { border-color: var(--ei-navy); }
.ei-fc-pager__btn:disabled { opacity: .45; cursor: default; }
.ei-fc-pager__info { font-size: .82rem; color: var(--ei-muted); font-variant-numeric: tabular-nums; }
.ei-fc-table--compact td, .ei-fc-table--compact th { padding: .4rem .8rem; }

/* ---------- Detail slide-over ---------- */
.ei-fc-panel { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.ei-fc-panel__scrim { position: absolute; inset: 0; background: rgba(10,18,35,.45); opacity: 0; transition: opacity .25s ease; }
.ei-fc-panel.is-open { pointer-events: auto; }
.ei-fc-panel.is-open .ei-fc-panel__scrim { opacity: 1; }
.ei-fc-panel__sheet { position: absolute; top: 0; right: 0; height: 100%; width: min(560px, 94vw); background: var(--ei-bg); box-shadow: -20px 0 60px rgba(0,0,0,.25); overflow-y: auto; transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1); }
.ei-fc-panel.is-open .ei-fc-panel__sheet { transform: none; }
[data-theme="dark"] .ei-fc-panel__sheet { background: var(--ei-surface); }
.ei-fc-panel__body { padding: 1.5rem 1.6rem 3rem; }
.ei-fc-panel__x { position: absolute; top: 0; right: 0; border: 0; background: transparent; font-size: 1.1rem; color: var(--ei-muted); cursor: pointer; padding: .3rem .5rem; }
.ei-fc-detail__head { display: flex; align-items: flex-start; gap: .75rem; position: relative; padding-right: 2rem; }
.ei-fc-detail__code { display: block; font-size: 1.5rem; font-weight: 800; color: var(--ei-heading); }
.ei-fc-detail__seat { display: block; font-size: .82rem; color: var(--ei-muted); }
.ei-fc-detail__sec { margin-top: 1.5rem; }
.ei-fc-detail__sectitle { margin: 0 0 .6rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ei-muted); }
.ei-fc-detail__sectitle--center { display: flex; align-items: center; justify-content: center; gap: .5rem; text-align: center; }
.ei-fc-detail__sectitle--center .ei-fc-estbadge { margin-left: 0; }
.ei-fc-cands { display: grid; gap: .6rem; }
.ei-fc-cand { border: 1px solid var(--ei-border); border-left-width: 4px; border-radius: var(--ei-radius); padding: .6rem .8rem; }
.ei-fc-cand.is-dem { border-left-color: var(--ei-navy); } .ei-fc-cand.is-rep { border-left-color: var(--ei-red); } .ei-fc-cand.is-ind { border-left-color: var(--ei-muted); }
.ei-fc-cand__top { display: flex; align-items: center; gap: .5rem; }
.ei-fc-cand__name { font-weight: 700; color: var(--ei-heading); }
.ei-fc-cand__inc { font-size: .68rem; font-weight: 700; text-transform: uppercase; background: var(--ei-surface-2); color: var(--ei-muted); padding: .1rem .4rem; border-radius: 4px; }
.ei-fc-cand__meta { font-size: .78rem; color: var(--ei-muted); display: flex; gap: .5rem; }
.ei-fc-detail__tp { font-size: .8rem; color: var(--ei-muted); margin: .6rem 0 0; }
.ei-fc-detail__forecast { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; align-items: center; }
.ei-fc-detail__biglabel { display: block; font-size: .74rem; color: var(--ei-muted); }
.ei-fc-detail__bigval { font-size: 2rem; font-weight: 800; } .ei-fc-detail__bigval.is-dem { color: var(--ei-navy); } .ei-fc-detail__bigval.is-rep { color: var(--ei-red); } .ei-fc-detail__bigval.is-ind { color: #7A4FB5; }
.ei-fc-probbar, .ei-fc-voteshare { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin-top: .25rem; font-size: .72rem; font-weight: 700; color: #fff; }
.ei-fc-probbar__d, .ei-fc-voteshare .is-dem { background: var(--ei-navy); display: flex; align-items: center; justify-content: center; }
.ei-fc-probbar__i { background: #7A4FB5; display: flex; align-items: center; justify-content: center; min-width: 0; white-space: nowrap; }
.ei-fc-probbar__lk1, .ei-fc-probbar__lk2 { display: flex; align-items: center; justify-content: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.ei-fc-probbar--lock.is-dem .ei-fc-probbar__lk1 { background: var(--ei-navy); } .ei-fc-probbar--lock.is-dem .ei-fc-probbar__lk2 { background: #6f9bd6; }
.ei-fc-probbar--lock.is-rep .ei-fc-probbar__lk1 { background: var(--ei-red); } .ei-fc-probbar--lock.is-rep .ei-fc-probbar__lk2 { background: #ef8b87; }
.ei-fc-probbar__r, .ei-fc-voteshare .is-rep { background: var(--ei-red); display: flex; align-items: center; justify-content: center; }
.ei-fc-voteshare__seg { display: flex; align-items: center; justify-content: center; }
.ei-fc-voteshare .is-ind { background: #7A4FB5; } .ei-fc-voteshare .is-oth { background: #8A94A6; }
.ei-fc-voteshare__legend { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; font-size: .76rem; }
.ei-fc-voteshare__key.is-dem { color: var(--ei-navy); } .ei-fc-voteshare__key.is-rep { color: var(--ei-red); }
.ei-fc-spark__svg, .ei-fc-pollchart__chart { width: 100%; height: auto; }
.ei-fc-polls { display: grid; gap: .3rem; margin-top: .5rem; }
.ei-fc-poll { display: grid; grid-template-columns: 64px 1fr auto auto; gap: .5rem; align-items: center; font-size: .8rem; padding: .3rem 0; border-bottom: 1px solid var(--ei-border); }
.ei-fc-poll__date { color: var(--ei-muted); font-variant-numeric: tabular-nums; }
.ei-fc-poll__rating { color: #E0A11F; font-size: .74rem; }
.ei-fc-poll__res .is-dem { color: var(--ei-navy); } .ei-fc-poll__res .is-rep { color: var(--ei-red); }
.ei-fc-detail__pollavg { font-size: .85rem; margin: 0 0 .4rem; }
.ei-fc-rcv { width: 100%; border-collapse: collapse; font-size: .8rem; }
.ei-fc-rcv th, .ei-fc-rcv td { padding: .35rem .5rem; text-align: center; border-bottom: 1px solid var(--ei-border); }
.ei-fc-rcv td.is-dem { color: var(--ei-navy); } .ei-fc-rcv td.is-rep { color: var(--ei-red); }
.ei-fc-demo__row { margin-bottom: .55rem; }
.ei-fc-demo__head { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: .2rem; }
.ei-fc-demo__group { font-weight: 600; color: var(--ei-text); } .ei-fc-demo__share { color: var(--ei-muted); }
.ei-fc-demo__bar { display: flex; height: 20px; border-radius: 5px; overflow: hidden; font-size: .68rem; font-weight: 700; color: #fff; }
.ei-fc-demo__d { background: var(--ei-navy); display: flex; align-items: center; padding-left: .35rem; }
.ei-fc-demo__r { background: var(--ei-red); display: flex; align-items: center; justify-content: flex-end; padding-right: .35rem; }
.ei-fc-demo__i { background: #7A4FB5; display: flex; align-items: center; justify-content: center; }
.ei-fc-hist { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.ei-fc-hist__cell { text-align: center; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius); padding: .6rem; }
[data-theme="dark"] .ei-fc-hist__cell { background: var(--ei-bg); }
.ei-fc-hist__yr { display: block; font-size: .74rem; color: var(--ei-muted); }
.ei-fc-hist__val { font-weight: 800; font-variant-numeric: tabular-nums; } .ei-fc-hist__val.is-dem { color: var(--ei-navy); } .ei-fc-hist__val.is-rep { color: var(--ei-red); }
/* Partisan lean (PVI) headline */
.ei-fc-hist__pvi { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .6rem .8rem; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius); margin-bottom: .5rem; }
[data-theme="dark"] .ei-fc-hist__pvi { background: var(--ei-bg); }
.ei-fc-hist__pvilab { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ei-muted); }
.ei-fc-hist__pvival { font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; } .ei-fc-hist__pvival.is-dem { color: var(--ei-navy); } .ei-fc-hist__pvival.is-rep { color: var(--ei-red); }
/* District / state makeup */
.ei-fc-hist__subh { margin: 1rem 0 .5rem; font-size: .8rem; font-weight: 700; color: var(--ei-heading); }
.ei-fc-hist__compbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid var(--ei-border); }
.ei-fc-hist__compseg { display: flex; align-items: center; justify-content: center; min-width: 2px; color: #fff; font-size: .68rem; font-weight: 700; }
.ei-fc-hist__complegend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .5rem; font-size: .76rem; color: var(--ei-text); }
.ei-fc-hist__complegitem { display: inline-flex; align-items: center; gap: .3rem; }
.ei-fc-hist__compdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Polls ---------- */
.ei-fc-pollchart__svg { width: 100%; }
.ei-fc-dot { opacity: .5; cursor: pointer; } .ei-fc-dot:hover { opacity: 1; }
.ei-fc-pollsters { margin-top: 1rem; max-height: 420px; overflow-y: auto; }

/* ---------- Control gauge (dashboard chamber cards) ---------- */
.ei-fc-gauge { margin: .5rem 0 .25rem; }
.ei-fc-gauge__title { text-align: center; font-size: .9rem; font-weight: 600; color: var(--ei-heading); }
.ei-fc-gauge__pct { font-size: 1.2rem; font-weight: 800; }
.ei-fc-gauge__pct.is-dem { color: var(--ei-navy); } .ei-fc-gauge__pct.is-rep { color: var(--ei-red); }
.ei-fc-gauge__svg { width: 100%; max-width: 270px; display: block; margin: .15rem auto 0; }
.ei-fc-gauge__needle { stroke: var(--ei-heading); stroke-width: 3; stroke-linecap: round; }
.ei-fc-gauge__hub { fill: var(--ei-bg); stroke: var(--ei-heading); stroke-width: 2; }
[data-theme="dark"] .ei-fc-gauge__hub { fill: var(--ei-surface); }
.ei-fc-gauge__end { font-size: 13px; font-weight: 800; }
.ei-fc-gauge__end.is-dem { fill: var(--ei-navy); } .ei-fc-gauge__end.is-rep { fill: var(--ei-red); }

/* ---------- Interactive chart bits ---------- */
.ei-fc-guide { stroke: var(--ei-muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; pointer-events: none; }
.ei-fc-focusdot { stroke: var(--ei-bg); stroke-width: 2; pointer-events: none; }
[data-theme="dark"] .ei-fc-focusdot { stroke: var(--ei-surface); }
.ei-fc-tip__row span[style] { font-weight: 600; }

/* County layers: drop the per-unit stroke (too dense at 3,142 counties) */
.ei-fc-usmap__unit--co { stroke: none; }

/* Map controls: three left-aligned groups */
.ei-fc-mapctl { justify-content: flex-start; gap: .6rem .9rem; }

/* ---------- Odds breakdown board ---------- */
.ei-fc-odds__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.ei-fc-odds__filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.ei-fc-racehist__seg { margin: 0 0 .6rem; }
.ei-fc-estnote { font-size: .74rem; color: var(--ei-muted); font-style: italic; margin: .5rem 0 0; }
.ei-fc-estbadge { display: inline-block; margin-left: .5rem; font-size: .6rem; font-weight: 800; letter-spacing: .06em; color: #b06a00; background: rgba(217, 138, 0, .14); padding: .15rem .5rem; border-radius: 999px; vertical-align: middle; }
[data-theme="dark"] .ei-fc-estbadge { color: #e0a83a; background: rgba(217, 138, 0, .2); }

/* Ranked-choice vote-flow (alluvial) */
.ei-fc-rcvflow__holder { margin: .3rem 0; }
.ei-fc-rcvflow { width: 100%; height: auto; overflow: visible; }
.ei-fc-rcvflow__lab { font-size: 11px; fill: var(--ei-heading); }
.ei-fc-rcvflow__pct { fill: var(--ei-muted); font-variant-numeric: tabular-nums; }
.ei-fc-rcvflow__hd { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; fill: var(--ei-muted); }
.ei-fc-odds__title { margin: 0; font-size: 1.3rem; color: var(--ei-heading); }
.ei-fc-odds__note { margin: .2rem 0 0; font-size: .8rem; color: var(--ei-muted); }
.ei-fc-flip-key { background: #C9A227; color: #3a2d00; padding: .05rem .4rem; border-radius: 4px; font-weight: 700; }
.ei-fc-odds { display: flex; gap: 8px; align-items: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
.ei-fc-odds__col { flex: 1 0 104px; min-width: 104px; }
@media (max-width: 720px) { .ei-fc-odds { flex-wrap: wrap; overflow-x: visible; } .ei-fc-odds__col { flex: 1 1 132px; } }
.ei-fc-odds__colhead { display: flex; justify-content: center; align-items: baseline; gap: .35rem; color: #fff; font-weight: 800; font-size: .76rem; letter-spacing: .02em; padding: .45rem .4rem; border-radius: 7px 7px 0 0; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.ei-fc-odds__count { font-weight: 600; opacity: .9; }
.ei-fc-odds__list { column-gap: 6px; padding: 6px 5px; background: var(--ei-surface); border-radius: 0 0 7px 7px; }
[data-theme="dark"] .ei-fc-odds__list { background: var(--ei-bg); }
.ei-fc-odds__tile { break-inside: avoid; display: flex; justify-content: space-between; align-items: center; gap: .4rem; width: 100%; text-align: left; background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: 5px; padding: .22rem .45rem; margin-bottom: 5px; font-size: .74rem; cursor: pointer; transition: border-color .12s ease; }
[data-theme="dark"] .ei-fc-odds__tile { background: var(--ei-surface); }
.ei-fc-odds__tile:hover { border-color: var(--ei-navy); }
.ei-fc-odds__tile.is-flip { background: #C9A227; border-color: #a8851f; }
.ei-fc-odds__code { font-weight: 700; color: var(--ei-heading); }
.ei-fc-odds__tile.is-flip .ei-fc-odds__code { color: #2a2000; }
.ei-fc-odds__pct { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.ei-fc-odds__pct .is-dem { color: var(--ei-navy); } .ei-fc-odds__pct .is-rep { color: var(--ei-red); }
.ei-fc-odds__tile.is-flip .ei-fc-odds__pct .is-dem { color: #0E2C5A; } .ei-fc-odds__tile.is-flip .ei-fc-odds__pct .is-rep { color: #7E120F; }
.ei-fc-odds__hidden { margin: .3rem 0 0; padding: 0 5px; font-size: .68rem; color: var(--ei-muted); font-style: italic; }

/* ---------- Race detail as a full page ---------- */
.ei-fc-racepage { max-width: 1120px; margin: 0 auto; }
.ei-fc-back { display: inline-flex; align-items: center; gap: .35rem; background: transparent; border: 0; color: var(--ei-link); font-weight: 600; font-size: .9rem; cursor: pointer; padding: .3rem 0; margin-bottom: .4rem; }
.ei-fc-back:hover { text-decoration: underline; }
.ei-fc-racepage__head { display: flex; align-items: center; gap: 1rem; }
.ei-fc-racepage__head .ei-fc-detail__code { font-size: 2rem; }
/* Balanced two-column masonry — cards flow to equalize column height (no empty
   left column when the right side is taller). */
.ei-fc-racepage__cards { columns: 2; column-gap: 1rem; margin-top: 1.1rem; }
@media (max-width: 840px) { .ei-fc-racepage__cards { columns: 1; } }
.ei-fc-racepage__cards > .ei-fc-detail__sec { break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 1rem; }
/* Pin the county forecast to the top of the right column on every race (the
   balanced masonry otherwise lands it in different spots race to race). */
.ei-fc-racepage__cards > .ei-fc-detail__sec--county { break-before: column; -webkit-column-break-before: always; }
@media (max-width: 840px) { .ei-fc-racepage__cards > .ei-fc-detail__sec--county { break-before: auto; -webkit-column-break-before: auto; } }
.ei-fc-racepage .ei-fc-detail__sec { background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); padding: 1.1rem 1.25rem; box-shadow: var(--ei-shadow); }

/* Projected vote counts by candidate */
.ei-fc-votecounts { display: flex; flex-direction: column; margin-top: .8rem; }
.ei-fc-votecounts__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 1px solid var(--ei-border); padding: .4rem 0; }
.ei-fc-votecounts__name { font-weight: 600; font-size: .9rem; color: var(--ei-heading); }
.ei-fc-votecounts__name.is-dem { color: var(--ei-navy); } .ei-fc-votecounts__name.is-rep { color: var(--ei-red); } .ei-fc-votecounts__name.is-ind { color: #7A4FB5; }
.ei-fc-votecounts__n { font-variant-numeric: tabular-nums; font-weight: 800; font-size: .98rem; color: var(--ei-heading); white-space: nowrap; }
[data-theme="dark"] .ei-fc-racepage .ei-fc-detail__sec { background: var(--ei-surface); }
.ei-fc-racepage .ei-fc-blend { margin-top: 1rem; }

/* ---------- Race page: "Crunching the numbers" — TI-84 forecast blender ---------- */
.ei-fc-blend__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: center; margin-top: .6rem; }
@media (max-width: 760px) { .ei-fc-blend__grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.ei-fc-blend__inputs { display: flex; flex-direction: column; gap: 1.4rem; }
.ei-fc-blend__ghead { display: flex; align-items: baseline; gap: .5rem; border-bottom: 2px solid var(--ei-border); padding-bottom: .35rem; margin-bottom: .55rem; }
.ei-fc-blend__glabel { font-weight: 800; color: var(--ei-heading); font-size: .98rem; margin-right: auto; }
.ei-fc-blend__gweight { font-size: .68rem; font-weight: 700; letter-spacing: .02em; color: var(--ei-muted); background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: 999px; padding: .08rem .5rem; white-space: nowrap; }
.ei-fc-blend__gmargin { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.ei-fc-blend__gmargin.is-dem, .ei-fc-blend__rval.is-dem { color: var(--ei-navy); }
.ei-fc-blend__gmargin.is-rep, .ei-fc-blend__rval.is-rep { color: var(--ei-red); }
.ei-fc-blend__gmargin.is-ind, .ei-fc-blend__rval.is-ind { color: var(--ei-ind); }
.ei-fc-blend__rows { display: flex; flex-direction: column; gap: .4rem; min-width: 0; margin-top: .4rem; }
.ei-fc-blend__row { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center; font-size: .86rem; color: var(--ei-text); }
.ei-fc-blend__row--poll { grid-template-columns: 1fr 64px auto; }
.ei-fc-blend__rname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ei-fc-blend__rtrack { height: 8px; border-radius: 4px; background: var(--ei-border); overflow: hidden; }
.ei-fc-blend__rfill { display: block; height: 100%; }
.ei-fc-blend__rfill.is-dem { background: var(--ei-navy); } .ei-fc-blend__rfill.is-rep { background: var(--ei-red); }
.ei-fc-blend__rfill.is-ind { background: var(--ei-ind); }
.ei-fc-blend__rval { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ei-fc-blend__note { font-size: .72rem; color: var(--ei-muted); font-style: italic; margin: .35rem 0 0; }
.ei-fc-blend__calc { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ei-fc-blend__calcwrap { width: 100%; max-width: 232px; }
.ei-fc-calc__svg { width: 100%; height: auto; display: block; }
.ei-fc-blend__projlabel { margin-top: .5rem; font-weight: 800; letter-spacing: .14em; font-size: .8rem; color: var(--ei-muted); }
.ei-fc-blend__proj { font-weight: 800; font-size: 2.3rem; font-variant-numeric: tabular-nums; line-height: 1.05; }
.ei-fc-blend__proj.is-dem { color: var(--ei-navy); } .ei-fc-blend__proj.is-rep { color: var(--ei-red); }
.ei-fc-blend__proj.is-ind { color: var(--ei-ind); }
.ei-fc-calc__body { fill: #3a3f47; stroke: #11151b; stroke-width: 3; }
.ei-fc-calc__brand { fill: #aab3c0; font-size: 10px; font-weight: 800; letter-spacing: .07em; }
.ei-fc-calc__screen { fill: #b9c6ad; stroke: #11151b; stroke-width: 2; }
/* LCD readout: dark ink on the green screen, monospaced numerals. */
.ei-fc-calc__sttl { fill: #46553b; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.ei-fc-calc__slabel { fill: #2f3a27; font-size: 13px; font-weight: 700; }
.ei-fc-calc__sval { fill: #2f3a27; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ei-fc-calc__sval.is-dem { fill: #18377d; } .ei-fc-calc__sval.is-rep { fill: #8c1c1c; }
.ei-fc-calc__sval.is-ind { fill: #5b1d8a; }
.ei-fc-calc__swt { fill: #5d6c50; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ei-fc-calc__sdiv { stroke: #5d6c50; stroke-width: 1.2; }
.ei-fc-calc__sproj { fill: #2f3a27; font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.ei-fc-calc__sprojval { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ei-fc-calc__sprojval.is-dem { fill: #18377d; } .ei-fc-calc__sprojval.is-rep { fill: #8c1c1c; }
.ei-fc-calc__sprojval.is-ind { fill: #5b1d8a; }
.ei-fc-calc__btn { fill: #565d68; }
.ei-fc-calc__dpad { fill: #565d68; stroke: #2b313a; stroke-width: 2; }

/* ---------- Info tab ---------- */
.ei-fc-info { display: flex; flex-direction: column; gap: 1.4rem; max-width: 860px; margin: 0 auto; }
.ei-fc-info__card { padding: 1.7rem 1.9rem; }
.ei-fc-info__h { margin: 0 0 .8rem; font-size: 1.3rem; color: var(--ei-heading); }
.ei-fc-info__h3 { margin: 1.4rem 0 .5rem; font-size: 1rem; color: var(--ei-heading); letter-spacing: .01em; }
.ei-fc-info__p { margin: 0 0 .7rem; color: var(--ei-text); line-height: 1.6; }
.ei-fc-info__note { margin: .2rem 0 0; font-size: .82rem; color: var(--ei-muted); line-height: 1.5; }
/* Free / not-paywalled hero card */
.ei-fc-info__free { background: linear-gradient(135deg, var(--ei-navy), #11315f); color: #fff; border: none; }
.ei-fc-info__badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: rgba(255,255,255,.16); color: #fff; padding: .25rem .7rem; border-radius: 999px; margin-bottom: .9rem; }
.ei-fc-info__freeh { margin: 0 0 .6rem; font-size: 1.7rem; line-height: 1.15; color: #fff; }
.ei-fc-info__lede { margin: 0 0 1.2rem; color: rgba(255,255,255,.88); line-height: 1.6; max-width: 60ch; }
.ei-fc-info__btn { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .95rem; padding: .6rem 1.15rem; border-radius: 10px; border: 1px solid var(--ei-border); background: var(--ei-surface); color: var(--ei-heading); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.ei-fc-info__btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.ei-fc-info__btn--primary { background: #fff; color: var(--ei-navy); border-color: #fff; }
/* Downloads */
.ei-fc-info__btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .3rem; }
.ei-fc-info__dls { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; margin-top: .4rem; }
.ei-fc-info__dl { display: grid; grid-template-columns: 1fr auto; column-gap: .5rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--ei-border); border-radius: 10px; background: var(--ei-surface); text-decoration: none; transition: border-color .12s ease, transform .12s ease; }
.ei-fc-info__dl:hover { border-color: var(--ei-navy); transform: translateY(-1px); }
.ei-fc-info__dlname { grid-column: 1 / -1; font-weight: 700; color: var(--ei-heading); font-size: .9rem; }
.ei-fc-info__dlfile { grid-column: 1; grid-row: 2; font-size: .74rem; color: var(--ei-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; min-width: 0; overflow-wrap: anywhere; margin-top: .12rem; }
.ei-fc-info__dlicon { grid-column: 2; grid-row: 2; align-self: end; font-weight: 800; color: var(--ei-navy); }
/* Equations */
.ei-fc-info__eq { margin: .7rem 0 1rem; padding: .7rem 1rem; background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: 10px; overflow-x: auto; }
.ei-fc-info__texraw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: var(--ei-text); white-space: pre-wrap; }
.ei-fc-info .katex { font-size: 1.08em; }
.ei-fc-info .katex-display { margin: 0; }
.ei-fc-info__p code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: 5px; padding: .05rem .35rem; }
[data-theme="dark"] .ei-fc-info__p code { background: var(--ei-surface); }

/* Data credits */
.ei-fc-info__credits { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: .4rem 0 .9rem; }
@media (max-width: 720px) { .ei-fc-info__credits { grid-template-columns: 1fr; } }
.ei-fc-info__credit { background: var(--ei-bg); border: 1px solid var(--ei-border); border-left: 3px solid var(--ei-navy); border-radius: 10px; padding: .65rem .8rem; }
[data-theme="dark"] .ei-fc-info__credit { background: var(--ei-surface); }
.ei-fc-info__creditsrc { display: block; font-weight: 700; font-size: .9rem; color: var(--ei-heading); }
.ei-fc-info__creditwhat { display: block; font-size: .82rem; color: var(--ei-muted); line-height: 1.5; margin-top: .15rem; }

/* Coming-soon placeholder (Legislatures tab) */
.ei-fc-soon { text-align: center; padding: clamp(2rem, 6vw, 4.5rem) 1.5rem; }
.ei-fc-soon__badge { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ei-navy); background: rgba(27, 75, 143, .1); padding: .3rem .85rem; border-radius: 999px; }
[data-theme="dark"] .ei-fc-soon__badge { background: rgba(77, 143, 224, .18); color: var(--ei-navy); }
.ei-fc-soon__title { margin: 1rem 0 .6rem; font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--ei-heading); }
.ei-fc-soon__lede { max-width: 56ch; margin: 0 auto; color: var(--ei-text); line-height: 1.6; }
.ei-fc-soon__meta { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem); margin-top: 2.2rem; }
.ei-fc-soon__stat { display: flex; flex-direction: column; }
.ei-fc-soon__statval { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ei-navy); line-height: 1; }
.ei-fc-soon__statlab { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ei-muted); margin-top: .2rem; }


/* ---------- Swingometer: partisanship/turnout controls ---------- */
.ei-fc-swing__modeseg { display: flex; width: 100%; margin: 0 0 .8rem; }
.ei-fc-swing__modeseg .ei-fc-seg__btn { flex: 1; }
/* Intro line spans the full two-column dial grid so the dials stay aligned. */
.ei-fc-swing__hint { grid-column: 1 / -1; font-size: .74rem; color: var(--ei-muted); margin: 0 0 .6rem; line-height: 1.45; }
.ei-fc-range--turnout { accent-color: #1E9E8A; }
.ei-fc-slider__val--turnout { color: var(--ei-text); }
.ei-fc-slider__val--turnout.is-up { color: #1E9E8A; }
.ei-fc-slider__val--turnout.is-down { color: var(--ei-muted); }

/* ---------- Dashboard: national trend mini-charts ---------- */
.ei-fc-trends { margin-top: 1rem; }
.ei-fc-trends__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 720px) { .ei-fc-trends__grid { grid-template-columns: 1fr; } }
.ei-fc-mini { padding: 1rem 1.1rem; }
.ei-fc-mini__title { margin: 0; font-size: .82rem; color: var(--ei-muted); font-weight: 600; }
.ei-fc-mini__now { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ei-heading); line-height: 1.1; }
.ei-fc-mini__now.is-dem { color: var(--ei-navy); } .ei-fc-mini__now.is-rep { color: var(--ei-red); }
.ei-fc-mini__svg { width: 100%; } .ei-fc-mini__chart { width: 100%; height: auto; display: block; }

/* ---------- Polls: recent-polls list (split-bar rows) ---------- */
.ei-fc-recent { padding: 0; overflow: hidden; }
.ei-fc-recent .ei-fc-card__title { padding: 1rem 1rem 0; margin-bottom: .25rem; }
.ei-fc-polllist { padding: .25rem .25rem .5rem; }
.ei-fc-pollrow { display: grid; grid-template-columns: minmax(120px, 1.3fr) 1.6fr auto; gap: .75rem; align-items: center; padding: .45rem .85rem; border-top: 1px solid var(--ei-border); }
.ei-fc-pollrow:first-child { border-top: 0; }
.ei-fc-pollrow__meta { display: flex; flex-direction: column; min-width: 0; }
.ei-fc-pollrow__name { font-weight: 600; color: var(--ei-heading); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ei-fc-pollrow__date { font-size: .7rem; color: var(--ei-muted); }
.ei-fc-pollrow__bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--ei-border); }
.ei-fc-pollrow__seg { height: 100%; }
.ei-fc-pollrow__margin { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .82rem; text-align: right; min-width: 42px; }
.ei-fc-pollrow__margin.is-dem { color: var(--ei-navy); } .ei-fc-pollrow__margin.is-rep { color: var(--ei-red); }

/* ---------- Polls: pollster ratings as ranked bars ---------- */
.ei-fc-pratings { display: flex; flex-direction: column; gap: .3rem; margin-top: .5rem; }
.ei-fc-prating { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: .7rem; align-items: center; }
.ei-fc-prating__name { font-size: .82rem; color: var(--ei-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ei-fc-prating__track { height: 8px; border-radius: 5px; background: var(--ei-border); overflow: hidden; }
.ei-fc-prating__fill { display: block; height: 100%; border-radius: 5px; }
.ei-fc-prating__val { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--ei-heading); min-width: 28px; text-align: right; }
.ei-fc-prating.is-banned .ei-fc-prating__name { color: var(--ei-muted); }
.ei-fc-prating.is-banned .ei-fc-prating__track { background: repeating-linear-gradient(45deg, var(--ei-border) 0 6px, transparent 6px 12px); }
.ei-fc-prating__banned { font-size: .62rem; font-weight: 800; letter-spacing: .06em; color: var(--ei-red); background: color-mix(in srgb, var(--ei-red) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ei-red) 35%, transparent); border-radius: 999px; padding: .12rem .42rem; min-width: 0; }

/* ---------- Approval tab intro ---------- */
.ei-fc-approval__intro { margin-bottom: 1rem; }
.ei-fc-appr__drivers { margin-top: 1rem; }
.ei-fc-appr__drivers .ei-fc-econ__list { margin-top: .8rem; }
.ei-fc-appr__lede { margin: .3rem 0 0; font-size: .9rem; line-height: 1.5; color: var(--ei-text); }


/* ---------- Dashboard digest (snapshot maps + races to watch) ---------- */
.ei-fc-snapgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1rem; margin-top: 1rem; }
.ei-fc-snap__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.ei-fc-snap__link { background: transparent; border: 0; color: var(--ei-link); font-weight: 600; cursor: pointer; font-size: .82rem; white-space: nowrap; }
.ei-fc-snap__link:hover { text-decoration: underline; }
.ei-fc-snap__map { cursor: pointer; border-radius: var(--ei-radius); overflow: hidden; }
.ei-fc-snap__svg { width: 100%; height: auto; display: block; }
.ei-fc-watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem; }
.ei-fc-watch__row { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; text-align: left; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius); padding: .4rem .65rem; cursor: pointer; }
[data-theme="dark"] .ei-fc-watch__row { background: var(--ei-bg); }
.ei-fc-watch__row:hover { border-color: var(--ei-navy); }
.ei-fc-watch__code { font-weight: 700; color: var(--ei-heading); font-size: .82rem; }
.ei-fc-watch__margin { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .82rem; }
.ei-fc-watch__margin.is-dem { color: var(--ei-navy); } .ei-fc-watch__margin.is-rep { color: var(--ei-red); }

/* ---------- Race-page county-level forecast map ---------- */
.ei-fc-countymap { width: 100%; }
.ei-fc-countymap .ei-fc-usmap { max-height: 460px; }


/* Downsize race-page county map to card height; competitive race poll charts */
.ei-fc-countymap .ei-fc-usmap { height: 300px; max-height: 300px; }
.ei-fc-pollgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; margin-top: .5rem; }
.ei-fc-pollcell { border: 1px solid var(--ei-border); border-radius: var(--ei-radius); padding: .6rem .7rem; background: var(--ei-surface); }
[data-theme="dark"] .ei-fc-pollcell { background: var(--ei-bg); }
.ei-fc-pollcell__head { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; background: transparent; border: 0; cursor: pointer; text-align: left; width: 100%; padding: 0 0 .3rem; }
.ei-fc-pollcell__code { font-weight: 700; color: var(--ei-heading); }
.ei-fc-pollcell__cands { font-size: .72rem; color: var(--ei-muted); }
.ei-fc-pollcell__head:hover .ei-fc-pollcell__code { color: var(--ei-navy); }
.ei-fc-pollcell__chart { width: 100%; height: auto; display: block; }
.ei-fc-fcref { stroke: var(--ei-navy); stroke-dasharray: 4 3; opacity: .65; }
/* Race-page polling chart (margin over time) */
.ei-fc-racepoll { width: 100%; margin-top: .4rem; }
.ei-fc-racepoll__svg { display: block; max-width: 100%; }
.ei-fc-racepoll__dot { opacity: .42; }
.ei-fc-racepoll__avg { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.ei-fc-focusdot { stroke: #fff; stroke-width: 1.5; }

/* ---------- Per-chamber tabs (House / Senate / Governors) ---------- */
.ei-fc-chmb__head { margin-bottom: 1rem; }
.ei-fc-chmb__top { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
@media (max-width: 720px) { .ei-fc-chmb__top { grid-template-columns: 1fr; } }
.ei-fc-chmb__gauge { display: flex; align-items: center; justify-content: center; }
.ei-fc-chmb__proj { display: flex; flex-direction: column; justify-content: center; gap: .6rem; }
.ei-fc-chmb__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.ei-fc-chmb__fact { background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius); padding: .5rem; text-align: center; }
[data-theme="dark"] .ei-fc-chmb__fact { background: var(--ei-surface); }
.ei-fc-chmb__factval { display: block; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ei-heading); line-height: 1.1; }
.ei-fc-chmb__fact.is-dem .ei-fc-chmb__factval { color: var(--ei-navy); }
.ei-fc-chmb__fact.is-rep .ei-fc-chmb__factval { color: var(--ei-red); }
.ei-fc-chmb__factlab { display: block; font-size: .68rem; color: var(--ei-muted); text-transform: uppercase; letter-spacing: .03em; }
.ei-fc-chmb__sec { margin-bottom: 1rem; }
.ei-fc-chmb__sechead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; }
.ei-fc-chmb__sechead .ei-fc-card__title { margin: 0; }
/* Hex cartogram (House Map↔Cartogram toggle). Hexes carry no border; white lines
   are drawn only between different-state hexes (the state-group outlines). */
.ei-fc-hexmap { width: 100%; height: auto; }
/* Thin white outline on every hex = district borders; the heavier mesh marks
   state borders on top. */
.ei-fc-hex { stroke: rgba(255, 255, 255, .5); stroke-width: .5; }
.ei-fc-hex__border { stroke: #fff; stroke-width: 1; stroke-linecap: round; pointer-events: none; }
/* Per-view geometry wrapper (Map / Cartogram are both cached, one shown) — the
   positioning context for that view's zoom controls. */
.ei-fc-chmb__mapview { position: relative; }
.ei-fc-chmb__mapsegs { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.ei-fc-chmb__count { font-size: .8rem; color: var(--ei-muted); font-weight: 600; }

/* House popular-vote card */
.ei-fc-chmb__pv { margin-bottom: 1rem; }
.ei-fc-chmb__pvhead { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.ei-fc-chmb__pvhead.is-dem { color: var(--ei-navy); }
.ei-fc-chmb__pvhead.is-rep { color: var(--ei-red); }
.ei-fc-chmb__pvbar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; margin: .2rem 0 .7rem; }
.ei-fc-chmb__pvseg { display: flex; align-items: center; min-width: 0; }
.ei-fc-chmb__pvseg b { color: #fff; font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0 .55rem; white-space: nowrap; }
.ei-fc-chmb__pvseg.is-dem { background: var(--ei-navy); justify-content: flex-start; }
.ei-fc-chmb__pvseg.is-rep { background: var(--ei-red); justify-content: flex-end; }
.ei-fc-chmb__pvleg { display: flex; justify-content: space-between; gap: 1rem; }
.ei-fc-chmb__pvside { display: flex; flex-direction: column; }
.ei-fc-chmb__pvside.is-rep { text-align: right; }
.ei-fc-chmb__pvside b { font-size: .9rem; color: var(--ei-heading); }
.ei-fc-chmb__pvside.is-dem b { color: var(--ei-navy); }
.ei-fc-chmb__pvside.is-rep b { color: var(--ei-red); }
.ei-fc-chmb__pvside span { font-size: .8rem; color: var(--ei-muted); font-variant-numeric: tabular-nums; }

/* Approval tab — summary, trend, state ranking */
.ei-fc-appr__summary { margin-bottom: 1rem; }
.ei-fc-appr__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.ei-fc-appr__stat { background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius); padding: .6rem .5rem; text-align: center; }
[data-theme="dark"] .ei-fc-appr__stat { background: var(--ei-surface); }
.ei-fc-appr__statval { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ei-heading); line-height: 1.1; }
.ei-fc-appr__stat.is-app .ei-fc-appr__statval { color: #1f9d57; }
.ei-fc-appr__stat.is-dis .ei-fc-appr__statval { color: var(--ei-red); }
.ei-fc-appr__stat.is-dem .ei-fc-appr__statval { color: var(--ei-navy); }
.ei-fc-appr__stat.is-rep .ei-fc-appr__statval { color: var(--ei-red); }
.ei-fc-appr__statlab { display: block; font-size: .68rem; color: var(--ei-muted); text-transform: uppercase; letter-spacing: .03em; margin-top: .15rem; }
.ei-fc-appr__trend { margin-top: .9rem; }
.ei-fc-appr__trend svg { width: 100%; height: auto; }
.ei-fc-appr__trendleg { display: flex; gap: 1.2rem; margin-top: .5rem; }
.ei-fc-mapctl__row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.ei-fc-towntoggle { display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-size: .85rem; font-weight: 600; padding: .42rem 1rem; border-radius: 999px; border: 1px solid var(--ei-border); background: var(--ei-surface-2); color: var(--ei-muted); cursor: pointer; transition: background .14s ease, color .14s ease, border-color .14s ease; }
[data-theme="dark"] .ei-fc-towntoggle { background: var(--ei-bg); }
.ei-fc-towntoggle::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .4; }
.ei-fc-towntoggle:hover { color: var(--ei-heading); border-color: var(--ei-navy); }
.ei-fc-towntoggle.is-active { background: var(--ei-navy); border-color: var(--ei-navy); color: #fff; }
.ei-fc-towntoggle.is-active::before { opacity: 1; background: #fff; }
.ei-fc-appr__maptitle { margin: .4rem 0 .7rem; font-size: 1.05rem; color: var(--ei-heading); }
.ei-fc-appr__rankcard .ei-fc-card__title { margin-bottom: .6rem; }
.ei-fc-appr__rank { display: flex; flex-direction: column; gap: .35rem; }
.ei-fc-appr__rankrow { display: grid; grid-template-columns: 7.5rem 1fr 2.4rem; align-items: center; gap: .6rem; padding: .15rem 0; }
.ei-fc-appr__rankst { font-size: .85rem; color: var(--ei-heading); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ei-fc-appr__ranktrack { height: 12px; background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: 6px; overflow: hidden; }
[data-theme="dark"] .ei-fc-appr__ranktrack { background: var(--ei-surface); }
.ei-fc-appr__rankfill { display: block; height: 100%; border-radius: 6px 0 0 6px; }
.ei-fc-appr__rankval { font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: var(--ei-muted); }
@media (max-width: 640px) {
	.ei-fc-appr__stats { grid-template-columns: repeat(2, 1fr); }
}
/* Ratings breakdown */
.ei-fc-chmb__ratings { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; }
@media (max-width: 560px) { .ei-fc-chmb__ratings { grid-template-columns: repeat(4, 1fr); } }
.ei-fc-chmb__rcell { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.ei-fc-chmb__rswatch { width: 100%; height: 46px; border-radius: var(--ei-radius); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.ei-fc-chmb__rlabel { font-size: .64rem; color: var(--ei-muted); text-align: center; line-height: 1.1; }
/* Battlegrounds */
.ei-fc-chmb__bg { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.ei-fc-chmb__bgtile { position: relative; display: flex; flex-direction: column; gap: .25rem; text-align: left; background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius); padding: .6rem .7rem; cursor: pointer; transition: border-color .12s ease, transform .12s ease; }
[data-theme="dark"] .ei-fc-chmb__bgtile { background: var(--ei-surface); }
.ei-fc-chmb__bgtile:hover { border-color: var(--ei-navy); transform: translateY(-1px); }
.ei-fc-chmb__bgtile.is-flip { border-color: #C9A227; box-shadow: inset 0 0 0 1px #C9A227; }
.ei-fc-chmb__bgtop { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.ei-fc-chmb__bgcode { font-weight: 800; color: var(--ei-heading); font-size: .92rem; }
.ei-fc-chmb__bgmargin { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9rem; }
.ei-fc-chmb__bgnames { font-size: .7rem; color: var(--ei-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ei-fc-chmb__bgflip { position: absolute; top: -7px; right: 8px; background: #C9A227; color: #2a2000; font-size: .56rem; font-weight: 800; letter-spacing: .04em; padding: .05rem .3rem; border-radius: 3px; }
/* Chamber map */
.ei-fc-chmb__map .ei-fc-usmap { max-height: 74vh; }
/* Forecast-history chart (Dem/Rep win-prob or popular vote over the cycle) */
.ei-fc-fhist__holder { width: 100%; }
.ei-fc-fhist__svg { display: block; max-width: 100%; }
.ei-fc-fhist__band { pointer-events: none; }
.ei-fc-fhist__mid { stroke: var(--ei-border); stroke-width: 1; }
.ei-fc-fhist__elec { stroke: var(--ei-border); stroke-dasharray: 4 3; }
.ei-fc-fhist__eleclab { fill: var(--ei-muted); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.ei-fc-fhist__line { fill: none; stroke-width: 2.4; }
.ei-fc-fhist__line.is-dem { stroke: var(--ei-navy); } .ei-fc-fhist__line.is-rep { stroke: var(--ei-red); }
.ei-fc-fhist__line.is-ind { stroke: var(--ei-ind); }
.ei-fc-fhist__proj { fill: none; stroke-width: 1.8; stroke-dasharray: 5 4; opacity: .65; }
.ei-fc-fhist__proj.is-dem { stroke: var(--ei-navy); } .ei-fc-fhist__proj.is-rep { stroke: var(--ei-red); }
.ei-fc-fhist__proj.is-ind { stroke: var(--ei-ind); }
.ei-fc-fhist__dot, .ei-fc-fhist__hover { stroke: #fff; stroke-width: 1.5; }
.ei-fc-fhist__dot.is-dem, .ei-fc-fhist__hover.is-dem { fill: var(--ei-navy); }
.ei-fc-fhist__dot.is-rep, .ei-fc-fhist__hover.is-rep { fill: var(--ei-red); }
.ei-fc-fhist__dot.is-ind, .ei-fc-fhist__hover.is-ind { fill: var(--ei-ind); }
.ei-fc-fhist__endlab { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ei-fc-fhist__endlab.is-dem { fill: var(--ei-navy); } .ei-fc-fhist__endlab.is-rep { fill: var(--ei-red); }
.ei-fc-fhist__endlab.is-ind { fill: var(--ei-ind); }
.ei-fc-fhist__legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .6rem; font-size: .82rem; color: var(--ei-muted); }
.ei-fc-fhist__key { display: inline-flex; align-items: baseline; gap: .3rem; }
.ei-fc-fhist__key::before { content: ""; width: 14px; height: 3px; border-radius: 2px; align-self: center; }
.ei-fc-fhist__key.is-dem::before { background: var(--ei-navy); } .ei-fc-fhist__key.is-rep::before { background: var(--ei-red); }
.ei-fc-fhist__key.is-ind::before { background: var(--ei-ind); }
.ei-fc-fhist__key.is-dem b { color: var(--ei-navy); } .ei-fc-fhist__key.is-rep b { color: var(--ei-red); }
.ei-fc-fhist__key.is-ind b { color: var(--ei-ind); }

/* ============================================================
   Legal / policy pages — Privacy, Terms, Cookies, Disclaimer,
   About, Contact ([ei_legal] shortcode, full-width template)
   ============================================================ */
.ei-page-legal .wp-block-post-title { display: none; } /* custom hero below */

.ei-legal {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

/* ---- Document masthead (shared) ---- */
.ei-legal__hero { max-width: 52rem; margin-bottom: clamp(1.6rem, 4vw, 2.4rem); }
.ei-legal__hero .ei-eyebrow { margin-bottom: .85rem; }
.ei-legal__title {
  margin: 0 0 .7rem;
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.06;
  color: var(--ei-heading);
}
.ei-legal__updated {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  padding: .3rem .7rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ei-muted);
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: 999px;
}
.ei-legal__updated::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ei-green);
}
.ei-legal__lede {
  max-width: 52rem;
  margin-bottom: clamp(1.8rem, 4vw, 2.6rem);
}
.ei-legal__lede p {
  margin: 0 0 .8rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ei-text);
}
.ei-legal__lede p:last-child { margin-bottom: 0; }
.ei-legal__lede a, .ei-legal__prose a, .ei-legal__pnote a, .ei-legal__contact-note a, .ei-legal__contact-row a {
  color: var(--ei-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--ei-link) 40%, transparent);
}
.ei-legal__lede a:hover, .ei-legal__prose a:hover { text-decoration-color: currentColor; }

/* ---- Two-column doc layout: sticky TOC + prose ---- */
.ei-legal__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 900px) {
  .ei-legal__layout { grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
}

.ei-legal__toc-inner {
  padding: 1.1rem 1.15rem;
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
}
@media (min-width: 900px) {
  .ei-legal__toc { position: sticky; top: calc(var(--ei-header-h) + 1.25rem); }
  .ei-legal__toc-inner { max-height: calc(100vh - var(--ei-header-h) - 3rem); overflow-y: auto; }
}
.ei-legal__toc-title {
  margin: 0 0 .7rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ei-muted);
}
.ei-legal__toc-list { list-style: none; margin: 0; padding: 0; }
.ei-legal__toc-list li { margin: 0; }
.ei-legal__toc-list a {
  position: relative;
  display: flex;
  gap: .5rem;
  padding: .2rem 0 .2rem .7rem;
  font-size: .85rem;
  line-height: 1.3;
  color: var(--ei-muted);
  text-decoration: none;
  transition: color .15s ease;
}
/* Active "you are here" accent bar (set by on-this-page.js scrollspy). */
.ei-legal__toc-list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: .28rem;
  bottom: .28rem;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background .15s ease;
}
.ei-legal__toc-list a:hover { color: var(--ei-link); }
.ei-legal__toc-list a.is-active { color: var(--ei-heading); font-weight: 600; }
.ei-legal__toc-list a.is-active::before { background: var(--ei-red); }
.ei-legal__toc-num {
  flex: none;
  min-width: 1.5em;
  font-size: .72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ei-red);
  padding-top: .04rem;
}

/* ---- Article floating "On this page" (built by on-this-page.js) ----
   Pinned into the left gutter beside the centered editorial column on wide
   screens; hidden below (the headings stay anchored). Reuses the .ei-legal__toc
   card styles. 350px = half the article measure (--ei-read 700px). */
.ei-toc-float { display: none; }
@media (min-width: 1280px) {
  .ei-toc-float {
    display: block;
    position: fixed;
    top: calc(var(--ei-header-h) + 1.75rem);
    left: max(1.25rem, calc(50% - 350px - 1.75rem - 232px));
    width: 232px;
    max-height: calc(100vh - var(--ei-header-h) - 3.5rem);
    overflow-y: auto;
    z-index: 20;
  }
}

/* Smooth anchor jumps + offset so a target clears the sticky header. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.ei-toc-target { scroll-margin-top: calc(var(--ei-header-h) + 1.5rem); }

/* ---- Prose sections ---- */
.ei-legal__doc-body { max-width: 70ch; }
.ei-legal__section { scroll-margin-top: calc(var(--ei-header-h) + 1.5rem); }
.ei-legal__section + .ei-legal__section { margin-top: 2.1rem; padding-top: 2.1rem; border-top: 1px solid var(--ei-border); }
.ei-legal__h2 {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  margin: 0 0 .9rem;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ei-heading);
}
.ei-legal__num {
  flex: none;
  font-size: .82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ei-red);
  padding: .12rem .42rem;
  background: color-mix(in srgb, var(--ei-red) 10%, transparent);
  border-radius: 6px;
  line-height: 1;
  align-self: flex-start;
  margin-top: .12rem;
}
.ei-legal__prose p { margin: 0 0 .9rem; line-height: 1.68; color: var(--ei-text); }
.ei-legal__prose p:last-child { margin-bottom: 0; }
.ei-legal__prose ul { margin: 0 0 .9rem; padding-left: 0; list-style: none; }
.ei-legal__prose li {
  position: relative;
  margin: 0 0 .55rem;
  padding-left: 1.35rem;
  line-height: 1.6;
  color: var(--ei-text);
}
.ei-legal__prose li::before {
  content: "";
  position: absolute;
  left: .2rem; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ei-navy);
}
.ei-legal__prose strong { color: var(--ei-heading); font-weight: 700; }

/* ---- About / Contact (page layout) ---- */
.ei-legal--page { max-width: 920px; }
.ei-legal__phero { max-width: 44rem; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.ei-legal__phero .ei-eyebrow { margin-bottom: .85rem; }
.ei-legal__ptitle {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--ei-heading);
}
.ei-legal__plede { margin: 0 auto; max-width: 40rem; font-size: 1.12rem; line-height: 1.62; color: var(--ei-muted); }
.ei-legal__pcta { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.6rem; }

.ei-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.3rem;
  font-size: .95rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.ei-btn:active { transform: translateY(1px); }
.ei-btn--primary { background: var(--ei-navy); color: #fff; }
.ei-btn--primary:hover { background: var(--ei-navy-deep); }
[data-theme="dark"] .ei-btn--primary { color: #0d1117; }
.ei-btn--ghost { background: transparent; color: var(--ei-heading); border-color: var(--ei-field-border); }
.ei-btn--ghost:hover { background: var(--ei-surface); border-color: var(--ei-navy); }
.ei-btn:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }

.ei-legal__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.ei-legal__card {
  padding: 1.4rem;
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
  box-shadow: var(--ei-shadow);
}
.ei-legal__card h2 { margin: 0 0 .5rem; font-size: 1.08rem; font-weight: 800; color: var(--ei-heading); letter-spacing: -0.01em; }
.ei-legal__card p { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--ei-muted); }
.ei-legal__pnote { text-align: center; color: var(--ei-muted); font-size: .95rem; }

.ei-legal__contact-card {
  max-width: 540px;
  margin: 0 auto 1.5rem;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-xl);
  box-shadow: var(--ei-shadow-lg);
}
.ei-legal__contact-label {
  display: inline-block;
  margin-bottom: .5rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ei-muted);
}
.ei-legal__contact-email {
  display: block;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ei-navy);
  text-decoration: none;
}
.ei-legal__contact-email:hover { text-decoration: underline; text-underline-offset: 3px; }
.ei-legal__contact-note { margin: 1rem 0 0; font-size: .92rem; line-height: 1.6; color: var(--ei-muted); }
.ei-legal__contact-rows { max-width: 540px; margin: 0 auto; display: grid; gap: .75rem; }
.ei-legal__contact-row {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: 1rem 1.2rem;
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
}
.ei-legal__contact-row strong { font-size: .95rem; color: var(--ei-heading); }
.ei-legal__contact-row span { font-size: .9rem; line-height: 1.5; color: var(--ei-muted); }

/* Contact-page social links */
.ei-legal__social { max-width: 540px; margin: 1.25rem auto 0; text-align: center; }
.ei-legal__social-label { display: block; margin-bottom: .6rem; font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--ei-muted); }
.ei-legal__social-links { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.ei-legal__social-link { display: inline-flex; align-items: center; gap: .7rem; padding: .9rem 1.6rem; border-radius: 999px; border: 1px solid var(--ei-border); background: var(--ei-surface); color: var(--ei-heading); font-size: 1.05rem; font-weight: 700; text-decoration: none; transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.ei-legal__social-link:hover { border-color: var(--ei-navy); color: var(--ei-navy); transform: translateY(-1px); }
.ei-legal__social-link svg { width: 22px; height: 22px; }

/* ---- About page (page layout, .ei-about namespace) ----
   A left-aligned editorial reading column: masthead intro, then sections
   separated by hairline rules, each title underlined with a short red rule
   (the signature accent). Team + press bio render as surface cards. */
.ei-about { max-width: 720px; margin-inline: auto; }
.ei-about__intro .ei-eyebrow { margin-bottom: .85rem; }
.ei-about__headline {
  margin: 0 0 1.1rem;
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ei-heading);
}
.ei-about__lead { margin: 0 0 1rem; font-size: 1.1rem; line-height: 1.68; color: var(--ei-text); }
.ei-about__lead:last-child { margin-bottom: 0; }
.ei-about__lead strong { color: var(--ei-heading); font-weight: 700; }

.ei-about__section {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--ei-border);
}
.ei-about__title {
  position: relative;
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ei-heading);
  border-bottom: 1px solid var(--ei-border);
}
.ei-about__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 2.25rem; height: 2px;
  border-radius: 2px;
  background: var(--ei-red);
}
.ei-about__section-lead { margin: 0 0 1.15rem; font-size: 1.02rem; line-height: 1.7; color: var(--ei-text); }
.ei-about__section-lead strong { color: var(--ei-heading); font-weight: 700; }
.ei-about__note { margin: 1.15rem 0 0; font-size: .93rem; line-height: 1.7; color: var(--ei-muted); }
.ei-about__section-lead a, .ei-about__note a { color: var(--ei-link); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--ei-link) 40%, transparent); }
.ei-about__section-lead a:hover, .ei-about__note a:hover { text-decoration-color: currentColor; }

.ei-about__caps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.5rem;
}
.ei-about__caps li { display: flex; align-items: flex-start; gap: .7rem; font-size: .95rem; line-height: 1.5; color: var(--ei-text); }
.ei-about__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ei-red); margin-top: .5em; }

/* Team member card */
.ei-about__member {
  display: grid; grid-template-columns: 64px 1fr; gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
  box-shadow: var(--ei-shadow);
}
.ei-about__avatar {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 800; letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(135deg, var(--ei-navy), var(--ei-navy-deep));
}
.ei-about__member-name { margin: 0 0 .2rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ei-heading); }
.ei-about__member-role { margin: 0 0 .7rem; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ei-red); }
.ei-about__member-bio { margin: 0 0 .9rem; font-size: .95rem; line-height: 1.68; color: var(--ei-text); }
.ei-about__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.ei-about__links a {
  font-size: .83rem; font-weight: 600;
  color: var(--ei-link);
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--ei-link) 35%, transparent);
  transition: text-decoration-color .15s ease;
}
.ei-about__links a:hover { text-decoration-color: currentColor; }

/* Press bio — a quiet surface card (no top rule; its own border separates it) */
.ei-about__section--card {
  border-top: none;
  padding: clamp(1.5rem, 3.5vw, 2.1rem);
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-lg);
  box-shadow: var(--ei-shadow);
}
.ei-about__section--card p { margin: .75rem 0 0; font-size: .98rem; line-height: 1.7; color: var(--ei-text); }
.ei-about__section--card p:first-of-type { margin-top: 0; }
.ei-about__section--card p.ei-about__press-contact { color: var(--ei-muted); font-size: .92rem; }

/* Solidarity badges */
.ei-about__stands { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: clamp(2rem, 5vw, 3rem); padding-top: clamp(2rem, 5vw, 3rem); border-top: 1px solid var(--ei-border); }
.ei-about__stand { display: inline-flex; align-items: center; gap: .85rem; padding: .85rem 1.2rem; border-radius: var(--ei-radius-lg); border: 1px solid var(--ei-border); background: var(--ei-surface); color: var(--ei-heading); text-decoration: none; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.ei-about__stand:hover { border-color: var(--ei-navy); transform: translateY(-1px); box-shadow: var(--ei-shadow); }
.ei-about__stand-flag { font-size: 1.65rem; line-height: 1; }
.ei-about__stand-body { display: flex; flex-direction: column; gap: .12rem; }
.ei-about__stand-body strong { font-size: .98rem; font-weight: 800; color: var(--ei-heading); }
.ei-about__stand-sub { font-size: .8rem; font-weight: 600; color: var(--ei-muted); }
.ei-about__stand:hover .ei-about__stand-sub { color: var(--ei-navy); }
.ei-about__section--card a {
  color: var(--ei-link);
  text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--ei-link) 40%, transparent);
}
.ei-about__section--card a:hover { text-decoration-color: currentColor; }

@media (max-width: 640px) {
  .ei-about__caps { grid-template-columns: 1fr; }
  .ei-about__member { grid-template-columns: 52px 1fr; gap: 1rem; }
  .ei-about__avatar { width: 52px; height: 52px; font-size: 1rem; }
}

/* ============================================================
   Footer bottom bar (copyright + inline legal nav)
   ============================================================ */
.ei-foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1.2rem;
}
.ei-foot-copy { margin: 0; font-size: .85rem; color: var(--ei-muted); }
.ei-foot-legal { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.ei-foot-legal a {
  font-size: .82rem;
  color: var(--ei-muted);
  text-decoration: none;
  transition: color .15s ease;
}
.ei-foot-legal a:hover { color: var(--ei-red); }
@media (max-width: 600px) {
  .ei-foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Complianz cookie banner — restyled to the ElectIndex identity.
   Complianz drives every banner part from its own --cmplz_* custom
   properties (background, text, links, the three button groups, the
   category toggle slider, the "always active" colour). We remap those
   to ElectIndex tokens on the banner + the floating revoke tab, so the
   banner matches the theme and follows light/dark automatically — the
   tokens flip under [data-theme="dark"], so dark mode is handled by the
   same rule. The Complianz defaults (#009fff slider, #ccc, green) don't
   adapt on their own, which is what this fixes. Harmless if absent.
   ============================================================ */
#cmplz-cookiebanner-container .cmplz-cookiebanner,
#cmplz-manage-consent .cmplz-manage-consent {
  --cmplz_banner_background_color: var(--ei-bg) !important;
  --cmplz_banner_border_color: var(--ei-border) !important;
  --cmplz_banner_border_radius: var(--ei-radius-xl) !important;
  --cmplz_text_color: var(--ei-text) !important;
  --cmplz_hyperlink_color: var(--ei-link) !important;
  --cmplz_button_border_radius: 999px !important;
  --cmplz_button_accept_background_color: var(--ei-navy) !important;
  --cmplz_button_accept_border_color: var(--ei-navy) !important;
  --cmplz_button_accept_text_color: #fff !important;
  --cmplz_button_deny_background_color: transparent !important;
  --cmplz_button_deny_border_color: var(--ei-field-border) !important;
  --cmplz_button_deny_text_color: var(--ei-heading) !important;
  --cmplz_button_settings_background_color: transparent !important;
  --cmplz_button_settings_border_color: var(--ei-field-border) !important;
  --cmplz_button_settings_text_color: var(--ei-heading) !important;
  --cmplz_category_header_always_active_color: var(--ei-green) !important;
  --cmplz_slider_active_color: var(--ei-navy) !important;
  --cmplz_slider_inactive_color: color-mix(in srgb, var(--ei-text) 28%, transparent) !important;
  --cmplz_slider_bullet_color: #fff !important;
  font-family: inherit !important;
}
/* Bits not driven by the colour vars. */
#cmplz-cookiebanner-container .cmplz-cookiebanner { box-shadow: var(--ei-shadow-lg) !important; }
#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-title { color: var(--ei-heading) !important; font-weight: 800 !important; }
#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-close svg { fill: currentColor !important; }
#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-categories .cmplz-category {
  border-color: var(--ei-border) !important;
  border-radius: var(--ei-radius) !important;
}

/* ============================================================
   Home page (templates/front-page.html) — a card-driven landing
   page: a navy About lead (mission + credentials stat strip +
   pillars), then a deck with The Brief + Support, the latest
   articles, the 2026 forecast (real dials + chamber mini-map),
   and the Shuffler. Shares the navy "command deck" hero family;
   chrome is .ei-home-*; embedded forecast cards reuse .ei-fc-*.
   ============================================================ */
.ei-home { margin-top: 0; padding: 0; background: var(--ei-surface); }
[data-theme="dark"] .ei-home { background: var(--ei-bg); }
.ei-home .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* On-navy button variant (hero + newsletter) */
.ei-btn--onnavy { background: #fff; color: var(--ei-navy-deep); }
.ei-btn--onnavy:hover { background: #e9f1fc; }
.ei-btn--onnavy:disabled { opacity: .55; cursor: not-allowed; }

/* ---- About lead (the page opener) ----------------------------------- */
.ei-home-lead {
  position: relative; overflow: hidden; color: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3rem) clamp(5rem, 9vw, 8rem);
  background:
    radial-gradient(1100px 460px at 85% -30%, rgba(224, 36, 31, .30), transparent 60%),
    linear-gradient(135deg, #1b4b8f 0%, #163d75 48%, #102345 100%);
}
.ei-home-lead::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(125% 100% at 50% 0%, #000 38%, transparent 80%);
          mask-image: radial-gradient(125% 100% at 50% 0%, #000 38%, transparent 80%);
}
.ei-home-lead__inner { position: relative; max-width: 1180px; margin: 0 auto; }
.ei-home-lead__eyebrow {
  display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #bcd2f0;
}
.ei-home-lead__eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--ei-red); }
.ei-home-lead__title {
  margin: 0; max-width: 18ch; color: #fff;
  font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.02;
}
.ei-home-lead__lede {
  max-width: 62ch; margin: 1.2rem 0 0;
  font-size: clamp(1.02rem, 1.3vw, 1.2rem); line-height: 1.6; color: rgba(233, 240, 250, .86);
}
.ei-home-lead__cta { display: flex; flex-wrap: wrap; align-items: center; gap: .95rem; margin-top: 1.85rem; }
.ei-home-lead__textlink { color: #cfe0f5; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ei-home-lead__textlink:hover { color: #fff; }
/* outline "Support us" button on the navy lead */
.ei-home-lead__support.ei-btn--ghost { color: #fff; background: transparent; border-color: rgba(255, 255, 255, .45); }
.ei-home-lead__support.ei-btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* Credentials strip — the signature: big tabular proof points. */
.ei-home-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.5rem, 2vw, 1.5rem);
  margin-top: clamp(2.25rem, 4vw, 3rem); padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid rgba(255, 255, 255, .14);
}
@media (max-width: 640px) { .ei-home-stats { grid-template-columns: repeat(2, 1fr); row-gap: 1.5rem; } }
.ei-home-stat { display: flex; flex-direction: column; gap: .3rem; }
.ei-home-stat__value {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -.03em;
  color: #fff; font-variant-numeric: tabular-nums;
}
.ei-home-stat__label { font-size: .82rem; font-weight: 600; color: rgba(206, 222, 245, .78); }

/* Pillars — three translucent cards on the navy. */
.ei-home-pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.85rem, 1.6vw, 1.15rem);
  margin-top: clamp(2.25rem, 4vw, 3rem);
}
@media (max-width: 760px) { .ei-home-pillars { grid-template-columns: 1fr; } }
.ei-home-pillar {
  padding: 1.3rem 1.35rem;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--ei-radius-lg);
}
.ei-home-pillar__title { margin: 0 0 .45rem; font-size: 1.06rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.ei-home-pillar__title::before { content: ""; display: block; width: 26px; height: 3px; margin-bottom: .7rem; border-radius: 2px; background: var(--ei-red); }
.ei-home-pillar__body { margin: 0; font-size: .94rem; line-height: 1.58; color: rgba(223, 233, 247, .85); }

/* ---- Deck (workspace sheet rising onto the hero) -------------------- */
.ei-home-deck {
  position: relative; z-index: 1; margin-top: clamp(-3.25rem, -4.5vw, -4.25rem);
  padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(3.5rem, 7vw, 6rem);
  background: var(--ei-surface); border-radius: var(--ei-radius-xl) var(--ei-radius-xl) 0 0;
  box-shadow: 0 -20px 44px rgba(18, 42, 79, .12);
}
[data-theme="dark"] .ei-home-deck { background: var(--ei-bg); box-shadow: 0 -20px 44px rgba(0, 0, 0, .5); }
.ei-home-deck > * + * { margin-top: clamp(3rem, 6vw, 5rem); }
/* constrained content sections (the full-bleed newsletter band opts out) */
.ei-home-section {
  max-width: 1180px; margin-left: auto; margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem); padding-right: clamp(1rem, 4vw, 2rem);
}
@media (max-width: 600px) { .ei-home-deck { border-radius: var(--ei-radius-lg) var(--ei-radius-lg) 0 0; } }

/* ---- Shuffler feature ----------------------------------------------- */
.ei-home-feature { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 860px) { .ei-home-feature { grid-template-columns: 1fr; } }
.ei-home-feature__title { margin: .5rem 0 0; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; color: var(--ei-heading); }
.ei-home-feature__body { margin: .9rem 0 0; max-width: 46ch; font-size: 1.04rem; line-height: 1.62; color: var(--ei-muted); }
.ei-home-feature__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.15rem 0 1.55rem; }
.ei-home-feature__chip { padding: .34rem .8rem; font-size: .8rem; font-weight: 600; color: var(--ei-heading); background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: 999px; }
[data-theme="dark"] .ei-home-feature__chip { background: var(--ei-surface); }
.ei-home-feature__art {
  display: flex; align-items: center; justify-content: center; padding: clamp(1.2rem, 3vw, 2.2rem);
  background: linear-gradient(150deg, var(--ei-bg), var(--ei-surface-2)); border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius-xl); box-shadow: var(--ei-shadow);
}
[data-theme="dark"] .ei-home-feature__art { background: linear-gradient(150deg, var(--ei-surface), #0c1422); }
.ei-home-mosaic { width: 100%; max-width: 360px; height: auto; }
.ei-home-mosaic__c { transform-box: fill-box; transform-origin: center; opacity: 0; animation: ei-home-cell .5s ease forwards; animation-delay: calc(var(--i) * 40ms); }
.ei-home-mosaic__c.is-n { fill: color-mix(in srgb, var(--ei-navy) 9%, var(--ei-border)); }
.ei-home-mosaic__c.is-d { fill: var(--ei-navy); }
.ei-home-mosaic__c.is-r { fill: var(--ei-red); }
@keyframes ei-home-cell { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ei-home-mosaic__c { opacity: 1; animation: none; } }

/* ---- Latest articles (featured-first) ------------------------------- */
.ei-home-arts__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-bottom: clamp(1.25rem, 3vw, 1.75rem); }
.ei-home-arts__head .ei-eyebrow { flex-basis: 100%; }
.ei-home-arts__title { margin: .2rem auto 0 0; font-size: clamp(1.7rem, 2.8vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; color: var(--ei-heading); }
.ei-home-arts__all { margin: 0; font-size: .95rem; font-weight: 700; }
.ei-home-arts__all a { color: var(--ei-navy); text-decoration: none; }
.ei-home-arts__all a:hover { text-decoration: underline; }
.ei-home-arts__empty { color: var(--ei-muted); }

.ei-home-arts__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 860px) { .ei-home-arts__grid { grid-template-columns: 1fr; } }

.ei-home-art {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg);
  box-shadow: var(--ei-shadow); overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
[data-theme="dark"] .ei-home-art { background: var(--ei-surface); }
.ei-home-art:hover { transform: translateY(-3px); border-color: var(--ei-navy); box-shadow: 0 12px 30px rgba(18, 42, 79, .12); }
.ei-home-art:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }
/* The lead card spans both rows on the left; secondary cards stack on the right. */
.ei-home-art--lead { grid-column: 1; grid-row: 1 / span 2; }
@media (max-width: 860px) { .ei-home-art--lead { grid-column: auto; grid-row: auto; } }
/* The lead spans two rows; let its image grow to fill the extra height instead
   of leaving a gap between the text and the byline. */
.ei-home-art--lead .ei-home-art__media { flex: 1 1 auto; aspect-ratio: auto; min-height: 240px; }
.ei-home-art--lead .ei-home-art__body { flex: 0 0 auto; }
@media (max-width: 860px) { .ei-home-art--lead .ei-home-art__media { aspect-ratio: 16 / 9; min-height: 0; } }

.ei-home-art__media { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1b4b8f, #102345); overflow: hidden; }
.ei-home-art__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ei-home-art--lead .ei-home-art__media { aspect-ratio: 16 / 8; }
.ei-home-art__media--ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f5fae, #0f2547); }
.ei-home-art__media--ph-brief { background: radial-gradient(120% 120% at 0% 0%, rgba(202, 160, 58, .5), transparent 55%), linear-gradient(135deg, #1b4b8f, #0f2547); }
.ei-home-art__media--ph img { width: auto; height: 42%; opacity: .24; object-fit: contain; filter: brightness(0) invert(1); }
.ei-home-art__body { display: flex; flex-direction: column; gap: .55rem; padding: 1.15rem 1.25rem 1.3rem; flex: 1; }
.ei-home-art__meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .5rem; font-size: .78rem; color: var(--ei-muted); }
.ei-home-art__chip {
  font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ei-red);
  padding: .2rem .5rem; border: 1px solid color-mix(in srgb, var(--ei-red) 35%, transparent); border-radius: 999px;
}
.ei-home-art__chip--brief { color: var(--ei-gold-ink); border-color: var(--ei-gold-border); background: var(--ei-gold-bg); }
.ei-home-art__tag { font-size: .68rem; font-weight: 700; color: var(--ei-muted); background: var(--ei-surface-2); padding: .2rem .55rem; border-radius: 999px; }
.ei-home-art__title { font-size: 1.18rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: var(--ei-heading); }
.ei-home-art--lead .ei-home-art__title { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.ei-home-art__excerpt { margin: 0; font-size: .98rem; line-height: 1.6; color: var(--ei-muted); }
.ei-home-art__foot { margin-top: auto; padding-top: .7rem; display: flex; align-items: center; gap: .55rem; }
.ei-home-art__avatar { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; }
.ei-home-art__byline { display: flex; flex-direction: column; line-height: 1.25; }
.ei-home-art__by { font-size: .82rem; font-weight: 700; color: var(--ei-heading); }
.ei-home-art__when { font-size: .74rem; color: var(--ei-muted); }

/* ============================================================
   Articles archive (/articles) + Search results — home-inspired:
   a navy hero over a responsive grid of article cards.
   ============================================================ */
.ei-art-hero {
  background: linear-gradient(135deg, var(--ei-navy), var(--ei-navy-deep));
  color: #fff;
  border-radius: var(--ei-radius-xl);
  padding: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--ei-shadow);
}
.ei-art-hero .ei-eyebrow { color: #ff9d99; margin-bottom: .6rem; }
.ei-art-hero__title { margin: 0; font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; color: #fff; }
.ei-art-hero__sub { margin: .85rem 0 0; max-width: 44rem; font-size: 1.08rem; line-height: 1.6; color: rgba(255, 255, 255, .82); }

.ei-art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem); }
.ei-art-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); box-shadow: var(--ei-shadow); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.ei-art-card:hover { border-color: var(--ei-navy); transform: translateY(-2px); box-shadow: var(--ei-shadow-lg); }
.ei-art-card--brief { border-top: 3px solid var(--ei-gold-accent); }
.ei-art-card__media { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1b4b8f, #102345); overflow: hidden; }
.ei-art-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.ei-art-card:hover .ei-art-card__media img { transform: scale(1.03); }
.ei-art-card__media--ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f5fae, #0f2547); }
.ei-art-card__media--ph-brief { background: radial-gradient(120% 120% at 0% 0%, rgba(202, 160, 58, .5), transparent 55%), linear-gradient(135deg, #1b4b8f, #0f2547); }
.ei-art-card__media--ph img { width: auto; height: 44%; opacity: .24; object-fit: contain; filter: brightness(0) invert(1); }
.ei-art-card:hover .ei-art-card__media--ph img { transform: none; }
.ei-art-card__content { display: flex; flex-direction: column; gap: .55rem; flex: 1; padding: 1.2rem 1.3rem 1.3rem; }
.ei-art-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.ei-art-card__tag { font-size: .68rem; font-weight: 700; letter-spacing: .02em; color: var(--ei-muted); background: var(--ei-surface-2); padding: .2rem .55rem; border-radius: 999px; text-decoration: none; transition: color .15s ease; }
.ei-art-card__tag:hover { color: var(--ei-navy); }
.ei-art-card__title { margin: .1rem 0 0; font-size: 1.2rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.ei-art-card__title a { color: var(--ei-heading); text-decoration: none; }
.ei-art-card__title a:hover { color: var(--ei-navy); }
.ei-art-card__excerpt { margin: 0; font-size: .94rem; line-height: 1.55; color: var(--ei-muted); }
.ei-art-card__foot { margin-top: auto; padding-top: .9rem; display: flex; align-items: center; gap: .55rem; }
.ei-art-card__avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; }
.ei-art-card__byline { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ei-art-card__by { font-size: .82rem; font-weight: 700; color: var(--ei-heading); }
.ei-art-card__when { font-size: .74rem; color: var(--ei-muted); }
.ei-art-card__lockword { margin-left: auto; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ei-gold-ink); background: var(--ei-gold-bg); border: 1px solid var(--ei-gold-border); padding: .18rem .5rem; border-radius: 999px; }

/* The Brief badge on a card (gold pill; gains a lock when the viewer can't read it). */
.ei-brief-badge { display: inline-flex; align-items: center; gap: .3rem; align-self: flex-start; padding: .22rem .55rem; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; background: var(--ei-gold-bg); color: var(--ei-gold-ink); border: 1px solid var(--ei-gold-border); }
.ei-brief-badge__lock { width: .8rem; height: .8rem; }

/* Stream filter chips (All · Articles · The Brief). */
.ei-art-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 clamp(1.2rem, 3vw, 1.8rem); }
.ei-art-filter__chip { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--ei-border); background: var(--ei-surface); color: var(--ei-heading); font-weight: 700; font-size: .9rem; text-decoration: none; transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.ei-art-filter__chip:hover { border-color: var(--ei-navy); color: var(--ei-navy); }
.ei-art-filter__chip[aria-current="true"] { background: var(--ei-navy); border-color: var(--ei-navy); color: #fff; }
.ei-art-filter__chip--brief::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ei-gold-accent); }

/* The Brief masthead flag on a single post. */
.ei-brief-flag { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-weight: 800; font-size: .95rem; color: var(--ei-gold-ink); }
.ei-brief-flag__mark { display: inline-flex; color: var(--ei-gold-accent); }
.ei-brief-flag__mark svg { width: 1.05rem; height: 1.05rem; }
.ei-brief-flag__tag { font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 999px; background: var(--ei-gold-bg); color: var(--ei-gold-ink); border: 1px solid var(--ei-gold-border); }

/* ---- Paywall: faded teaser + the subscribe gate (Substack-style) ---- */
/* The "Paywall break" block's marker is invisible on the front end (subscribers
   see the whole article; for everyone else the content after it is removed). */
.ei-paywall-break { display: none !important; }
.ei-brief-teaser--fade { position: relative; }
.ei-brief-teaser--fade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6rem; background: linear-gradient(to bottom, transparent, var(--ei-bg)); pointer-events: none; }
/* Fixed navy (not the theme var, which lightens in dark) so the white controls
   keep their contrast in both light and dark. */
.ei-brief-gate { position: relative; overflow: hidden; margin: 2rem 0 0; padding: clamp(1.6rem, 4vw, 2.4rem); text-align: center; border-radius: var(--ei-radius-lg); background: linear-gradient(160deg, #1b4b8f, #0f2547); color: #fff; box-shadow: var(--ei-shadow-lg); }
.ei-brief-gate::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--ei-gold-accent), #f0c64e); }
.ei-brief-gate a { text-decoration: none; }
.ei-brief-gate__mark { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #f0c64e; margin-bottom: .9rem; }
.ei-brief-gate__mark svg { width: 22px; height: 22px; }
.ei-brief-gate__eyebrow { margin: 0 0 .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #f0c64e; }
.ei-brief-gate__title { margin: 0 0 .6rem; font-size: clamp(1.4rem, 3.5vw, 1.9rem); font-weight: 800; color: #fff; }
.ei-brief-gate__body { margin: 0 auto 1.3rem; max-width: 34rem; font-size: 1.02rem; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.ei-brief-gate__body strong { color: #fff; }
/* Light controls on the navy panel. */
.ei-brief-gate .ei-nl-form { margin: 0 auto; max-width: 26rem; }
.ei-brief-gate .ei-nl-form__input { background: rgba(255, 255, 255, .95); border-color: rgba(255, 255, 255, .4); color: #122a4f; }
.ei-brief-gate .ei-nl-form__btn { background: #fff; color: #1b4b8f; }
.ei-brief-gate .ei-nl-form__btn:hover { background: var(--ei-gold-accent); color: var(--ei-navy-deep); }
.ei-brief-gate .ei-nl-form__msg { color: rgba(255, 255, 255, .9); }
.ei-brief-gate .ei-nl-form.is-done .ei-nl-form__msg { color: #c8f0d4; }
.ei-brief-gate__note { margin: 1.1rem 0 0; font-size: .82rem; color: rgba(255, 255, 255, .62); }
/* Higher specificity than .ei-article__body a so the link reads white, not link-blue. */
.ei-brief-gate .ei-brief-gate__signin { color: #fff; font-weight: 700; text-decoration: none; }
.ei-brief-gate .ei-brief-gate__signin:hover { color: var(--ei-gold-accent); }

/* ---- Brief pricing plans ($5/mo · $50/yr) → PMPro checkout ---- */
.ei-brief-plans { display: flex; gap: .8rem; flex-wrap: wrap; }
/* "Subscriptions paused" notice shown in place of the paid plans. */
.ei-brief-soon { border: 1px dashed var(--ei-border); border-radius: var(--ei-radius); padding: 1.1rem 1.2rem; background: var(--ei-bg); }
[data-theme="dark"] .ei-brief-soon { background: var(--ei-surface-2); }
.ei-brief-soon__badge { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ei-gold-ink, #8a6d1a); background: var(--ei-gold-soft, rgba(212,175,55,.18)); padding: .18rem .55rem; border-radius: 999px; }
.ei-brief-soon__lead { margin: .55rem 0 .7rem; color: var(--ei-muted); font-size: .92rem; line-height: 1.5; }
.ei-brief-soon__cta { display: inline-block; }
.ei-brief-soon--compact { padding: .85rem 1rem; }
.ei-brief-soon--compact .ei-brief-soon__lead { font-size: .85rem; margin: .45rem 0 .6rem; }
.ei-brief-gate .ei-brief-soon { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); }
.ei-brief-gate .ei-brief-soon__lead { color: rgba(255,255,255,.9); }
.ei-brief-gate .ei-brief-soon__badge { color: #1b2a4a; background: var(--ei-gold-accent, #e8c34a); }
/* The CTA's .ei-btn--primary text colour is otherwise overridden by `.ei-article__body a`
   (link-blue + underline) inside the gate/article body, and by the dark-mode primary
   rule — so it renders as faint underlined link text on a blue pill. Pin it with the
   .ei-btn compound (higher specificity than `.ei-article__body a`): navy button + white
   text everywhere, white button + navy text inside the navy gate. */
.ei-brief-soon__cta.ei-btn { background: var(--ei-navy); color: #fff; text-decoration: none; border-color: transparent; }
.ei-brief-soon__cta.ei-btn:hover { background: var(--ei-navy-deep); color: #fff; }
.ei-brief-gate .ei-brief-soon__cta.ei-btn { background: #fff; color: var(--ei-navy-deep); border-color: #fff; }
.ei-brief-gate .ei-brief-soon__cta.ei-btn:hover { background: var(--ei-gold-accent, #e8c34a); color: var(--ei-navy-deep); border-color: var(--ei-gold-accent, #e8c34a); }
.ei-brief-plan { position: relative; flex: 1 1 0; min-width: 9rem; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: 1rem 1.1rem 1.1rem; border: 1px solid var(--ei-border); border-radius: var(--ei-radius); background: var(--ei-bg); text-decoration: none; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
[data-theme="dark"] .ei-brief-plan { background: var(--ei-surface-2); }
.ei-brief-plan:hover { border-color: var(--ei-navy); transform: translateY(-2px); box-shadow: var(--ei-shadow); }
.ei-brief-plan--best { border-color: var(--ei-gold-border); }
.ei-brief-plan__flag { position: absolute; top: -.6rem; right: .8rem; font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ei-navy-deep); background: var(--ei-gold-accent); padding: .15rem .5rem; border-radius: 999px; }
.ei-brief-plan__name { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ei-muted); }
.ei-brief-plan__price { font-size: 1.6rem; font-weight: 800; color: var(--ei-heading); line-height: 1.1; }
.ei-brief-plan__per { font-size: .85rem; font-weight: 700; color: var(--ei-muted); }
.ei-brief-plan__save { font-size: .76rem; font-weight: 700; color: var(--ei-green); }
.ei-brief-plan__cta { margin-top: .6rem; align-self: stretch; text-align: center; padding: .5rem; border-radius: 8px; background: var(--ei-navy); color: #fff; font-weight: 700; font-size: .88rem; }
.ei-brief-plan:hover .ei-brief-plan__cta { background: var(--ei-navy-deep); }
.ei-brief-plan--best .ei-brief-plan__cta { background: var(--ei-gold-accent); color: var(--ei-navy-deep); }
/* Keep the gold (best) CTA gold on hover — the generic :hover rule above carries
   a pseudo-class weight that would otherwise outrank the plain --best rule. */
.ei-brief-plan--best:hover .ei-brief-plan__cta,
.ei-brief-gate .ei-brief-plan--best:hover .ei-brief-plan__cta { background: #d8a93f; color: var(--ei-navy-deep); }
/* On the dark paywall gate */
.ei-brief-gate .ei-brief-plans { justify-content: center; max-width: 30rem; margin: 0 auto; }
.ei-brief-gate .ei-brief-plan { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
.ei-brief-gate .ei-brief-plan:hover { border-color: #fff; }
.ei-brief-gate .ei-brief-plan__name { color: rgba(255, 255, 255, .72); }
.ei-brief-gate .ei-brief-plan__price { color: #fff; }
.ei-brief-gate .ei-brief-plan__per { color: rgba(255, 255, 255, .72); }
.ei-brief-gate .ei-brief-plan__cta { background: #fff; color: #1b4b8f; }
.ei-brief-gate .ei-brief-plan--best .ei-brief-plan__cta { background: var(--ei-gold-accent); color: var(--ei-navy-deep); }

/* ---- Inline "reader-supported publication" subscribe block ---- */
.ei-subscribe { margin: 2.2rem 0 0; padding: clamp(1.5rem, 4vw, 2rem); text-align: center; border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); background: var(--ei-surface); }
.ei-subscribe__lead { margin: 0 auto 1.1rem; max-width: 34rem; font-size: 1.02rem; line-height: 1.6; color: var(--ei-text); }
.ei-subscribe__lead strong { color: var(--ei-heading); }
.ei-subscribe__note { margin: .8rem 0 0; font-size: .82rem; color: var(--ei-muted); }
.ei-subscribe .ei-nl-form { margin-inline: auto; }

/* ---- Shared newsletter signup form (home card, inline block, gate) ---- */
.ei-nl-form { width: 100%; max-width: 30rem; }
.ei-nl-form__row { display: flex; gap: .5rem; }
.ei-nl-form__input { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 .95rem; border: 1px solid var(--ei-field-border); border-radius: 10px; background: var(--ei-field); color: var(--ei-heading); font-size: .98rem; }
.ei-nl-form__input::placeholder { color: var(--ei-muted); }
.ei-nl-form__btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 1.3rem; border: 0; border-radius: 10px; background: var(--ei-navy); color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; transition: background-color .15s ease; }
.ei-nl-form__btn:hover { background: var(--ei-navy-deep); }
.ei-nl-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ei-nl-form__msg { margin: .55rem 0 0; font-size: .85rem; min-height: 1.1em; color: var(--ei-muted); }
.ei-nl-form.is-error .ei-nl-form__msg { color: var(--ei-red); }
.ei-nl-form.is-done .ei-nl-form__msg { color: var(--ei-green); font-weight: 600; }
.ei-nl-form.is-done .ei-nl-form__row { display: none; }
.ei-nl-form__input[readonly] { color: var(--ei-muted); cursor: default; }
.ei-nl-form.is-loading .ei-nl-form__btn { opacity: .7; }
@media (max-width: 480px) { .ei-nl-form__row { flex-direction: column; } .ei-nl-form__btn { width: 100%; } }

/* Account prerequisite: create-account / sign-in prompt shown when logged out. */
.ei-nl-acct { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.ei-nl-acct__signin { font-size: .9rem; font-weight: 700; color: var(--ei-link); text-decoration: none; }
.ei-nl-acct__signin:hover { color: var(--ei-red); }
.ei-nl-acct__note { margin-top: .6rem; }
.ei-brief-gate .ei-nl-acct__signin { color: #fff; text-decoration: none; }
.ei-brief-gate .ei-nl-acct__signin:hover { color: var(--ei-gold-accent); }
/* Inside the article body, `.ei-article__body a` (link-blue + underline) bleeds onto
   the inline subscribe block's button & sign-in link. Restore the button's white text
   and drop the underlines. */
.ei-subscribe .ei-nl-form__btn { color: #fff; text-decoration: none; }
.ei-subscribe .ei-nl-form__btn:hover { color: #fff; }
.ei-subscribe .ei-nl-acct__signin { text-decoration: none; }

.ei-art-pag { gap: .4rem; align-items: center; flex-wrap: wrap; }
.ei-art-pag .wp-block-query-pagination-numbers { display: flex; gap: .3rem; }
.ei-art-pag a, .ei-art-pag .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; padding: .42rem .7rem; border-radius: 8px;
  border: 1px solid var(--ei-border); background: var(--ei-surface);
  color: var(--ei-heading); font-weight: 700; font-size: .9rem; text-decoration: none;
}
.ei-art-pag a:hover { border-color: var(--ei-navy); color: var(--ei-navy); }
.ei-art-pag .page-numbers.current { background: var(--ei-navy); color: #fff; border-color: var(--ei-navy); }

.ei-art-empty { max-width: 40rem; margin: clamp(1.5rem, 5vw, 3rem) auto; text-align: center; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); }
.ei-art-empty h2 { margin: 0 0 .5rem; font-size: 1.4rem; }
.ei-art-empty p { margin: 0; color: var(--ei-muted); }
.ei-art-empty a { color: var(--ei-navy); font-weight: 700; }

/* ============================================================
   Author archive — navy command-deck masthead + article grid
   ============================================================ */
.ei-author-page { margin-top: 0; }
.ei-author {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--ei-navy-deep) 0%, var(--ei-navy) 100%);
  padding: clamp(2.2rem, 5vw, 3.4rem) 1.25rem;
}
.ei-author::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
}
.ei-author--brief::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ei-gold-accent); }
.ei-author__inner {
  position: relative; max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2rem);
}
.ei-author__avatar { flex: none; }
.ei-author__avatar-img {
  width: 132px; height: 132px; border-radius: 50%; display: block;
  border: 3px solid rgba(255,255,255,.85); box-shadow: var(--ei-shadow-lg);
}
.ei-author--brief .ei-author__avatar-img { border-color: var(--ei-gold-accent); }
.ei-author__head { min-width: 0; }
.ei-author__eyebrow {
  display: inline-block; margin-bottom: .5rem;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7);
}
.ei-author__eyebrow--brief { color: var(--ei-gold-accent); }
.ei-author__name { margin: 0; color: #fff; font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.ei-author__bio { margin: .7rem 0 0; max-width: 60ch; color: rgba(255,255,255,.82); font-size: 1rem; line-height: 1.55; }
.ei-author__meta { margin-top: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .9rem; color: rgba(255,255,255,.8); }
.ei-author__stat strong { color: #fff; font-weight: 800; }
.ei-author__stat--brief strong { color: var(--ei-gold-accent); }
.ei-author__dot { color: rgba(255,255,255,.4); }
.ei-author__link { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.ei-author__link:hover { color: var(--ei-gold-accent); }

.ei-author-feed { background: var(--ei-surface); }
[data-theme="dark"] .ei-author-feed { background: var(--ei-bg); }
.ei-author-feed__inner { max-width: 1100px; margin: 0 auto; padding: clamp(1.8rem, 4vw, 2.6rem) 1.25rem clamp(2.4rem, 5vw, 3.4rem); }
.ei-author-feed__label { margin: 0 0 1.2rem; font-size: 1.05rem; font-weight: 800; color: var(--ei-heading); }

.ei-art-pager { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: 2rem; }
.ei-art-pager .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 .6rem;
  border: 1px solid var(--ei-border); border-radius: 10px; background: var(--ei-bg); color: var(--ei-text);
  font-weight: 700; font-size: .9rem; text-decoration: none;
}
.ei-art-pager .page-numbers.current { background: var(--ei-navy); border-color: var(--ei-navy); color: #fff; }
.ei-art-pager a.page-numbers:hover { border-color: var(--ei-navy); color: var(--ei-navy); }

@media (max-width: 640px) {
  .ei-author__inner { flex-direction: column; text-align: center; }
  .ei-author__meta { justify-content: center; }
  .ei-author__bio { margin-left: auto; margin-right: auto; }
}

/* ============================================================
   Contact form (/contact)
   ============================================================ */
.ei-contact-wrap { margin-top: clamp(2rem, 5vw, 3rem); }
.ei-contact-inner { max-width: 640px; margin: 0 auto; }
.ei-contact-heading { margin: 0 0 .4rem; font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; color: var(--ei-heading); }
.ei-contact-sub { margin: 0 0 1.5rem; color: var(--ei-muted); }
.ei-contact { display: flex; flex-direction: column; gap: 1rem; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); padding: clamp(1.25rem, 3vw, 1.75rem); }
.ei-contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ei-contact__field { display: flex; flex-direction: column; gap: .35rem; }
.ei-contact__label { font-size: .9rem; font-weight: 600; color: var(--ei-heading); }
.ei-contact__optional { color: var(--ei-muted); font-weight: 500; font-size: .85em; }
.ei-contact__as { margin: 0; padding: .7rem .9rem; background: var(--ei-bg); border: 1px solid var(--ei-field-border); border-radius: 10px; font-size: .9rem; color: var(--ei-muted); }
.ei-contact__as strong { color: var(--ei-heading); font-weight: 700; }
.ei-contact input, .ei-contact select, .ei-contact textarea {
  width: 100%; box-sizing: border-box; padding: .7rem .85rem; font: inherit; font-size: 1rem;
  color: var(--ei-heading); background: var(--ei-bg); border: 1px solid var(--ei-field-border); border-radius: 10px;
}
.ei-contact input:focus, .ei-contact select:focus, .ei-contact textarea:focus { border-color: var(--ei-navy); box-shadow: 0 0 0 3px rgba(27,75,143,.15); outline: none; }
.ei-contact textarea { resize: vertical; min-height: 120px; }
.ei-contact__drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  padding: 1.4rem; text-align: center; cursor: pointer; color: var(--ei-muted);
  border: 1.5px dashed var(--ei-field-border); border-radius: 12px; background: var(--ei-bg);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.ei-contact__drop:hover, .ei-contact__drop:focus-visible, .ei-contact__drop.is-over {
  border-color: var(--ei-navy); color: var(--ei-navy); background: color-mix(in srgb, var(--ei-navy) 5%, var(--ei-bg)); outline: none;
}
.ei-contact__drop-icon { width: 26px; height: 26px; }
.ei-contact__drop-text { font-size: .92rem; }
.ei-contact__drop-text strong { color: var(--ei-heading); }
.ei-contact__drop-hint { font-size: .8rem; }
.ei-contact__previews { display: flex; flex-wrap: wrap; gap: .6rem; }
.ei-contact__previews:empty { display: none; }
.ei-contact__thumb { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--ei-border); }
.ei-contact__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ei-contact__thumb-rm {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(18,42,79,.82); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ei-contact__thumb-rm:hover { background: var(--ei-red); }
.ei-contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ei-contact__submit { align-self: flex-start; }
.ei-contact__status { margin: 0; font-size: .92rem; font-weight: 600; }
.ei-contact__status:empty { display: none; }
.ei-contact__status.is-ok { color: var(--ei-green, #009e73); }
.ei-contact__status.is-err { color: var(--ei-red); }
@media (max-width: 540px) { .ei-contact__row { grid-template-columns: 1fr; } }

/* Contact page — hero + form + category-driven aside */
.ei-cp { max-width: 1080px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.4rem) 1.25rem clamp(2.5rem, 6vw, 4rem); }
.ei-cp__hero { max-width: 620px; margin: 0 0 clamp(1.8rem, 4vw, 2.6rem); }
.ei-cp__title { margin: .45rem 0 .65rem; font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; color: var(--ei-heading); }
.ei-cp__lede { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--ei-muted); }
.ei-cp__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.ei-cp__main-heading { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 800; color: var(--ei-heading); }
.ei-cp__aside { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 88px; }
.ei-cp__card { background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); padding: 1.2rem 1.3rem; }
.ei-cp__card-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ei-muted); margin-bottom: .65rem; }
.ei-cp__card--email { border-left: 3px solid var(--ei-navy); }
.ei-cp__email { display: inline-block; font-size: 1.05rem; font-weight: 800; color: var(--ei-navy); text-decoration: none; word-break: break-all; }
.ei-cp__email:hover { color: var(--ei-red); }
.ei-cp__note { margin: .55rem 0 0; font-size: .84rem; line-height: 1.5; color: var(--ei-muted); }
.ei-cp__cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.ei-cp__cat { display: block; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: .55rem .6rem; cursor: pointer; font: inherit; transition: background .15s ease, border-color .15s ease; }
.ei-cp__cat:hover, .ei-cp__cat:focus-visible { background: var(--ei-bg); border-color: var(--ei-border); outline: none; }
.ei-cp__cat strong { display: block; color: var(--ei-heading); font-size: .94rem; font-weight: 700; }
.ei-cp__cat span { display: block; color: var(--ei-muted); font-size: .82rem; line-height: 1.4; margin-top: .12rem; }
.ei-cp__privacy { margin: .85rem 0 0; font-size: .82rem; line-height: 1.5; color: var(--ei-muted); }
.ei-cp__privacy a { color: var(--ei-navy); font-weight: 600; }
.ei-cp__social { display: flex; flex-direction: column; gap: .55rem; }
.ei-cp__social-link { display: inline-flex; align-items: center; gap: .55rem; color: var(--ei-text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.ei-cp__social-link svg { width: 18px; height: 18px; flex: none; }
.ei-cp__social-link:hover { color: var(--ei-navy); }
.ei-cp .ei-contact { margin: 0; }
.ei-cp__connect { margin-top: clamp(1.6rem, 3.5vw, 2.4rem); }
.ei-cp__connect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: .7rem; }
.ei-cp__connect-card { display: flex; flex-direction: column; gap: .45rem; padding: 1.15rem 1.2rem; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.ei-cp__connect-card:hover { border-color: var(--ei-navy); transform: translateY(-2px); }
.ei-cp__connect-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 9px; background: var(--ei-bg); color: var(--ei-heading); }
.ei-cp__connect-icon svg { width: 18px; height: 18px; }
.ei-cp__connect-name { font-weight: 700; color: var(--ei-heading); font-size: .95rem; word-break: break-word; }
.ei-cp__connect-desc { font-size: .85rem; line-height: 1.45; color: var(--ei-muted); }
@media (max-width: 860px) {
  .ei-cp__grid { grid-template-columns: 1fr; }
  .ei-cp__aside { position: static; }
}
@media (max-width: 720px) { .ei-cp__connect-grid { grid-template-columns: 1fr; } }

/* Statistics page — "By the numbers" */
.ei-stats { max-width: 1040px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.6rem) 1.25rem clamp(2.5rem, 6vw, 4rem); }
.ei-stats__hero { max-width: 640px; margin: 0 0 clamp(1.8rem, 4vw, 2.6rem); }
.ei-stats__title { margin: .45rem 0 .65rem; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; color: var(--ei-heading); }
.ei-stats__lede { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--ei-muted); }
.ei-stats__hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.ei-stats__tile { display: flex; flex-direction: column; gap: .15rem; padding: 1.4rem 1.3rem; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); }
.ei-stats__tile-num { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; line-height: 1; color: var(--ei-navy); letter-spacing: -.02em; }
.ei-stats__tile-label { margin-top: .5rem; font-size: .95rem; font-weight: 700; color: var(--ei-heading); }
.ei-stats__tile-sub { font-size: .82rem; color: var(--ei-muted); }
.ei-stats__section { margin-top: clamp(1.8rem, 3.5vw, 2.6rem); }
.ei-stats__h2 { margin: 0 0 1rem; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ei-muted); }
.ei-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.ei-stats__card { display: flex; flex-direction: column; gap: .2rem; padding: 1.2rem 1.25rem; background: var(--ei-surface); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); }
.ei-stats__card-num { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--ei-heading); letter-spacing: -.02em; }
.ei-stats__card-label { font-size: .85rem; color: var(--ei-muted); }
.ei-stats__chart-section { margin-top: clamp(2.2rem, 4vw, 3rem); }
.ei-stats__chart-box { color: var(--ei-navy); }
.ei-stats__chart { display: block; width: 100%; height: auto; }
.ei-stats__chart-axis { display: flex; justify-content: space-between; margin-top: .5rem; font-size: .78rem; color: var(--ei-muted); }
.ei-stats__foot { margin-top: clamp(2rem, 4vw, 2.8rem); font-size: .88rem; line-height: 1.6; color: var(--ei-muted); }
.ei-stats__foot a { color: var(--ei-navy); font-weight: 600; }
@media (max-width: 860px) { .ei-stats__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .ei-stats__hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .ei-stats__grid { grid-template-columns: 1fr; } }
.ei-search-hero { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.ei-search-hero .ei-eyebrow { margin-bottom: .5rem; }
.ei-search-hero__title { margin: 0 0 1rem; font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; color: var(--ei-heading); }
.ei-search-hero__box { max-width: 38rem; }
.ei-search-hero__box .wp-block-search__inside-wrapper { border: 1px solid var(--ei-field-border); border-radius: 999px; background: var(--ei-field); padding: .25rem .25rem .25rem 1.1rem; overflow: hidden; }
.ei-search-hero__box .wp-block-search__input { border: 0; background: none; color: var(--ei-heading); font-size: 1rem; padding: .55rem 0; }
.ei-search-hero__box .wp-block-search__input:focus { outline: none; }
.ei-search-hero__box .wp-block-search__button { margin: 0; border: 0; border-radius: 999px; background: var(--ei-navy); color: #fff; font-weight: 700; padding: .55rem 1.2rem; cursor: pointer; }
.ei-search-hero__box .wp-block-search__button:hover { background: var(--ei-navy-deep); }

/* ---- The Brief + Support (two-up) ----------------------------------- */
.ei-home-sub__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 760px) { .ei-home-sub__grid { grid-template-columns: 1fr; } }
.ei-home-sub__card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg);
}
.ei-home-sub__card--brief { background: var(--ei-bg); box-shadow: var(--ei-shadow); }
[data-theme="dark"] .ei-home-sub__card--brief { background: var(--ei-surface); }
/* Support gets the navy treatment so it reads as the call to give. */
.ei-home-sub__card--support {
  color: #fff; border-color: transparent;
  background:
    radial-gradient(700px 300px at 90% -40%, rgba(224, 36, 31, .32), transparent 60%),
    linear-gradient(135deg, #1b4b8f, #122a4f);
}
.ei-home-sub__card--support .ei-eyebrow { color: #ffd4d1; }
.ei-home-sub__title { margin: .5rem 0 0; font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 800; letter-spacing: -.02em; }
.ei-home-sub__card--brief .ei-home-sub__title { color: var(--ei-heading); }
.ei-home-sub__card--support .ei-home-sub__title { color: #fff; }
.ei-home-sub__body { margin: .7rem 0 1.25rem; font-size: 1rem; line-height: 1.6; max-width: 42ch; }
.ei-home-sub__card--brief .ei-home-sub__body { color: var(--ei-muted); }
.ei-home-sub__card--support .ei-home-sub__body { color: rgba(233, 240, 250, .88); }
.ei-home-sub__card .ei-nl-form { margin-top: auto; max-width: 440px; }
.ei-home-sub__card--brief .ei-nl-form__input { background: var(--ei-surface); }
[data-theme="dark"] .ei-home-sub__card--brief .ei-nl-form__input { background: var(--ei-bg); }
.ei-home-sub__note { margin: .85rem 0 0; font-size: .8rem; color: var(--ei-muted); }
/* "Always free" list on the Support card (fills the card; white on navy). */
.ei-home-sub__list { list-style: none; margin: .35rem 0 1.4rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.ei-home-sub__list li { display: flex; align-items: flex-start; gap: .55rem; font-size: .95rem; color: rgba(255, 255, 255, .9); }
.ei-home-sub__list .ei-check { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; color: #fff; opacity: .85; margin-top: .12rem; }
.ei-home-sub__card--support .ei-btn--primary { margin-top: auto; background: #fff; color: var(--ei-navy-deep); }
.ei-home-sub__card--support .ei-btn--primary:hover { background: #e9f1fc; }

/* ---- Forecast block (real /forecasts dials + chamber mini-map) ------ */
.ei-home-fc__head { max-width: 62ch; margin-bottom: clamp(1.5rem, 3vw, 2rem); }
.ei-home-fc__title { margin: .35rem 0 0; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; color: var(--ei-heading); }
.ei-home-fc__lede { margin: .85rem 0 1.4rem; font-size: 1.04rem; line-height: 1.62; color: var(--ei-muted); }

/* Toggle spans the top so the map (col 1) and the single visible dial (col 2)
   start at the same line — the dial reads as paired with the map. */
.ei-home-fc__body { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(1.25rem, 3vw, 2.25rem); align-items: start; }
@media (max-width: 900px) { .ei-home-fc__body { grid-template-columns: 1fr; } }

.ei-home-fc__toggle { grid-column: 1 / -1; justify-self: start; display: inline-flex; gap: .3rem; padding: .3rem; background: var(--ei-surface-2); border: 1px solid var(--ei-border); border-radius: 999px; }
[data-theme="dark"] .ei-home-fc__toggle { background: var(--ei-surface); }
.ei-home-fc__toggle-btn {
  appearance: none; cursor: pointer; padding: .42rem .95rem; font-size: .85rem; font-weight: 700;
  color: var(--ei-muted); background: transparent; border: 0; border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.ei-home-fc__toggle-btn:hover { color: var(--ei-heading); }
.ei-home-fc__toggle-btn.is-active { color: #fff; background: var(--ei-navy); }
[data-theme="dark"] .ei-home-fc__toggle-btn.is-active { color: #0d1117; }
.ei-home-fc__toggle-btn:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 2px; }

.ei-home-fc__map {
  position: relative; min-height: 260px; display: flex; align-items: center; justify-content: center;
  background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg);
  padding: clamp(.75rem, 2vw, 1.25rem); box-shadow: var(--ei-shadow);
}
[data-theme="dark"] .ei-home-fc__map { background: var(--ei-surface); }
.ei-home-fc.is-ready .ei-home-fc__map { cursor: pointer; }
.ei-home-fc__map .ei-fc-usmap { width: 100%; max-height: 440px; }
.ei-home-fc__maplink { margin: .85rem 0 0; font-size: .9rem; font-weight: 700; }
.ei-home-fc__maplink a { color: var(--ei-navy); text-decoration: none; }
.ei-home-fc__maplink a:hover { text-decoration: underline; }
.ei-home-fc__fallback { margin: 0; padding: 1.25rem; text-align: center; color: var(--ei-muted); font-size: .95rem; }

.ei-home-fc__dials { display: flex; flex-direction: column; gap: clamp(.85rem, 1.6vw, 1.15rem); }
.ei-home-fc__dial { display: block; text-decoration: none; color: inherit; border-radius: var(--ei-radius-lg); transition: transform .18s ease; }
.ei-home-fc__dial[hidden] { display: none; }
.ei-home-fc__dial:hover { transform: translateY(-2px); }
.ei-home-fc__dial:focus-visible { outline: 2px solid var(--ei-navy); outline-offset: 3px; }
.ei-home-fc__dial .ei-fc-card { height: 100%; }

/* loading affordances */
.ei-home-fc__spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ei-border); border-top-color: var(--ei-navy); animation: ei-home-spin .8s linear infinite; }
@keyframes ei-home-spin { to { transform: rotate(360deg); } }
.ei-home-fc__skel { padding: 1.1rem 1.25rem; background: var(--ei-bg); border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); box-shadow: var(--ei-shadow); }
[data-theme="dark"] .ei-home-fc__skel { background: var(--ei-surface); }
.ei-home-fc__skel-name { font-weight: 800; color: var(--ei-heading); }
.ei-home-fc__skel-bar { display: block; height: 10px; margin-top: .8rem; border-radius: 999px; background: linear-gradient(90deg, var(--ei-surface-2), var(--ei-border), var(--ei-surface-2)); background-size: 200% 100%; animation: ei-home-shimmer 1.4s ease infinite; }
@keyframes ei-home-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .ei-home-fc__spinner, .ei-home-fc__skel-bar { animation: none; }
}

/* ============================================================
   Comments — Reddit-style threaded discussion (.ei-rc-*)
   ============================================================ */
.ei-comments { max-width: var(--ei-read); margin-inline: auto; }
.ei-rc-thread__title { margin: 0 0 1.1rem; font-size: 1.4rem; font-weight: 800; color: var(--ei-heading); }

.ei-rc-list, .ei-rc-list .children { list-style: none; margin: 0; padding: 0; }
.ei-rc-list { margin-top: 1.4rem; }
/* Nested replies: indent under a thread line that brightens on hover. */
.ei-rc-list .children { margin-left: 1.05rem; padding-left: 1rem; border-left: 2px solid var(--ei-border); }
.ei-rc-list .children:hover { border-left-color: color-mix(in srgb, var(--ei-navy) 45%, var(--ei-border)); }
.ei-rc { position: relative; }
.ei-rc__row { display: flex; gap: .5rem; padding: .55rem 0 .35rem; }
.ei-rc__collapse {
  flex: 0 0 auto; width: 1.3rem; height: 1.3rem; margin-top: .1rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 5px; background: transparent; color: var(--ei-muted);
  font-size: 1rem; line-height: 1; font-weight: 700; cursor: pointer;
}
.ei-rc__collapse:hover { background: var(--ei-surface-2); color: var(--ei-heading); }
.ei-rc__main { flex: 1 1 auto; min-width: 0; }
.ei-rc__head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ei-rc__avatar { width: 24px; height: 24px; border-radius: 50%; }
.ei-rc__author, .ei-rc__author a { font-size: .86rem; font-weight: 700; color: var(--ei-heading); text-decoration: none; }
.ei-rc__author a:hover { color: var(--ei-navy); }
.ei-rc__dot { color: var(--ei-muted); }
.ei-rc__time, .ei-rc__time a { font-size: .8rem; color: var(--ei-muted); text-decoration: none; }
.ei-rc__stub { font-size: .8rem; color: var(--ei-muted); font-weight: 700; }
.ei-rc__bodywrap { padding-left: calc(24px + .4rem); }
.ei-rc__content { margin: .3rem 0 .35rem; font-size: .96rem; line-height: 1.55; color: var(--ei-text); }
.ei-rc__content p { margin: 0 0 .55rem; }
.ei-rc__content p:last-child { margin-bottom: 0; }
.ei-rc__pending { margin: .2rem 0; font-size: .8rem; font-style: italic; color: var(--ei-muted); }
.ei-rc__actions { display: flex; align-items: center; gap: .35rem; }
.ei-rc__act a, .ei-rc__act > a { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; color: var(--ei-muted); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; }
.ei-rc__act a:hover { color: var(--ei-navy); background: var(--ei-surface-2); }
/* Collapsed: keep only the head line, hide body + children. */
.ei-rc.is-collapsed > .ei-rc__row .ei-rc__bodywrap { display: none; }
.ei-rc.is-collapsed > .children { display: none; }

/* Composer */
.ei-rc-form { margin: 0 0 1.6rem; }
.ei-rc-form .comment-reply-title { margin: 0 0 .7rem; font-size: 1rem; font-weight: 800; color: var(--ei-heading); }
/* The composer is one cohesive card: identity bar, textarea, footer — and it lights
   up as a single unit on focus, so it reads as a place to speak, not a loose field. */
.ei-rc-form__form { border: 1px solid var(--ei-border); border-radius: 14px; background: var(--ei-surface); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
[data-theme="dark"] .ei-rc-form__form { background: var(--ei-surface-2); }
.ei-rc-form__form:focus-within { border-color: var(--ei-navy); box-shadow: 0 0 0 3px rgba(27, 75, 143, .14); }
.ei-rc-form__identity { display: flex; align-items: center; gap: .55rem; padding: .6rem .9rem; border-bottom: 1px solid var(--ei-border); }
.ei-rc-form__avatar { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; }
.ei-rc-form__as { font-size: .86rem; font-weight: 600; color: var(--ei-heading); }
.ei-rc-form__editlink { margin-left: auto; font-size: .8rem; color: var(--ei-muted); text-decoration: none; transition: color .15s ease; }
.ei-rc-form__editlink:hover { color: var(--ei-navy); }
.ei-rc-form__field { margin: 0; }
.ei-rc-form__input { display: block; width: 100%; padding: .9rem; min-height: 6.5rem; font: inherit; font-size: .96rem; line-height: 1.5; color: var(--ei-heading); background: transparent; border: 0; resize: vertical; }
.ei-rc-form__input:focus { outline: none; }
.ei-rc-form__input::placeholder { color: var(--ei-muted); }
.ei-rc-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; padding: .6rem .65rem .6rem .9rem; border-top: 1px solid var(--ei-border); background: transparent; }
.ei-rc-form__hint { font-size: .78rem; color: var(--ei-muted); }
.ei-rc-form__actions { display: inline-flex; align-items: center; gap: .5rem; } /* button (+ hidden fields) flush right */
.ei-rc-form .submit { display: inline-flex; align-items: center; height: 40px; padding: 0 1.25rem; border: 0; border-radius: 999px; background: var(--ei-navy); color: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; transition: background-color .15s ease; }
.ei-rc-form .submit:hover { background: var(--ei-navy-deep); }
.ei-rc-form .comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; margin: .6rem 0 0; font-size: .82rem; color: var(--ei-muted); }
@media (max-width: 480px) { .ei-rc-form__hint { display: none; } .ei-rc-form__foot { justify-content: flex-end; } }
.ei-rc-closed { color: var(--ei-muted); font-size: .9rem; }

/* The subscriber wall (logged-out) */
.ei-rc-wall {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1rem;
  margin: 0 0 1.6rem; padding: 1.2rem 1.3rem;
  border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg);
  background: var(--ei-surface);
}
.ei-rc-wall__mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--ei-navy) 12%, transparent); color: var(--ei-navy); }
.ei-rc-wall__mark svg { width: 22px; height: 22px; }
.ei-rc-wall__text { flex: 1 1 240px; min-width: 0; }
.ei-rc-wall__title { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--ei-heading); }
.ei-rc-wall__sub { margin: .2rem 0 0; font-size: .9rem; color: var(--ei-muted); }
.ei-rc-wall__actions { display: flex; align-items: center; gap: .9rem; }
.ei-rc-wall__signin { font-weight: 700; color: var(--ei-link); text-decoration: none; }
.ei-rc-wall__signin:hover { color: var(--ei-red); }
@media (max-width: 540px) { .ei-rc-wall__actions { width: 100%; } }

/* ============================================================
   SEO/AdSense prose cards below the full-bleed tools (forecasts, shuffler)
   ============================================================ */
/* Full-width band below the dashboard; content centred at a readable measure.
   Generous bottom padding gives clear separation from the footer. */
.ei-seo { box-sizing: border-box; margin: 0; padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem) clamp(3.5rem, 7vw, 5.5rem); background: var(--ei-bg); border-top: 1px solid var(--ei-border); }
.ei-seo__inner { max-width: 1080px; margin-inline: auto; }
.ei-seo__eyebrow { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ei-red); }
.ei-seo__title { margin: .4rem 0 1rem; font-size: clamp(1.5rem, 3.2vw, 2.05rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--ei-heading); }
.ei-seo__lead { margin: 0 0 1.1rem; font-size: 1.1rem; line-height: 1.7; color: var(--ei-heading); }
.ei-seo p { margin: 0 0 1.1rem; font-size: 1.02rem; line-height: 1.75; color: var(--ei-text); }
.ei-seo__sub { margin: 1.8rem 0 .6rem; font-size: 1.18rem; font-weight: 800; letter-spacing: -.01em; color: var(--ei-heading); }
.ei-seo__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.ei-seo__feat { padding: 1.1rem 1.25rem; border: 1px solid var(--ei-border); border-radius: var(--ei-radius-lg); background: var(--ei-surface); }
.ei-seo__feat h4 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 800; color: var(--ei-heading); }
.ei-seo__feat p { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--ei-muted); }
.ei-seo__more { margin: 0; }
.ei-seo__more a { color: var(--ei-link); font-weight: 700; text-decoration: none; }
.ei-seo__more a:hover { text-decoration: underline; }
