/* Starlight & Stone Estates — Night Observatory, Dreamscape palette */
:root {
  --pearl: #DDD6CF;
  --ivory: #D2C5B9;
  --mist: #BCB5B1;
  --lavender: #A7A1AF;
  --sage: #828779;
  --navy: #1A253A;
  --navy-2: #243149;
  --gold: #A07F60;
  --gold-hi: #DFC096;
  --gold-mid: #B4936B;
  --gold-lo: #6C513C;
  --rose: #D49A8C;
  --open: rgba(130, 135, 121, .7);
  --line: rgba(221, 214, 207, .12);
  --card: rgba(36, 49, 73, .86);
  --radius: 22px;
  --serif: Fraunces, Georgia, serif;
  --sans: Manrope, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--pearl); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
.sky {
  background-color: var(--navy);
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px 1px at 137px 89px, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 201px 17px, rgba(223,192,150,.7), transparent 60%),
    radial-gradient(1px 1px at 61px 173px, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1px 1px at 179px 211px, rgba(167,161,175,.5), transparent 60%),
    radial-gradient(1px 1px at 97px 131px, rgba(255,255,255,.25), transparent 60%);
  background-size: 240px 240px;
  min-height: 100vh;
}
a { color: var(--gold-hi); }
a:hover { color: #EBD5B3; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold-hi); color: var(--navy); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-weight: 500; }
.dim { color: var(--lavender); }
.gold { color: var(--gold-hi); }
.small { font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.h2 { font-size: 30px; margin: 0; }
.h3 { font-size: 23px; margin: 0; }

/* Header and footer */
.site-header { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding-top: 26px; padding-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--pearl); }
.brand > span { display: flex; flex-direction: column; line-height: 1.1; gap: 3px; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.brand-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--lavender); }
.nav { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; font-size: 15px; }
.nav a:not(.btn) { color: var(--lavender); text-decoration: none; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--pearl); font-weight: 600; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 48px; padding-bottom: 40px; color: var(--lavender); font-size: 13px; border-top: 1px solid var(--line); margin-top: 72px; }
.site-footer .mono { font-size: 11px; }
main { display: flex; flex-direction: column; gap: 40px; padding-top: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font: 700 15px var(--sans); text-decoration: none; cursor: pointer; border: 0; }
.btn-lg { min-height: 52px; padding: 0 26px; }
.btn-gold { color: var(--navy); background: linear-gradient(135deg, var(--gold-hi), var(--gold-mid)); }
.btn-gold:hover { color: var(--navy); filter: brightness(1.06); }
.btn-ghost { color: var(--pearl); background: transparent; border: 1px solid rgba(221,214,207,.28); font-weight: 600; }
.btn-ghost:hover { color: var(--pearl); border-color: var(--gold-hi); }
.btn-danger { color: var(--navy); background: var(--rose); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Cards and type */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.card-head .mono { font-size: 12px; letter-spacing: 1.5px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--gold-hi); }
h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 7vw, 76px); line-height: .98; letter-spacing: -1.5px; margin: 10px 0 0; text-wrap: balance; }
h1 em, .h1-sm em { color: var(--gold-hi); font-weight: 400; }
.h1-sm { font-size: clamp(36px, 5vw, 52px); }
.lead { font-size: 19px; color: var(--mist); max-width: 560px; margin: 14px 0 0; }
.page-head { display: flex; flex-direction: column; gap: 6px; }

/* Home */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 22px; }
.hero-text .lead { margin: 0; }
.map-card { flex: 1 1 480px; margin: 0; }
.map-soon { display: flex; flex-direction: column; gap: 8px; min-height: 320px; justify-content: center; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature h2 { font-size: 24px; margin: 10px 0 8px; }
.feature p { margin: 0; color: var(--mist); }
.how .steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.how li { display: flex; gap: 14px; }
.how li p { margin: 4px 0 0; color: var(--mist); font-size: 15px; }
.step-n { flex: 0 0 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--navy); background: linear-gradient(135deg, var(--gold-hi), var(--gold-mid)); font-weight: 500; }

