:root {
  --ink: #16241C;
  --ink-soft: #223828;
  --ink-softer: #2C4632;
  --parchment: #EFE7D8;
  --parchment-dim: #E4DAC5;
  --parchment-dimmer: #DCD0B6;
  --marigold: #C9A227;
  --marigold-bright: #E0BB3C;
  --brick: #B8493F;
  --moss: #6C7A5C;
  --line: rgba(239, 231, 216, 0.16);
  --line-dark: rgba(22, 36, 28, 0.14);
  --serif: 'Fraunces', serif;
  --sans: 'Public Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.prose { max-width: 660px; }
tt, code, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- Contour divider ---------- */
.contour { width: 100%; height: 44px; display: block; }
.contour path { fill: none; stroke-width: 1; }

/* ---------- Top nav ---------- */
header.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(22, 36, 28, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-right { display: flex; align-items: center; }
.brandmark {
  font-family: var(--serif); font-weight: 600; font-size: 18px;
  letter-spacing: 0.01em; display: flex; align-items: baseline; gap: 8px;
  text-decoration: none;
}
.brandmark .signal {
  font-family: var(--sans); font-weight: 700; font-size: 11px; color: var(--ink);
  background: var(--marigold); padding: 3px 7px; border-radius: 3px; letter-spacing: 0.03em;
}
nav.links { display: flex; font-size: 14.5px; }
nav.links a {
  text-decoration: none; color: rgba(239,231,216,0.72);
  transition: color 0.15s ease; margin-left: 28px;
}
nav.links a:first-child { margin-left: 0; }
nav.links a:hover, nav.links a:focus-visible { color: var(--parchment); }
nav.links a.current { color: var(--marigold-bright); }
nav.links a:focus-visible { outline: 2px solid var(--marigold); outline-offset: 4px; }

.nav-cta {
  margin-left: 32px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  background: var(--marigold); color: var(--ink);
  padding: 9px 16px; border-radius: 4px; text-decoration: none;
  white-space: nowrap; transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--marigold-bright); }
.nav-cta:focus-visible { outline: 2px solid var(--parchment); outline-offset: 2px; }

/* ---------- Hero (home) ---------- */
.hero { padding: 72px 0 52px; position: relative; overflow: hidden; }
.hero .wrap { position: relative; }
.kicker { font-size: 14px; color: var(--marigold-bright); font-weight: 600; margin-bottom: 22px; }
h1.headline {
  font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 5.6vw, 60px);
  line-height: 1.06; max-width: 820px; letter-spacing: -0.01em;
}
h1.headline .sub {
  display: block; font-size: 0.32em; font-weight: 400; margin-top: 16px;
  color: rgba(239,231,216,0.78); letter-spacing: 0; font-family: var(--sans);
}
.hero-sub { max-width: 580px; margin-top: 22px; font-size: 18px; color: rgba(239,231,216,0.8); }
.hero-meta { display: flex; margin-top: 32px; flex-wrap: wrap; }
.hero-meta .item { font-size: 14px; color: rgba(239,231,216,0.6); margin-right: 36px; }
.hero-meta .item strong {
  display: block; font-family: var(--serif); font-size: 25px; font-weight: 600;
  color: var(--parchment); margin-bottom: 2px;
}
.hero-topo { position: absolute; right: -80px; top: -40px; width: 560px; height: 560px; opacity: 0.5; pointer-events: none; }

/* ---------- Sub-page compact hero ---------- */
.subhero { padding: 44px 0 36px; }
.subhero .kicker { margin-bottom: 16px; }
.subhero h1 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.4vw, 46px);
  line-height: 1.1; max-width: 720px;
}
.subhero p.sub-desc { max-width: 620px; margin-top: 18px; font-size: 17px; color: rgba(239,231,216,0.78); }

/* ---------- Section shells ---------- */
section { position: relative; }
.band-dark { background: var(--ink); padding: 52px 0; }
.band-light { background: var(--parchment); color: var(--ink); padding: 52px 0; }
.band-light .contour path { stroke: var(--ink); opacity: 0.15; }
.band-dark .contour path { stroke: var(--parchment); opacity: 0.14; }

