/* Family Residence: shared public components. Needs tokens.css first. Spec: design/DESIGN.md. Examples: styleguide.html */

/* ---------- surfaces ---------- */
:root, .on-felt {
  --bg: var(--felt-200); --bg-raised: var(--felt-050); --bg-sunk: var(--felt-300);
  --text: var(--ink-900); --text-quiet: var(--ink-600);
  --accent: var(--gold-ink); --accent-fill: var(--ochre-500); --accent-on: var(--espresso-900);
  --line: rgba(74, 46, 28, .2); --line-strong: #8A7563; --focus: var(--brick-700);
  --st-ok: var(--ok-ink); --st-hold: var(--hold-ink); --st-sold: var(--sold-ink); --st-ask: var(--ask-ink); --st-err: var(--err-ink);
  --tint-ok: var(--ok-tint); --tint-hold: var(--hold-tint); --tint-sold: var(--sold-tint); --tint-ask: var(--ask-tint); --tint-err: var(--err-tint);
  --chart-1: var(--brick-600); --chart-2: var(--ochre-600); --chart-3: #4F7263; --chart-4: var(--ask-ink);
}
.on-stone { --bg: var(--felt-050); --bg-raised: #fff; --bg-sunk: var(--felt-100); --line: rgba(74, 46, 28, .17); }
.on-espresso {
  --bg: var(--espresso-900); --bg-raised: var(--espresso-800); --bg-sunk: var(--espresso-950);
  --text: var(--cream-100); --text-quiet: var(--cream-300);
  --accent: var(--ochre-500); --accent-fill: var(--ochre-500); --accent-on: var(--espresso-900);
  --line: rgba(247, 239, 226, .17); --line-strong: #94836F; --focus: var(--ochre-300);
  --st-ok: var(--ok-lamp); --st-hold: var(--hold-lamp); --st-sold: var(--sold-lamp); --st-ask: var(--ask-lamp); --st-err: var(--err-lamp);
  --tint-ok: rgba(167, 208, 164, .13); --tint-hold: rgba(240, 198, 112, .13); --tint-sold: rgba(189, 176, 165, .13); --tint-ask: rgba(174, 202, 220, .13); --tint-err: rgba(244, 169, 149, .13);
  --chart-1: var(--ochre-500); --chart-2: var(--brick-400); --chart-3: var(--ok-lamp); --chart-4: var(--ask-lamp);
  color-scheme: dark;
}
.on-brick {
  --bg: var(--brick-700); --bg-raised: var(--brick-800); --bg-sunk: var(--brick-800);
  --text: var(--cream-100); --text-quiet: #E6D6C2;
  --accent: var(--ochre-300); --accent-fill: var(--ochre-500); --accent-on: var(--espresso-900);
  --line: rgba(247, 239, 226, .26); --line-strong: #D8BFA8; --focus: var(--ochre-300);
}
.on-ochre {
  --bg: var(--ochre-500); --bg-raised: var(--ochre-300); --bg-sunk: var(--ochre-600);
  --text: var(--espresso-900); --text-quiet: #3F2A16;
  --accent: var(--brick-800); --accent-fill: var(--espresso-900); --accent-on: var(--cream-100);
  --line: rgba(30, 19, 14, .28); --line-strong: #3F2A16; --focus: var(--espresso-900);
}
.on-felt, .on-stone, .on-espresso, .on-brick, .on-ochre { background-color: var(--bg); color: var(--text); }
.on-felt { background-image: var(--grain); background-size: 220px; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
html:has(.site-menu[open]) { overflow: hidden; }
body { margin: 0; min-height: 100vh; min-height: 100svh; background-color: var(--bg); background-image: var(--grain); background-size: 220px; color: var(--text); font-family: var(--font-text); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 400; font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-wrap: break-word; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset, blockquote { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-weight: 400; font-size: inherit; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
hr { border: 0; margin: 0; }
b, strong { font-weight: 600; }
p, li, dd { text-wrap: pretty; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-1); }
::selection { background: var(--ochre-500); color: var(--espresso-900); }

.skip-link { position: fixed; z-index: 200; top: 8px; left: 8px; padding: 12px 18px; background: var(--ochre-500); color: var(--espresso-900); font-weight: 600; text-decoration: none; transform: translateY(-200%); transition: transform var(--t-fast); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.print-only { display: none !important; }

/* ---------- type ---------- */
.display-1, .display-2, .h1, .h2 { font-family: var(--font-display); font-weight: 400; text-wrap: balance; letter-spacing: -.005em; }
.display-1 { font-size: var(--fs-display-1); line-height: var(--lh-tight); }
.display-2 { font-size: var(--fs-display-2); line-height: 1.1; }
.h1 { font-size: var(--fs-h1); line-height: var(--lh-head); }
.h2 { font-size: var(--fs-h2); line-height: 1.2; }
.h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; text-wrap: balance; }
.lede { font-size: var(--fs-lede); line-height: 1.55; color: var(--text); max-width: 52ch; }
.small { font-size: var(--fs-small); line-height: 1.5; color: var(--text-quiet); }
.label { font-size: var(--fs-label); line-height: 1.35; font-weight: 600; color: var(--text-quiet); letter-spacing: .01em; }
.eyebrow { font-size: var(--fs-small); line-height: 1.35; font-weight: 600; color: var(--accent); }
.num { font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }
.quiet { color: var(--text-quiet); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--page-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(46rem + 2 * var(--gutter)); }
.section { padding-block: var(--section); }
.section--tight { padding-block: var(--s-8); }
.stack { display: flex; flex-direction: column; gap: var(--stack, var(--s-5)); }
.stack > * { min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.cols { display: grid; gap: var(--s-6) var(--s-7); }
.cols > * { min-width: 0; }
@media (min-width: 640px) { .cols--2, .cols--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols--split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 16px; height: 16px; }

/* ---------- stitch, the felt line ---------- */
.stitch { height: 2px; color: var(--line-strong); opacity: .55; background: repeating-linear-gradient(90deg, currentColor 0 var(--stitch-dash), transparent var(--stitch-dash) calc(var(--stitch-dash) + var(--stitch-gap))); }
.stitch--strong { opacity: 1; color: var(--accent); }
.u-stitch { padding-bottom: .06em; background: repeating-linear-gradient(90deg, var(--accent-fill) 0 .28em, transparent .28em .44em) 0 100% / 100% .055em no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- floor rule, the ochre strip ---------- */
.floor-rule { --rule-bg: var(--ochre-500); background: var(--rule-bg); color: var(--espresso-900); display: flex; flex-direction: column; }
.floor-rule__title { flex: none; padding: var(--s-3) 0 var(--s-2); text-align: center; font-size: var(--fs-label); font-weight: 600; line-height: 1.2; }
.floor-rule__list { flex: 1; display: grid; grid-auto-rows: 1fr; }
.floor-rule__link { position: relative; display: flex; align-items: center; justify-content: center; min-height: 28px; height: 100%; font-size: .875rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; text-decoration: none; border-top: 1px solid rgba(30, 19, 14, .22); transition: background var(--t-fast), color var(--t-fast); }
a.floor-rule__link:hover, a.floor-rule__link:focus-visible { background: var(--espresso-900); color: var(--ochre-500); outline-offset: -3px; }
a.floor-rule__link::after { content: attr(data-tip); position: absolute; left: 100%; top: 50%; transform: translateY(-50%); padding: 6px 12px; background: var(--espresso-900); color: var(--cream-100); font-size: var(--fs-label); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--t-fast); z-index: 3; }
a.floor-rule__link:hover::after, a.floor-rule__link:focus-visible::after { opacity: 1; }
.floor-rule__link.is-off { color: rgba(30, 19, 14, .78); font-weight: 400; }
@media (max-width: 899.98px) {
  .floor-rule { flex-direction: row; align-items: stretch; }
  .floor-rule__title { display: flex; align-items: center; padding: 0 var(--s-3) 0 var(--gutter); background: var(--ochre-500); }
  .floor-rule__list { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .floor-rule__list::-webkit-scrollbar { display: none; }
  .floor-rule__list li { flex: none; scroll-snap-align: start; }
  .floor-rule__link { width: var(--tap); height: var(--tap); border-top: 0; border-left: 1px solid rgba(30, 19, 14, .22); }
  a.floor-rule__link::after { display: none; }
}

/* ---------- title block, from the corner of a drawing ---------- */
.titleblock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.titleblock__cell { padding: var(--s-3) var(--s-4) var(--s-4) 0; border-bottom: 1px solid var(--line); min-width: 0; }
.titleblock__cell:nth-child(2n) { padding-left: var(--s-4); border-left: 1px solid var(--line); padding-right: 0; }
.titleblock__label { font-size: var(--fs-label); font-weight: 600; line-height: 1.35; color: var(--text-quiet); }
.titleblock__value { margin-top: 2px; font-family: var(--font-display); font-size: clamp(1.5rem, 1.3rem + .7vw, 1.875rem); line-height: 1.2; }
.titleblock__value--text { font-family: var(--font-text); font-size: var(--fs-body); line-height: 1.4; font-weight: 600; }
.titleblock__cell--wide { grid-column: 1 / -1; padding-left: 0 !important; border-left: 0 !important; }
@media (min-width: 900px) {
  .titleblock { grid-template-columns: repeat(var(--cells, 5), minmax(0, 1fr)); border-bottom: 1px solid var(--line-strong); }
  .titleblock__cell, .titleblock__cell:nth-child(2n) { padding: var(--s-3) var(--s-4) var(--s-4); border-bottom: 0; border-left: 1px solid var(--line); }
  .titleblock__cell:first-child { border-left: 0; padding-left: 0; }
  .titleblock__cell--wide { grid-column: auto; padding-left: var(--s-4) !important; border-left: 1px solid var(--line) !important; }
}

/* ---------- dimension line ---------- */
.dim { display: grid; gap: var(--s-1); color: var(--text); }
.dim__value { font-size: var(--fs-small); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.dim::after { content: ""; display: block; width: calc(var(--dim, 1) * 100%); min-width: 72px; height: 9px; border-inline: 1px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }

/* ---------- sun arc ---------- */
.sun-arc { color: var(--accent); }
.sun-arc svg { width: 100%; height: auto; overflow: visible; }
.sun-arc__path { fill: none; stroke: currentColor; stroke-width: 1.25; }
.sun-arc__ticks { fill: none; stroke: currentColor; stroke-width: 1.25; opacity: .7; }
.sun-arc__horizon { stroke: currentColor; stroke-width: 1; opacity: .35; stroke-dasharray: 11 7; }
.sun-arc__sun { fill: var(--ochre-500); }

/* ---------- figure and the honest render note ---------- */
.figure { position: relative; overflow: hidden; background: var(--bg-sunk); }
.figure__img { width: 100%; height: 100%; object-fit: cover; }
.render-note { position: absolute; right: 0; bottom: 0; padding: 3px 10px 4px; background: var(--espresso-900); color: var(--cream-100); font-size: var(--fs-label); font-weight: 400; line-height: 1.4; z-index: 2; }
.owner-blank { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; padding: 3px 10px; border: 1px dashed var(--line-strong); color: var(--text-quiet); font-size: var(--fs-small); background: transparent; }
.owner-blank::before { content: "Эзэмшигч бөглөнө:"; font-weight: 600; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--bg); color: var(--text); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: var(--s-5); min-height: var(--header-h); max-width: calc(var(--page-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); min-height: var(--tap); text-decoration: none; flex: none; }
.brand__mark { width: 46px; height: auto; }
.brand__text { display: grid; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-size: 1.375rem; white-space: nowrap; }
.brand__sub { font-size: var(--fs-label); color: var(--text-quiet); }
.site-nav { display: none; margin-left: auto; }
.site-nav__link { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 12px; font-size: var(--fs-small); text-decoration: none; position: relative; white-space: nowrap; }
.site-nav__link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; background: var(--accent-fill); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease-out); }
.site-nav__link:hover::after, .site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { font-weight: 600; }
.site-header__tools { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.site-nav + .site-header__tools { margin-left: 0; }
.saved-link { position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); text-decoration: none; }
.saved-link:hover { color: var(--accent); }
.saved-link__count { position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding-inline: 4px; display: grid; place-items: center; background: var(--accent-fill); color: var(--accent-on); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.site-header .site-header__call { display: none; }
@media (min-width: 640px) { .site-header .site-header__call { display: inline-flex; } }
@media (min-width: 1180px) { .site-nav { display: flex; } }
@media (max-width: 639.98px) { :root { --header-h: 64px; } .brand__mark { width: 38px; } .brand__name { font-size: 1.1875rem; } .site-header__inner { gap: var(--s-3); } }

/* phone menu: <details>, works with no script */
.site-menu > summary { list-style: none; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu__toggle { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); min-width: var(--tap); padding-inline: 10px; font-size: var(--fs-small); font-weight: 600; cursor: pointer; user-select: none; -webkit-user-select: none; }
.site-menu__bars { position: relative; width: 22px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; transition: height var(--t-fast); }
.site-menu[open] .site-menu__bars { height: 2px; border-bottom: 0; }
.site-menu__word--close, .site-menu[open] .site-menu__word--open { display: none; }
.site-menu[open] .site-menu__word--close { display: inline; }
.site-menu__panel { position: fixed; z-index: 59; left: 0; right: 0; top: var(--header-h); bottom: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--s-5) var(--gutter) calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--s-6); align-content: start; border-top: 1px solid var(--line); animation: menu-in var(--t-med) var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.site-menu__group { display: grid; gap: 0; }
.site-menu__title { font-size: var(--fs-label); font-weight: 600; color: var(--text-quiet); padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); }
.site-menu__link { display: flex; align-items: center; justify-content: space-between; min-height: 54px; font-family: var(--font-display); font-size: 1.625rem; line-height: 1.2; text-decoration: none; border-bottom: 1px solid var(--line); }
.site-menu__link:hover { color: var(--accent); }
.site-menu__link[aria-current="page"] { color: var(--accent); }
.site-menu__call { display: grid; gap: var(--s-1); align-content: start; }
.site-menu__phone { display: inline-flex; align-items: center; min-height: var(--tap); font-size: 1.375rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; text-decoration: none; }
@media (min-width: 900px) {
  .site-menu__panel { bottom: auto; max-height: calc(100vh - var(--header-h)); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-7); padding: var(--s-7) max(var(--gutter), calc((100vw - var(--page-max)) / 2)) var(--s-8); box-shadow: 0 30px 60px rgba(20, 12, 8, .35); }
}

/* phone action bar */
.action-bar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1.5fr; background: var(--espresso-900); padding-bottom: env(safe-area-inset-bottom, 0px); border-top: 1px solid var(--espresso-700); }
.action-bar__item { display: flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 54px; font-size: var(--fs-small); font-weight: 600; text-decoration: none; color: var(--cream-100); }
.action-bar__item--primary { background: var(--ochre-500); color: var(--espresso-900); }
.has-action-bar { padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { .action-bar { display: none; } .has-action-bar { padding-bottom: 0; } }

/* footer */
.site-footer { padding-block: var(--s-8) var(--s-6); }
.site-footer__grid { display: grid; gap: var(--s-6) var(--s-7); }
.site-footer__brand { display: grid; gap: var(--s-4); justify-items: start; }
.site-footer__title { font-size: var(--fs-label); font-weight: 600; color: var(--text-quiet); margin-bottom: var(--s-2); }
.site-footer__link { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--fs-small); text-decoration: none; }
.site-footer__link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__phone { display: inline-flex; align-items: center; min-height: var(--tap); font-family: var(--font-display); font-size: 1.75rem; font-variant-numeric: lining-nums; text-decoration: none; }
.site-footer__phone:hover { color: var(--accent); }
.site-footer__legal { margin-top: var(--s-7); padding-top: var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); justify-content: space-between; font-size: var(--fs-small); color: var(--text-quiet); border-top: 1px solid var(--line); }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .site-footer__brand { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .site-footer__grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } .site-footer__brand { grid-column: auto; } }

