@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400&display=swap');

:root {
  --navy: #1B3A5C;
  --navy-dark: #0F2238;
  --navy-light: #3A5A78;
  --blue: #2E74B5;
  --blue-light: #E8F1FA;
  --blue-mid: #4A8FCC;
  --gold: #C8952F;
  --gold-light: #F5ECD8;
  --text: #1A1A1A;
  --text-mid: #444;
  --text-muted: #6B7280;
  --border: #DDE3EA;
  --border-light: #EEF1F5;
  --bg: #FAFBFC;
  --white: #FFFFFF;
  --red-flag: #C0392B;
  --green-good: #1A7A4A;

  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;
  --font-reading: 'Poppins', system-ui, sans-serif;

  --max-width: 1200px;
  --reading-width: 740px;
  --nav-height: 64px;
  --section-pad: 80px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ── BUILD BANNER ── */
.build-banner {
  background: var(--gold-light);
  border-bottom: 1px solid var(--gold);
  color: var(--navy-dark);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  padding: 8px 16px;
}
.build-banner strong { color: var(--navy); font-weight: 600; }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  line-height: 1.1;
  margin-right: auto;
  text-decoration: none;
}
.nav-logo-img {
  height: 34px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.nav-logo-top {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-sections {
  display: flex;
  list-style: none;
  gap: 0;
  height: 100%;
  min-width: 0;
}

.nav-sections > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-sections > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.nav-sections > li > a:hover,
.nav-sections > li > a.active {
  color: var(--navy);
  border-bottom-color: var(--blue);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--blue);
  min-width: 260px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

.nav-sections > li:hover .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 13.5px;
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { background: var(--blue-light); color: var(--navy); }

.nav-dropdown .dropdown-label {
  padding: 8px 18px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg);
}

.nav-cta {
  margin-left: 20px;
  flex-shrink: 0;
  padding: 8px 18px;
  background: var(--navy);
  color: var(--white) !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none !important;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--navy-light); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 8px;
  padding: 0;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-panel {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 99;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-mobile-panel.is-open { display: block; }

.nav-mobile-group {
  border-bottom: 1px solid var(--border-light);
  padding: 16px 24px;
}
.nav-mobile-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.nav-mobile-group a {
  display: block;
  padding: 11px 0;
  font-size: 15px;
  color: var(--text-mid);
  text-decoration: none;
  border-top: 1px solid var(--border-light);
}
.nav-mobile-group a:first-of-type { border-top: none; }
.nav-mobile-group a.active { color: var(--navy); font-weight: 600; }

/* ── HERO ── */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 96px 32px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 79px,
    rgba(255,255,255,0.025) 79px,
    rgba(255,255,255,0.025) 80px
  );
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  max-width: 820px;
  margin-bottom: 24px;
  color: var(--white);
}

.hero-standfirst {
  font-size: 19px;
  font-weight: 300;
  line-height: 1.6;
  max-width: 680px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 36px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  max-width: 820px;
  margin-top: 48px;
}

.hero-stat {
  background: rgba(255,255,255,0.05);
  padding: 20px 24px;
  transition: background 0.15s;
}
.hero-stat:hover { background: rgba(255,255,255,0.09); }

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.35;
}

/* ── SECTION PILLARS GRID ── */
.sections-overview {
  padding: var(--section-pad) 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-block {
  margin-bottom: 56px;
}

.section-block:last-child { margin-bottom: 0; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy);
}

.section-number {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.section-description {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 640px;
  margin-top: -14px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.pillar-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 22px 24px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  position: relative;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--border);
  transition: background 0.15s;
}

.pillar-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(46,116,181,0.1);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--text);
}

.pillar-card:hover::before {
  background: var(--blue);
}

.content-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 8px;
}
.content-badge.essay {
  background: var(--border-light);
  color: var(--text-mid);
  border: 1px solid var(--border);
}
.content-badge.evidence {
  background: var(--gold-light);
  color: #8A6A1F;
  border: 1px solid rgba(200, 149, 47, 0.35);
}
.content-badge.on-dark.essay {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.content-badge.on-dark.evidence {
  background: rgba(200, 149, 47, 0.18);
  color: #E8C675;
  border: 1px solid rgba(200, 149, 47, 0.45);
}
.content-badge.discussion {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid rgba(46, 116, 181, 0.35);
}
.content-badge.on-dark.discussion {
  background: rgba(74, 143, 204, 0.18);
  color: #9CC7EA;
  border: 1px solid rgba(74, 143, 204, 0.45);
}

.pillar-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.25;
}

