/* ============================================================================
   House-prices cluster — editorial "Land Registry document" design language.
   Frosted-glass leaves floating over the site's sky; warm archival palette;
   IBM Plex Mono micro-labels, Source Serif 4 figures, gold/sage/amber accents.
   Scoped to .hp-doc. Shared by town / street / postcode pages.
   ============================================================================ */
.hp-doc {
    --ink: #1A1F1C; --ink-2: #43392B; --muted: #786C56; --faint: #A4977C;
    --paper: #FBF7EF; --line: #E3D9C4; --line-2: #D2C5A8;
    --gold: #C3A05F; --gold-ink: #8A7040; --gold-deep: #6E5A30;
    --sage: #4E7853; --sage-soft: #E6EEE3; --amber: #B5742A; --amber-soft: #F4E9D8;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "IBM Plex Sans", "Outfit", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
    font-family: var(--sans);
    color: var(--ink-2);
    padding-top: 96px;            /* clear the floating fixed nav */
    padding-bottom: 4rem;
    text-align: left;             /* editorial left rail — override any inherited centering */
    -webkit-font-smoothing: antialiased;
}
@media (max-width: 768px) { .hp-doc { padding-top: 80px; } }

.hp-wrap { max-width: 1024px; margin: 0 auto; padding: 0 1.6rem; }

/* Breadcrumb: the shared styles are white (for dark pages) — recolour for the light sky bg. */
.hp-doc .breadcrumb-list li { color: var(--muted); }
.hp-doc .breadcrumb-list li a { color: var(--muted); }
.hp-doc .breadcrumb-list li a:hover { color: var(--gold-ink); }
.hp-doc .breadcrumb-list li:not(:last-child)::after { color: var(--faint); }
.hp-doc .breadcrumb-list li[aria-current="page"] { color: var(--ink-2); font-weight: 500; }

