:root {
  --brand: #12a8cb;
  --brand-dark: #0b7e99;
  --brand-ink: #0a3a48;
  --ink: #10222b;
  --muted: #5b7280;
  --line: #dbe6ec;
  --bg: #f4f8fa;
  --card: #ffffff;
  --ok: #1f9d63;
  --ok-bg: #e6f6ee;
  /* Sold reads red — the one state an agent must never misread on the plan. */
  --sold: #d13c33;
  --warn: #b8860b;
  --warn-bg: #fdf4e0;
  --gone: #97a6b0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 34, 43, .06), 0 8px 24px rgba(16, 34, 43, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px 72px; }

/* ---------- header ---------- */
header {
  background: linear-gradient(135deg, var(--brand-ink), var(--brand-dark) 55%, var(--brand));
  color: #fff;
  padding: 22px 0 26px;
  margin-bottom: 26px;
}
.head-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
/* The supplied logo, isolated to white-on-transparent by scripts/make-brand.js,
   so it sits on the teal header without a box around it. Fixed height, width
   from the intrinsic 1.758 aspect. */
.mark { height: 54px; width: auto; display: block; flex: none; }
@media (max-width: 560px) { .mark { height: 42px; } }
.head-title { font-size: 21px; font-weight: 650; letter-spacing: .01em; }
.head-sub { font-size: 13px; opacity: .82; margin-top: 2px; }
.head-spacer { flex: 1; }

/* live-sync pill */
.sync {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px; padding: 7px 8px 7px 14px; font-size: 13px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #6ee7a8; flex: none; }
.sync.stale .dot { background: #ffcf5c; }
.sync.err .dot { background: #ff8f7a; }
.sync button {
  border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--brand-ink); font: inherit; font-weight: 600; font-size: 12px;
}
.sync button:hover { background: #fff; }
.sync button[disabled] { opacity: .55; cursor: default; }

/* ---------- generic ---------- */
.step { margin-bottom: 34px; }
.step-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none;
}
h2 { font-size: 18px; margin: 0; font-weight: 650; }
.step-hint { color: var(--muted); font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.banner {
  border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px;
  background: var(--warn-bg); border: 1px solid #f0dfae; color: #6b4e00;
}
.banner ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.project {
  font: inherit; text-align: left; cursor: pointer; padding: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.project:hover:not(.locked) { border-color: var(--brand); transform: translateY(-3px); }
.project.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(18,168,203,.22), var(--shadow); }
.project.locked { cursor: not-allowed; }
/* 16:9 to match the renders — a fixed height would crop them as the card widens. */
.project-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand-ink), var(--brand-dark) 60%, var(--brand)); position: relative; }
.project-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project.locked .project-img img { filter: saturate(.8); opacity: .9; }
.project-img .stamp {
  position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.94); color: var(--brand-ink);
}
.project-img .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(255,255,255,.9); font-size: 34px; font-weight: 700; letter-spacing: .06em;
}
.project-body { padding: 15px 18px 17px; }
.project-name { font-size: 19px; font-weight: 650; }
.project-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.project-blurb { font-size: 12.5px; color: var(--muted); margin-top: 9px; }