.pillar-summary {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.pillar-arrow {
  position: absolute;
  bottom: 18px;
  right: 20px;
  font-size: 16px;
  color: var(--border);
  transition: color 0.15s, transform 0.15s;
}
.pillar-card:hover .pillar-arrow {
  color: var(--blue);
  transform: translateX(3px);
}

/* ── MANIFESTO STRIP ── */
.manifesto-strip {
  background: var(--gold-light);
  border-top: 1px solid #E8D5AA;
  border-bottom: 1px solid #E8D5AA;
  padding: 48px 32px;
}

.manifesto-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.manifesto-quote {
  font-family: var(--font-reading);
  font-size: 22px;
  font-style: italic;
  color: var(--navy);
  line-height: 1.55;
  border-left: 3px solid var(--gold);
  padding-left: 24px;
}

.manifesto-principles {
  list-style: none;
}

.manifesto-principles li {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14.5px;
  color: var(--text-mid);
  align-items: flex-start;
}

.manifesto-principles li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 7px;
}

/* ── FOOTER ── */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  padding: 48px 32px 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-mission {
  font-size: 13px;
  line-height: 1.65;
  max-width: 280px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* ── PILLAR PAGE ── */
.pillar-hero {
  background: var(--navy);
  color: var(--white);
  padding: 64px 32px 56px;
}

.pillar-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.pillar-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.pillar-breadcrumb a { color: rgba(255,255,255,0.55); text-decoration: none; }
.pillar-breadcrumb a:hover { color: var(--white); }
.pillar-breadcrumb span { opacity: 0.4; }

.pillar-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  max-width: 700px;
  margin-bottom: 18px;
}

.pillar-hero-standfirst {
  font-size: 17px;
  font-weight: 300;
  color: rgba(255,255,255,0.78);
  max-width: 620px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.pillar-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.pillar-meta .content-badge { margin-bottom: 0; }

.pillar-meta strong { color: rgba(255,255,255,0.7); font-weight: 500; }

.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.follow-btn::before {
  content: '☆';
  font-size: 13px;
}
.follow-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
}
.follow-btn.following {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.follow-btn.following::before {
  content: '★';
}

/* ── PILLAR KEY NUMBERS ── */
.key-numbers {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
}

.key-numbers-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}

.key-number {
  padding: 28px 20px;
  border-right: 1px solid var(--border-light);
  position: relative;
}
.key-number:last-child { border-right: none; }

.key-number-val {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}

.key-number-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.key-number-subnote {
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Inline variant: same key-number children, used inside article prose
   rather than as a full-bleed strip under the hero. */
.inline-stat-strip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 32px 0;
  overflow: hidden;
}
.inline-stat-strip .key-numbers-inner { max-width: none; }
.inline-stat-strip .key-number { padding: 20px 18px; }
.inline-stat-strip .key-number-val { font-size: 22px; }

@media (max-width: 640px) {
  .inline-stat-strip .key-numbers-inner { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── PILLAR CONTENT ── */
.pillar-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 32px;
  align-items: start;
}

.pillar-body { min-width: 0; }

.pillar-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.toc-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  border-left: 2px solid var(--border);
}

.toc-list li a {
  display: block;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, border-left-color 0.15s;
  border-left: 2px solid transparent;
  margin-left: -2px;
}

.toc-list li a:hover,
.toc-list li a.active {
  color: var(--navy);
  border-left-color: var(--blue);
}

.toc-list li a.toc-h1 {
  font-weight: 600;
  color: var(--text-mid);
}
.toc-list li a.toc-h1:hover,
.toc-list li a.toc-h1.active {
  color: var(--navy);
}

/* ── PILLAR BODY TYPOGRAPHY ── */
.pillar-body h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
  margin: 80px 0 24px;
  padding-top: 32px;
  border-top: 2px solid var(--gold);
}
.pillar-body h1:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.pillar-body h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 72px 0 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pillar-body h2:first-child { margin-top: 0; border-top: none; }

.pillar-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 48px 0 16px;
}

.pillar-body p {
  font-family: var(--font-reading);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 24px;
}

.pillar-body ul,
.pillar-body ol {
  margin: 0 0 24px 24px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-mid);
}

.pillar-body li { margin-bottom: 8px; }

.pillar-body p strong {
  font-weight: 600;
  color: var(--text);
}