.eyebrow-line { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.eyebrow-line .num { font-family: var(--serif); font-size: 15px; color: var(--marigold); font-weight: 600; }
.band-light .eyebrow-line .num { color: var(--brick); }
.eyebrow-line .rule { flex: 1; height: 1px; background: var(--line); }
.band-light .eyebrow-line .rule { background: var(--line-dark); }

h2.section-head {
  font-family: var(--serif); font-weight: 500; font-size: clamp(27px, 3.4vw, 38px);
  max-width: 640px; line-height: 1.16; margin-bottom: 14px;
}
.section-intro { max-width: 640px; color: rgba(239,231,216,0.78); font-size: 16.5px; }
.band-light .section-intro { color: rgba(22,36,28,0.72); }

/* ---------- Stat strip ---------- */
.stat-strip { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); margin-top: 30px; border-radius: 2px; overflow: hidden; }
.stat-cell { background: var(--ink-soft); padding: 30px 28px; flex: 1 1 240px; }
.stat-cell .figure { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 46px); font-weight: 600; color: var(--marigold-bright); line-height: 1; }
.stat-cell .figure sup { font-size: 0.4em; font-family: var(--sans); font-weight: 600; top: -1.3em; }
.stat-cell p { margin-top: 9px; font-size: 14px; color: rgba(239,231,216,0.75); max-width: 260px; }

