/* TrueCost — SimCity meets Ghibli design system. System fonts only (no external CDNs). */

:root {
    /* Palette */
    --cream: #fdf6e3;
    --paper: #faf3dd;
    --ink: #2d3142;
    --ink-soft: #4f5266;
    --forest: #3a5a40;
    --moss: #588157;
    --sage: #a3b18a;
    --terracotta: #e07856;
    --terracotta-deep: #c46447;
    --sun: #f6ae2d;
    --sun-deep: #d68f1f;
    --sky: #a8dadc;
    --mist: #cce3de;
    --cloud: #f1faee;
    --rose: #e8a09c;

    --shadow-warm: 0 8px 28px rgba(224, 120, 86, 0.18);
    --shadow-soft: 0 6px 18px rgba(45, 49, 66, 0.08);
    --shadow-deep: 0 14px 40px rgba(45, 49, 66, 0.16);

    --radius: 14px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
    --font-display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
    --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--cream);
    background-image:
        radial-gradient(circle at 12% 20%, rgba(168, 218, 220, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 86% 78%, rgba(246, 174, 45, 0.12) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.19 0 0 0 0 0.26 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
}

a { color: var(--terracotta-deep); text-decoration: none; transition: color .15s; }
a:hover { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0 0 .6rem;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Top nav ── */
.topnav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(253, 246, 227, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(45, 49, 66, 0.06);
}
.topnav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--ink);
    text-decoration: none;
}
.brand:hover { color: var(--terracotta-deep); text-decoration: none; }
.brand-mark {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: var(--terracotta);
    border-radius: 6px 6px 9px 9px;
    position: relative;
}
.brand-mark::before {
    /* roof */
    content: '';
    position: absolute; top: -10px; left: -3px; right: -3px; height: 12px;
    background: var(--ink);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
}
.brand-mark::after {
    /* window */
    content: '';
    position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
    width: 10px; height: 10px;
    background: var(--sun);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(246, 174, 45, 0.5);
}
.nav-links { display: flex; gap: 1.5rem; font-size: .92rem; }
.nav-links a { color: var(--ink-soft); }

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 3.5rem 1rem 2.5rem;
    position: relative;
}
.hero h1 {
    color: var(--ink);
    margin-bottom: .8rem;
}
.hero p.lead {
    color: var(--ink-soft);
    font-size: 1.15rem;
    max-width: 620px;
    margin: 0 auto 2rem;
}
.hero-cloud {
    position: absolute;
    opacity: .6;
    pointer-events: none;
}
.hero-cloud.left  { top: 30px; left: 6%; }
.hero-cloud.right { top: 70px; right: 8%; }

/* ── Postcode search ── */
.postcode-search {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-warm);
    max-width: 560px;
    margin: 0 auto 2rem;
    border: 2px solid var(--paper);
    position: relative;
}
.postcode-search::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--sky), var(--sun));
    z-index: -1;
    opacity: .25;
}
.postcode-search form { display: flex; gap: .6rem; }
.postcode-search input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .9rem 1.2rem;
    border: 2px solid var(--mist);
    border-radius: var(--radius);
    background: var(--cream);
    color: var(--ink);
    outline: none;
    transition: all .15s;
}
.postcode-search input:focus {
    border-color: var(--moss);
    background: white;
    box-shadow: 0 0 0 4px rgba(88, 129, 87, 0.12);
}
.postcode-search button {
    background: var(--moss);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0 1.6rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform .1s, background .15s;
    box-shadow: 0 4px 0 var(--forest);
}
.postcode-search button:hover { background: var(--forest); }
.postcode-search button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--forest); }

.search-hint {
    text-align: center;
    color: var(--ink-soft);
    font-size: .85rem;
    margin: .5rem 0 0;
}
.search-examples { display: flex; gap: .5rem; justify-content: center; margin: .8rem 0 0; flex-wrap: wrap; }
.search-examples a {
    font-family: var(--font-mono);
    font-size: .8rem;
    background: var(--mist);
    color: var(--forest);
    padding: .25rem .6rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: background .15s;
}
.search-examples a:hover { background: var(--sky); text-decoration: none; }

/* ── House row (postcode results: list of properties) ── */
.house-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.house-card {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.4rem 1.2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(168, 218, 220, 0.4);
    transition: transform .18s, box-shadow .18s;
    text-decoration: none;
    color: var(--ink);
    margin-top: 28px; /* room for the rooftop */
}
.house-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-deep);
    text-decoration: none;
}
.house-card.detached  { --roof-color: var(--terracotta); }
.house-card.semi      { --roof-color: var(--sun); }
.house-card.terraced  { --roof-color: var(--moss); }
.house-card.flat      { --roof-color: var(--sky); }
.house-card.other     { --roof-color: var(--rose); }

