/* AqarTrust — design system.
   Arabic-first: every box property is logical (inline/block), so the whole layout
   mirrors from one attribute on <html dir>. Nothing here is written left-or-right. */

:root {
  /* paper and ink — warm, not the usual cold navy */
  --paper:      #faf7f2;
  --surface:    #ffffff;
  --surface-2:  #f3efe8;
  --ink:        #15181c;
  --ink-2:      #4d5560;
  color-scheme: light;
  --ink-3:      #656d79;   /* 4.5:1 on --surface-2, the darkest light background (WCAG AA) */
  --line:       #e6e0d6;
  --line-2:     #d5cdc0;

  /* jade = money coming back whole. ochre = careful. clay = loss. */
  --jade:       #0d7a58;
  --on-jade:    #ffffff;   /* text on a jade fill; dark in dark mode, where jade is light */
  --jade-2:     #0a6449;
  --jade-wash:  #e7f4ee;
  --ochre:      #b8722a;
  --ochre-wash: #fbf1e3;
  --ochre-ink:  #8a5518;   /* ochre dark enough for text on its wash (5.5:1) */
  --clay:       #b3382e;
  --clay-wash:  #fbebe9;
  --gold:       #d9a441;
  --gold-ink:   #8a6417;   /* gold dark enough for text on its wash */
  --on-clay:    #ffffff;   /* text on a clay fill (danger button, unread count) */
  /* Sign-in buttons, in each provider's own colours as their brand guidelines require
     (functions/views/_signin.js). Google: white, #747775 outline, #1f1f1f text; dark:
     #131314, #8e918f, #e3e3e3. Facebook: #0866ff with white (4.8:1) in both. Apple:
     black in light, white in dark. */
  --google-bg: #ffffff; --google-line: #747775; --on-google: #1f1f1f;
  --facebook-bg: #0866ff; --on-facebook: #ffffff;
  --apple-bg: #000000; --on-apple: #ffffff;

  --r-xs: 8px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(21,24,28,.05);
  --sh-2: 0 2px 10px rgba(21,24,28,.07);
  --sh-3: 0 12px 34px rgba(21,24,28,.11);
  --ease: cubic-bezier(.22,.61,.36,1);

  /* The web font, the Gulf currency signs, then system fonts scaled to Plex's metrics
     (fonts.css, built by scripts/fonts/build-fonts.py) so the swap does not move text. */
  --font: "IBM Plex Sans Arabic", "AqarTrust Signs", "IBM Plex Sans", "AqarTrust Fallback Arial", "AqarTrust Fallback Roboto",
    "AqarTrust Fallback Naskh", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --wrap: 1180px;
  --gut: clamp(16px, 4vw, 32px);
  --nav-h: 66px;

  /* Spacing: the only steps a panel, a form or a list row is spaced with
     (update/CONVENTIONS.md, "Spacing and panels"). */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 22px; --space-6: 32px;
  --check-size: 20px;                                   /* a checkbox or radio */
  --check-gap: 12px;                                    /* from the box to its words */
  --field-gap: 18px;                                     /* under a .field, and under a group of fields */
  --panel-pad-b: var(--space-4); --panel-pad-i: var(--space-5);   /* a panel's head and body */
}
@media (max-width: 560px) { :root { --panel-pad-i: var(--space-4); } }
/* Colours that are the same in both themes, because they sit on something the theme
   does not paint: a photograph, the black photo viewer, the map's price ramp (data, not
   decoration), WhatsApp's green. Each is a fill and its own text colour together, so its
   contrast does not depend on the page behind it. Kept as tokens so every colour in the
   stylesheets has one name and one place. */
:root {
  --on-photo:      #ffffff;
  --photo-glass:   rgba(14,18,22,.72);    /* a badge or button laid over a photo */
  --photo-jade:    rgba(9,74,54,.82);
  --photo-gold:    rgba(140,94,18,.82);
  --photo-ochre:   rgba(122,74,20,.85);
  --photo-clay:    rgba(128,32,24,.86);   /* sold, over a photo */
  --photo-chip:    rgba(255,255,255,.92); /* the pale "Seen" chip, dark text */
  --on-photo-chip: #15181c;
  --heart:         #ff6b5e;               /* a saved heart, on the dark glass */
  --viewer:        #0b0d0f;               /* the lightbox */
  --viewer-glass:  rgb(255 255 255 / .12);
  --viewer-dim:    rgb(0 0 0 / .45);
  --thumb-scrim-0: rgba(4, 20, 16, .08);  /* a reel's thumbnail scrim (N40): clear at the top... */
  --thumb-scrim-1: rgba(4, 20, 16, .82);  /* ...dark enough at the bottom for the caption */
  --sheet:         #ffffff;               /* behind a floor plan drawn on a transparent page */
  --wa:            #1b9e4b;               /* WhatsApp green, one step darker so the white glyph is 3.5:1 */
  --on-wa:         #ffffff;
  /* the map's price ramp, cheapest to dearest; map.js reads these */
  --ramp-0: #0d7a58; --ramp-1: #5a8430; --ramp-2: #b8722a; --ramp-3: #c0542b; --ramp-4: #a8322a;
  --ramp-x: #6d7682;                      /* nothing to price */
  --on-ramp: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101316; --surface: #171b1f; --surface-2: #1e2429;
    color-scheme: dark;
    --ink: #f2efe9; --ink-2: #b3bac4; --ink-3: #8b95a0; --on-jade: #0b1512;
    --line: #272d33; --line-2: #333b42;
    --jade: #35b487; --jade-2: #5cc9a0; --jade-wash: #102c23;
    --ochre: #d69a4e; --ochre-wash: #2b2113; --ochre-ink: #d69a4e; --clay: #e2695c; --clay-wash: #2d1614;
    --gold-ink: #e2b660; --on-clay: #1c0b09;
    --google-bg: #131314; --google-line: #8e918f; --on-google: #e3e3e3; --apple-bg: #ffffff; --on-apple: #000000;
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 2px 10px rgba(0,0,0,.4); --sh-3: 0 12px 34px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --paper:#101316; --surface:#171b1f; --surface-2:#1e2429;
  color-scheme: dark;
  --ink:#f2efe9; --ink-2:#b3bac4; --ink-3:#8b95a0; --on-jade:#0b1512; --line:#272d33; --line-2:#333b42;
  --jade:#35b487; --jade-2:#5cc9a0; --jade-wash:#102c23; --ochre:#d69a4e; --ochre-wash:#2b2113; --ochre-ink:#d69a4e;
  --clay:#e2695c; --clay-wash:#2d1614;
  --gold-ink:#e2b660; --on-clay:#1c0b09;
  --google-bg:#131314; --google-line:#8e918f; --on-google:#e3e3e3; --apple-bg:#ffffff; --on-apple:#000000;
  --sh-1:0 1px 2px rgba(0,0,0,.4); --sh-2:0 2px 10px rgba(0,0,0,.4); --sh-3:0 12px 34px rgba(0,0,0,.5);
}

*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
[dir="rtl"] body { line-height: 1.8; }           /* Arabic needs more air between lines */
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1,h2,h3,h4 { margin: 0; line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; }
h1 { font-size: clamp(30px, 5.2vw, 52px); }
h2 { font-size: clamp(24px, 3.4vw, 36px); }
.h2 { font-size: clamp(24px, 3.4vw, 36px); }  /* an h1 that sits where the section titles do (head1) */
h3 { font-size: clamp(18px, 2.2vw, 22px); }
.lede { font-size: clamp(17px, 1.7vw, 20px); color: var(--ink-2); }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.sm { font-size: 14px; } .xs { font-size: 12.5px; }
/* A figure, or a figure with its words ("1.2 مليون جنيه", "1.2M EGP", "+20 100…").
   plaintext takes the direction from the first letter inside: Arabic words make it
   read right to left, so the number sits on the right of «مليون جنيه» where Arabic
   puts it; a bare figure or phone has no letters and falls back to left to right,
   so "-12%" keeps its sign in front. Never force direction: ltr on text that can
   carry Arabic words — see update/CONVENTIONS.md. */
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: plaintext; display: inline-block; white-space: nowrap; }
/* A count beside its label — a chip, a pill, a tab: "Verified 32". THE one look for
   it, everywhere: a small pill badge in the site's font, same weight as the words,
   centred on them, tabular digits. In Arabic it sits on the right of the words, at
   the start of the line. The gap is a flex gap, not a margin: .num is direction ltr,
   so a margin-inline-start on it lands on the side away from the words and the two
   touched ("أقل من سعر السوق30"). The badge tints itself from the text colour, so it
   reads on a plain chip, a selected (jade) one and in both themes without a rule per
   state. Markup: withCount() in functions/_render.js inside an element with
   .has-count; update/CONVENTIONS.md. A count at the far end of a list row (the
   filter panel's options) is a column, not this. */
