@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
  --ink: #1a1612;
  --paper: #f5f0e8;
  --warm-white: #faf8f4;
  --gold: #b8860b;
  --gold-light: #d4a017;
  --rust: #8b3a1a;
  --rust-light: #c0522a;
  --charcoal: #2d2926;
  --mid: #6b5e52;
  --border: #d8cfc4;
  --gap-positive: #1a5c2e;
  --gap-warn: #7a5c00;
  --gap-critical: #7a1a1a;
  --section-health: #1a4a5c;
  --section-housing: #2e4a2e;
  --section-econ: #4a2e5c;
  --section-workforce: #5c3a1a;
  --section-place: #1a3a4a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

/* ── PASSWORD OVERLAY ── */
#pw-overlay {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.pw-box {
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.pw-logo {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
}
.pw-box h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--paper);
  margin-bottom: 0.5rem;
}
.pw-box p {
  font-size: 0.85rem;
  color: #7a6e64;
  margin-bottom: 1.75rem;
}
.pw-box input {
  width: 100%;
  background: #252018;
  border: 1px solid #3d3530;
  color: var(--paper);
  padding: 0.85rem 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
}
.pw-box input:focus { border-color: var(--gold); }
.pw-box button {
  width: 100%;
  background: var(--gold);
  color: var(--ink);
  border: none;
  padding: 0.85rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.pw-box button:hover { background: var(--gold-light); }
.pw-error {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: #c04a2a;
  letter-spacing: 0.06em;
  margin-top: 0.5rem;
  min-height: 1rem;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }
.nav-brand {
  color: var(--gold);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1rem 1.25rem 1rem 0;
  border-right: 1px solid #3d3530;
  margin-right: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
}
nav a {
  color: #c8bfb4;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 0.9rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
nav a:hover, nav a.active { color: var(--gold-light); border-bottom-color: var(--gold-light); }

/* ── LAYOUT ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section.block {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}
section.block:last-child { border-bottom: none; }

/* ── TYPE ── */
.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
  margin-top: 1.75rem;
}
h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.4rem;
  margin-top: 1.5rem;
}
p { margin-bottom: 1rem; color: var(--charcoal); }
p:last-child { margin-bottom: 0; }

a.cite {
  color: var(--gold);
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  vertical-align: super;
}
a.cite:hover { text-decoration: underline; }

/* ── PULL QUOTE ── */
.pull-quote {
  border-left: 3px solid var(--gold);
  padding: 1.1rem 1.4rem;
  margin: 2rem 0;
  background: var(--warm-white);
}
.pull-quote p {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.pull-quote .attr {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--rust));
}
.tl-item {
  position: relative;
  margin-bottom: 1.75rem;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.38rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--gold);
}
.tl-year {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.tl-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.tl-body { font-size: 0.9rem; color: var(--charcoal); line-height: 1.65; }

/* ── DATA GRID ── */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 2rem 0;
}
.data-cell {
  background: var(--warm-white);
  padding: 1.1rem 1.25rem;
}
.data-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--rust);
  margin-bottom: 0.3rem;
}
.data-num.pos { color: var(--gap-positive); }
.data-num.warn { color: var(--gap-warn); font-size: 1.2rem; }
.data-desc { font-size: 0.8rem; line-height: 1.45; color: var(--mid); }
.data-desc strong { color: var(--ink); }

/* ── STRATEGY TOPIC BLOCKS ── */
.topic-block { border: 1px solid var(--border); margin: 2rem 0; overflow: hidden; }
.topic-header {
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.topic-header h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }
.topic-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-left: auto;
}
.topic-health .topic-header { background: var(--section-health); }
.topic-housing .topic-header { background: var(--section-housing); }
.topic-econ .topic-header { background: var(--section-econ); }
.topic-workforce .topic-header { background: var(--section-workforce); }
.topic-place .topic-header { background: var(--section-place); }
.topic-body { padding: 1.4rem; background: var(--warm-white); }
.topic-body p { font-size: 0.92rem; }

.priority-list { list-style: none; margin: 1rem 0 0; }
.priority-list li {
  font-size: 0.88rem;
  padding: 0.45rem 0 0.45rem 1.2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  color: var(--charcoal);
  line-height: 1.5;
}
.priority-list li:last-child { border-bottom: none; }
.priority-list li::before { content: '→'; position: absolute; left: 0; color: var(--gold); font-size: 0.78rem; }

.strategy-doc-link {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,134,11,0.3);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.strategy-doc-link:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }

