@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@300;400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

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

:root {
  --ink: #0a0a08;
  --cream: #f5f0e8;
  --red: #c8182a;
  --red-dark: #8b0f1c;
  --gold: #c9920a;
  --mid: #4a4a44;
  --border: #0a0a08;
  --ff-display: 'Instrument Serif', 'EB Garamond', Georgia, serif;
  --ff-body: "Raleway", sans-serif;;
  --ff-mono: 'JetBrains Mono', 'Courier New', monospace;
  --ff-com: "Playfair Display", Georgia;

  --p1: #c8182a;
  --p2: #0a5e3a;
  --p3: #1a3a6b;
  --p4: #8b6914;

  --p1-light: rgba(200, 24, 42, 0.07);
  --p2-light: rgba(10, 94, 58, 0.07);
  --p3-light: rgba(26, 58, 107, 0.07);
  --p4-light: rgba(139, 105, 20, 0.07);
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  /* Removes the underline */
  color: inherit;
  /* Inherits the color of the parent text instead of default blue */
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.6;
}

/* ── NAV ─────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 500;
  height: 55px;
  background: var(--ink);
  border-bottom: 3px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
}

.nav-top-row button {
  display: none;
}

.nav-top-row a span {
  padding: 0;
}

.nav-logo {
  font-family: var(--ff-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
}

.nav-logo span {
  color: var(--red);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

nav ul a {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

nav ul a:hover {
  color: var(--red);
}

.nav-cta {
  background: var(--red) !important;
  color: var(--cream) !important;
  padding: 8px 20px;
  letter-spacing: 0.12em !important;
  opacity: 1 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--red-dark) !important;
}

/* ── TICKER ──────────────────────────────────── */
.hero-ticker {
  background: var(--red);
  color: var(--cream);
  padding: 8px 3rem;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-block;
  animation: ticker 40s linear infinite;
}

@keyframes ticker {
  from {
    transform: translateX(100vw);
  }

  to {
    transform: translateX(-100%);
  }
}

.ticker-sep {
  margin: 0 2rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ── MANIFESTO HERO ──────────────────────────── */
.manifesto-hero {
  background: var(--ink);
  color: var(--cream);
  padding: 3rem 8rem;
  border-bottom: 3px solid var(--red);
  position: relative;
  overflow: hidden;
}

.manifesto-hero::before {
  content: 'MANIFESTO';
  position: absolute;
  font-family: var(--ff-display);
  font-size: 22vw;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.03);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

.mh-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
  display: block;
}

.mh-title {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.mh-title em {
  font-style: italic;
  color: var(--red);
}

.mh-sub {
  font-size: 1.15rem;
  color: rgba(245, 240, 232, 0.65);
  max-width: 60ch;
  line-height: 1.6;
  margin-bottom: 3rem;
}

.mh-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
}

.mh-pillar-tab {
  background: var(--ink);
  padding: 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: block;
}

.mh-pillar-tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mh-pillar-tab .pt-num {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--red);
  margin-bottom: 0.5rem;
  display: block;
}

.mh-pillar-tab .pt-name {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.2;
}

.mh-pillar-tab .pt-count {
  font-family: var(--ff-mono);
  font-size: 9px;
  color: rgba(245, 240, 232, 0.4);
  margin-top: 0.4rem;
  display: block;
}

.mh-pillar-tab[data-pillar="1"] .pt-num {
  color: var(--p1);
}

.mh-pillar-tab[data-pillar="2"] .pt-num {
  color: #2a9d5c;
}

.mh-pillar-tab[data-pillar="3"] .pt-num {
  color: #4a90d9;
}

.mh-pillar-tab[data-pillar="4"] .pt-num {
  color: var(--gold);
}

/* ── SECTION HEADERS ─────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--ink);
}

.section-number {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--red);
}

h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
}

/* ── INTRO STATEMENT ─────────────────────────── */
.intro-section {
  padding: 3rem 7rem;
  border-bottom: 2px solid var(--ink);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
}

.intro-divider {
  background: var(--ink);
}

.intro-left {
  padding-right: 3rem;
}

.intro-right {
  padding-left: 3rem;
}

