/* Acrevalia — palette: forest green, deep navy, ivory, muted gold.
   Standing design rule: transparent-but-coloured translucent glass UI. */
:root {
  --forest: #1e4633;
  --forest-deep: #143325;
  --navy: #0d2036;
  --navy-deep: #081728;
  --ivory: #f6f1e5;
  --ivory-dim: #e9e2cf;
  --gold: #c2a356;
  --gold-bright: #d9bc6a;
  --ink: #12241a;
  --glass-green: rgba(30, 70, 51, 0.55);
  --glass-navy: rgba(13, 32, 54, 0.58);
  --glass-ivory: rgba(246, 241, 229, 0.82);
  --glass-line: rgba(194, 163, 86, 0.45);
  --radius: 16px;
}

* { box-sizing: border-box; }
/* The hidden attribute must always win. Class rules that set display
   (.btn, .subdiv-row, .loaded-bar...) otherwise override the UA's
   [hidden] rule — which is why the nav showed "Sign-in opens soon",
   "My projects" and "Sign out" all at once, signed in or not
   (Fleur's screenshots, 2026-11-29). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ivory);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(194, 163, 86, 0.20), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(30, 70, 51, 0.55), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 45%, var(--forest-deep) 100%);
  min-height: 100vh;
}
h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: 0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- glass ---------- */
.glass-nav, .glass-panel, .glass-card {
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.glass-nav { background: linear-gradient(120deg, var(--glass-navy), var(--glass-green)); }
.glass-panel { background: linear-gradient(150deg, var(--glass-navy), rgba(20, 51, 37, 0.62)); border-radius: var(--radius); }
.glass-card {
  background: linear-gradient(155deg, rgba(246, 241, 229, 0.14), rgba(30, 70, 51, 0.38));
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

/* ---------- nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 1200; }
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0.7rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ivory); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(140deg, var(--gold), #9a7f3c); color: var(--navy-deep);
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
}
.brand-text { font-family: "Fraunces", Georgia, serif; font-size: 1.45rem; }
.brand-text em { color: var(--gold-bright); font-style: normal; }
.nav-tag { margin: 0; color: var(--ivory-dim); font-size: 0.92rem; letter-spacing: 0.02em; }
.site-nav .btn { margin-left: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; /* Milestone 5 audit: buttons measured 37px (standard)
     and 28px (btn-sm) tall on the S25 — under the ~40px tap target for
     primary actions. A 40px floor fixes both without moving anything. */
  border: 1px solid transparent; border-radius: 999px;
  padding: 0.55rem 1.15rem; font: 600 0.95rem "Inter", sans-serif;
  text-decoration: none; cursor: pointer; transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(140deg, var(--gold-bright), var(--gold)); color: var(--navy-deep); }
.btn-green { background: linear-gradient(140deg, #2c6a4a, var(--forest)); color: var(--ivory); border-color: rgba(246,241,229,0.25); }
.btn-ghost { background: rgba(246, 241, 229, 0.10); color: var(--ivory); border-color: var(--glass-line); }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { max-width: 1240px; margin: 0 auto; padding: 3.2rem 1.25rem 2.4rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.78rem; color: var(--gold-bright); margin: 0 0 0.8rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.08; margin: 0 0 1rem; }
.hero h1 .gold { color: var(--gold-bright); }
.lede { max-width: 62ch; font-size: 1.08rem; line-height: 1.6; color: var(--ivory-dim); margin: 0 0 1.6rem; }
.hero-actions { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.hero-note { font-size: 0.88rem; color: var(--ivory-dim); max-width: 38ch; }
.verb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.verb-grid h2 { margin: 0 0 0.5rem; font-size: 1.35rem; color: var(--gold-bright); }
.verb-grid p { margin: 0 0 0.9rem; line-height: 1.55; font-size: 0.96rem; color: var(--ivory); }
.chip {
  display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.28rem 0.65rem; border-radius: 999px;
  background: rgba(246, 241, 229, 0.14); color: var(--ivory-dim); border: 1px solid rgba(246,241,229,0.22);
}
.chip-live { background: rgba(194, 163, 86, 0.25); color: var(--gold-bright); border-color: var(--glass-line); }

/* ---------- planner ---------- */
.planner { max-width: 1240px; margin: 0 auto; padding: 0.5rem 1.25rem 3rem; }
.planner-head h2 { font-size: 2rem; margin: 0 0 0.4rem; }
.demo-badge {
  margin: 0 0 1rem; font-size: 0.9rem; color: var(--navy-deep);
  background: linear-gradient(120deg, var(--gold-bright), var(--gold));
  display: inline-block; padding: 0.45rem 0.85rem; border-radius: 10px; font-weight: 600;
}
.toolbar {
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  padding: 0.85rem 1rem; margin-bottom: 1rem;
}
.search-form { display: flex; gap: 0.6rem; flex: 1 1 340px; }
.search-form input {
  flex: 1; min-width: 0; min-height: 40px; padding: 0.6rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--glass-line); background: rgba(8, 23, 40, 0.55);
  color: var(--ivory); font: 400 0.97rem "Inter", sans-serif;
}
.search-form input::placeholder { color: rgba(246, 241, 229, 0.55); }
.search-status { font-size: 0.9rem; color: var(--gold-bright); min-height: 1.2em; }

.planner-body { display: grid; grid-template-columns: 1fr 330px; gap: 1rem; align-items: stretch; }
#map {
  height: 560px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--glass-line); box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  background: var(--navy-deep);
}
.readout { padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 0.8rem; }
.readout h3 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; color: var(--gold-bright); }
.readout-hint { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--ivory-dim); }
.live-readout {
  margin: 0; padding: 0.6rem 0.8rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  background: rgba(194, 163, 86, 0.20); border: 1px dashed var(--glass-line); color: var(--gold-bright);
}
.boundary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.boundary-list li {
  background: rgba(246, 241, 229, 0.08); border: 1px solid rgba(246,241,229,0.16);
  border-radius: 12px; padding: 0.7rem 0.85rem;
}
.boundary-list li.empty { color: var(--ivory-dim); font-size: 0.92rem; }
.boundary-list .b-name { font-weight: 700; color: var(--ivory); display: block; margin-bottom: 0.25rem; }
.boundary-list .b-big { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; color: var(--gold-bright); }
.boundary-list .b-sub { display: block; font-size: 0.86rem; color: var(--ivory-dim); margin-top: 0.2rem; line-height: 1.5; }
.totals { border-top: 1px solid var(--glass-line); padding-top: 0.7rem; }
.totals h4 { margin: 0 0 0.4rem; font-size: 0.95rem; letter-spacing: 0.03em; }
.totals dl { margin: 0; }
.totals dl div { display: flex; justify-content: space-between; gap: 1rem; }
.totals dt { color: var(--ivory-dim); font-size: 0.9rem; }
.totals dd { margin: 0; font-weight: 700; }
.legal-line { font-size: 0.8rem; line-height: 1.55; color: var(--ivory-dim); margin: auto 0 0; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--glass-line);
  background: linear-gradient(120deg, rgba(13,32,54,0.7), rgba(20,51,37,0.7));
  padding: 1.6rem 1.25rem 2rem; text-align: center;
}
.site-footer p { max-width: 860px; margin: 0.35rem auto; }
.site-footer .fineprint { font-size: 0.78rem; color: rgba(246,241,229,0.55); }