.has-count { display: inline-flex; align-items: center; gap: 7px; }
.has-count > .count {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding-inline: 6px;
  border-radius: var(--r-pill); background: color-mix(in srgb, currentColor 13%, transparent); color: inherit;
  font: inherit; font-size: 12px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
[dir="rtl"] .has-count > .count { order: -1; }
:focus-visible { outline: 2.5px solid var(--jade); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--jade); color: var(--on-jade); }
::placeholder { color: var(--ink-3); opacity: 1; }   /* the browser's grey is too faint on --surface-2 in either theme */
.skip { position: absolute; inset-block-start: -60px; inset-inline-start: 12px; z-index: 200;
        background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { inset-block-start: 12px; }
/* The "demo data" strip, only while DEMO_MODE is on (functions/_app/launch.js). */
.demo-bar { margin: 0; padding: var(--space-1) var(--gut); background: var(--ochre-wash); color: var(--ochre-ink); font-size: 13px; line-height: 1.5; text-align: center; border-block-end: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } html{scroll-behavior:auto} }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap-sm { max-width: 760px; }
.sec { padding-block: clamp(48px, 7vw, 92px); }
.sec-tight { padding-block: clamp(32px, 4vw, 52px); }
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid > * { min-width: 0; }  /* grid tracks default to min-content; one wide input would push a phone page sideways */
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 900px) { .g3, .g4, .split { grid-template-columns: 1fr; } .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .g2, .g4 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stack > * + * { margin-block-start: var(--s, 16px); }
/* Read by screen readers, not drawn. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center; }

/* ---------- nav ---------- */
.nav { position: sticky; inset-block-start: 0; z-index: 90; background: color-mix(in srgb, var(--paper) 90%, transparent);
       backdrop-filter: saturate(1.4) blur(14px); border-block-end: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 14px; height: var(--nav-h); flex-wrap: nowrap; }
.nav-end { flex: none; }
[dir="ltr"] .nav-links a { font-size: 14.5px; padding: 8px 10px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
[dir="rtl"] .brand { font-size: 22px; letter-spacing: 0; }
.brand { flex: none; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-links a { white-space: nowrap; padding: 8px 11px; border-radius: var(--r-xs); color: var(--ink-2); font-size: 15px; font-weight: 500; transition: color .18s, background .18s; }
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
@media (min-width: 1201px) and (max-width: 1360px) { .nav-links a, [dir="ltr"] .nav-links a { padding-inline: 7px; } }   /* signed in, the account link and bell need the room just above the burger breakpoint */
.nav-end { display: flex; align-items: center; gap: 8px; }
/* Icon buttons in the bar (the theme switch; the bell in account.css matches). */
.nav-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0;
            border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); cursor: pointer; }
.nav-icon:hover { background: var(--surface-2); color: var(--ink); }
/* The switch shows the state the page is in, from the first paint: the head script
   has set data-theme before this sheet applies, so no script is needed to pick it. */
.theme-btn .th-i { display: none; }
:root:not([data-theme]) .theme-btn .th-system,
:root[data-theme="light"] .theme-btn .th-light,
:root[data-theme="dark"] .theme-btn .th-dark { display: block; }
/* The logo's dot is jade, so it lifts with jade in dark mode. */
.brand .mk-dot, .authmark .mk-dot { fill: var(--jade); }
.brand .mk-arc, .authmark .mk-arc { stroke: var(--gold); }
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-xs); cursor: pointer; align-items: center; justify-content: center; }
.burger span { display: block; width: 18px; height: 1.6px; background: var(--ink); margin-block: 3px; transition: transform .2s var(--ease), opacity .2s; }
.nav.open .burger span:nth-child(1) { transform: translateY(4.6px) rotate(45deg); }
.nav.open .burger span:nth-child(2) { opacity: 0; }
.nav.open .burger span:nth-child(3) { transform: translateY(-4.6px) rotate(-45deg); }
/* Below the burger breakpoint the language switch and the call to action move
   into the menu. Left in the bar they made the row 469px wide in a 390px
   viewport, which scrolled the whole site sideways on a phone. */
.nav-extra { display: inline-flex; align-items: center; gap: 8px; }
.nav-menu-actions { display: none; }
/* The language menu, when more than two languages are enabled (functions/_render.js,
   langSwitch); with two it is a single link and none of this draws. */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-list { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + var(--space-1)); z-index: 30; min-width: 12rem;
             display: grid; padding: var(--space-1); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-2); }
.lang-opt { display: block; padding: var(--space-2) var(--space-3); border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-opt:hover, .lang-opt:focus-visible { background: var(--jade-wash); }
.nav-menu-actions .lang-list { position: static; box-shadow: none; margin-block-start: var(--space-1); }
@media (max-width: 1200px) {
  .burger { display: inline-flex; }
  .nav-extra { display: none; }
  .nav-menu-actions { display: grid; gap: 8px; padding-block-start: 12px; }
  .nav-menu-actions .btn { width: 100%; }
  .nav-links { display: none; position: absolute; inset-inline: 0; inset-block-start: var(--nav-h); flex-direction: column;
               align-items: stretch; background: var(--surface); border-block-end: 1px solid var(--line); padding: 10px var(--gut) 18px; gap: 2px; box-shadow: var(--sh-2); }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 13px 10px; font-size: 16.5px; border-block-end: 1px solid var(--line); border-radius: 0; }
}
/* The same fold on a wide screen when the labels do not fit the bar: a language with
   longer words than English (German, the pseudo-locale in the tests). public/assets/app.js
   sets .nav-fold when the bar overflows; the rules are the block above. */
.nav.nav-fold .burger { display: inline-flex; }
.nav.nav-fold .nav-extra { display: none; }
.nav.nav-fold .nav-menu-actions { display: grid; gap: 8px; padding-block-start: 12px; }
.nav.nav-fold .nav-menu-actions .btn { width: 100%; }
.nav.nav-fold .nav-links { display: none; position: absolute; inset-inline: 0; inset-block-start: var(--nav-h); flex-direction: column;
             align-items: stretch; background: var(--surface); border-block-end: 1px solid var(--line); padding: 10px var(--gut) 18px; gap: 2px; box-shadow: var(--sh-2); }
.nav.nav-fold.open .nav-links { display: flex; }
.nav.nav-fold .nav-links a { padding: 13px 10px; font-size: 16.5px; border-block-end: 1px solid var(--line); border-radius: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
       padding: 11px 22px; border-radius: var(--r-pill); border: 1.5px solid transparent; cursor: pointer;
       font-weight: 600; font-size: 15.5px; background: var(--ink); color: var(--paper);
       transition: transform .16s var(--ease), background .18s, border-color .18s, box-shadow .18s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-jade { background: var(--jade); color: var(--on-jade); }
.btn-jade:hover { background: var(--jade-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-3); }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-sm { min-height: 38px; padding: 7px 15px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 14px 30px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.link { color: var(--jade); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.link:hover { color: var(--jade-2); }
/* names in tables and name lists (places, developers, projects) are plainly links by their
   colour and weight: no underline until hovered (owner, 2026-09-28). Running text keeps it. */
.c-table .link, .gd-devs .link, .gd-inline .link { text-decoration: none; }
.c-table .link:hover, .gd-devs .link:hover, .gd-inline .link:hover { text-decoration: underline; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2.4vw, 26px); }
.card-flat { background: var(--surface-2); border: 0; }
.card-hover { transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--line-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--jade); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag-jade { background: var(--jade-wash); color: var(--jade); border-color: transparent; }
.tag-ochre { background: var(--ochre-wash); color: var(--ochre-ink); border-color: transparent; }
.tag-clay { background: var(--clay-wash); color: var(--clay); border-color: transparent; }
.tag-gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-ink); border-color: transparent; }
.hr { height: 1px; background: var(--line); border: 0; margin-block: 0; }

/* ---------- folds ----------
   A box a person can close: <details class="fold" data-fold="key"> > summary.fold-h,
   then .fold-b (update/CONVENTIONS.md, "Folds"; public/assets/fold.js remembers each one).
   The chevron points to the end of the line when closed (so it turns with the writing
   direction) and down when open. No height animation: opening pushes what is below, once,
   at the person's own tap, never on its own. */
.fold > .fold-h { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-2);
  min-height: 36px; font-weight: 650; }
.fold > .fold-h::-webkit-details-marker { display: none; }
.fold > .fold-h::after { content: ""; flex: none; width: 7px; height: 7px; margin-inline-start: auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--ink-3);
  transform: translateY(-1px) rotate(-45deg); transition: transform .15s var(--ease); }
[dir="rtl"] .fold > .fold-h::after { transform: translateY(-1px) rotate(135deg); }
.fold[open] > .fold-h::after, [dir="rtl"] .fold[open] > .fold-h::after { transform: translateY(-3px) rotate(45deg); }
.fold > .fold-h:hover::after { color: var(--ink); }
.fold > .fold-h:focus-visible { outline: 2.5px solid var(--jade); outline-offset: 2px; border-radius: var(--r-sm); }
.fold-n { color: var(--ink-2); font-weight: 600; }
.fold[open] > .fold-b { margin-block-start: var(--space-2); }

/* ---------- the completeness bar — the signature device ----------
   One line that says the whole product: the jade part is what the seller already
   paid and gets back; the rest is what the buyer carries on paying. */
.cbar { --paid: 30%; display: block; }
.cbar-track { height: 9px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line);
              overflow: hidden; display: flex; }
.cbar-paid { width: var(--paid); background: linear-gradient(90deg, var(--jade), color-mix(in srgb, var(--jade) 72%, var(--gold))); }
[dir="rtl"] .cbar-paid { background: linear-gradient(-90deg, var(--jade), color-mix(in srgb, var(--jade) 72%, var(--gold))); }
.cbar-legend { display: flex; justify-content: space-between; gap: 10px; margin-block-start: 7px; font-size: 12.5px; }
.cbar-legend b { font-weight: 600; }
.cbar-legend .l-paid { color: var(--jade); }
.cbar-legend .l-left { color: var(--ink-3); }

/* ---------- unit card ---------- */
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(16px, 2vw, 24px); }
/* position: relative anchors the heart. Without it .u-fav was placed against the
   page, so every card's heart stacked at the top of the page under the nav. */
.u { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.u-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.u-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.u:hover .u-media img { transform: scale(1.05); }
.u-badges { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; inset-inline-end: 58px; display: flex; gap: 6px; flex-wrap: wrap; }   /* wraps before the heart, not under it */
/* A badge sits on a photograph whose colours we do not control, so it cannot be
   a light chip with dark text — on a pale image it disappears. Dark and blurred
   reads on anything. */
.u-badges .tag { background: var(--photo-glass); color: var(--on-photo); border: 0; box-shadow: none;
                 backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2);
                 font-weight: 600; letter-spacing: .01em; }
.u-badges .u-seen { background: var(--photo-chip); color: var(--on-photo-chip); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.u-badges .tag-gold { background: var(--photo-gold); color: var(--on-photo); }
.u-badges .tag-jade { background: var(--photo-jade); color: var(--on-photo); }
/* reserved and sold (functions/_app/offer.js): the state first on the photo, the photo greyed */
.u-badges .u-state.tag-ochre { background: var(--photo-ochre); color: var(--on-photo); }
.u-badges .u-state.tag-clay { background: var(--photo-clay); color: var(--on-photo); }
.u-off .u-media img { filter: grayscale(.7); }
/* The heart sits on the photo too: the same dark glass as the badges. (A later
   white-circle rule used to override this, and in dark mode drew a light outline
   on a white circle.) */
.u-fav { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; width: 38px; height: 38px; border-radius: 50%;
         background: var(--photo-glass); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
         border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-1); }