/* ── COLLAPSIBLE CROSS-PILLAR DEPENDENCIES ── */
.cross-pillar-details {
  margin: 56px 0 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cross-pillar-summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  background: var(--blue-light);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.cross-pillar-summary::-webkit-details-marker { display: none; }
.cross-pillar-summary::before {
  content: '▸';
  display: inline-block;
  color: var(--blue);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.cross-pillar-details[open] .cross-pillar-summary::before {
  transform: rotate(90deg);
}

.cross-pillar-body {
  padding: 4px 20px 20px;
}
.cross-pillar-body table { margin: 16px 0 0; }

/* ── CHARTS ── */
.chart {
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  background: var(--white);
}

.chart-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.chart-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.chart-source {
  margin-top: 18px;
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-mid);
}
.chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.chart-legend-swatch.series-a { background: var(--blue); }
.chart-legend-swatch.series-b { background: var(--gold); }

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr 88px;
  align-items: center;
  gap: 14px;
  border-radius: 4px;
}
.chart-bar-row:hover,
.chart-bar-row:focus-visible {
  background: var(--bg);
  outline: none;
}

.chart-bar-label {
  font-size: 13px;
  color: var(--text-mid);
}

.chart-bar-track {
  position: relative;
  height: 12px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--blue);
}
.chart-bar-fill.series-a { background: var(--blue); }

/* Range (low-high) variant: a floating segment rather than a bar from zero */
.chart-bar-range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  min-width: 6px;
  border-radius: 6px;
  background: var(--blue);
}
.chart-bar-fill.series-b { background: var(--gold); }

.chart-bar-row:hover .chart-bar-fill,
.chart-bar-row:focus-visible .chart-bar-fill {
  filter: brightness(0.88);
}

.chart-bar-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
}

/* Paired (two-series) variant: each category gets two stacked mini rows */
.chart-bar-group {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  gap: 14px;
  align-items: center;
}
.chart-bar-group-label {
  font-size: 13px;
  color: var(--text-mid);
}
.chart-bar-pair {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.chart-bar-row-mini {
  display: grid;
  grid-template-columns: 1fr 64px;
  align-items: center;
  gap: 10px;
  border-radius: 3px;
}
.chart-bar-row-mini:hover,
.chart-bar-row-mini:focus-visible {
  background: var(--bg);
  outline: none;
}
.chart-bar-row-mini .chart-bar-track { height: 9px; }
.chart-bar-value-mini {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
}

.chart-table-toggle {
  margin: 4px 0 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.chart-table-toggle summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 16px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-table-toggle summary::-webkit-details-marker { display: none; }
.chart-table-toggle summary::before {
  content: '▸';
  color: var(--blue);
  transition: transform 0.15s ease;
}
.chart-table-toggle[open] summary::before { transform: rotate(90deg); }
.pillar-body .chart-table-toggle table { margin: 0; }

@media (max-width: 640px) {
  .chart-bar-row { grid-template-columns: 1fr; row-gap: 4px; }
  .chart-bar-value { text-align: left; }
  .chart-bar-group { grid-template-columns: 1fr; }
}

/* ── SHARE BAR ── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 48px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.share-bar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  white-space: nowrap;
}

.share-bar-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.share-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
  text-decoration: none;
}
.share-btn-copy.copied {
  border-color: var(--green-good);
  color: var(--green-good);
  background: #EAF6EF;
}

.share-bar-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 32px 40px;
}
.share-bar-section .share-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: none;
  padding-top: 0;
  justify-content: center;
}

.share-bar-section-top {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}
.share-bar-section-top .share-bar {
  justify-content: flex-start;
}

/* ── ME PAGE ── */
.me-hero { padding: 72px 32px 56px; }

.me-section {
  padding: 56px 32px;
  border-bottom: 1px solid var(--border);
}
.me-section-muted { background: var(--bg); }

.me-section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.me-section-inner h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.me-empty-state {
  display: block;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 560px;
}

#me-followed-list.pillars-grid { display: none; }

/* ── BUDGET TOOL ── */
.me-tool-intro {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mid);
  max-width: 720px;
  margin-bottom: 28px;
}
.me-tool-intro strong { color: var(--navy); }
.me-tool-intro-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-mid);
  font-size: 13px;
  vertical-align: middle;
}