/* ---------- accounts & dashboard (Milestone 2) ---------- */
.account-area { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.account-area .btn { margin-left: 0; }
.account-status { font-size: 0.88rem; color: var(--ivory-dim); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.65; cursor: default; }
.btn-danger { background: rgba(146, 44, 36, 0.35); color: var(--ivory); border-color: rgba(246, 241, 229, 0.3); }

.save-note {
  margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--gold-bright);
  background: rgba(194, 163, 86, 0.14); border: 1px dashed var(--glass-line);
  border-radius: 10px; padding: 0.6rem 0.8rem;
}
.loaded-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; flex-wrap: wrap;
}
.loaded-bar[hidden] { display: none; }
.loaded-bar {
  background: rgba(30, 70, 51, 0.5); border: 1px solid var(--glass-line);
  border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.9rem;
}
.loaded-actions { display: flex; gap: 0.5rem; }
.save-status { font-size: 0.88rem; font-weight: 600; color: var(--gold-bright); }
.save-error { font-size: 0.88rem; font-weight: 600; color: #f0b429; flex-basis: 100%; }
.boundary-list .b-actions { margin-top: 0.55rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.boundary-list .b-saved { font-size: 0.85rem; color: var(--gold-bright); font-weight: 600; }
.save-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.55rem; }
.save-form input {
  flex: 1 1 150px; min-width: 0; min-height: 40px; padding: 0.45rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--glass-line); background: rgba(8, 23, 40, 0.55);
  color: var(--ivory); font: 400 0.9rem "Inter", sans-serif;
}