/* ── COMPARISON BLOCKS ── */
.comp-block { border: 1px solid var(--border); margin: 2.5rem 0; overflow: hidden; }
.comp-header {
  background: var(--ink);
  color: var(--paper);
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.comp-header h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--paper); margin: 0; }
.comp-label-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: auto;
}
.comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
@media (max-width: 620px) { .comp-grid { grid-template-columns: 1fr; } }
.comp-col { background: var(--warm-white); padding: 1.2rem 1.4rem; }
.comp-col-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.7rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.comp-col p { font-size: 0.88rem; margin-bottom: 0.65rem; }

.gap-row { background: var(--warm-white); padding: 1rem 1.4rem; border-top: 1px solid var(--border); }
.gap-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.gap-tag.pos { color: var(--gap-positive); }
.gap-tag.warn { color: var(--gap-warn); }
.gap-tag.crit { color: var(--gap-critical); }
.gap-row p { font-size: 0.87rem; }

/* ── GUIDING QUESTIONS ── */
.questions-block {
  background: var(--ink);
  padding: 1.4rem;
  margin-top: 0;
  border-top: 2px solid var(--gold);
}
.questions-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.questions-list { list-style: none; }
.questions-list li {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-style: italic;
  color: #c8bfb4;
  padding: 0.55rem 0 0.55rem 1.25rem;
  border-bottom: 1px solid #2d2520;
  position: relative;
  line-height: 1.55;
}
.questions-list li:last-child { border-bottom: none; }
.questions-list li::before {
  content: '?';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-family: 'Space Mono', monospace;
  font-style: normal;
  font-size: 0.75rem;
  top: 0.6rem;
}

/* ── DROPDOWN ── */
details { border: 1px solid var(--border); margin: 1.5rem 0; }
summary {
  padding: 1rem 1.25rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  background: var(--warm-white);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '↓';
  color: var(--gold);
  font-size: 0.8rem;
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(180deg); }
.details-body { padding: 1.25rem 1.4rem; background: var(--warm-white); border-top: 1px solid var(--border); }

/* ── SOURCES ── */
.sources-list { list-style: none; }
.sources-list li {
  padding: 0.55rem 0 0.55rem 1.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  position: relative;
  line-height: 1.55;
  color: var(--charcoal);
}
.sources-list li:last-child { border-bottom: none; }
.sources-list li::before {
  content: attr(data-num);
  position: absolute;
  left: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  color: var(--gold);
  top: 0.6rem;
}
.sources-list a { color: var(--gold); text-decoration: none; }
.sources-list a:hover { text-decoration: underline; }

/* ── JUMP NAV (index page) ── */
.jump-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 2.5rem 0;
}
.jump-card {
  background: var(--warm-white);
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.jump-card:hover { background: var(--paper); }
.jump-card .jc-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.jump-card .jc-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.jump-card .jc-desc {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.45;
}

/* ── HERO ── */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 4.5rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(184,134,11,0.04) 60px, rgba(184,134,11,0.04) 61px);
  pointer-events: none;
}
.hero-inner { max-width: 860px; margin: 0 auto; position: relative; }
.hero h1 { color: var(--warm-white); }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero-sub { font-size: 1rem; line-height: 1.7; color: #a89c90; max-width: 640px; margin-bottom: 2.5rem; }
.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid #2d2520;
}
.hero-stat { display: flex; flex-direction: column; }
.hero-stat .hs-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.hero-stat .hs-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a5048;
  margin-top: 0.25rem;
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: var(--ink);
  padding: 3rem 1.5rem 2.5rem;
}
.page-hero-inner { max-width: 860px; margin: 0 auto; }
.page-hero h1 { color: var(--warm-white); font-size: clamp(1.6rem, 4vw, 2.6rem); }
.page-hero h1 em { font-style: normal; color: var(--gold-light); }
.page-hero p { color: #a89c90; font-size: 0.95rem; max-width: 600px; margin-top: 0.75rem; }

/* ── STRATEGY JUMP NAV ── */
.strat-jump {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.strat-jump a {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--mid);
  transition: all 0.15s;
  white-space: nowrap;
}
.strat-jump a:hover { border-color: var(--gold); color: var(--gold); }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: #4a3e34;
  padding: 2rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  line-height: 1.9;
}
.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-title { color: var(--gold); margin-bottom: 0.25rem; }

/* ── MOBILE ── */
@media (max-width: 480px) {
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .page-hero { padding: 2.25rem 1.25rem 2rem; }
  .container { padding: 0 1.25rem; }
  .hero-stats { gap: 1.25rem; }
  .jump-nav { grid-template-columns: 1fr 1fr; }
  .comp-grid { grid-template-columns: 1fr; }
}

@media print {
  nav, #pw-overlay { display: none; }
}
