:root {
  --paper: #ffffff;
  --ink: #111315;
  --text: #30363b;
  --muted: #69727a;
  --line: #dfe4e7;
  --line-dark: #b7c0c6;
  --soft: #f5f7f7;
  --soft-blue: #eef4f6;
  --transaction: #173f5f;
  --transaction-light: #84a8bc;
  --listing: #b36a4c;
  --listing-light: #e1b29e;
  --accent: #547d72;
  --warning: #a4513a;
  --max-width: 1240px;
  --content-pad: clamp(22px, 4vw, 56px);
  --serif: Palatino, serif;
  --sans: "Colfax", sans-serif;
  --mono: "Colfax", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
a,
[tabindex] {
  outline-offset: 4px;
}

:focus-visible {
  outline: 2px solid var(--transaction);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(68px, 10vw, 128px) var(--content-pad) clamp(46px, 7vw, 80px);
}

.eyebrow,
.section-number,
.metric-label,
.judgement-label {
  margin: 0;
  color: var(--transaction);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 1160px;
  margin: 18px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(42px, 5.4vw, 78px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}

.page-title,
.section-title,
.chart-title {
  overflow-wrap: normal;
  word-break: normal;
  line-break: strict;
}

.page-title {
  line-height: 1.06;
  text-wrap: balance;
}

.title-line {
  display: block;
}

.page-title > .title-line {
  margin: 0;
  padding: 0;
}

.page-title > wbr {
  display: none;
}

.section-title > .title-line {
  margin: 0;
  padding: 0;
}

.section-title > wbr {
  display: none;
}

.title-unit {
  display: inline-block;
}

.hero-deck {
  max-width: 820px;
  margin: 30px 0 0;
  color: var(--text);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.hero-meta strong {
  color: var(--ink);
  font-weight: 650;
}

.story-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
  display: none;
}

.story-nav a {
  flex: 0 0 auto;
  padding: 16px 14px 14px 0;
  margin-right: 20px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.story-nav a:hover,
.story-nav a.active {
  border-color: var(--transaction);
  color: var(--transaction);
}

main {
  width: 100%;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 116px) var(--content-pad);
  border-bottom: 1px solid var(--line);
}

.section-compact {
  padding-top: clamp(52px, 6vw, 76px);
  padding-bottom: clamp(52px, 6vw, 76px);
}

.section-compact .section-head h2 {
  font-size: clamp(28px, 3.2vw, 42px);
}

.section-head {
  max-width: 960px;
}

.section-head h2 {
  margin: 14px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-lede {
  max-width: 860px;
  margin: 22px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.9;
}

.summary-list {
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}

.summary-list li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 26px;
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
}

.summary-index {
  color: var(--listing);
  font-family: var(--mono);
  font-size: 25px;
  line-height: 1.2;
}

.summary-list h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.35;
}

.summary-list p {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 54px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.metric {
  min-width: 0;
  padding: 24px 26px 28px 0;
}

.metric + .metric {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.metric-value {
  margin: 10px 0 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(31px, 3.6vw, 46px);
  font-weight: 650;
  line-height: 1.2;
}

.metric-value span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
}

.metric-value-text {
  max-width: 330px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
}

.metric > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.visual-block {
  width: 100%;
  margin: 46px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line-dark);
}

.visual-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

.visual-header h3,
.method-block h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.4;
}