.u-fav svg { width: 19px; height: 19px; stroke: var(--on-photo); fill: none; stroke-width: 1.8; }
.u-fav[aria-pressed="true"] svg { fill: var(--heart); stroke: var(--heart); }
/* the unit page's own Save button: the same heart, filled once saved */
.unit-save { gap: var(--space-2); }
.unit-save svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.unit-save[aria-pressed="true"] svg { fill: var(--heart); stroke: var(--heart); }
.u-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.u-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.u-title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.u-where { font-size: 13.5px; color: var(--ink-2); }
.u-code { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.u-specs { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.u-specs span { display: inline-flex; align-items: center; gap: 5px; }
.u-money { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; }
.u-cash { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.u-cash .k { font-size: 12.5px; color: var(--ink-2); }
.u-cash .v { font-size: 20px; font-weight: 700; }
.u-gain { font-size: 13px; font-weight: 600; color: var(--jade); }
.u-gain.neg { color: var(--clay); }
.u-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block-start: auto; padding-block-start: 4px; }

/* ---------- forms ----------
   THE form controls, for the whole app. Every text box, select, textarea, checkbox and
   radio gets its look here and nowhere else; a page may change size or layout (width,
   min-height, padding) but not border, radius, background or colours. The rules are
   in update/CONVENTIONS.md. Checkbox and radio use :where() so any component rule
   (a hidden pill input, a bigger box) wins without !important. */
.field { display: block; margin-block-end: var(--field-gap); }
/* a field's own label; a checkbox or radio row (.check, .radio) keeps its row layout */
.field > label:not(.check, .radio), .lbl, :where(legend) { display: block; font-size: 14.5px; font-weight: 600; margin-block-end: 7px; }
.hint { font-size: 13px; color: var(--ink-3); margin-block-start: 6px; }
/* A group of fields: no browser frame, no inset, and the legend reads like a .lbl (above).
   :where() keeps it at zero specificity, so a component's legend class wins. A group
   that should look framed opts in with .fieldset-box. */
:where(fieldset) { border: 0; padding: 0; margin: 0; min-width: 0; }
:where(legend) { padding: 0; }
.fieldset-box { border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-4); }
/* The buttons that end a form: space above, start-aligned, wrapping on a phone. */
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--space-2) var(--space-3); margin-block-start: var(--space-2); }
/* input:not([type]) is a text box too, and without it the browser's white default showed
   through in dark mode under light text */
.inp, input:not([type]), input[type=text], input[type=search], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=month], input[type=url], input[type=password], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 15px; background: var(--surface);
  border: 1.5px solid var(--line-2); border-radius: var(--r); transition: border-color .18s, box-shadow .18s;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--jade); box-shadow: 0 0 0 4px var(--jade-wash); }
::placeholder { color: var(--ink-3); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
/* A compact control for toolbars (the map bar, sort menus): same look, less height. */
.ctl-sm { min-height: 42px; padding-block: 8px; font-size: 14.5px; border-radius: var(--r-sm); }

/* Checkbox and radio: drawn by us, not the browser, so they match the fields in both
   themes. The tick and the dot are ::before, scaled in when checked. */
input:where([type=checkbox], [type=radio]) {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 20px; height: 20px; min-height: 0; padding: 0;
  display: inline-grid; place-content: center; vertical-align: middle; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 6px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
input:where([type=radio]) { border-radius: 50%; }
input:where([type=checkbox])::before {
  content: ""; width: 12px; height: 12px; background: var(--on-jade); transform: scale(0); transition: transform .12s var(--ease);
  clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 22%, 84% 8%, 38% 70%);
}
input:where([type=radio])::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-jade); transform: scale(0); transition: transform .12s var(--ease);
}
input:where([type=checkbox], [type=radio]):checked { background: var(--jade); border-color: var(--jade); }
input:where([type=checkbox], [type=radio]):checked::before { transform: scale(1); }
input:where([type=checkbox], [type=radio]):hover { border-color: var(--jade); }
input:where([type=checkbox], [type=radio]):focus { box-shadow: none; }
input:where([type=checkbox], [type=radio]):focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; }
input:where([type=checkbox], [type=radio]):disabled { background: var(--surface-2); border-color: var(--line); cursor: not-allowed; }
input[inputmode="numeric"], input[type=tel], input[type=number] { direction: ltr; text-align: start; font-variant-numeric: tabular-nums; }
[dir="rtl"] input[inputmode="numeric"], [dir="rtl"] input[type=tel] { text-align: right; }
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='%238a93a0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
         background-repeat: no-repeat; background-position: left 15px center; padding-inline-end: 40px; }
[dir="rtl"] select { background-position: left 15px center; }
[dir="ltr"] select { background-position: right 15px center; padding-inline-end: 40px; padding-inline-start: 15px; }
/* The open list, styled, where the browser allows it (Chromium 135+: customizable
   select). Elsewhere the closed control above is still ours and the list is the
   system's. One rule for every <select> in the app — see update/CONVENTIONS.md. */
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select { background-image: none; display: flex; align-items: center; gap: 10px; cursor: pointer; }
  select::picker-icon {
    content: ""; width: 12px; height: 12px; margin-inline-start: auto; color: var(--ink-3); background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: rotate .18s var(--ease);
  }
  select:open { border-color: var(--jade); box-shadow: 0 0 0 4px var(--jade-wash); }
  select:open::picker-icon { rotate: 180deg; color: var(--jade); }
  ::picker(select) {
    margin-block: 6px; padding: 6px; min-inline-size: anchor-size(width);
    background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r);
    box-shadow: var(--sh-3);
    opacity: 0; translate: 0 -4px; transition: opacity .14s, translate .14s, display .14s allow-discrete, overlay .14s allow-discrete;
  }
  select:open::picker(select) { opacity: 1; translate: 0 0; }
  @starting-style { select:open::picker(select) { opacity: 0; translate: 0 -4px; } }
  option {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm);
    font-size: 14.5px; line-height: 1.35; cursor: pointer; background: transparent;
  }
  option:hover, option:focus-visible { background: var(--surface-2); outline: 0; }
  option:checked { background: var(--jade-wash); color: var(--jade); font-weight: 650; }
  option::checkmark { content: ""; order: 1; margin-inline-start: auto; width: 14px; height: 14px; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
  option:disabled { color: var(--ink-3); cursor: not-allowed; }
}
/* One checkbox (or single radio) row, everywhere (update/CONVENTIONS.md "Checkbox and radio
   rows"): a 20px control, --check-gap to its words, the words wrap beside the box (never
   under it), and a .hint right after the row starts where the words start. */
.check { display: flex; gap: var(--check-gap); align-items: flex-start; cursor: pointer; font-size: 14.5px; line-height: 1.6;
         font-weight: 400; margin: 0; }
.check > input { width: var(--check-size); height: var(--check-size); min-height: 0; flex: none; margin-block-start: 3px; }
.check > :not(input) { flex: 1; min-width: 0; }
.check + .hint, .check + .hint + .hint { padding-inline-start: calc(var(--check-size) + var(--check-gap)); margin-block-start: var(--space-1); }
.check + .check { margin-block-start: var(--space-3); }
.radios { display: grid; gap: 10px; }
.radio { display: flex; gap: 11px; align-items: center; padding: 13px 15px; border: 1.5px solid var(--line-2);
         border-radius: var(--r); cursor: pointer; transition: border-color .18s, background .18s; }
.radio:hover { border-color: var(--ink-3); }
.radio:has(input:checked) { border-color: var(--jade); background: var(--jade-wash); }
.radio input { width: var(--check-size); height: var(--check-size); min-height: 0; flex: none; }
/* a file field's button reads like our soft button; a slider takes the brand colour */
input[type="file"] { font-size: 14px; color: var(--ink-2); max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 8px 16px; margin-inline-end: var(--space-3); cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--ink-3); }
input[type="range"] { accent-color: var(--jade); min-height: 0; padding: 0; border: 0; background: transparent; }
.msg { display: none; padding: 12px 16px; border-radius: var(--r); font-size: 14.5px; margin-block-end: 16px; font-weight: 500; }
.msg.show { display: block; }

/* The app's notices (public/assets/app.js notify/confirmBox/askBox; update/CONVENTIONS.md
   "Notices"): a toast stack at the bottom, above the phone tab bar, and a small dialog.
   Never the browser's alert/confirm/prompt. */
.toasts { position: fixed; inset-inline: 0; inset-block-end: calc(16px + env(safe-area-inset-bottom)); z-index: 1000; display: grid; justify-items: center;
  gap: 8px; padding-inline: 16px; pointer-events: none; }
@media (max-width: 899.98px) { .toasts { inset-block-end: calc(76px + env(safe-area-inset-bottom)); } }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: min(520px, 100%); padding: 12px 12px 12px 16px;
  border-radius: var(--r); background: var(--ink); color: var(--paper); box-shadow: var(--sh-2); font-size: 14.5px; line-height: 1.5;
  animation: toast-in .18s var(--ease); }