/* ---------- Two-up columns (generic) ---------- */
.split { display: flex; flex-wrap: wrap; gap: 56px; margin-top: 32px; }
.split .col { flex: 1 1 380px; margin-right: 56px; }
.split .col:last-child { margin-right: 0; }
.split h3, .col h3 {
  font-family: var(--serif); font-size: 15.5px; font-weight: 600; letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.band-dark .col h3 { color: var(--parchment); }
.band-light .col h3 { color: var(--ink); }

/* ---------- Bars: labeled percentage rows ---------- */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.bar-row .label { flex: 0 0 150px; color: rgba(22,36,28,0.75); }
.band-dark .bar-row .label { color: rgba(239,231,216,0.75); }
.bar-row .bar-track { flex: 1 1 auto; height: 10px; background: var(--parchment-dim); border-radius: 1px; overflow: hidden; }
.band-dark .bar-row .bar-track { background: rgba(239,231,216,0.12); }
.bar-row .bar-fill { height: 100%; background: var(--brick); border-radius: 1px; }
.bar-row .bar-fill.alt { background: var(--moss); }
.bar-row .bar-fill.gold { background: linear-gradient(90deg, #8A6A15, var(--marigold)); }
.bar-row .value { flex: 0 0 50px; text-align: right; font-weight: 600; }
.band-light .bar-row .value { color: var(--ink); }
.band-dark .bar-row .value { color: var(--parchment); }

.mini-list { margin-top: 6px; }
.mini-list .row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.band-light .mini-list .row { border-bottom-color: var(--line-dark); }
.mini-list .row .n { color: var(--marigold-bright); font-weight: 600; font-family: var(--serif); }
.band-light .mini-list .row .n { color: var(--brick); }

/* ---------- Pull quote ---------- */
.pull-quote { max-width: 720px; margin: 0 auto; text-align: center; padding: 52px 0; }
.pull-quote blockquote { font-family: var(--serif); font-size: clamp(22px, 3vw, 32px); font-weight: 500; line-height: 1.35; }
.pull-quote cite { display: block; margin-top: 22px; font-family: var(--sans); font-style: normal; font-size: 14px; color: rgba(239,231,216,0.6); }

/* ---------- Action / cross-tab bars ---------- */
.action-grid { margin-top: 28px; display: flex; flex-direction: column; gap: 13px; }
.action-row { display: flex; align-items: center; gap: 16px; }
.action-row .label { font-size: 14.5px; color: var(--ink); flex: 0 0 210px; }
.band-dark .action-row .label { color: var(--parchment); }
.action-row .action-track { flex: 1 1 auto; height: 20px; background: var(--parchment-dim); border-radius: 3px; overflow: hidden; }
.band-dark .action-row .action-track { background: rgba(239,231,216,0.12); }
.action-row .action-fill { height: 100%; background: linear-gradient(90deg, #8A6A15, var(--marigold)); }
.action-row .pct { flex: 0 0 56px; text-align: right; font-weight: 600; }

.callout-note {
  margin-top: 24px; padding: 18px 22px; border-left: 3px solid var(--brick);
  font-size: 14.5px; max-width: 640px; background: rgba(184,73,63,0.08); color: rgba(22,36,28,0.8);
}
.band-dark .callout-note { background: rgba(184,73,63,0.12); color: rgba(239,231,216,0.85); }

/* ---------- Readiness Index formula ---------- */
.index-panel { border: 1px solid var(--line); border-radius: 4px; padding: 32px; margin-top: 28px; background: var(--ink-soft); }
.index-formula { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.index-term { text-align: center; padding: 15px 20px; border: 1px solid var(--line); border-radius: 3px; min-width: 122px; margin-right: 4px; }
.index-term .t-label { font-size: 12px; letter-spacing: 0.02em; color: rgba(239,231,216,0.6); margin-bottom: 6px; }
.index-term .t-source { font-size: 11.5px; color: var(--marigold-bright); margin-top: 6px; }
.index-op { font-family: var(--serif); font-size: 20px; color: rgba(239,231,216,0.5); }
.index-term.result { border-color: var(--marigold); }
.index-term.result .t-label { color: var(--marigold-bright); }

/* ---------- State rank table ---------- */
.rank-table { margin-top: 28px; }
.rank-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-dark); }
.band-dark .rank-row { border-bottom-color: var(--line); }
.rank-row .rank-num { flex: 0 0 28px; font-family: var(--serif); color: rgba(22,36,28,0.4); font-size: 14px; }
.band-dark .rank-row .rank-num { color: rgba(239,231,216,0.4); }
.rank-row .rank-name { flex: 0 0 150px; font-size: 14.5px; font-weight: 600; }
.rank-row .rank-track { flex: 1 1 auto; height: 16px; background: var(--parchment-dim); border-radius: 2px; overflow: hidden; }
.band-dark .rank-row .rank-track { background: rgba(239,231,216,0.12); }
.rank-row .rank-fill { height: 100%; background: linear-gradient(90deg, #8A6A15, var(--marigold)); border-radius: 2px; }
.rank-row .rank-fill.brick { background: linear-gradient(90deg, #7C302A, var(--brick)); }
.rank-row .rank-score { flex: 0 0 54px; text-align: right; font-family: var(--serif); font-weight: 600; }
.rank-row .rank-n { flex: 0 0 68px; text-align: right; font-size: 12px; color: rgba(22,36,28,0.5); }
.band-dark .rank-row .rank-n { color: rgba(239,231,216,0.5); }

.legend-row { display: flex; gap: 22px; margin-top: 14px; font-size: 13px; }
.legend-row .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

/* ---------- Segment score cards ---------- */
.segment-cards { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line-dark); margin-top: 24px; border-radius: 3px; overflow: hidden; }
.segment-card { background: var(--parchment); padding: 22px 24px; flex: 1 1 200px; }
.band-dark .segment-card { background: var(--ink-soft); }
.segment-card .seg-name { font-size: 13.5px; color: rgba(22,36,28,0.65); margin-bottom: 8px; }
.band-dark .segment-card .seg-name { color: rgba(239,231,216,0.65); }
.segment-card .seg-score { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--brick); }
.band-dark .segment-card .seg-score { color: var(--marigold-bright); }
.segment-card .seg-n { font-size: 11.5px; color: rgba(22,36,28,0.45); margin-top: 4px; }
.band-dark .segment-card .seg-n { color: rgba(239,231,216,0.45); }

/* ---------- Explore controls ---------- */
.explore-controls { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; align-items: flex-start; }
.control-group { flex: 0 0 auto; }
.control-group .cg-label { font-size: 12.5px; letter-spacing: 0.02em; color: rgba(239,231,216,0.55); margin-bottom: 10px; text-transform: uppercase; }
.pill-set { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn {
  font-family: var(--sans); font-size: 13.5px; padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: transparent; color: rgba(239,231,216,0.7);
  cursor: pointer; transition: all 0.15s ease;
}
.pill-btn:hover { border-color: var(--marigold); color: var(--parchment); }
.pill-btn.active { background: var(--marigold); border-color: var(--marigold); color: var(--ink); font-weight: 600; }
.pill-btn:focus-visible { outline: 2px solid var(--marigold-bright); outline-offset: 2px; }

.xtab-panel { margin-top: 28px; border: 1px solid var(--line); border-radius: 4px; padding: 36px; background: var(--ink-soft); min-height: 320px; }
.xtab-title { font-family: var(--serif); font-size: 19px; margin-bottom: 6px; }
.xtab-sub { font-size: 13.5px; color: rgba(239,231,216,0.55); margin-bottom: 28px; }
.xtab-bars { display: flex; flex-direction: column; gap: 16px; }
.xtab-group { }
.xtab-group-label { font-size: 13px; color: var(--marigold-bright); font-weight: 600; margin-bottom: 8px; letter-spacing: 0.01em; }
.xtab-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 7px; }
.xtab-bar-row .xlabel { flex: 0 0 150px; font-size: 13.5px; color: rgba(239,231,216,0.8); }
.xtab-bar-row .xtrack { flex: 1 1 auto; height: 14px; background: rgba(239,231,216,0.1); border-radius: 2px; overflow: hidden; }
.xtab-bar-row .xfill { height: 100%; background: linear-gradient(90deg, #8A6A15, var(--marigold)); border-radius: 2px; transition: width 0.4s ease; }
.xtab-bar-row .xval { flex: 0 0 46px; text-align: right; font-size: 13px; font-weight: 600; color: var(--parchment); }

.data-table-wrap { margin-top: 28px; overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th, table.data-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data-table th { color: var(--marigold-bright); font-weight: 600; font-size: 12.5px; letter-spacing: 0.02em; text-transform: uppercase; }
table.data-table tbody tr:hover { background: rgba(239,231,216,0.04); }

/* ---------- Methodology cards ---------- */
.method-grid { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 28px; }
.method-card { flex: 1 1 380px; margin-right: 40px; border: 1px solid var(--line-dark); border-radius: 3px; padding: 24px 26px; background: rgba(22,36,28,0.02); }
.band-dark .method-card { border-color: var(--line); background: rgba(239,231,216,0.03); }
.method-grid .method-card:nth-child(2n) { margin-right: 0; }
.method-card h4 { font-family: var(--serif); font-size: 16px; margin-bottom: 9px; }
.method-card p { font-size: 14px; color: rgba(22,36,28,0.72); }
.band-dark .method-card p { color: rgba(239,231,216,0.72); }

/* ---------- Cross-page nav cards ---------- */
.next-cards { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.next-card {
  flex: 1 1 300px; margin-right: 0; padding: 28px 30px; border: 1px solid var(--line);
  border-radius: 4px; text-decoration: none; display: block; transition: border-color 0.15s ease;
}
.next-card:hover { border-color: var(--marigold); }
.next-card .nc-eyebrow { font-size: 12.5px; color: var(--marigold-bright); font-weight: 600; letter-spacing: 0.02em; margin-bottom: 10px; }
.next-card h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; margin-bottom: 8px; color: var(--parchment); }
.next-card p { font-size: 14px; color: rgba(239,231,216,0.65); }

/* ---------- Footer ---------- */
footer { background: var(--ink); padding: 44px 0 34px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; }
footer .foot-left { font-size: 13.5px; color: rgba(239,231,216,0.55); max-width: 420px; }
footer .foot-right { font-size: 13px; color: rgba(239,231,216,0.4); text-align: right; }

@media (max-width: 860px) {
  nav.links { display: none; }
  .split .col, .method-grid .method-card, .stat-cell { flex-basis: 100%; margin-right: 0; }
  .hero-topo { display: none; }
  .rank-row .rank-name { flex-basis: 100px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