/* breadcrumbs */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s-2); font-size: var(--fs-small); color: var(--text-quiet); }
.crumbs li { display: flex; align-items: center; gap: var(--s-2); }
.crumbs li + li::before { content: ""; width: 12px; height: 1px; background: var(--line-strong); }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- buttons and links ---------- */
.btn { --btn-bg: transparent; --btn-fg: var(--text); --btn-line: transparent; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3); min-height: 48px; padding: 10px 22px; background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-line); border-radius: var(--r-1); font-family: var(--font-text); font-size: 1rem; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.btn .ico { transition: transform var(--t-med) var(--ease-out); }
.btn:hover .ico--go { transform: translateX(4px); }
.btn--primary { --btn-bg: var(--accent-fill); --btn-fg: var(--accent-on); }
.btn--primary:hover { --btn-bg: var(--ochre-300); }
.on-ochre .btn--primary:hover { --btn-bg: var(--espresso-700); }
.btn--dark { --btn-bg: var(--espresso-900); --btn-fg: var(--cream-100); }
.btn--dark:hover { --btn-bg: var(--brick-700); }
.on-espresso .btn--dark { --btn-bg: var(--cream-100); --btn-fg: var(--espresso-900); }
.on-espresso .btn--dark:hover { --btn-bg: var(--ochre-300); }
.btn--line { --btn-line: var(--line-strong); }
.btn--line:hover { --btn-bg: var(--text); --btn-fg: var(--bg); --btn-line: var(--text); }
.btn--quiet { --btn-fg: var(--text); padding-inline: 12px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.btn--quiet:hover { color: var(--accent); }
.btn--sm { min-height: var(--tap); padding: 8px 16px; font-size: var(--fs-small); }
.btn--lg { min-height: 56px; padding: 12px 28px; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }
.btn--icon { width: var(--tap); min-height: var(--tap); padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { --btn-bg: var(--bg-sunk); --btn-fg: var(--text-quiet); --btn-line: transparent; cursor: not-allowed; }
.btn.is-loading { pointer-events: none; color: transparent; position: relative; }
.btn.is-loading .ico { opacity: 0; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--btn-fg); border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color var(--t-fast); }
.link:hover { color: var(--accent); text-decoration-color: currentColor; }
.link--arrow { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); font-weight: 600; text-decoration: none; }
.link--arrow .ico { transition: transform var(--t-med) var(--ease-out); }
.link--arrow:hover .ico { transform: translateX(4px); }

