/*
 * listing-page.css: the parts of one listing (index.html #finder-detail, src/listing-detail.js), on top of finder.css
 * (which places them in the finder's panel: .fd). Colours, fonts and sizes come from styles/tokens.css.
 */

.listing-price { font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 750; letter-spacing: -0.02em; }
.listing-badge { display: inline-block; margin-bottom: var(--space-2); padding: 2px var(--space-2); border-radius: 999px; background: var(--label-accent-bg); color: var(--label-accent-text); font-size: var(--text-xs); font-weight: 700; }
.lp-section + .lp-section { margin-top: clamp(2.5rem, 5vw, 4rem); }
.lp-section__title { margin-bottom: var(--space-4); font-family: var(--font-display); font-size: var(--site-text-h2); line-height: var(--leading-tight); letter-spacing: -0.025em; }

/* At a glance: tiles, two big ones first. */
.lp-glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-3); }
.lp-tile { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-tile); background: var(--sheet-raised); }
.lp-tile h3 { margin: 0; font-size: var(--text-sm); font-weight: 650; color: var(--ink-muted); }
.lp-tile p { margin: 0; }
.lp-tile__figure { font-family: var(--font-display); font-size: var(--text-figure); line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.lp-tile__figure small { margin-left: 0.2em; font-size: 0.4em; letter-spacing: 0; color: var(--ink-muted); }
.lp-tile__figure--small { font-size: var(--text-title); line-height: var(--leading-tight); letter-spacing: -0.02em; }
.lp-tile__aside { font-weight: 650; }
.lp-tile__text { margin-top: auto !important; padding-top: var(--space-2); font-size: var(--text-sm); color: var(--ink-muted); }
.lp-tile--area { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.lp-tile--area h3, .lp-tile--area .lp-tile__text, .lp-tile--area small { color: color-mix(in srgb, var(--sheet) 75%, transparent); }
.lp-tile[data-state="yes"] { box-shadow: inset 4px 0 0 var(--ok); }
.lp-tile[data-state="partly"] { box-shadow: inset 4px 0 0 var(--flag); }
.lp-tile--shape { grid-column: span 2; }
.lp-tile--shape .sketch { width: 100%; max-height: 16rem; }
@media (max-width: 40rem) { .lp-tile--shape { grid-column: auto; } }

/* The land in detail: label and answer side by side; a utility's answer has a dot (green on the land, pink in the street). */
.lp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0 var(--space-5); margin: 0; }
.lp-fact { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.lp-fact dt { color: var(--ink-muted); }
.lp-fact dd { margin: 0; font-weight: 650; text-align: right; }
.lp-fact[data-utility] dd::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: var(--space-2); border-radius: 50%; background: var(--line); vertical-align: 0.1em; }
.lp-fact[data-utility="land"] dd::before { background: var(--ok); }
.lp-fact[data-utility="street"] dd::before { background: var(--flag); }
.lp-section__sub { margin: var(--space-5) 0 var(--space-2); font-size: var(--text-base); font-weight: 700; }
.lp-terms { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.lp-terms li { padding: 4px var(--space-3); border: 1px solid var(--line); border-radius: 999px; font-size: var(--text-sm); font-weight: 600; }
.fd-head__was { color: var(--ink-muted); font-size: var(--text-sm); }

.lp-callout { margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-left: 4px solid var(--flag); border-radius: 0 var(--radius-control) var(--radius-control) 0; background: var(--sheet-raised); font-size: var(--text-sm); }

/* The plan sketch (src/sketch.js), as on the client pages (styles/sheet.css). */
.sketch { display: block; overflow: visible; }
.sketch__shape       { fill: var(--parcel-fill); stroke: var(--parcel-stroke); stroke-width: 2.25; stroke-linejoin: round; }
.sketch__dot         { fill: var(--ink); }
.sketch__corner      { font: 700 12px var(--font-body); fill: var(--ink); }
.sketch__length      { font: 500 12px var(--font-body); fill: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sketch__north       { stroke: var(--ink); stroke-width: 1.5; }
.sketch__arrowhead   { fill: var(--ink); }
.sketch__north-label { font: 700 11px var(--font-body); fill: var(--ink); }

/* How the land is used: one bar, then the figures. */
.lp-bar { display: flex; gap: 3px; height: 1.1rem; overflow: hidden; border-radius: 999px; background: var(--sheet-sunk); }
.lp-bar span { min-width: 6px; }
.lp-uses { display: grid; gap: var(--space-2); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.lp-uses li { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.lp-uses__dot { width: 0.85rem; height: 0.85rem; flex: none; border-radius: 50%; }
.lp-uses__name { font-weight: 600; }
.lp-uses__figure { margin-left: auto; font-size: var(--text-sm); color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* The photo from above. */
.lp-photo { margin: 0; padding: var(--inset-tile); border: 1px solid var(--line); border-radius: var(--radius-tile); background: var(--sheet-raised); }
.lp-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: var(--radius-shot); background: var(--sheet-sunk); }
.lp-photo__credit { padding: var(--space-2) var(--space-2) 0; font-size: var(--text-xs); color: var(--ink-muted); }

/* Lots. */
.lp-lots { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.lp-lot { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sheet); background: var(--sheet-raised); }
.lp-lot__name { font-weight: 700; }
.lp-lot__area { justify-self: end; font-variant-numeric: tabular-nums; font-weight: 600; }
.lp-lot__facts { font-size: var(--text-sm); color: var(--ink-muted); }
.lp-lot__show { justify-self: end; }
.lp-lot__sketch { grid-column: 1 / -1; width: 100%; max-width: 22rem; max-height: 12rem; margin-top: var(--space-2); }
.lp-lot__sketch:empty { display: none; }

/* The agency's words, as typed. */
.lp-text { max-width: 42rem; font-size: var(--text-lg); line-height: 1.6; }
.lp-text p { margin: 0 0 var(--space-3); white-space: pre-line; }

/* What to ask for: numbered, the number in the flag's pink. */
.lp-ask { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; counter-reset: ask; }
.lp-ask li { position: relative; display: grid; gap: 2px; padding: var(--space-4) var(--space-4) var(--space-4) 3.5rem; border: 1px solid var(--line); border-radius: var(--radius-sheet); background: var(--sheet-raised); counter-increment: ask; }
.lp-ask li::before { content: counter(ask); position: absolute; left: var(--space-4); top: var(--space-4); display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--label-accent-bg); color: var(--label-accent-text); font-size: var(--text-xs); font-weight: 700; }
.lp-ask span { font-size: var(--text-sm); color: var(--ink-muted); }

/* More from the agency. */
.lp-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.lp-more__link { display: grid; gap: 2px; height: 100%; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sheet); background: var(--sheet-raised); text-decoration: none; }
.lp-more__link:hover { border-color: var(--ink); }
.lp-more__price { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; }
.lp-more__facts { font-size: var(--text-sm); color: var(--ink-muted); }

.lp-small { display: grid; gap: var(--space-2); margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--ink-muted); }
.lp-small p { margin: 0; }

/* ------------------------------------------------------------------ The agency's card */
.lp-agency { display: grid; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-tile); background: var(--sheet-raised); box-shadow: var(--shadow-card); }
.lp-agency p { margin: 0; }
.lp-agency__eyebrow { font-size: var(--text-sm); font-weight: 650; color: var(--ink-muted); }
.agency-card__head { display: flex; align-items: center; gap: var(--space-3); }
.agency-card__logo { width: 52px; height: 52px; object-fit: contain; border-radius: var(--radius-control); background: var(--paper); }
.agency-card__name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; text-decoration: none; }
.agency-card__name:hover { background-color: var(--hover); box-shadow: 0 0 0 0.25em var(--hover); }
.lp-agency__actions { display: grid; gap: var(--space-2); }
.lp-agency__actions .finder-pill { justify-content: center; min-height: 2.75rem; overflow: hidden; text-overflow: ellipsis; }
.lp-agency__cui, .lp-agency__note { font-size: var(--text-xs); color: var(--ink-muted); }