.house-card::before {
    /* rooftop */
    content: '';
    position: absolute;
    top: -22px;
    left: 14px;
    right: 14px;
    height: 28px;
    background: var(--roof-color, var(--terracotta));
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    z-index: 1;
}
.house-card::after {
    /* chimney */
    content: '';
    position: absolute;
    top: -34px;
    right: 38px;
    width: 12px;
    height: 18px;
    background: var(--ink);
    border-radius: 3px 3px 0 0;
    z-index: 0;
}

.house-card .paon {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--ink);
    line-height: 1;
}
.house-card .street {
    color: var(--ink-soft);
    font-size: .92rem;
    margin: .25rem 0 1rem;
}
.house-card .badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.house-card .badge {
    font-size: .72rem;
    padding: .15rem .55rem;
    border-radius: var(--radius-pill);
    background: var(--cream);
    color: var(--ink-soft);
    font-weight: 600;
    letter-spacing: .03em;
    border: 1px solid rgba(45, 49, 66, 0.08);
}
.house-card .badge.epc-A,
.house-card .badge.epc-B { background: #c8e6c9; color: var(--forest); }
.house-card .badge.epc-C,
.house-card .badge.epc-D { background: #fff0c4; color: var(--sun-deep); }
.house-card .badge.epc-E,
.house-card .badge.epc-F,
.house-card .badge.epc-G { background: #fad4cf; color: var(--terracotta-deep); }

.house-card .price {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--forest);
    margin: 0;
}
.house-card .price-meta { font-size: .78rem; color: var(--ink-soft); }
.house-card .area { font-size: .82rem; color: var(--ink-soft); margin-top: .3rem; }

/* ── Property page ── */
.property-header {
    background: linear-gradient(160deg, var(--cloud), var(--cream));
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.5rem 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--mist);
    margin: 1.25rem 0;
    position: relative;
    overflow: hidden;
}
.property-header h1 {
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    margin-bottom: .2rem;
    line-height: 1.15;
}
.property-header .where {
    color: var(--ink-soft);
    font-size: .85rem;
    margin-bottom: .55rem;
}
.property-header .meta-row {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--ink-soft);
    line-height: 1.5;
}
.property-header .meta-row > span {
    padding: 0 .7rem;
    border-right: 1px solid rgba(45,49,66,.12);
}
.property-header .meta-row > span:first-child { padding-left: 0; }
.property-header .meta-row > span:last-child { border-right: none; }
.property-header .meta-row span strong { color: var(--ink); font-weight: 600; }

.section { background: white; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-soft); margin-bottom: 2rem; }
.section h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.section .lead { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* True Cost panel */
.truecost-headline { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1rem; }
.truecost-headline .number { font-family: var(--font-mono); font-weight: 700; font-size: 2.6rem; color: var(--forest); }
.truecost-headline .label { color: var(--ink-soft); font-size: 1rem; }
.truecost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .8rem;
}
.truecost-cell {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid rgba(168, 218, 220, 0.35);
}
.truecost-cell .icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
    margin-bottom: .5rem;
}
.truecost-cell .name { font-size: .8rem; color: var(--ink-soft); margin-bottom: .2rem; }
.truecost-cell .amount { font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem; color: var(--ink); }

/* HomeScore */
.homescore { display: flex; align-items: center; gap: 1.2rem; }
.homescore .ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.4rem;
    color: white;
    background: conic-gradient(var(--moss) calc(var(--score, 0) * 36deg), var(--mist) 0);
    position: relative;
}
.homescore .ring::before {
    content: '';
    position: absolute; inset: 8px;
    border-radius: 50%;
    background: white;
}
.homescore .ring span {
    position: relative;
    color: var(--forest);
}
.homescore .ring span::after {
    content: ' / 10';
    font-size: .75rem;
    color: var(--ink-soft);
    font-weight: 500;
}
.homescore .ring small { font-size: .75rem; color: var(--ink-soft); font-weight: 500; }
.homescore .text { flex: 1; }
.homescore .text h3 { margin-bottom: .25rem; }
.homescore .text p { color: var(--ink-soft); font-size: .92rem; margin: 0; }

/* Price history / chart placeholder */
.price-history-chart {
    width: 100%;
    height: 280px;
    background: var(--cream);
    border-radius: var(--radius);
    border: 1px dashed var(--mist);
    position: relative;
}

/* Comparables table */
.comp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.comp-table th { text-align: left; padding: .7rem .9rem; background: var(--cream); color: var(--ink-soft); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--mist); }
.comp-table td { padding: .85rem .9rem; border-bottom: 1px solid rgba(168, 218, 220, 0.3); }
.comp-table tr:hover td { background: rgba(168, 218, 220, 0.08); }
.comp-table .price { font-family: var(--font-mono); font-weight: 600; color: var(--forest); }

