:root {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --surface-soft: #ecefea;
  --ink: #13231d;
  --muted: #68736d;
  --line: #dce1dc;
  --green: #0e3b2f;
  --green-2: #155b47;
  --mint: #d8e8df;
  --lime: #c9ef88;
  --up: #087a53;
  --down: #c54b43;
  --amber: #a66315;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(20, 45, 35, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-nav {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 68px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  background: rgba(245, 246, 242, 0.88);
  border-bottom: 1px solid rgba(19, 35, 29, 0.09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: -0.05em;
}

.site-nav nav { display: flex; align-items: center; gap: 28px; }
.site-nav nav a {
  color: #59645e;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}
.site-nav nav a:hover { color: var(--green); }

.nav-status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}
.status-pulse {
  width: 7px;
  height: 7px;
  background: #9aa39e;
  border-radius: 50%;
}
.nav-status.ready .status-pulse { background: var(--up); }
.nav-status.caution .status-pulse { background: #e19c3a; }

main { overflow: hidden; }
.hero,
.market-tape,
.market-read,
.panel-section,
.guides-section,
.sources-section {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.hero {
  min-height: 560px;
  padding: 92px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: clamp(60px, 10vw, 150px);
  align-items: center;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--green-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow.light { color: #a9d9c3; }
.hero h1 {
  max-width: 790px;
  margin: 0;
  color: var(--green);
  font-size: clamp(54px, 7.4vw, 94px);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.96;
}
.hero h1 span { color: #7d8b84; font-weight: 500; }
.hero-deck {
  max-width: 640px;
  margin: 30px 0 0;
  color: #5c6862;
  font-size: clamp(17px, 1.7vw, 21px);
  letter-spacing: -0.02em;
}
.hero-meta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.index-card {
  position: relative;
  padding: 26px;
  color: #f9fbf9;
  background: var(--green);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(14, 59, 47, 0.22);
  overflow: hidden;
}
.index-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -80px;
  background: rgba(201, 239, 136, 0.12);
  border-radius: 50%;
}
.card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #bed2c9;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}
.source-tag {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  font-size: 9px;
}
.index-level {
  margin: 54px 0 24px;
  font-size: clamp(48px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1;
}
.loading-value {
  min-height: 1em;
  color: transparent;
  background: linear-gradient(90deg, rgba(255,255,255,.09) 25%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.09) 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: loading-shimmer 1.4s infinite linear;
}
@keyframes loading-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.index-moves {
  padding: 18px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(255,255,255,.13);
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.index-moves > div + div { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.13); }
.index-moves span { display: block; margin-bottom: 3px; color: #9fbbb0; font-size: 11px; }
.index-moves strong { font-family: var(--mono); font-size: 15px; }
.freshness {
  margin-top: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b8cdc4;
  font-family: var(--mono);
  font-size: 10px;
}
.freshness-dot { width: 7px; height: 7px; background: #93aaa0; border-radius: 50%; }
.freshness.ready .freshness-dot { background: var(--lime); }
.freshness.caution .freshness-dot { background: #f1b95d; }

.market-tape { padding: 32px 0 90px; scroll-margin-top: 90px; }
.section-intro {
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .55fr);
  gap: 60px;
  align-items: end;
}
.section-intro.compact { margin-bottom: 22px; }
.section-intro .eyebrow { margin-bottom: 10px; }
.section-intro h2,
.panel-section h2,
.guides-section h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.02;
}
.section-intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.ticker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ticker-card {
  min-width: 0;
  padding: 18px 16px;
  border-right: 1px solid var(--line);
}
.ticker-card:last-child { border-right: 0; }
.ticker-card .symbol { display: block; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.ticker-card .company { height: 38px; margin-top: 8px; display: block; font-size: 12px; font-weight: 700; line-height: 1.25; }
.ticker-card .price { display: block; margin-top: 16px; font-size: 18px; font-weight: 700; letter-spacing: -0.04em; }
.ticker-card .move { display: block; margin-top: 3px; font-family: var(--mono); font-size: 11px; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.flat { color: var(--muted) !important; }
.data-placeholder { padding: 26px; color: var(--muted); font-size: 13px; }

.market-read {
  padding: 0 0 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr);
  gap: 24px;
}
.brief-card,
.movers-card {
  padding: clamp(26px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.brief-card { box-shadow: var(--shadow); }
.section-kicker-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.section-kicker-row .eyebrow { margin: 0; }
.plain-badge {
  padding: 6px 10px;
  color: var(--green-2);
  background: var(--mint);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}
.brief-card h2 {
  max-width: 720px;
  margin: 46px 0 18px;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.05;
}
.brief-lead { max-width: 720px; margin: 0; color: #58655f; font-size: 17px; line-height: 1.7; }
.signal-list { margin: 34px 0 0; padding: 0; list-style: none; }
.signal-list li { position: relative; padding: 14px 0 14px 28px; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; }
.signal-list li::before { content: ""; position: absolute; left: 0; top: 21px; width: 7px; height: 7px; background: var(--green-2); border-radius: 50%; }
.movers-card { background: var(--surface-soft); }
.section-kicker-row > span:last-child { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.movers-card h3 { margin: 44px 0 16px; font-size: 28px; letter-spacing: -0.045em; }
.mover-row {
  padding: 16px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border-top: 1px solid #d5dbd5;
}
.mover-row strong { display: block; font-size: 13px; }
.mover-row small { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.mover-row > span { align-self: center; font-family: var(--mono); font-size: 12px; font-weight: 500; }

.panel-section { padding: 105px 0; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.chart-panel,
.table-shell { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.chart-panel { padding: 26px; box-shadow: var(--shadow); }
.chart-controls { display: flex; justify-content: flex-end; gap: 5px; }
.chart-controls button {
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}
.chart-controls button:hover,
.chart-controls button.active { color: #fff; background: var(--green); }
.chart-legend { margin: 24px 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.legend-item { padding: 13px 15px; display: flex; justify-content: space-between; gap: 12px; border-right: 1px solid var(--line); font-size: 12px; }
.legend-item:last-child { border-right: 0; }
.legend-label { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.legend-swatch { width: 8px; height: 8px; background: var(--series); border-radius: 50%; }
.legend-item strong { font-family: var(--mono); font-size: 11px; }
.chart { min-height: 330px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: #e6e9e6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--series); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-axis { fill: #84908a; font-family: var(--mono); font-size: 9px; }
.fine-print { margin: 12px 0 0; color: var(--muted); font-size: 10px; }

.table-shell { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 17px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #f9faf8; font-family: var(--mono); font-size: 9px; font-weight: 500; text-transform: uppercase; }
th button { padding: 0; color: inherit; background: none; border: 0; cursor: pointer; text-transform: uppercase; }
th button:hover { color: var(--green); }
td { font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbf9; }
.number { text-align: right; font-family: var(--mono); }
.company-name { display: block; font-weight: 700; }
.company-symbol { display: block; margin-top: 3px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.sector-pill { padding: 5px 8px; color: #52615a; background: var(--surface-soft); border-radius: 100px; font-size: 10px; white-space: nowrap; }
.range-track { width: 110px; height: 4px; background: #e4e8e4; border-radius: 10px; overflow: hidden; }
.range-track i { display: block; height: 100%; background: var(--green-2); border-radius: inherit; }
.range-label { display: block; margin-top: 5px; color: var(--muted); font-family: var(--mono); font-size: 8px; }

.housing-section {
  margin-top: 20px;
  padding: 110px max(24px, calc((100vw - 1180px) / 2));
  color: #f4f8f5;
  background: var(--green);
  scroll-margin-top: 68px;
}
.housing-heading { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .55fr); gap: 80px; align-items: end; }
.housing-heading h2 { margin: 0; font-size: clamp(42px, 5.7vw, 72px); font-weight: 600; letter-spacing: -0.068em; line-height: 1; }
.housing-heading > p { margin: 0; color: #bfd0c8; font-size: 16px; line-height: 1.75; }
.housing-metrics {
  margin-top: 68px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.housing-metric { min-height: 230px; padding: 28px 24px; border-right: 1px solid rgba(255,255,255,.15); }
.housing-metric:first-child { padding-left: 0; }
.housing-metric:last-child { border-right: 0; }
.housing-metric span { color: #a9c0b6; font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.housing-metric strong { margin-top: 42px; display: block; color: #fff; font-size: clamp(38px, 4vw, 58px); letter-spacing: -0.065em; line-height: 1; }
.housing-metric p { margin: 12px 0 0; color: #d3dfd9; font-size: 12px; }
.housing-metric p b { color: var(--lime); font-family: var(--mono); font-weight: 500; }
.housing-metric small { display: block; margin-top: 5px; color: #809f92; font-family: var(--mono); font-size: 9px; }
.housing-detail-grid { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.housing-detail { min-height: 440px; padding: clamp(28px, 4vw, 48px); border-radius: 22px; }
.rent-card { color: #f8fbf9; background: #185644; }
.region-card { color: var(--ink); background: #e2e8e3; }
.housing-detail h3 { max-width: 480px; margin: 48px 0 36px; font-size: clamp(30px, 3vw, 43px); letter-spacing: -0.055em; line-height: 1.08; }
.rent-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rent-comparison > div { padding: 16px 0; border-top: 1px solid rgba(255,255,255,.16); }
.rent-comparison span, .rent-comparison small { display: block; color: #a8c7ba; font-size: 10px; }
.rent-comparison strong { display: block; margin: 9px 0 4px; font-size: 30px; letter-spacing: -0.05em; }
.housing-copy { margin: 30px 0; color: inherit; opacity: .75; font-size: 13px; line-height: 1.65; }
.housing-detail a { display: inline-flex; justify-content: space-between; gap: 16px; min-width: 200px; padding-top: 14px; border-top: 1px solid currentColor; font-size: 12px; font-weight: 700; text-decoration: none; }
.housing-detail a:hover span { transform: translate(2px, -2px); }
.region-bars { display: grid; gap: 18px; }
.region-bars > div { display: grid; grid-template-columns: 100px 1fr 54px; gap: 13px; align-items: center; font-size: 12px; }
.region-bars strong { text-align: right; font-family: var(--mono); font-size: 11px; }
.bar-track { height: 7px; background: #cdd6cf; border-radius: 10px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--green-2); border-radius: inherit; }
.housing-takeaway { margin-top: 76px; }
.takeaway-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.takeaway-grid p { margin: 0; color: #afc4ba; font-size: 13px; line-height: 1.7; }
.takeaway-grid span { display: block; margin-bottom: 24px; color: var(--lime); font-family: var(--mono); font-size: 10px; }
.takeaway-grid strong { color: #fff; }
.housing-method { max-width: 820px; margin: 70px 0 0; padding-top: 18px; color: #839f93; border-top: 1px solid rgba(255,255,255,.13); font-size: 10px; }

.guides-section { padding: 110px 0; scroll-margin-top: 68px; }
.guide-links { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.guide-links a { min-height: 180px; padding: 24px; display: flex; flex-direction: column; color: var(--ink); background: var(--surface); border-right: 1px solid var(--line); text-decoration: none; transition: background 160ms ease; }
.guide-links a:last-child { border-right: 0; }
.guide-links a:hover { background: var(--surface-soft); }
.guide-links span { color: var(--muted); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.guide-links strong { max-width: 170px; margin-top: 28px; font-size: 16px; }
.guide-links i { margin-top: auto; color: var(--green-2); font-style: normal; }

.sources-section { padding: 70px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; border-top: 1px solid var(--line); }
.sources-section h2 { max-width: 450px; margin: 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.055em; line-height: 1.05; }
.source-copy > p { margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.7; }
#source-links { display: flex; flex-wrap: wrap; gap: 8px; }
#source-links a { padding: 7px 10px; color: #55635c; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; font-family: var(--mono); font-size: 9px; text-decoration: none; }
#source-links a:hover { color: var(--green); border-color: #aebbb4; }

footer {
  padding: 36px max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 30px;
  color: #b8cbc2;
  background: #092b22;
  font-size: 10px;
}
.footer-brand { color: #fff; }
footer p { margin: 0; text-align: center; }
footer > a { justify-self: end; text-decoration: none; }

:focus-visible { outline: 3px solid #82b89f; outline-offset: 3px; }

@media (max-width: 1040px) {
  .ticker-grid { grid-template-columns: repeat(4, 1fr); }
  .ticker-card { border-bottom: 1px solid var(--line); }
  .ticker-card:nth-child(4n) { border-right: 0; }
  .housing-metrics { grid-template-columns: repeat(2, 1fr); }
  .housing-metric:nth-child(2) { border-right: 0; }
  .housing-metric:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.15); }
}

@media (max-width: 820px) {
  .site-nav { grid-template-columns: 1fr auto; }
  .site-nav nav { display: none; }
  .hero { min-height: 0; padding: 68px 0; grid-template-columns: 1fr; gap: 50px; }
  .index-card { max-width: 480px; }
  .market-read,
  .housing-heading,
  .section-intro,
  .sources-section { grid-template-columns: 1fr; gap: 24px; }
  .section-intro > p { max-width: 620px; }
  .housing-detail-grid { grid-template-columns: 1fr; }
  .takeaway-grid { grid-template-columns: 1fr; gap: 28px; }
  .guide-links { grid-template-columns: 1fr 1fr; }
  .guide-links a:nth-child(2) { border-right: 0; }
  .guide-links a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  footer { grid-template-columns: 1fr; text-align: left; }
  footer p { text-align: left; }
  footer > a { justify-self: start; }
}

@media (max-width: 600px) {
  .site-nav { height: 60px; padding-inline: 16px; }
  .brand > span:last-child { display: none; }
  .nav-status { font-size: 8px; }
  .hero,
  .market-tape,
  .market-read,
  .panel-section,
  .guides-section,
  .sources-section { width: min(100% - 32px, 1180px); }
  .hero { padding: 54px 0 60px; }
  .hero h1 { font-size: clamp(48px, 15vw, 68px); }
  .hero-deck { margin-top: 22px; font-size: 16px; }
  .index-card { padding: 22px; border-radius: 18px; }
  .index-level { margin-top: 42px; }
  .ticker-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; box-shadow: none; }
  .ticker-card { min-width: 160px; border-bottom: 0; scroll-snap-align: start; }
  .market-tape { padding-bottom: 70px; }
  .market-read { padding-bottom: 80px; }
  .brief-card, .movers-card { padding: 24px; border-radius: 17px; }
  .brief-card h2 { margin-top: 36px; }
  .panel-section { padding: 80px 0; }
  .chart-panel { padding: 16px; border-radius: 16px; }
  .chart-legend { grid-template-columns: 1fr; }
  .legend-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .legend-item:last-child { border-bottom: 0; }
  .chart { min-height: 240px; overflow-x: auto; }
  .chart svg { min-width: 650px; }
  .housing-section { padding: 82px 16px; }
  .housing-heading h2 { font-size: 42px; }
  .housing-metrics { grid-template-columns: 1fr; }
  .housing-metric, .housing-metric:first-child { min-height: 185px; padding: 24px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.15); }
  .housing-metric:last-child { border-bottom: 0; }
  .housing-metric strong { margin-top: 28px; }
  .housing-detail { min-height: 0; padding: 26px; border-radius: 17px; }
  .rent-comparison { grid-template-columns: 1fr; gap: 0; }
  .region-bars > div { grid-template-columns: 85px 1fr 48px; }
  .guide-links { grid-template-columns: 1fr; }
  .guide-links a { min-height: 140px; border-right: 0; border-bottom: 1px solid var(--line); }
  .guide-links a:last-child { border-bottom: 0; }
  .guide-links a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .loading-value { animation: none; }
}
