/* ==========================================================================
   Manors of Deerwood Homeowners Association
   Design system.

   The look is a private estate at dusk. Midnight navy carries authority,
   limestone carries calm, and a single copper accent marks whatever needs
   attention. Display type is a high-contrast serif used large; reading type
   stays a sturdy text serif so the governing documents stay legible. Thin
   rules and tabular figures come from the recorded plats the Association is
   built on. Sumac red is reserved for an expired clock or an open violation.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  /* Core palette */
  --ink:      #0F1A2E;
  --navy:     #1C2E4F;
  --lake:     #2F5878;
  --mist:     #8FA7BE;
  --paper:    #F3EEE5;
  --linen:    #FAF7F1;
  --gold:     #B0612F;
  --on-gold:  #FFFFFF;
  --gold-text:#8C4A22;
  --sumac:    #A32F2A;

  --bg:            var(--paper);
  --bg-raised:     var(--linen);
  --bg-sunken:     #E9E2D5;
  --bg-inverse:    var(--ink);
  --text:          #131C2B;
  --text-muted:    #46536A;
  --text-faint:    #566178;
  --text-inverse:  #EDEBE4;

  --line-hair:   #DAD2C2;
  --line:        #C2B8A4;
  --line-strong: var(--navy);

  --status-new:      var(--lake);
  --status-review:   #86501A;
  --status-approved: #2C6E49;
  --status-overdue:  var(--sumac);
  --status-closed:   var(--text-faint);

  --link: var(--lake);
  --focus: #2B6CB0;

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-prose: "Literata", Georgia, "Times New Roman", serif;
  --font-ui: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1.0625rem;
  --t-md:   1.3125rem;
  --t-lg:   1.6875rem;
  --t-xl:   2.0625rem;
  --t-2xl:  2.625rem;
  --t-3xl:  3.25rem;

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Radii, deliberately differentiated by element role */
  --r-control: 4px;
  --r-panel: 7px;
  --r-chip: 999px;

  --shadow-overlay: 0 18px 48px -12px rgba(15, 26, 46, 0.38);

  --measure: 68ch;
  --page: 76rem;
  --gutter: var(--s-5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --navy:         #35577F;
    --lake:         #7FA3C7;
    --mist:         #9DB9D6;
    --bg:           #0B1322;
    --bg-raised:    #121D33;
    --bg-sunken:    #070D19;
    --bg-inverse:   var(--linen);
    --text:         #E9E6DE;
    --text-muted:   #AFB9C9;
    --text-faint:   #8896AB;
    --text-inverse: #EDEBE4;
    --line-hair:    #1D2B45;
    --line:         #2C3E5E;
    --line-strong:  var(--mist);
    --gold:         #D9955E;
    --on-gold:      #0F1A2E;
    --gold-text:    #E2A878;
    --sumac:        #E0655A;
    --link:         #9DB9D6;
    --status-review: #E0A64E;
    --status-approved: #5FB28A;
    --focus:        #7FB6E6;
    --shadow-overlay: 0 18px 48px -12px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --navy:         #35577F;
  --lake:         #7FA3C7;
  --mist:         #9DB9D6;
  --bg:           #0B1322;
  --bg-raised:    #121D33;
  --bg-sunken:    #070D19;
  --bg-inverse:   var(--linen);
  --text:         #E9E6DE;
  --text-muted:   #AFB9C9;
  --text-faint:   #8896AB;
  --text-inverse: #EDEBE4;
  --line-hair:    #1D2B45;
  --line:         #2C3E5E;
  --line-strong:  var(--mist);
  --gold:         #D9955E;
  --on-gold:      #0F1A2E;
  --gold-text:    #E2A878;
  --sumac:        #E0655A;
  --link:         #9DB9D6;
  --status-review: #E0A64E;
  --status-approved: #5FB28A;
  --focus:        #7FB6E6;
  --shadow-overlay: 0 18px 48px -12px rgba(0, 0, 0, 0.6);
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-prose);
  font-size: var(--t-base);
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-prose);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; line-height: 1.04; }
h1 { font-size: clamp(2.6rem, 1.5rem + 4.2vw, 4.6rem); }
h2 { font-size: clamp(2rem, 1.3rem + 2.2vw, 3.2rem); }
h3 { font-size: var(--t-md); }
h4 { font-size: var(--t-base); font-weight: 650; }

p { margin: 0 0 var(--s-4); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--text); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; max-width: var(--measure); }
li + li { margin-top: var(--s-2); }

hr { border: 0; border-top: 1px solid var(--line-hair); margin: var(--s-6) 0; }

/* Figures are data. Always tabular, never proportional. */
.num, table, .clock, .chip, .ident {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- Layout ---------- */

.page { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.page-narrow { max-width: 52rem; margin: 0 auto; padding: 0 var(--gutter); }

.band { padding-block: var(--s-8); }
.band-tight { padding-block: var(--s-6); }
.band-sunken { background: var(--bg-sunken); }
.band-inverse { background: var(--ink); color: var(--text-inverse); }
.band-inverse h2, .band-inverse h3 { color: var(--text-inverse); }
.band-inverse a { color: #C9D8EA; }
.band-ruled { border-top: 1px solid var(--line-hair); }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: var(--s-3);
  align-items: baseline; justify-content: space-between; }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--s-7); }
.grid-portal { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--s-6); }

@media (max-width: 62rem) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-sidebar, .grid-portal { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  :root { --gutter: var(--s-4); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .band { padding-block: var(--s-6); }
}

/* ---------- Header ---------- */

.skip {
  position: absolute; left: var(--s-4); top: -3rem;
  background: var(--ink); color: var(--text-inverse);
  padding: var(--s-2) var(--s-4); border-radius: var(--r-control);
  font-family: var(--font-ui); font-size: var(--t-sm);
  z-index: 100; transition: top 120ms ease;
}
.skip:focus { top: var(--s-4); }

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 40;
}
.masthead-inner {
  max-width: var(--page); margin: 0 auto; padding: var(--s-3) var(--gutter);
  display: flex; align-items: center; gap: var(--s-5);
}

.mark { display: flex; align-items: center; gap: var(--s-3);
  text-decoration: none; color: var(--text); flex: 0 0 auto; }