.budget-total-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.budget-total-label {
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 10px;
}
.budget-total-label strong { color: var(--navy); font-size: 15px; }
.budget-total-track {
  height: 10px;
  background: var(--bg);
  border-radius: 5px;
  overflow: hidden;
}
.budget-total-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--blue);
  transition: width 0.15s, background 0.15s;
}
.budget-total-bar.under .budget-total-fill { background: var(--gold); }
.budget-total-bar.over .budget-total-fill { background: var(--red-flag); }
.budget-total-bar.match .budget-total-fill { background: var(--green-good); }
.budget-total-bar.match .budget-total-label strong { color: var(--green-good); }

.budget-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.budget-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.budget-row-rank {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 700;
}
.budget-row-main { flex: 1; min-width: 0; }
.budget-row-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.budget-row-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.budget-row-control {
  display: flex;
  align-items: center;
  gap: 12px;
}
.budget-slider-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.budget-row-slider {
  width: 100%;
  accent-color: var(--blue);
  position: relative;
  z-index: 1;
}
.budget-row-actual-marker {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 16px;
  background: var(--gold);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}
.budget-row-value {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  width: 64px;
}
.budget-row-number {
  width: 48px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--navy);
  text-align: right;
  margin-right: 3px;
}
.budget-row-translate {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.budget-row-delta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.budget-row-delta.is-match { color: var(--green-good); }

.budget-row-details {
  margin-top: 10px;
}
.budget-row-details summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}
.budget-row-details summary::-webkit-details-marker { display: none; }
.budget-row-details summary::before {
  content: '▸';
  transition: transform 0.15s ease;
}
.budget-row-details[open] summary::before { transform: rotate(90deg); }
.budget-row-details-body {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-mid);
}
.budget-row-details-body p { margin-bottom: 6px; }
.budget-row-details-body p:last-child { margin-bottom: 0; }
.budget-row-per-person { font-weight: 600; color: var(--navy); }
.budget-row-per-person-source {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

.budget-row-handle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 18px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.budget-row-handle:hover { background: var(--bg); color: var(--blue); }
.budget-row {
  transition: transform 0.15s ease;
}
.budget-row.dragging {
  transition: none;
  position: relative;
  z-index: 20;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  cursor: grabbing;
}
.budget-row.dragging .budget-row-handle { cursor: grabbing; }

.budget-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.share-btn-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.share-btn-primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  color: var(--white);
}
.share-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.budget-row-locked {
  background: var(--bg);
  border-style: dashed;
  margin-bottom: 10px;
}
.budget-row-locked .budget-row-rank {
  background: var(--border);
  font-size: 13px;
}
.budget-row-fixed-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.budget-row-fixed-note {
  font-size: 12px;
  color: var(--text-muted);
}

.budget-comparison { margin-top: 32px; }

.budget-summary {
  margin-top: 20px;
  padding: 24px 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.budget-summary-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.budget-summary-caveat {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.budget-summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.budget-summary-list li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mid);
  padding-left: 16px;
  border-left: 2px solid var(--border);
}
.budget-summary-list li strong { color: var(--navy); }

@media (max-width: 640px) {
  .budget-row { flex-wrap: wrap; }
  .budget-row-handle { order: 3; margin-left: auto; }
}

/* ── CITATIONS ── */
.citation {
  font-size: 11px;
  margin-left: 1px;
}
.citation a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 3px;
}
.citation a:hover {
  background: var(--blue-light);
  text-decoration: none;
}

.pillar-body tr:target td {
  background: var(--gold-light);
}

/* ── PILLAR BODY TABLES ── */
.pillar-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 15px;
  line-height: 1.5;
}

.pillar-body thead th {
  background: var(--navy);
  color: var(--white);
  padding: 11px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.pillar-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-mid);
  vertical-align: top;
}

.pillar-body tr:nth-child(even) td { background: var(--bg); }
.pillar-body tr:hover td { background: var(--blue-light); }

.pillar-body td:first-child {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

/* ── KEY PROPOSALS / PER-ARGUMENT BACKING ── */
.proposal-list {
  margin: 28px 0 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.proposal-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-light);
  background: var(--white);
}

.proposal-item:last-child { border-bottom: none; }
.proposal-item:nth-child(even) { background: var(--bg); }

.proposal-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.proposal-item:nth-child(1) .proposal-number { background: var(--blue); }
.proposal-item:nth-child(2) .proposal-number { background: var(--gold); color: var(--navy-dark); }
.proposal-item:nth-child(3) .proposal-number { background: #5A4A8A; }
.proposal-item:nth-child(4) .proposal-number { background: #2A7A5A; }
.proposal-item:nth-child(5) .proposal-number { background: var(--red-flag); }
.proposal-item:nth-child(6) .proposal-number { background: var(--navy-light); }

/* Inline badge referencing a Key Proposal, used within callouts/bullets in body copy */
.proposal-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--white);
  background: var(--navy);
  padding: 2px 9px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
  white-space: nowrap;
}