/* Section grid */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Footer */
.foot {
    margin-top: 4rem;
    padding: 2.5rem 1.5rem 3rem;
    background: #faf8f3;
    border-top: 1px solid #e6e3dc;
    color: var(--ink-soft);
    font-size: .9rem;
}
.foot a { color: var(--forest); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-grid {
    max-width: 1100px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 0.7fr;
    gap: 2rem;
}
.foot-col h4 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink);
    margin: 0 0 .6rem 0;
    font-weight: 700;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; line-height: 1.9; }
.foot-brand strong { color: var(--ink); font-size: 1.1rem; display: block; margin-bottom: .4rem; }
.foot-brand p { margin: 0; line-height: 1.5; }
.foot-fine {
    max-width: 1100px;
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e6e3dc;
    font-size: .8rem;
    line-height: 1.5;
}
@media (max-width: 760px) {
    .foot-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .foot-brand { grid-column: 1 / -1; }
}

/* SVG cloud */
.cloud-svg { width: 90px; height: auto; }

/* Tiny utilities */
.muted { color: var(--ink-soft); }
.mono  { font-family: var(--font-mono); }
.center { text-align: center; }
.stack > * + * { margin-top: 1.2rem; }

/* Live status dot */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 0 4px rgba(88, 129, 87, 0.18); margin-right: .35rem; }

/* Empty state */
.empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ink-soft);
}
.empty .big-emoji {
    font-size: 3.2rem;
    margin-bottom: .8rem;
    display: block;
    filter: saturate(0.8);
}

/* React island roots */
[data-island] { display: block; }

/* ══════════════════════════════════════════════════════════════════════════
   True Cost Studio — consolidated buyer-journey island
   Big cash-needed hero, persistent buyer profile, progressive-disclosure sections.
   Typography: editorial serif for the hero number, system body.
   Colour: moss for deposit (what you keep), terracotta for tax (what leaves),
           sun for fees (one-off), sky for meta / chrome.
   ══════════════════════════════════════════════════════════════════════════ */

.studio { display: grid; gap: 1rem; }

/* ══════════════════════════════════════════════════════════════════════════
   HERO v2 — Price to buy (big, editable) + Mortgage / Monthly / Cash headlines
   ══════════════════════════════════════════════════════════════════════════ */

.studio-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--ink-soft);
    font-weight: 700;
}
.studio-label-small {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: var(--ink-soft);
    font-weight: 700;
    margin-bottom: .3rem;
}

.studio-hero-v2 {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(400px, 2fr);
    gap: 1rem;
}
@media (max-width: 820px) { .studio-hero-v2 { grid-template-columns: 1fr; } }

/* ─── The editable PRICE card (direct click-to-edit) ─── */
.studio-price-card {
    position: relative;
    padding: .8rem 1.1rem .95rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(140% 160% at 0% 0%, rgba(246,174,45,.2) 0%, transparent 55%),
        linear-gradient(165deg, #fff 0%, var(--paper) 100%);
    border: 1px solid rgba(45,49,66,.08);
    box-shadow: var(--shadow-warm);
    overflow: hidden;
}
.studio-price-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .15rem;
}
.studio-price-revert {
    background: rgba(224,120,86,.08);
    border: 1px solid rgba(224,120,86,.25);
    color: var(--terracotta-deep);
    font-size: .68rem;
    padding: .12rem .5rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: var(--font-mono);
    letter-spacing: .02em;
}
.studio-price-revert:hover { background: rgba(224,120,86,.16); }

/* The whole price is ONE big editable number. Click and type. */
.studio-price-inline {
    display: flex;
    align-items: baseline;
    gap: .12rem;
    cursor: text;
    padding: .15rem 0 .3rem;
    border-bottom: 2px dashed transparent;
    transition: border-color .15s;
    width: 100%;
}
.studio-price-inline:hover { border-bottom-color: rgba(45,49,66,.1); }
.studio-price-inline:focus-within { border-bottom-color: var(--moss); }
.studio-price-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 3.6vw, 2.7rem);
    letter-spacing: -0.018em;
    line-height: 1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    padding: 0;
    width: 100%;
    cursor: text;
}
.studio-price-input.overridden { color: var(--terracotta-deep); }
.studio-price-input::placeholder { color: rgba(45,49,66,.25); }
.studio-price-card::after {
    content: '';
    position: absolute; top: -14px; left: 22px;
    width: 60px; height: 24px;
    background: var(--terracotta);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    opacity: .88;
}
.studio-price-display { display: flex; align-items: center; gap: .4rem; }
.studio-price-number {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.9rem, 3.4vw, 2.5rem);
    letter-spacing: -0.018em;
    line-height: 1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.studio-price-number.overridden { color: var(--terracotta-deep); }