.mark:hover { color: var(--text); }
.mark svg { width: 2.25rem; height: 2.25rem; flex: 0 0 auto; }
.mark-text { display: flex; flex-direction: column; line-height: 1.1; }
.mark-name { font-family: var(--font-prose); font-weight: 650;
  font-size: var(--t-base); letter-spacing: -0.015em; }
.mark-sub { font-family: var(--font-ui); font-size: var(--t-xs);
  color: var(--text-faint); letter-spacing: 0.02em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s-1); }
.nav a {
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-control);
}
.nav a:hover { color: var(--text); background: var(--bg-sunken); }
.nav a[aria-current="page"] {
  color: var(--text); box-shadow: inset 0 -2px 0 var(--gold);
}

.nav-toggle {
  display: none; margin-left: auto; background: none;
  border: 1px solid var(--line); border-radius: var(--r-control);
  padding: var(--s-2) var(--s-3); color: var(--text);
  font-family: var(--font-ui); font-size: var(--t-sm); cursor: pointer;
}

@media (max-width: 62rem) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--s-2) var(--gutter) var(--s-4);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: var(--s-3); border-bottom: 1px solid var(--line-hair); }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
}

/* ---------- Hero ---------- */

.hero { padding-block: var(--s-8) var(--s-7); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
  gap: var(--s-8); align-items: center;
}
@media (max-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}
.hero h1 { margin-bottom: var(--s-4); }
.hero-lede {
  font-size: var(--t-md); line-height: 1.5; color: var(--text-muted);
  max-width: 46ch;
}
.hero-place {
  font-family: var(--font-ui); font-size: var(--t-sm); color: var(--text-faint);
  margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-4);
}
.hero-place span { display: inline-flex; align-items: center; gap: var(--s-2); }

/* The plat drawing. The one place the design spends boldness. */
.plat { width: 100%; border-radius: var(--r-panel); overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line); }
.plat svg { width: 100%; height: auto; display: block; }

/* ---------- Panels ---------- */

.panel {
  background: var(--bg-raised);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-panel);
  padding: var(--s-5);
}
.panel-lead {
  border-color: var(--line);
  box-shadow: inset 3px 0 0 var(--gold);
  padding-left: calc(var(--s-5) + 3px);
}
.panel-quiet { background: transparent; }
.panel h3 { margin-bottom: var(--s-2); }

.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3); margin-bottom: var(--s-4);
  padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-hair);
}
.panel-head h2, .panel-head h3 { margin: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600;
  line-height: 1; letter-spacing: 0.005em;
  padding: 0.7em 1.15em; border-radius: var(--r-control);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-primary { background: var(--navy); color: #FFFFFF; }
.btn-primary:hover { background: var(--ink); color: #FFFFFF; }
.btn-secondary {
  background: transparent; color: var(--text); border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--line-strong); background: var(--bg-raised); }
.btn-quiet {
  background: transparent; color: var(--text-muted); padding: 0.4em 0.6em;
}
.btn-quiet:hover { color: var(--text); background: var(--bg-sunken); }
.btn-danger { background: var(--sumac); color: #FFF4F2; }
.btn-danger:hover { filter: brightness(0.9); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; pointer-events: none;
}
.btn-lg { font-size: var(--t-base); padding: 0.8em 1.4em; }
.btn-block { width: 100%; }

/* ---------- Status chips ---------- */

.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600;
  padding: 0.3em 0.7em; border-radius: var(--r-chip);
  border: 1px solid currentColor; white-space: nowrap;
}
.chip::before {
  content: ""; width: 0.4em; height: 0.4em; border-radius: 50%;
  background: currentColor;
}
.chip-new      { color: var(--status-new); }
.chip-review   { color: var(--status-review); }
.chip-approved { color: var(--status-approved); }
.chip-overdue  { color: var(--status-overdue); }
.chip-closed   { color: var(--status-closed); }

/* ---------- The clock ---------- */
/* Shown on every request. The 45-day architectural review deadline carries a
   legal consequence, so the count is never hidden behind a click. */

.clock {
  display: inline-flex; align-items: baseline; gap: 0.35em;
  font-family: var(--font-ui); font-weight: 600; font-size: var(--t-sm);
  color: var(--text-muted);
}
.clock-days { font-size: var(--t-md); font-weight: 700; line-height: 1; }
.clock-unit { font-size: var(--t-xs); color: var(--text-faint); font-weight: 500; }
.clock[data-state="ok"] .clock-days { color: var(--status-approved); }
.clock[data-state="soon"] .clock-days { color: var(--gold); }
.clock[data-state="late"] .clock-days { color: var(--sumac); }

.clock-bar {
  height: 4px; border-radius: 2px; background: var(--bg-sunken);
  overflow: hidden; margin-top: var(--s-2);
}
.clock-bar > span { display: block; height: 100%; background: var(--lake); }
.clock-bar[data-state="soon"] > span { background: var(--gold); }
.clock-bar[data-state="late"] > span { background: var(--sumac); }

/* ---------- Identifiers ---------- */
/* Lot numbers and case numbers are how the board and residents refer to a
   matter out loud, so they are set to be read and copied, not decorated. */

.ident {
  font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600;
  letter-spacing: 0.04em; color: var(--text-faint);
}

/* ---------- Rule entries ---------- */
/* Every rule shows the document and section that authorizes it. */

.rule { padding: var(--s-5) 0; border-top: 1px solid var(--line-hair); }
.rule:first-of-type { border-top: 0; }
.rule-head { display: flex; align-items: baseline; gap: var(--s-3);
  flex-wrap: wrap; margin-bottom: var(--s-2); }
.rule-head h3 { font-size: var(--t-base); font-weight: 650; }
.rule-cite {
  font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600;
  color: var(--link); border: 1px solid var(--line-hair);
  padding: 0.15em 0.5em; border-radius: var(--r-control);
  white-space: nowrap; text-decoration: none;
}
a.rule-cite:hover { border-color: var(--link); color: var(--text); }
.rule p { font-size: var(--t-base); color: var(--text-muted); }
.rule-detail { margin-top: var(--s-3); font-size: var(--t-sm); }
.rule-detail summary {
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600;
  color: var(--link); cursor: pointer;
}
.rule-detail[open] summary { margin-bottom: var(--s-3); }

/* ---------- Dated record list ---------- */
/* Notices, audit events and minutes all read as entries in a register. */

.record-list { list-style: none; margin: 0; padding: 0; max-width: none; }
.record {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: var(--s-4); align-items: baseline;
  padding: var(--s-4) 0; border-top: 1px solid var(--line-hair);
  margin: 0;
}
.record:first-child { border-top: 0; }
.record-date {
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600;
  color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.record-body > a { font-weight: 600; text-decoration: none; }
.record-body > a:hover { text-decoration: underline; }
.record-note { font-size: var(--t-sm); color: var(--text-muted);
  margin-top: var(--s-1); }
@media (max-width: 40rem) {
  .record { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
}

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line-hair);
  border-radius: var(--r-panel); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm);
  font-family: var(--font-ui); }
th {
  text-align: left; font-weight: 650; color: var(--text-muted);
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line);
  background: var(--bg-raised); white-space: nowrap;
}
td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-hair);
  vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }

/* ---------- Forms ---------- */

.field { display: block; margin-bottom: var(--s-4); max-width: 34rem; }
.field > label, .label {
  display: block; font-family: var(--font-ui); font-size: var(--t-sm);
  font-weight: 600; margin-bottom: var(--s-2); color: var(--text);
}
.hint { font-family: var(--font-ui); font-size: var(--t-xs);
  color: var(--text-faint); margin-top: var(--s-2); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%; font-family: var(--font-ui); font-size: var(--t-base);
  color: var(--text); background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: var(--r-control);
  padding: 0.65em 0.8em; line-height: 1.4;
}
textarea { min-height: 8rem; resize: vertical; font-family: var(--font-prose); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--sumac);
}
.field-error { font-family: var(--font-ui); font-size: var(--t-xs);
  color: var(--sumac); margin-top: var(--s-2); font-weight: 600; }
fieldset { border: 1px solid var(--line-hair); border-radius: var(--r-panel);
  padding: var(--s-4); margin: 0 0 var(--s-4); }
legend { font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 650;
  padding: 0 var(--s-2); }
.choice { display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3); border: 1px solid var(--line-hair);
  border-radius: var(--r-control); margin-bottom: var(--s-2); cursor: pointer; }
.choice:hover { border-color: var(--line-strong); }
.choice input { margin-top: 0.3em; flex: 0 0 auto; }
.choice-label { font-family: var(--font-ui); font-weight: 600;
  font-size: var(--t-sm); }
.choice-note { font-size: var(--t-sm); color: var(--text-muted);
  margin-top: var(--s-1); }

/* ---------- Meters ---------- */
/* Used for the budget and the amendment vote tally. The track is always the
   full denominator so a partial result cannot read as a complete one. */

.meter { margin-bottom: var(--s-4); }
.meter-head { display: flex; justify-content: space-between;
  align-items: baseline; gap: var(--s-3); font-family: var(--font-ui);
  font-size: var(--t-sm); margin-bottom: var(--s-2); }
.meter-label { font-weight: 600; }
.meter-value { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.meter-track { height: 0.6rem; background: var(--bg-sunken);
  border-radius: 3px; overflow: hidden; display: flex; }
.meter-fill { height: 100%; background: var(--lake); }
.meter-fill[data-tone="gold"] { background: var(--gold); }
.meter-fill[data-tone="sumac"] { background: var(--sumac); }
.meter-fill[data-tone="sedge"] { background: var(--mist); }
.meter-note { font-family: var(--font-ui); font-size: var(--t-xs);
  color: var(--text-faint); margin-top: var(--s-2); }

/* ---------- Figures ---------- */

.figure-row { display: flex; flex-wrap: wrap; gap: var(--s-7); }
.figure-value { font-family: var(--font-ui); font-weight: 700;
  font-size: var(--t-xl); line-height: 1; font-variant-numeric: tabular-nums; }
.figure-label { font-family: var(--font-ui); font-size: var(--t-sm);
  color: var(--text-muted); margin-top: var(--s-2); }

/* ---------- Empty and loading states ---------- */

.empty {
  border: 1px dashed var(--line); border-radius: var(--r-panel);
  padding: var(--s-6); text-align: left; color: var(--text-muted);
}
.empty h3 { color: var(--text); margin-bottom: var(--s-2); }

.skeleton {
  background: linear-gradient(90deg, var(--bg-sunken) 25%,
    var(--bg-raised) 37%, var(--bg-sunken) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-control); height: 1rem;
}
.skeleton + .skeleton { margin-top: var(--s-3); }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ---------- Banners ---------- */

.banner {
  border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: var(--s-4) var(--s-5); background: var(--bg-raised);
  display: flex; gap: var(--s-4); align-items: flex-start;
}
.banner-gold  { box-shadow: inset 3px 0 0 var(--gold); }
.banner-sumac { box-shadow: inset 3px 0 0 var(--sumac); }
.banner-moss  { box-shadow: inset 3px 0 0 var(--lake); }
.banner h3 { font-size: var(--t-base); margin-bottom: var(--s-1); }
.banner p { font-size: var(--t-sm); color: var(--text-muted); }

/* ---------- Toast ---------- */

.toast-stack {
  position: fixed; bottom: var(--s-5); left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: var(--s-2);
  width: min(28rem, calc(100vw - 2rem));
}
.toast {
  background: var(--ink); color: var(--text-inverse);
  border-radius: var(--r-panel); padding: var(--s-3) var(--s-4);
  font-family: var(--font-ui); font-size: var(--t-sm);
  box-shadow: var(--shadow-overlay);
  display: flex; gap: var(--s-3); align-items: center;
}
.toast[data-tone="error"] { background: var(--sumac); color: #FFF4F2; }

/* ---------- Dialog ---------- */

dialog {
  border: 1px solid var(--line); border-radius: var(--r-panel);
  background: var(--bg-raised); color: var(--text);
  padding: var(--s-6); max-width: min(38rem, calc(100vw - 2rem));
  box-shadow: var(--shadow-overlay);
}
dialog::backdrop { background: rgba(15, 26, 46, 0.5); }

/* ---------- Tabs ---------- */

.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-5); overflow-x: auto; }
.tab {
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600;
  color: var(--text-muted); background: none; border: 0; cursor: pointer;
  padding: var(--s-3) var(--s-4); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }

/* ---------- Portal sidebar ---------- */

.side-nav { list-style: none; margin: 0; padding: 0; max-width: none;
  position: sticky; top: 5rem; }
.side-sticky { position: sticky; top: 5rem; }
.side-sticky .side-nav { position: static; }
.side-nav li { margin: 0; }
.side-nav a {
  display: block; font-family: var(--font-ui); font-size: var(--t-sm);
  font-weight: 500; color: var(--text-muted); text-decoration: none;
  padding: var(--s-3); border-left: 2px solid var(--line-hair);
}
.side-nav a:hover { color: var(--text); background: var(--bg-raised); }
.side-nav a[aria-current="true"] {
  color: var(--text); font-weight: 650; border-left-color: var(--gold);
  background: var(--bg-raised);
}
.side-nav-count { float: right; font-variant-numeric: tabular-nums;
  color: var(--text-faint); }

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding-block: var(--s-7) var(--s-6); background: var(--bg-sunken);
}
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--s-6); }
@media (max-width: 62rem) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }
.foot h4 { font-family: var(--font-ui); font-size: var(--t-xs);
  font-weight: 700; letter-spacing: 0.06em; color: var(--text-faint);
  margin-bottom: var(--s-3); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 var(--s-2); }
.foot a { font-family: var(--font-ui); font-size: var(--t-sm);
  color: var(--text-muted); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot-legal { margin-top: var(--s-6); padding-top: var(--s-4);
  border-top: 1px solid var(--line-hair); font-family: var(--font-ui);
  font-size: var(--t-xs); color: var(--text-faint); }

/* ---------- Utilities ---------- */

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.ui { font-family: var(--font-ui); }
.sm { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.measure { max-width: var(--measure); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .masthead, .nav, .foot, .toast-stack, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { border: 1px solid #999; }
}

/* ==========================================================================
   Map
   The map is a working surface, not an illustration, so it gets real height
   and a panel beside it that carries the selected lot and the Board's tools.
   ========================================================================== */

.map-frame {
  display: grid; grid-template-columns: minmax(0, 1fr) 20rem;
  border: 1px solid var(--line); border-radius: var(--r-panel);
  overflow: hidden; background: var(--bg-raised);
}
.map-canvas { height: clamp(26rem, 60vh, 40rem); background: var(--bg-sunken); }
.map-canvas.is-picking { cursor: crosshair; }
.map-canvas.is-drawing { cursor: cell; }
.map-aside {
  border-left: 1px solid var(--line-hair); padding: var(--s-4);
  overflow-y: auto; max-height: clamp(26rem, 60vh, 40rem);
}
@media (max-width: 62rem) {
  .map-frame { grid-template-columns: minmax(0, 1fr); }
  .map-aside { border-left: 0; border-top: 1px solid var(--line);
    max-height: none; }
  .map-canvas { height: 24rem; }
}

.map-aside-head { margin-bottom: var(--s-4); padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line-hair); }
.map-aside-head h3 { font-size: var(--t-md); }
.map-aside-head p { margin: var(--s-1) 0 0; }

.map-facts { display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-2) var(--s-4); margin: 0 0 var(--s-4); font-family: var(--font-ui);
  font-size: var(--t-sm); }
.map-facts dt { color: var(--text-faint); font-weight: 600; }
.map-facts dd { margin: 0; font-variant-numeric: tabular-nums; }

.map-actions { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.map-tools { margin-top: var(--s-5); padding-top: var(--s-4);
  border-top: 1px solid var(--line-hair); display: grid; gap: var(--s-2); }
.map-tools h4 { font-family: var(--font-ui); font-size: var(--t-xs);
  font-weight: 700; letter-spacing: 0.06em; color: var(--text-faint);
  margin-bottom: var(--s-1); }

.legend { list-style: none; margin: var(--s-4) 0 0; padding: 0;
  font-family: var(--font-ui); font-size: var(--t-sm); max-width: none; }
.legend li { display: flex; align-items: center; gap: var(--s-3);
  margin: 0 0 var(--s-2); color: var(--text-muted); }
.legend-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%;
  border: 2px solid; flex: 0 0 auto; }
.legend-swatch { width: 0.9rem; height: 0.65rem; border: 1.5px solid;
  border-radius: 2px; flex: 0 0 auto; }

.map-items { list-style: none; margin: 0 0 var(--s-4); padding: 0;
  max-width: none; font-size: var(--t-sm); }
.map-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s-2); align-items: center; padding: var(--s-2) 0;
  border-top: 1px solid var(--line-hair); margin: 0; }

/* Leaflet surfaces, matched to the site rather than left at library defaults */
.leaflet-container { font-family: var(--font-ui); background: var(--bg-sunken); }
.leaflet-popup-content-wrapper, .leaflet-control-layers, .leaflet-bar {
  border-radius: var(--r-control); border: 1px solid var(--line);
  background: var(--bg-raised); color: var(--text);
  box-shadow: 0 6px 18px -8px rgba(15, 26, 46, 0.3);
}
.leaflet-popup-content { font-size: var(--t-sm); margin: var(--s-3) var(--s-4); }
.leaflet-popup-content p { margin: var(--s-2) 0 0; }
.leaflet-popup-tip { background: var(--bg-raised); border: 1px solid var(--line); }
.leaflet-control-layers-expanded { padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3);
  font-size: var(--t-sm); }
.leaflet-control-layers label { margin-bottom: var(--s-1); }
.leaflet-bar a, .leaflet-bar a:hover {
  background: var(--bg-raised); color: var(--text);
  border-bottom-color: var(--line-hair);
}
.leaflet-tooltip {
  background: var(--ink); color: var(--text-inverse); border: 0;
  font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600;
  box-shadow: none; padding: 0.3em 0.55em;
}
.leaflet-tooltip-top::before { border-top-color: var(--ink); }
.leaflet-control-attribution {
  background: color-mix(in srgb, var(--bg-raised) 85%, transparent);
  color: var(--text-faint); font-size: 10px;
}
.leaflet-control-attribution a { color: var(--text-muted); }