/* segmented choice */
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; }
.seg__item { position: relative; display: inline-flex; }
.seg__item input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg__item span { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); padding: 6px 16px; border: 1px solid var(--line-strong); margin-left: -1px; font-size: var(--fs-small); font-weight: 600; background: var(--bg-raised); transition: background var(--t-fast), color var(--t-fast); }
.seg__item:first-child span { margin-left: 0; }
.seg__item input:hover + span { background: var(--bg-sunk); }
.seg__item input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg__item input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; position: relative; z-index: 1; }

/* tabs */
.tabs__list { display: flex; gap: var(--s-5); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-strong); }
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab { flex: none; min-height: var(--tap); min-width: var(--tap); padding: 10px 2px; font-size: 1rem; color: var(--text-quiet); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color var(--t-fast); }
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent-fill); }
.tabs__panel { padding-top: var(--s-5); }

/* ---------- forms ---------- */
.field { display: grid; gap: var(--s-2); min-width: 0; align-content: start; }
.field__label { font-size: var(--fs-small); font-weight: 600; line-height: 1.35; }
.field__label small { font-size: inherit; font-weight: 400; color: var(--text-quiet); }
.field__hint { font-size: var(--fs-small); line-height: 1.45; color: var(--text-quiet); }
.field__error { display: none; font-size: var(--fs-small); line-height: 1.45; font-weight: 600; color: var(--st-err); }
.field--error .field__error { display: flex; gap: var(--s-2); }
.field__error::before { content: ""; flex: none; width: 3px; background: currentColor; }
.input, .select, .textarea { display: block; width: 100%; min-height: 48px; padding: 11px 14px; background: var(--bg-raised); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-1); font-size: 1.0625rem; line-height: 1.4; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.textarea { min-height: 128px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 42px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%, currentColor calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(-45deg, transparent 50%, currentColor 50%, currentColor calc(50% + 1px), transparent calc(50% + 1px)); background-position: calc(100% - 21px) 50%, calc(100% - 15px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.input::placeholder, .textarea::placeholder { color: var(--text-quiet); opacity: .85; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.input[disabled], .select[disabled], .textarea[disabled] { background: var(--bg-sunk); color: var(--text-quiet); cursor: not-allowed; }
.field--error .input, .field--error .select, .field--error .textarea { border-color: var(--st-err); box-shadow: inset 3px 0 0 var(--st-err); }
.form-row { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.range { display: grid; gap: var(--s-2); }
.range__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.range__value { font-family: var(--font-display); font-size: 1.625rem; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.range__input { --p: 50%; appearance: none; -webkit-appearance: none; width: 100%; height: var(--tap); margin: 0; background: transparent; cursor: pointer; }
.range__input::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, var(--accent-fill) var(--p), var(--line-strong) var(--p)); }
.range__input::-moz-range-track { height: 4px; background: var(--line-strong); }
.range__input::-moz-range-progress { height: 4px; background: var(--accent-fill); }
.range__input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 32px; margin-top: -14px; background: var(--espresso-900); border: 2px solid var(--ochre-500); border-radius: var(--r-1); }
.range__input::-moz-range-thumb { width: 12px; height: 28px; background: var(--espresso-900); border: 2px solid var(--ochre-500); border-radius: var(--r-1); }
.range__scale { display: flex; justify-content: space-between; font-size: var(--fs-label); color: var(--text-quiet); font-variant-numeric: tabular-nums; }

.check { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--tap); padding-block: 10px; cursor: pointer; line-height: 1.4; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--r-1); display: grid; place-items: center; cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.check input[type="radio"] { border-radius: 50%; }
.check input:hover { border-color: var(--text); }
.check input:checked { background: var(--text); border-color: var(--text); }
.check input:checked::after { content: ""; width: 11px; height: 6px; margin-top: -3px; border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: rotate(-45deg); }
.check input[type="radio"]:checked::after { width: 10px; height: 10px; margin: 0; border: 0; border-radius: 50%; background: var(--bg); transform: none; }
.check input[disabled] { background: var(--bg-sunk); cursor: not-allowed; }
.field--error .check input { border-color: var(--st-err); }

/* ---------- cards ---------- */
.card { display: grid; gap: var(--s-3); padding: var(--s-5); background: var(--bg-raised); border-top: 3px solid var(--text); color: var(--text); }
.card--link { text-decoration: none; transition: border-color var(--t-fast); }
.card--link:hover { border-top-color: var(--accent-fill); }
.card--link:hover .h3 { color: var(--accent); }

.flat-card { position: relative; display: grid; gap: var(--s-4); align-content: start; padding: var(--s-5); background: var(--bg-raised); border-top: 3px solid var(--text); }
.flat-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-1) var(--s-4); align-items: start; }
.flat-card__letter { grid-row: span 2; font-family: var(--font-display); font-size: 4rem; line-height: .95; min-width: 1em; color: var(--accent); }
.flat-card__meta { display: grid; gap: 2px; }
.flat-card__head .pill { justify-self: start; }
.flat-card__plan { background: var(--bg-sunk); padding: var(--s-4); }
.flat-card__plan svg { width: 100%; height: 148px; }
.flat-card__prices { display: grid; gap: 0; border-top: 1px solid var(--line); }
.flat-card__prices > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding-block: var(--s-2); border-bottom: 1px solid var(--line); }
.flat-card__prices dt { font-size: var(--fs-small); color: var(--text-quiet); }
.flat-card__prices dd { font-weight: 600; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.flat-card__foot { display: flex; align-items: center; gap: var(--s-2); }
.flat-card__foot .btn { flex: 1; }
.flat-card__save { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: var(--r-1); transition: background var(--t-fast), color var(--t-fast); }
.flat-card__save:hover { background: var(--bg-sunk); }
.flat-card__save[aria-pressed="true"] { background: var(--accent-fill); color: var(--accent-on); border-color: var(--accent-fill); }
.flat-card__save[aria-pressed="true"] .ico { fill: currentColor; }
.flat-card--sold { background: transparent; border-top-color: var(--line-strong); }
.flat-card--sold .flat-card__letter { color: var(--text-quiet); }
.flat-card--sold .flat-card__plan { opacity: .6; }

/* status pills: shape as well as colour */
.pill { --c: var(--st-ask); --t: var(--tint-ask); display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 3px 10px 3px 8px; background: var(--t); color: var(--c); border-radius: 99px; font-size: var(--fs-label); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.pill::before { content: ""; width: 11px; height: 11px; flex: none; border: 2px solid currentColor; border-radius: 50%; }
.pill--ok { --c: var(--st-ok); --t: var(--tint-ok); }
.pill--ok::before { background: currentColor; }
.pill--hold { --c: var(--st-hold); --t: var(--tint-hold); }
.pill--hold::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.pill--sold { --c: var(--st-sold); --t: var(--tint-sold); }
.pill--sold::before { border-radius: 2px; background: linear-gradient(45deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%); }
.pill--ask { --c: var(--st-ask); --t: var(--tint-ask); }

/* stat tile */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) 0; }
.stat { display: grid; gap: 2px; align-content: start; padding-right: var(--s-4); min-width: 0; }
.stat__label { font-size: var(--fs-small); font-weight: 600; line-height: 1.35; color: var(--text-quiet); }
.stat__value { font-family: var(--font-display); font-size: clamp(1.875rem, 1.5rem + 1.3vw, 2.75rem); line-height: 1.12; font-variant-numeric: lining-nums; }
.stat__unit { font-family: var(--font-text); font-size: .45em; font-weight: 400; margin-left: .2em; }
.stat__note { font-size: var(--fs-small); line-height: 1.45; color: var(--text-quiet); }
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(var(--cells, 4), minmax(0, 1fr)); }
  .stats .stat + .stat { padding-left: var(--s-5); background: repeating-linear-gradient(180deg, var(--line-strong) 0 var(--stitch-dash), transparent var(--stitch-dash) calc(var(--stitch-dash) + var(--stitch-gap))) 0 0 / 1.5px 100% no-repeat; }
}