.toast p { margin: 0; flex: 1; }
.toast-err { background: var(--clay); color: var(--on-clay); }
.toast-x { flex: none; border: 0; background: none; color: inherit; opacity: .75; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; min-height: 0; }
.toast-x:hover { opacity: 1; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .toast.out { transition: none; } }
dialog.uibox { max-width: min(420px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  padding: var(--space-5); box-shadow: var(--sh-2); }
dialog.uibox::backdrop { background: color-mix(in srgb, var(--viewer) 40%, transparent); }
.uibox p { margin: 0; line-height: 1.6; }
.uibox .lbl { display: grid; gap: 8px; }
.uibox-actions { display: flex; justify-content: flex-end; gap: 8px; margin-block-start: var(--space-4); }
.btn-danger { background: var(--clay); color: var(--on-clay); border-color: transparent; }
.msg.ok { background: var(--jade-wash); color: var(--jade); }
.msg.err { background: var(--clay-wash); color: var(--clay); }
.msg.warn { background: var(--ochre-wash); color: var(--ochre-ink); }
.steps { display: flex; align-items: center; gap: 8px; margin-block-end: 22px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.steps .bar { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.steps .bar i { display: block; height: 100%; background: var(--jade); border-radius: var(--r-pill); transition: width .4s var(--ease); }

/* ---------- misc ---------- */
.stat { display: grid; gap: 4px; }
.stat .n { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; line-height: 1; }
.stat .k { font-size: 13.5px; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14.5px; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; font-weight: 600; }
.note { position: relative; background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--ochre);
  border-radius: var(--r); padding: 14px 18px 14px 46px; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
[dir="rtl"] .note { padding: 14px 46px 14px 18px; }
/* a small "i" in the accent colour: a note is a card with a thin accent, never a coloured box (owner, 2026-09-29) */
.note::before { content: "i"; position: absolute; inset-inline-start: 16px; inset-block-start: 14px; inline-size: 20px; block-size: 20px;
  display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--ochre); color: var(--ochre-ink);
  font: 700 12px/1 Georgia, serif; }
.note-jade { border-inline-start-color: var(--jade); }
.note-jade::before { border-color: var(--jade); color: var(--jade); }
.empty { display: grid; justify-items: center; gap: var(--space-3); text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty > * { margin: 0; }
.footer { background: var(--surface); border-block-start: 1px solid var(--line); padding-block: 52px 28px; margin-block-start: 60px; }
.footer h4 { font-size: 14px; font-weight: 700; margin-block-end: 12px; }
.footer a { display: block; padding-block: 5px; color: var(--ink-2); font-size: 14.5px; }
.footer a:hover { color: var(--jade); }
.footer-cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 800px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
/* The link groups fold only on a phone (.fold-phone, in the folds block). */
.foot-fold > .fold-b { padding-block: var(--space-3) 0; }
.foot-fold[open] > .fold-b { margin-block-start: 0; }
@media (max-width: 600px) {
  .footer-cols { grid-template-columns: 1fr; gap: 0; }
  .footer-cols > :first-child { margin-block-end: var(--space-4); }
  .foot-fold { border-block-start: 1px solid var(--line); }
  .foot-fold > .fold-b { padding-block: 0 var(--space-3); }
}
.footer-bottom { margin-block-start: 34px; padding-block-start: 20px; border-block-start: 1px solid var(--line);
                 display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.wa { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 80; width: 56px; height: 56px; border-radius: 50%;
      background: var(--wa); display: grid; place-items: center; box-shadow: var(--sh-3); }
.wa svg { width: 29px; height: 29px; fill: var(--on-wa); }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(44px, 7vw, 86px) clamp(36px, 5vw, 64px);
        background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%); border-block-end: 1px solid var(--line); }
.hero-art { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(60% 70% at 85% 10%, color-mix(in srgb, var(--jade) 16%, transparent), transparent 70%),
    radial-gradient(45% 55% at 12% 0%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 70%); }
.hero-in { position: relative; z-index: 1; }
.hero h1 { max-width: 19ch; margin-block: 14px 16px; }
[dir="ltr"] .hero h1 { max-width: 22ch; }
.hero .lede { max-width: 62ch; }
.hsearch { display: grid; grid-template-columns: 1fr 200px auto; gap: 10px; margin-block: 28px 0;
           background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--sh-2); max-width: 880px; }
.hsearch-in { position: relative; display: flex; align-items: center; }
.hsearch-in svg { position: absolute; inset-inline-start: 14px; width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
/* min-width 0: as a flex item the input would not shrink below its intrinsic
   width, and at 375px it ran 42px past its box and scrolled the page sideways. */
.hsearch-in input { border: 0; background: transparent; padding-inline-start: 44px; min-height: 48px; min-width: 0; }
.hsearch-in input:focus { box-shadow: none; }
.hsearch select { border: 0; background-color: var(--surface-2); min-height: 48px; }
.hsearch .btn { min-height: 48px; }
@media (max-width: 760px) { .hsearch { grid-template-columns: 1fr; } }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: clamp(18px, 4vw, 52px); margin-block-start: 34px; justify-content: start; }
@media (max-width: 700px) { .hero-stats { grid-template-columns: 1fr 1fr; gap: 20px 28px; } }
.tnum { font-size: 13px; font-weight: 700; color: var(--jade); letter-spacing: .06em; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.ticks li { position: relative; padding-inline-start: 26px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .55em;
  width: 15px; height: 8px; border-inline-start: 2px solid var(--jade); border-block-end: 2px solid var(--jade);
  transform: rotate(-45deg); border-end-start-radius: 2px; }
/* a tick is the same ✓ in Arabic: its borders stay physical (left + bottom), not logical */
[dir="rtl"] .ticks li::before { border-inline-start: 0; border-inline-end: 2px solid var(--jade); border-end-start-radius: 0; border-end-end-radius: 2px; transform: rotate(-45deg); }
[dir="rtl"] .ticks.bad li::before { transform: none; }
.ticks.bad li::before { border-color: var(--clay); width: 13px; height: 13px; transform: none; border: 0;
  background: linear-gradient(45deg, transparent 44%, var(--clay) 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--clay) 44% 56%, transparent 56%); inset-block-start: .45em; }
.pc { background: var(--surface); box-shadow: var(--sh-2); }
.pc-out { margin-block-start: 16px; padding-block-start: 16px; border-block-start: 1px solid var(--line); }
.pc-range { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pc-range .v { font-size: 24px; font-weight: 700; }
.pc-bar { height: 10px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--jade-wash), var(--jade), var(--jade-wash)); margin-block: 12px 8px; position: relative; }
.pc-bar i { position: absolute; inset-block: -4px; width: 3px; background: var(--ink); border-radius: 2px; }
/* the two ways out: plain cards, told apart by a thin top edge, an icon and the tag; the
   recommended one has a jade outline. No filled colour boxes (owner, 2026-09-29). */
.exit-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); border-block-start-width: 4px; }
.exit-card h3 { margin: 0; }
.exit-card .ticks { margin: 0; }
.exit-card .btn { align-self: flex-start; margin-block-start: auto; }
.exit-ic { display: inline-grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: 50%; flex: none; }
.exit-ic svg { inline-size: 18px; block-size: 18px; }
.exit-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.exit-bad { border-block-start-color: var(--clay); }
.exit-bad .exit-ic { background: var(--surface-2); color: var(--clay); }
.exit-good { border-color: color-mix(in srgb, var(--jade) 45%, var(--line)); border-block-start-color: var(--jade); box-shadow: var(--sh-2); }
.exit-good .exit-ic { background: var(--jade-wash); color: var(--jade); }
[dir="rtl"] .exit-good .exit-ic svg { transform: scaleX(-1); }
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.area { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px;
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-weight: 600;
        transition: border-color .18s, transform .18s var(--ease); }
.area:hover { border-color: var(--jade); transform: translateY(-2px); }
.area b { color: var(--jade); font-variant-numeric: tabular-nums; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
            background: var(--ink); color: var(--paper); border-radius: var(--r-xl); padding: clamp(26px, 4vw, 44px); }
.cta-band h2, .cta-band .lede { color: var(--paper); }
.cta-band .lede { opacity: .8; }
.cta-band .btn-ghost { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 35%, transparent); }
.cta-band .btn-ghost:hover { background: color-mix(in srgb, var(--paper) 10%, transparent); border-color: color-mix(in srgb, var(--paper) 55%, transparent); }

/* ---------- browse ---------- */
.browse-head { border-block-end: 1px solid var(--line); background: var(--surface); }
.filters { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-block-start: 18px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line-2);
        font-size: 14px; font-weight: 600; color: var(--ink-2); transition: all .16s; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--jade); border-color: var(--jade); color: var(--on-jade); }
.sortsel { display: inline-flex; align-items: center; gap: 8px; }
.sortsel select { min-height: 40px; padding-block: 6px; width: auto; min-width: 180px; }
.browse { display: grid; grid-template-columns: 268px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .browse { grid-template-columns: 1fr; } .side { order: -1; } }
.side { position: sticky; inset-block-start: calc(var(--nav-h) + 14px); display: grid; gap: 10px; }
/* a sticky side column taller than the screen scrolls with the page (app.js fitSticky) */
.no-stick { position: static !important; }
@media (max-width: 900px) { .side { position: static; } }
.fgroup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fgroup > summary { cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after { content: "+"; color: var(--ink-3); font-weight: 400; }
.fgroup[open] > summary::after { content: "–"; }
.fbody { padding: 4px 8px 10px; max-height: 320px; overflow: auto; }
.fitem { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--r-xs); font-size: 14.5px; color: var(--ink-2); }
.fitem:hover { background: var(--surface-2); color: var(--ink); }
.fitem.on { background: var(--jade-wash); color: var(--jade); font-weight: 600; }
.fitem b { font-size: 12.5px; opacity: .7; }
.pager { display: flex; gap: 6px; justify-content: center; margin-block-start: 30px; flex-wrap: wrap; }
.pg { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); font-weight: 600; }
.pg.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- unit detail ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--ink-3); margin-block-end: 16px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--jade); }
.udetail { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.udetail > * { min-width: 0; }  /* a grid track is min-content wide by default; an input would push the page sideways on phones */
@media (max-width: 960px) { .udetail { grid-template-columns: 1fr; } }
.gal { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; border-radius: var(--r-lg); overflow: hidden; }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.gal .lead { grid-row: span 2; }
@media (max-width: 620px) { .gal { grid-template-columns: 1fr; grid-template-rows: auto; } }
.specs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 24px;
         grid-template-columns: repeat(2, auto 1fr); column-gap: 24px; row-gap: 12px; }
@media (max-width: 700px) { .specs { grid-template-columns: auto 1fr; } }
.ubuy { position: sticky; inset-block-start: calc(var(--nav-h) + 14px); }
@media (max-width: 960px) { .ubuy { position: static; } }
.money-card { box-shadow: var(--sh-2); }
.mrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block: 6px; font-size: 14.5px; }
.mrow span { color: var(--ink-2); }
.mrow b { font-weight: 700; }
.mrow.big b { font-size: 26px; }
.mrow.total b { font-size: 19px; color: var(--jade); }
.mrow.good b { color: var(--jade); } .mrow.bad b { color: var(--clay); }
.pos .pc-bar { background: linear-gradient(90deg, var(--jade), var(--gold), var(--clay)); }
/* the marker sits at inset-inline-start, so the scale starts (cheap, jade) at the reading start too */
[dir="rtl"] .pos .pc-bar { background: linear-gradient(270deg, var(--jade), var(--gold), var(--clay)); }

/* ---------- assistant ---------- */
.as-bubble { position: fixed; inset-block-end: 20px; inset-inline-start: 20px; z-index: 82; width: 56px; height: 56px;
  border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); display: grid; place-items: center;
  cursor: pointer; box-shadow: var(--sh-3); transition: transform .18s var(--ease); }
.as-bubble:hover { transform: translateY(-2px) scale(1.04); }
.as-bubble svg { width: 26px; height: 26px; }
.as-panel { position: fixed; inset-block-end: 88px; inset-inline-start: 20px; z-index: 83; width: min(392px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 130px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3); overflow: hidden; }
.as-panel[hidden] { display: none; }
.as-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px;
  background: var(--ink); color: var(--paper); }