.nav-portal {
  border: 1px solid var(--line); border-radius: var(--r-control);
  margin-left: var(--s-2);
}
.nav-portal:hover { border-color: var(--line-strong); }
@media (max-width: 62rem) {
  .nav-portal { margin-left: 0; margin-top: var(--s-3); text-align: center; }
}

.map-host { min-height: 20rem; }
.map-host .map-canvas { height: clamp(20rem, 42vh, 28rem); }
.map-host .map-aside { max-height: clamp(20rem, 42vh, 28rem); }
.map-placeholder {
  display: grid; place-items: center; min-height: 20rem;
  border: 1px solid var(--line); border-radius: var(--r-panel);
  background: var(--bg-raised);
}

/* ---------- Enforcement stages ---------- */
/* A numbered sequence is used here because the sequence is the substance:
   each step is a precondition for the next one under Article VII. */

.stages { list-style: none; margin: var(--s-6) 0 0; padding: 0;
  counter-reset: stage; max-width: none; }
.stage {
  counter-increment: stage; position: relative;
  padding: 0 0 var(--s-5) var(--s-7); margin: 0;
  border-left: 1px solid var(--line);
}
.stage:last-child { border-left-color: transparent; padding-bottom: 0; }
.stage::before {
  content: counter(stage);
  position: absolute; left: 0; top: 0; transform: translateX(-50%);
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-strong);
  color: var(--text); font-family: var(--font-ui); font-size: var(--t-xs);
  font-weight: 700; display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.stage h3 { font-size: var(--t-base); margin-bottom: var(--s-2); }
.stage p { font-size: var(--t-sm); color: var(--text-muted); }
.stage-cite { font-family: var(--font-ui); font-size: var(--t-xs);
  font-weight: 600; color: var(--link); }
@media (max-width: 40rem) {
  .stage { padding-left: var(--s-6); }
}

/* ---------- Change list and document index ---------- */

.change-list { margin: var(--s-4) 0 0; max-width: var(--measure); }
.change-list dt {
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 700;
  color: var(--text); margin-top: var(--s-4);
}
.change-list dt:first-child { margin-top: 0; }
.change-list dd {
  margin: var(--s-1) 0 0; font-size: var(--t-sm); color: var(--text-muted);
  padding-left: var(--s-4); border-left: 1px solid var(--line-hair);
}

.doc-list { list-style: none; margin: var(--s-3) 0 0; padding: 0;
  max-width: var(--measure); font-size: var(--t-sm); }
.doc-list li {
  padding: var(--s-3) 0; border-top: 1px solid var(--line-hair);
  margin: 0; display: flex; justify-content: space-between; gap: var(--s-4);
  align-items: baseline;
}
.doc-list li:first-child { border-top: 0; }
.doc-list a { font-family: var(--font-ui); font-weight: 600;
  text-decoration: none; white-space: nowrap; }
.doc-list a:hover { text-decoration: underline; }

/* ---------- Budget allocation ---------- */
/* The track is the whole budget. A partial view of public money is worse than
   no view, so the bar always sums to the full approved figure. */

.allocation { margin-top: var(--s-5); }
.allocation-bar {
  display: flex; height: 2.5rem; border-radius: var(--r-control);
  overflow: hidden; border: 1px solid var(--line);
}
.allocation-bar .alloc + .alloc { border-left: 1px solid var(--bg-raised); }
.alloc { display: block; height: 100%; }
.allocation-key {
  list-style: none; margin: var(--s-4) 0 0; padding: 0; max-width: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--s-2) var(--s-5); font-family: var(--font-ui);
  font-size: var(--t-sm);
}
.allocation-key li { display: flex; align-items: center; gap: var(--s-2);
  margin: 0; color: var(--text-muted); }
.allocation-key b { color: var(--text); font-weight: 650; }

tfoot th { border-top: 1px solid var(--line); border-bottom: 0;
  background: transparent; font-variant-numeric: tabular-nums; }

.changelog {
  font-family: var(--font-ui); font-size: var(--t-sm); line-height: 1.6;
  white-space: pre-wrap; background: var(--bg-raised);
  border: 1px solid var(--line-hair); border-radius: var(--r-panel);
  padding: var(--s-5); overflow-x: auto; margin-top: var(--s-5);
}

/* ---------- Preview banner ---------- */
/* Shown only while config.js SITE.stage is "preview", so a resident who finds
   this copy before the Board has switched over is not misled about which site
   is in use. */

.stage-bar {
  background: var(--ink); color: var(--text-inverse);
  font-family: var(--font-ui); font-size: var(--t-xs);
  padding: var(--s-2) var(--gutter);
  display: flex; gap: var(--s-3); align-items: baseline;
  justify-content: center; flex-wrap: wrap; text-align: center;
}
.stage-bar strong {
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #E8B185;
}

/* ==========================================================================
   Governing documents
   The site's claim is that every rule shows its authority. These styles are
   what make that claim checkable: a section number set as an identifier, an
   anchor on every section, and a target highlight so a reader who arrives
   from a citation can see where they landed.
   ========================================================================== */

.doc-wrap { margin-bottom: var(--s-8); }
.doc-wrap .panel-head { margin-bottom: var(--s-3); }

.doc-toc {
  list-style: none; margin: var(--s-4) 0 var(--s-5); padding: 0;
  max-width: none; columns: 2; column-gap: var(--s-7);
  font-family: var(--font-ui); font-size: var(--t-sm);
}
.doc-toc li { break-inside: avoid; margin: 0 0 var(--s-2); }
.doc-toc a { text-decoration: none; font-weight: 600; }
.doc-toc a:hover { text-decoration: underline; }
@media (max-width: 52rem) { .doc-toc { columns: 1; } }

.doc-article { border-top: 1px solid var(--line-hair); }
.doc-article:last-of-type { border-bottom: 1px solid var(--line-hair); }
.doc-article > summary {
  cursor: pointer; padding: var(--s-4) 0; list-style: none;
  display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
  font-family: var(--font-prose); font-weight: 650; font-size: var(--t-base);
}
.doc-article > summary::-webkit-details-marker { display: none; }
.doc-article > summary::before {
  content: "+"; font-family: var(--font-ui); font-weight: 700;
  color: var(--text-faint); width: 1em; flex: 0 0 auto;
}
.doc-article[open] > summary::before { content: "\2212"; }
.doc-article > summary:hover { color: var(--link); }