/* ledger: a ruled list with big numbers */
.ledger { border-top: 1px solid var(--line-strong); }
.ledger__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px var(--s-5); align-items: baseline; padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.ledger__row:last-child { border-bottom-color: var(--line-strong); }
.ledger__key { font-size: var(--fs-body); font-weight: 600; }
.ledger__value { font-family: var(--font-display); font-size: clamp(2rem, 1.6rem + 1.9vw, 3.25rem); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.ledger__value small { font-family: var(--font-text); font-size: var(--fs-small); margin-left: .35em; color: var(--text-quiet); }
.ledger__note { font-size: var(--fs-small); color: var(--text-quiet); }
@media (min-width: 640px) { .ledger__row { grid-template-columns: minmax(0, 1fr) auto; } .ledger__value { text-align: right; grid-column: 2; grid-row: 1 / span 2; } }

/* index list: links as a ruled list, in place of a card grid */
.index-list { border-top: 1px solid var(--line-strong); }
.index-list__item { position: relative; display: grid; gap: var(--s-1) var(--s-6); padding-block: var(--s-4); border-bottom: 1px solid var(--line); text-decoration: none; transition: padding var(--t-med) var(--ease-out); }
.index-list__item::before { content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 6px; background: var(--accent-fill); transform: scaleY(0); transform-origin: bottom; transition: transform var(--t-med) var(--ease-out); }
.index-list__title { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.2; }
.index-list__text { color: var(--text-quiet); max-width: 48ch; }
.index-list__item .ico { display: none; }
@media (min-width: 900px) {
  .index-list__item { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 28px; align-items: center; padding-block: var(--s-5); }
  .index-list__item .ico { display: block; justify-self: end; transition: transform var(--t-med) var(--ease-out); }
}
@media (hover: hover) {
  a.index-list__item:hover { padding-left: var(--s-5); }
  a.index-list__item:hover::before { transform: scaleY(1); }
  a.index-list__item:hover .ico { transform: translateX(4px); }
}

/* table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line-strong); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.table caption { text-align: left; padding-block: var(--s-2); font-size: var(--fs-small); color: var(--text-quiet); caption-side: bottom; }
.table th, .table td { padding: 12px var(--s-4) 12px 0; text-align: left; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.table thead th { font-size: var(--fs-label); font-weight: 600; color: var(--text-quiet); white-space: nowrap; border-bottom-color: var(--line-strong); }
.table tbody th { font-weight: 600; }
.table .is-num { text-align: right; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table tbody tr:hover { background: var(--bg-sunk); }
.table tr.is-selected { box-shadow: inset 3px 0 0 var(--accent-fill); }
@media (max-width: 639.98px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td, .table--stack tbody th { display: block; width: 100%; }
  .table--stack tr { padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
  .table--stack td, .table--stack tbody th { display: flex; justify-content: space-between; gap: var(--s-4); padding: 5px 0; border: 0; text-align: right; }
  .table--stack td::before, .table--stack tbody th::before { content: attr(data-label); color: var(--text-quiet); font-weight: 400; text-align: left; }
}

/* callouts */
.callout { --c: var(--st-ask); --t: var(--tint-ask); display: grid; gap: 2px; padding: var(--s-4) var(--s-5); background: var(--t); border-left: 4px solid var(--c); color: var(--text); }
.callout__title { font-weight: 600; color: var(--c); }
.callout p { font-size: var(--fs-small); line-height: 1.5; }
.callout--warn { --c: var(--st-hold); --t: var(--tint-hold); }
.callout--ok { --c: var(--st-ok); --t: var(--tint-ok); }
.callout--err { --c: var(--st-err); --t: var(--tint-err); }

/* the two honesty notices */
.sample-banner { --stripe: rgba(255, 255, 255, .1); background-color: var(--ask-ink); background-image: repeating-linear-gradient(-45deg, var(--stripe) 0 10px, transparent 10px 20px); color: #fff; }
.sample-banner__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s-3); max-width: calc(var(--page-max) + 2 * var(--gutter)); margin-inline: auto; padding: 9px var(--gutter); font-size: var(--fs-small); line-height: 1.4; }
.sample-banner b { padding: 1px 8px; background: #fff; color: var(--ask-ink); font-weight: 600; }
.estimate { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--s-3); padding: var(--s-3) var(--s-4) var(--s-3) 0; border-block: 1px solid var(--line-strong); font-size: var(--fs-small); line-height: 1.5; color: var(--text); }
.estimate__tag { align-self: start; padding: 2px 9px; background: var(--accent-fill); color: var(--accent-on); font-weight: 600; font-size: var(--fs-label); white-space: nowrap; }

