/* =========================================================
   TIVOLI RESIDENCES · R1 FINDER
   Skinned to the Hussain Husaini brand:
   near-black canvas, warm off-white, signature red, Sora + Hanken Grotesk.
   ========================================================= */

:root {
  /* --- Brand palette (sampled from husaini.co) --- */
  --bg:        #0d0e13;   /* main canvas */
  --bg-2:      #14161d;   /* raised surface */
  --bg-3:      #1a1d26;   /* cards */
  --bg-4:      #222530;   /* hover / inputs */
  --black:     #000000;

  --text:      #f5f1e8;   /* warm off-white */
  --text-dim:  rgba(245,241,232,.9);   /* readable secondary */
  --text-faint:rgba(245,241,232,.78);  /* micro-labels, still legible */
  --line:      rgba(245,241,232,.14);
  --line-2:    rgba(245,241,232,.24);

  --red:       #d71920;   /* signature red */
  --red-deep:  #a80f18;
  --red-tint:  rgba(215,25,32,.14);
  --navy:      #232a54;   /* secondary accent */
  --navy-2:    #34407e;

  --paper:     #fbfaf6;   /* light sections / print */
  --paper-2:   #f1f4f7;
  --ink:       #0d0e13;

  --pos:       #35b07a;   /* cash surplus */
  --pos-dim:   rgba(53,176,122,.16);
  --neg:       #d9a441;   /* monthly top-up (amber, distinct from brand red) */
  --neg-dim:   rgba(217,164,65,.16);
  --info:      #4da6ff;   /* neutral blue — monthly difference / top-up */
  --info-dim:  rgba(77,166,255,.15);
  --info-deep: #2563c9;   /* solid blue for filled tiles (white text) */

  /* Home-size colour coding (1 / 2 / 3 bedrooms) */
  --br1:       #f0a53a;   /* amber */
  --br2:       #35c9c9;   /* teal */
  --br3:       #b07bff;   /* violet */

  /* --- Type --- */
  --display: "Sora", system-ui, -apple-system, sans-serif;
  --sans:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --script:  "Pinyon Script", cursive;
  --arabic:  "IBM Plex Sans Arabic", "Hanken Grotesk", sans-serif;

  /* --- Metrics --- */
  --radius:    16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --shadow-1:  0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --shadow-2:  0 2px 8px rgba(0,0,0,.4), 0 28px 60px rgba(0,0,0,.5);
  --shadow-red: 0 16px 40px rgba(215,25,32,.32);
  --ring: 0 0 0 3px rgba(215,25,32,.4);
  --maxw: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
body.rtl { font-family: var(--arabic); }
body.rtl .kicker, body.rtl .wordmark-sub { letter-spacing: 0; }

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
a { color: inherit; }
button { font-family: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--red); color: #fff; padding: 12px 18px; border-radius: 0 0 12px 0; }
.skip-link:focus { left: 0; }

.kicker {
  font-family: var(--sans);
  text-transform: uppercase; letter-spacing: .24em; font-size: .7rem; font-weight: 700;
  color: var(--red); margin: 0 0 .9rem; display: inline-flex; align-items: center; gap: .7em;
}
.kicker::before { content: ""; width: 20px; height: 2px; background: var(--red); }
.kicker-light { color: #fff; }
.kicker-light::before { background: var(--red); }

/* ============================ PIN GATE (Apple-style) ============================ */
html.pin-locked, html.pin-locked body { overflow: hidden; height: 100%; }
.pin-gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem; padding: 2rem 1.2rem; color: var(--text);
  background: #0d0e13; isolation: isolate;
  animation: pinIn .4s var(--ease) both;
}
.pin-gate::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("assets/images/tivoli-balcony-sunset.jpg") center/cover no-repeat;
  filter: blur(22px) brightness(.45) saturate(1.15); transform: scale(1.15);
}
.pin-gate::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,14,19,.68), rgba(13,14,19,.9));
}
.pin-gate.is-unlocked { opacity: 0; transform: scale(1.04); pointer-events: none; transition: opacity .42s var(--ease), transform .42s var(--ease); }
@keyframes pinIn { from { opacity: 0; } to { opacity: 1; } }
.pin-lock { width: 42px; height: 42px; color: var(--text); opacity: .95; }
.pin-head { text-align: center; display: grid; gap: .35rem; }
.pin-sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .22em; color: var(--gold-soft, #e6cf9a); font-weight: 700; }
.pin-title { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.pin-hint { font-size: .85rem; color: var(--text-dim); }
.pin-hint.is-error { color: #ff6b6b; }
.pin-dots { display: flex; gap: 1.1rem; margin: .4rem 0 .6rem; }
.pin-dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid rgba(245,241,232,.65); background: transparent; transition: background .15s, transform .15s; }
.pin-dot.filled { background: var(--text); border-color: var(--text); transform: scale(1.05); }
.pin-dots.shake { animation: pinShake .45s; }
@keyframes pinShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-9px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(4px)} }
.pin-keys { display: grid; grid-template-columns: repeat(3, 74px); gap: 18px; }
.pin-key {
  width: 74px; height: 74px; border-radius: 50%; border: 1px solid rgba(245,241,232,.16);
  background: rgba(245,241,232,.08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--text); display: grid; place-items: center; line-height: 1; cursor: pointer;
  transition: background .12s, transform .08s;
}
.pin-key:hover { background: rgba(245,241,232,.14); }
.pin-key:active { background: rgba(245,241,232,.22); transform: scale(.96); }
.pin-key b { font-family: var(--display); font-size: 1.7rem; font-weight: 500; }
.pin-key span { display: block; font-size: .52rem; letter-spacing: .16em; color: var(--text-dim); margin-top: 2px; height: .6rem; }
.pin-key.pin-empty { background: none; border: none; pointer-events: none; }
.pin-key.pin-del { background: none; border: none; }
.pin-key.pin-del:hover { background: rgba(245,241,232,.1); }
.pin-key.pin-del svg { width: 26px; height: 26px; }
.pin-cancel { margin-top: .4rem; background: none; border: none; color: var(--text-dim); font-weight: 600; font-size: .9rem; padding: .5rem 1rem; border-radius: 999px; cursor: pointer; }
.pin-cancel:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .pin-gate, .pin-dots.shake { animation: none; } }