.proposal-tag-1 { background: var(--blue); }
.proposal-tag-2 { background: var(--gold); color: var(--navy-dark); }
.proposal-tag-3 { background: #5A4A8A; }
.proposal-tag-4 { background: #2A7A5A; }
.proposal-tag-5 { background: var(--red-flag); }
.proposal-tag-6 { background: var(--navy-light); }

.proposal-text {
  font-family: var(--font-reading);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-mid);
  margin: 0;
}

.proposal-text strong { color: var(--text); font-weight: 600; }

.proposal-backing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 100px;
  text-align: center;
}

.proposal-backing-count {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}

.proposal-backing-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proposal-backing button {
  margin-top: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 4px;
  border: 1px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  cursor: not-allowed;
  opacity: 0.55;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .proposal-item { grid-template-columns: 30px 1fr; }
  .proposal-backing {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 10px;
  }
}

/* ── CALLOUT BOXES ── */
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 28px 0;
  border: 1px solid var(--border);
}

.callout-label {
  background: var(--navy);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 14px 10px;
  text-align: center;
  white-space: nowrap;
}

.callout-body {
  background: #F7F9FC;
  padding: 18px 22px;
  font-family: var(--font-reading);
  font-size: 15.5px;
  font-style: italic;
  color: var(--text-mid);
  line-height: 1.7;
}

.callout.reform .callout-label { background: var(--blue); }
.callout.steelman .callout-label { background: #5A4A8A; }
.callout.keypoint .callout-label { background: var(--navy); }
.callout.honest .callout-label { background: #2A7A5A; }

/* ── COMPARISON TABLE ── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 24px 0;
}

.comparison-table th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
}

.comparison-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-mid);
}

.comparison-table tr:nth-child(even) td { background: var(--bg); }
.comparison-table tr:hover td { background: var(--blue-light); }

.comparison-table .highlight-row td {
  font-weight: 600;
  color: var(--navy);
  background: rgba(46,116,181,0.07);
}

/* ── COUNTER STRIP ── */
.counter-strip {
  background: var(--navy);
  color: var(--white);
  padding: 32px;
  text-align: center;
}

.counter-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
}

.counter-label {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-top: 6px;
}

/* ── RELATED PILLARS ── */
.related-pillars {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 48px 32px;
}

.related-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.related-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
}

/* ── COUNTER & BACKING SECTIONS ── */
.counter-section {
  background: var(--navy);
  padding: 56px 32px;
  text-align: center;
}
.counter-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.counter-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
}
.backing-cta {
  background: var(--blue-light);
  padding: 64px 32px;
  border-top: 3px solid var(--blue);
}
.backing-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.backing-heading {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.backing-subhead {
  color: var(--text-mid);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}
.backing-form-placeholder {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
  text-align: left;
}
.backing-coming-soon-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  display: block;
}
.backing-form-fields {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.backing-form-fields input,
.backing-form-fields button {
  width: 100%;
  padding: 11px 14px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}
.backing-form-fields input {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
  cursor: not-allowed;
}
.backing-form-fields button {
  background: var(--navy);
  color: var(--white);
  border: none;
  font-weight: 600;
  opacity: 0.45;
  cursor: not-allowed;
  margin-top: 4px;
}
.backing-form-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.pillar-backer-count {
  color: var(--blue);
  font-weight: 600;
}

/* ── UTILS ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.text-muted { color: var(--text-muted); }
.text-navy { color: var(--navy); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .pillar-layout { grid-template-columns: 1fr; }
  .pillar-toc { display: none; }
  .key-numbers-inner { grid-template-columns: repeat(3, 1fr) !important; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .manifesto-inner { grid-template-columns: 1fr; }
  .section-description { display: none; }
  .pillar-body table {
    display: block;
    width: auto;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; }
  .nav-logo-top { display: none; }
  .nav-sections { display: none; }
  .nav-burger { display: flex; }
  .nav-cta { padding: 7px 12px; font-size: 12px; margin-left: 8px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .key-numbers-inner { grid-template-columns: repeat(2, 1fr) !important; }
  .key-number { padding: 18px 14px; }
  .key-number-val { font-size: 22px; }
  .pillars-grid { grid-template-columns: 1fr; }
}
