/* Historical stats page */
.sc-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1rem 1.25rem; margin-bottom: 1.25rem; }
.sc-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.sc-field > label, .sc-field > .sc-label { font-weight: 600; font-size: var(--text-small); color: var(--navy); }
.sc-field select { font: inherit; font-size: var(--text-body); padding: .7rem .85rem; min-height: 3.25rem; border: 1px solid var(--border-control); background: #fff; color: var(--charcoal); width: 100%; border-radius: var(--radius); }
.sc-years { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sc-field--wide .sc-years { grid-template-columns: auto minmax(0, 1fr); align-items: stretch; }
.sc-field--wide .sc-years .sc-seg { min-width: 0; }
#sc-yearsel.on { background: var(--navy); color: #fff; border-color: var(--navy); }
#sc-rangef[hidden] { display: none; }
@media (max-width: 520px) { .sc-field--wide .sc-years { grid-template-columns: 1fr; } }
.sc-seg { display: inline-flex; border: 1px solid var(--border-control); border-radius: var(--radius); overflow: hidden; background: #fff; min-height: 3.25rem; }
.sc-seg button { flex: 1; font: inherit; font-size: var(--text-small); font-weight: 600; padding: .6rem 1rem; border: 0; background: #fff; color: var(--navy); cursor: pointer; }
.sc-seg button + button { border-left: 1px solid var(--border-control); }
.sc-seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.sc-seg button:focus-visible { outline-offset: -3px; }

.sc-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.75rem); }
.sc-card h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: .25em; }
.sc-sub { color: var(--muted); font-size: var(--text-small); margin: 0 0 1.1rem; max-width: 52rem; }
.sc-tiles { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: .75rem; }
.sc-tiles li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.sc-tile__k { display: block; font-size: var(--text-caption); color: var(--muted); letter-spacing: .02em; }
.sc-tile__v { display: block; font-family: var(--serif); font-size: var(--text-stat); font-weight: 700; color: var(--navy); line-height: 1.15; font-variant-numeric: tabular-nums; }

.sc-chart-wrap { position: relative; width: 100%; }
.sc-chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.sc-chart-wrap svg:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; border-radius: 2px; }
.sc-grid { stroke: var(--line); stroke-width: 1; }
.sc-axis { stroke: #8f877b; stroke-width: 1; }
.sc-tick { font: 500 12px/1 var(--sans); fill: #4a4f5b; font-variant-numeric: tabular-nums; }
.sc-empty { font: 500 15px var(--sans); fill: var(--muted); }
.sc-bar { fill: var(--navy); }
.sc-bar.is-partial { fill: #7d8aa6; }
.sc-line { fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.sc-dot { fill: var(--navy); }
.sc-guide { stroke: var(--navy); stroke-opacity: .35; stroke-width: 1; }
.sc-mark { fill: var(--gold); stroke: var(--navy); stroke-width: 2; }
.sc-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--navy); color: #fff; padding: .5rem .7rem; border-radius: var(--radius); font-size: var(--text-small); line-height: 1.35; white-space: nowrap; box-shadow: 0 6px 18px rgba(20,32,58,.25); font-variant-numeric: tabular-nums; }
.sc-tip__sub { color: var(--on-navy-muted); font-size: var(--text-caption); }
.sc-tip[hidden] { display: none; }

.sc-notes { margin-top: 1rem; display: grid; gap: .6rem; }
.sc-notes p { margin: 0; font-size: var(--text-small); color: var(--charcoal); max-width: 56rem; }
.sc-low { border-left: 3px solid var(--navy); background: var(--white); padding: .7rem .9rem; }
.sc-notes [hidden] { display: none; }

.sc-data { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.sc-data summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.sc-tablewrap { max-height: 22rem; overflow: auto; margin-top: .8rem; border: 1px solid var(--line); border-radius: var(--radius); }
.sc-tablewrap table { width: 100%; border-collapse: collapse; font-size: var(--text-small); font-variant-numeric: tabular-nums; }
.sc-tablewrap th, .sc-tablewrap td { text-align: left; padding: .5rem .8rem; border-bottom: 1px solid var(--line); }
.sc-tablewrap thead th { position: sticky; top: 0; background: var(--navy); color: #fff; }
.sc-tablewrap tbody th { font-weight: 500; }

.sc-disclaimer h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.sc-disclaimer ul { padding-left: 1.2rem; display: grid; gap: .7rem; margin: 0 0 1.2rem; max-width: 56rem; }
.sc-disclaimer li, .sc-disclaimer p { font-size: var(--text-small); color: var(--charcoal); }
.sc-disclaimer p { max-width: 56rem; }
@media (max-width: 520px) { .sc-seg button { padding-inline: .6rem; } .sc-tile__v { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { .sc-tip { transition: none; } }

.sc-field--wide { grid-column: 1 / -1; }
@media (min-width: 720px) { .sc-field--wide { grid-column: span 2; } }
.sc-chart-wrap.is-loading { min-height: 240px; opacity: .5; }

/* Area landing pages */
.sa-byline { font-size: .95rem; color: var(--on-navy-muted); margin: 1.1rem 0 0; }
.sa-byline strong { color: #fff; font-weight: 600; }
.sa-chapter { border-left: 3px solid var(--gold); padding-left: 1.1rem; margin: 1.6rem 0; }
.sa-chapter h3 { margin: 0 0 .35em; }
.sa-chapter p { margin: 0; }
.sa-table td, .sa-table th { white-space: nowrap; }
.sa-table td:first-child, .sa-table th:first-child { white-space: normal; }
.sa-note { font-size: .92rem; color: var(--muted); }
.sa-faq h3 { font-size: 1.15rem; margin: 1.6rem 0 .3em; }
.sa-todo { border: 2px dashed var(--navy); background: #fff; padding: 1.1rem 1.3rem; margin: 1.8rem 0; border-radius: var(--radius); }
.sa-todo h3 { margin-top: 0; }
.sa-todo ul { margin-bottom: 0; }
.sa-pill { display: inline-block; font-size: .82rem; font-weight: 600; padding: .12rem .55rem; border-radius: 99px; border: 1px solid var(--navy); color: var(--navy); background: #fff; }
.sa-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .4rem 0 1.4rem; }
.sa-links a { font-weight: 500; }
.sa-cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sa-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .sa-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Row headers in the market tables: light cell, dark text (the shared .table-wrap th rule paints them navy, which hid the neighbourhood links) */
.sa-table tbody th { background: #fff; color: var(--navy); font-weight: 600; }
.sa-table tbody th a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.sa-table tbody th a:hover, .sa-table tbody th a:focus-visible { color: #000; background: #f6efd9; }


/* Market verdict card */
.sv-section { padding-block: clamp(1.75rem, 4vw, 3rem); }
.sv-card { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--gold); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.9rem); display: grid; gap: 1.1rem 2.25rem; grid-template-columns: minmax(0, 1fr); }
.sv-eyebrow { font-size: var(--text-caption); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 0 .5rem; }
.sv-label { font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1.05; margin: 0 0 .6rem; }
.sv-text { margin: 0; max-width: 42rem; }
.sv-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.sv-stats li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.sv-k { display: block; font-size: var(--text-caption); color: var(--muted); letter-spacing: .02em; }
.sv-v { display: block; font-family: var(--serif); font-size: var(--text-stat); font-weight: 700; color: var(--navy); line-height: 1.15; font-variant-numeric: tabular-nums; }
.sv-other, .sv-links, .sv-note { grid-column: 1 / -1; margin: 0; }
.sv-other { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; font-size: var(--text-small); }
.sv-chip { display: inline-block; border: 1px solid var(--navy); border-radius: 99px; padding: .15rem .75rem; font-size: var(--text-small); font-weight: 600; color: var(--navy); background: #fff; }
.sv-links { font-weight: 500; font-size: var(--text-small); }
.sv-note { font-size: var(--text-caption); color: var(--muted); max-width: 62rem; }
@media (max-width: 520px) { .sv-v { font-size: 1.6rem; } }
.sa-cards + .sa-note, .sa-cards ~ .sa-note { margin-top: 1.5rem; }
.sv-table th, .sv-table td { padding: .6rem .6rem; font-size: .93rem; }
.sv-table thead th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.sv-table th:first-child, .sv-table td:first-child { min-width: 9.5rem; }

/* Equal-width columns that fill the page width (Moving Up city table) */
.table-wrap .sa-table--even { table-layout: fixed; width: 100%; min-width: 46rem; }
.table-wrap .sa-table--even th, .table-wrap .sa-table--even td { width: 20%; white-space: normal; }

/* ms-local */
.ms-local{background:#fff;border:1px solid rgba(27,43,75,.12);border-left:3px solid var(--gold,#C9A84C);border-radius:6px;padding:1.1rem 1.3rem;margin:1.4rem 0 0;max-width:46rem;color:var(--charcoal,#2C2C2C)}
.ms-local h2{font-size:1.25rem;margin:0 0 .5rem;color:var(--navy,#1B2B4B)}
.ms-local p{margin:.35rem 0 0}
.ms-datanote{font-size:.9rem;color:var(--muted,#5a5f6b)}

/* Tip: small month label, bold serif price (matches the market stats chart) */
.sc-tip strong { display: block; font-weight: 500; font-size: .78rem; color: var(--on-navy-muted, #cfd6e4); }
.sc-tip__val { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.sc-tip { padding: .4rem .7rem; }
#sc-range button { white-space: nowrap; }