.studio-price-edit {
    display: inline-flex; align-items: center; gap: .25rem;
    background: white; border: 2px solid var(--moss);
    border-radius: 10px; padding: .22rem .45rem;
    margin: .05rem 0;
}
.studio-price-prefix {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    color: var(--ink-soft);
}
.studio-price-edit input {
    border: none; outline: none; background: transparent;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    width: 7ch;
    padding: 0;
}
.studio-price-ctx {
    display: flex; flex-wrap: wrap; gap: .35rem;
    margin-top: .75rem;
}
.studio-price-pill {
    font-size: .75rem;
    color: var(--ink);
    background: rgba(255,255,255,.8);
    border: 1px solid rgba(45,49,66,.1);
    border-radius: var(--radius-pill);
    padding: .28rem .65rem;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s;
}
.studio-price-pill:hover { background: white; border-color: var(--moss); }
.studio-price-pill.active { background: var(--moss); color: white; border-color: var(--forest); }
.studio-price-pill.active strong { color: white; }
.studio-price-pill.muted { color: var(--ink-soft); font-style: italic; }

/* ─── 3- or 4-cell headline row: Mortgage / Monthly / Cash / HomeScore ─── */
.studio-headline-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
}
.studio-headline-row.four { grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.studio-headline-row.four .studio-headline { padding: .7rem .75rem .8rem; gap: .18rem; }
.studio-headline-row.four .studio-headline-label { font-size: .68rem; letter-spacing: .1em; }
.studio-headline-row.four .studio-headline-number { font-size: clamp(1.15rem, 1.8vw, 1.55rem); }
.studio-headline-row.four .studio-headline-unit { font-size: .6em; }
.studio-headline-row.four .studio-headline-sub { font-size: .68rem; line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 1040px) { .studio-headline-row.four .studio-headline-number { font-size: 1.15rem; } }
@media (max-width: 920px) { .studio-headline-row.four { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
    .studio-headline-row.four .studio-headline-number { font-size: clamp(1.5rem, 2.6vw, 2rem); }
}
@media (max-width: 620px) {
    .studio-headline-row { grid-template-columns: 1fr; }
    .studio-headline-row.four { grid-template-columns: 1fr 1fr; }
    .studio-headline-row.four .studio-headline-number { font-size: 1.35rem; }
}

.studio-headline {
    background: white;
    border: 1px solid rgba(168,218,220,.5);
    border-radius: var(--radius-lg);
    padding: .9rem 1rem 1rem;
    box-shadow: var(--shadow-soft);
    display: flex; flex-direction: column; gap: .25rem;
    min-width: 0;
}
.studio-headline:nth-child(1) { border-top: 3px solid var(--moss); }     /* Mortgage */
.studio-headline:nth-child(2) { border-top: 3px solid var(--sky); }      /* All-in monthly */
.studio-headline:nth-child(3) { border-top: 3px solid var(--sun); }      /* Cash upfront */
.studio-headline:nth-child(4) { border-top: 3px solid var(--terracotta); } /* HomeScore */

.studio-headline-label {
    display: flex; align-items: center; gap: .4rem;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ink-soft);
    font-weight: 700;
}
.studio-headline-icon { font-size: .92rem; }
.studio-headline-number {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: -0.012em;
    color: var(--forest);
    font-variant-numeric: tabular-nums;
}
.studio-headline-unit {
    font-size: .65em;
    color: var(--ink-soft);
    font-weight: 500;
    margin-left: .12rem;
}
.studio-headline-sub {
    font-size: .75rem;
    color: var(--ink-soft);
    line-height: 1.45;
}

.studio-recalc {
    grid-column: 1 / -1;
    font-size: .78rem;
    color: var(--sun-deep);
    text-align: right;
    padding-right: .3rem;
    animation: studioPulse 1.2s ease-in-out infinite;
}
@keyframes studioPulse { 0%,100% { opacity:.4; } 50% { opacity:1; } }

/* ── Profile strip ── */
.studio-profile {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(168,218,220,.4);
}
.studio-profile-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem;
}
.studio-profile-head h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0;
}
.studio-link {
    background: none; border: none; padding: 0;
    color: var(--ink-soft);
    font-size: .8rem;
    text-decoration: underline; text-underline-offset: 3px;
    cursor: pointer;
}
.studio-link:hover { color: var(--terracotta-deep); }

.studio-chips-row {
    display: flex; flex-wrap: wrap; gap: .5rem;
    margin-bottom: 1.1rem;
}
.studio-chips-row-tight { margin-top: .4rem; margin-bottom: 0; }

