:root {
    color-scheme: light;
    --page: #f8fafc;
    --surface: #fff;
    --ink: #0f172a;
    --muted: #475569;
    --line: #cbd5e1;
    --soft-line: #e2e8f0;
    --accent: #0f766e;
    --loss: #9f1239;
    --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.6; }
a { color: inherit; text-decoration: none !important; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; margin-bottom: 1rem; }
h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -.02em; margin-bottom: 1.5rem; text-transform: capitalize; }
h3 { font-size: 1.25rem; margin: 0; }
p { text-wrap: pretty; }
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .625rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 9999px;
    background: linear-gradient(135deg, rgb(255 255 255 / .9), rgb(226 232 240 / .55));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), 0 2px 6px rgb(15 23 42 / .06);
    color: var(--muted);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
button:hover {
    border-color: var(--accent);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), 0 3px 8px rgb(15 23 42 / .1);
    color: var(--ink);
}
button:active { box-shadow: inset 0 1px 3px rgb(15 23 42 / .1); }
button:disabled { opacity: .5; cursor: not-allowed; }
.page-width { max-width: 1248px; margin-inline: auto; padding-inline: 1.5rem; }
.page-intro { padding-block: 3rem 2rem; max-width: 800px; }
.page-intro p { margin: 0; color: var(--muted); }
.page-intro--state { max-width: none; padding-bottom: 0; }
.page-intro .state-stats { margin-top: 2rem; }
.page-intro .section-note { margin-top: 1rem; font-size: .875rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: 1.5rem; font-size: .875rem; color: var(--muted); }
.breadcrumbs + .page-intro { padding-top: 1.5rem; }
.report-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.report-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 600; }
.report-actions button { flex-shrink: 0; }
.report-actions + .page-intro { padding-top: 1.5rem; }
.global-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.global-stats > div { padding: 1.5rem; }
.global-stats > div + div { border-left: 1px solid var(--soft-line); }
.global-stats span { display: block; color: var(--muted); font-size: .875rem; }
.global-stats strong { display: block; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: .25rem; }
.state-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-note { font-size: .875rem; color: var(--muted); margin: 1rem 0; }
.report-section { margin-block: 3rem; }
.section-header { display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; }
.section-header h2 { margin: 0; }
.section-header > span { color: var(--muted); font-size: .875rem; }
.state-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.state-card { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.state-heading { display: flex; gap: .75rem; align-items: baseline; justify-content: space-between; }
.state-heading h3 a { text-decoration: none; }
.gain { color: var(--accent); font-weight: 650; font-size: .875rem; white-space: nowrap; }
.gain.loss { color: var(--loss); }
.gain-caption { font-size: .75rem; color: var(--muted); margin: .5rem 0 1.25rem; }
.price-pair { display: grid; grid-template-columns: 1.2fr 1fr; gap: .75rem; }
.price-pair span { display: block; color: var(--muted); font-size: .75rem; }
.price-pair strong { display: block; font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 650; font-variant-numeric: tabular-nums; }
.sparkline { display: block; width: 100%; height: 68px; color: var(--accent); margin-block: 1.25rem; }
.trend-empty { min-height: 68px; font-size: .875rem; color: var(--muted); }
.card-facts { margin: 0; font-size: .875rem; }
.card-facts > div { display: flex; justify-content: space-between; gap: .75rem; padding-block: .25rem; }
dt { color: var(--muted); }
dd { margin: 0; font-variant-numeric: tabular-nums; }
.card-facts dd { font-weight: 550; text-align: right; }
.card-link { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-top: .75rem; margin-top: 1rem; border-top: 1px solid var(--soft-line); color: var(--accent); font-size: .875rem; font-weight: 650; text-decoration: none; }
.section-nav { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.section-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .875rem; font-weight: 600; text-decoration: none; }
.section-nav a:hover, .section-nav a:active { background: #f1f5f9; border-color: var(--accent); }
.state-property-search { margin-top: 1rem; }
.state-property-search-grid { display: grid; gap: .75rem 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.state-property-search-grid .field { margin: 0; }
.state-property-search-actions { display: flex; }
.state-property-search-actions button { width: 100%; }
.directory-filters { display: grid; gap: .75rem 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; margin: 0 0 1.25rem; }
.directory-filters .field { margin: 0; }
.directory-filters :where(input, select) {
    min-height: 44px;
    padding: .625rem .95rem;
    border: 1px solid var(--line);
    border-radius: 9999px;
    background: linear-gradient(135deg, rgb(255 255 255 / .9), rgb(226 232 240 / .55));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), 0 2px 6px rgb(15 23 42 / .06);
    color: var(--ink);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.directory-filters :where(input, select):hover {
    border-color: var(--accent);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), 0 3px 8px rgb(15 23 42 / .1);
}
.directory-filters-actions { display: flex; }
.table-tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 0 0 .75rem; }
.table-tools label { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.key-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; margin: 0; border-top: 1px solid var(--line); }
.key-facts > div { padding-block: 1.25rem; border-bottom: 1px solid var(--soft-line); min-width: 0; }
.key-facts dt { font-size: .875rem; }
.key-facts dd { font-weight: 650; margin-top: .5rem; overflow-wrap: anywhere; }
.key-facts > div:nth-child(-n+2) dd { letter-spacing: -.02em; }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--soft-line); vertical-align: top; }
thead th { background: #f1f5f9; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; min-width: 140px; }
.property-ranking th:first-child { min-width: 14rem; }
.property-ranking th:nth-child(2), .property-ranking td:nth-child(2) { min-width: 12rem; }
tbody tr:last-child > * { border-bottom: none; }
tbody tr:hover { background: var(--page); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
thead .numeric { white-space: normal; min-width: 130px; }
.chart-legend { display: flex; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1rem; font-size: .875rem; }
.chart-legend span { display: flex; gap: .5rem; align-items: center; }
.chart-legend i { width: 28px; border-top: 3px solid var(--accent); }
.chart-legend .psf-key { border-top: 3px dashed var(--muted); }
.trend-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; height: 394px; }
.trend-chart svg { width: 100%; height: 360px; display: block; }
.trend-chart text { font-family: inherit; fill: var(--muted); font-size: 13px; }
.chart-placeholder { padding: 2rem 1rem; color: var(--muted); }
.monthly-data { margin-top: 1rem; }
summary { cursor: pointer; min-height: 44px; padding-block: .75rem; font-weight: 600; }
.monthly-data .table-scroll { margin-top: .5rem; max-height: 420px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 1rem .5rem; }
.faq-list p { padding-inline: .5rem; margin: 0 0 1.5rem; color: var(--muted); }
.other-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.other-states > a { padding: 1rem .75rem; border-bottom: 1px solid var(--line); text-decoration: none; min-height: 76px; }
.other-states strong, .other-states span { display: block; }
.other-states strong { font-size: .875rem; font-weight: 650; }
.other-states span { font-size: .75rem; color: var(--muted); }
.other-states span span { display: inline; }
.other-states a:hover { background: #f1f5f9; }
.methodology { padding-top: 1rem; margin-block: 3rem; }
.methodology h2 { font-size: 1.25rem; }
.methodology p { font-size: .875rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.5rem; font-size: .75rem; color: var(--muted); }
.notice { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 3rem; background: var(--surface); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: .5rem; left: .5rem; transform: translateY(-200%); padding: .75rem; background: var(--surface); z-index: 1; }
.skip-link:focus { transform: none; }
.site-footer { padding-bottom: 5rem; }
.state-stats--wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.population-bar-cell { width: 30%; min-width: 6rem; vertical-align: middle; }
.population-bar { display: block; height: .5rem; border-radius: 9999px; background: var(--soft-line); overflow: hidden; }
.population-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
@media (max-width: 1024px) {
    .state-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .state-stats > div:nth-child(3) { border-left: none; }
    .state-stats > div:nth-child(n+3) { border-top: 1px solid var(--soft-line); }
    .state-stats--wide > div:last-child:nth-child(odd) { grid-column: 1 / -1; border-left: none; }
    .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .other-states { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .page-width { padding-inline: 1rem; }
    .page-intro { padding-top: 2rem; }
    .global-stats { grid-template-columns: 1fr; }
    .global-stats > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; }
    .global-stats > div + div { border-left: none; border-top: 1px solid var(--soft-line); }
    .global-stats strong { font-size: 1.75rem; margin: 0; }
    .state-grid, .key-facts { grid-template-columns: 1fr; }
    .state-card { padding: 1.25rem; }
    .other-states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .price-pair strong { font-size: 1.25rem; }
    .key-facts { gap: 0; }
    .key-facts > div { padding-block: 1rem; }
    .state-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .state-stats > div { display: block; padding: 1rem .75rem; }
    .state-stats > div + div { border-top: none; }
    .state-stats > div:nth-child(even) { border-left: 1px solid var(--soft-line); }
    .state-stats > div:nth-child(n+3) { border-top: 1px solid var(--soft-line); }
    .state-stats strong { margin-top: .5rem; font-size: 1.5rem; }
    .state-stats span { font-size: .75rem; }
    .trend-chart { padding: .5rem; height: 378px; }
    th, td { padding: .75rem; }
    .state-property-search-grid { grid-template-columns: 1fr; }
    .directory-filters { grid-template-columns: 1fr; }
}
@media print {
    .site-header, .breadcrumbs, .section-nav, .skip-link, .back-to-top, .report-actions,
    button, form, .js-table-sort { display: none !important; }
    .js-progressive-controls { display: none !important; }
    .page-width { max-width: none; padding-inline: 0; }
    .table-scroll { overflow: visible; }
    .state-card, .key-facts > div { break-inside: avoid; }
}