/* timeline */
.timeline { position: relative; display: grid; gap: 0; }
.timeline__item { position: relative; display: grid; gap: 2px; padding: 0 0 var(--s-6) var(--s-6); }
.timeline__item::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: -12px; width: 2px; background: repeating-linear-gradient(180deg, var(--line-strong) 0 var(--stitch-dash), transparent var(--stitch-dash) calc(var(--stitch-dash) + var(--stitch-gap))); }
.timeline__item:last-child::before { display: none; }
.timeline__item::after { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; background: var(--bg); border: 2px solid var(--line-strong); }
.timeline__date { font-size: var(--fs-small); font-weight: 600; color: var(--text-quiet); }
.timeline__title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }
.timeline__text { color: var(--text-quiet); max-width: 54ch; }
.timeline__item.is-done::after { background: var(--text); border-color: var(--text); }
.timeline__item.is-done::before { background: var(--text); }
.timeline__item.is-now::after { background: var(--accent-fill); border-color: var(--text); }
.timeline__item.is-now .timeline__date { color: var(--accent); }

/* chart frame */
.chart { background: var(--bg-raised); padding: var(--s-5); display: grid; gap: var(--s-4); min-width: 0; }
.chart__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2) var(--s-5); }
.chart__title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }
.chart__legend { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--fs-small); color: var(--text-quiet); }
.chart__key { display: inline-flex; align-items: center; gap: var(--s-2); }
.chart__key::before { content: ""; width: 18px; height: 3px; background: var(--c, var(--chart-1)); }
.chart__key--dash::before { background: repeating-linear-gradient(90deg, var(--c, var(--chart-1)) 0 5px, transparent 5px 8px); }
.chart__plot { width: 100%; min-height: 220px; }
.chart__plot svg { width: 100%; height: auto; overflow: visible; }
.chart__plot text { font-family: var(--font-text); font-size: 13px; fill: var(--text-quiet); font-variant-numeric: lining-nums tabular-nums; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__foot { font-size: var(--fs-small); color: var(--text-quiet); border-top: 1px solid var(--line); padding-top: var(--s-2); }

/* sheet and modal */
.sheet { width: 100%; max-width: 100%; max-height: min(90dvh, 100%); margin: auto 0 0; padding: 0; border: 0; border-radius: var(--r-2) var(--r-2) 0 0; background: var(--bg-raised); color: var(--text); box-shadow: 0 -20px 60px rgba(20, 12, 8, .4); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in var(--t-med) var(--ease-out); }
.sheet::backdrop { background: rgba(20, 12, 8, .62); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) var(--s-5) var(--s-3); border-bottom: 1px solid var(--line); }
.sheet__title { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 400; line-height: 1.2; }
.sheet__close { flex: none; display: grid; place-items: center; width: var(--tap); height: var(--tap); margin: -8px -8px 0 0; }
.sheet__close:hover { color: var(--accent); }
.sheet__body { flex: 1; overflow-y: auto; padding: var(--s-5); display: grid; gap: var(--s-4); align-content: start; }
.sheet__foot { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-4) var(--s-5) calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.sheet__foot .btn { flex: 1; }
@media (min-width: 640px) { .sheet { width: min(36rem, calc(100% - 32px)); margin: auto; border-radius: var(--r-2); box-shadow: 0 30px 80px rgba(20, 12, 8, .45); } }