/* ---------- floors ---------- */
.floors { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.floor {
  text-align: left; font: inherit; cursor: pointer; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.floor:hover:not(.locked) { border-color: var(--brand); transform: translateY(-2px); }
.floor.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(18,168,203,.22), var(--shadow); }
.floor.locked { cursor: not-allowed; opacity: .72; background: #fbfcfd; }
.floor-use { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-dark); }
.floor-name { font-size: 17px; font-weight: 650; margin: 3px 0 8px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.soon { background: #eef2f5; color: var(--muted); }

/* ---------- plan ---------- */
.plan-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } }

.plan-wrap { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.plan-wrap img { display: block; width: 100%; height: auto; }
.plan-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Circular pins. A white ring keeps them legible over both the pale plan and
   the dark landscaping around it. */
.pin { stroke: #fff; stroke-width: 3; transition: r .12s, filter .12s; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.pin.available { fill: var(--ok); cursor: pointer; }
.pin.available:hover { r: 21; filter: drop-shadow(0 2px 5px rgba(0,0,0,.55)); }
.pin.reserved { fill: #e8ab00; cursor: not-allowed; }
.pin.sold { fill: var(--sold); cursor: not-allowed; }
.pin.held { fill: #7f8c96; stroke-dasharray: 5 3; cursor: not-allowed; }
.pin.unreleased { fill: #c3ced6; stroke-width: 2; opacity: .75; cursor: not-allowed; }
.pin.on { fill: var(--brand); stroke: var(--brand-ink); stroke-width: 5; }

.pin.hl { r: 21; stroke: var(--brand-ink); stroke-width: 5; }

/* hover card on a pin */
.pop {
  position: absolute; z-index: 6; width: 208px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 34px rgba(16, 34, 43, .24);
  padding: 12px 14px 13px;
  transform: translate(-50%, calc(-100% - 16px));
  opacity: 0; visibility: hidden; transition: opacity .12s;
}
.pop.show { opacity: 1; visibility: visible; }
.pop.below { transform: translate(-50%, 16px); }
.pop::after {
  content: ''; position: absolute; left: 50%; margin-left: -7px;
  border: 7px solid transparent;
}
.pop:not(.below)::after { top: 100%; border-top-color: #fff; }
.pop.below::after { bottom: 100%; border-bottom-color: #fff; }
.pop-code { font-weight: 700; font-size: 15.5px; letter-spacing: .02em; }
.pop-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pop-rows { margin: 10px 0 4px; font-size: 12.5px; }
.pop-row { display: flex; justify-content: space-between; gap: 12px; padding: 2.5px 0; color: var(--muted); }
.pop-row b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.pop-price { font-size: 17px; font-weight: 700; color: var(--brand-dark); margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.pop button {
  width: 100%; font: inherit; font-weight: 650; font-size: 13.5px; cursor: pointer;
  border: 0; border-radius: 9px; padding: 9px; background: var(--brand); color: #fff;
}
.pop button:hover { background: var(--brand-dark); }
.pop .state { font-size: 12.5px; font-weight: 650; text-align: center; padding: 8px; border-radius: 9px; background: #eef2f5; color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -2px; }

/* unit list */
.units-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px 11px; border-bottom: 1px solid var(--line);
}
.units-count { font-size: 13px; font-weight: 650; }
.units-head select {
  font: inherit; font-size: 12.5px; padding: 5px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.units { max-height: 500px; overflow-y: auto; padding: 8px; }
.unit {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%;
  font: inherit; text-align: left; cursor: pointer; padding: 10px 12px; margin-bottom: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.unit:hover { border-color: var(--brand); }
.unit.on { border-color: var(--brand); background: #f0fbfd; box-shadow: inset 0 0 0 1px var(--brand); }
.unit-code { font-weight: 700; letter-spacing: .02em; }
.unit-sub { font-size: 12px; color: var(--muted); }
.unit-price { font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- detail ---------- */
.detail { padding: 20px 22px; }
.detail-top { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.kv-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.kv-value { font-size: 20px; font-weight: 650; margin-top: 2px; }
.kv-value.brand { color: var(--brand-dark); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 20px; }
.planbtn {
  font: inherit; cursor: pointer; padding: 12px 14px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
}
.planbtn:hover { border-color: var(--brand); }
.planbtn.on { border-color: var(--brand); background: #f0fbfd; box-shadow: inset 0 0 0 1px var(--brand); }
.planbtn b { display: block; font-size: 14.5px; }
.planbtn span { font-size: 12.5px; color: var(--muted); }

/* headline figures above the schedule */
.sched-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sched-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px 14px; background: #fbfdfe; }
.sched-card.strong { background: linear-gradient(135deg, var(--brand-ink), var(--brand-dark)); border-color: transparent; color: #fff; }
.sched-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--muted); }
.sched-card.strong .sched-card-label { color: rgba(255,255,255,.78); }
.sched-card-value { font-size: 23px; font-weight: 700; margin: 5px 0 3px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sched-card-sub { font-size: 11.5px; color: var(--muted); }
.sched-card.strong .sched-card-sub { color: rgba(255,255,255,.78); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 700; color: #fff; background: var(--brand-ink); padding: 10px;
  /* The schedule can run to 43 rows inside a scroll box — keep the headings put. */
  position: sticky; top: 0; z-index: 1;
}
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
td { padding: 8px 10px; border-bottom: 1px solid #eef3f6; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.pct { color: var(--muted); font-size: 12.5px; }

/* Year blocks: the spanning cells are what make a long schedule scannable. */
td.yr, td.yr-pct {
  vertical-align: top; background: #f3f8fa; font-weight: 700; font-size: 12.5px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td.yr { color: var(--brand-ink); letter-spacing: .01em; }
td.yr-pct { color: var(--brand-dark); }

tr.dp td:not(.yr):not(.yr-pct) { background: #eaf8fb; font-weight: 650; }
tr.maint td:not(.yr):not(.yr-pct) { background: #fdf9ec; }
tr.total td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; font-size: 14.5px; background: #fff; }

.sched-note { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.sched-wrap { max-height: 520px; overflow-y: auto; border: 1px solid var(--line); border-radius: 11px; }
.sched-wrap td small.note { color: var(--muted); font-size: 11.5px; }

.actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.btn {
  font: inherit; font-weight: 650; cursor: pointer; border: 0; border-radius: 10px;
  padding: 12px 22px; background: var(--brand); color: #fff; font-size: 15px;
}
.btn:hover { background: var(--brand-dark); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.ghost { background: #fff; color: var(--brand-dark); border: 1px solid var(--line); }
.note { font-size: 12.5px; color: var(--muted); }

.hidden { display: none !important; }