.doc-num {
  font-family: var(--font-ui); font-weight: 700; font-size: var(--t-xs);
  letter-spacing: 0.04em; color: var(--text-faint);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.doc-body { padding: 0 0 var(--s-5) var(--s-5); }
@media (max-width: 40rem) { .doc-body { padding-left: var(--s-3); } }

.doc-section { padding: var(--s-4) 0; border-top: 1px solid var(--line-hair); }
.doc-section:first-child { border-top: 0; }
.doc-section h4 {
  font-size: var(--t-base); font-weight: 650; margin-bottom: var(--s-2);
  display: flex; align-items: baseline; gap: var(--s-3);
}
.doc-section p { font-size: var(--t-sm); color: var(--text-muted); }

/* Where a citation lands. Held long enough to be noticed, then released so it
   does not sit there colouring the page. */
.doc-section:target {
  background: var(--bg-raised); border-radius: var(--r-panel);
  box-shadow: inset 3px 0 0 var(--gold);
  padding-left: var(--s-4); margin-left: calc(var(--s-4) * -1);
  animation: land 2.4s ease-out;
}
@keyframes land {
  0%, 55% { background: color-mix(in srgb, var(--gold) 16%, var(--bg-raised)); }
  100% { background: var(--bg-raised); }
}

.clauses { margin: var(--s-3) 0 0; padding-left: 0; list-style: none;
  font-size: var(--t-sm); color: var(--text-muted); max-width: var(--measure); }
.clauses li { margin-bottom: var(--s-3); display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--s-2); }
.clause-mark { font-family: var(--font-ui); font-weight: 700;
  font-size: var(--t-xs); color: var(--text-faint); padding-top: 0.25em; }

a.stage-cite { text-decoration: none; }
a.stage-cite:hover { text-decoration: underline; }

/* ==========================================================================
   Estate chrome: dark masthead, cinematic hero, pillars, vote campaign.
   ========================================================================== */