/* toast */
.toast-stack { position: fixed; z-index: 90; left: var(--s-4); right: var(--s-4); bottom: calc(var(--s-4) + 54px + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--s-2); justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: var(--s-3); max-width: 28rem; padding: 12px 18px; background: var(--espresso-900); color: var(--cream-100); border-left: 4px solid var(--ochre-500); box-shadow: 0 14px 40px rgba(20, 12, 8, .35); font-size: var(--fs-small); line-height: 1.4; pointer-events: auto; animation: sheet-in var(--t-med) var(--ease-out); }
.toast--ok { border-left-color: var(--ok-lamp); }
.toast--err { border-left-color: var(--err-lamp); }
.toast a, .toast button { display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); margin-block: -10px; color: var(--ochre-300); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) { .toast-stack { left: auto; right: var(--s-6); bottom: var(--s-6); justify-items: end; } }

/* empty and loading */
.empty { display: grid; gap: var(--s-2); justify-items: center; text-align: center; padding: var(--s-8) var(--s-5); max-width: 32rem; margin-inline: auto; }
.empty .sun-arc { width: 150px; margin-bottom: var(--s-2); }
.empty__title { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.2; }
.empty__text { color: var(--text-quiet); }
.empty .btn { margin-top: var(--s-3); }
.skeleton { display: block; background: var(--bg-sunk); background-image: linear-gradient(100deg, transparent 30%, rgba(226, 172, 74, .24) 50%, transparent 70%); background-size: 240% 100%; animation: sweep 2.4s var(--ease-light) infinite; }
.skeleton--text { height: 1em; margin-block: .3em; }
.skeleton--title { height: 2rem; width: 60%; }
.skeleton--block { height: 180px; }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* page hero and section head */
.page-hero { padding-block: var(--s-5) var(--s-7); }
.page-hero__body { display: grid; gap: var(--s-4); max-width: 52rem; padding-top: var(--s-5); }
.page-hero__title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-2); line-height: 1.1; text-wrap: balance; }
.page-hero__lede { font-size: var(--fs-lede); line-height: 1.55; max-width: 52ch; }
.page-hero .titleblock { margin-top: var(--s-6); }
.page-hero--image { padding-bottom: 0; }
.page-hero__media { position: relative; aspect-ratio: 16 / 10; margin-top: var(--s-6); overflow: hidden; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .page-hero--image .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s-7); align-items: end; }
  .page-hero--image .crumbs { grid-column: 1 / -1; }
  .page-hero__media { aspect-ratio: 4 / 3; margin-top: 0; }
  .page-hero--image .page-hero__body { padding-bottom: var(--s-7); }
}
.section-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-7); }
.section-head__title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h1); line-height: var(--lh-head); text-wrap: balance; max-width: 22ch; }
.section-head__lede { font-size: var(--fs-lede); line-height: 1.55; max-width: 52ch; color: var(--text-quiet); }
@media (min-width: 900px) { .section-head--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; column-gap: var(--s-7); } .section-head--split .eyebrow { grid-column: 1 / -1; } }

/* faq */
.faq { border-bottom: 1px solid var(--line); }
.faq > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 60px; padding-block: var(--s-3); list-style: none; font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; cursor: pointer; }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; transition: transform var(--t-med) var(--ease-out); }
.faq[open] > summary::after { transform: rotate(45deg); }
.faq__body { padding-bottom: var(--s-5); max-width: var(--measure); color: var(--text-quiet); }

/* scroll-in */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
    @keyframes rise { from { opacity: .15; transform: translateY(16px); } }
  }
}