.intro-quote {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.4;
  border-left: 4px solid var(--red);
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.intro-body {
  font-size: 1rem;
  color: var(--mid);
  line-height: 1.7;
}

.intro-body p {
  margin-bottom: 1rem;
}

/* ── PILLAR BLOCKS ───────────────────────────── */
.pillar-section {
  border-bottom: 2px solid var(--ink);
}

.pillar-header {
  padding: 4rem 7rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1px 2fr;
  gap: 0;
  border-bottom: 1px solid var(--ink);
}

.ph-divider {
  background: var(--ink);
}

.ph-left {
  padding-right: 3rem;
}

.ph-right {
  padding-left: 3rem;
}

.pillar-tag {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 1rem;
}

.pillar-big-num {
  font-family: var(--ff-display);
  font-size: 8rem;
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.04em;
  opacity: 0.08;
  display: block;
}

.pillar-h2 {
  font-family: var(--ff-com);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.pillar-summary {
  font-size: 1rem;
  color: var(--mid);
  line-height: 1.6;
  max-width: 55ch;
}

.pillar-meta {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.pm-item {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
}

.pm-item strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--red);
  letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════
   TOPIC TREE — Full Redesign
═══════════════════════════════════════════════ */
.topic-tree {
  padding: 2.5rem 7rem;
}

/* ── TOPIC BRANCH ── */
.topic-branch {
  margin-bottom: 1rem;
  border: 2px solid var(--ink);
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.topic-branch:hover {
  box-shadow: 4px 4px 0 var(--ink);
}

/* ── TOPIC TRUNK (top-level row) ── */
.topic-trunk {
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
  background: var(--cream);
  gap: 1rem;
}

.topic-trunk:hover,
.topic-trunk.open {
  background: var(--ink);
}

.topic-trunk:hover .tt-label,
.topic-trunk.open .tt-label {
  color: var(--cream);
}

.topic-trunk:hover .tt-code,
.topic-trunk.open .tt-code {
  color: rgba(245, 240, 232, 0.35);
}

.tt-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.tt-code {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--mid);
  min-width: 38px;
  flex-shrink: 0;
}

.tt-label {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tt-count {
  font-family: var(--ff-mono);
  font-size: 9px;
  color: rgba(245, 240, 232, 0.35);
  margin-left: 8px;
}

.topic-trunk.open .tt-count {
  color: rgba(245, 240, 232, 0.35);
}

/* Circled plus arrow */
.tt-arrow {
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(10, 10, 8, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-mono);
  font-size: 15px;
  line-height: 1;
  color: var(--mid);
  transition: transform 0.3s ease, border-color 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.topic-trunk:hover .tt-arrow {
  border-color: rgba(245, 240, 232, 0.3);
  color: rgba(245, 240, 232, 0.7);
}

.topic-trunk.open .tt-arrow {
  transform: rotate(45deg);
  border-color: var(--red);
  color: var(--red);
  background: rgba(200, 24, 42, 0.12);
}

/* ── SUBTOPICS WRAP ── */
.subtopics-wrap {
  display: none;
  border-top: 2px solid var(--ink);
}

.subtopics-wrap.open {
  display: block;
}

/* ── INDIVIDUAL SUBTOPIC ROW ── */
.subtopic {
  border-bottom: 1px solid rgba(10, 10, 8, 0.08);
  position: relative;
}

.subtopic:last-child {
  border-bottom: none;
}

.subtopic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem 0.9rem 2.75rem;
  cursor: pointer;
  transition: background 0.15s, padding-left 0.15s;
  background: rgba(245, 240, 232, 0.4);
  gap: 1rem;
}

.subtopic-header:hover {
  background: rgba(245, 240, 232, 0.85);
}

.subtopic-header.open {
  background: rgba(245, 240, 232, 0.95);
  border-left: 3px solid var(--p1);
  padding-left: calc(2.75rem - 3px);
}

.sub-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
}

.sub-code {
  font-family: var(--ff-mono);
  font-size: 8.5px;
  letter-spacing: 0.15em;
  color: rgba(10, 10, 8, 0.28);
  min-width: 36px;
  flex-shrink: 0;
}

.sub-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tiny arrow for subtopic */
.sub-arrow {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(10, 10, 8, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-mono);
  font-size: 12px;
  line-height: 1;
  color: rgba(10, 10, 8, 0.3);
  transition: transform 0.2s ease, color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.subtopic-header:hover .sub-arrow {
  border-color: rgba(10, 10, 8, 0.4);
  color: var(--ink);
}

.subtopic-header.open .sub-arrow {
  transform: rotate(45deg);
  color: var(--p1);
  border-color: var(--p1);
  background: rgba(200, 24, 42, 0.08);
}

/* ── LEAF WRAP — Policy card container ── */
.leaf-wrap {
  display: none;
  border-top: 1px solid rgba(10, 10, 8, 0.08);
}

.leaf-wrap.open {
  display: block;
  padding: 10px 20px 30px 40px;
}

/* Tinted tray that holds the cards */
.policies-grid {
  padding: 1.5rem 1.75rem 1.75rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #ede8de;
}

/* ── POLICY CARD ── */
.leaf-policy {
  background: var(--cream);
  border: 1.5px solid rgba(10, 10, 8, 0.1);
  border-radius: 2px;
  padding: 1.25rem 1.5rem 1.25rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}

.leaf-policy:hover {
  border-color: rgba(10, 10, 8, 0.22);
  transform: translateX(3px);
}

/* Left accent stripe — colour set per-pillar below */
.leaf-policy::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent, var(--p1));
}

/* Card header row: title + tag badge */
.lp-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 0.65rem;
}