/* ---- Typographic primitives ---- */
.hp-eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); display: inline-flex; align-items: center; gap: 9px; }
.hp-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(195,160,95,.22); }
.hp-doc h1, .hp-doc h2, .hp-doc h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.08; color: var(--ink); margin: 0; }
.hp-h1 { font-size: clamp(36px, 5.4vw, 58px); margin: .55rem 0 .35rem; }
.hp-sub { font-family: var(--mono); font-size: 12px; letter-spacing: .05em; color: var(--muted); }
.hp-sub .hp-src { font-size: 11px; }
.hp-num { font-family: var(--serif); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hp-k { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hp-src { font-family: var(--mono); font-size: 10px; letter-spacing: .03em; color: var(--gold-ink); white-space: nowrap; }
.hp-src::before { content: "\21B3"; color: var(--faint); margin-right: 5px; }
.hp-lead { font-size: 1.06rem; line-height: 1.72; color: var(--ink-2); max-width: 64ch; }
.hp-lead b { color: var(--ink); font-weight: 600; }

/* ---- Frosted glass module (floats over the sky with a soft luminous edge) ---- */
.hp-mod {
    position: relative;
    background: linear-gradient(180deg, rgba(252,249,242,0.74) 0%, rgba(249,244,234,0.66) 100%);
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 22px 60px -38px rgba(50, 34, 8, 0.45),
        0 0 60px 14px rgba(255, 250, 240, 0.40);   /* soft "bleeding" halo into the sky */
    padding: 1.7rem 1.9rem;
}
.hp-mod + .hp-mod, .hp-section-gap { margin-top: 1.5rem; }

/* section header: serif title + hairline rule extending to the source tag */
.hp-mod-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.15rem; }
.hp-mod-head h2 { font-size: 1.3rem; flex: none; }
.hp-mod-head::before { content: ""; flex: 1; height: 1px; align-self: center; margin: 0 .25rem; background: linear-gradient(90deg, var(--line-2), transparent); }
.hp-mod-head .hp-src { flex: none; }

/* ---- Headline stat cards ---- */
.hp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.hp-stat { position: relative; background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(210, 197, 168, 0.55); border-radius: 11px; padding: 1.05rem 1.2rem; overflow: hidden; }
.hp-stat::before { content: ""; position: absolute; top: 0; left: 0; width: 34px; height: 2px; background: var(--gold); }
.hp-stat .hp-k { display: block; margin-bottom: .45rem; }
.hp-stat .v { font-family: var(--serif); font-weight: 600; font-size: 1.95rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hp-stat .v.up { color: var(--sage); }
.hp-stat .v.down { color: var(--amber); }

/* ---- Comparative bars (type premium) — pure CSS, fill is display:block ---- */
.hp-bars { display: grid; gap: .8rem; }
.hp-bar-row { display: grid; grid-template-columns: minmax(118px, 158px) 1fr minmax(132px, auto); align-items: center; gap: 1rem; }
.hp-bar-row .lbl { font-size: .94rem; color: var(--ink-2); line-height: 1.25; }
.hp-bar-row .lbl .ct { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-left: .35em; }
.hp-bar-track { display: block; height: 26px; background: rgba(120, 108, 86, 0.09); border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(210, 197, 168, 0.45); }
.hp-bar-fill { display: block; height: 100%; min-width: 6px; border-radius: 6px;
    background: linear-gradient(90deg, #C9A968 0%, #9A7C3F 55%, #6E5A30 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(80, 60, 20, 0.2);
    transform-origin: left; animation: hpGrow .9s cubic-bezier(.2,.75,.2,1) both; }
.hp-bar-row .amt { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; display: flex; align-items: baseline; justify-content: flex-end; gap: .5rem; }
.hp-prem { font-family: var(--mono); font-size: 10px; font-weight: 500; padding: .12rem .42rem; border-radius: 5px; letter-spacing: .01em; }
.hp-prem.up { color: var(--sage); background: var(--sage-soft); }
.hp-prem.down { color: var(--amber); background: var(--amber-soft); }

/* ---- Growth trajectory (inline SVG) ---- */
.hp-growth-svg { width: 100%; height: auto; display: block; overflow: visible; }
.hp-growth-svg .area { fill: url(#hpGrowthGrad); }
.hp-growth-svg .line { fill: none; stroke: var(--gold-ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.hp-growth-svg .pt { fill: var(--gold-ink); }
.hp-growth-svg .pt-now { fill: var(--gold); stroke: #fff; stroke-width: 2.5; }
.hp-growth-svg text { font-family: var(--mono); fill: var(--muted); font-size: 10px; letter-spacing: .04em; }
.hp-growth-svg .val { fill: var(--ink); font-family: var(--serif); font-size: 12.5px; font-weight: 600; }

/* ---- Street cards (frosted + hover lift) ---- */
.hp-streets { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: .75rem; }
.hp-street { display: block; text-decoration: none; padding: .85rem 1.05rem; background: rgba(255, 255, 255, 0.48); border: 1px solid rgba(210, 197, 168, 0.5); border-radius: 11px; transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s, border-color .2s, background .2s; }
.hp-street .nm { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 1.04rem; }
.hp-street .meta { font-family: var(--mono); font-size: 10px; letter-spacing: .02em; color: var(--muted); margin-top: .25rem; }
.hp-street .meta b { color: var(--gold-ink); font-weight: 600; transition: color .2s; }
.hp-street:hover { transform: translateY(-3px); border-color: var(--gold); background: rgba(255, 255, 255, 0.72); box-shadow: 0 18px 38px -22px rgba(110, 90, 48, 0.55); }
.hp-street:hover .meta b { color: var(--gold-deep); }

/* ---- Chips / dark CTA ---- */
.hp-chip { display: inline-block; padding: .42rem .95rem; border-radius: 30px; text-decoration: none; font-size: .9rem; background: rgba(252, 249, 242, 0.72); border: 1px solid rgba(210, 197, 168, 0.55); color: var(--ink-2); transition: border-color .2s, color .2s, transform .2s; }
.hp-chip:hover { border-color: var(--gold); color: var(--ink); transform: translateY(-2px); }
.hp-cta { background: linear-gradient(165deg, rgba(28,33,29,0.93), rgba(20,24,21,0.9)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(195,160,95,0.25); border-radius: 16px; padding: 1.9rem 2rem; color: #F5F3F0; box-shadow: 0 24px 60px -40px rgba(0,0,0,.6); }
.hp-cta h2 { color: #fff; margin: 0 0 .5rem; }
.hp-cta p { color: #C8CFC9; line-height: 1.65; margin: 0 0 1.2rem; max-width: 56ch; }
.hp-btn { display: inline-block; padding: .68rem 1.35rem; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: .94rem; transition: background .2s, transform .2s; }
.hp-btn-gold { background: var(--gold); color: var(--ink); }
.hp-btn-gold:hover { background: #D4B270; transform: translateY(-1px); }
.hp-btn-ghost { border: 1.5px solid rgba(195,160,95,.6); color: #fff; }
.hp-btn-ghost:hover { border-color: var(--gold); }

.hp-foot { font-family: var(--mono); font-size: 10px; line-height: 1.7; letter-spacing: .02em; color: rgba(245, 243, 240, 0.92); margin-top: 2.2rem; text-shadow: 0 1px 10px rgba(26, 31, 28, 0.45); max-width: 70ch; }

/* ---- Orchestrated entrance (one staggered reveal) ---- */
.hp-rise { opacity: 0; transform: translateY(16px); animation: hpRise .75s cubic-bezier(.2,.7,.2,1) forwards; }
.hp-rise:nth-of-type(1) { animation-delay: .04s; }
.hp-rise:nth-of-type(2) { animation-delay: .12s; }
.hp-rise:nth-of-type(3) { animation-delay: .20s; }
.hp-rise:nth-of-type(4) { animation-delay: .28s; }
.hp-rise:nth-of-type(5) { animation-delay: .36s; }
.hp-rise:nth-of-type(6) { animation-delay: .44s; }
@keyframes hpRise { to { opacity: 1; transform: none; } }
@keyframes hpGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
    .hp-rise { opacity: 1; transform: none; animation: none; }
    .hp-bar-fill { animation: none; }
}

@media (max-width: 560px) {
    .hp-bar-row { grid-template-columns: 1fr auto; gap: .35rem .8rem; }
    .hp-bar-row .hp-bar-track { grid-column: 1 / -1; order: 3; }
    .hp-mod { padding: 1.25rem 1.25rem; }
    .hp-h1 { font-size: 34px; }
}

/* ============================ Sold-price explorer ============================ */
/* Interactive controls/charts are hidden until JS upgrades the table (SEO-safe). */
.hp-xp-bar, .hp-xp-ranges, .hp-xp-summary, .hp-xp-charts { display: none; }
.hp-js .hp-xp-bar { display: flex; flex-wrap: wrap; gap: .7rem 1.3rem; align-items: center; }
.hp-js .hp-xp-ranges { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-top: .85rem; }
.hp-js .hp-xp-summary { display: block; }
.hp-js .hp-xp-charts { display: grid; gap: 1.1rem; }

.hp-xp-group { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.hp-xp-chip { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; padding: .32rem .72rem; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.5); color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s, opacity .15s; }
.hp-xp-chip:hover { border-color: var(--gold); }
.hp-xp-chip.on, .hp-xp-chip:not(.off)[aria-pressed="true"] { background: var(--gold-ink); color: #FBF7EF; border-color: var(--gold-ink); }
.hp-xp-chip.off { opacity: .55; }
.hp-xp-reset { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: none; border: none; border-bottom: 1px solid var(--line-2); cursor: pointer; padding: 0 0 1px; }
.hp-xp-reset:hover { color: var(--gold-deep); border-color: var(--gold); }

.hp-xp-range { display: inline-flex; align-items: center; gap: .55rem; }
.hp-xp-range .hp-k { min-width: 64px; color: var(--ink-2); }
.hp-xp-range input[type=range] { accent-color: var(--gold-ink); width: 108px; }

.hp-xp-summary { font-size: .96rem; color: var(--ink-2); margin: 1.1rem 0 .3rem; }
.hp-xp-summary b { color: var(--ink); font-family: var(--serif); font-variant-numeric: tabular-nums; }

.hp-xp-fig { margin: 0; }
.hp-xp-fig figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-bottom: .35rem; }
.hp-xp-plot { position: relative; }
.hp-xp-plot svg { width: 100%; height: auto; display: block; }
.hp-xp-grid { stroke: rgba(120, 108, 86, .14); stroke-width: 1; }
.hp-xp-axt { font-family: var(--mono); font-size: 9px; fill: var(--muted); }
.hp-xp-dot { fill-opacity: .8; cursor: pointer; transition: fill-opacity .12s; }
.hp-xp-dot:hover { fill-opacity: 1; stroke: #1A1F1C; stroke-width: 1.4; }
.hp-xp-hbar { fill: var(--gold); cursor: pointer; transition: fill .15s, opacity .15s; }
.hp-xp-hbar:hover { fill: var(--gold-deep); }
.hp-xp-hbar.off { fill: var(--line-2); opacity: .55; }
.hp-xp-tip { position: absolute; transform: translate(-50%, -135%); background: var(--ink); color: #FBF7EF; font-family: var(--mono); font-size: 10.5px; padding: .4rem .6rem; border-radius: 6px; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .55); z-index: 5; }
.hp-xp-legend { display: inline-flex; flex-wrap: wrap; gap: .55rem; }
.hp-xp-lg { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--mono); font-size: 9px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.hp-xp-lg i { width: 9px; height: 9px; border-radius: 2px; }

.hp-xp-tabletools { display: none; }
.hp-js .hp-xp-tabletools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.3rem 0 .5rem; }
.hp-xp-search { flex: 1; min-width: 220px; font-family: var(--sans); font-size: .95rem; padding: .55rem .9rem .55rem 2.1rem; border: 1px solid var(--line-2); border-radius: 9px; background: rgba(255, 255, 255, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23786C56' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat .75rem center; color: var(--ink); }
.hp-xp-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(195, 160, 95, .18); }
.hp-xp-count { font-family: var(--mono); font-size: 11px; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }

/* Embedded scrollable list — fixed height with a sticky header, so a 1,000-row street
   doesn't run down the page; users scroll/search within the card instead. */
.hp-xp-tablewrap { overflow: auto; max-height: 460px; margin-top: .3rem; border: 1px solid rgba(210, 197, 168, 0.5); border-radius: 12px; background: rgba(255, 255, 255, 0.32); -webkit-overflow-scrolling: touch; }
.hp-xp-tablewrap .hp-table { margin: 0; }
.hp-xp-tablewrap .hp-table th { position: sticky; top: 0; z-index: 2; background: rgba(251, 247, 239, 0.97); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: .65rem .95rem; }
.hp-xp-tablewrap .hp-table td { padding: .55rem .95rem; }
.hp-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.hp-table th.sortable:hover { color: var(--gold-ink); }
.hp-table th.sortable[data-dir="asc"]::after { content: " \2191"; color: var(--gold-ink); }
.hp-table th.sortable[data-dir="desc"]::after { content: " \2193"; color: var(--gold-ink); }

@media (min-width: 760px) { .hp-js .hp-xp-charts { grid-template-columns: 1fr; } }