/* ---------- Home only ---------- */
.home-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.home-hero__copy { display: grid; gap: var(--s-4); align-content: end; padding: var(--s-6) var(--gutter) var(--s-6); }
.home-hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.75rem, 5.1vw, 5.5rem); line-height: 1.1; letter-spacing: -.01em; }
.home-hero__title span { display: block; }
.home-hero__lede { font-size: var(--fs-lede); line-height: 1.5; color: var(--text-quiet); max-width: 34ch; }
.home-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin-top: var(--s-2); }
.home-hero__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--espresso-800); }
.home-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; transform: scale(1.22); transform-origin: 49% 66%; filter: sepia(.2) saturate(1.16) contrast(1.05) brightness(1.02); }
.home-hero__light { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255, 196, 128, .85) 0%, rgba(255, 206, 150, .72) 16%, rgba(255, 206, 150, 0) 40%), radial-gradient(80% 70% at 0% 62%, rgba(255, 178, 96, .5), rgba(255, 178, 96, 0) 64%); mix-blend-mode: screen; opacity: .62; }
.home-hero__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(60, 28, 14, .5), rgba(60, 28, 14, 0) 30%), linear-gradient(90deg, rgba(190, 130, 80, 0) 45%, rgba(120, 66, 40, .34) 100%); mix-blend-mode: multiply; }
.home-hero__sweep { position: absolute; inset: 0 -30%; pointer-events: none; background: linear-gradient(100deg, rgba(255, 214, 150, 0) 38%, rgba(255, 214, 150, .28) 50%, rgba(255, 214, 150, 0) 62%); mix-blend-mode: soft-light; transform: translateX(-50%); }
@media (prefers-reduced-motion: no-preference) { .home-hero__sweep { animation: sun-pass 9s var(--ease-light) .6s 1 both; } @keyframes sun-pass { to { transform: translateX(50%); } } }
.home-hero__base { border-top: 1px solid var(--line); }
.home-hero__base .titleblock { border: 0; }
@media (min-width: 900px) {
  .home-hero__grid { grid-template-columns: minmax(0, 5.6fr) 62px minmax(0, 6.4fr); min-height: clamp(520px, calc(100vh - var(--header-h) - 98px), 780px); }
  .home-hero__copy { order: 0; padding: var(--s-7) var(--s-5) var(--s-7) max(var(--gutter), calc((100vw - var(--page-max)) / 2)); }
  .home-hero .floor-rule { order: 1; }
  .home-hero__media { order: 2; aspect-ratio: auto; }
}
@media (max-width: 899.98px) {
  .home-hero__media { order: -2; }
  .home-hero .floor-rule { order: -1; }
}

.home-belief__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
.home-belief__quote { font-family: var(--font-display); font-size: clamp(1.875rem, 1.3rem + 2.5vw, 3.5rem); line-height: 1.18; text-wrap: pretty; max-width: 21em; }
.home-belief__side { display: grid; gap: var(--s-4); align-content: start; }
.home-belief__fig { aspect-ratio: 4 / 5; }
@media (min-width: 1000px) {
  .home-belief__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: var(--s-9); align-items: end; }
  .home-belief__text { grid-column: 1; margin-top: var(--s-6); max-width: 46ch; }
  .home-belief__side { grid-column: 2; grid-row: 1 / span 2; position: relative; z-index: 2; }
}

.plate { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
.plate__drawing svg { width: 100%; height: auto; }
.plate__note { margin-top: var(--s-3); font-size: var(--fs-small); color: var(--text-quiet); }
.plate-flat a { text-decoration: none; cursor: pointer; }
.plate-flat .plate-shape { fill: var(--espresso-800); transition: fill var(--t-fast); }
.plate-flat .plate-wall { fill: none; stroke: var(--cream-100); stroke-width: .16; }
.plate-flat .plate-part { fill: none; stroke: var(--cream-500); stroke-width: .05; }
.plate-flat .plate-balcony { fill: none; stroke: var(--cream-500); stroke-width: .05; }
.plate-letter { font-family: var(--font-display); font-size: 2.1px; fill: var(--ochre-500); text-anchor: middle; dominant-baseline: central; transition: fill var(--t-fast); }
.plate-core { fill: url(#plateHatch); stroke: var(--cream-500); stroke-width: .05; }
.plate-side { font-family: var(--font-text); font-size: .56px; fill: var(--cream-300); }
@media (max-width: 639.98px) { .plate-side { font-size: 1.15px; } }
.plate-flat a:hover .plate-shape, .plate-flat a:focus-visible .plate-shape, .plate-flat.is-hot .plate-shape { fill: var(--ochre-500); }
.plate-flat a:hover .plate-letter, .plate-flat a:focus-visible .plate-letter, .plate-flat.is-hot .plate-letter { fill: var(--espresso-900); }
.plate-flat a:hover .plate-part, .plate-flat a:focus-visible .plate-part { stroke: var(--espresso-700); }
.plate-flat a:focus-visible { outline: none; }
.plate-list { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); column-gap: var(--s-7); border-top: 1px solid var(--line-strong); }
.plate-list a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: baseline; gap: var(--s-3); min-height: 52px; padding-block: var(--s-2); text-decoration: none; border-bottom: 1px solid var(--line); transition: color var(--t-fast); }
.plate-list b { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.1; color: var(--accent); }
.plate-list span { color: var(--text-quiet); font-size: var(--fs-small); }
.plate-list .num { color: var(--text); font-weight: 600; font-size: var(--fs-body); }
.plate-list a:hover, .plate-list a:hover span { color: var(--accent); }
@media (min-width: 640px) { .plate-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.home-inside { position: relative; min-height: clamp(460px, 62vw, 760px); display: grid; align-items: end; overflow: hidden; }
.home-inside__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; filter: saturate(1.05) contrast(1.02); }
.home-inside::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 12, 8, .88) 0%, rgba(20, 12, 8, .6) 30%, rgba(20, 12, 8, 0) 62%); }
.home-inside__body { position: relative; z-index: 1; display: grid; gap: var(--s-3); padding-block: var(--s-7); color: var(--cream-100); }
.home-inside__body .section-head__lede { color: var(--cream-100); }
.home-steps-wrap { position: relative; }
.home-steps__title { margin-bottom: var(--s-5); }
.home-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.home-steps li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: var(--s-1) var(--s-3); padding-block: var(--s-4); border-top: 1px solid var(--line-strong); }
.home-steps__n { grid-row: span 2; font-family: var(--font-display); font-size: 2.5rem; line-height: 1; color: var(--accent); font-variant-numeric: lining-nums; }
.home-steps b { font-size: var(--fs-h3); line-height: 1.3; }
.home-steps p { color: var(--text-quiet); max-width: 34ch; }
@media (min-width: 900px) {
  .home-steps__title { position: absolute; left: var(--gutter); top: 0; width: 44%; margin: 0; }
  .home-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: start; }
  .home-steps li { grid-template-columns: minmax(0, 1fr); padding: var(--s-4) var(--s-5) 0 0; }
  .home-steps li:nth-child(1) { margin-top: 10.5rem; } .home-steps li:nth-child(2) { margin-top: 7rem; } .home-steps li:nth-child(3) { margin-top: 3.5rem; }
  .home-steps__n { grid-row: auto; font-size: 3rem; }
}

