/* SimPlan V2 · premium buyer experience (RTL, Hebrew).
   Design language: "editorial real-estate" · warm gallery-white canvas, deep
   ink, a single bronze accent. Type: Rubik (display) over Assistant (body) · 
   modern geometric Hebrew, no newspaper serifs.
   Depth comes from layered soft shadows and imagery, not borders. */

:root {
  --ink:        #161c24;
  --ink-deep:   #0d1218;
  --ink-soft:   #3d4550;
  --paper:      #f6f3ec;
  --surface:    #fffdf8;
  --hairline:   #e7e1d3;
  --hairline-2: #d8d0bc;
  --muted:      #877f6e;
  --bronze:     #a07c3f;
  --bronze-hi:  #c8a563;
  --bronze-soft:#f2e9d8;
  --best:       #2e7d4f;
  --best-soft:  #e8f4ec;
  --danger:     #a8402c;
  --serif: "Rubik", "Segoe UI", Arial, sans-serif;   /* display face */
  --sans: "Assistant", "Segoe UI", Arial, sans-serif; /* body face */
  --sh-1: 0 1px 2px rgba(22,28,36,.05), 0 4px 14px rgba(22,28,36,.06);
  --sh-2: 0 2px 6px rgba(22,28,36,.08), 0 14px 34px rgba(22,28,36,.12);
  --sh-3: 0 6px 18px rgba(22,28,36,.14), 0 30px 70px rgba(22,28,36,.22);
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(160,124,63,.25); }

.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 28px; }

/* ── buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--ink);
  background: transparent; color: var(--ink);
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  text-decoration: none;
  transition: background .16s, color .16s, border-color .16s, transform .16s, box-shadow .16s;
}
.btn:hover { background: var(--ink); color: var(--surface); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-deep); box-shadow: var(--sh-1); }
.btn.bronze { background: var(--bronze); border-color: var(--bronze); color: #fff; }
.btn.bronze:hover { background: #8a6a33; border-color: #8a6a33; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: transparent; color: var(--ink); text-decoration: underline; }
.btn.small { padding: 6px 14px; font-size: 13px; }
/* there was no disabled style at all, so a blocked button looked live and felt
   broken when nothing happened */