/* On the market: since when, and each price it went public with (a lowered one in the flag's colour). */
.lp-history { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.lp-history li { display: flex; gap: var(--space-3); align-items: baseline; font-size: var(--text-sm); }
.lp-history li span { min-width: 7.5em; color: var(--ink-muted); }
.lp-history li[data-state="lowered"] strong { color: var(--flag); }

/* Paying with a loan: the currency, four numbers, the monthly payment big, then the fine print. */
.lp-calc__currency { max-width: 12rem; margin-bottom: var(--space-4); }
.lp-calc__inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: var(--space-3); }
.lp-calc__inputs > label { display: grid; gap: var(--space-1); font-size: var(--text-xs); color: var(--ink-muted); }
.lp-calc__inputs > label > input { height: 2.3rem; padding: 0 var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--sheet); font: inherit; font-size: var(--text-base); color: var(--ink); }
.lp-calc__inputs .finder-unit input { font-size: var(--text-base); color: var(--ink); }
.finder-page .lp-calc__inputs > label > input:focus-visible { outline: none; border-color: var(--ink); }
.lp-calc__inputs > label > input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.lp-calc__inputs > label > input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lp-calc__monthly { margin: var(--space-5) 0 var(--space-1); font-family: var(--font-display); font-size: var(--site-text-h2); font-weight: 700; letter-spacing: -0.02em; }
.lp-calc__lines { font-size: var(--text-sm); }
.lp-calc__note { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--ink-muted); }

/* What it costs to buy (src/costs.js): a line per cost, the total under them. */
.lp-costs__buyer { max-width: 16rem; margin-bottom: var(--space-4); }
.lp-costs__lines { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-4); margin: 0; font-size: var(--text-sm); }
.lp-costs__lines dt { color: var(--ink-muted); }
.lp-costs__lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.lp-costs__total { margin: var(--space-4) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--line); font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; }
.lp-costs__seller { margin-top: var(--space-3); font-size: var(--text-sm); }

/* "Getting around" in "Around the land" (src/transit-panel.js). */
.lp-transit { margin-top: var(--space-5); }
/* "Show how far you can go on the map": opens the bar over the finder's map (src/transit-bar.js). */
.lp-transit__show {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin: var(--space-3) 0; padding: var(--space-2) var(--space-4) var(--space-2) var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--sheet-raised); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.lp-transit__show:hover { background: var(--sheet-sunk); }
.lp-transit__show svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--reach-line); stroke-width: 2; }

/* The agent in charge (2026-11-04, AGENT_PROFILES=on): its round photo (or initials), name and title, its own contacts. */
.lp-agent { display: grid; gap: var(--space-2); padding-bottom: var(--space-3); margin-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.lp-agent__head { display: flex; align-items: center; gap: var(--space-3); }
.lp-agent__photo, .lp-agent__initials { width: 64px; height: 64px; border-radius: 50%; flex: none; background: var(--agent-face); object-fit: cover; }
.lp-agent__initials { display: grid; place-items: center; font-weight: 650; color: var(--ink-muted); }
.lp-agent__initials[hidden], .lp-agent__photo[hidden] { display: none; }
.lp-agent__who { display: grid; }
.lp-agent__title { font-size: var(--text-sm); color: var(--ink-muted); }