.home-money__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
.home-money__facts { display: grid; gap: 0; }
.home-money__facts li { padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.home-money__facts b { display: block; font-size: var(--fs-h3); line-height: 1.3; }
.home-money__facts span { font-size: var(--fs-small); color: var(--text-quiet); }
@media (min-width: 1000px) { .home-money__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s-9); align-items: start; } }

.home-sun { position: relative; overflow: hidden; }
.home-sun__arc { margin-top: var(--s-6); margin-inline: calc(-1 * var(--gutter)); overflow: hidden; }
.home-sun__arc svg { width: max(100%, 780px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.home-sun__body { position: relative; z-index: 1; display: grid; gap: var(--s-4); max-width: 44rem; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .home-sun .sun-arc__orbit { transform-box: view-box; transform-origin: 720px 956px; animation: sun-travel linear both; animation-timeline: view(); animation-range: entry 20% exit 40%; }
    @keyframes sun-travel { from { transform: rotate(-38deg); } to { transform: rotate(30deg); } }
  }
}

.home-where__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
.home-where__addr { font-family: var(--font-display); font-size: var(--fs-h1); line-height: var(--lh-head); text-wrap: balance; }
.home-where__map { max-width: 26rem; }
.home-where__map svg { width: 100%; height: auto; }
.home-where__map text { font-family: var(--font-text); font-size: 13.5px; fill: var(--text); }
@media (min-width: 900px) { .home-where__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s-9); align-items: end; } }

.home-call__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
.home-call__phones { display: grid; gap: var(--s-1); }
.home-call__phone { font-family: var(--font-display); font-size: clamp(2.75rem, 1.5rem + 6vw, 6.5rem); line-height: 1.08; font-variant-numeric: lining-nums; text-decoration: none; white-space: nowrap; }
.home-call__phone:hover { color: var(--brick-800); }
@media (min-width: 1000px) { .home-call__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; column-gap: var(--s-9); } .home-call__phones { justify-items: end; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- print: one A4 family pack, light ground ---------- */
.print-pack { display: none; }
@media print {
  @page { size: A4 portrait; margin: 11mm 12mm; }
  :root { --gutter: 0px; }
  html, body { background: #fff !important; color: #1E130E !important; font-size: 10.5pt; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
  .site-header, .site-footer, .action-bar, .toast-stack, .skip-link, .sample-banner, .no-print, .btn, .crumbs, .floor-rule, dialog { display: none !important; }
  .print-only { display: block !important; }
  .on-espresso, .on-brick, .on-ochre, .on-felt, .on-stone { background: #fff !important; color: #1E130E !important; --bg: #fff; --bg-raised: #fff; --bg-sunk: #f5efe5; --text: #1E130E; --text-quiet: #4A382C; --accent: #7A4E0C; --line: #cbbfae; --line-strong: #8A7563; }
  a { text-decoration: none; }
  body.is-printing-pack > *:not(.print-pack) { display: none !important; }
  .print-pack { break-after: page; break-inside: avoid; }
  .print-pack:last-child { break-after: auto; }
  .print-pack { display: grid !important; grid-template-rows: auto auto 1fr auto; gap: 7mm; min-height: 255mm; font-size: 10.5pt; line-height: 1.4; color: #1E130E; background: #fff; }
  .print-pack__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 4mm; border-bottom: 1.2pt solid #1E130E; }
  .print-pack__brand { display: flex; align-items: center; gap: 3mm; }
  .print-pack__brand img { width: 13mm; height: auto; }
  .print-pack__name { font-family: var(--font-display); font-size: 15pt; line-height: 1.1; }
  .print-pack__meta { text-align: right; font-size: 9pt; color: #4A382C; }
  .print-pack__title { display: grid; grid-template-columns: auto 1fr; gap: 0 6mm; align-items: center; }
  .print-pack__letter { grid-row: span 2; font-family: var(--font-display); font-size: 58pt; line-height: 1; color: #7A4E0C; }
  .print-pack__h { font-family: var(--font-display); font-size: 21pt; font-weight: 400; line-height: 1.15; }
  .print-pack__body { display: grid; grid-template-columns: 1fr 1fr; gap: 7mm; align-content: start; }
  .print-pack__plan { border: .75pt solid #8A7563; padding: 4mm; min-height: 76mm; display: grid; place-items: center; }
  .print-pack__plan svg, .print-pack__plan img { width: 100%; max-height: 90mm; }
  .print-pack__facts { display: grid; grid-template-columns: 1fr 1fr; align-content: start; border-top: .75pt solid #8A7563; }
  .print-pack__facts div { padding: 2mm 0; border-bottom: .5pt solid #cbbfae; }
  .print-pack__facts dt { font-size: 8.5pt; color: #4A382C; }
  .print-pack__facts dd { font-weight: 600; }
  .print-pack__prices { grid-column: 1 / -1; width: 100%; border-collapse: collapse; }
  .print-pack__prices th, .print-pack__prices td { padding: 2mm 0; border-bottom: .5pt solid #cbbfae; text-align: left; font-size: 10pt; }
  .print-pack__prices th { font-size: 8.5pt; color: #4A382C; font-weight: 600; border-bottom: .75pt solid #8A7563; }
  .print-pack__prices .is-num { text-align: right; font-variant-numeric: lining-nums tabular-nums; }
  .print-pack__notes { grid-column: 1 / -1; font-size: 9pt; color: #4A382C; border-left: 2pt solid #E2AC4A; padding-left: 3mm; }
  .print-pack__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; padding-top: 3mm; border-top: 1.2pt solid #1E130E; font-size: 9.5pt; }
  .print-pack__phones { font-size: 13pt; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
}