/* ============================ TOP BAR ============================ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem clamp(1rem, 4vw, 2.4rem);
  background: rgba(13,14,19,.82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.wordmark { text-decoration: none; display: grid; line-height: 1; }
.wordmark-name { font-family: var(--script); font-size: 1.8rem; line-height: .9; color: var(--text); }
.wordmark-sub { font-size: .62rem; text-transform: uppercase; letter-spacing: .2em; color: var(--text-faint); margin-top: .2rem; }
.topbar-divider { width: 1px; height: 30px; background: var(--line-2); }
.topbar-project { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; color: var(--text-dim); font-weight: 600; }
.topbar-nav { margin-inline-start: auto; display: flex; align-items: center; gap: .4rem; }
.topbar-link {
  text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--text-dim);
  padding: .55rem .85rem; border-radius: 999px; transition: color .2s, background .2s;
}
.topbar-link:hover { color: var(--text); background: var(--bg-3); }
.topbar-cta {
  display: inline-flex; align-items: center; gap: .5em; text-decoration: none;
  font-weight: 700; font-size: .88rem; color: #fff; background: var(--red);
  padding: .58rem 1.1rem; border-radius: 999px;
  transition: transform .2s var(--ease), background .2s;
}
.topbar-cta:hover { transform: translateY(-1px); background: var(--red-deep); }

/* ============================ HERO ============================ */
.hero {
  position: relative; min-height: min(90vh, 780px);
  display: flex; align-items: flex-end;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.2rem, 5vw, 4rem) clamp(2.4rem, 6vw, 4.5rem);
  color: var(--text); overflow: hidden; isolation: isolate; background: var(--black);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 60%;
  opacity: .92; animation: heroDrift 28s ease-in-out infinite alternate;
}
@keyframes heroDrift { from { transform: scale(1.05); } to { transform: scale(1.13) translateY(-1.5%); } }
.hero-wash {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(13,14,19,.94) 0%, rgba(13,14,19,.68) 42%, rgba(13,14,19,.2) 74%, transparent 100%),
    linear-gradient(0deg, rgba(13,14,19,.97) 0%, rgba(13,14,19,.55) 32%, rgba(13,14,19,.12) 60%, transparent 78%);
}
body.rtl .hero-wash { transform: scaleX(-1); }
.hero-inner { max-width: 880px; position: relative; }
.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.5rem, 6.6vw, 5.2rem); line-height: .98; letter-spacing: -.03em;
  margin: 0 0 1.2rem; max-width: 16ch; animation: rise .9s var(--ease) both;
}
.hero-lede {
  font-size: clamp(1.02rem, 1.9vw, 1.3rem); line-height: 1.6; max-width: 54ch;
  color: rgba(245,241,232,.9); text-shadow: 0 1px 12px rgba(13,14,19,.6);
  margin: 0 0 2rem; animation: rise .9s var(--ease) .08s both;
}
.hero-facts {
  display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 3.4vw, 2.8rem);
  padding: 1.4rem 0 1.7rem; border-top: 1px solid var(--line-2);
  animation: rise .9s var(--ease) .16s both;
}
.hero-fact { display: grid; gap: .15rem; }
.hero-fact strong { font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 2.4vw, 1.7rem); letter-spacing: -.02em; }
.hero-fact span { font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; color: var(--text-faint); }
.hero-scroll {
  display: inline-flex; align-items: center; gap: .5em; text-decoration: none;
  font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--red);
  padding: 1rem 1.9rem; border-radius: 999px; box-shadow: var(--shadow-red);
  transition: transform .25s var(--ease), background .25s; animation: rise .9s var(--ease) .24s both;
}
.hero-scroll:hover { transform: translateY(-2px); background: var(--red-deep); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ============================ SHELL ============================ */
.shell { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.4rem, 6vw, 5rem) clamp(1.1rem, 4vw, 2.4rem) 3rem; }

/* ============================ BOARD ============================ */
.board { display: block; }