.lp-title {
  font-family: var(--ff-display);
      letter-spacing: 0.04em;

  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  flex: 1;
  color: var(--ink);
}

.lp-tag {
  font-family: var(--ff-mono);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 1px;
  border: 1px solid var(--accent, var(--p1));
  color: var(--accent, var(--p1));
  background: rgba(200, 24, 42, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.lp-body {
  font-size: 0.875rem;
  color: var(--mid);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-family: var(--ff-body);
}

/* Metric chips row */
.lp-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.lp-metric {
  display: inline-flex;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: 8.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 1px;
  border: 1px solid rgba(10, 10, 8, 0.18);
  color: var(--mid);
  background: rgba(10, 10, 8, 0.03);
}

/* Target chip gets pillar accent */
.lp-metric:first-child {
  border-color: var(--accent, var(--p1));
  color: var(--accent, var(--p1));
  background: rgba(200, 24, 42, 0.05);
}

/* Pillar 1 — Environment (red) */
.ps-env {
  --accent: var(--p1);
}

.ps-env .pillar-tag {
  background: var(--p1);
  color: var(--cream);
}

.ps-env .pillar-big-num {
  color: var(--p1);
  opacity: 0.07;
}

.ps-env .pillar-h2 em {
  color: var(--p1);
}

.ps-env .topic-trunk.open,
.ps-env .topic-trunk:hover {
  background: var(--p1);
}

.ps-env .topic-trunk.open .tt-arrow,
.ps-env .topic-trunk:hover .tt-arrow {
  color: var(--cream);
  border-color: rgba(245, 240, 232, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.ps-env .pm-item strong {
  color: var(--p1);
}

.ps-env .subtopic-header.open {
  border-left-color: var(--p1);
}

.ps-env .subtopic-header.open .sub-arrow {
  color: var(--p1);
  border-color: var(--p1);
  background: rgba(200, 24, 42, 0.08);
}

.ps-env .lp-tag {
  border-color: var(--p1);
  color: var(--p1);
  background: rgba(200, 24, 42, 0.06);
}

.ps-env .lp-metric:first-child {
  border-color: var(--p1);
  color: var(--p1);
  background: rgba(200, 24, 42, 0.05);
}

.ps-env .add-template:hover {
  color: var(--p1);
  background: rgba(200, 24, 42, 0.04);
}

.ps-env .topic-branch:hover {
  box-shadow: 4px 4px 0 var(--p1);
}

/* Pillar 2 — Society (green) */
.ps-soc {
  --accent: var(--p2);
}

.ps-soc .pillar-tag {
  background: var(--p2);
  color: var(--cream);
}

.ps-soc .pillar-big-num {
  color: var(--p2);
  opacity: 0.07;
}

.ps-soc .pillar-h2 em {
  color: var(--p2);
}

.ps-soc .topic-trunk.open,
.ps-soc .topic-trunk:hover {
  background: var(--p2);
}

.ps-soc .topic-trunk.open .tt-arrow,
.ps-soc .topic-trunk:hover .tt-arrow {
  color: var(--cream);
  border-color: rgba(245, 240, 232, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.ps-soc .pm-item strong {
  color: var(--p2);
}

.ps-soc .topic-branch {
  border-color: #002901;
}

.ps-soc .topic-branch:hover {
  box-shadow: 4px 4px 0 var(--p2);
}

.ps-soc .subtopics-wrap {
  border-top-color: var(--p2);
}

.ps-soc .subtopic {
  border-bottom-color: rgba(10, 94, 58, 0.1);
}

.ps-soc .subtopic-header {
  background: rgba(10, 94, 58, 0.04);
}

.ps-soc .subtopic-header:hover {
  background: rgba(10, 94, 58, 0.08);
}

.ps-soc .subtopic-header.open {
  background: rgba(10, 94, 58, 0.1);
  border-left-color: var(--p2);
}

.ps-soc .subtopic-header.open .sub-arrow {
  color: var(--p2);
  border-color: var(--p2);
  background: rgba(10, 94, 58, 0.1);
}

.ps-soc .policies-grid {
  background: #e4ede7;
}

.ps-soc .lp-tag {
  border-color: var(--p2);
  color: var(--p2);
  background: rgba(10, 94, 58, 0.06);
}

.ps-soc .lp-metric:first-child {
  border-color: var(--p2);
  color: var(--p2);
  background: rgba(10, 94, 58, 0.05);
}

.ps-soc .leaf-policy::before {
  background: var(--p2);
}

.ps-soc .add-template:hover {
  color: var(--p2);
  background: rgba(10, 94, 58, 0.04);
}

.ps-soc .add-template {
  background: #e4ede7;
}

/* Pillar 3 — Governance (navy) */
.ps-gov {
  --accent: var(--p3);
}

.ps-gov .pillar-tag {
  background: var(--p3);
  color: var(--cream);
}

.ps-gov .pillar-big-num {
  color: var(--p3);
  opacity: 0.07;
}

.ps-gov .pillar-h2 em {
  color: var(--p3);
}

.ps-gov .topic-trunk.open,
.ps-gov .topic-trunk:hover {
  background: var(--p3);
}

.ps-gov .topic-trunk.open .tt-arrow,
.ps-gov .topic-trunk:hover .tt-arrow {
  color: var(--cream);
  border-color: rgba(245, 240, 232, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.ps-gov .pm-item strong {
  color: var(--p3);
}

.ps-gov .topic-branch {
  border-color: #000d3d;
}

.ps-gov .topic-branch:hover {
  box-shadow: 4px 4px 0 var(--p3);
}

.ps-gov .subtopics-wrap {
  border-top-color: var(--p3);
}

.ps-gov .subtopic {
  border-bottom-color: rgba(26, 58, 107, 0.1);
}

.ps-gov .subtopic-header {
  background: rgba(26, 58, 107, 0.04);
}

.ps-gov .subtopic-header:hover {
  background: rgba(26, 58, 107, 0.08);
}

.ps-gov .subtopic-header.open {
  background: rgba(26, 58, 107, 0.1);
  border-left-color: var(--p3);
}

.ps-gov .subtopic-header.open .sub-arrow {
  color: var(--p3);
  border-color: var(--p3);
  background: rgba(26, 58, 107, 0.1);
}

.ps-gov .policies-grid {
  background: #e3e6ed;
}

.ps-gov .lp-tag {
  border-color: var(--p3);
  color: var(--p3);
  background: rgba(26, 58, 107, 0.06);
}

.ps-gov .lp-metric:first-child {
  border-color: var(--p3);
  color: var(--p3);
  background: rgba(26, 58, 107, 0.05);
}

.ps-gov .leaf-policy::before {
  background: var(--p3);
}

.ps-gov .add-template:hover {
  color: var(--p3);
  background: rgba(26, 58, 107, 0.04);
}

.ps-gov .add-template {
  background: #e3e6ed;
}

/* Pillar 4 — Economy (gold) */
.ps-eco {
  --accent: var(--p4);
}

.ps-eco .pillar-tag {
  background: var(--p4);
  color: var(--cream);
}

.ps-eco .pillar-big-num {
  color: var(--p4);
  opacity: 0.07;
}

.ps-eco .pillar-h2 em {
  color: var(--p4);
}

.ps-eco .topic-trunk.open,
.ps-eco .topic-trunk:hover {
  background: var(--p4);
}

.ps-eco .topic-trunk.open .tt-arrow,
.ps-eco .topic-trunk:hover .tt-arrow {
  color: var(--cream);
  border-color: rgba(245, 240, 232, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.ps-eco .pm-item strong {
  color: var(--p4);
}

.ps-eco .topic-branch {
  border-color:#480000e2;
}

.ps-eco .topic-branch:hover {
  box-shadow: 4px 4px 0 var(--p4);
}

.ps-eco .subtopics-wrap {
  border-top-color: var(--p4);
}

.ps-eco .subtopic {
  border-bottom-color: rgba(139, 105, 20, 0.1);
}

.ps-eco .subtopic-header {
  background: rgba(139, 105, 20, 0.04);
}

.ps-eco .subtopic-header:hover {
  background: rgba(139, 105, 20, 0.08);
}

.ps-eco .subtopic-header.open {
  background: rgba(139, 105, 20, 0.1);
  border-left-color: var(--p4);
}

.ps-eco .subtopic-header.open .sub-arrow {
  color: var(--p4);
  border-color: var(--p4);
  background: rgba(139, 105, 20, 0.1);
}

.ps-eco .policies-grid {
  background: #ede9dc;
}

.ps-eco .lp-tag {
  border-color: var(--p4);
  color: var(--p4);
  background: rgba(139, 105, 20, 0.06);
}

.ps-eco .lp-metric:first-child {
  border-color: var(--p4);
  color: var(--p4);
  background: rgba(139, 105, 20, 0.05);
}

.ps-eco .leaf-policy::before {
  background: var(--p4);
}

.ps-eco .add-template:hover {
  color: var(--p4);
  background: rgba(139, 105, 20, 0.04);
}

.ps-eco .add-template {
  background: #ede9dc;
}

/* ── FOOTER ──────────────────────────────────── */
footer {
  background: var(--ink); color: var(--cream);
  padding: 3.5rem 3rem;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  border-top: 3px solid var(--red);
}

.footer-brand{
   padding-right: 7rem;
}

.footer-brand h3 {
  font-family: var(--ff-display); font-size: 1.6rem; font-weight: 500;
  color: var(--cream); margin-bottom: 0.35rem;
}
.ft-sub {
  font-family: var(--ff-mono); font-size: 8px; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(244,239,230,0.3);
  margin-bottom: 1.25rem; display: block;
}
.footer-brand p {
  font-family: Raleway, sans-serif; font-size: 0.84rem;  text-align: justify;
  color: rgba(244,239,230,0.4); line-height: 1.65; letter-spacing: 0.03em;
}
.ft-divider { height: 1px; background: var(--red-dark); margin: 1.5rem 0; }
.ft-tricolor { height: 2px; width: 48px; background: linear-gradient(to right,#FF6B00 33%,#fff 33% 66%,#138808 66%); }

.footer-col h4 {
  font-family: var(--ff-mono); font-size: 9.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--red); margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li {
  font-family: 'DM Mono', monospace ; font-size: 0.68rem;
  color: rgba(244,239,230,0.45); padding: 5px 0; letter-spacing: 0.15em;
  cursor: pointer; transition: color 0.2s;
}
.footer-col ul li:hover { color: var(--cream); }

.footer-bottom {
  background: #050503; padding: 1rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom span {
  font-family: var(--ff-mono); font-size: 9.5px; letter-spacing: 0.14em;
  color: rgba(244,239,230,0.22);
}

/* ── ANIMATIONS ──────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.7s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
  opacity: 0;
}

.delay-2 {
  animation-delay: 0.25s;
  opacity: 0;
}

.btn-primary {
  display: inline-block;
  background: var(--red);
  color: var(--cream);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 32px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  border: 2px solid var(--red);
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* TOC sidebar */
.toc-bar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 8px;
  background: rgba(10, 10, 8, 0.85);
  border-right: 3px solid var(--red);
}

.toc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.3);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: block;
}

.toc-dot:hover,
.toc-dot.active {
  background: var(--red);
  transform: scale(1.4);
}

.toc-dot[data-p="1"]:hover,
.toc-dot[data-p="1"].active {
  background: var(--p1);
}

.toc-dot[data-p="2"]:hover,
.toc-dot[data-p="2"].active {
  background: #2a9d5c;
}

.toc-dot[data-p="3"]:hover,
.toc-dot[data-p="3"].active {
  background: #4a90d9;
}

.toc-dot[data-p="4"]:hover,
.toc-dot[data-p="4"].active {
  background: var(--gold);
}

/* Back-to-top */
#btt {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  padding: 10px 16px;
  border: 2px solid var(--red);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#btt.show {
  opacity: 1;
  pointer-events: all;
}

#btt:hover {
  background: var(--red);
}

/* ═══════════════════════════════════════════════
   BHARATYAM MANIFESTO — MOBILE CSS
   Responsive overrides for ≤ 1024px and ≤ 640px
   Editorial · Brutalist · Newspaper aesthetic
═══════════════════════════════════════════════ */


/* ══════════════════════════════════════════════
   TABLET  ≤ 1024px
══════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* NAV */
  nav {
    padding: 0 1.75rem;
  }

  nav ul {
    gap: 1.75rem;
  }

  /* MANIFESTO HERO */
  .manifesto-hero {
    padding: 2.5rem 3rem;
  }

  .mh-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* INTRO */
  .intro-section {
    padding: 2.5rem 3rem;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .intro-divider {
    display: none;
  }

  .intro-right {
    padding-left: 0;
    padding-top: 2rem;
    border-top: 2px solid var(--ink);
  }

  /* PILLAR HEADER */
  .pillar-header {
    padding: 3rem 3rem 2.5rem;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ph-divider {
    display: none;
  }

  .ph-left {
    padding-right: 0;
    display: flex;
    flex-direction: column;
  }

  .ph-right {
    padding-left: 0;
    border-top: 2px solid var(--ink);
    padding-top: 1.5rem;
  }

  /* TOPIC TREE */
  .topic-tree {
    padding: 2rem 3rem;
  }

  /* LEAF / POLICIES */
  .leaf-wrap.open {
    padding: 8px 12px 24px 24px;
  }

  .policies-grid {
    padding: 1.25rem 1.25rem 1.5rem 2rem;
  }

  /* FOOTER */
  footer {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 3rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  /* TOC BAR — hide on tablet */
  .toc-bar {
    display: none;
  }
}


/* ══════════════════════════════════════════════
   MOBILE  ≤ 640px
   Full redesign for narrow viewports
══════════════════════════════════════════════ */
@media (max-width: 640px) {

  /* ─── BASE ──────────────────────────────── */
  body {
    font-size: 16px;
    /* Prevent horizontal scroll caused by ticker */
    overflow-x: hidden;
  }

  /* Hide fixed sidebar — no room */
  .toc-bar {
    display: none;
  }

  /* Back to top — keep but slim */
  #btt {
    bottom: 1rem;
    right: 1rem;
    font-size: 8px;
    letter-spacing: 0.18em;
    padding: 8px 13px;
    border-width: 1.5px;
  }


  /* ─── NAV ───────────────────────────────── */
  nav {
    height: auto;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    position: sticky;
    top: 0;
    z-index: 200;
  }

  /* Logo row */
  .nav-logo {
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 1.25rem;
    font-size: 11px;
    letter-spacing: 0.2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex: 1;
  }

  /* Hamburger button — add this to your HTML too (see below) */
  .nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: none;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--cream);
    cursor: pointer;
    font-size: 20px;
    flex-shrink: 0;
  }

  /* Logo + hamburger sit on the same row */
  .nav-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-top-row button {
    display: inline;
  }

  .nav-top-row a span {
    padding: 10px;
  }

  /* Collapsible link drawer */
  nav ul {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s ease;
    padding: 0;
    gap: 0;
  }

  nav ul.nav-open {
    max-height: 400px;
  }

  nav ul li {
    flex-shrink: 0;
    width: 100%;
  }

  nav ul a {
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 1rem;
    font-size: 10px;
    letter-spacing: 0.15em;
    opacity: 1;
    color: rgba(245, 240, 232, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-right: none;
    background: #191919 !important;
    color: #fff !important;
    height: 46px !important;
    justify-content: center;
    font-size: 10px !important;
    border-bottom: none !important;
    margin: 0.5rem 1.25rem 0;
    width: calc(100% - 2.5rem);
  }

  nav ul a:hover {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.04);
  }

  nav ul li:last-child a {
    border-bottom: none;
  }

  .nav-cta {
    background: var(--red) !important;
    color: var(--cream) !important;
    opacity: 1 !important;
    padding: 0 1.25rem !important;
    height: 46px !important;
    justify-content: center;
    font-size: 10px !important;
    border-bottom: none !important;
    margin: 0.5rem 1.25rem 0.75rem;
    width: calc(100% - 2.5rem);
  }

  /* ─── TICKER ────────────────────────────── */
  .hero-ticker {
    padding: 7px 0;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .ticker-inner {
    animation-duration: 28s;
  }


  /* ─── MANIFESTO HERO ────────────────────── */
  .manifesto-hero {
    padding: 2.5rem 1.25rem 2rem;
    /* Keep the watermark but smaller */
  }

  .manifesto-hero::before {
    font-size: 40vw;
    opacity: 1;
    /* pseudo uses its own 0.03 color — fine */
  }

  .mh-label {
    font-size: 8px;
    letter-spacing: 0.22em;
    margin-bottom: 1rem;
  }

  .mh-title {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
    line-height: 0.88;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
  }

  .mh-sub {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(245, 240, 232, 0.6);
  }

  .mh-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin-top: 1.5rem;
  }

  .mh-pillar-tab {
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 90px;
    box-sizing: border-box;
  }

  .mh-pillar-tab .pt-num {
    font-size: 7px;
    letter-spacing: 0.12em;
    margin-bottom: 0.35rem;
    /* KEY: allow wrapping so text doesn't overflow or get cut */
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    overflow: visible;
    text-overflow: unset;
  }

  .mh-pillar-tab .pt-name {
    font-size: 0.85rem;
    line-height: 1.2;
    flex: 1;
    display: flex;
    align-items: center;
  }

  .mh-pillar-tab .pt-count {
    font-size: 7px;
    margin-top: 0.35rem;
  }


  /* ─── INTRO SECTION ─────────────────────── */
  .intro-section {
    padding: 2.5rem 1.25rem;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .intro-divider {
    display: none;
  }

  .intro-left {
    padding-right: 0;
  }

  .intro-right {
    padding-left: 0;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 2px solid var(--ink);
  }

  .section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    gap: 0.75rem;
  }

  .section-number {
    font-size: 9px;
    letter-spacing: 0.22em;
  }

  h2 {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
  }

  .intro-quote {
    font-size: 1.1rem;
    line-height: 1.45;
    border-left-width: 3px;
    padding-left: 1rem;
    margin-bottom: 1.25rem;
  }

  .intro-body {
    font-size: 0.88rem;
    line-height: 1.7;
    padding-left: 0;
  }

  .intro-body p {
    margin-bottom: 0.85rem;
  }


  /* ─── PILLAR HEADERS ────────────────────── */
  .pillar-header {
    padding: 2.25rem 1.25rem 2rem;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ph-divider {
    display: none;
  }

  .ph-left {
    padding-right: 0;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--ink);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .ph-right {
    padding-left: 0;
  }

  .pillar-tag {
    font-size: 8px;
    letter-spacing: 0.25em;
    padding: 3px 8px;
  }

  /* Big ghost number — shrink but keep drama */
  .pillar-big-num {
    font-size: 5rem;
    line-height: 0.85;
    opacity: 0.06;
    flex-shrink: 0;
  }

  .pillar-meta {
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
  }

  .pm-item {
    font-size: 8.5px;
    letter-spacing: 0.12em;
  }

  .pm-item strong {
    font-size: 1.4rem;
  }

  .pillar-h2 {
    font-size: clamp(1.8rem, 9vw, 2.75rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
  }

  .pillar-summary {
    font-size: 0.875rem;
    line-height: 1.65;
    max-width: 100%;
    color: var(--mid);
  }


  /* ─── TOPIC TREE ────────────────────────── */
  .topic-tree {
    padding: 1.25rem 1rem 2rem;
  }

  .topic-branch {
    margin-bottom: 0.6rem;
    border-width: 1.5px;
  }

  /* On mobile, shadow on hover is still nice — keep it */
  .topic-branch:hover {
    box-shadow: 3px 3px 0 var(--ink);
  }


  /* ─── TOPIC TRUNK ───────────────────────── */
  .topic-trunk {
    padding: 1rem 1.1rem;
    gap: 0.75rem;
  }

  .tt-code {
    font-size: 8px;
    letter-spacing: 0.18em;
    min-width: 28px;
  }

  .tt-label {
    font-size: 0.9rem;
    /* allow wrapping on very narrow screens */
    white-space: normal;
    line-height: 1.25;
  }

  .tt-arrow {
    width: 26px;
    height: 26px;
    font-size: 14px;
    flex-shrink: 0;
  }


  /* ─── SUBTOPIC ROW ──────────────────────── */
  .subtopic-header {
    padding: 0.8rem 1rem 0.8rem 1.5rem;
    gap: 0.75rem;
  }

  .subtopic-header.open {
    padding-left: calc(1.5rem - 3px);
  }

  .sub-code {
    font-size: 7.5px;
    min-width: 28px;
  }

  .sub-label {
    font-size: 8.5px;
    letter-spacing: 0.08em;
    /* wrap on mobile */
    white-space: normal;
    line-height: 1.3;
  }

  .sub-arrow {
    width: 20px;
    height: 20px;
    font-size: 11px;
    flex-shrink: 0;
  }


  /* ─── LEAF / POLICY CARDS ───────────────── */
  .leaf-wrap.open {
    padding: 6px 8px 20px 16px;
  }

  .policies-grid {
    padding: 1rem 1rem 1.25rem 1.25rem;
    gap: 0.75rem;
  }

  .leaf-policy {
    padding: 1rem 1.1rem 1rem 1.35rem;
    border-width: 1px;
  }

  /* Keep the left accent stripe */
  .leaf-policy::before {
    width: 3px;
  }

  /* Hover slide — smaller on mobile */
  .leaf-policy:hover {
    transform: translateX(2px);
  }

  .lp-top {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: flex-start;
  }

  .lp-tag {
    font-size: 6.5px;
    letter-spacing: 0.2em;
    padding: 2px 7px;
    align-self: flex-start;
  }

  .lp-title {
    font-size: 0.92rem;
    line-height: 1.3;
  }

  .lp-body {
    font-size: 0.8rem;
    line-height: 1.65;
    margin-bottom: 0.75rem;
    color: var(--mid);
  }

  /* Metric chips — stack if too many */
  .lp-metrics {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .lp-metric {
    font-size: 7.5px;
    letter-spacing: 0.1em;
    padding: 3px 9px;
    width: fit-content;
  }

  /* Add template placeholder */
  .add-template {
    font-family: var(--ff-mono);
    font-size: 7.5px;
    letter-spacing: 0.12em;
    padding: 0.75rem 1.25rem;
    color: rgba(10, 10, 8, 0.3);
    border-top: 1px dashed rgba(10, 10, 8, 0.12);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
  }

  .add-template:hover {
    color: rgba(10, 10, 8, 0.55);
    background: rgba(10, 10, 8, 0.03);
  }


  /* ─── PILLAR-SPECIFIC SHADOW COLORS ─────── */
  .ps-env .topic-branch:hover {
    box-shadow: 3px 3px 0 var(--p1);
  }

  .ps-soc .topic-branch:hover {
    box-shadow: 3px 3px 0 var(--p2);
  }

  .ps-gov .topic-branch:hover {
    box-shadow: 3px 3px 0 var(--p3);
  }

  .ps-eco .topic-branch:hover {
    box-shadow: 3px 3px 0 var(--p4);
  }


  /* ─── JOIN SECTION ──────────────────────── */
  section[style*="padding: 6rem"] {
    /* Can't override inline — use a class or accept this limit */
  }

  /* Target the join CTA by its inner structure */
  .btn-primary {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
    padding: 15px 20px;
    font-size: 10.5px;
    letter-spacing: 0.18em;
  }


  /* ─── FOOTER ────────────────────────────── */
    footer {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.25rem 3rem;
    border-top-width: 2px;
  }

  .footer-brand { grid-column: auto; padding-right: 0; }
  .footer-brand h3 { font-size: 1.35rem; margin-bottom: 0.3rem; }
  .footer-brand p { font-size: 0.8rem; line-height: 1.55; }
  .ft-sub { font-size: 7.5px; letter-spacing: 0.2em; }
  .ft-divider { margin: 1.25rem 0; }
  .ft-tricolor { height: 2px; width: 40px; }

  /* Two columns inside each footer section */
  .footer-col h4 { font-size: 9px; letter-spacing: 0.2em; margin-bottom: 0.85rem; }
  .footer-col ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.5rem;
  }
  .footer-col ul li {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    padding: 5px 0;
  }

  .footer-bottom {
    padding: 0.85rem 1.25rem;
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
  }
  .footer-bottom span {
    font-size: 8px;
    letter-spacing: 0.12em;
    color: rgba(245,240,232,0.25);
  }




  /* ─── SECTION REVEAL ANIMATION ──────────── */
  /* Reduce distance on mobile for snappier feel */
  .reveal {
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  /* ─── UTILITY: FADE UP ───────────────────── */
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(14px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}


/* ══════════════════════════════════════════════
   EXTRA SMALL  ≤ 380px
   Phones like iPhone SE / older Android
══════════════════════════════════════════════ */
@media (max-width: 380px) {

  .mh-title {
    font-size: clamp(2.4rem, 16vw, 3.5rem);
  }

  .mh-grid {
    grid-template-columns: 1fr 1fr;
    /* keep the 2-col grid */
  }

  .mh-pillar-tab {
    padding: 0.85rem 0.7rem;
    min-height: 82px;
    /* remove the flex-direction/gap overrides from the old rule */
    flex-direction: column;
    gap: 0;
  }

  .mh-pillar-tab .pt-name {
    font-size: 0.78rem;
  }


  .pillar-h2 {
    font-size: clamp(1.6rem, 10vw, 2.2rem);
  }

  .tt-label {
    font-size: 0.82rem;
  }

  .topic-tree {
    padding: 1rem 0.75rem 1.75rem;
  }

  .topic-trunk {
    padding: 0.9rem 0.85rem;
  }

  .subtopic-header {
    padding: 0.7rem 0.85rem 0.7rem 1.25rem;
  }

  .subtopic-header.open {
    padding-left: calc(1.25rem - 3px);
  }

  .leaf-wrap.open {
    padding: 4px 6px 16px 12px;
  }

  .policies-grid {
    padding: 0.85rem 0.85rem 1rem 1rem;
  }

  nav ul a {
    padding: 0 10px;
    font-size: 8px;
  }

  .nav-cta {
    padding: 0 12px !important;
  }

  footer {
    padding: 2rem 1rem 2.5rem;
  }

  .footer-col ul {
    grid-template-columns: 1fr;
  }
}