.dashboard { max-width: 1240px; margin: 0 auto; padding: 0.5rem 1.25rem 3rem; }
.dashboard-head h2 { font-size: 2rem; margin: 0 0 0.4rem; }
.dashboard-note { margin: 0 0 1.1rem; color: var(--ivory-dim); max-width: 68ch; line-height: 1.55; }
.projects-empty { color: var(--ivory-dim); font-size: 0.95rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.project-card h3 { margin: 0 0 0.4rem; font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; color: var(--ivory); }
.project-card .p-acres { font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; color: var(--gold-bright); margin: 0 0 0.2rem; }
.project-card .p-meta { font-size: 0.85rem; color: var(--ivory-dim); margin: 0 0 0.9rem; }
.project-card .p-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- subdivision studio (Milestone 3) ---------- */
.subdiv { border-top: 1px solid var(--glass-line); padding-top: 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; }
.subdiv h4 { margin: 0; font-size: 1.02rem; letter-spacing: 0.02em; color: var(--gold-bright); font-family: "Fraunces", Georgia, serif; }
.subdiv-hint { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--ivory-dim); }
.subdiv-row { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; font-size: 0.92rem; }
.subdiv-row label { color: var(--ivory); font-weight: 600; }
.subdiv-row select, .subdiv-row input[type="number"] {
  min-height: 40px; /* M5 audit: these measured 31px tall */
  padding: 0.42rem 0.7rem; border-radius: 999px; border: 1px solid var(--glass-line);
  background: rgba(8, 23, 40, 0.55); color: var(--ivory); font: 400 0.92rem "Inter", sans-serif;
}
.subdiv-row input[type="number"] { width: 6.5rem; }
.subdiv-row input[type="range"] { flex: 1 1 120px; accent-color: var(--gold); }
.subdiv-modes { gap: 1.1rem; }
.subdiv-modes label { font-weight: 500; display: flex; align-items: center; gap: 0.4rem; cursor: pointer; min-height: 40px; }
.subdiv-modes input { accent-color: var(--gold); }
.subdiv-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.subdiv-status { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--gold-bright); min-height: 1.1em; }
.subdiv-status:empty { min-height: 0; }
.reserve-list, .parcel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.reserve-list li, .parcel-list li {
  background: rgba(246, 241, 229, 0.08); border: 1px solid rgba(246,241,229,0.16);
  border-radius: 10px; padding: 0.5rem 0.7rem; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
}
.reserve-list li { border-style: dashed; border-color: rgba(246,241,229,0.4); }
.parcel-list .p-name { font-weight: 700; color: var(--ivory); }
.parcel-list .p-size { color: var(--gold-bright); font-weight: 600; }
.subdiv-totals { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--ivory); }
.subdiv .legal-line { margin: 0; }

/* ---------- pricing & investment (Milestone 4) ---------- */
.invest { border-top: 1px solid var(--glass-line); padding-top: 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; }
.invest h4 { margin: 0; font-size: 1.02rem; letter-spacing: 0.02em; color: var(--gold-bright); font-family: "Fraunces", Georgia, serif; }
.invest h5 { margin: 0.35rem 0 0; font-size: 0.92rem; letter-spacing: 0.02em; color: var(--ivory); font-family: "Fraunces", Georgia, serif; }
.invest-hint { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--ivory-dim); }
.invest .legal-line { margin: 0; }
.calc-inputs { display: flex; flex-direction: column; gap: 0.45rem; }
.calc-inputs .subdiv-row input[type="number"] { width: 8.5rem; }
.calc-out { margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.calc-out div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.calc-out dt { color: var(--ivory-dim); }
.calc-out dd { margin: 0; font-weight: 700; color: var(--ivory); }
.calc-out .calc-profit dd { color: var(--gold-bright); }
.calc-gate { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--gold-bright); }
.invest-status { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--gold-bright); min-height: 1.1em; }
.invest-status:empty { min-height: 0; }
/* per-lot price controls inside the M3 parcel list */
.parcel-list .lot-price { flex-basis: 100%; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.35rem; }
.parcel-list .p-price { font-weight: 700; color: var(--ivory); font-size: 0.9rem; }
.parcel-list .p-override-tag { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.14rem 0.5rem; border-radius: 999px; background: rgba(194, 163, 86, 0.3); color: var(--gold-bright); border: 1px solid var(--glass-line); }
.parcel-list .p-override-input {
  width: 8rem; min-height: 40px; /* M5 audit: measured 28px tall */
  padding: 0.32rem 0.6rem; border-radius: 999px; border: 1px solid var(--glass-line);
  background: rgba(8, 23, 40, 0.55); color: var(--ivory); font: 400 0.88rem "Inter", sans-serif;
}