.as-head strong { display: block; font-size: 15px; }
.as-head .faint { color: color-mix(in srgb, var(--paper) 75%, var(--ink)); display: block; }
.as-x { background: none; border: 0; color: inherit; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.as-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.as-msg { max-width: 86%; padding: 10px 14px; border-radius: var(--r); font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }
.as-msg.bot { background: var(--surface-2); align-self: flex-start; border-start-start-radius: 4px; }
.as-msg.me { background: var(--jade); color: var(--on-jade); align-self: flex-end; border-end-end-radius: 4px; }
.as-msg.pending { opacity: .6; }
.as-chips { display: flex; gap: 6px; padding: 0 14px 10px; flex-wrap: wrap; }
.as-chips button { background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-pill);
  padding: 6px 12px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.as-chips button:hover { border-color: var(--jade); color: var(--jade); }
.as-form { display: flex; gap: 8px; padding: 12px 14px; border-block-start: 1px solid var(--line); }
.as-form input { min-height: 42px; }
.as-form .btn { min-height: 42px; }
.as-chips button.as-chip-main { border-color: var(--jade); color: var(--jade); font-weight: 600; }
/* the summary card, links and photos inside the log (functions/_app/assistant/) */
.as-card, .as-signin { align-self: stretch; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: var(--space-3); }
.as-card-h { font-weight: 700; font-size: 14px; margin-block-end: var(--space-2); }
.as-card dl { display: flex; flex-direction: column; gap: 2px; }
.as-row { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: var(--space-2); align-items: baseline;
  padding-block: 6px; border-block-end: 1px solid var(--line); font-size: 13.5px; }
.as-row:last-child { border-block-end: 0; }
.as-row dt { color: var(--ink-3); }
.as-row dd { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); min-width: 0; }
.as-row dd .num { font-weight: 600; overflow-wrap: anywhere; }
.as-edit { background: none; border: 0; padding: 4px 2px; color: var(--jade); font-size: 12.5px; cursor: pointer; flex: none; min-height: 32px; }
.as-edit:hover { text-decoration: underline; }
.as-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-block-start: var(--space-3); }
.as-bot { margin-block-start: var(--space-3); }
.as-links { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-block-start: var(--space-2); padding: 0; }
.as-link { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; white-space: normal; }
.as-link:hover, .as-link:focus-visible { border-color: var(--jade); }
.as-link.primary, .as-link.all { border-color: var(--jade); }
.as-link-t { font-weight: 600; font-size: 13.5px; }
.as-link.all .as-link-t, .as-link.primary .as-link-t { color: var(--jade); }
.as-link-s { font-size: 12.5px; color: var(--ink-3); }
.as-next { margin: var(--space-2) 0 0; padding-inline-start: 20px; white-space: normal; }
.as-next li + li { margin-block-start: 4px; }
.as-photos { display: grid; grid-template-columns: repeat(3, 64px); gap: 6px; padding: 8px; }
.as-ph { width: 64px; height: 64px; border-radius: var(--r-xs); overflow: hidden; background: var(--surface-2); opacity: .55; }
.as-ph.done { opacity: 1; } .as-ph.bad { outline: 2px solid var(--clay); }
.as-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The step form in the chat (N30): public/assets/stepform.js draws it, assistant.js fills
   it. The chips are radio and checkbox inputs under a pill: the input is invisible and
   covers its pill, so the keyboard, a screen reader and a tap all reach the native control. */
.as-panel.as-wide { z-index: 91; width: min(440px, calc(100vw - 32px)); max-height: min(780px, calc(100vh - 110px)); }   /* over the sticky header: it is a dialog */
.as-switch { padding: 0 14px 8px; }
.as-chips[hidden], .as-form[hidden], .as-switch[hidden] { display: none; }
.as-sf { display: flex; flex-direction: column; gap: var(--space-4); }
.as-desc textarea { min-height: 64px; }
.as-prefer { align-self: flex-start; }
.as-sf .pp-map { height: 230px; }
.sf { display: grid; gap: var(--space-3); }
.sf-prog { display: grid; gap: var(--space-2); }
.sf-count { font-size: 12.5px; color: var(--ink-3); }
.sf-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 2px; padding: 0; margin: 0; }
.sf-dot { width: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 0;
  background: none; border: 0; cursor: pointer; color: var(--ink-3); font-size: 11.5px; line-height: 1.25; }
.sf-dot-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2);
  background: var(--surface); font-size: 12px; font-weight: 700; }
.sf-dot-t { text-align: center; overflow-wrap: anywhere; }
.sf-dot.ok .sf-dot-n { background: var(--jade-wash); border-color: var(--jade); color: var(--jade); }
.sf-dot.on { color: var(--ink); font-weight: 650; }
.sf-dot.on .sf-dot-n { background: var(--jade); border-color: var(--jade); color: var(--on-jade); }
.sf-dot:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; border-radius: var(--r-sm); }
.sf-bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.sf-bar i { display: block; height: 100%; background: var(--jade); transition: width .2s var(--ease); }
.sf-h { font-size: 16px; font-weight: 700; margin-block-end: var(--space-3); }
.sf-h:focus:not(:focus-visible) { outline: 0; }
.sf-field { margin-block-end: var(--space-4); }
.sf [hidden] { display: none; }
/* the sell wizard hides the fields its listing mode does not ask (functions/_app/modes.js) */
.wiz .field[hidden], .wiz label.check[hidden], .wiz .note[hidden] { display: none; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-chip { position: relative; display: inline-flex; }
.sf-chip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.sf-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1.5px solid var(--line-2);
  border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; transition: all .15s; }
.sf-chip:hover span { border-color: var(--ink-3); color: var(--ink); }
.sf-chip input:checked + span { background: var(--jade); border-color: var(--jade); color: var(--on-jade); }
.sf-chip input:focus-visible + span { outline: 2px solid var(--jade); outline-offset: 2px; }
.sf-num { display: flex; align-items: center; gap: var(--space-2); }
.sf-unit { flex: none; font-size: 13.5px; color: var(--ink-3); }
.sf-find { margin-block-end: 6px; }
.sf-req { color: var(--clay); }
.sf-err { margin-block-start: 6px; font-size: 13px; font-weight: 500; color: var(--clay); }
.sf-tag { display: none; margin-inline-start: var(--space-2); padding: 1px 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600;
  background: var(--jade-wash); color: var(--jade); }
.sf-filled .sf-tag { display: inline-block; }
.sf-msg { font-size: 13.5px; font-weight: 500; color: var(--clay); }
.sf-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; padding-block-start: var(--space-3); border-block-start: 1px solid var(--line); }
.sf-nav .btn { min-height: 42px; }
@media (max-width: 560px) {
  .as-panel { inset-inline: 12px; width: auto; inset-block-end: 84px; max-height: calc(100dvh - 104px); }
  .as-bubble { inset-block-end: 16px; inset-inline-start: 16px; }
  .as-chips { max-height: 112px; overflow-y: auto; }
  .as-panel.as-wide { width: auto; max-height: calc(100dvh - var(--nav-h, 64px) - 96px); }
}

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: 420px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 5px; border-radius: var(--r-pill); margin-block-end: 20px; }
.tab { flex: 1; border: 0; background: transparent; padding: 10px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.tab.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.calc-out { min-height: 200px; }
/* Before the first sum the hint sits in the box the results will fill, beside the
   form, instead of floating in the middle of an empty column. */
.calc-out > .empty { display: grid; place-items: center; min-height: 200px; padding: 28px 22px;
                     border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface); }
.res { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.res.one { grid-template-columns: 1fr; max-width: 520px; }
@media (max-width: 620px) { .res { grid-template-columns: 1fr; } }
.res-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; background: var(--surface); }
.res-card.bad { border-block-start: 3px solid var(--clay); }
.res-card.good { border-block-start: 3px solid var(--jade); }
.res-k { font-size: 13.5px; color: var(--ink-2); margin-block-start: 14px; }
.res-v { font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; line-height: 1.2; margin-block-start: 4px; }
.res-diff { margin-block-start: 18px; padding: 16px 20px; border-radius: var(--r); background: var(--ink); color: var(--paper); font-size: 15px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.res-diff b { font-size: 20px; }

/* ---------- seller wizard ---------- */
.wiz-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
/* minmax(0, 1fr): with a bare 1fr the column grew to its widest child and the sell
   page scrolled sideways at 375px. */
@media (max-width: 900px) { .wiz-wrap { grid-template-columns: minmax(0, 1fr); } .wiz-side { order: -1; } }
.wiz-wrap > * { min-width: 0; }
.wiz { max-width: 680px; }
.wiz legend { margin-block-end: var(--space-2); }
.wstep > legend + .hint { margin-block: 0 var(--space-4); }
.wiz-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); justify-content: flex-end; margin-block-start: var(--space-5); padding-block-start: var(--space-4); border-block-start: 1px solid var(--line); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1.5px solid var(--line-2); background: var(--surface); border-radius: var(--r-pill); padding: 8px 15px;
        font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.pill:hover { border-color: var(--ink-3); color: var(--ink); }
.pill.on { background: var(--jade); border-color: var(--jade); color: var(--on-jade); }
.steps-list { margin: 12px 0 0; padding-inline-start: 20px; display: grid; gap: 9px; font-size: 14.5px; color: var(--ink-2); }
.steps-list li::marker { color: var(--jade); font-weight: 700; }
.done { text-align: center; padding: 30px 10px; }
.done-tick { width: 62px; height: 62px; border-radius: 50%; background: var(--jade-wash); color: var(--jade);
             display: grid; place-items: center; font-size: 30px; margin: 0 auto 18px; }