.visual-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.figure-takeaway {
  margin: 0 0 10px;
  color: var(--transaction);
  font-size: 13px;
  font-weight: 700;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.legend-line {
  display: inline-block;
  width: 23px;
  border-top: 3px solid;
}

.legend-line.transaction,
.legend-dot.transaction {
  color: var(--transaction);
  border-color: var(--transaction);
  background: var(--transaction);
}

.legend-line.listing,
.legend-dot.listing {
  color: var(--listing);
  border-color: var(--listing);
  background: var(--listing);
}

.legend-line.baseline {
  border-top: 1px dashed var(--line-dark);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.stat-note {
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--ink) !important;
  font-family: var(--mono);
  white-space: nowrap;
}

.chart {
  position: relative;
  width: 100%;
  min-width: 0;
  margin-top: 18px;
  color: var(--muted);
}

.chart-trend {
  height: clamp(390px, 49vw, 600px);
}

.chart-district {
  height: 610px;
}

.chart-map {
  display: flex;
  flex-direction: column;
  height: clamp(500px, 54vw, 640px);
  margin-top: 8px;
}

.chart.chart-map svg {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.map-legend {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.map-legend-heading {
  color: var(--text);
  font-weight: 650;
}

.map-color-scale {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.map-swatches {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
}

.map-swatches i {
  display: block;
  width: 24px;
  height: 10px;
}

.map-scale-value {
  font-family: var(--mono);
}

.chart-distance {
  height: 440px;
}

.chart-quadrant {
  height: 650px;
}

.chart-divergence {
  height: 560px;
}

.chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart text {
  font-family: var(--sans);
  letter-spacing: 0;
}

.map-district {
  cursor: pointer;
  outline: none;
}

.map-district polygon {
  stroke: #fff;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  transition: filter 140ms ease, stroke 140ms ease, stroke-width 140ms ease;
}

.map-district:hover polygon,
.map-district:focus polygon {
  filter: brightness(0.94);
  stroke: var(--ink);
  stroke-width: 2.4;
}

.map-label {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 650;
  paint-order: stroke;
  pointer-events: none;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 3px;
}

.map-label.small {
  font-size: 7.5px;
}

.map-label.compact {
  font-size: 17px;
}

.map-label-leader {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 2 2;
  vector-effect: non-scaling-stroke;
}

.map-legend-label {
  fill: var(--muted);
  font-size: 12px;
}

.map-legend-title {
  fill: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.chart-transition {
  max-width: 900px;
  margin: 34px 0 0;
  padding-left: 15px;
  border-left: 2px solid var(--transaction-light);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.axis-label {
  fill: var(--muted);
  font-size: 12px;
}

.axis-title {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.data-label {
  fill: var(--ink);
  font-family: var(--mono) !important;
  font-size: 12px;
}

.grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.baseline-line {
  stroke: var(--line-dark);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
}

.transaction-stroke {
  fill: none;
  stroke: var(--transaction);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.listing-stroke {
  fill: none;
  stroke: var(--listing);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  cursor: default;
  transition: opacity 160ms ease, transform 160ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.chart-point:hover,
.chart-point:focus {
  opacity: 1 !important;
  transform: scale(1.25);
  outline: none;
}

.chart-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

figcaption {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  line-break: strict;
  text-wrap: balance;
}

.quadrant-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 36px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.quadrant-summary article {
  min-width: 0;
  padding: 18px 18px 20px 0;
}

.quadrant-summary article + article {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.quadrant-summary strong {
  display: block;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 27px;
}

.quadrant-summary span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.judgement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.judgement-grid article {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.judgement-grid ul {
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.judgement-grid li {
  position: relative;
  padding: 6px 0 6px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
}

.judgement-grid li::before {
  position: absolute;
  left: 0;
  top: 14px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--listing);
  border-radius: 50%;
  content: "";
}

.section-method {
  padding-bottom: clamp(52px, 6vw, 76px);
}

.method-block {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.method-block p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.funnel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  border: 1px solid var(--line);
}

.funnel-step {
  position: relative;
  min-width: 0;
  padding: 17px 16px;
  background: var(--paper);
}

.funnel-step + .funnel-step {
  border-left: 1px solid var(--line);
}

.funnel-step + .funnel-step::before {
  position: absolute;
  left: -7px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%) rotate(45deg);
  border-top: 1px solid var(--line-dark);
  border-right: 1px solid var(--line-dark);
  background: var(--paper);
  content: "";
}

.funnel-step strong {
  display: block;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 28px;
}

.funnel-step span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.funnel-step small {
  display: block;
  margin-top: 8px;
  color: var(--warning);
  font-size: 11px;
}

.method-note {
  max-width: 920px;
}

.table-wrap {
  width: 100%;
  margin-top: 22px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  font-weight: 650;
}

td {
  color: var(--muted);
}

td:first-child {
  color: var(--ink);
  font-weight: 600;
}

.metric-definition-table {
  min-width: 680px;
}

.metric-definition-table .metric-name-column {
  width: 20%;
}

.metric-definition-table .metric-meaning-column {
  width: 45%;
}

.metric-definition-table .metric-reading-column {
  width: 35%;
}

.report-endnotes {
  display: grid;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px var(--content-pad) 30px;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 32px;
  border-top: 1px solid var(--line);
}

.report-endnotes h2 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-endnotes p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

footer {
  display: flex;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px var(--content-pad) 52px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}

footer a {
  color: var(--transaction);
  text-decoration: none;
}

.chart-tooltip {
  position: fixed;
  z-index: 80;
  max-width: 320px;
  padding: 9px 11px;
  transform: translate(-50%, calc(-100% - 12px));
  border: 1px solid var(--line);
  background: rgba(17, 19, 21, 0.94);
  color: #fff;
  font-size: 12px;
  line-height: 1.55;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip strong {
  display: block;
  font-weight: 650;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-visible {
  animation: reveal-up 520ms ease forwards;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .metric-strip,
  .quadrant-summary,
  .judgement-grid,
  .funnel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(3),
  .quadrant-summary article:nth-child(3),
  .judgement-grid article:nth-child(3),
  .funnel-step:nth-child(3) {
    border-left: 0;
  }

  .metric:nth-child(3),
  .judgement-grid article:nth-child(3) {
    margin-top: 18px;
  }

  .funnel-step:nth-child(3) {
    border-top: 1px solid var(--line);
  }

  .chart-quadrant {
    height: 560px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .hero-inner {
    padding-top: 60px;
  }

  h1 {
    font-size: clamp(38px, 11vw, 54px);
  }

  .page-title .title-line,
  .section-title .title-line {
    display: inline;
  }

  .page-title .title-line + .title-line::before,
  .section-title .title-line + .title-line::before {
    content: " ";
  }

  .page-title {
    line-height: 1.12;
  }

  .page-title > wbr {
    display: inline;
  }

  .section-title > wbr {
    display: inline;
  }

  .section-title {
    line-height: 1.2;
  }

  .hero-meta {
    display: grid;
    gap: 8px;
  }

  .section {
    padding-top: 68px;
    padding-bottom: 72px;
  }

  .section-compact {
    padding-top: 48px;
    padding-bottom: 50px;
  }

  .summary-list li {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
  }

  .summary-index {
    font-size: 19px;
  }

  .metric-strip,
  .quadrant-summary,
  .judgement-grid,
  .funnel {
    grid-template-columns: 1fr;
  }

  .metric,
  .metric + .metric,
  .quadrant-summary article,
  .quadrant-summary article + article {
    padding: 20px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .metric:first-child,
  .quadrant-summary article:first-child {
    border-top: 0;
  }

  .funnel-step + .funnel-step {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .funnel-step + .funnel-step::before {
    display: none;
  }

  .visual-header {
    display: block;
  }

  .legend {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .stat-note {
    display: inline-block;
    margin-top: 12px !important;
  }

  .chart-trend {
    height: 420px;
  }

  .chart-district {
    height: 570px;
  }

  .chart-map {
    height: 430px;
  }

  .map-legend {
    min-height: 58px;
    justify-content: flex-start;
    gap: 7px 10px;
    flex-wrap: wrap;
  }

  .map-legend-heading {
    width: 100%;
  }

  .map-swatches i {
    width: 15px;
  }

  .chart-distance {
    height: 420px;
  }

  .chart-quadrant {
    height: 500px;
  }

  .chart-divergence {
    height: 540px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-endnotes {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 22px;
    padding-bottom: 24px;
  }
}

@media print {
  .story-nav,
  .skip-link,
  .chart-tooltip {
    display: none;
  }

  .section {
    break-inside: avoid;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

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