.studio-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem .95rem;
    background: var(--cream);
    border: 1px solid rgba(45,49,66,.12);
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .08s;
}
.studio-toggle:hover { background: var(--paper); }
.studio-toggle:active { transform: translateY(1px); }
.studio-toggle.on {
    background: var(--moss);
    color: white;
    border-color: var(--forest);
    box-shadow: 0 3px 0 var(--forest);
}
.studio-toggle.on:hover { background: var(--forest); }
.studio-toggle-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ink-soft);
    box-shadow: 0 0 0 3px rgba(45,49,66,.05);
    transition: background .15s, box-shadow .15s;
}
.studio-toggle.on .studio-toggle-dot { background: var(--sun); box-shadow: 0 0 0 3px rgba(246,174,45,.35); }

.studio-region {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .4rem .95rem;
    background: var(--cream);
    border: 1px solid rgba(45,49,66,.12);
    border-radius: var(--radius-pill);
    font-size: .88rem;
    color: var(--ink);
}
.studio-region select {
    border: none; background: transparent; font-family: inherit;
    font-weight: 600; color: var(--ink); outline: none; padding-right: .3rem;
    cursor: pointer;
}
.studio-region > span {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-soft);
    font-weight: 600;
}

.studio-sliders-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.studio-inline-slider {
    display: flex; flex-direction: column; gap: .3rem;
}
.studio-inline-slider-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: .82rem;
    color: var(--ink-soft);
    font-weight: 600;
}
.studio-inline-slider-val {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    font-weight: 700;
}
.studio-inline-slider input[type="range"] {
    accent-color: var(--moss);
    width: 100%;
    height: 20px;
    margin: 0;
}
.studio-inline-slider-hint {
    font-size: .72rem;
    color: var(--ink-soft);
    font-style: italic;
}

/* ── Section stack: progressive-disclosure folds ── */
.studio-sections { display: grid; gap: .6rem; }
.studio-fold {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(168,218,220,.45);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: box-shadow .18s, transform .18s;
}
.studio-fold.open {
    box-shadow: var(--shadow-deep);
    border-color: rgba(88,129,87,.35);
}
.studio-fold-head {
    display: grid;
    grid-template-columns: 32px 1fr auto 16px;
    gap: .7rem;
    align-items: center;
    padding: .6rem 1rem;
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--ink);
    transition: background .12s;
}
.studio-fold-head:hover { background: var(--cream); }
.studio-fold-icon {
    font-size: 1.05rem;
    width: 32px; height: 32px;
    border-radius: 9px;
    background: var(--paper);
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(45,49,66,.06);
}
.studio-fold-title { display: flex; flex-direction: column; gap: 0; }
.studio-fold-title strong {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .98rem;
    letter-spacing: -0.005em;
}
.studio-fold-title small { font-size: .72rem; color: var(--ink-soft); line-height: 1.2; }
.studio-fold-headline {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1rem;
    color: var(--forest);
}
.studio-fold-chevron {
    color: var(--ink-soft);
    transition: transform .22s ease;
}
.studio-fold.open .studio-fold-chevron {
    transform: rotate(180deg);
    color: var(--forest);
}
.studio-fold-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .3s cubic-bezier(.4,0,.2,1);
}
.studio-fold.open .studio-fold-body { grid-template-rows: 1fr; }
.studio-fold-inner {
    overflow: hidden;
    padding: 0 1rem .9rem;
    color: var(--ink);
}

/* Compact single-line fact row — replaces the old paragraph-style body text */
.studio-compact-fact {
    margin: 0 0 .35rem;
    padding: .55rem .7rem;
    background: var(--cream);
    border-radius: 10px;
    border: 1px solid rgba(45,49,66,.05);
    font-size: .88rem;
    line-height: 1.55;
    color: var(--ink);
}
.studio-compact-fact.muted { color: var(--ink-soft); }
.studio-compact-fact strong { color: var(--ink); font-weight: 700; }
.studio-sep { margin: 0 .5rem; color: rgba(45,49,66,.25); }

/* Always-visible cost-cards grid — replaces the collapsible folds entirely.
   Six cards (mortgage, SDLT, council tax, energy, insurance, maintenance)
   always show their amount + one-line detail. No expand/collapse, no hidden state. */
.studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: .7rem;
}
.studio-costcard {
    background: white;
    border-radius: 14px;
    border: 1px solid rgba(168,218,220,.5);
    padding: .85rem 1rem .95rem;
    box-shadow: var(--shadow-soft);
    display: flex; flex-direction: column; gap: .35rem;
    transition: box-shadow .15s, transform .12s;
}
.studio-costcard:hover {
    box-shadow: var(--shadow-deep);
    transform: translateY(-1px);
}
.studio-costcard-head {
    display: flex; align-items: center; gap: .55rem;
}
.studio-costcard-icon {
    font-size: 1.05rem;
    width: 26px; height: 26px;
    border-radius: 7px;
    background: var(--paper);
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(45,49,66,.06);
    flex-shrink: 0;
}
.studio-costcard-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .98rem;
    color: var(--ink);
    letter-spacing: -0.005em;
}
.studio-costcard-amount {
    margin-left: auto;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1rem;
    color: var(--forest);
    white-space: nowrap;
}
.studio-costcard-detail {
    font-size: .8rem;
    color: var(--ink-soft);
    line-height: 1.5;
    padding-left: 34px;     /* indent under icon */
}