/* ---------- how it works ---------- */
.howsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.howsteps li { display: flex; gap: 16px; padding: 16px 0; border-block-end: 1px solid var(--line); }
.howsteps li:last-child { border-block-end: 0; }
.howsteps h3 { font-size: 16.5px; margin-block-end: 4px; }
.hn { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
      font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.howsteps.sell .hn { background: var(--jade-wash); color: var(--jade); }
.howsteps.buy .hn { background: var(--ochre-wash); color: var(--ochre-ink); }

/* ---------- folds, the sections fold() writes ----------
   (the base look is the "folds" block near the top; which sections fold and their defaults:
   update/CONVENTIONS.md, "Folds"). A section's heading sits in the summary, so it keeps its
   level for screen readers. */
.fold > .fold-h > :is(h1, h2, h3, h4, h5, h6, p, span) { margin: 0; min-width: 0; }
/* a card or a panel that folds: its summary is the head, its padding stays the card's */
.card.fold > .fold-h { margin-block: -6px; }
.card.fold > .fold-h > .eyebrow { flex-wrap: wrap; }
.unit-similar > .fold-h { min-height: 48px; }
.calc-guide > .fold-h > h2 { font-size: 16px; }
.unit-similar > .fold-b { padding-block-start: var(--space-3); }
.apanel.fold > .fold-h { align-items: center; flex-wrap: nowrap; }
.apanel.fold:not([open]) > .fold-h { border-block-end: 0; }
.apanel.fold[open] > .fold-b { margin-block-start: 0; }
.apanel.fold > .fold-h:focus-visible { outline-offset: -3px; }   /* the panel clips its overflow */
/* .fold-phone: a fold only on a phone (with data-fold-mobile="closed" and open). Above
   600px it is an open heading: no chevron, and the summary is not a control. */
@media (min-width: 601px) {
  .fold-phone > .fold-h { min-height: 0; cursor: default; pointer-events: none; }
  .fold-phone > .fold-h::after { display: none; }
}
@media print {
  .fold::details-content { content-visibility: visible; display: contents; }
  .fold > .fold-h::after { display: none; }
}

/* ---------- faq ---------- */
.faqwrap { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .faqwrap { grid-template-columns: 1fr; gap: 16px; } }
.faqnav { display: flex; flex-direction: column; gap: 2px; position: sticky; inset-block-start: calc(var(--nav-h) + 14px); }
@media (max-width: 860px) { .faqnav { position: static; flex-direction: row; overflow-x: auto; gap: 8px; padding-block-end: 8px; scrollbar-width: none; } .faqnav::-webkit-scrollbar { display: none; } }
.faqnav a { padding: 9px 13px; border-radius: var(--r-sm); font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.faqnav a:hover { background: var(--surface-2); color: var(--ink); }
.faqgroup + .faqgroup { margin-block-start: 34px; }
.faqgroup > h2 { margin-block-end: 10px; }
.faqq { border-block-end: 1px solid var(--line); }
/* each question is a fold (functions/views/_faq.js), closed until asked */
.faqq > .fold-h { gap: 16px; padding: 12px 2px; font-weight: 600; font-size: 16px; }
.faqq > .fold-h::after { color: var(--jade); }
.faqa { padding: 0 2px 18px; color: var(--ink-2); font-size: 15px; line-height: 1.75; max-width: 68ch; }

/* ---------- compare ---------- */
.cmp-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.cmp { width: 100%; border-collapse: collapse; min-width: 640px; }
.cmp th, .cmp td { padding: 13px 16px; text-align: start; border-block-end: 1px solid var(--line); vertical-align: middle; }
.cmp thead th { border-block-end: 2px solid var(--line-2); vertical-align: top; position: relative; }
.cmp-lbl { width: 210px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
.cmp-head { display: grid; gap: 4px; }
.cmp-head img { width: 100%; max-width: 190px; height: 118px; object-fit: cover; border-radius: var(--r-sm); }
.cmp-head strong { font-size: 15.5px; }
.cmp-x { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; width: 26px; height: 26px;
         display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 17px; }
.cmp-x:hover { background: var(--clay-wash); color: var(--clay); }
.cmp td { font-size: 15px; }
.cmp td.win { background: var(--jade-wash); font-weight: 700; }
.cmp td.neg .num { color: var(--clay); }
.wintag { display: inline-block; margin-inline-start: 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
          letter-spacing: .04em; color: var(--jade); }
.cmp tr:last-child td, .cmp tr:last-child th { border-block-end: 0; }

/* ---------- photo upload ---------- */
.upl { margin-block-start: 8px; padding-block-start: 20px; border-block-start: 1px solid var(--line); }
.upl h3 { font-size: 17px; }
.uplbox { display: grid; place-items: center; margin-block-start: 14px; padding: 30px 20px; cursor: pointer;
          border: 2px dashed var(--line-2); border-radius: var(--r); color: var(--ink-2); font-weight: 600;
          transition: border-color .18s, background .18s; text-align: center; }
.uplbox:hover { border-color: var(--jade); background: var(--jade-wash); color: var(--jade); }
.uplgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-block-start: 14px; }
.uplcell { position: relative; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.uplcell img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .25s; }
.uplcell.done img { opacity: 1; }
.uplcell.done::after { content: "✓"; position: absolute; inset-block-end: 4px; inset-inline-end: 6px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--jade); color: var(--on-jade); font-size: 12px;
  display: grid; place-items: center; }
.uplcell.bad { outline: 2px solid var(--clay); outline-offset: -2px; }

/* unit page: gallery buttons, lightbox, provenance, QR, report */
.gal-i { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; min-height: 0; }
.gal-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal .gal-i.lead { grid-row: span 2; }
/* A phone shows the cover alone. It needs a shape of its own: in a one-column grid with
   auto rows, "height: 100%" of an auto-height box is 0 and the photo vanished. The count
   tells the reader a tap opens the rest. */
@media (max-width: 620px) {
  .gal .gal-i:not(.lead) { display: none; }
  .gal .gal-i.lead { grid-row: auto; aspect-ratio: 4 / 3; }
  .gal { position: relative; }
  .gal[data-count]:not([data-count="1"])::after {
    content: "1 / " attr(data-count); position: absolute; pointer-events: none; inset-block-end: 10px; inset-inline-end: 10px;
    padding: 4px 10px; border-radius: var(--r-pill); background: var(--viewer-dim); color: var(--on-photo);
    font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; direction: ltr;
  }
}
.gal-more { position: absolute; inset: 0; display: grid; place-items: center; background: var(--viewer-dim); color: var(--on-photo); font-size: 22px; font-weight: 700; }
.lb { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--viewer); color: var(--on-photo); }
.lb::backdrop { background: color-mix(in srgb, var(--viewer) 80%, transparent); }
.lb-strip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-strip figure { flex: 0 0 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: center; position: relative; }
.lb-strip img { max-width: 100%; max-height: 92dvh; object-fit: contain; }
.lb-strip figcaption { position: absolute; inset-block-end: 14px; opacity: .8; }
.lb-x, .lb-nav { position: absolute; background: var(--viewer-glass); color: var(--on-photo); border: 0; border-radius: 999px; width: 44px; height: 44px; font-size: 26px; cursor: pointer; }
.lb-x { inset-block-start: 14px; inset-inline-end: 14px; }
.lb-nav { inset-block-start: calc(50% - 22px); }
.lb-prev { inset-inline-start: 14px; } .lb-next { inset-inline-end: 14px; }
[dir=rtl] .lb-prev, [dir=rtl] .lb-next { transform: scaleX(-1); }
@media (hover: none) { .lb-nav { display: none; } }
.prov { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.prov-doc { background: var(--jade-wash); color: var(--jade); }
.prov-owner { background: var(--surface-2); color: var(--ink-2); }
.qr-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.qr svg { width: 100%; height: auto; display: block; border-radius: 6px; }
dialog.rep { max-width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); }
dialog.rep::backdrop { background: color-mix(in srgb, var(--viewer) 35%, transparent); }

/* developer / project pages */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.dir-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s var(--ease); }
.dir-card:hover { border-color: var(--jade); }
.dir-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.dir-top > * { min-width: 0; }
@media (max-width: 800px) { .dir-top { grid-template-columns: 1fr; } }
.h1-link { color: inherit; text-decoration: none; } .h1-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.terms-form { margin-block-start: 10px; }
.tf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.tf-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.tf-grid .tf-wide { grid-column: 1 / -1; }
.tf-grid .tf-check { display: flex; align-items: center; gap: 6px; }