/* Survey map */
.survey { display: flex; flex-direction: column; gap: 6px; }
.survey-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: #9A94A0; padding: 0 30px; }
.survey-frame { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; grid-template-rows: 24px auto 24px; padding: 6px; border-radius: 16px; background: repeating-linear-gradient(135deg, rgba(167,161,175,.10) 0 2px, rgba(167,161,175,0) 2px 9px); border: 1px solid rgba(167,161,175,.25); }
.compass { font-size: 10.5px; letter-spacing: 2px; align-self: center; justify-self: center; text-align: center; }
.compass-n { grid-column: 2; grid-row: 1; color: var(--lavender); }
.compass-s { grid-column: 2; grid-row: 3; color: var(--lavender); }
.compass-w { grid-column: 1; grid-row: 2; writing-mode: vertical-rl; transform: rotate(180deg); color: var(--gold-hi); }
.compass-e { grid-column: 3; grid-row: 2; writing-mode: vertical-rl; color: var(--gold-hi); }
.survey-grid { grid-column: 2; grid-row: 2; position: relative; aspect-ratio: 1 / 1; }
.survey-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--lavender); margin: 0; }
.lot { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; border-radius: 10px; box-sizing: border-box; border: 2.5px solid transparent; background-clip: padding-box; overflow: hidden; text-align: center; padding: 2px; transition: transform .15s ease, box-shadow .15s ease; }
.lot-code { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; }
.lot-tags { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1px; opacity: .85; }
.lot-open { background-color: var(--open); color: var(--pearl); }
.lot-open:hover { transform: scale(.98); box-shadow: 0 0 0 2px var(--gold-hi) inset; color: var(--pearl); }
.lot-taken { background-color: rgba(26,37,58,.9); color: var(--lavender); border-color: rgba(167,161,175,.35); }
.lot-held { background-color: rgba(26,37,58,.55); color: rgba(167,161,175,.6); border-style: dashed; border-color: rgba(167,161,175,.3); }
.lot-selected { box-shadow: 0 0 0 3px var(--gold-hi) inset, 0 0 24px rgba(223,192,150,.35); color: var(--pearl); z-index: 2; }
a.lot-taken:hover, a.lot-held:hover { color: var(--pearl); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 14px 0 0; padding: 0; font-size: 11px; color: var(--lavender); }
.legend li { display: flex; gap: 8px; align-items: center; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.swatch-open { background: var(--open); }
.swatch-taken { background: var(--navy); border: 1.5px solid rgba(167,161,175,.45); }

/* Listings */
.filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 18px 28px; align-items: end; padding: 20px 26px; }
.filters label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--lavender); }
.filters label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--pearl); font-size: 15px; min-height: 44px; }
.region-body { display: grid; grid-template-columns: minmax(280px, 440px) minmax(0, 1fr); gap: 30px; align-items: start; }
@media (max-width: 900px) { .region-body { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
table.lots { width: 100%; border-collapse: collapse; font-size: 15px; }
table.lots th, table.lots td { text-align: left; padding: 12px 10px; border-bottom: 1px dashed var(--line); white-space: nowrap; }
table.lots thead th { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--lavender); font-weight: 500; text-transform: uppercase; }
table.lots .num { text-align: right; }
table.lots tbody th a { color: var(--pearl); font-weight: 700; text-decoration: none; }
table.lots tbody th a:hover { color: var(--gold-hi); }
table.lots tr[hidden] { display: none; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .5px; }
.pill-open { background: var(--open); color: var(--pearl); }
.pill-taken { border: 1px solid rgba(167,161,175,.4); color: var(--lavender); }
.empty-state { text-align: center; padding: 56px 30px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* Lot detail */
.crumbs { font-size: 12px; color: var(--lavender); margin: 0; }
.crumbs a { color: var(--lavender); }
.lot-detail { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.lot-main { flex: 1 1 460px; display: flex; flex-direction: column; gap: 18px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 6px 0; }
.facts div { border-top: 1px dashed var(--line); padding-top: 10px; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--lavender); text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-size: 17px; }
.facts-tight { grid-template-columns: 1fr; }
.price-card { flex: 0 1 340px; display: flex; flex-direction: column; gap: 10px; }
.price { font-size: 48px; margin: 0; line-height: 1.05; }
.breakdown { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.breakdown li { display: flex; justify-content: space-between; gap: 12px; }
.breakdown li.total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; }

/* Prose and FAQ */
.prose { max-width: 820px; font-size: 17px; }
.prose p { margin: 0 0 16px; }
.faq { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.faq details { padding: 20px 26px; }
.faq summary { cursor: pointer; font-size: 21px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--gold-hi); font-family: var(--mono); }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 12px 0 0; color: var(--mist); }

/* Forms */
form { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
input, select, textarea { font: 400 16px var(--sans); color: var(--pearl); background: rgba(26,37,58,.85); border: 1px solid rgba(221,214,207,.2); border-radius: 12px; padding: 12px 14px; min-height: 46px; }
textarea { min-height: 220px; resize: vertical; line-height: 1.5; }
input[readonly] { color: var(--lavender); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(223,192,150,.18); }
input[type="checkbox"] { min-height: 0; width: 18px; height: 18px; accent-color: var(--gold-hi); padding: 0; }
.hint { font-weight: 400; font-size: 13px; color: var(--lavender); }
.form-error { margin: 0; color: #E6C1B8; background: rgba(212,154,140,.14); border: 1px solid rgba(212,154,140,.45); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.form-ok { margin: 0; color: var(--pearl); background: rgba(130,135,121,.3); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.auth { max-width: 520px; width: 100%; margin: 24px auto 0; display: flex; flex-direction: column; gap: 18px; }
.auth-help { border-top: 1px dashed var(--line); padding-top: 16px; font-size: 14px; color: var(--mist); }
.auth-help p { margin: 0 0 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.grid-2 .card { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.grid-2 .card form { align-self: stretch; }

/* Landlord dashboard */
.admin-head { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px; }
.tabs a { color: var(--lavender); text-decoration: none; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.tabs a[aria-current="page"] { background: linear-gradient(135deg, var(--gold-hi), var(--gold-mid)); color: var(--navy); }
#admin { display: flex; flex-direction: column; gap: 24px; }
.admin-region-body { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 960px) { .admin-region-body { grid-template-columns: 1fr; } }
.badge { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(167,161,175,.4); color: var(--lavender); }
.badge-gold { border-color: var(--gold-hi); color: var(--gold-hi); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.tag-checks { display: flex; flex-wrap: wrap; gap: 14px; font-weight: 400; }
.tag-checks label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.editor { border-top: 1px dashed var(--line); padding-top: 18px; margin-top: 6px; }
.notice { padding: 14px 18px; border-radius: 14px; background: rgba(160,127,96,.16); border: 1px solid rgba(223,192,150,.35); color: var(--ivory); font-size: 14px; }
.audit-row td { white-space: normal !important; font-size: 13.5px; vertical-align: top; }
.audit-row code { font-family: var(--mono); font-size: 12px; color: var(--mist); word-break: break-word; }
dialog { background: var(--navy-2); color: var(--pearl); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; max-width: 520px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(10, 14, 24, .7); }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  table.lots th, table.lots td { padding: 10px 6px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
  .card { padding: 22px 20px; }
  .form-grid .span-2 { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.map-narrow { max-width: 620px; }