/* Stepper — horizontal, centered, below the banner */
.stepper { margin: 0 auto clamp(1.8rem, 3.4vw, 2.8rem); max-width: 900px; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem .1rem; }
.step-item { display: flex; align-items: center; gap: .7rem; padding: .65rem .9rem; border-radius: 999px; position: relative; transition: background .25s; }
.step-item::after { content: ""; width: clamp(14px, 3.4vw, 52px); height: 2px; background: var(--line-2); margin: 0 .15rem; flex: none; transition: background .25s; }
.step-item:last-child::after { display: none; }
.step-dot {
  position: relative; z-index: 1; flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-3); border: 2px solid var(--line-2);
  font-family: var(--display); font-weight: 600; font-size: .92rem; color: var(--text-faint);
  transition: all .3s var(--ease);
}
.step-text { display: grid; line-height: 1.15; }
.step-text strong { font-family: var(--sans); font-weight: 700; font-size: .9rem; color: var(--text-dim); white-space: nowrap; }
.step-text small { font-size: .7rem; color: var(--text-faint); white-space: nowrap; }
.step-item.active { background: var(--bg-3); }
.step-item.complete::after { background: var(--pos); opacity: .5; }
.step-item.is-clickable { cursor: pointer; }
.step-item.is-clickable:hover { background: var(--bg-4); }
.step-item.is-clickable:hover .step-text strong { color: var(--text); }
.step-item.active .step-dot { background: var(--red); border-color: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.step-item.active .step-text strong { color: var(--text); }
.step-item.complete .step-dot { background: transparent; border-color: var(--pos); color: var(--pos); font-size: 0; }
.step-item.complete .step-dot::after { content: "✓"; font-family: var(--sans); font-size: .9rem; }

/* Panels */
.board-body { min-width: 0; }
.panel {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.6vw, 2.8rem); box-shadow: var(--shadow-1);
  animation: panelIn .5s var(--ease) both;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel[hidden] { display: none; }
.panel-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: .7rem; }
.panel-lede { color: var(--text-dim); max-width: 58ch; margin: 0; font-size: 1.02rem; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }

/* Buttons */
.ghost-btn {
  flex: none; border: 1px solid var(--line-2); background: transparent; color: var(--text-dim);
  font-weight: 600; font-size: .88rem; padding: .62rem 1.15rem; border-radius: 999px; transition: all .2s var(--ease);
}
.ghost-btn:hover { border-color: var(--text-dim); color: var(--text); background: var(--bg-4); }
.ghost-sm { padding: .5rem .95rem; font-size: .82rem; }
.solid-btn { border: none; background: var(--red); color: #fff; font-weight: 700; padding: .8rem 1.5rem; border-radius: 999px; transition: transform .2s var(--ease), background .2s; }
.solid-btn:hover { transform: translateY(-1px); background: var(--red-deep); }
.solid-sm { padding: .58rem 1.1rem; font-size: .86rem; }
.link-btn {
  display: inline-flex; align-items: center; gap: .6em; border: none; background: none; color: var(--red);
  font-weight: 700; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; border-radius: 0;
  transition: gap .2s, color .2s;
}
.link-btn:hover { gap: .85em; color: var(--text); }
.link-btn-icon { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; }
.link-btn-icon::before { content: "+"; font-size: 1rem; line-height: 1; }
.link-btn[aria-expanded="true"] .link-btn-icon::before { content: "–"; }

/* Language cards */
.language-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.9rem; }
.lang-card {
  display: flex; align-items: center; gap: 1.1rem; text-align: start;
  background: var(--bg-2); border: 1.5px solid var(--line-2); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; transition: all .25s var(--ease); position: relative;
}
.lang-card:hover { border-color: var(--text-faint); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.lang-flag {
  flex: none; width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--text);
  background: var(--bg-4); border: 1px solid var(--line-2);
}
.lang-copy { display: grid; line-height: 1.3; }
.lang-copy strong { font-size: 1.16rem; font-family: var(--display); font-weight: 600; color: var(--text); }
.lang-copy small { color: var(--text-dim); font-size: .84rem; }
.lang-check { margin-inline-start: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); transition: all .2s; }
.lang-card.active { border-color: var(--red); background: var(--red-tint); }
.lang-card.active .lang-flag { background: var(--red); color: #fff; border-color: var(--red); }
.lang-card.active .lang-check { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3px var(--red-tint); }
.arabic-card .lang-copy { direction: rtl; text-align: right; }

/* Goal cards (Personal use / Investment) */
.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.9rem; }
.goal-card {
  display: grid; gap: 1rem; text-align: start; align-content: start;
  background: var(--bg-2); border: 1.5px solid var(--line-2); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; transition: all .25s var(--ease); position: relative;
}
.goal-card:hover { border-color: var(--text-faint); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.goal-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-4); border: 1px solid var(--line-2); color: var(--text); }
.goal-copy { display: grid; gap: .3rem; }
.goal-copy strong { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -.01em; }
.goal-copy small { color: var(--text-dim); font-size: .92rem; line-height: 1.5; }
.goal-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.goal-tags em { font-style: normal; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); background: var(--bg-4); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem; }
/* Personal = lifestyle (blue) */
.goal-card[data-goal="personal"].active { border-color: var(--info); background: var(--info-dim); }
.goal-card[data-goal="personal"].active .goal-icon { background: var(--info); border-color: var(--info); color: #06213f; }
.goal-card[data-goal="personal"].active .goal-tags em { color: var(--info); border-color: rgba(77,166,255,.4); }
/* Investment = returns (green) */
.goal-card[data-goal="investment"].active { border-color: #35c98a; background: rgba(53,201,138,.12); }
.goal-card[data-goal="investment"].active .goal-icon { background: #35c98a; border-color: #35c98a; color: #04371f; }
.goal-card[data-goal="investment"].active .goal-tags em { color: #4ff0a0; border-color: rgba(79,240,160,.4); }

/* Bedroom cards */
.bedroom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.bedroom-card {
  display: grid; gap: .55rem; text-align: start; background: var(--bg-2); border: 1.5px solid var(--line-2);
  border-radius: var(--radius); padding: 1.5rem 1.4rem 1.3rem; transition: all .25s var(--ease); position: relative; overflow: hidden;
}
.bedroom-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
body.rtl .bedroom-card::after { transform-origin: right; }
.bedroom-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--text-faint); }
.bedroom-card:hover::after { transform: scaleX(1); }
.bedroom-card > span:first-child { font-size: .74rem; text-transform: uppercase; letter-spacing: .16em; color: var(--red); font-weight: 700; }
.bedroom-card strong { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.bedroom-card small { color: var(--text-dim); font-size: .88rem; min-height: 2.4em; }
.bedroom-card dl { margin: .6rem 0 0; display: grid; gap: .4rem; border-top: 1px solid var(--line); padding-top: .85rem; }
.bedroom-card dl div { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.bedroom-card dt { font-size: .78rem; color: var(--text-faint); }
.bedroom-card dd { margin: 0; font-weight: 700; font-size: .92rem; }
.bedroom-card.active { border-color: var(--red); background: var(--red-tint); }
.bedroom-card.active::after { transform: scaleX(1); }

/* Colour-code each home size so 1 / 2 / 3 bedrooms are easy to tell apart */
.bedroom-card[data-bedroom="1"] > span:first-child { color: var(--br1); }
.bedroom-card[data-bedroom="2"] > span:first-child { color: var(--br2); }
.bedroom-card[data-bedroom="3"] > span:first-child { color: var(--br3); }
.bedroom-card[data-bedroom="1"]::after { background: var(--br1); }
.bedroom-card[data-bedroom="2"]::after { background: var(--br2); }
.bedroom-card[data-bedroom="3"]::after { background: var(--br3); }
.bedroom-card[data-bedroom="1"].active { border-color: var(--br1); background: rgba(240,165,58,.1); }
.bedroom-card[data-bedroom="2"].active { border-color: var(--br2); background: rgba(53,201,201,.1); }
.bedroom-card[data-bedroom="3"].active { border-color: var(--br3); background: rgba(176,123,255,.1); }

/* Toolbar */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.4rem;
  margin: 0 0 1.4rem; padding: 1.1rem 1.2rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.toolbar-group { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem; }
.toolbar-end { margin-inline-start: auto; }
.field { display: grid; gap: .38rem; }
.field > span { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); font-weight: 700; }
.field select, .field input {
  font-family: inherit; font-size: .9rem; color: var(--text); background: var(--bg-4);
  border: 1.5px solid var(--line-2); border-radius: 10px; padding: .58rem .8rem; min-width: 150px;
  transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23f5f1e8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-inline-end: 2rem;
}
body.rtl .field select { background-position: left .85rem center; padding-inline-end: .8rem; padding-inline-start: 2rem; }
.field select option { color: var(--ink); }
.field select:focus, .field input:focus { border-color: var(--red); box-shadow: var(--ring); }
.field input::placeholder { color: var(--text-faint); }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 44px; height: 26px; border-radius: 999px; background: var(--bg-4); border: 1px solid var(--line-2); position: relative; transition: background .25s var(--ease); flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-dim); transition: transform .25s var(--ease), background .25s; }
.switch input:checked + .switch-track { background: var(--red); border-color: var(--red); }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: #fff; }
body.rtl .switch input:checked + .switch-track::after { transform: translateX(-18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }
.switch-label { font-size: .9rem; font-weight: 600; color: var(--text-dim); }

/* Selection summary */
.selection-summary { display: flex; flex-wrap: wrap; gap: 1.8rem; margin: 0 0 1.4rem; padding: 0 .2rem; }
.selection-summary article { display: grid; gap: .12rem; }
.selection-summary span { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); font-weight: 700; }
.selection-summary strong { font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.selection-summary strong.positive { color: #4ff0a0; }
.selection-summary strong.negative { color: var(--info); }

/* Unit cards — floor-plan first, kept simple */
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.3rem; }
.unit-card {
  display: flex; flex-direction: column; background: var(--bg-3); border: 1.5px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); position: relative; cursor: pointer;
  transition: transform .28s var(--ease), box-shadow .28s, border-color .28s;
  animation: cardIn .5s var(--ease) both; animation-delay: var(--card-delay, 0ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.unit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.unit-card:hover .unit-plan { transform: scale(1.04); }
.unit-card.is-best-match { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shadow-2); }

/* Figure = floor plan on a light panel (drawings are dark line art) */
.unit-figure {
  position: relative; aspect-ratio: 4 / 3; background: #eef1f5;
  display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line);
}
.unit-plan { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .4s var(--ease); }
.unit-plan-fallback { color: #9aa6b2; display: grid; place-items: center; }
.unit-plan-fallback svg { width: 48px; height: 48px; }
.fig-tag {
  position: absolute; inset-block-end: .7rem; inset-inline-start: .7rem;
  display: inline-flex; align-items: center; gap: .35em;
  font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: #445; background: rgba(255,255,255,.82); border: 1px solid rgba(0,0,0,.08);
  padding: .3rem .55rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.fig-tag svg { width: 13px; height: 13px; }
.unit-figure .rank-pill {
  position: absolute; inset-block-start: .7rem; inset-inline-start: .7rem;
  font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: rgba(13,14,19,.72); border: none; padding: .32rem .65rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.unit-figure .is-best-match, .unit-card.is-best-match .rank-pill { background: var(--red); }
.unit-figure .status {
  position: absolute; inset-block-start: .7rem; inset-inline-end: .7rem;
  font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .32rem .65rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.status.vacant   { color: #fff; background: rgba(53,176,122,.9); }
.status.reserved { color: #1a1200; background: rgba(217,164,65,.92); }
.status.sold     { color: #fff; background: rgba(60,66,80,.85); }

.unit-body { display: grid; gap: .85rem; padding: 1.25rem 1.3rem 1.35rem; }
.unit-headline { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.unit-headline h3 { font-family: var(--display); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.unit-headline p { margin: 0; color: var(--text-dim); font-size: .84rem; font-weight: 600; text-align: end; }
body.rtl .unit-headline p { text-align: start; }
.unit-facts { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.unit-facts span { display: inline-flex; align-items: center; gap: .4em; font-size: .82rem; color: var(--text-dim); font-weight: 500; }
.unit-facts svg { color: var(--red); flex: none; }
/* Home-size colour coding carried onto the cards */
.unit-headline p.br1 { color: var(--br1); }
.unit-headline p.br2 { color: var(--br2); }
.unit-headline p.br3 { color: var(--br3); }
.fact-beds { font-weight: 700; }
.fact-beds.br1, .fact-beds.br1 svg { color: var(--br1); }
.fact-beds.br2, .fact-beds.br2 svg { color: var(--br2); }
.fact-beds.br3, .fact-beds.br3 svg { color: var(--br3); }
.unit-subline { font-size: .76rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

.unit-outcome { border-radius: var(--radius-sm); padding: .8rem .9rem; border: 1px solid transparent; display: grid; gap: .5rem; }
.unit-outcome.is-positive, .unit-outcome.is-negative { background: var(--info-dim); border-color: rgba(77,166,255,.32); }
.unit-outcome.is-neutral  { background: var(--bg-2); border-color: var(--line); }
.unit-outcome > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.unit-outcome span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.unit-outcome.is-positive span, .unit-outcome.is-negative span { color: var(--info); }
.unit-outcome.is-neutral span { color: var(--text-dim); }
.unit-outcome strong { font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.unit-outcome.is-positive strong, .unit-outcome.is-negative strong { color: var(--info); }
.unit-outcome small { font-size: .72rem; color: var(--text-dim); }
.coverage-meter { height: 6px; border-radius: 999px; background: rgba(245,241,232,.14); overflow: hidden; }
.coverage-meter span { display: block; height: 100%; border-radius: 999px; transition: width .5s var(--ease); }
.is-positive .coverage-meter span, .is-negative .coverage-meter span { background: var(--info); }
.is-neutral .coverage-meter span { background: var(--text-faint); }

.unit-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: .1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.unit-price { display: grid; gap: .05rem; }
.unit-price span { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); font-weight: 700; }
.unit-price strong { font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.unit-price small { font-size: .74rem; color: var(--text-dim); }
.unit-arrow {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--red); text-decoration: none;
  transition: transform .2s var(--ease), background .2s; box-shadow: 0 6px 16px rgba(215,25,32,.32);
}
.unit-arrow:hover { transform: translateY(-2px); background: var(--red-deep); }
body.rtl .unit-arrow svg { transform: scaleX(-1); }

.empty-state { grid-column: 1/-1; text-align: center; padding: 3rem 1rem; color: var(--text-dim); background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* Assumptions reveal */
.assumptions-reveal { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.assumptions-hint { margin: .5rem 0 0; font-size: .84rem; color: var(--text-faint); max-width: 54ch; }

/* ============================ ASSUMPTIONS ============================ */
.assumptions, .snapshot, .dataroom { max-width: var(--maxw); margin: 1.6rem auto 0; }
.assumptions { background: var(--black); color: var(--text); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3.6vw, 2.6rem); border: 1px solid var(--line); }
.assumptions[hidden], .snapshot[hidden], .dataroom[hidden] { display: none; }
.assumptions-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.3rem 1.6rem; }
.control { display: grid; gap: .55rem; }
.control-label { font-size: .82rem; color: var(--text-dim); font-weight: 500; }
.control-value { font-family: var(--display); font-size: 1.1rem; color: #fff; font-weight: 700; letter-spacing: -.01em; }
.control select {
  font-family: inherit; font-size: .9rem; color: var(--text); background: var(--bg-4);
  border: 1px solid var(--line-2); border-radius: 10px; padding: .55rem .75rem; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23f5f1e8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-inline-end: 2rem;
}
.control select option { color: var(--ink); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 999px; background: var(--line-2); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--red); border: 3px solid var(--black); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.5); transition: transform .15s; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--red); border: 3px solid var(--black); cursor: pointer; }

/* ============================ SNAPSHOT ============================ */
.snapshot { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.snap-card { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: grid; gap: .3rem; box-shadow: var(--shadow-1); }
.snap-card > span { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); font-weight: 700; }
.snap-card strong { font-family: var(--display); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.snap-card small { font-size: .76rem; color: var(--text-dim); }
.snap-emphasis { background: var(--info-deep); border-color: var(--info-deep); }
.snap-emphasis > span { color: rgba(255,255,255,.8); }
.snap-emphasis strong { color: #fff; }
.snap-emphasis strong.positive { color: #fff; }
.snap-emphasis strong.negative { color: #fff; }
.snap-emphasis small { color: rgba(255,255,255,.85); }

/* ============================ DATA ROOM ============================ */
.dataroom { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.dataroom > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem clamp(1.2rem, 3vw, 2rem); }
.dataroom > summary::-webkit-details-marker { display: none; }
.dataroom-summary { display: grid; gap: .2rem; }
.dataroom-summary strong { font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.dataroom-summary small { color: var(--text-faint); font-size: .86rem; }
.dataroom-chev { width: 13px; height: 13px; border-right: 2px solid var(--text-dim); border-bottom: 2px solid var(--text-dim); transform: rotate(45deg); transition: transform .25s; }
.dataroom[open] .dataroom-chev { transform: rotate(-135deg); }
.cashflow-band, .table-band { padding: 0 clamp(1.2rem, 3vw, 2rem) 1.8rem; }
.band-head h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.band-head p { color: var(--text-dim); font-size: .9rem; margin: 0 0 1.2rem; max-width: 64ch; }
.cashflow-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.6rem; align-items: start; }
.cashflow-bars { display: grid; gap: 1rem; align-content: start; }
.bar-row { display: grid; gap: .35rem; }
.bar-row > span { font-size: .8rem; color: var(--text-dim); }
.bar-row > strong { font-size: .95rem; font-weight: 700; }
.bar-track { height: 12px; border-radius: 999px; background: var(--bg-4); overflow: hidden; }
.bar { height: 100%; border-radius: 999px; transition: width .6s var(--ease); }
.bar.rent { background: var(--pos); }
.bar.payment { background: var(--red); }

.mini-table, #unitTable { width: 100%; border-collapse: collapse; font-size: .86rem; }
.mini-table th, .mini-table td { text-align: start; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.mini-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); font-weight: 700; }

.table-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.table-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem; margin: 0 0 1.2rem; }
.segmented { display: inline-flex; background: var(--bg-4); border: 1px solid var(--line-2); border-radius: 999px; padding: .25rem; }
.segment { border: none; background: none; color: var(--text-dim); font-weight: 700; font-size: .82rem; padding: .45rem .95rem; border-radius: 999px; transition: all .2s; }
.segment.active { background: var(--red); color: #fff; }
.search-field input { min-width: 200px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
#unitTable { min-width: 1040px; }
#unitTable thead th { position: sticky; top: 0; background: var(--bg-4); z-index: 1; padding: 0; border-bottom: 1px solid var(--line-2); }
#unitTable thead button { width: 100%; text-align: start; background: none; border: none; font: 700 .7rem/1 var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); padding: .75rem .7rem; cursor: pointer; white-space: nowrap; }
#unitTable thead button:hover { color: var(--text); }
#unitTable thead button.sorted-asc::after { content: " ↑"; color: var(--red); }
#unitTable thead button.sorted-desc::after { content: " ↓"; color: var(--red); }
#unitTable td { padding: .65rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
#unitTable tbody tr { cursor: pointer; transition: background .15s; }
#unitTable tbody tr:hover { background: var(--bg-3); }
.rank-badge { font-family: var(--display); font-size: 1rem; font-weight: 700; }
.rank-detail { display: block; font-size: .66rem; color: var(--text-faint); }
.unit-link { display: grid; text-decoration: none; }
.unit-link strong { color: var(--red); }
.unit-link span { font-size: .66rem; color: var(--text-faint); }
.muted-cell { color: var(--text-faint); font-size: .78rem; }
td.positive, dd.positive, .positive { color: var(--pos); }
td.negative, dd.negative, .negative { color: var(--neg); }
.table-note { font-size: .82rem; color: var(--text-faint); margin: 1rem .2rem 0; }

/* ============================ FOOTER ============================ */
.site-foot { border-top: 1px solid var(--line); margin-top: 3rem; background: var(--black); }
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 2.4rem clamp(1.1rem, 4vw, 2.4rem); display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 2.5rem; align-items: center; }
.foot-brand { display: grid; line-height: 1; }
.foot-brand strong { font-family: var(--script); font-size: 1.7rem; }
.foot-brand span { font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; color: var(--text-faint); margin-top: .3rem; }
.foot-note { font-size: .8rem; color: var(--text-dim); max-width: 62ch; margin: 0; }
.foot-actions { display: grid; gap: .4rem; text-align: end; }
body.rtl .foot-actions { text-align: start; }
.foot-actions a { font-size: .86rem; font-weight: 700; color: var(--red); text-decoration: none; }
.foot-actions a:hover { color: var(--text); }

/* =========================================================
   UNIT RETURN SHEET
   ========================================================= */
body.unit-page { background: var(--bg); }
.sheet-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 2.4rem); background: rgba(13,14,19,.9); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.sheet-topbar .eyebrow { font-size: .66rem; text-transform: uppercase; letter-spacing: .18em; color: var(--red); margin: 0 0 .1rem; font-weight: 700; }
.sheet-topbar h1 { font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.sheet-actions { display: flex; gap: .6rem; }
.sheet-main { max-width: 980px; margin: 0 auto; padding: clamp(1.4rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem) 4rem; }
.sheet { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.print-brand { display: none; }

.sheet-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  background: radial-gradient(120% 160% at 100% 0%, rgba(215,25,32,.18), transparent 55%), linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border-bottom: 1px solid var(--line);
}
.sheet-hero .eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .2em; color: var(--red); font-weight: 700; margin: 0 0 .5rem; }
.sheet-hero h2 { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; }
.sheet-hero > div:first-child p:last-child { color: var(--text-dim); margin: .5rem 0 0; }
.status-panel { display: grid; gap: .25rem; justify-items: end; text-align: end; }
body.rtl .status-panel { justify-items: start; text-align: start; }
.status-panel strong { font-family: var(--display); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
.status-panel small { font-size: .74rem; color: var(--text-faint); }

.sheet-facts {
  display: flex; flex-wrap: wrap; gap: .7rem 1.6rem;
  padding: 1.1rem clamp(1.4rem, 4vw, 2.6rem);
  background: var(--bg-3); border-bottom: 1px solid var(--line);
}
.sheet-fact { display: inline-flex; align-items: center; gap: .5em; font-size: .95rem; font-weight: 600; color: var(--text); }
.sheet-fact svg { color: var(--red); flex: none; }

/* "Why this unit" goal-specific callout */
.why-callout { padding: 1rem clamp(1.4rem, 4vw, 2.6rem); border-bottom: 1px solid var(--line); display: grid; gap: .3rem; }
.why-callout[hidden] { display: none; }
.why-tag { display: inline-flex; align-items: center; gap: .45em; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.why-callout p { margin: 0; font-size: 1.05rem; line-height: 1.5; color: var(--text); font-weight: 500; }
.why-personal { background: var(--info-dim); border-inline-start: 3px solid var(--info); }
.why-personal .why-tag { color: var(--info); }
.why-investment { background: rgba(53,201,138,.12); border-inline-start: 3px solid #35c98a; }
.why-investment .why-tag { color: #4ff0a0; }

.sheet-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.sheet-kpis article { background: var(--bg-2); padding: 1.3rem clamp(1rem,3vw,1.6rem); display: grid; gap: .3rem; }
.sheet-kpis span { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); font-weight: 700; }
.sheet-kpis strong { font-family: var(--display); font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.sheet-kpis .focus-kpi { background: var(--info-deep); }
.sheet-kpis .focus-kpi span { color: rgba(255,255,255,.85); }
.sheet-kpis .focus-kpi strong { color: #fff; }
.sheet-kpis .focus-kpi strong.positive, .sheet-kpis .focus-kpi strong.negative { color: #fff; }

.sheet-body { padding: clamp(1.4rem, 4vw, 2.6rem); display: grid; gap: 1.8rem; }
.sheet-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; background: var(--bg-3); }
.sheet-panel h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.detail-list { display: grid; gap: .15rem; margin: 0; }
.detail-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 1.2rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.detail-list div:last-child { border-bottom: none; }
.detail-list dt { color: #ffffff; font-size: 1.05rem; font-weight: 600; }
.detail-list dd { margin: 0; font-weight: 700; font-size: 1.12rem; text-align: end; color: #4ff0a0; }
.detail-list dd.positive, .detail-list dd.negative { color: var(--info); }
body.rtl .detail-list dd { text-align: start; }

.position-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
.position-summary article { background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: .8rem 1rem; display: grid; gap: .15rem; }
.position-summary span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); font-weight: 700; }
.position-summary strong { font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.position-layout { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 1.6rem; align-items: start; }
.tower-stack { display: grid; gap: .3rem; }
.tower-floor { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem .8rem; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); font-size: .82rem; }
.tower-floor span { color: var(--text-dim); }
.tower-floor strong { font-weight: 700; }
.tower-floor.active { background: var(--red); border-color: var(--red); }
.tower-floor.active span, .tower-floor.active strong { color: #fff; }
.same-floor-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.same-floor-head strong { font-weight: 700; }
.same-floor-head span { font-size: .78rem; color: var(--text-faint); }
.same-floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.floor-cell { display: grid; gap: .1rem; text-decoration: none; text-align: center; padding: .7rem .5rem; border-radius: 11px; border: 1.5px solid var(--line); background: var(--bg-2); transition: all .2s var(--ease); }
.floor-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--line-2); }
.floor-cell strong { font-family: var(--display); font-size: 1.05rem; font-weight: 700; }
.floor-cell span { font-size: .64rem; color: var(--text-faint); }
.floor-cell small { font-size: .62rem; color: var(--text-dim); }
.floor-cell.vacant { border-color: rgba(53,176,122,.4); }
.floor-cell.sold { opacity: .5; }
.floor-cell.reserved { border-color: rgba(217,164,65,.4); }
.floor-cell.selected { border-color: var(--red); background: var(--red-tint); }

.compact-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.compact-table th, .compact-table td { text-align: start; padding: .65rem .8rem; border-bottom: 1px solid var(--line); }
.compact-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); font-weight: 700; background: var(--bg-2); }
.compact-table tr:last-child td { border-bottom: none; }

.sheet-note { font-size: .82rem; color: var(--text-faint); font-style: italic; line-height: 1.6; margin: 0; }
.floorplan-section .floorplan-intro { margin-bottom: 1.1rem; }
.floorplan-intro strong { font-family: var(--display); font-size: 1.1rem; font-weight: 700; display: block; }
.floorplan-intro span { font-size: .85rem; color: var(--text-dim); }
.floorplan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.floorplan-grid.single-plan { grid-template-columns: 1fr; max-width: 560px; }
.floorplan-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; }
.floorplan-card figcaption { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: #555; margin-bottom: .7rem; font-weight: 700; }
.floorplan-card img { width: 100%; height: auto; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1080px) { .snapshot { grid-template-columns: repeat(3, 1fr); } .snap-emphasis { grid-column: span 3; } }
@media (max-width: 920px) {
  .stepper { max-width: none; }
  .stepper ol { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: .4rem; -webkit-overflow-scrolling: touch; }
  .step-item { flex: 0 0 auto; }
  .cashflow-layout, .sheet-grid, .position-layout { grid-template-columns: 1fr; }
  .sheet-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .bedroom-grid, .language-grid { grid-template-columns: 1fr; }
  .snapshot { grid-template-columns: 1fr 1fr; } .snap-emphasis { grid-column: span 2; }
  .hero { min-height: 80vh; }
  .foot-inner { grid-template-columns: 1fr; } .foot-actions { text-align: start; }
  .floorplan-grid { grid-template-columns: 1fr; }
  .toolbar-end { margin-inline-start: 0; }
  .topbar-divider, .topbar-project { display: none; }
}
@media (max-width: 480px) { .sheet-kpis, .snapshot { grid-template-columns: 1fr; } .snap-emphasis { grid-column: span 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-media img { animation: none; transform: scale(1.05); }
}

/* ============================ PRINT (white sheet) ============================ */
@media print {
  @page { margin: 12mm; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body.unit-page { background: #fff; color: #111; }
  .sheet-topbar, .site-foot, .print-hidden { display: none !important; }
  .sheet-main { max-width: none; padding: 0; }
  .sheet { box-shadow: none; border: 1px solid #ddd; border-radius: 0; background: #fff; color: #111; }

  /* Hero */
  .sheet-hero { background: #fff; border-bottom: 2px solid #111; }
  .sheet-hero h2, .status-panel strong { color: #111 !important; }
  .sheet-hero .eyebrow { color: var(--red); }
  #unitSubtitle, .sheet-hero p { color: #333 !important; }
  .status-panel small { color: #555 !important; }
  .print-brand { display: block; padding: 0 0 12px; border-bottom: 2px solid #111; margin-bottom: 16px; }
  .print-brand p { font-size: .7rem; text-transform: uppercase; letter-spacing: .18em; color: var(--red); margin: 0; }
  .print-brand strong { font-family: var(--display); font-size: 1.1rem; color: #111; }

  /* Quick facts strip — must be white, not dark */
  .sheet-facts { background: #fff !important; border-bottom: 1px solid #ddd; }
  .sheet-fact { color: #111 !important; }
  .sheet-fact svg { color: var(--red); }

  /* Why callout */
  .why-callout { background: #f3f6fc !important; border-bottom: 1px solid #ddd; border-inline-start: 3px solid #2563c9; }
  .why-callout p { color: #111 !important; }
  .why-personal .why-tag { color: #1f4e9c !important; }
  .why-investment { border-inline-start-color: #1c7c54; }
  .why-investment .why-tag { color: #1c7c54 !important; }

  /* KPIs */
  .sheet-kpis { background: #dcdcdc; }
  .sheet-kpis article { background: #fff; }
  .sheet-kpis span { color: #444 !important; }
  .sheet-kpis strong { color: #111 !important; }
  .sheet-kpis .focus-kpi { background: #e9f1fc; }
  .sheet-kpis .focus-kpi span { color: #33507a !important; }
  .sheet-kpis .focus-kpi strong,
  .sheet-kpis .focus-kpi strong.positive,
  .sheet-kpis .focus-kpi strong.negative { color: #14356e !important; }

  /* Panels + lists */
  .sheet-panel { background: #fff; border-color: #ccc; color: #111; }
  .sheet-panel h3, .floorplan-intro strong { color: #111; }
  .floorplan-intro span { color: #555; }
  .detail-list dt { color: #444 !important; }
  .detail-list dd { color: #111 !important; }
  .detail-list dd.positive, .detail-list dd.negative { color: #14356e !important; }
  .compact-table td { color: #111; }
  .compact-table td.positive { color: #1c7c54; }
  .compact-table td.negative { color: #14356e; }
  .sheet-note { color: #555; }

  /* Building position */
  .position-summary span { color: #444; }
  .position-summary strong { color: #111; }
  .position-summary article, .tower-floor, .floor-cell, .compact-table th { background: #f4f4f4; color: #111; border-color: #ddd; }
  .tower-floor span, .tower-floor strong { color: #111; }
  .floor-cell strong { color: #111; }
  .floor-cell span, .floor-cell small { color: #555; }
  .tower-floor.active, .floor-cell.selected { background: var(--red); border-color: var(--red); }
  .tower-floor.active span, .tower-floor.active strong,
  .floor-cell.selected strong, .floor-cell.selected span, .floor-cell.selected small { color: #fff !important; }
  .status.vacant { background: #e4f4ec; color: #1c7c54 !important; }

  /* Floor plan starts cleanly at the top of its own page */
  .floorplan-section { break-before: page; page-break-before: always; }
  .floorplan-card { background: #fff; border-color: #ccc; break-inside: avoid; page-break-inside: avoid; }
  .floorplan-card img { max-height: 220mm; width: auto; margin: 0 auto; }

  /* Keep blocks from splitting awkwardly across pages */
  .sheet-hero, .sheet-facts, .sheet-kpis, .sheet-panel, .position-summary article, .tower-floor { break-inside: avoid; page-break-inside: avoid; }

  a { text-decoration: none; color: inherit; }
}