.btn:disabled, .btn[disabled] { opacity: .42; cursor: not-allowed; }
.btn:disabled:hover, .btn[disabled]:hover { background: transparent; color: var(--ink-soft); }
.btn.primary:disabled:hover, .btn.bronze:disabled:hover { background: var(--ink); color: var(--surface); }
.btn.big { padding: 13px 32px; font-size: 16px; font-weight: 700; }
.btn.onimg { border-color: rgba(255,255,255,.85); color: #fff; }
.btn.onimg:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ── top bar ─────────────────────────────────────────────────── */
.topbar {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  background: rgba(13,18,24,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .25s;
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 26px;
}
.dev-brand { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.dev-mark {
  width: 40px; height: 40px; flex: none; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #c8a563 0%, var(--bronze) 100%);
  color: #fff;
}
.dev-mark svg { width: 24px; height: 24px; }
/* real contractor logo (a wide lockup) · drop the bronze chip, show it as-is */
.dev-mark-logo { width: auto; min-width: 40px; max-width: 150px; height: 42px;
  border-radius: 0; background: none; }
.dev-mark-logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }
.footer .dev-mark-logo { height: 46px; max-width: 168px; }
.dev-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.dev-eyebrow { font-size: 10px; letter-spacing: .24em; color: rgba(255,255,255,.55); font-weight: 500; }
.dev-name {
  font-family: var(--serif); font-weight: 700; font-size: 16.5px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* the developer's own logo, on a light chip so a colored mark survives the dark bar */
.dev-logo-chip { display: inline-flex; align-items: center; background: #fff;
  border-radius: 8px; padding: 4px 10px; margin-top: 2px; }
.dev-logo-chip img { height: 26px; width: auto; max-width: 130px; object-fit: contain; display: block; }
.dev-logo-chip .sim-brand { font-size: 21px; }
/* SimPlan as the developer (the demo): the logo's dark form, as in the bar beside it, on a dark chip */
.dev-logo-chip.dark { background: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
/* the project's own brand replaces the typographic hero title */
.hero-title-logo img { height: clamp(90px, 14vw, 150px); width: auto; max-width: min(80vw, 520px);
  object-fit: contain; display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.35)); }
.topnav { display: flex; gap: 22px; margin-inline-start: 12px; }
.topnav a {
  color: rgba(255,255,255,.75); text-decoration: none;
  font-size: 14px; font-weight: 500; letter-spacing: .02em;
  padding-block: 4px; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.topnav a:hover { color: #fff; border-color: var(--bronze-hi); }
.powered { margin-inline-start: auto; font-size: 12px; color: rgba(255,255,255,.55); white-space: nowrap; }
.powered b { color: #fff; font-weight: 700; }

/* ── hero ────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 88vh;
  display: flex; align-items: flex-end;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  transform: scale(1.04);
  animation: heroIn 2.2s ease-out both;
}
@keyframes heroIn { from { transform: scale(1.12); opacity: .6; } to { transform: scale(1.04); opacity: 1; } }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(13,18,24,.42) 0%, rgba(13,18,24,.05) 32%, rgba(13,18,24,.78) 88%);
}
.hero-inner {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 140px 28px 54px;
}
.hero-eyebrow {
  font-size: 13px; letter-spacing: .3em; font-weight: 600;
  color: #e7cf9f; margin: 0 0 16px;
}
/* the fictional demo says so above its name (Yuval, 2026-10-19) */
.hero-demo {
  display: inline-block; margin: 0 0 14px; padding: 5px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.28);
  font-size: 14px; font-weight: 600; color: #fff;
}
.hero-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(42px, 6vw, 72px); line-height: 1.08;
  margin: 0 0 10px; letter-spacing: -1px;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero-city { font-size: 20px; font-weight: 400; color: rgba(255,255,255,.85); margin: 0 0 26px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-m);
  overflow: hidden;
  max-width: 760px;
}
.hstat {
  flex: 1 1 0; min-width: 130px;
  padding: 18px 26px;
  border-inline-start: 1px solid rgba(255,255,255,.14);
}
.hstat:first-child { border-inline-start: none; }
.hstat-v { display: block; font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.1; }
.hstat-k { display: block; font-size: 12.5px; color: rgba(255,255,255,.66); margin-top: 3px; letter-spacing: .04em; }

/* ── about strip ─────────────────────────────────────────────── */
.about { padding: 74px 28px 8px; }
.about-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 60px; align-items: start; }
.about-h {
  font-family: var(--serif); font-weight: 700; font-size: 34px;
  line-height: 1.25; margin: 0 0 18px; letter-spacing: -.3px;
}
.about-h::after {
  content: ""; display: block; width: 64px; height: 3px;
  background: var(--bronze); margin-top: 18px; border-radius: 2px;
}
.about-p { font-size: 17px; line-height: 1.85; color: var(--ink-soft); margin: 0; }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.afact {
  background: var(--surface); border-radius: var(--r-s);
  box-shadow: var(--sh-1);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.afact-v { font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--ink); }
.afact-k { font-size: 12.5px; color: var(--muted); }

/* ── section headers ─────────────────────────────────────────── */
.apts-sec { padding-top: 40px; }
.sec-head { margin-bottom: 26px; }
.sec-title {
  font-family: var(--serif); font-weight: 800; font-size: 36px;
  margin: 0 0 6px; letter-spacing: -.6px;
}
.sec-sub { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ── sticky toolbar ──────────────────────────────────────────── */
.toolbar-wrap {
  /* pinned right under the real header stack (heights measured at runtime;
     --stgbar-h is 0 when the stage bar is absent) */
  position: sticky; top: calc(var(--topbar-h, 57px) + var(--stgbar-h, 0px)); z-index: 40;
  padding-block: 10px;
  background: linear-gradient(var(--paper) 82%, rgba(246,243,236,0));
}
.toolbar {
  background: var(--surface);
  border-radius: var(--r-m);
  box-shadow: var(--sh-2);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
/* a group wraps inside the toolbar instead of running off its edge (14
   buildings used to overflow the card and force a sideways drag) */
.tb-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .05em; }
.chip {
  border: 1px solid var(--hairline-2);
  background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 5px 15px;
  font-size: 13.5px; font-weight: 600;
  transition: all .14s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.tb-sep { width: 1px; align-self: stretch; background: var(--hairline); }
/* overflow chips: the rest of a long group, revealed by the "+N עוד" chip */
.tb-rest { display: contents; }
.tb-rest[hidden] { display: none; }
.tb-more { border-style: dashed; color: var(--bronze); border-color: var(--bronze); }
.tb-more:hover { background: var(--bronze-soft); border-color: var(--bronze); color: var(--bronze); }
.tb-more.on { background: var(--bronze-soft); border-color: var(--bronze); color: var(--bronze); }
.tb-range { display: flex; align-items: center; gap: 10px; }
.tb-range input[type=range] { accent-color: var(--bronze); width: 150px; }
.tb-range output { font-size: 13px; font-weight: 700; min-width: 86px; }
.tb-select {
  border: 1px solid var(--hairline-2); border-radius: 999px;
  background: transparent; color: var(--ink);
  padding: 6px 14px; font-size: 13.5px; font-weight: 600; font-family: inherit;
}
.tb-count { margin-inline-start: auto; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.tb-count b { color: var(--ink); font-size: 15px; }

/* ── apartment cards ─────────────────────────────────────────── */
/* three across, sized so a whole row plus the top of the next one is visible
   at 100% zoom — the peek is what tells the buyer the list keeps going */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; padding-block: 20px 48px;
}
.card {
  background: var(--surface);
  border-radius: var(--r-m);
  box-shadow: var(--sh-1);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
  position: relative;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--sh-2); }
.card-media {
  position: relative; height: 182px; background: #eef0ee;
  cursor: pointer; overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.card-media.contain img { object-fit: contain; background: #fff; }
.card:hover .card-media img { transform: scale(1.045); }
.badge {
  position: absolute; top: 12px; inset-inline-start: 12px;
  background: var(--ink-deep); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 12px; border-radius: 999px;
  box-shadow: var(--sh-1);
}
.badge.bronze { background: var(--bronze); }
.badge.green { background: var(--best); }
.card-fav {
  position: absolute; top: 10px; inset-inline-end: 10px;
  width: 46px; height: 46px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.95);
  font-size: 26px; line-height: 1; color: #c2b9a6;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-1);
  transition: transform .15s, color .15s;
}
.card-fav:hover { transform: scale(1.12); }
.card-fav.on { color: #e6a817; text-shadow: 0 0 10px rgba(230, 168, 23, .45); }
.rk-star { color: #e6a817; font-size: 15px; }
.media-tag {
  position: absolute; bottom: 10px; inset-inline-start: 12px;
  background: rgba(13,18,24,.72); color: #fff;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(3px);
}
.card-body { padding: 14px 17px 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-name { font-weight: 800; font-size: 17px; }
/* the flat's place in the buyer's ranking, when the list follows it (Yuval, 2026-10-19) */
.card-rank { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; margin-inline-end: 7px;
  border-radius: 7px; background: var(--bronze); color: #fff; font-family: var(--num); font-weight: 700; font-size: 14px;
  vertical-align: 2px; }
.card-loc { color: var(--muted); font-size: 13px; white-space: nowrap; }
.card-price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-price { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: -.3px; }
.card-ppm { font-size: 12.5px; color: var(--muted); }
.card-monthly { font-size: 13px; color: var(--ink-soft); margin-top: -6px; }
.card-monthly b { color: var(--ink); }
.spec-row {
  display: flex; gap: 0; border-block: 1px solid var(--hairline);
  padding-block: 8px; margin-block: 1px;
}
.spec {
  flex: 1; text-align: center;
  border-inline-start: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 1px;
}
.spec:first-child { border-inline-start: none; }
.spec-v { font-weight: 800; font-size: 15.5px; }
.spec-k { font-size: 11px; color: var(--muted); }
.card-extras { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.xtag {
  font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--hairline);
  padding: 3px 10px; border-radius: 999px;
}
.xtag.garden { color: var(--best); background: var(--best-soft); border-color: transparent; }
.card-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; }
.card-actions .btn { flex: 1; }
.btn.incompare { background: var(--bronze-soft); border-color: var(--bronze); color: var(--bronze); }
.no-results { text-align: center; color: var(--muted); padding: 40px 0 70px; font-size: 16px; }

/* ── gallery strip ───────────────────────────────────────────── */
.gallery-sec { padding: 30px 0 40px; }
.gallery-head { max-width: 1240px; margin: 0 auto 18px; padding-inline: 28px; }
.gallery-scroll {
  display: flex; gap: 18px; overflow-x: auto;
  max-width: 1240px; margin: 0 auto;
  padding: 6px 28px 22px;
  scroll-snap-type: x proximity;
}
.gallery-scroll::-webkit-scrollbar { height: 8px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--hairline-2); border-radius: 4px; }
.gitem {
  flex: 0 0 400px; height: 260px; border-radius: var(--r-m);
  overflow: hidden; cursor: pointer; scroll-snap-align: start;
  box-shadow: var(--sh-1);
  position: relative;
}
.gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.gitem:hover img { transform: scale(1.05); }

/* ── basement plans ──────────────────────────────────────────── */
.bas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; margin-top: 18px; }
.bas-fig {
  margin: 0; background: var(--surface); border-radius: var(--r-s);
  overflow: hidden; box-shadow: var(--sh-1); cursor: pointer;
  transition: box-shadow .18s, transform .18s;
}
.bas-fig:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.bas-fig img { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: contain; background: #fff; display: block; }
.bas-fig figcaption { padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* ── mortgage calculator ─────────────────────────────────────── */
#calc { padding-block: 30px 80px; }
.calc-card {
  background: var(--ink-deep); color: #fff;
  border-radius: var(--r-l);
  padding: 40px 44px;
  box-shadow: var(--sh-2);
  position: relative; overflow: hidden;
}
.calc-card::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-end: -80px;
  width: 340px;
  background: radial-gradient(closest-side, rgba(198,164,99,.14), transparent 70%);
  pointer-events: none;
}
.calc-title { font-family: var(--serif); font-weight: 700; font-size: 30px; margin: 0 0 4px; }
.calc-sub { color: rgba(255,255,255,.6); font-size: 14px; margin: 0 0 26px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.calc-controls { display: flex; flex-direction: column; gap: 20px; }
.calc-field label { display: block; font-size: 13px; color: rgba(255,255,255,.65); margin-bottom: 8px; }
.calc-field select, .calc-field input[type=number] {
  width: 100%; padding: 11px 16px; border-radius: var(--r-s);
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.07);
  color: #fff; font-size: 15px; font-family: inherit;
}
.calc-field option { color: var(--ink); }
.calc-field input[type=range] { width: 100%; accent-color: var(--bronze-hi); }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cstat {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-s); padding: 16px 18px;
}
.cstat-v { font-family: var(--serif); font-weight: 700; font-size: 24px; }
.cstat-k { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }
.cstat.hl { background: var(--bronze); border-color: var(--bronze); }
.calc-note { grid-column: 1 / -1; font-size: 12px; color: rgba(255,255,255,.5); margin: 4px 0 0; }

/* ── footer ──────────────────────────────────────────────────── */
.footer { background: var(--ink-deep); color: rgba(255,255,255,.75); padding: 40px 0 46px; }
.footer-inner { display: flex; flex-direction: column; gap: 14px; }
.footer .dev-name { font-size: 18px; }
.footer-legal { font-size: 12.5px; line-height: 1.7; color: rgba(255,255,255,.45); max-width: 90ch; margin: 0; }
.footer-legal .fl-strong { color: rgba(255,255,255,.62); }
.footer-legal .fl-link { color: var(--bronze-hi, #c8a563); text-decoration: none; font-weight: 600; white-space: nowrap; }
.footer-legal .fl-link:hover { text-decoration: underline; }
/* inline disclaimer notes (documents, ranking, etc.) */
.disc-note { font-size: 12px; line-height: 1.55; color: var(--muted, #877f6e); margin-top: 10px; max-width: 78ch; }
.mt-note.disc-note { margin-top: 4px; }
/* the developer's own site under the title of every view of an apartment (contract clause 4.1). The text is the
   bronze darkened to pass AA contrast at this size; the underline keeps the brand's bronze. */
.src-line { display: block; margin: 6px 0 0; font-size: 14px; line-height: 1.4; font-weight: 400; }
.src-link { color: #7a5b22; font-weight: 600; text-decoration: underline; text-decoration-color: var(--bronze);
            text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.src-link:hover { color: var(--ink); }
.src-line.src-demo { color: var(--muted); font-size: 13px; }
.ov-titlebox { min-width: 0; }
#aichat-head .src-line { margin: 2px 0 0; font-size: 12.5px; }
#aichat-head .src-link { color: #fff; text-decoration-color: rgba(255,255,255,.7); }
#aichat-head .src-line.src-demo { color: rgba(255,255,255,.85); }
.footer .powered { margin-inline-start: 0; white-space: normal; }

/* ── compare tray ────────────────────────────────────────────── */
.tray {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 70;
  display: flex; justify-content: center;
  padding: 0 16px 16px;
  pointer-events: none;
}
/* the stage nav is also pinned to the bottom — the tray sits above it instead
   of covering הבא/הקודם */
body.has-stepper .tray { bottom: 62px; }
.tray-inner {
  pointer-events: auto;
  background: var(--ink-deep); color: #fff;
  border-radius: var(--r-m);
  box-shadow: var(--sh-3);
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  /* wide enough for four chips on one line (they need ~582px next to the
     counter and the two buttons); narrower screens wrap them instead */
  max-width: 1020px; width: 100%;
  animation: trayUp .3s ease both;
}
@keyframes trayUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.tray-title { font-size: 13px; color: rgba(255,255,255,.65); white-space: nowrap; }
/* capacity is stated up front instead of only when you hit the wall */
.tray-count { font-family: var(--num); font-size: 17px; font-weight: 700; white-space: nowrap; }
.tray-count i { font-family: var(--sans); font-style: normal; font-size: 12px;
  font-weight: 600; color: rgba(255,255,255,.6); margin-inline-start: 3px; }
.tray-msg { font-size: 12.5px; font-weight: 600; color: var(--bronze-hi, #caa542); }
.tray-full { outline: 1px solid var(--bronze-hi, #caa542); }
/* chips wrap onto a second line rather than hiding behind a sideways drag */
.tray-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1;
  max-height: 76px; overflow-y: auto; }
.tray-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px; padding: 5px 6px 5px 12px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.tray-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #fff; }
.tray-chip button {
  border: none; background: rgba(255,255,255,.15); color: #fff;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 12px; line-height: 1; padding: 0;
}
.tray-chip button:hover { background: var(--danger); }

/* ── overlays (compare / match) ──────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(13,18,24,.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
.ov-panel {
  background: var(--paper);
  border-radius: var(--r-l);
  box-shadow: var(--sh-3);
  width: min(1180px, 100%);
  max-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: ovIn .28s ease both;
}
@keyframes ovIn { from { transform: translateY(18px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.ov-head {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 28px; border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.ov-title { font-family: var(--serif); font-weight: 700; font-size: 24px; margin: 0; }
.ov-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 14px; }
.ov-close {
  border: none; background: var(--paper); border-radius: 50%;
  width: 38px; height: 38px; font-size: 19px; color: var(--ink-soft);
}
.ov-close:hover { background: var(--ink); color: #fff; }
.ov-body { overflow: auto; padding: 0; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.switch input { accent-color: var(--bronze); width: 16px; height: 16px; }

/* compare grid */
.cmp {
  display: grid;
  --cmp-cols: 3;
  grid-template-columns: 150px repeat(var(--cmp-cols), minmax(190px, 1fr));
  min-width: 100%;
}
.cmp > div { padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.cmp .rowh {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  display: flex; align-items: center;
  position: sticky; inset-inline-start: 0; background: var(--paper); z-index: 2;
}
.cmp .cell { text-align: center; font-weight: 600; font-size: 15px; background: var(--surface); }
.cmp .cell.best { background: var(--best-soft); color: var(--best); position: relative; }
.cmp .cell.best::after { content: "✓"; font-size: 11px; margin-inline-start: 6px; }
.cmp .colhead { background: var(--surface); text-align: center; padding: 18px 16px 14px; border-bottom: 1px solid var(--hairline-2); }
.cmp .colhead .cn { font-weight: 800; font-size: 16px; }
.cmp .colhead .cl { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.cmp .colhead img {
  width: 100%; height: 120px; object-fit: contain; background: #fff;
  border-radius: var(--r-s); margin-bottom: 10px; box-shadow: var(--sh-1); cursor: pointer;
}
.cmp .colhead .rm { margin-top: 8px; }
.cmp-price { font-family: var(--serif); font-size: 19px; font-weight: 700; }

/* ── match (preferences) overlay ─────────────────────────────── */
/* sliders in a compact row on top, table full-width below (all columns fit) */
.match-body { padding: 22px 28px; display: flex; flex-direction: column; gap: 18px; }
.mt-sliders { display: flex; flex-flow: row wrap; gap: 10px 26px; padding-bottom: 4px; border-bottom: 1px solid var(--hairline); }
.mt-sliders .mt-note { flex-basis: 100%; }
.mt-field { flex: 1 1 155px; }
.mt-field { display: flex; flex-direction: column; gap: 6px; }
.mt-field .mt-lab { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; }
.mt-field .mt-lab output { color: var(--bronze); }
.mt-field input { accent-color: var(--bronze); }
.mt-note { font-size: 12.5px; color: var(--muted); }
.mt-results { display: flex; flex-direction: column; gap: 12px; }
.mt-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border-radius: var(--r-s);
  box-shadow: var(--sh-1); padding: 12px 16px;
  cursor: pointer; transition: box-shadow .15s, transform .15s;
}
.mt-row:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.mt-rank {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  background: var(--paper); color: var(--ink-soft);
}
.mt-row:nth-child(1) .mt-rank { background: var(--bronze); color: #fff; }
.mt-row:nth-child(2) .mt-rank { background: #b9b2a2; color: #fff; }
.mt-row:nth-child(3) .mt-rank { background: #c99e72; color: #fff; }
.mt-main { flex: 1; min-width: 0; }
.mt-name { font-weight: 700; font-size: 15px; }
.mt-meta { font-size: 12.5px; color: var(--muted); }
.mt-score { width: 130px; }
.mt-bar { height: 6px; background: var(--hairline); border-radius: 3px; overflow: hidden; }
.mt-fill { height: 100%; background: linear-gradient(90deg, var(--bronze), #d3b276); }
.mt-pct { font-size: 12px; font-weight: 700; color: var(--bronze); }

/* ── detail drawer ───────────────────────────────────────────── */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(13,18,24,.45);
  backdrop-filter: blur(3px);
}
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 85;
  width: min(920px, 96vw);
  background: var(--paper);
  box-shadow: var(--sh-3);
  display: flex; flex-direction: column;
  animation: drawerIn .3s cubic-bezier(.2,.8,.25,1) both;
}
@keyframes drawerIn { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.dw-head {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 26px; background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
/* the ★ is absolutely placed inside a CARD; inside the drawer header it is a
   normal button in the actions row (the mobile block re-places it) */
.dw-head .card-fav { position: static; }
.dw-title { font-family: var(--serif); font-size: 24px; font-weight: 700; margin: 0; }
.dw-sub { color: var(--muted); font-size: 13.5px; }
.dw-body { overflow-y: auto; padding: 24px 26px 30px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-content: start; }
.dw-media { display: flex; flex-direction: column; gap: 12px; }
.dw-tabs { display: flex; gap: 8px; }
.dw-tab {
  border: 1px solid var(--hairline-2); background: transparent;
  border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.dw-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dw-stage {
  background: #fff; border-radius: var(--r-m); box-shadow: var(--sh-1);
  height: 400px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: zoom-in;
}
.dw-stage img { width: 100%; height: 100%; object-fit: contain; }
.dw-stage .noimg { color: var(--muted); font-size: 14px; }
.dw-info { display: flex; flex-direction: column; gap: 18px; }
.dw-pricebox {
  background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1);
  padding: 20px 22px;
}
.dw-price { font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: -.5px; }
.dw-price-note { font-size: 12px; color: var(--muted); }
.dw-finance { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.dw-fin { background: var(--paper); border-radius: var(--r-s); padding: 10px 14px; }
.dw-fin b { display: block; font-size: 16px; }
.dw-fin span { font-size: 11.5px; color: var(--muted); }
.dw-equity { margin-top: 14px; }
.dw-equity label { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 4px; }
.dw-equity output { font-weight: 700; color: var(--ink); }
.dw-equity input { width: 100%; accent-color: var(--bronze); }
.dw-specs {
  background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1);
  padding: 6px 22px;
}
.dw-spec {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.dw-spec:last-child { border-bottom: none; }
.dw-spec .k { color: var(--muted); }
.dw-spec .v { font-weight: 700; text-align: start; }
.spot-chip {
  display: inline-block; border: 1px solid var(--hairline-2); border-radius: 6px;
  padding: 1px 8px; margin-inline-start: 4px; font-size: 12.5px; font-weight: 700;
  background: var(--paper); cursor: pointer;
}
.spot-chip:hover { border-color: var(--bronze); color: var(--bronze); }
.dw-actions { display: flex; gap: 10px; }
.dw-actions .btn { flex: 1; }
.dw-neighbors { font-size: 13px; color: var(--muted); }
.dw-neighbors b { color: var(--ink); }

/* ── lightbox ────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10,14,18,.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox figure { margin: 0; max-width: 94vw; max-height: 92vh; text-align: center; }
.lightbox img {
  max-width: 94vw; max-height: 85vh; object-fit: contain;
  border-radius: 6px; background: #fff;
}
.lightbox figcaption { color: rgba(255,255,255,.85); margin-top: 12px; font-size: 15px; }
.lb-close {
  position: absolute; top: 18px; inset-inline-start: 18px;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.12); color: #fff; font-size: 22px;
}
.lb-close:hover { background: rgba(255,255,255,.3); }

/* ── SimPlan brand: the logo itself is drawn by brand.css, the same on every page ── */
.topbar .sim-brand, .sim-brand.inline { margin-inline-start: auto; }   /* to the bar's end, as before */
.sim-brand.inline { font-size: 15px; }

/* ── landing (project selection) ─────────────────────────────── */
.landing {
  min-height: 100vh;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(198,164,99,.16), transparent 60%),
    linear-gradient(180deg, #10151c 0%, #171e27 55%, #10151c 100%);
  color: #fff;
  display: flex; flex-direction: column;
}
.landing-inner {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 150px 28px 80px;
  flex: 1;
}
.landing .sim-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.landing .sim-hero .sim-glyph { width: 44px; height: 44px; border-radius: 12px; }
.landing .sim-hero .sim-glyph::after { inset: 9px; border-width: 2.5px; border-radius: 3px; }
.landing .sim-hero .sim-word { font-size: 40px; font-weight: 800; color: #fff; }
.landing-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(36px, 4.6vw, 58px); line-height: 1.12;
  letter-spacing: -1px; margin: 0 0 14px; max-width: 17ch;
}
.landing-title em { font-style: normal; color: var(--bronze-hi); }
.landing-sub {
  font-size: 18px; color: rgba(255,255,255,.66); line-height: 1.7;
  max-width: 52ch; margin: 0 0 54px;
}
.landing-label {
  font-size: 12.5px; letter-spacing: .26em; font-weight: 600;
  color: rgba(255,255,255,.5); margin: 0 0 18px;
}
.proj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.pcard {
  position: relative; border-radius: var(--r-l); overflow: hidden;
  min-height: 300px; display: flex; align-items: flex-end;
  text-decoration: none; color: #fff;
  background: #1c242e center/cover no-repeat;
  box-shadow: var(--sh-2);
  transition: transform .25s ease, box-shadow .25s ease;
  isolation: isolate;
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--sh-3); }
.pcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(185deg, rgba(13,18,24,.05) 30%, rgba(13,18,24,.88) 82%);
}
.pcard-body { padding: 22px 24px; width: 100%; }
.pcard-city {
  font-size: 12px; letter-spacing: .2em; font-weight: 600;
  color: var(--bronze-hi); margin-bottom: 4px;
}
.pcard-name {
  font-family: var(--serif); font-weight: 800; font-size: 26px;
  line-height: 1.15; letter-spacing: -.4px; margin-bottom: 4px;
}
.pcard-dev { font-size: 13px; color: rgba(255,255,255,.66); margin-bottom: 14px; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.pcard-chip {
  font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(4px);
  padding: 4px 12px; border-radius: 999px;
}
.pcard-cta {
  position: absolute; top: 18px; inset-inline-end: 18px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(4px);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 999px;
  transition: background .18s;
}
.pcard:hover .pcard-cta { background: var(--bronze); border-color: var(--bronze); }
.landing-foot {
  padding: 26px 28px 34px; text-align: center;
  color: rgba(255,255,255,.4); font-size: 12.5px;
}
.pcard.skeleton { pointer-events: none; }
.pcard.skeleton .pcard-body { opacity: .35; }

/* landing nav */
.land-nav {
  max-width: 1240px; margin: 0 auto;
  padding: 22px 28px 0;
  display: flex; align-items: center; gap: 30px;
}
.land-nav .sim-brand { margin-inline-start: 0; }
.land-nav-links { display: flex; gap: 24px; }
.land-nav-links a {
  color: rgba(255,255,255,.72); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.land-nav-links a:hover { color: #fff; }
.land-login { margin-inline-start: auto; }
.landing .landing-inner { padding-top: 90px; }

/* landing lottery form */
.land-form { max-width: 620px; margin-bottom: 18px; }
.land-form-label {
  display: block; font-size: 13px; color: rgba(255,255,255,.6);
  margin-bottom: 10px; letter-spacing: .04em;
}
.land-form-row { display: flex; gap: 12px; }
.land-form-row input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 13px 24px;
  color: #fff; font-size: 17px; font-weight: 600; font-family: inherit;
  letter-spacing: .02em;
  transition: border-color .16s, background .16s;
}
.land-form-row input::placeholder { color: rgba(255,255,255,.35); font-weight: 400; }
.land-form-row input:focus {
  outline: none; border-color: var(--bronze-hi);
  background: rgba(255,255,255,.11);
}
.land-error { color: #f0a08c; font-weight: 600; font-size: 14px; margin: 10px 4px 0; }
.trust-row {
  list-style: none; display: flex; flex-wrap: wrap; gap: 22px;
  padding: 0; margin: 0 0 64px;
  font-size: 13px; color: rgba(255,255,255,.55);
}
.trust-row li { display: flex; align-items: center; gap: 7px; }
.trust-row li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--bronze-hi);
}

/* landing light bands (how / value / pricing) */
.land-band { background: var(--paper); color: var(--ink); padding: 78px 28px; }
.land-band.alt { background: var(--surface); }
.land-band-inner { max-width: 1080px; margin: 0 auto; }
.band-kicker {
  font-size: 12.5px; letter-spacing: .26em; font-weight: 700;
  color: var(--bronze); margin: 0 0 10px;
}
.band-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.6px;
  margin: 0 0 10px;
}
.band-sub { color: var(--muted); font-size: 16px; margin: 0 0 34px; max-width: 60ch; }

.flow-steps {
  display: flex; align-items: stretch; gap: 22px;
  margin: 34px 0 30px; flex-wrap: wrap;
}
.flow-step {
  flex: 1 1 260px;
  background: var(--surface); border-radius: var(--r-m);
  box-shadow: var(--sh-1);
  padding: 26px 28px;
}
.land-band.alt .flow-step { background: var(--paper); }
.flow-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-weight: 800; font-size: 17px; margin-bottom: 14px;
}
.flow-step h3 { font-family: var(--serif); font-weight: 700; font-size: 20px; margin: 0 0 6px; }
.flow-step p { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin: 0; }
.flow-arrow { align-self: center; font-size: 26px; color: var(--bronze); }

.behind-box {
  border: 1px dashed var(--hairline-2); border-radius: var(--r-m);
  padding: 24px 28px; background: rgba(255,255,255,.5);
}
.behind-h {
  display: block; font-size: 12px; letter-spacing: .22em; font-weight: 700;
  color: var(--muted); margin-bottom: 10px;
}
.behind-box p { margin: 0 0 16px; color: var(--ink-soft); line-height: 1.75; max-width: 78ch; }
.behind-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.behind-chips span {
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 5px 14px;
}

.value-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 30px;
}
.value-item {
  background: var(--paper); border-radius: var(--r-m);
  box-shadow: var(--sh-1); padding: 22px 24px;
}
.v-tick {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 15.5px; margin-bottom: 8px;
}
.v-tick::before {
  content: "✓"; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--best-soft); color: var(--best);
  font-size: 12px; font-weight: 900;
}
.value-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* pricing */
.price-grid {
  display: grid; grid-template-columns: repeat(2, minmax(280px, 420px));
  gap: 24px; margin: 34px 0 40px; justify-content: start;
}
.price-card {
  background: var(--surface); border-radius: var(--r-l);
  box-shadow: var(--sh-1); padding: 30px 32px;
  display: flex; flex-direction: column; position: relative;
  border: 1px solid transparent;
}
.price-card.featured { border-color: var(--bronze); box-shadow: var(--sh-2); }
.price-flag {
  position: absolute; top: -13px; inset-inline-start: 26px;
  background: var(--bronze); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 14px; border-radius: 999px;
}
.price-tier { font-size: 14px; font-weight: 700; color: var(--muted); }
.price-amt {
  font-family: var(--serif); font-weight: 800; font-size: 46px;
  letter-spacing: -1px; margin: 6px 0 2px;
}
.price-per { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.price-feat {
  list-style: none; padding: 0; margin: 0 0 26px;
  display: flex; flex-direction: column; gap: 9px;
  font-size: 14.5px; color: var(--ink-soft);
}
.price-feat li { display: flex; gap: 9px; }
.price-feat li::before { content: "✓"; color: var(--best); font-weight: 900; }
.price-card .btn { margin-top: auto; }
.buy-steps {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 14px 34px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.buy-steps li { display: flex; align-items: center; gap: 10px; }
.bs-no {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 800;
}

/* landing CTA band + footer */
.land-cta {
  background: linear-gradient(120deg, #171e27, #10151c);
  color: #fff; padding: 60px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
}
.land-cta > div:first-child { max-width: 1080px; }
.land-cta h2 {
  font-family: var(--serif); font-weight: 800; font-size: 30px;
  margin: 0 0 6px; letter-spacing: -.4px;
}
.land-cta p { margin: 0; color: rgba(255,255,255,.6); }
.land-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.land-footer { background: var(--ink-deep); color: rgba(255,255,255,.7); padding: 46px 28px 30px; }
.land-footer-grid {
  max-width: 1240px; margin: 0 auto 30px;
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 34px;
}
.lf-about { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.45); margin: 14px 0 0; max-width: 40ch; }
.lf-col { display: flex; flex-direction: column; gap: 9px; }
.lf-h {
  font-size: 12px; letter-spacing: .2em; font-weight: 700;
  color: rgba(255,255,255,.45); margin-bottom: 4px;
}
.lf-col a { color: rgba(255,255,255,.72); text-decoration: none; font-size: 14px; }
.lf-col a:hover { color: #fff; text-decoration: underline; }
.lf-col a.soon { color: rgba(255,255,255,.38); cursor: default; }
.lf-col a.soon em {
  font-style: normal; font-size: 10.5px; font-weight: 700;
  background: rgba(255,255,255,.1); border-radius: 999px; padding: 2px 8px;
  margin-inline-start: 6px;
}
.landing-foot { max-width: 1240px; margin: 0 auto; padding: 0; text-align: start; }

/* auth modal */
.auth-scrim {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(13,18,24,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-box {
  background: var(--surface); border-radius: var(--r-l);
  box-shadow: var(--sh-3);
  width: min(420px, 100%); padding: 26px 30px 30px;
  position: relative;
  animation: ovIn .25s ease both;
}
.auth-x { position: absolute; top: 14px; inset-inline-end: 14px; }
.auth-tabs {
  display: flex; gap: 6px; background: var(--paper);
  border-radius: 999px; padding: 4px; margin: 4px 0 22px; width: fit-content;
}
.auth-tab {
  border: none; background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 700; padding: 7px 22px; border-radius: 999px;
}
.auth-tab.on { background: var(--ink); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); display: flex; flex-direction: column; gap: 6px; }
.auth-label input {
  border: 1px solid var(--hairline-2); border-radius: var(--r-s);
  padding: 11px 15px; font-size: 15px; font-family: inherit;
  background: #fff;
}
.auth-label input:focus { outline: none; border-color: var(--bronze); }
.auth-note { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin: 2px 0 0; }
.auth-note.ok { color: var(--best); font-weight: 600; }
/* legal consent line above the note — must stay visible before submit */
.auth-consent { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 8px 0 0; }
.auth-consent a { color: var(--bronze); text-decoration: underline; }

/* landing hides the per-project chat FAB (no lottery context) */
.is-landing #aichat-btn, .is-landing #aichat-panel { display: none !important; }

@media (max-width: 900px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .land-footer-grid { grid-template-columns: 1fr 1fr; }
  .land-nav-links { display: none; }
}
@media (max-width: 560px) {
  .value-grid { grid-template-columns: 1fr; }
  .land-form-row { flex-direction: column; }
  .land-footer-grid { grid-template-columns: 1fr; }
}

/* chat widget nudge (chat.js mounts bottom-right; keep clear of tray) */
#aichat-btn { z-index: 75 !important; }

/* ── responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .calc-grid { grid-template-columns: 1fr; }
  .dw-body { grid-template-columns: 1fr; }
  .match-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .hero-inner { padding-top: 110px; }
  .hstat { padding: 13px 18px; }
  .hstat-v { font-size: 22px; }
  .toolbar { gap: 12px; }
  .tb-count { margin-inline-start: 0; }
  .wrap { padding-inline: 18px; }
  .sec-title { font-size: 30px; }
  .calc-card { padding: 26px 22px; }
}

/* ── Batch A additions (site tasks) ─────────────────────────────── */
/* #4 equity note under the monthly estimate */
.card-eq { display: block; font-size: 12px; color: var(--muted, #8b8272); margin-top: 2px; }

/* #10 AI-render disclaimer · sits ON the image so screenshots carry it */
.ai-overlay { position: absolute; inset-inline: 0; bottom: 0; z-index: 3;
  display: block; padding: 7px 12px; font-size: 12px; line-height: 1.45;
  color: #fff; background: rgba(20, 18, 14, .62); text-align: center;
  pointer-events: none; backdrop-filter: blur(2px); }
.dw-stage { position: relative; }
#lightbox figure { position: relative; }

/* #13 typed value next to sliders */
.tb-num { width: 108px; font: inherit; font-size: 13.5px; padding: 6px 8px;
  border: 1px solid var(--line, #ddd6c8); border-radius: 8px; background: #fff;
  color: inherit; text-align: center; -moz-appearance: textfield; }
.tb-num::-webkit-outer-spin-button, .tb-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tb-nis { font-size: 13px; color: var(--muted, #8b8272); }
.range-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.range-row input[type="range"] { flex: 1 1 140px; min-width: 120px; width: auto; }
.range-row .tb-num { flex: 0 0 108px; }

/* #15 always-reachable match button in the sticky toolbar */
/* the ranking CTA is the toolbar's hero action — bigger and in its own color
   (deep ink, unlike every bronze chip around it) */
.tb-match { margin-inline-start: auto; white-space: nowrap;
  background: linear-gradient(150deg, #23384a 0%, #14222e 100%); color: #fff;
  border: 1px solid #0e1a24; font-size: 15.5px; font-weight: 800;
  padding: 12px 26px; border-radius: 13px;
  box-shadow: 0 6px 18px rgba(15, 30, 42, .28); }
.tb-match:hover { background: linear-gradient(150deg, #2c4459 0%, #1a2c3c 100%);
  transform: translateY(-1px); }
@media (max-width: 640px) { .tb-match { margin-inline-start: 0; width: 100%;
  justify-content: center; } }

/* #14 V2 chat FAB · clear AI-assistant pill */
#aichat-btn.v2-fab { width: auto !important; height: 52px !important;
  padding: 0 18px 0 14px !important; border-radius: 999px !important;
  display: flex; align-items: center; gap: 8px;
  font-family: "Assistant", sans-serif !important; font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .28); }
#aichat-btn.v2-fab .fab-txt { line-height: 1; }
/* on a phone the pill was as tall as a card action row — shrink it so it reads
   as an assistant, not a banner */
@media (max-width: 640px) {
  #aichat-btn.v2-fab { height: 42px !important; padding: 0 13px 0 10px !important;
    font-size: 13.5px; gap: 6px; bottom: 14px !important; left: 14px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .24); }
  #aichat-btn.v2-fab svg { width: 19px; height: 19px; }
  #aichat-panel { bottom: 66px !important; left: 14px !important; }
}

/* ── Batch B additions ──────────────────────────────────────────── */
/* #1 project map */
.map-card { position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line, #ddd6c8); box-shadow: 0 10px 30px rgba(30,25,15,.07); }
.map-card iframe { display: block; width: 100%; height: 420px; border: 0; }
.map-card .map-open { position: absolute; top: 14px; inset-inline-start: 14px;
  background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
@media (max-width: 640px) { .map-card iframe { height: 300px; } }

/* #7 notes */
.dw-notes { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.dw-notes label { font-size: 13px; font-weight: 700; color: var(--muted, #8b8272); }
.dw-notes textarea { font: inherit; font-size: 14px; padding: 10px 12px; resize: vertical;
  min-height: 64px; border: 1px solid var(--line, #ddd6c8); border-radius: 10px;
  background: #fff; color: inherit; }
.xtag.note { background: #f3ecd9; max-width: 170px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

/* #5 lightbox zoom */
#lb-img { transition: transform .06s linear; transform-origin: center center;
  will-change: transform; user-select: none; -webkit-user-drag: none; }

/* ── Batch C: spot pin viewer (#9) ──────────────────────────────── */
.spot-panel { width: min(1240px, 96vw); }
.spot-body { position: relative; overflow: hidden; height: min(72vh, 800px);
  background: #eef0f2; cursor: grab; }
.spot-body:active { cursor: grabbing; }
/* the floor sheet is heavy — show explicit progress until it arrives */
.spot-loading { position: absolute; inset: 0; z-index: 3; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  font-size: 14.5px; font-weight: 700; color: var(--ink-soft, #5d6a76);
  background: var(--paper, #f6f3ec); }
.spot-loading i { width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(0,0,0,.12); border-top-color: var(--bronze, #b07c2a);
  animation: spotspin .8s linear infinite; }
@keyframes spotspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spot-loading i { animation: none; } }
.spot-stage { position: relative; transform-origin: 0 0; width: 100%; }
.spot-stage img { display: block; width: 100%; user-select: none; -webkit-user-drag: none; }
.pin { position: absolute; transform: translate(-50%, -100%); pointer-events: auto;
  transform-origin: 50% 100%; }   /* scale around the TIP so it stays anchored at any zoom */
.pin svg { display: block; width: 27px; height: 38px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.pin.parking { color: #c23c28; }
.pin.storage { color: #1f5fae; }
.pin.parking svg, .pin.storage svg { transform-origin: 50% 100%;
  animation: pindrop 1.5s ease-in-out infinite; }
.pin.elev { transform: translate(-50%, -50%); transform-origin: 50% 50%; }
.pin.elev svg { width: 30px; height: 30px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
@keyframes pindrop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.spot-stage.anim, .spot-stage.anim .pin {
  transition: transform .9s cubic-bezier(.22, .8, .3, 1); }
.spot-ctl { position: absolute; bottom: 16px; inset-inline-start: 16px; z-index: 6;
  display: flex; flex-direction: column; gap: 6px; }
.spot-ctl button { font: inherit; font-weight: 700; min-width: 40px; height: 36px;
  border: 1px solid var(--line, #ddd6c8); border-radius: 9px; background: #fff;
  cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .12); font-size: 18px; }
.spot-ctl button.txt { font-size: 12.5px; padding-inline: 10px; }
.spot-ctl button:hover { background: #f6f2e9; }

.spot-legend { display: inline-flex; align-items: center; gap: 7px; font-size: 12px;
  color: var(--muted, #8b8272); margin-inline-end: 6px; white-space: nowrap; }
.spot-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.spot-legend .lg.parking { background: #c23c28; }
.spot-legend .lg.storage { background: #1f5fae; }
.spot-legend .lg.elev { background: #0e8a44; border-radius: 4px; }
.spot-hint { margin: 0; padding: 8px 18px 12px; font-size: 12px;
  color: var(--muted, #8b8272); }
@media (max-width: 640px) { .spot-legend { display: none; } }

/* chat: open-the-apartment buttons under cited answers */
.aic-aptlinks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.aic-aptlink { font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line, #ddd6c8);
  background: #fff; color: inherit; }
.aic-aptlink:hover { border-color: #b07c2a; background: #faf6ec; }

/* ranking: manual drag reorder */
.mt-row { cursor: grab; }
.mt-row.dragging { opacity: .45; }
.mt-row.dragover { outline: 2px dashed #b07c2a; outline-offset: -2px; }
.mt-grip { color: #c9c2b4; font-size: 14px; letter-spacing: -2px; cursor: grab;
  user-select: none; padding-inline-end: 2px; }

/* ranking: the user's own note on a row */
.mt-usernote { font-size: 12px; color: #8a6d1f; background: #f7f0dc;
  border-radius: 6px; padding: 2px 8px; margin-top: 4px; display: inline-block;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* filters title · clickable collapse/expand bar */
.tb-head { flex-basis: 100%; display: flex; align-items: center; gap: 10px;
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tb-head-ic { flex: 0 0 auto; color: var(--bronze, #b07c2a); }
.tb-title { font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.tb-hint { font-size: 11.5px; color: var(--muted, #8b8272); }
.tb-fcount { flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--bronze, #b07c2a); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; }
.tb-chev { flex: 0 0 auto; margin-inline-start: auto; color: var(--muted, #8b8272);
  transition: transform .2s ease; transform: rotate(180deg); }
.tb-head:hover .tb-chev, .tb-head:hover .tb-title { color: var(--ink, #2b2620); }

/* collapsed: only the head bar shows; everything else in the toolbar is hidden */
.filters-collapsed .toolbar { padding-block: 12px; }
.filters-collapsed #toolbar > :not(.tb-head) { display: none; }
.filters-collapsed .tb-chev { transform: rotate(0deg); }
.filters-collapsed .tb-hint { display: none; }
/* …except the ranking CTA, which must stay reachable from the folded bar */
@media (min-width: 761px) {
  .filters-collapsed .tb-head { flex: 1 1 auto; }
  .filters-collapsed #toolbar > .tb-match { display: inline-flex; margin-inline-start: 0;
    font-size: 13.5px; padding: 9px 18px; border-radius: 11px; }
}

/* narrow screens: even when opened, cap height so filters never swallow the
   viewport — and calm the whole panel down (smaller chips, no rules between
   groups, the label above its row instead of squeezing it) */
@media (max-width: 760px) {
  .toolbar-wrap:not(.filters-collapsed) #toolbar { max-height: 56vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch; }
  .tb-hint { display: none; }
  /* the panel hits its max-height and scrolls; without this the flex lines
     stretch to fill it and the filter rows drift apart */
  .toolbar { padding: 12px 14px; gap: 10px; align-content: flex-start; }
  .tb-sep { display: none; }
  .tb-group { flex: 1 1 100%; gap: 6px; }
  /* the group's caption gets its own line; the one inside a range row must NOT
     (it would push the slider off the row) */
  .tb-group > .tb-label { flex: 0 0 100%; margin-bottom: -2px; }
  .tb-label { font-size: 11px; }
  .tb-range .tb-label { flex: 0 0 auto; white-space: nowrap; }
  .chip { padding: 5px 12px; font-size: 13px; }
  .tb-range { flex: 1 1 100%; gap: 8px; }
  .tb-range input[type=range] { flex: 1; width: auto; }
  .tb-num { width: 92px; }
  .tb-select { flex: 1 1 100%; }
  .tb-count { flex: 1 1 100%; margin-inline-start: 0; }
}

/* ranking: full list scrolls */
.mt-results { max-height: min(62vh, 640px); overflow-y: auto; padding-inline-end: 6px; }

/* grouped-by-building view */
.bld-group { border: 1px solid var(--line, #ddd6c8); border-radius: 14px;
  background: #fffdf8; margin-bottom: 14px; overflow: hidden; }
.bld-group summary { list-style: none; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center; padding: 12px 18px;
  font-size: 15px; background: #f6f1e6; }
.bld-group summary::-webkit-details-marker { display: none; }
.bld-group summary span { color: var(--muted, #8b8272); font-size: 12.5px; }
.bld-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 16px; }
#cards.grouped { display: block; }
@media (max-width: 1024px) { .bld-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bld-cards { grid-template-columns: 1fr; } }

/* stage switches change the document height drastically — never let the
   browser re-anchor the scroll position (it fights the stepper's jump) */
html { overflow-anchor: none; }

/* buildings layout scheme — ALWAYS two identical side-by-side boxes (lowest
   מגרש number leftmost); the sheet stretches slightly to fill its box so both
   read at exactly the same size. Pins are % positioned, so the linear stretch
   keeps them correct. */
.bldmap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  direction: ltr; }
.bldmap-fig { margin: 0; min-width: 0; direction: rtl; }
.bldmap-grid .bldmap-card { height: clamp(300px, 38vw, 540px); }
.bldmap-grid .bldmap-card img { width: 100%; height: 100%; object-fit: fill; }
/* one sheet: its own proportions, never stretched into the two-box layout */
.bldmap-grid.single { grid-template-columns: 1fr; max-width: 1040px; }
.bldmap-grid.single .bldmap-card { height: auto; }
.bldmap-grid.single .bldmap-card img { height: auto; object-fit: contain; }
@media (max-width: 700px) {
  .bldmap-grid { grid-template-columns: 1fr; }
  .bldmap-grid .bldmap-card { height: auto; }
  .bldmap-grid .bldmap-card img { height: auto; }
}
.bldmap-cap { font-size: 13.5px; font-weight: 800; color: var(--ink-soft, #5d6a76);
  margin: 0 4px 6px; }
.bldmap-card { position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line, #ddd6c8); box-shadow: 0 10px 30px rgba(30,25,15,.07);
  background: #fff; }
.bldmap-card img { display: block; width: 100%; }   /* legacy single-sheet map */
.bld-pin { position: absolute; transform: translate(-50%, -50%);
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 2px solid #fff;
  background: #1b2a38; color: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.3);
  transition: transform .12s, background .12s; }
.bld-pin:hover { transform: translate(-50%, -50%) scale(1.12); background: #b07c2a; }

.dw-fin.wide { grid-column: 1 / -1; }

/* ── landing funnel result ─────────────────────────────────────── */
#land-result { margin-top: 18px; }
.lr-card { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px; padding: 22px 24px; max-width: 560px; backdrop-filter: blur(6px); }
.lr-card.found { border-color: rgba(200, 160, 80, .55); }
.lr-flag { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: #e8c78a; }
.lr-flag.miss { color: rgba(255, 255, 255, .75); }
.lr-title { margin: 0 0 2px; font-size: 24px; }
.lr-sub { margin: 0 0 12px; font-size: 14px; opacity: .8; }
.lr-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.lr-chips span { font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); }
.lr-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lr-price { font-size: 15px; }
.lr-price b { font-size: 20px; color: #e8c78a; }
.lr-q { margin: 4px 0 12px; font-size: 16px; font-weight: 700; }
.lr-btns { display: flex; gap: 10px; margin-bottom: 8px; }
.lr-note { font-size: 13.5px; opacity: .85; margin: 10px 0 8px; }
.lr-note.ok { color: #9fd8b0; font-weight: 700; }
.lr-in { display: block; width: 100%; max-width: 380px; margin: 6px 0; font: inherit;
  font-size: 14px; padding: 10px 12px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; }
.lr-in::placeholder { color: rgba(255, 255, 255, .5); }
/* marketing opt-in — must be legible and unticked by default, never pre-checked */
.lr-consent { display: flex; align-items: flex-start; gap: 8px; max-width: 380px;
  margin: 10px 0 4px; font-size: 13px; line-height: 1.55; opacity: .9; cursor: pointer; }
.lr-consent input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--bronze, #c8a563); }
.lr-fine { font-size: 12px; opacity: .7; margin: 8px 0 0; max-width: 380px; line-height: 1.55; }
.lr-fine a { color: var(--bronze-hi, #c8a563); }

/* ── landing feature showcase ──────────────────────────────────── */
.show-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px; }
.show-card { margin: 0; background: #fff; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line, #ddd6c8); box-shadow: 0 8px 26px rgba(30, 25, 15, .08);
  display: flex; flex-direction: column; }
.show-card img { width: 100%; height: 210px; object-fit: cover; object-position: top;
  border-bottom: 1px solid var(--line, #ddd6c8); background: #f4f1ea; }
.show-card figcaption { padding: 14px 16px 16px; font-size: 13.5px; line-height: 1.55;
  color: #4c463a; }
.show-card figcaption b { display: block; font-size: 15px; margin-bottom: 4px; color: #1d1a14; }
@media (max-width: 1024px) { .show-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .show-grid { grid-template-columns: 1fr; } }

/* funnel: the secondary ('עוד לא') button must be readable on the dark card */
.lr-btns .btn:not(.bronze) { background: transparent; color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .55); }
.lr-btns .btn:not(.bronze):hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* landing hero: center the search block with the rest of the page */
.landing-inner { text-align: center; }
.landing-title, .landing-sub { margin-inline: auto; }
.land-form { margin-inline: auto; max-width: 640px; }
.land-form-row { justify-content: center; }
.trust-row { justify-content: center; }
#land-result .lr-card { margin-inline: auto; text-align: right; }

/* spot distance note under parking/storage rows */
.spot-dist { display: block; font-size: 11.5px; color: var(--muted, #8b8272); margin-top: 3px; }

/* ── market value vs real deals (nadlan comparables) ─────────────── */
.mkt-card {
  background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1);
  padding: 22px 24px;
}
.mkt-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mkt-table th {
  text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 600;
  padding: 6px 10px; border-bottom: 1px solid var(--hairline-2); white-space: nowrap;
}
.mkt-table td {
  text-align: right; padding: 12px 10px; border-bottom: 1px solid var(--hairline);
  font-size: 15px; white-space: nowrap;
}
.mkt-table tr:last-child td { border-bottom: 0; }
.mkt-n { font-size: 12px; color: var(--muted); }
.mkt-gap { color: var(--best); }
.mkt-foot {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: 14px 0 0; font-size: 13px; color: var(--muted);
}
.mkt-foot a { color: var(--bronze); font-weight: 600; text-decoration: none; }
.mkt-foot a:hover { text-decoration: underline; }
.dw-market {
  background: var(--best-soft); border-radius: var(--r-s); padding: 14px 16px;
  margin-top: 12px;
}
.dw-market-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; color: var(--ink-soft); font-weight: 600; margin-bottom: 6px;
}
.dw-market-head a { color: var(--bronze); font-size: 12px; text-decoration: none; }
.dw-market-head a:hover { text-decoration: underline; }
.dw-market-range b { font-size: 16.5px; display: block; }
.dw-market-range span { font-size: 12px; color: var(--muted); }
.dw-market-gap {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(46,125,79,.25);
  font-size: 13px;
}
.dw-market-gap b { color: var(--best); }
.mkt-info { padding: 4px 22px 20px; overflow-y: auto; }
.mkt-info p { font-size: 14.5px; line-height: 1.65; }
.mkt-info h4 { margin: 18px 0 8px; }
.mkt-caveat { color: var(--ink-soft); font-size: 13.5px; }
.mkt-src { font-size: 12.5px; color: var(--muted); }

/* ── spec digest ("המפרט בקצרה") ─────────────────────────────────── */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.spec-cat {
  background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1);
  padding: 0; overflow: hidden;
}
.spec-cat summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700;
  font-family: var(--serif); display: flex; align-items: center; gap: 10px;
}
.spec-cat summary::-webkit-details-marker { display: none; }
.spec-cat summary::after {
  content: "+"; margin-inline-start: auto; color: var(--bronze);
  font-size: 20px; font-weight: 400; line-height: 1;
}
.spec-cat[open] summary::after { content: "−"; }
.spec-count {
  background: var(--bronze-soft); color: var(--bronze); border-radius: 999px;
  font-size: 12px; font-weight: 700; padding: 1px 9px;
}
.spec-points { margin: 0; padding: 0 20px 16px; list-style: none; }
.spec-points li { padding: 10px 0; border-top: 1px solid var(--hairline); }
.spec-point { font-size: 14.5px; font-weight: 600; }
.spec-quote {
  margin: 6px 0 0; padding: 8px 12px; border-inline-start: 3px solid var(--bronze-hi);
  background: var(--paper); border-radius: 6px; font-size: 12.5px; color: var(--ink-soft);
}
.spec-quote span { color: var(--muted); white-space: nowrap; }
.spec-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.dw-market-rent { margin-top: 6px; font-size: 13px; }
.dw-market-rent b { color: var(--ink); }
.mkt-trend { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-soft); }


/* ── 3D walkthrough / sun-sim launch buttons (apartment drawer) ───── */
.dw-3d { display: flex; gap: 10px; }
.dw-3d .btn { flex: 1; font-weight: 700; }
.dw-3d-ic { margin-inline-end: 4px; }

/* ── immersive 3D overlay (in-site fullscreen iframe) ───────── */
#walk-ov { position: fixed; inset: 0; z-index: 130; display: flex; flex-direction: column; background: #0d1218; }
#walk-ov[hidden] { display: none; }
.walk-bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px; direction: rtl; background: var(--surface); border-bottom: 1px solid var(--hairline); }
.walk-title { font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.walk-close { flex: 0 0 auto; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--surface); font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.walk-close:hover { background: var(--ink-deep); }
#walk-frame { flex: 1 1 auto; width: 100%; border: 0; display: block; background: #0d1218; }

/* ── card 3D launcher (main apartment grid) ─────────── */
.card-3d { position: absolute; bottom: 10px; inset-inline-end: 10px; display: flex; gap: 6px; }
.c3d-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(13,18,24,.72);
  color: #fff; font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center;
  justify-content: center; backdrop-filter: blur(3px); box-shadow: var(--sh-1); transition: transform .15s, background .15s; }
.c3d-btn:hover { transform: scale(1.12); background: var(--bronze); }

/* ── ranking table (live, draggable) ──────────────────────────── */
.rank-tablewrap { overflow: auto; max-height: min(64vh, 660px); border-radius: var(--r-s); box-shadow: var(--sh-1); background: var(--surface); }
.rank-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rank-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface);
  text-align: right; font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 10px; border-bottom: 1px solid var(--hairline-2); white-space: nowrap;
}
.rank-table td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--hairline); font-size: 13.5px; white-space: nowrap; }
.rank-table tr:last-child td { border-bottom: 0; }
.rank-row { cursor: pointer; transition: background .12s; }
.rank-row:hover { background: var(--paper); }
.rank-row td:first-child { border-inline-start: 3px solid transparent; }
.rank-row.sel { background: var(--bronze-soft); }
.rank-row.sel td:first-child { border-inline-start-color: var(--bronze); }
.rk-grip { color: var(--hairline-2); cursor: grab; user-select: none; width: 22px; text-align: center; }
.rk-num { font-weight: 800; color: var(--ink-soft); width: 26px; text-align: center; }
.rank-row:nth-child(1) .rk-num { color: var(--bronze); }
.rk-nm b { display: block; font-weight: 700; font-size: 14px; }
.rk-nm small { color: var(--muted); font-size: 11.5px; }
.rk-nm .rk-note { margin-inline-start: 4px; }
/* the user's own note, shown in full under the apartment name */
.rk-note-txt { display: block; margin-top: 4px; max-width: 230px; white-space: normal;
  font-size: 11.5px; line-height: 1.4; font-weight: 600; color: var(--bronze); }
.rk-type { text-align: center; font-weight: 800; color: var(--ink-soft); }
.rk-price { font-weight: 700; }
.rk-match { min-width: 94px; }
.rk-match .mt-bar { height: 6px; margin-bottom: 3px; }
.rank-row.dragging { opacity: .45; }
.rank-row.dragover td { box-shadow: inset 0 2px 0 var(--bronze); }

/* normal (non-split) ranking overlay is FULL SCREEN — the table is the star.
   Set here, not inline, so the split rule below can override it. */
.match-panel { width: calc(100vw - 24px); height: calc(100dvh - 24px);
  max-width: none; max-height: none; display: flex; flex-direction: column; }
.match-panel .match-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.match-panel .rank-tablewrap { max-height: none; }
.match-panel .mt-results { max-height: none; }

/* ── ranking / comparison + apartment detail, side by side ────── */
/* on row/column click the list stays on the LEFT and the detail opens on the
   RIGHT. The detail keeps a comfortable width; the list panel shrinks and its
   table scrolls/compresses to fit whatever space is left. */
.rank-split #match-ov,
.rank-split #compare-ov { background: transparent; backdrop-filter: none; padding: 0; align-items: stretch; justify-content: flex-start; }
/* the full-screen overlay sits above the detail drawer; make its empty area
   click-through so the detail (on the right) stays interactive, panel excepted */
.rank-split #match-ov,
.rank-split #compare-ov { pointer-events: none; }
.rank-split #match-ov .ov-panel,
.rank-split #compare-ov .ov-panel { pointer-events: auto; }
.rank-split #match-ov .ov-panel,
.rank-split #compare-ov .ov-panel { width: 54vw; max-width: none; height: 100vh; max-height: 100vh; border-radius: 0; margin-inline-start: auto; animation: none; box-shadow: var(--sh-3); }
.rank-split .drawer { width: 46vw; animation: none; }
.rank-split .drawer-scrim { display: none !important; }
/* compress the ranking table so more columns fit before it needs to scroll */
.rank-split .rank-tablewrap { max-height: calc(100vh - 205px); }
.rank-split .rank-table thead th,
.rank-split .rank-table td { padding: 8px 7px; font-size: 12.5px; }
.rank-split .rank-table .rk-nm b { font-size: 13px; }
@media (max-width: 900px) {
  .rank-split #match-ov .ov-panel,
  .rank-split #compare-ov .ov-panel { display: none; }
  .rank-split .drawer { width: min(920px, 96vw); }
}

/* ── recommended professionals ────────────────────────────────── */
#pros { padding-block: 10px 40px; }
.pros-demo { color: var(--muted); font-size: 13px; }
.pros-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.pro-card {
  background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1);
  padding: 26px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.pro-ic {
  width: 48px; height: 48px; border-radius: 12px; background: var(--bronze-soft);
  color: var(--bronze); display: flex; align-items: center; justify-content: center;
}
.pro-ic svg { width: 26px; height: 26px; }
.pro-role { font-family: var(--serif); font-weight: 700; font-size: 19px; }
.pro-desc { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); flex: 1; }
.pro-card .btn { margin-top: 4px; }

/* ── more from the same developer ─────────────────────────────── */
#moredev { padding-block: 6px 46px; }
.moredev-card {
  background: linear-gradient(135deg, var(--ink-deep) 0%, #232c37 60%, #2f3a48 100%);
  color: #fff; border-radius: var(--r-l); padding: 40px 44px; box-shadow: var(--sh-2);
}
.moredev-card .band-kicker { color: var(--bronze-hi); font-weight: 700; letter-spacing: .12em; font-size: 12.5px; text-transform: uppercase; margin: 0 0 8px; }
.moredev-h { font-family: var(--serif); font-weight: 800; font-size: 30px; margin: 0 0 8px; }
.moredev-sub { color: rgba(255,255,255,.78); font-size: 15.5px; max-width: 640px; margin: 0 0 22px; line-height: 1.6; }
.moredev-links { display: flex; flex-wrap: wrap; gap: 14px; }
.moredev-link {
  display: flex; align-items: center; gap: 18px; min-width: 260px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-m); padding: 16px 20px; color: #fff; text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s;
}
.moredev-link:hover { background: rgba(200,165,99,.16); border-color: var(--bronze-hi); transform: translateY(-2px); }
.moredev-txt b { display: block; font-size: 15.5px; font-weight: 700; }
.moredev-txt small { color: rgba(255,255,255,.62); font-size: 12.5px; }
.moredev-arrow { margin-inline-start: auto; color: var(--bronze-hi); font-size: 22px; font-weight: 700; }
/* showcase cards for the developer's other projects (image-forward) */
.dev-projs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 4px 0 28px; }
.dev-proj {
  display: flex; flex-direction: column; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-m); overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.dev-proj:hover { transform: translateY(-4px); border-color: var(--bronze-hi); box-shadow: 0 16px 34px rgba(0,0,0,.34); }
.dev-proj-img { display: block; height: 168px; background-size: cover; background-position: center; }
.dev-proj-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; }
.dev-proj-name { font-size: 17px; font-weight: 800; }
.dev-proj-city { color: rgba(255,255,255,.66); font-size: 13px; }
.dev-proj-cta { margin-top: 12px; color: var(--bronze-hi); font-weight: 700; font-size: 13.5px; }

#specsec .sec-head { display: flex; flex-direction: column; align-items: flex-start; }
.spec-docs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; align-self: flex-start; }
.spec-full { margin-top: 0; }

/* ── mobile: overlays & compare tray (batch 2026-07-21) ─────────────── */
/* the weights/table switch is desktop-hidden; the ranking modal shows
   sliders + table together on wide screens */
.mt-seg { display: none; }
@media (max-width: 760px) {
  /* 2b · compare tray floats ABOVE the AI + accessibility FABs (both bottom:18px, ~56px tall).
     The stage nav is hidden on phones, so there is nothing else down there. */
  .tray, body.has-stepper .tray { bottom: 72px; padding: 0 10px 10px; }
  .tray-title { display: none; }
  .tray-inner { gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
  /* a phone has no room for four thumbnail chips — the count carries the state
     and each apartment is removed from its own card (or from the comparison) */
  .tray-chips { display: none; }
  .tray-count { font-size: 15px; }
  .tray-inner .btn.bronze { flex: 1; justify-content: center; }
  .tray-msg { flex: 1 1 100%; order: 3; }

  /* 2c · modal header: title on its own full-width row (no word-per-line wrap),
     export buttons on a row below, close × pinned to the corner */
  .ov-head { flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 16px 12px; position: relative; }
  .ov-title { font-size: 18px; flex: 1 1 100%; padding-inline-start: 48px; }
  /* a title with lines under it: the box takes the title's row and clears the close button for all of them */
  .ov-titlebox { flex: 1 1 100%; padding-inline-start: 48px; }
  .ov-titlebox .ov-title { padding-inline-start: 0; }
  .ov-actions { order: 3; width: 100%; margin-inline-start: 0; margin-top: 2px; gap: 8px; }
  .ov-actions .btn.small { flex: 1 1 0; justify-content: center; }
  .ov-actions .ov-close { position: absolute; top: 12px; inset-inline-start: 14px; margin: 0; }

  /* 2d · ranking modal: body scrolls as one; TWO side-by-side buttons switch
     between the weights editor and the ranking table (no collapsing menu) */
  .match-body { padding: 14px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 0; }
  .mt-seg { display: flex; gap: 8px; }
  .mt-seg-b { flex: 1 1 0; font: inherit; font-weight: 800; font-size: 14px;
    color: var(--ink); background: var(--surface, #fff);
    border: 1.5px solid var(--hairline-2, #ddd6c8); border-radius: 10px;
    padding: 11px 8px; cursor: pointer; }
  .mt-seg-b.on { background: var(--bronze); border-color: var(--bronze); color: #fff; }
  .match-body.weights-collapsed .mt-sliders { display: none; }
  .match-body:not(.weights-collapsed) .mt-results { display: none; }
  .mt-results { max-height: none; }
  .rank-tablewrap { max-height: none; }
  /* the full table needs sideways scrolling on a phone — show the columns
     that matter instead: # · דירה · מחיר · התאמה */
  .rank-table .m-hide { display: none; }
  .rank-table td { white-space: normal; }   /* long names wrap, no sideways scroll */
  /* stage tabs: single line with arrows — see the mobile stepper block in
     v2.recolor.css (wrapping them cost three rows of the viewport) */

  /* 2e · apartment drawer header. The .ov-head rules above never applied here
     (the drawer has its own .dw-head), so the title block could not shrink —
     "דירה 12" and its building/floor line ran left, under the ★ and the ×,
     and the × sat inset instead of in the corner. Now: the actions are pinned
     to the far end, the header reserves that space, and the two lines clip. */
  /* ★ and × are two different decisions — "I like this flat" and "close this" —
     so they must not read as one pair of buttons. × keeps the corner; ★ sits
     centred in the gap between it and the text, clear of both. 130px reserves
     that whole zone so neither line of text can slide under either button. */
  .dw-head { position: relative; gap: 10px; padding: 14px 16px 12px;
             padding-inline-end: 130px; min-height: 74px; }
  .dw-head > div:first-child { min-width: 0; flex: 1 1 auto; }
  .dw-title { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dw-sub { display: block; font-size: 12.5px; white-space: nowrap;
            overflow: hidden; text-overflow: ellipsis; }
  .dw-head .ov-actions { display: contents; }       /* position the two buttons individually */
  /* inset-inline-start:auto cancels the .ov-actions .ov-close rule above (same
     specificity, it also sets a start offset — with both set the start wins and
     the × jumped to the other side, straight under the title) */
  .dw-head .ov-close { position: absolute; inset-inline-start: auto;
                       inset-inline-end: 12px; top: 12px; margin: 0; }
  .dw-head .card-fav { position: absolute; inset-inline-end: 67px; top: 50%;
                       transform: translateY(-50%); margin: 0; }
}

/* explains the equity clamp instead of silently rewriting the typed number */
.dw-eq-note { font-size: 12px; color: var(--bronze, #a5762c); font-weight: 600;
  min-height: 16px; margin-top: 3px; }

/* the AI-ranking entry inside the ranking overlay */
.mt-ai { background: var(--bronze); border-color: var(--bronze); color: #fff; font-weight: 800; }
.mt-ai:hover { background: var(--bronze-hi, #c8a563); border-color: var(--bronze-hi, #c8a563); }

/* ═══════════ CARD LAYOUT MODES (toolbar "פריסה") ═══════════════════
   "רגיל" is the grid above. The other two trade card size for how many
   apartments fit on one screen — on a phone that is the difference between
   one apartment per swipe and five. The choice is per project (localStorage). */

/* צפוף · four across on the desktop, two on a phone */
.cards.lay-dense { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cards.lay-dense .bld-cards { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cards.lay-dense .card-media { height: 142px; }
.cards.lay-dense .card-fav { width: 38px; height: 38px; font-size: 21px; }
.cards.lay-dense .card-body { padding: 12px 13px 11px; gap: 6px; }
.cards.lay-dense .card-name { font-size: 15.5px; }
.cards.lay-dense .card-loc { font-size: 11.5px; }
.cards.lay-dense .card-price { font-size: 21px; }
.cards.lay-dense .card-monthly { font-size: 12px; }
.cards.lay-dense .card-eq { display: none; }
.cards.lay-dense .spec-v { font-size: 14px; }
.cards.lay-dense .spec-k { font-size: 10px; }
.cards.lay-dense .card-extras { max-height: 24px; overflow: hidden; }
.cards.lay-dense .xtag { font-size: 11px; padding: 2px 8px; }
.cards.lay-dense .card-actions .btn { font-size: 12.5px; padding: 7px 8px; }
.cards.lay-dense .media-tag { font-size: 10px; padding: 3px 8px; }

/* שורות · one apartment per row: thumbnail beside the numbers */
.cards.lay-rows { grid-template-columns: 1fr; gap: 12px; }
.cards.lay-rows .bld-cards { grid-template-columns: 1fr; gap: 12px; }
.cards.lay-rows .card { flex-direction: row; align-items: stretch; }
.cards.lay-rows .card:hover { transform: none; }
.cards.lay-rows .card-media { flex: 0 0 30%; max-width: 260px; height: auto; min-height: 132px; }
.cards.lay-rows .card-fav { width: 36px; height: 36px; font-size: 20px; top: 8px; }
.cards.lay-rows .badge, .cards.lay-rows .media-tag { font-size: 10.5px; padding: 3px 8px; }
.cards.lay-rows .card-body {
  flex: 1; display: grid; align-items: center; gap: 2px 16px; padding: 12px 16px;
  grid-template-columns: minmax(130px, .9fr) minmax(140px, .9fr) minmax(210px, 1.4fr) auto;
  grid-template-areas: "top price specs actions" "extras monthly specs actions";
}
.cards.lay-rows .card-top { grid-area: top; flex-direction: column; align-items: flex-start; gap: 2px; }
.cards.lay-rows .card-price-row { grid-area: price; }
.cards.lay-rows .card-monthly { grid-area: monthly; margin: 0; font-size: 12px; }
.cards.lay-rows .card-eq { display: none; }
.cards.lay-rows .spec-row { grid-area: specs; border: 0; padding: 0; margin: 0; }
.cards.lay-rows .card-extras { grid-area: extras; max-height: 24px; overflow: hidden; }
.cards.lay-rows .card-actions { grid-area: actions; margin: 0; padding: 0; flex-direction: column; gap: 6px; }
.cards.lay-rows .card-actions .btn { font-size: 12.5px; padding: 7px 14px; white-space: nowrap; }
@media (max-width: 1024px) {
  .cards.lay-dense, .cards.lay-dense .bld-cards { grid-template-columns: repeat(3, 1fr); }
  .cards.lay-rows .card-body {
    grid-template-columns: minmax(120px, 1fr) auto;
    grid-template-areas: "top price" "specs specs" "extras extras" "actions actions";
  }
  .cards.lay-rows .card-monthly { display: none; }
  .cards.lay-rows .card-actions { flex-direction: row; }
}
@media (max-width: 640px) {
  .cards.lay-dense, .cards.lay-dense .bld-cards { grid-template-columns: repeat(2, 1fr); }
  .cards.lay-dense .card-media { height: 110px; }
  .cards.lay-dense .card-actions { flex-direction: column; }
  .cards.lay-rows .card-media { flex-basis: 34%; min-height: 118px; }
  /* small thumbnails: the badge must give way to the favourite star rather
     than run under it */
  .cards.lay-dense .badge, .cards.lay-rows .badge {
    max-width: calc(100% - 72px); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; font-size: 10.5px; padding: 4px 9px;
  }
  .cards.lay-rows .card-body { padding: 10px 12px; gap: 3px 10px; }
  .cards.lay-rows .card-price { font-size: 20px; }
  .cards.lay-rows .card-extras { display: none; }
  .cards.lay-rows .spec-v { font-size: 13.5px; }
  .cards.lay-rows .spec-k { font-size: 10px; }
  .cards.lay-rows .card-actions .btn { font-size: 12px; padding: 6px 10px; }
}

/* signed-in state inside the auth modal */
.auth-state { margin-top: 14px; font-size: 15px; text-align: center; }
.auth-state a { color: var(--bronze); font-weight: 700; }

/* auth modal: readable fonts, inline field feedback, explicit consent */
.auth-label { font-size: 15px; }
.auth-label input { font-size: 16px; }
.auth-hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.auth-field-msg { font-size: 14.5px; font-weight: 600; color: #b3261e; min-height: 0;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.auth-field-msg.ok { color: var(--best); }
.auth-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px;
  line-height: 1.6; color: var(--ink-soft); cursor: pointer; }
.auth-check input { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: var(--bronze); }
.auth-check a { color: var(--bronze); text-decoration: underline; }
.auth-note { font-size: 13.5px; }
.auth-consent { font-size: 13.5px; }
.auth-tab { font-size: 15px; }
.auth-wait { align-self: flex-start; }

/* onboarding step inside the auth modal */
.auth-ob-title { margin: 0; font-size: 20px; }
.auth-ob-sub { margin: 0 0 4px; font-size: 14.5px; color: var(--ink-soft); }
#auth-onboard textarea { border: 1.5px solid var(--hairline-2); border-radius: 10px;
  padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; }
#auth-onboard textarea:focus { outline: none; border-color: var(--bronze); }

/* payment step in the auth modal */
.auth-pay-list { margin: 4px 0 10px; padding-inline-start: 18px; color: var(--ink-soft);
                 font-size: 14px; line-height: 1.9; }
.auth-pay-list li { list-style: "✓  "; }

/* "updated from another device" — quiet, bottom centre, never blocks a control */
.sync-toast { position: fixed; inset-inline: 0; bottom: 86px; margin: 0 auto; width: max-content;
  max-width: 90vw; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; z-index: 90; opacity: .96;
  transition: opacity .5s; box-shadow: 0 8px 24px rgba(15,25,20,.25); }
.sync-toast.out { opacity: 0; }

/* the "not yours yet" screen (402) */
.locked-sec { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: var(--paper); font-family: var(--sans); }
.locked-box { max-width: 520px; text-align: center; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 22px; padding: 40px 28px;
  box-shadow: var(--sh-1); }
.locked-ico { font-size: 40px; margin-bottom: 10px; }
.locked-box h2 { font-family: var(--serif); font-size: 25px; margin: 0 0 10px; }
.locked-box p { color: var(--ink-soft); font-size: 15px; line-height: 1.7; margin: 0 0 18px; }
.locked-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.locked-demo { font-size: 13.5px; margin: 18px 0 0 !important; }

/* the reCAPTCHA checkbox inside the auth modal: it is 304px wide and the modal
   is narrower on a phone, so scale it down rather than let it overflow */
#auth-recaptcha { display: flex; justify-content: center; margin: 6px 0 2px; }
#auth-recaptcha:empty { display: none; }
@media (max-width: 400px) {
  #auth-recaptcha { transform: scale(.86); transform-origin: center; }
}

/* ── לוח התשלומים לקבלן (opened from the apartment drawer) ── */
/* .ov-box carries no styling of its own — every overlay dresses its own box —
   so without this the window had NO background and the blurred page showed
   straight through the numbers.
   The header must also stay put: a schedule is read by scrolling, and losing the
   apartment name while scrolling costs the reader the context of the numbers. */
.pay-box { max-width: 660px; width: 100%; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-l);
  box-shadow: 0 24px 60px rgba(15,25,20,.28); overflow: hidden; }
.pay-box .ov-head { background: var(--surface); border-bottom: 1px solid var(--hairline);
  padding: 16px 22px; }
.pay-box .ov-head { flex: 0 0 auto; }
/* min-height:0 is what actually lets a flex child scroll — without it the box
   grows past the viewport and the overflow never engages */
.pay-body { padding: 18px 22px 24px; overflow-y: auto; min-height: 0; flex: 1 1 auto;
  -webkit-overflow-scrolling: touch; }
.pay-signrow { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft);
  margin-bottom: 14px; }
.pay-signrow input { display: block; margin-top: 6px; font: inherit; font-weight: 600;
  padding: 9px 12px; border: 1px solid var(--hairline-2); border-radius: 10px;
  background: var(--surface); color: var(--ink); }
.pay-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.pay-table th { text-align: start; font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 10px 8px; border-bottom: 1px solid var(--hairline); }
.pay-table td { padding: 11px 8px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.pay-table tfoot td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--hairline-2); }
.pay-n { font-family: var(--num); color: var(--muted); width: 28px; }
.pay-when { line-height: 1.45; }
.pay-date { display: block; font-family: var(--num); font-size: 12.5px; color: var(--bronze);
  font-weight: 700; margin-top: 2px; }
.pay-pct { font-family: var(--num); font-weight: 700; width: 62px; }
.pay-amt { font-family: var(--num); font-weight: 700; white-space: nowrap; text-align: end; }
.pay-notes { margin-top: 18px; background: #f6f5f0; border-radius: 12px; padding: 14px 16px; }
.pay-notes h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 800; }
.pay-notes ul { margin: 0; padding-inline-start: 18px; color: var(--ink-soft);
  font-size: 13px; line-height: 1.75; }
.pay-disc { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.65; }
/* it opens the answer to "how do I actually pay for this", so it should not
   look like a footnote under the price */
.dw-payplan { margin-top: 12px; width: 100%; justify-content: center;
  border: 1.5px solid var(--bronze); background: var(--bronze-soft);
  color: var(--bronze); font-weight: 800; font-size: 14px; padding: 11px 14px;
  border-radius: 12px; }
.dw-payplan:hover { background: var(--bronze); color: #fff; border-color: var(--bronze); }
@media (max-width: 560px) {
  .pay-body { padding: 14px 14px 20px; }
  .pay-table { font-size: 13.5px; }
  .pay-table td, .pay-table th { padding: 9px 5px; }
  /* the table's narrowest was 26 px wider than an iPhone 13's box, cutting the monthly column: the fixed widths go
     and the note under the last monthly figure may wrap */
  .pay-n { width: auto; }
  .pay-pct { width: auto; }
  .pay-mon-note { white-space: normal; }
  /* the line under the title: its box (.ov-titlebox) clears the close button pinned beside it */
  .pay-box .ov-head .dw-sub { display: block; }
}
.pay-table th span { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted);
  margin-top: 2px; }
.pay-mon { font-family: var(--num); font-weight: 700; color: var(--bronze); text-align: end;
  white-space: nowrap; }
.pay-eqnote { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
/* who pays for this instalment — own funds vs the bank */
.pay-split { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.pay-split i { font-style: normal; font-size: 11px; font-weight: 700; font-family: var(--sans);
  padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.pay-split .eq { background: #e8f1ea; color: #2f6b45; }
.pay-split .mo { background: var(--bronze-soft); color: var(--bronze); }
.pay-mon-note { display: block; font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  color: var(--muted); margin-top: 2px; }
.pay-basis { margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7;
  background: #f6f5f0; border-inline-start: 3px solid var(--bronze); border-radius: 8px;
  padding: 11px 13px; }
.pay-basis b { color: var(--ink); }
/* the construction input index on the schedule: an estimate under each linked payment, then the contract's terms */
.pay-idx { display: block; margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--bronze);
  white-space: normal; }   /* the amount cell does not wrap; this note may, or a phone's table overflows */
.pay-idx em { display: block; font-style: normal; font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  color: var(--muted); }
.pay-idx.none { font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--muted); }
.pay-index { margin-top: 16px; border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px; }
.pay-index h4 { margin: 0 0 6px; font-size: 13.5px; font-weight: 800; }
.pay-index p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.pay-index b { color: var(--ink); }
.pay-index .pay-index-est { margin-top: 10px; background: var(--bronze-soft); border-radius: 8px; padding: 9px 11px; }
.pay-index .pay-index-src { font-size: 11.5px; color: var(--muted); }
/* brief highlight when a typed equity was capped to something meaningful */
.tb-range.tb-corrected .tb-num { border-color: var(--bronze); box-shadow: 0 0 0 3px var(--bronze-soft); }

/* ── registration as ONE panel ─────────────────────────────────────────────
   The steps unlock in place; a finished step collapses to a line you can
   reopen. Nothing swaps out, so it reads as a single form that fills itself in
   rather than a sequence of screens. */
.auth-steps { display: flex; align-items: center; gap: 0; list-style: none;
  margin: 4px 0 18px; padding: 0; }
.auth-steps li { display: flex; align-items: center; gap: 7px; flex: 1 1 0;
  font-size: 12px; font-weight: 700; color: var(--muted); position: relative; }
.auth-steps li b { width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--hairline);
  color: var(--muted); font-family: var(--num); font-size: 12px; }
.auth-steps li.on { color: var(--bronze); }
.auth-steps li.on b { background: var(--bronze); color: #fff; }
.auth-steps li.done b { background: var(--bronze-hi); color: #fff; }
.auth-steps li.done { color: var(--ink-soft); }
.auth-steps li + li::before { content: ""; position: absolute; inset-inline-end: 100%;
  width: 14px; height: 1px; background: var(--hairline-2); }
@media (max-width: 420px) { .auth-steps li span { display: none; } }

.auth-sec { border-top: 1px solid var(--hairline); padding-top: 14px; margin-top: 14px; }
.auth-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.auth-sec[hidden] { display: none; }
.auth-sec-title { margin: 0 0 2px; font-size: 15px; font-weight: 800; color: var(--ink); }
.auth-sec-sub { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }
/* the finished details step, as one reopenable line */
.auth-sec-done { display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 10px; background: #f6f5f0; border: 1px solid var(--hairline);
  border-radius: 12px; padding: 10px 13px; font: inherit; font-size: 13px;
  font-weight: 700; color: var(--bronze); cursor: pointer; }
.auth-sec-done span { color: var(--ink); font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.auth-sec-done:hover { border-color: var(--bronze); }

/* ── the ranking chooser (first open) ── */
.rank-choice { max-width: 520px; width: 100%; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r-l);
  box-shadow: 0 24px 60px rgba(15,25,20,.28); overflow: hidden; }
.rank-choice .ov-head { border-bottom: 1px solid var(--hairline); padding: 16px 22px; }
.rank-choice-body { padding: 18px 22px 22px; display: grid; gap: 12px; }
.rank-opt { text-align: start; font: inherit; cursor: pointer; border-radius: 14px;
  border: 1.5px solid var(--hairline-2); background: var(--surface); padding: 15px 17px;
  display: grid; gap: 5px; }
.rank-opt b { font-size: 15.5px; color: var(--ink); }
.rank-opt span { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.rank-opt:hover { border-color: var(--bronze); background: var(--bronze-soft); }
.mt-ainote { color: var(--bronze); font-weight: 600; }