/* ---------- print plan report ---------- */
.print-report { display: none; }
@media print {
  body { background: #fff !important; }
  body > header, body > main, body > footer { display: none !important; }
  .print-report {
    display: block !important; color: #111; background: #fff;
    font-family: Georgia, "Times New Roman", serif; padding: 0.5cm; max-width: 100%;
  }
  .print-report h1 { font-size: 20pt; margin: 0 0 2pt; }
  .print-report h2 { font-size: 13pt; margin: 14pt 0 5pt; }
  .print-report p { font-size: 10.5pt; line-height: 1.45; margin: 3pt 0; }
  .print-report table { border-collapse: collapse; width: 100%; margin: 6pt 0; font-size: 10.5pt; }
  .print-report th, .print-report td { border: 1px solid #666; padding: 4pt 6pt; text-align: left; }
  .print-report td.num, .print-report th.num { text-align: right; }
  .print-report .pr-legal { font-size: 9pt; color: #333; margin-top: 12pt; }
  .print-report .pr-meta { color: #333; font-size: 10pt; }
}

/* lot / reserve / remainder labels drawn on the map */
.lot-label-wrap { background: transparent; border: none; }
.lot-label {
  display: inline-block; transform: translate(-50%, -50%);
  font: 700 0.72rem "Inter", sans-serif; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--navy-deep); background: rgba(227, 197, 101, 0.92);
  border: 1px solid rgba(8, 23, 40, 0.55); border-radius: 999px; padding: 0.14rem 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.lot-label-reserved { background: rgba(13, 32, 54, 0.88); color: var(--ivory); border-color: rgba(246,241,229,0.6); }
.lot-label-remainder { background: rgba(246, 241, 229, 0.75); color: var(--ink); border-color: rgba(8,23,40,0.35); }

/* ---------- sharing (Milestone 5) ---------- */
.share-link-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.share-link-row input {
  flex: 1 1 200px; min-width: 0; min-height: 40px; padding: 0.5rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--glass-line); background: rgba(8, 23, 40, 0.55);
  color: var(--ivory); font: 400 0.88rem "Inter", sans-serif;
}
.share-main { max-width: 1240px; margin: 0 auto; padding: 2.2rem 1.25rem 3rem; }
.share-main h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 0.6rem; }
.share-status { color: var(--gold-bright); font-size: 0.95rem; }
.share-unavailable { padding: 1.6rem 1.5rem; }
.share-unavailable h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
.share-unavailable p { margin: 0; color: var(--ivory-dim); line-height: 1.55; max-width: 55ch; }
#share-map {
  height: 480px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--glass-line); box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  background: var(--navy-deep); margin-bottom: 1rem;
}
.share-totals { font-size: 1rem; line-height: 1.6; margin: 0 0 1rem; }
.share-lots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.lot-card h2 { margin: 0 0 0.4rem; font-size: 1.25rem; color: var(--gold-bright); }
.lot-card .lot-size { margin: 0 0 0.35rem; color: var(--ivory); font-weight: 600; }
.lot-card .lot-price-line { margin: 0; color: var(--ivory-dim); }
.lot-card .lot-price-line strong { color: var(--ivory); }
.lot-card.lot-highlight { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
.share-reserves { color: var(--ivory-dim); line-height: 1.55; }
.share-main .legal-line { margin: 0.5rem 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .planner-body { grid-template-columns: 1fr; }
  #map { height: 440px; }
  .nav-tag { display: none; }
}
@media (max-width: 560px) {
  #map { height: 380px; }
  .hero { padding-top: 2rem; }
}