/* Info ⓘ: small tooltip hint next to cost name */
.studio-costcard-why {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: .35rem;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--mist);
    color: var(--ink-soft);
    font-size: .7rem;
    font-weight: 700;
    cursor: help;
    user-select: none;
    vertical-align: 1px;
}
.studio-costcard-why:hover { background: var(--sky); color: var(--forest); }

/* Pill badge at right of name — for EPC letter or verified/estimated */
.studio-mini-pill {
    padding: .15rem .5rem;
    border-radius: var(--radius-pill);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.studio-mini-pill-ok   { background: rgba(88,129,87,.16); color: var(--forest); }
.studio-mini-pill-warn { background: rgba(246,174,45,.22); color: var(--sun-deep); }
.studio-mini-pill-epc-A, .studio-mini-pill-epc-B { background: #c8e6c9; color: var(--forest); }
.studio-mini-pill-epc-C, .studio-mini-pill-epc-D { background: #fff0c4; color: var(--sun-deep); }
.studio-mini-pill-epc-E, .studio-mini-pill-epc-F, .studio-mini-pill-epc-G { background: #fad4cf; color: var(--terracotta-deep); }

/* Micro action buttons (pencil, save, cancel) */
.studio-micro-btn {
    background: none;
    border: 1px solid transparent;
    padding: .15rem .4rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--ink-soft);
    font-size: .85rem;
    line-height: 1;
    transition: background .12s, color .12s, border-color .12s;
}
.studio-micro-btn:hover {
    background: var(--cream);
    border-color: rgba(45,49,66,.1);
    color: var(--ink);
}
.studio-micro-btn.pencil { margin-left: .35rem; font-size: .78rem; }
.studio-micro-btn.save  { color: var(--forest); }
.studio-micro-btn.save:hover { background: rgba(88,129,87,.1); border-color: rgba(88,129,87,.25); }

/* Edit mode input inside a card */
.studio-costcard-edit {
    display: inline-flex; align-items: center; gap: .2rem;
    margin-left: auto;
    background: var(--cream);
    border: 1px solid var(--moss);
    border-radius: 8px;
    padding: .15rem .35rem;
}
.studio-costcard-edit input {
    border: none; background: transparent; outline: none;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: .95rem;
    color: var(--ink);
    width: 6.5ch;
    text-align: right;
    padding: 0;
}
.studio-edit-prefix, .studio-edit-suffix {
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--ink-soft);
    padding: 0 .1rem;
}

/* Overridden state: small visual cue */
.studio-costcard.overridden {
    border-color: rgba(224, 120, 86, 0.4);
    background: linear-gradient(180deg, #fff 0%, #fff6f0 100%);
}
.studio-costcard-amount.overridden {
    color: var(--terracotta-deep);
}
.studio-costcard-overridenote {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: .35rem;
    padding: .3rem 0 0 34px;
    border-top: 1px dashed rgba(224,120,86,.25);
    font-size: .72rem;
    color: var(--ink-soft);
}
.studio-costcard-overridenote .mono {
    font-family: var(--font-mono);
    color: var(--ink);
}

/* Inline details (SDLT bands) — uses <details> which collapses naturally */
.studio-inline-details {
    background: white;
    border-radius: 14px;
    border: 1px solid rgba(168,218,220,.5);
    padding: .8rem 1rem;
    box-shadow: var(--shadow-soft);
    margin-top: .9rem;
}
.studio-inline-details summary {
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    color: var(--ink);
    list-style: none;
    padding: .1rem 0;
}
.studio-inline-details summary::-webkit-details-marker { display: none; }
.studio-inline-details summary::before {
    content: '▾';
    display: inline-block;
    margin-right: .5rem;
    color: var(--ink-soft);
    transition: transform .15s;
    font-size: .8rem;
}
.studio-inline-details[open] summary::before { transform: rotate(180deg); }
.studio-inline-details .studio-bands { margin-top: .7rem; }
.studio-inline-note { margin: .6rem 0 0; font-size: .78rem; color: var(--ink-soft); }

.studio-detail { display: flex; flex-direction: column; gap: .9rem; }
.studio-detail-text {
    margin: 0;
    font-size: .94rem;
    color: var(--ink);
    line-height: 1.6;
}
.studio-detail-text.muted { color: var(--ink-soft); font-size: .86rem; }
.studio-detail-text strong { color: var(--ink); font-weight: 700; }

.studio-mini-sliders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: var(--radius);
    border: 1px solid rgba(45,49,66,.06);
}

/* SDLT band table */
.studio-bands {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    background: var(--cream);
    border-radius: var(--radius);
    overflow: hidden;
}
.studio-bands th, .studio-bands td {
    padding: .55rem .8rem;
    text-align: left;
    border-bottom: 1px solid rgba(45,49,66,.06);
    font-variant-numeric: tabular-nums;
}
.studio-bands th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-soft);
    font-weight: 600;
}
.studio-bands-total td {
    font-weight: 700;
    color: var(--terracotta-deep);
    border-bottom: none;
    background: rgba(224,120,86,.06);
}