/* deal tracker */
.track { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; text-align: start; }
.track li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; position: relative; padding: 0 0 14px; }
.track li:not(:last-child)::before { content: ''; position: absolute; inset-inline-start: 7px; inset-block: 18px 0; width: 2px; background: var(--line); }
.track li.done:not(:last-child)::before { background: var(--jade); }
.track-dot { justify-self: start; box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); margin-block-start: 2px; }
.track li.done .track-dot { background: var(--jade); border-color: var(--jade); }
.track li.next .track-dot { border-color: var(--jade); box-shadow: 0 0 0 4px var(--jade-wash); }
.track li.todo { opacity: .6; }
.track.cancelled li { opacity: .5; }
.deal-note { width: 100%; min-width: 200px; }
.track p { text-align: start; margin: 0; }
.dlv { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.dlv li { padding: 0; }
.upd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.upd { margin: 0; padding: 0; overflow: hidden; }
.upd img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.upd figcaption { padding: 12px 14px; }
/* the project page (functions/views/_project.js) */
.proj-h1 { font-size: clamp(26px, 3.4vw, 38px); margin-block: var(--space-3) var(--space-1); }
.proj-sub { margin-block-end: var(--space-5); }
.proj-sec { margin-block-start: var(--space-6); }
.proj-h { margin-block-end: var(--space-3); }
.proj-sec.fold > .fold-b { padding-block: var(--space-2) 0; }
.proj-stack { display: grid; gap: var(--space-4); }
.proj-stack > * { min-width: 0; }
.proj-kv { margin-block-start: var(--space-2); }
.proj-row { gap: 10px; flex-wrap: wrap; }
.proj-rec { margin-block-start: var(--space-4); padding-block-start: var(--space-3); border-block-start: 1px solid var(--line); display: grid; gap: var(--space-1); }
.proj-vs { font-size: 17px; }
.proj-scroll { overflow-x: auto; }
.proj-about { white-space: pre-line; }
.proj-amen { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.proj-mode + .proj-mode { margin-block-start: var(--space-5); }
.proj-plan { margin: 0; padding: 0; overflow: hidden; max-width: 760px; }
.proj-plan img { width: 100%; height: auto; display: block; background: var(--surface-2); }
.proj-plan figcaption { padding: var(--space-3) var(--space-4); }
.proj-card-h { font-size: 17px; }
.proj-bar { margin-block: var(--space-2) var(--space-1); }

/* the place guides (functions/views/_guides.js); the rest is the project page's */
.gd-card .proj-card-h { margin: 0; }
.gd-inline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.gd-devs { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.gd-devs li { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); align-items: baseline; }
/* guide tables: a quiet header band, roomy rows with one continuous rule each, figures
   lined up at the end of their column, a soft hover (owner, 2026-09-28: "too simple") */
.gd-table { font-size: 14.5px; }
.c-table.gd-table thead th { background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 650; letter-spacing: .02em;
  text-transform: uppercase; border-block-end: 1px solid var(--line); white-space: nowrap; }
.gd-table thead th:first-child { border-start-start-radius: var(--r-sm); border-end-start-radius: var(--r-sm); }
.gd-table thead th:last-child { border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); }
.c-table.gd-table th, .c-table.gd-table td { padding: 10px 12px; vertical-align: middle; }
.gd-table tbody tr:last-child > * { border-block-end: 0; }
.gd-table tbody tr:hover > * { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.gd-table th[scope="row"] { font-weight: 600; }
/* the name is a line of its own (not a link inside running text, which would need the underline) */
.gd-table th[scope="row"] > .link { display: block; inline-size: fit-content; }
.gd-table:not(.gd-wide):not(.gd-bars) td:not(:first-child), .gd-table:not(.gd-wide):not(.gd-bars) thead th:not(:first-child) { text-align: end; }
.gd-src { display: block; font-weight: 400; }
/* "30% below X" under a neighbour's name: a small tag, jade when cheaper, clay when dearer */
.gd-vs { display: inline-block; margin-block-start: 4px; padding: 1px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--ink-2); }
.gd-vs[data-dir="below"] { background: var(--jade-wash); color: var(--jade); }
.gd-vs[data-dir="above"] { background: color-mix(in srgb, var(--clay) 12%, transparent); color: var(--clay); }
/* the projects table keeps readable columns on a phone and scrolls inside its card */
.gd-wide { min-inline-size: 36rem; }
.gd-modes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.gd-bars td { white-space: nowrap; }
/* the bar's width carries the figure beside it (a style="" width, which the conventions allow) */
.gd-bar { display: inline-block; inline-size: 120px; max-inline-size: 30vw; block-size: 8px; border-radius: var(--r-pill);
  background: var(--surface-2); vertical-align: middle; overflow: hidden; margin-inline-end: var(--space-2); }
.gd-bar i { display: block; block-size: 100%; background: var(--jade); border-radius: inherit; }
.gd-map-h { padding: var(--space-4) var(--space-4) var(--space-2); }
.gd-map-foot { padding: var(--space-3) var(--space-4) var(--space-4); display: grid; gap: var(--space-1); }
.gd-cta { display: grid; gap: var(--space-2); }
.gd-news { display: grid; gap: var(--space-3); }

/* trend chart (functions/_chart.js) */
.chart { margin: 0; max-width: 560px; }
.chart figcaption { margin-block-end: 8px; }
.chart-box { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.chart .c-grid { stroke: var(--line); stroke-width: 1; }
.chart .c-tick { fill: var(--ink-3); font-size: 11px; }
.chart .c-band { fill: var(--jade); opacity: .14; }
.chart .c-line { fill: none; stroke: var(--jade); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .c-dot, .chart .c-hover { fill: var(--jade); stroke: var(--surface); stroke-width: 2; }
.chart .c-label { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .c-cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .c-tip { position: absolute; top: -6px; transform: translateY(-100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; line-height: 1.4; box-shadow: var(--sh-2); pointer-events: none; white-space: nowrap; }
.chart details { margin-block-start: 8px; }
.c-table { border-collapse: collapse; margin-block-start: 8px; width: 100%; }
.c-table th, .c-table td { padding: 4px 8px; border-block-end: 1px solid var(--line); text-align: start; }
/* a cell must stay a cell: .num's inline-block on a td/th breaks the row's rule line */
td.num, th.num { display: table-cell; }

/* Price history (unit page) and the "price dropped" badge. A cut is good news for the
   reader, so it is jade, not the red of a loss. */
.tag-cut { background: var(--jade-wash); color: var(--jade); border-color: transparent; }
.u-badges .tag-cut { background: var(--photo-jade); color: var(--on-photo); }
.phist-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.phist-list li { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: 10px; align-items: baseline;
  padding-inline-start: 12px; border-inline-start: 2px solid var(--line); }
.phist-list li.phist-cut { border-inline-start-color: var(--jade); }
.phist-list li.phist-raise { border-inline-start-color: var(--ochre); }
.price-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-block-start: 8px; }
.price-form input { width: 160px; max-width: 100%; }
/* A search input keeps its intrinsic width inside a flex row unless told otherwise;
   on /opportunities at 375px that pushed the page 15px sideways. */
.hsearch-in input { min-width: 0; }
.price-edit summary { cursor: pointer; margin-block-start: 6px; width: fit-content; }
.plan-card .mrow span { min-width: 0; }
.plan-card .plan-rate { margin-block: 12px 6px; }
.plan-card .plan-rate input { max-width: 140px; }
.plan-card .mrow b { white-space: nowrap; }
.plan-card .mrow.total b { font-size: 17px; }
.dupes ul { margin: 6px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.dupes li { overflow-wrap: anywhere; }
/* A grid track of 1fr will not shrink below its widest child; on /sell at 375px that
   was a few pixels of sideways scroll. */
.wiz-wrap > * { min-width: 0; }
@media (max-width: 900px) { .wiz-wrap { grid-template-columns: minmax(0, 1fr); } }
.near-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; } .near-list li { display: flex; justify-content: space-between; gap: 10px; }
.rep-table td, .rep-table th { white-space: nowrap; }
@media (max-width: 620px) { main { padding-block-end: 84px; } }   /* the WhatsApp and assistant buttons float over the bottom corners; nothing should end up stuck under them */
.passport { margin: 10px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.tag-disc { background: var(--ochre-wash); color: var(--ochre-ink); border-color: transparent; } .u-badges .tag-disc { background: var(--photo-ochre); color: var(--on-photo); }
/* the legal pages: one fold per section (functions/views/_legal.js) */
.legal-folds { margin-block-start: var(--space-5); border-block-start: 1px solid var(--line); }
.legal-folds > .fold { border-block-end: 1px solid var(--line); }
.legal-folds > .fold > .fold-h { padding-block: var(--space-2); }
.legal-folds > .fold > .fold-b { padding-block-end: var(--space-4); }
.guide { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.guide li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.guide-fold > .fold-h { min-height: 36px; }
.guide-fold > .fold-b { padding-block: 0; }
.guide-n { width: 36px; height: 36px; border-radius: 50%; background: var(--jade-wash); color: var(--jade); font-weight: 700; display: grid; place-items: center; }

/* ---------- the app shell (Android/iOS) ----------
   public/assets/native.js puts .in-app on <html> inside the apps, and .app-tabs when the
   app has its tab bar on (mobile/app.config.json features.tabBar). Nothing here applies
   on the website. */
.apptabs { display: none; }
.in-app.app-tabs { --apptabs-h: 56px; }
.in-app.app-tabs .apptabs {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 90;
  padding-block-end: env(safe-area-inset-bottom); background: var(--surface); border-block-start: 1px solid var(--line);
}
.apptabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--apptabs-h, 56px);
             padding: 6px 2px; color: var(--ink-3); font-size: 11px; line-height: 1.2; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.apptabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apptabs a[aria-current="page"] { color: var(--jade); font-weight: 600; }
.apptabs a:focus-visible { outline: 3px solid var(--jade); outline-offset: -3px; }
.apptabs svg { width: 23px; height: 23px; flex: none; }
.in-app.app-tabs body { padding-block-end: calc(var(--apptabs-h) + env(safe-area-inset-bottom)); }
.in-app.app-tabs .wa, .in-app.app-tabs .as-bubble { inset-block-end: calc(var(--apptabs-h) + env(safe-area-inset-bottom) + 14px); }
/* While a bar is stuck to the bottom of the screen (the filter panel's Show N results, the
   listing editor's Save), the WhatsApp and assistant buttons float above it rather than
   over its buttons. `translate` leaves every page's own inset rule alone. */
@media (max-width: 980px) {
  :root:has(.f-panel.is-open), :root:has(.ed-save) { --bar-lift: 80px; }
  .wa, .as-bubble, .as-panel { translate: 0 calc(-1 * var(--bar-lift, 0px)); }
}
/* bars that stick to the bottom of the page stick above the tab bar instead of under it */
.in-app.app-tabs .f-foot, .in-app.app-tabs .ed-save { inset-block-end: calc(var(--apptabs-h) + env(safe-area-inset-bottom)); }
.in-app.app-tabs .as-panel { inset-block-end: calc(var(--apptabs-h) + env(safe-area-inset-bottom) + 82px); }
.in-app.app-tabs.mapjs .map-shell { height: calc(100dvh - var(--nav-h) - var(--apptabs-h) - env(safe-area-inset-bottom)); }
/* Pull to refresh: the arrow native.js draws while the page is pulled down from the top. */
.ptr { position: fixed; inset-inline: 0; inset-block-start: calc(var(--nav-h) + 6px); z-index: 95; display: grid; place-items: center;
       pointer-events: none; opacity: 0; transition: opacity .15s; }
.ptr span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface);
            color: var(--jade); box-shadow: var(--sh-2); font-size: 20px; line-height: 1; }
.ptr.on { opacity: 1; }
.ptr.go span { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ptr.go span { animation: none; } }
/* "Take a photo" beside a file input in the sell flow (native.js, features.camera). */
.cam-btn { margin-block-start: 8px; }

/* ---------- news (N36, functions/views/_news.js) ---------- */
.news-list { display: grid; gap: var(--space-4); }
.news-teaser { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .news-teaser { grid-template-columns: 1fr; } }
.news-card { display: grid; gap: var(--space-2); align-content: start; }
.news-card > * { margin: 0; min-width: 0; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.news-h { font-size: clamp(18px, 2.2vw, 22px); overflow-wrap: anywhere; }
.news-h a:hover { color: var(--jade); }
.news-src { overflow-wrap: anywhere; }
.news-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.news-filter select { width: auto; min-width: 180px; max-width: 100%; }
.news-story h1 { overflow-wrap: anywhere; }
.news-story h2 { font-size: 20px; }
/* the link out sits right under the headline (owner, 2026-09-28): no separate box */
.news-links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-1); }
.news-links a { overflow-wrap: anywhere; }
/* the daily highlights (N36b): an edition's topics, each with its intro and headlines */
.hl { display: grid; gap: var(--space-3); margin-block: var(--space-4); }
.hl > * { margin: 0; min-width: 0; }
.hl-title { font-size: clamp(22px, 3vw, 28px); overflow-wrap: anywhere; }
.hl-lead { overflow-wrap: anywhere; }
.hl-sec { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.hl-sec > * { margin: 0; min-width: 0; }
.hl-topic { font-size: 18px; }
.hl-intro { overflow-wrap: anywhere; }
.hl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.hl-item { display: grid; gap: 2px; }
.hl-item a { overflow-wrap: anywhere; font-weight: 600; }
.hl-archive { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.hl-archive > li { display: grid; gap: var(--space-2); }
.hl-archive > li > * { margin: 0; min-width: 0; }
.news-form { display: grid; gap: var(--space-4); }
.news-form > * { min-width: 0; margin-block: 0; }

/* ---------- spacing utilities ---------- */
/* One-off spacing on the step scale, instead of style="margin…" in a view. Last in the
   file so they win over a component's own margin at the same specificity. */
.mt-1 { margin-block-start: var(--space-1); } .mt-2 { margin-block-start: var(--space-2); }
.mt-3 { margin-block-start: var(--space-3); } .mt-4 { margin-block-start: var(--space-4); }
.mt-5 { margin-block-start: var(--space-5); } .mb-3 { margin-block-end: var(--space-3); }
.mb-1 { margin-block-end: var(--space-1); } .mb-4 { margin-block-end: var(--space-4); }
.row-tight { gap: var(--space-2); }
.sub-h { margin-block: var(--space-5) var(--space-2); }   /* a heading between blocks of a tab or a form */

/* ---------- from account.css ----------
   account.css is linked only on sign-in, account and admin pages (functions/[[route]].js,
   ROUTE_CSS). These rules style things drawn elsewhere too, so they live here, last, where
   they cascade as they did: the header's message bell (every page once signed in), the
   floor-plan tabs of the unit page's lightbox, and the copyable address and scrolling table
   of the AI-assistant pages (/developers/agents and Settings). */

/* the unread dot on the nav bell */
.nav-bell { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px;
            border-radius: var(--r-sm); color: var(--ink-2); }
.nav-bell:hover { background: var(--surface-2); color: var(--ink); }
.bell-dot { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; min-width: 17px; height: 17px;
            padding-inline: 4px; border-radius: var(--r-pill); background: var(--clay); color: var(--on-clay);
            font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

/* Floor plans in the unit page lightbox (functions/views/_unit.js) */
.lb-tabs { position: absolute; inset-block-start: 14px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 2;
           display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--viewer-glass); }
[dir=rtl] .lb-tabs { transform: translateX(50%); }
.lb-tabs button { border: 0; background: none; color: var(--on-photo); padding: 8px 14px; border-radius: 999px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.lb-tabs button[aria-selected=true] { background: var(--on-photo); color: var(--viewer); }
.lb-strip[hidden] { display: none; }
.lb-plans img { background: var(--sheet); border-radius: 6px; }

/* An address to copy: left to right in both languages, wraps rather than scrolling. */
/* a feed opened in a browser (functions/_render.js feedResponse) */
.feed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.feed-list p { margin: 4px 0 0; }
.codebox { display: block; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--r);
           background: var(--surface-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px;
           direction: ltr; text-align: start; overflow-wrap: anywhere; user-select: all; }
/* a table wider than a phone scrolls inside its box, not the page */
.table-scroll { overflow-x: auto; }
.table-scroll code, .kv code { font-size: .92em; }
/* ---------- share (functions/_render.js shareBox, public/assets/share.js) ----------
   The summary is the button; the panel drops under it. `.share-inline` draws the panel in
   place (inside a menu). A component may size and place the summary, not restyle the panel. */
.share { position: relative; display: inline-block; }
.share-sum { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.share-sum::-webkit-details-marker { display: none; }
.share-pop { position: absolute; z-index: 40; inset-block-start: calc(100% + 6px); inset-inline-start: 0; width: max-content; min-width: 200px;
  display: grid; gap: 2px; padding: var(--space-2); background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-3); }
.share-i { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-xs); background: none; color: var(--ink);
  font: inherit; font-size: 14.5px; font-weight: 500; text-align: start; text-decoration: none; cursor: pointer; }
.share-i:hover { background: var(--surface-2); color: var(--ink); }
.share-i:focus-visible, .share-sum:focus-visible { outline: 2px solid var(--jade); outline-offset: 1px; }
.share-ok { margin: 0; padding-inline: 10px; font-size: 13px; color: var(--jade-2); }
.share-ok:empty { display: none; }
.share-inline { display: block; }
.share-inline > .share-pop { position: static; width: auto; min-width: 0; padding: 0 0 0 var(--space-3); border: 0; box-shadow: none; background: none; }
[dir="rtl"] .share-inline > .share-pop { padding: 0 var(--space-3) 0 0; }

/* The reels teaser on the home page (N40): each card shows the video's own thumbnail by
   default (owner decision, 2026-09-28), or the plain gradient when there is none. The
   feed's own styles are in reels.css; .reel-badge is drawn here and there. */
.reel-minis { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }
/* Like a video site (owner, 2026-09-28): the picture stays clean with only the platform
   badge on it; the title (two lines) and the channel sit under it. No text over the
   video's own picture, which usually has its own words burned in. */
.reel-mini { display: grid; gap: 6px; align-content: start; color: inherit; }
.reel-mini:hover { color: inherit; }
.reel-mini:hover .reel-mini-t { text-decoration: underline; }
.reel-mini-pic { position: relative; display: block; aspect-ratio: 5 / 6; overflow: hidden; border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--photo-jade), var(--viewer) 70%); color: var(--on-photo); }
.reel-mini-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-mini .reel-badge { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; display: inline-flex; padding: 3px 10px;
  border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; background: var(--photo-glass); color: var(--on-photo); }
/* no thumbnail: our plain poster, with the caption on it */
.reel-mini-cap { position: absolute; inset: auto var(--space-4) var(--space-4); font-size: 17px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.reel-mini-t { font-size: 15px; font-weight: 700; line-height: 1.4; margin-block-start: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reel-mini-by { display: block; }

/* ---------- plans and pricing (N23, functions/views/_billing.js) ---------- */
.plans { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.plans > * { min-width: 0; }
.plan-card { display: flex; flex-direction: column; gap: var(--space-2); }
.plan-card > * { margin: 0; }
.plan-card .form-actions { margin-block-start: auto; padding-block-start: var(--space-2); }
.plan-current { border-color: var(--jade); }
.plan-price { font-size: 22px; font-weight: 700; }
.inline-form { display: inline; }
.inv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.inv-list > li { border-block-end: 1px solid var(--line); padding-block: var(--space-2); }
.bill-log { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-1); overflow-wrap: anywhere; }
.bill-form { margin-block-start: var(--space-2); }

/* ---------- sponsored slots (N37, functions/views/_sponsored.js) ----------
   Never a listing's look: no photo, no badge, no jade (jade is what "verified" wears), a
   dashed frame on the muted surface, and the word «مُموَّل» / "Sponsored" on top. The
   whole card is the link (the ::after stretches it); one card per slot. */
.spon { position: relative; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding: var(--space-4) var(--space-5);
  border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); color: var(--ink); }
.spon > * { margin: 0; }
.spon-tag { align-self: flex-start; padding: 1px var(--space-2); border: 1px solid var(--ink-3); border-radius: var(--r-xs);
  font-size: 12.5px; font-weight: 600; line-height: 1.6; color: var(--ink-2); }
.spon-link { color: var(--ink); text-decoration: none; }
.spon-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.spon-link:hover .spon-title, .spon-link:focus-visible .spon-title { text-decoration: underline; }
.spon:focus-within { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.spon-link:focus-visible { outline: none; }
.spon-title { font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.spon-sub, .spon-by { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.spon-sec .spon { max-width: 760px; }
.units > .spon, .news-list > .spon { justify-content: center; }
.spon-stats { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; }
.spon-stats > div { display: flex; flex-direction: column; }
.spon-stats dt { font-size: 12.5px; color: var(--ink-3); }
.spon-stats dd { margin: 0; font-weight: 600; }

/* ---------- share (functions/_render.js share(), public/assets/share.js) ----------
   A <details>: the button (or a ⋯ for a card's menu) and a small panel of rows. Used by
   Discover and any page that shares its own URL; update/CONVENTIONS.md "Sharing". */
.share { position: relative; display: inline-block; }
.share > summary { list-style: none; cursor: pointer; }
.share > summary::-webkit-details-marker { display: none; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: var(--r-pill);
             border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; }
.share-btn:hover, .share[open] > .share-btn { border-color: var(--ink-3); }
.share-more { width: 40px; min-height: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; color: var(--ink-2); }
.share-more:hover, .share[open] > .share-more { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.share > summary:focus-visible { outline: 3px solid var(--jade); outline-offset: 2px; }
.share-pop { position: absolute; z-index: 40; inset-block-start: calc(100% + 6px); inset-inline-end: 0; display: grid; min-width: 210px; padding: 6px;
             background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--sh-3); }
.share-row { display: block; width: 100%; min-height: 40px; padding: 9px 12px; border: 0; border-radius: var(--r-xs); background: none;
             color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500; text-align: start; cursor: pointer; }
.share-row:hover, .share-row:focus-visible { background: var(--surface-2); color: var(--ink); }
.share-row[hidden] { display: none; }

/* ---------- the FAQ block (N51): developer, project, place-guide and blog pages ----------
   Each question is a fold (native <details>, update/CONVENTIONS.md "Folds"); the answer is
   the safe markdown subset or an answer built from our data (functions/views/_editorial.js). */
.faq-list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.faq-i + .faq-i { border-block-start: 1px solid var(--line); }
.faq-i > .fold-h { padding: var(--space-4) var(--space-5); }
.faq-i > .fold-h:hover { background: var(--surface-2); }
.faq-q { font-size: 16.5px; font-weight: 600; line-height: 1.45; margin: 0; }
.faq-i > .fold-b { padding: 0 var(--space-5) var(--space-4); }
.faq-i .ed-prose { max-width: 72ch; overflow-wrap: anywhere; }
.faq-i .ed-prose > * + * { margin-block-start: var(--space-2); }
.faq-i .ed-prose p { margin: 0; }
.faq-i .ed-prose ul { margin: 0; padding-inline-start: 1.2em; }
.faq-i .ed-prose a { color: var(--jade); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .faq-i > .fold-h { padding: var(--space-3) var(--space-4); } .faq-i > .fold-b { padding: 0 var(--space-4) var(--space-3); } }

/* ---------- the Verified identity badge (N60, functions/views/_identity.js idBadge) ----------
   A check in a rosette, in the ink's blue-less accent: never jade (jade is "documents
   verified") and never the partner tag. It says who, not how good (its title). */
.idb { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; font-size: 13px; font-weight: 600; color: var(--gold-ink); white-space: nowrap; }
.idb svg { flex: none; color: var(--gold); }
.idb-compact { gap: 0; }
.idb-help { color: var(--ink-2); }
.u-badges .idb-tag { background: var(--surface); color: var(--gold-ink); }
.idb .idb-k { stroke: var(--paper); }