.masthead { background: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.masthead .mark, .masthead .mark:hover { color: #F3EEE5; }
.mark-name { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600;
  letter-spacing: 0.01em; }
.mark-sub { color: #9FB0C6; letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 0.62rem; }
.masthead .nav a { color: #C9D3E3; }
.masthead .nav a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.masthead .nav a[aria-current="page"] { color: #FFFFFF; box-shadow: inset 0 -2px 0 var(--gold); }
.masthead .nav .nav-portal { border: 1px solid rgba(255, 255, 255, 0.3); margin-left: var(--s-2); }
.masthead .nav-toggle { color: #F3EEE5; border-color: rgba(255, 255, 255, 0.3); }
@media (max-width: 62rem) {
  .masthead .nav { background: var(--ink); border-bottom-color: rgba(255, 255, 255, 0.12); }
  .masthead .nav a { border-bottom-color: rgba(255, 255, 255, 0.1); }
  .masthead .nav .nav-portal { margin-left: 0; }
}

.eyebrow { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 var(--s-3); }
.btn-light { background: #F3EEE5; color: #0F1A2E; }
.btn-light:hover { background: #FFFFFF; color: #0F1A2E; }
.btn-copper { background: var(--gold); color: var(--on-gold); }
.btn-copper:hover { filter: brightness(1.08); color: var(--on-gold); }
.btn-ghost-light { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; }

/* ---------- Cinematic hero ---------- */

.cine { position: relative; display: grid; align-items: end; isolation: isolate;
  min-height: min(92svh, 60rem); color: #F3EEE5; background: var(--ink); overflow: hidden; }
.cine-media { position: absolute; inset: 0; z-index: -2; }
.cine-media svg, .cine-media img, .cine-media video {
  width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.cine::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15, 26, 46, 0.5) 0%, rgba(15, 26, 46, 0) 28%,
    rgba(15, 26, 46, 0.42) 62%, rgba(15, 26, 46, 0.94) 100%); }
.cine-body { width: 100%; padding-block: var(--s-9) var(--s-8); }
.cine .eyebrow { color: #EAB68A; }
.cine h1 { color: #FFFFFF; max-width: 11ch; font-size: clamp(3.4rem, 1.6rem + 7.5vw, 8rem);
  line-height: 0.95; text-shadow: 0 2px 36px rgba(0, 0, 0, 0.35); margin-bottom: var(--s-5); }
.cine h1 em { font-style: italic; font-weight: 500; color: #F2C79D; }
.cine-lede { font-size: clamp(1.1rem, 1rem + 0.55vw, 1.5rem); line-height: 1.5; max-width: 42ch;
  color: #E8ECF3; margin-bottom: var(--s-6); }
.cine-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.cine-pause { position: absolute; right: var(--gutter); top: var(--s-4); z-index: 2;
  font-family: var(--font-ui); font-size: var(--t-xs); color: #fff; cursor: pointer;
  background: rgba(15, 26, 46, 0.6); border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--r-chip); padding: 0.4em 0.9em; }
.scene-mist { animation: drift 38s ease-in-out infinite alternate; }
.scene-mist-b { animation-duration: 52s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
@media (prefers-reduced-motion: reduce) { .scene-mist { animation: none; } }

.facts-strip { background: var(--ink); color: #F3EEE5; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.facts-strip ul { list-style: none; margin: 0; padding: var(--s-6) 0; max-width: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.facts-strip li { margin: 0; }
.fact-fig { font-variant-numeric: lining-nums; display: block; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.6rem); line-height: 1; color: #F2C79D; }
.fact-cap { display: block; font-family: var(--font-ui); font-size: var(--t-sm);
  color: #B9C6D9; margin-top: var(--s-2); }
@media (max-width: 40rem) { .facts-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Pillars and gallery ---------- */

.section-head { max-width: 46rem; margin-bottom: var(--s-7); }
.section-head p { font-size: var(--t-md); color: var(--text-muted); line-height: 1.5; }
.pillar { display: flex; flex-direction: column; }
.media-frame { position: relative; overflow: hidden; border-radius: var(--r-panel);
  background: var(--ink); aspect-ratio: 4 / 5; }
.media-frame svg, .media-frame img { width: 100%; height: 100%; max-width: none;
  object-fit: cover; display: block; transition: transform 900ms ease; }
.pillar:hover .media-frame svg, .pillar:hover .media-frame img,
.tile:hover .media-frame svg, .tile:hover .media-frame img { transform: scale(1.035); }
.pillar h3 { font-family: var(--font-display); font-size: var(--t-xl); font-weight: 600;
  margin: var(--s-4) 0 var(--s-2); }
.pillar p { color: var(--text-muted); }
.pillar .cite { font-family: var(--font-ui); font-size: var(--t-xs); }

.gallery { display: grid; gap: var(--s-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { margin: 0; }
.tile .media-frame { aspect-ratio: 4 / 3; }
.tile-wide { grid-column: span 2; }
.tile figcaption { font-family: var(--font-ui); font-size: var(--t-xs); color: var(--text-faint);
  margin-top: var(--s-2); min-height: 1.2em; }
@media (max-width: 62rem) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .gallery { grid-template-columns: minmax(0, 1fr); } .tile-wide { grid-column: auto; } }

/* ---------- The vote campaign ---------- */

.vote { position: relative; color: #F3EEE5; overflow: hidden;
  background: radial-gradient(120% 140% at 85% 0%, #2A4373 0%, #1C2E4F 45%, #0F1A2E 100%); }
.vote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gold); }
.vote h2 { color: #FFFFFF; }
.vote h2 em { font-style: italic; color: #F2C79D; font-weight: 500; }
.vote .eyebrow { color: #EAB68A; }
.vote a:not(.btn) { color: #C9D8EA; }
.vote-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-8); align-items: center; }
@media (max-width: 62rem) { .vote-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); } }
.vote-lede { font-size: var(--t-md); line-height: 1.5; color: #DCE4F0; max-width: 44ch; margin: var(--s-4) 0 var(--s-5); }
.vote-reasons { list-style: none; padding: 0; margin: 0 0 var(--s-6); display: grid; gap: var(--s-3); max-width: none; }
.vote-reasons li { margin: 0; display: grid; grid-template-columns: 1.6rem 1fr; gap: var(--s-3); color: #E8ECF3; font-family: var(--font-ui); font-size: var(--t-sm); line-height: 1.45; }
.vote-reasons li::before { content: ""; width: 0.6rem; height: 0.6rem; margin-top: 0.4em; border-radius: 50%; background: var(--gold); }
.vote-card { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-panel); padding: var(--s-6); backdrop-filter: blur(6px); }
.vote-card h3 { color: #FFFFFF; font-size: var(--t-md); }
.vote-num { font-variant-numeric: lining-nums; font-family: var(--font-display); font-weight: 600; font-size: clamp(3.4rem, 2rem + 4vw, 5.6rem); line-height: 1; color: #F2C79D; }
.vote-num small { font-size: 0.4em; color: #C9D3E3; font-family: var(--font-ui); font-weight: 500; margin-left: 0.3em; }
.vote-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); overflow: hidden; margin: var(--s-4) 0 var(--s-2); }
.vote-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #B0612F, #F2C79D); border-radius: 999px; transition: width 900ms ease; }
.vote-note { font-family: var(--font-ui); font-size: var(--t-xs); color: #B9C6D9; margin: 0; }

.vote-strip { background: var(--navy); color: #F3EEE5; border-top: 3px solid var(--gold); }
.vote-strip .page { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; justify-content: space-between; padding-block: var(--s-4); }
.vote-strip p { margin: 0; font-family: var(--font-ui); font-size: var(--t-sm); max-width: none; color: #E8ECF3; }
.vote-strip strong { color: #FFFFFF; }

.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
@media (max-width: 62rem) { .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .reasons { grid-template-columns: minmax(0, 1fr); } }
.reason { background: var(--bg-raised); border: 1px solid var(--line-hair); border-top: 3px solid var(--gold);
  border-radius: var(--r-panel); padding: var(--s-5); display: flex; flex-direction: column; }
.reason-num { font-variant-numeric: lining-nums; font-family: var(--font-display); font-weight: 600; font-size: var(--t-2xl); line-height: 1; color: var(--gold-text); }
.reason h3 { font-family: var(--font-display); font-size: var(--t-lg); margin: var(--s-3) 0 var(--s-2); }
.reason p { font-size: var(--t-sm); color: var(--text-muted); }
.reason .cite { margin-top: auto; font-family: var(--font-ui); font-size: var(--t-xs); }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: var(--s-4); max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 62rem) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: step; margin: 0; background: var(--bg-raised); border: 1px solid var(--line-hair); border-radius: var(--r-panel); padding: var(--s-5); }
.steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--t-2xl); color: var(--gold-text); line-height: 1; margin-bottom: var(--s-2); }
.steps h3 { font-size: var(--t-md); margin-bottom: var(--s-2); }
.faq details { border-bottom: 1px solid var(--line-hair); padding: var(--s-4) 0; }
.faq summary { cursor: pointer; font-family: var(--font-ui); font-weight: 600; }
.faq details p { margin-top: var(--s-3); color: var(--text-muted); }
.map-wide .map-host { min-height: 34rem; border-radius: var(--r-panel); overflow: hidden; }

.masthead .nav .nav-vote { background: var(--gold); color: var(--on-gold); font-weight: 600; margin-left: var(--s-2); }
.masthead .nav .nav-vote:hover { background: var(--gold); color: var(--on-gold); filter: brightness(1.1); }
@media (max-width: 62rem) { .masthead .nav .nav-vote { margin-left: 0; } }

/* ---------- Change request form ---------- */

.change-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--s-6); align-items: start; margin-top: var(--s-5); }
@media (max-width: 62rem) { .change-grid { grid-template-columns: minmax(0, 1fr); } .change-side { order: -1; } }
.change-form > * + * { margin-top: var(--s-5); }
.change-side { position: sticky; top: 5.5rem; display: grid; gap: var(--s-4); }
.kinds { border: 0; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: var(--s-2); }
.kinds legend { font-family: var(--font-display); font-size: var(--t-lg); font-weight: 600; padding: 0; margin-bottom: var(--s-2); }
.check { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-hair); border-radius: var(--r-control); background: var(--bg); cursor: pointer; font-family: var(--font-ui); font-size: var(--t-sm); }
.check:hover { border-color: var(--line-strong); }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--navy); }
.check .cite { margin-left: auto; font-size: var(--t-xs); color: var(--text-faint); }
.panel-env { border-left: 3px solid var(--lake); }
.drop { display: grid; gap: var(--s-1); justify-items: center; text-align: center; padding: var(--s-6); cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--r-panel); background: var(--bg); font-family: var(--font-ui); }
.drop:hover, .drop[data-over="true"] { border-color: var(--gold); background: var(--bg-sunken); }
.files { list-style: none; padding: 0; margin: var(--s-3) 0 0; max-width: none; display: grid; gap: var(--s-2); }
.files li { display: flex; justify-content: space-between; gap: var(--s-3); align-items: center; font-family: var(--font-ui); font-size: var(--t-sm); margin: 0; }
.meter { height: 8px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; margin: var(--s-3) 0; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--lake)); transition: width 300ms ease; }
.checklist { list-style: none; padding: 0; margin: 0 0 var(--s-3); max-width: none; display: grid; gap: var(--s-2); }
.checklist li { display: grid; grid-template-columns: 1.4rem 1fr; gap: var(--s-2); margin: 0; font-family: var(--font-ui); font-size: var(--t-sm); color: var(--text-muted); }
.checklist li[data-ok="true"] { color: var(--text); }
.checklist .tick { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1.5px solid var(--line); display: inline-grid; place-items: center; font-size: 0.7rem; margin-top: 0.15em; }
.checklist li[data-ok="true"] .tick { background: var(--status-approved); border-color: var(--status-approved); color: #fff; }

.track { list-style: none; padding: 0; margin: var(--s-5) 0 0; max-width: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); counter-reset: t; }
.track li { margin: 0; counter-increment: t; border-top: 3px solid var(--gold); padding-top: var(--s-3); font-family: var(--font-ui); font-size: var(--t-sm); display: grid; gap: var(--s-1); align-content: start; }
.track li::before { content: counter(t, decimal-leading-zero); font-family: var(--font-display); font-weight: 600; font-size: var(--t-xl); color: var(--gold-text); line-height: 1; }
.track strong { font-weight: 650; }
.track span { color: var(--text-muted); font-size: var(--t-xs); line-height: 1.5; }
@media (max-width: 62rem) { .track { grid-template-columns: minmax(0, 1fr); } }

.stage-steps { list-style: none; margin: 0; padding: 0; max-width: none; display: flex; gap: 3px; }
.stage-steps li { margin: 0; width: 1rem; height: 6px; border-radius: 2px; background: var(--line-hair); }
.stage-steps li[data-done="true"] { background: var(--gold); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--s-4); margin: var(--s-5) 0; }
.tile-stat { background: var(--bg-raised); border: 1px solid var(--line-hair); border-radius: var(--r-panel); padding: var(--s-4); }
.tile-stat .n { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--t-2xl); line-height: 1; font-variant-numeric: lining-nums; }
.tile-stat .l { display: block; font-family: var(--font-ui); font-size: var(--t-xs); color: var(--text-muted); margin-top: var(--s-2); }
.tile-stat[data-tone="warn"] .n { color: var(--gold-text); }
.tile-stat[data-tone="bad"] .n { color: var(--sumac); }
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line-hair); margin: var(--s-4) 0; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: var(--s-2) var(--s-4); cursor: pointer; font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; color: var(--text-muted); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
button[aria-pressed="true"].btn-quiet { background: var(--bg-sunken); color: var(--text); }

/* ---------- Neighbor reports ---------- */

.report-map { height: 22rem; border: 1px solid var(--line); border-radius: var(--r-3, 8px); margin: var(--s-3) 0; }
.report-files { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.report-files li { display: flex; align-items: center; gap: var(--s-3); }
.report-thumb { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 6px; background: var(--bg-sunken); flex: none; }
.report-thumb-video { display: grid; place-items: center; font-size: var(--t-xs); font-family: var(--font-ui); color: var(--text-muted); }
.report-evidence { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--s-3); margin: var(--s-3) 0; }
.report-evidence img, .report-evidence video { width: 100%; height: 8rem; object-fit: cover; border-radius: 6px; background: var(--bg-sunken); }
@media (max-width: 40rem) { .report-map { height: 18rem; } }
.track li[data-done="false"] { border-top-color: var(--line); }
.track li[data-done="false"]::before { color: var(--text-faint); }
.track li span { color: var(--text-muted); }
.track { margin-bottom: var(--s-5); }
.report-evidence { margin-bottom: var(--s-4); }
.grid-2 + div { margin-top: var(--s-5); }

/* ---------- 3D terrain ---------- */

.map3d { position: relative; min-height: 28rem; background: var(--ink); border-radius: var(--r-3, 8px); overflow: hidden; }
.map3d[hidden] { display: none; }
.map3d-stage { position: absolute; inset: 0; }
.map3d-tools { position: absolute; top: var(--s-3); left: var(--s-3); display: flex; gap: var(--s-2); z-index: 2; }
.map3d-reading, .map3d-note { position: absolute; left: var(--s-3); right: var(--s-3); margin: 0; z-index: 2; font-family: var(--font-ui);
  font-size: var(--t-xs); color: #FAF7F1; background: rgba(15, 26, 46, 0.78); padding: var(--s-2) var(--s-3); border-radius: 6px; max-width: 34rem; }
.map3d-reading { bottom: 3.6rem; }
.map3d-note { bottom: var(--s-3); }
.map-3d-btn { font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; background: var(--ink); color: #FAF7F1; border: 1px solid #FAF7F1;
  border-radius: 6px; padding: 0.45rem 0.8rem; cursor: pointer; }
.map-3d-btn:hover { background: var(--navy); }
.map-3d-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.map-frame > .map3d { grid-column: 1 / -1; }
.map3d-btn.btn-secondary { background: #FAF7F1; color: var(--ink); border-color: #FAF7F1; }