/* Pills (verified vs estimated, EPC letter, etc.) */
.studio-pill {
    display: inline-block;
    font-size: .7rem;
    padding: .15rem .6rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    letter-spacing: .02em;
    margin-left: .4rem;
    vertical-align: middle;
}
.studio-pill-ok   { background: rgba(88,129,87,.15); color: var(--forest); }
.studio-pill-warn { background: rgba(246,174,45,.2); color: var(--sun-deep); }

.studio-epc {
    display: inline-block;
    min-width: 22px; text-align: center;
    padding: .1rem .4rem;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 700;
}
.studio-epc-A, .studio-epc-B { background: #c8e6c9; color: var(--forest); }
.studio-epc-C, .studio-epc-D { background: #fff0c4; color: var(--sun-deep); }
.studio-epc-E, .studio-epc-F, .studio-epc-G { background: #fad4cf; color: var(--terracotta-deep); }

/* Error banner */
.studio-err {
    background: rgba(224,120,86,.1);
    color: var(--terracotta-deep);
    padding: .7rem 1rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--terracotta);
    font-size: .88rem;
    margin: 0;
}

/* Skeleton shown before JS hydration */
.studio-skeleton {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    text-align: center;
    color: var(--ink-soft);
}
.studio-skeleton .big { font-family: var(--font-display); font-size: 2rem; color: var(--forest); font-weight: 700; }
.studio-skeleton .sub { font-size: .9rem; margin-top: .5rem; }

/* ══════════════════════════════════════════════════════════════════════════
   POSTCODE RESULTS — stats bar, filter chips, view tabs, scene SVG, sales table
   ══════════════════════════════════════════════════════════════════════════ */

.postcode-results { padding: 1rem 1.25rem 4rem; }

.postcode-head {
    display: grid;
    grid-template-columns: minmax(180px, auto) 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: .8rem 1.2rem;
    background: linear-gradient(160deg, var(--cloud), var(--cream));
    border-radius: var(--radius-lg);
    border: 1px solid var(--mist);
    box-shadow: var(--shadow-soft);
}
@media (max-width: 720px) { .postcode-head { grid-template-columns: 1fr; } }
.postcode-head h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.01em;
}
.postcode-head .muted { font-size: .82rem; margin: .15rem 0 0; }

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: .6rem;
    justify-self: end;
}
.stats-bar .stat {
    display: flex; flex-direction: column; align-items: flex-end;
    background: rgba(255,255,255,.7);
    border-radius: 10px;
    padding: .35rem .7rem;
    border: 1px solid rgba(45,49,66,.06);
}
.stats-bar .stat .num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--forest);
    font-size: 1rem;
    line-height: 1;
}
.stats-bar .stat .lbl {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink-soft);
    font-weight: 600;
    margin-top: .2rem;
    text-align: right;
}

.postcode-controls {
    display: flex; flex-wrap: wrap; gap: .8rem;
    align-items: center; justify-content: space-between;
    margin-bottom: 1rem;
}
.filter-chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.filter-chips .chip {
    padding: .35rem .8rem;
    background: var(--cream);
    border: 1px solid rgba(45,49,66,.1);
    border-radius: var(--radius-pill);
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
}
.filter-chips .chip:hover { background: white; color: var(--ink); text-decoration: none; }
.filter-chips .chip.on { background: var(--moss); color: white; border-color: var(--forest); box-shadow: 0 2px 0 var(--forest); }

.view-tabs { display: flex; gap: .25rem; padding: .25rem; background: var(--cream); border-radius: var(--radius-pill); border: 1px solid rgba(45,49,66,.08); }
.view-tabs .tab {
    padding: .35rem .9rem;
    border-radius: var(--radius-pill);
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    transition: background .12s, color .12s;
}
.view-tabs .tab:hover { color: var(--ink); text-decoration: none; }
.view-tabs .tab.on { background: white; color: var(--ink); box-shadow: var(--shadow-soft); }

/* ── The SimCity scene SVG (contained viewport, pan + zoom) ────────── */
.scene-wrap {
    position: relative;
    background: linear-gradient(180deg, var(--cream), var(--cloud));
    border-radius: var(--radius-lg);
    border: 1px solid var(--mist);
    padding: .3rem;
    margin: 0 auto 1rem auto;     /* centre horizontally */
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    max-width: 780px;             /* contained — doesn't span full page width */
}
.postcode-scene {
    display: block;
    width: 100%;
    height: 320px;                /* fixed viewport height */
    border-radius: calc(var(--radius-lg) - 4px);
    cursor: grab;
    touch-action: none;           /* let our JS handle pan on touch */
    user-select: none;
}
.postcode-scene.dragging { cursor: grabbing; }
.postcode-scene .cottage { cursor: pointer; transition: filter .12s; }
.postcode-scene .cottage:hover { filter: brightness(1.05); }
.postcode-scene .cottage:hover polygon:first-of-type {
    stroke: var(--terracotta);
    stroke-width: .45;
}
.postcode-scene .cottage:focus { outline: none; }
.postcode-scene .cottage:focus polygon:first-of-type {
    stroke: var(--moss);
    stroke-width: .5;
}
.postcode-scene .cottage-unmatched { opacity: .55; cursor: default; }

.scene-hint {
    position: absolute;
    left: .7rem; bottom: .5rem;
    font-size: .68rem;
    color: var(--ink-soft);
    background: rgba(255,255,255,.78);
    padding: .15rem .55rem;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    letter-spacing: .01em;
    font-family: var(--font-mono);
}
.scene-reset {
    position: absolute;
    top: .5rem; right: .5rem;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: white;
    border: 1px solid rgba(45,49,66,.12);
    color: var(--ink);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform .15s, background .15s;
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1;
}
.scene-reset:hover { background: var(--cream); transform: rotate(-25deg); }

/* ── Popover that appears on cottage click ───────────────────────── */
.scene-popover {
    position: fixed;
    z-index: 80;
    background: white;
    border: 1px solid var(--mist);
    border-radius: 12px;
    box-shadow: var(--shadow-deep);
    padding: .9rem 1.05rem;
    min-width: 240px;
    max-width: 320px;
    font-size: .88rem;
    color: var(--ink);
    pointer-events: auto;
    animation: scenePopIn .15s ease-out;
}
@keyframes scenePopIn {
    from { opacity: 0; transform: translateY(4px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.scene-popover h4 {
    margin: 0 0 .25rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
}
.scene-popover .pop-meta { color: var(--ink-soft); font-size: .78rem; margin: 0 0 .55rem; }
.scene-popover .pop-row { display: flex; justify-content: space-between; margin: .15rem 0; font-size: .85rem; }
.scene-popover .pop-row .lbl { color: var(--ink-soft); }
.scene-popover .pop-row .val { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.scene-popover .pop-cta {
    display: block; margin-top: .65rem; padding: .45rem .8rem;
    background: var(--moss); color: white; border-radius: 8px;
    text-align: center; text-decoration: none; font-weight: 600; font-size: .85rem;
    box-shadow: 0 2px 0 var(--forest); transition: background .12s;
}
.scene-popover .pop-cta:hover { background: var(--forest); text-decoration: none; }
.scene-popover .pop-close {
    position: absolute; top: .35rem; right: .55rem;
    background: none; border: none; cursor: pointer;
    font-size: 1.05rem; color: var(--ink-soft); line-height: 1;
}
.scene-popover .pop-close:hover { color: var(--ink); }

/* ── Sales table ─────────────────────────────────────────────────── */
.sales-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    font-size: .9rem;
}
.sales-table thead tr { background: var(--cream); border-bottom: 2px solid var(--mist); }
.sales-table th {
    text-align: left; padding: .7rem .9rem;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--ink-soft); font-weight: 700;
}
.sales-table th.num { text-align: right; }
.sales-table td { padding: .65rem .9rem; border-bottom: 1px solid rgba(168,218,220,.3); }
.sales-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.sales-table td.price { color: var(--forest); font-weight: 700; }
.sales-table tbody tr:hover { background: rgba(168, 218, 220, .08); }

/* ── Compact (dense) house cards in street view supplement row ────── */
.house-row.dense {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .9rem;
    margin-top: .8rem;
}
.house-card.compact { padding: 1rem; margin-top: 22px; }
.house-card.compact::before { top: -16px; height: 22px; }
.house-card.compact::after  { top: -26px; right: 30px; width: 10px; height: 14px; }
.house-card.compact .paon { font-size: 1.3rem; }
.house-card.compact .street { font-size: .82rem; margin-bottom: .55rem; }
.house-card.compact .badges { margin-bottom: .55rem; gap: .3rem; }
.house-card.compact .price { font-size: 1.05rem; }

.postcode-sublabel {
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--ink-soft);
    font-weight: 600;
}
