/*
 * Organic design system, taken from the Claude Design project's ds/organic.css.
 * The token block and the component layer are the prototype's values verbatim;
 * everything below the COMPONENTS marker is the app's own layout on top.
 *
 * The look is not final. Colours, type and spacing all live in this file (the
 * :root tokens first), and the templates carry class names rather than colours,
 * so a restyle is an edit here and nowhere else.
 */

:root {
  /* "Evening sky" (design frame 1c): the sky stays blue and the interface takes
     its colour from it; the brick only appears in the photo. The design gives
     the named steps; the in-between steps are interpolated to match. */
  --color-bg: #f4f1ec;
  --color-surface: #e7e3dc;
  --color-field: #ffffff;   /* anything you can type in or change: white, so it stands out (Garth) */
  --color-text: #1d2230;
  --color-accent: #2f5a80;
  --color-accent-2: #3f6488;
  --color-divider: color-mix(in srgb, #1d2230 16%, transparent);

  --color-neutral-100: #f9f7f3;
  --color-neutral-200: #eeebe5;
  --color-neutral-300: #dcd8d1;
  --color-neutral-400: #b9b6b2;
  --color-neutral-500: #9a9896;
  --color-neutral-600: #7a7b80;
  --color-neutral-700: #5c5f68;
  --color-neutral-800: #3e4350;
  --color-neutral-900: #2a2e39;

  --color-accent-100: #e4ecf4;
  --color-accent-200: #c9d8e7;
  --color-accent-300: #a6bfd6;
  --color-accent-400: #7899bb;
  --color-accent-500: #4c7299;
  --color-accent-600: #274d6e;
  --color-accent-700: #1f3f5c;
  --color-accent-800: #18304a;
  --color-accent-900: #10213a;

  --color-accent-2-100: #e4ecf4;
  --color-accent-2-200: #cbd9e8;
  --color-accent-2-300: #a9c0d7;
  --color-accent-2-400: #7f9dbd;
  --color-accent-2-500: #56799f;
  --color-accent-2-600: #3f6488;
  --color-accent-2-700: #2d4c6c;
  --color-accent-2-800: #1f3550;
  --color-accent-2-900: #142438;

  /* The residents' block map's background, as on the speaker-blocks map. */
  --map-ground: #e9ede9;

  /* Marks a fact still to be checked before go-live (the privacy page). */
  --color-todo: #fff3bf;
  --color-todo-edge: #e67700;

  --font-heading: "Caprasimo", Georgia, serif;
  --font-heading-weight: 400;
  --font-body: "Figtree", system-ui, -apple-system, sans-serif;

  --space-1: 4.4px;
  --space-2: 8.8px;
  --space-3: 13.2px;
  --space-4: 17.6px;
  --space-6: 26.4px;
  --space-8: 35.2px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2a2e39 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2a2e39 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2a2e39 22%, transparent);
}

/* Self-hosted rather than loaded from Google, so a Cloudflare-proxied public
   page never hands a visitor's IP to a third party. Subsets and unicode-ranges
   are Google's own; Figtree is variable across 400–700. */
@font-face {
  font-family: "Caprasimo";
  src: url("/static/fonts/caprasimo-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Caprasimo";
  src: url("/static/fonts/caprasimo-latin-ext.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  src: url("/static/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("/static/fonts/figtree-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: clip;               /* the home hero runs full-bleed */
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }

.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.washed { filter: saturate(0.6) contrast(0.85) brightness(1.1) opacity(0.94); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* --- COMPONENTS (prototype parity) --------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 999px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-danger { color: var(--color-accent-800); border-color: var(--color-divider); }
.btn-danger:hover { background: color-mix(in srgb, var(--color-accent) 14%, transparent); }
.btn-block { width: 100%; margin-top: var(--space-2); }
.btn-sm { font-size: 13px; padding: 6px 12px; }

.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.field { margin-bottom: var(--space-3); }
.input {
  width: 100%; min-height: 36px; padding: 6px 14px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-field);
  border: 1px solid var(--color-divider); border-radius: 999px;
}
/* Shown but not editable (e.g. an email someone changes themselves): stays grey. */
.input:disabled { background: var(--color-surface); color: color-mix(in srgb, var(--color-text) 55%, transparent); cursor: not-allowed; }
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; border-radius: var(--radius-md); padding: 10px 14px; }
/* The native arrow is turned off for the rounded look, so draw one with two
   gradients (no image, which the CSP would also have to allow). */
select.input {
  appearance: none; padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}

.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--color-accent); width: 17px; height: 17px; }

.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); background: var(--color-surface);
  border-radius: calc(var(--radius-lg) * 1.15);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 17px; line-height: 1.2; }
.card-body { margin: 0; font-size: 13px; opacity: 0.8; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px; border-radius: 999px;
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }
.tag-danger { background: color-mix(in srgb, var(--tone-overdue) 14%, transparent); color: var(--tone-overdue); }

.nav { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); flex-wrap: wrap; }
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto; color: inherit; text-decoration: none;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-accent); }
.nav-form { margin: 0; }
.nav-user { font-size: 13px; }
.nav .btn { font-size: 13px; }
.nav a.nav-signin { color: var(--color-text); white-space: nowrap; }
.nav-over .btn-secondary { background: color-mix(in srgb, var(--color-bg) 70%, transparent); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td { padding: var(--space-2); border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); }
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.table-wrap { overflow-x: auto; }

/* --- APP LAYOUT ----------------------------------------------------------- */

/* The whole width of the window (Garth, 2026-10-30): a margin that grows with
   the screen, not a 1280px column. Text keeps its own measure (ledes, prose,
   forms have max-widths); maps, lists and grids use the room. */
.shell { margin: 0 auto; padding-bottom: var(--space-8); }
.pad { padding-inline: clamp(var(--space-4), 3vw, 72px); }
@media (min-width: 900px) { .pad { padding-inline: clamp(var(--space-8), 3vw, 72px); } }

.stack { display: flex; flex-direction: column; gap: var(--space-6); }
.row { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.section-heading {
  font-family: var(--font-body); font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; font-size: 12px; color: var(--color-accent-700);
  margin: 0 0 var(--space-2);
}
.spread { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }

.hero { display: grid; gap: var(--space-6); align-items: center; margin-top: var(--space-6); }
.hero h1 { font-size: clamp(34px, 9vw, 56px); line-height: 1.02; }
.hero p { font-size: 17px; max-width: 42ch; text-wrap: pretty; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.15fr 1fr; } }

.split { display: grid; gap: var(--space-6); align-items: start; margin-top: var(--space-8); }
@media (min-width: 900px) { .split { grid-template-columns: 480px 1fr; gap: var(--space-8); } }

/* The clickable site plan. Hotspots are percentages of the image box, so this
   works at any rendered width without recalculating anything. */
.plan { position: relative; border-radius: 24px; overflow: hidden; background: var(--color-surface); }
/* height: auto, or the img's height attribute (1050) wins and stretches the plan. */
.plan img { width: 100%; height: auto; }
.plan-layer { position: absolute; inset: 0; pointer-events: none; }
.plan-rect {
  position: absolute; pointer-events: none; border-radius: 14px;
  border: 1.5px solid color-mix(in srgb, var(--color-text) 40%, transparent);
  background: color-mix(in srgb, var(--color-bg) 35%, transparent);
  transition: background 0.15s, border-color 0.15s;
}
/* The next sector stands out in deep blue against the steel-blue plan. */
.plan-rect.is-on {
  border: 3px solid var(--color-accent-800);
  background: color-mix(in srgb, var(--color-accent) 38%, transparent);
}
.plan-hot {
  position: absolute; display: grid; place-items: center; padding: 0; border: 0;
  background: transparent; cursor: pointer; pointer-events: auto;
  transform: translate(-50%, -50%);
}
.badge {
  display: grid; place-items: center; border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; flex: none;
  background: var(--color-accent-2-100); color: var(--color-accent-2-800);
  border: 1.5px solid color-mix(in srgb, var(--color-accent-2) 65%, transparent);
  width: 30px; height: 30px; font-size: 13px;
}
.plan .badge {
  background: var(--color-bg); color: var(--color-text);
  border-color: color-mix(in srgb, var(--color-text) 35%, transparent);
}
.badge-sm { width: 22px; height: 22px; font-size: 12px; }
.badge-md { width: 26px; height: 26px; font-size: 13px; }
.badge.is-on, .plan .badge.is-on {
  background: var(--color-accent-800); color: var(--color-bg);
  border-color: var(--color-accent-800);
}

.sector-list { display: flex; flex-direction: column; gap: var(--space-2); }
.sector-row {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  padding: var(--space-2) var(--space-3); cursor: pointer; font: inherit;
  text-align: left; text-decoration: none; border-radius: 999px;
  border: 1px solid transparent; background: var(--color-surface); color: var(--color-text);
}
.sector-row:hover { border-color: var(--color-accent-300); }
.sector-row.is-on { border-color: var(--color-accent); background: var(--color-accent-100); }
.sector-row .name { display: block; font-size: 15px; font-weight: 600; }
.sector-row .sub { display: block; font-size: 12px; opacity: 0.6; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
@media (min-width: 900px) { .photo-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-3); } }
.photo-grid img, .photo-slot {
  aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 18px;
}
@media (min-width: 900px) { .photo-grid img, .photo-slot { aspect-ratio: 4 / 3; } }
.photo-slot {
  display: grid; place-items: center; border: 1.5px dashed var(--color-divider);
  font-size: 11px; color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.photo-fig { position: relative; margin: 0; }
.photo-fig figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.phase-tag { position: absolute; top: 8px; left: 8px; }

.flash {
  padding: var(--space-2) var(--space-4); border-radius: 999px;
  font-size: 14px; margin: var(--space-3) 0;
}
.flash-ok { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.flash-error { background: var(--color-accent-200); color: var(--color-accent-800); }

.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  flex-wrap: wrap; padding-top: var(--space-8); font-size: 12px;
}

.centred { max-width: 560px; margin: var(--space-8) auto; }
.empty {
  padding: var(--space-6); border-radius: var(--radius-lg);
  border: 1.5px dashed var(--color-divider); text-align: center;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

/* --- v2: ESTATE HOME AND GARDENING ---------------------------------------- */

.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;
}
/* Hide rather than re-show, so each element keeps its own display value. */
@media (max-width: 899.98px) { .desktop-only { display: none !important; } }
@media (min-width: 900px) { .mobile-only { display: none !important; } }

.nav-brand { display: inline-flex; align-items: center; gap: 10px; }

@media (min-width: 900px) {
  .nav { padding-block: var(--space-4); }
  .nav-brand { font-size: 22px; gap: 12px; }
}

.lede { font-size: 15px; max-width: 30ch; text-wrap: pretty; margin: 0; }
@media (min-width: 900px) { .lede { font-size: 18px; } }

/* Estate home ("Gun Hill Park - Home", frame 1c) */
.nav-over { position: relative; z-index: 1; }
.home-hero {
  position: relative; height: 520px; margin-top: -60px;
  /* Full-bleed: wider than the 1280px shell on big screens. */
  width: 100vw; margin-inline: calc(50% - 50vw);
}
.home-hero > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 58% 0;
  filter: saturate(0.8) contrast(0.95) brightness(1.04);
}
.home-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    var(--color-bg) 0%, transparent 18%, transparent 46%,
    color-mix(in srgb, var(--color-bg) 70%, transparent) 74%, var(--color-bg) 96%);
}
.home-hero-text {
  position: absolute; z-index: 1; bottom: 0; left: 0; right: 0;
  margin: 0 auto; padding-inline: clamp(var(--space-4), 3vw, 72px);
}
.home-hero h1 { font-size: 40px; margin: var(--space-2) 0; }
.home-hero .lede { font-size: 15px; max-width: 28ch; }
@media (min-width: 900px) {
  .home-hero { height: 700px; margin-top: -70px; }
  .home-hero > img { object-position: 55% 20%; }
  /* The photo runs on behind the title (design frame 1c): the fade starts
     lower and only reaches the page colour at the very bottom. */
  .home-hero::after {
    background: linear-gradient(to bottom,
      var(--color-bg) 0%, transparent 18%, transparent 52%,
      color-mix(in srgb, var(--color-bg) 70%, transparent) 78%, var(--color-bg) 97%);
  }
  .home-hero-text {
    display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-8);
    padding-inline: var(--space-8);
  }
  .home-hero h1 { font-size: 80px; line-height: 1; margin: var(--space-3) 0 0; }
  .home-hero .lede { font-size: 18px; max-width: 30ch; margin-bottom: 10px; }
}

.sections { margin-top: var(--space-6); }
.section-grid { display: flex; flex-direction: column; gap: var(--space-3); }
.section-card {
  background: var(--color-accent-2-100); color: var(--color-text); text-decoration: none;
  transition: box-shadow 0.15s;
}
.section-card:hover { box-shadow: var(--shadow-lg); }
.section-card .card-kicker { color: var(--color-accent-2-800); }
.section-card .card-title { font-size: 24px; }
.section-blurb { font-size: 14px; }
.section-next { font-size: 13px; }
.section-card .btn { align-self: flex-start; margin-top: var(--space-1); }
.soon-list { display: flex; flex-direction: column; gap: var(--space-3); }
.res-card { text-decoration: none; color: inherit; padding: var(--space-4); transition: box-shadow 150ms; }
.res-card:hover { box-shadow: var(--shadow-lg); }
.res-card .card-kicker { color: var(--color-accent-2-800); }
.res-card .card-title { font-size: 22px; }
.res-card-blurb { font-size: 14px; }
.soon-card {
  flex: 1; border: 1.5px dashed var(--color-divider); border-radius: var(--radius-lg);
  padding: var(--space-4); display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); font-weight: 600; font-size: 15px;
}
@media (min-width: 900px) {
  .sections { margin-top: var(--space-8); }
  .section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
  .section-card { grid-column: span 2; padding: var(--space-6); }
  .section-card .card-title { font-size: 34px; }
  .section-blurb { font-size: 16px; max-width: 40ch; }
  .section-next { font-size: 14px; }
  .section-card .btn { margin-top: var(--space-2); }
  .soon-list { gap: var(--space-4); }
  .soon-card { font-size: 16px; }
}

/* Gardening (frames 4A/4B) */
.garden-hero { display: grid; gap: var(--space-3); align-items: center; margin-top: var(--space-2); }
.garden-hero h1 { font-size: 34px; line-height: 1.02; }
.back-link { margin: 0 0 var(--space-2) calc(-1 * var(--space-1)); font-size: 14px; }
.garden-hero .lede { max-width: 28ch; font-size: 14px; }
.next-card { background: var(--color-accent-100); }
.next-card .card-kicker { color: var(--color-accent-700); }
.next-card .card-title { font-size: 22px; }
.next-card p { margin: 0; }
.next-card .when { font-size: 15px; }
.next-card .where { font-size: 13px; }
.next-card .next-edit { align-self: flex-start; margin-top: var(--space-2); }
.next-col { display: flex; flex-direction: column; gap: var(--space-3); }
.next-cancelled {
  flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-3);
  background: var(--color-accent-100); border-left: 4px solid var(--color-accent-700); font-size: 15px;
}
.section-cancelled { font-weight: 600; color: var(--color-accent-800); }
.kit { margin-top: var(--space-2); }
@media (min-width: 900px) {
  .garden-hero { grid-template-columns: 1.15fr 1fr; gap: var(--space-8); margin-top: var(--space-6); }
  .garden-hero h1 { font-size: 72px; line-height: 1; }
  .next-card { padding: var(--space-6); }
  .garden-hero .lede { max-width: 42ch; font-size: 17px; margin-top: var(--space-3); }
  .next-card .card-title { font-size: 28px; }
  .next-card .when { font-size: 16px; }
  .next-card .where { font-size: 14px; }
}

.garden-body {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8);
  margin-top: var(--space-4); align-items: start;
}
/* Grid and flex items default to min-width: auto, which lets a photo strip
   stretch the whole page instead of scrolling inside its row. */
.garden-body > *, .weeks > *, .week > *, .week-body, .carousel { min-width: 0; }
.plan-caption { font-size: 12px; margin: var(--space-2) 0 0; }
@media (min-width: 900px) {
  .garden-body { grid-template-columns: 480px minmax(0, 1fr); margin-top: var(--space-8); }
  .garden-plan { position: sticky; top: var(--space-4); }
  .plan-caption { font-size: 13px; }
}

.plan-pin { position: absolute; transform: translate(-50%, -50%); }
.badge-lg { width: 30px; height: 30px; font-size: 13px; }

.past-head { align-items: center; }
.past-head h3 { font-size: 24px; margin: 0; }
@media (min-width: 900px) { .past-head h3 { font-size: 25px; } }
.past-head form { margin: 0; }
.signin-box {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  margin-top: var(--space-3); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); background: var(--color-surface);
  font-size: 13px; line-height: 1.35;
}
.signin-box span { max-width: 22ch; }
.signin-box .btn { font-size: 13px; flex: none; }

.upload-note { font-size: 13px; margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-surface); }
.weeks { display: flex; flex-direction: column; margin-top: var(--space-3); }
.week {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4) 0; border-top: 1px solid var(--color-divider);
  scroll-margin-top: var(--space-4);
}
.week-head { display: flex; align-items: center; gap: var(--space-3); }
.week-name { flex: 1; line-height: 1.25; }
.week-name .name { display: block; font-size: 15px; font-weight: 600; }
.week-name .date { display: block; font-size: 12px; opacity: 0.6; }
.week-count { font-size: 12px; white-space: nowrap; }
/* Each week's photos: a strip that scrolls sideways and snaps to each photo.
   Photos keep their own shape at a fixed height; nothing is cropped. */
.carousel { --car-h: 170px; position: relative; }
.car-track {
  display: flex; gap: var(--space-2); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 2px; padding-bottom: 2px;
  scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; border-radius: 12px; }
.car-track > * { flex: none; scroll-snap-align: start; }
.car-track .photo-tile {
  height: var(--car-h);
  /* Width = fixed height × this photo's own aspect ratio (--ar, set per tile from
     the stored size), capped so a panorama doesn't fill a whole phone. */
  width: min(85vw, 640px, calc(var(--car-h) * var(--ar, 1.3333)));
}
.car-track .photo-tile > a { display: block; width: 100%; height: 100%; }
.car-track img {
  display: block; width: 100%; height: 100%; max-width: none;
  object-fit: cover; border-radius: 16px; background: var(--color-surface);
}
.car-btn {
  position: absolute; top: calc(50% - 20px); z-index: 1; width: 40px; height: 40px;
  border: 0; border-radius: 999px; cursor: pointer; font-size: 26px; line-height: 1;
  display: grid; place-items: center; padding-bottom: 3px;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent); color: var(--color-text);
  box-shadow: var(--shadow-md);
}
.car-btn:hover { color: var(--color-accent); }
.car-btn[hidden] { display: none; }
.car-prev { left: 6px; }
.car-next { right: 6px; }
@media (hover: none) { .car-btn { display: none; } }   /* touch: swipe instead */

.add-photo { margin: 0; }
.add-photo label {
  /* position: relative keeps the hidden file input inside the scrolling strip;
     without it the input escapes the strip and widens the whole page. */
  position: relative;
  width: calc(var(--car-h) * 0.62); height: var(--car-h); border-radius: 16px;
  border: 1.5px dashed var(--color-divider); display: grid; place-items: center;
  font-size: 24px; color: var(--color-accent); cursor: pointer;
}
.add-photo label:hover { border-color: var(--color-accent); }
.add-photo label:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.add-photo input[type="file"] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; }
/* Reordering (committee): ◀ ▶ on each tile; the viewer, × and + step aside. */
.photo-move { display: none; position: absolute; left: 6px; right: 6px; bottom: 6px; justify-content: space-between; }
.photo-move button {
  width: 34px; height: 34px; border: 0; border-radius: 999px; cursor: pointer; font-size: 13px;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent); color: var(--color-text); box-shadow: var(--shadow-sm);
}
.photo-move button:hover { color: var(--color-accent); }
.is-reordering .photo-move { display: flex; }
.is-reordering .photo-del, .is-reordering .add-photo { display: none; }
.is-reordering .photo-tile img { outline: 2px dashed var(--color-accent); outline-offset: -2px; }
.photo-tile.just-moved img { outline-style: solid; }
.reorder-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.reorder-bar [data-reorder="save"], .reorder-bar [data-reorder="cancel"], .reorder-hint { display: none; }
.reorder-bar.is-reordering [data-reorder="start"] { display: none; }
.reorder-bar.is-reordering [data-reorder="save"], .reorder-bar.is-reordering [data-reorder="cancel"] { display: inline-flex; }
.reorder-bar.is-reordering .reorder-hint { display: inline; font-size: 13px; }
.car-track > .add-photo:only-child label { width: 96px; height: 96px; }   /* a week with no photos yet */
/* On a phone the + comes first: at the end of a strip of photos it's off-screen. */
@media (max-width: 899.98px) { .car-track > .add-photo { order: -1; } }
.add-photo.is-busy label { opacity: 0.5; cursor: progress; font-size: 13px; }

/* Full-screen viewer for one photo, with the rest of that week either side. */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(12, 15, 22, 0.97); color: #fff;
}
.viewer[open] { display: grid; place-items: center; }
.viewer::backdrop { background: transparent; }
.viewer img {
  max-width: calc(100vw - 32px); max-height: calc(100dvh - 96px);
  object-fit: contain; border-radius: 8px; touch-action: pan-y pinch-zoom;
}
.viewer-caption { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; margin: 0; font-size: 13px; opacity: 0.8; }
.viewer-btn, .viewer-close {
  position: absolute; border: 0; cursor: pointer; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); color: #fff; line-height: 1;
}
.viewer-btn { top: calc(50% - 26px); width: 52px; height: 52px; font-size: 34px; padding-bottom: 4px; }
.viewer-btn:hover, .viewer-close:hover { background: rgba(255, 255, 255, 0.26); }
.viewer-btn[hidden] { display: none; }
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }
.viewer form { margin: 0; }
.viewer-close { top: 12px; right: 12px; width: 44px; height: 44px; font-size: 26px; }
@media (hover: none) { .viewer-btn { display: none; } }  /* touch: swipe */

.photo-tile { position: relative; }
.photo-del { position: absolute; top: 6px; right: 6px; margin: 0; }
.photo-del button {
  width: 28px; height: 28px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 18px; line-height: 1;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent); color: var(--color-text);
  box-shadow: var(--shadow-sm);
}
.photo-del button:hover { background: var(--color-bg); color: var(--color-accent-800); }
/* A week being dragged over: the whole row takes the drop. */
.drop-note { margin: 0 0 var(--space-2); border-radius: var(--radius-md); }
.week.is-drop { outline: 2px dashed var(--color-accent); outline-offset: 4px; border-radius: 12px; }
.no-photos { font-size: 13px; margin: var(--space-2) 0 0; }
.more-weeks { margin-top: var(--space-2); width: 100%; }
@media (min-width: 900px) {
  .week { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
  .week-name .date { font-size: 13px; }
  .carousel { --car-h: 190px; }
  .more-weeks { width: auto; }
}

/* --- SIGN-IN ------------------------------------------------------------- */

.auth { max-width: 460px; }
.auth-card { gap: var(--space-3); padding: var(--space-6) var(--space-4); }
.auth-card p { margin: 0; }
.auth-title { font-size: 30px; line-height: 1.05; margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: var(--space-3); }
.auth-form .field { margin: 0; }
.auth-form .btn { align-self: flex-start; }
.auth-alt { border-top: 1px solid var(--color-divider); padding-top: var(--space-3); font-size: 14px; }
.auth-small { font-size: 13px; }
@media (min-width: 900px) {
  .auth-card { padding: var(--space-8); }
  .auth-title { font-size: 38px; }
}

/* --- RESIDENTS (signed-in residents) ------------------------------------- */

.res-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-2); }
.res-head h1 { font-size: 34px; line-height: 1.02; margin: 0; }
.res-head .lede { font-size: 14px; max-width: 34ch; }
.res-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6);
  margin-top: var(--space-6); align-items: start;
}
.res-grid > * { min-width: 0; }
.res-find { background: var(--color-accent-100); gap: var(--space-3); }
.res-find .card-title { font-size: 22px; margin: 0; }
.res-found { border-top: 1px solid var(--color-divider); padding-top: var(--space-3); }
.res-found p { margin: 0 0 var(--space-2); }
.res-found-rep { display: flex; flex-direction: column; gap: 4px; margin-top: var(--space-2); }
.res-found[hidden], [data-js-only][hidden], .map-pin[hidden] { display: none; }
/* The estate map, drawn as on the speaker-blocks map: each block a light wash
   of its own colour with a solid edge, its number on a badge, and every home a
   dot in its block's colour. Wide and shallow, so on a phone it keeps a
   readable size and scrolls sideways inside its own box. --c is the block's
   colour, set per element. */
.estate-map {
  overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--radius-md);
  background: var(--map-ground);
}
.estate-map svg { display: block; width: 100%; min-width: 720px; height: auto; aspect-ratio: 4920 / 2240; }
.blk {
  fill: var(--c); fill-opacity: 0.16; stroke: var(--c); stroke-width: 2.5px; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; cursor: pointer; outline: none; transition: fill-opacity 0.15s, stroke-opacity 0.15s;
}
.blk:hover, .blk:focus-visible { fill-opacity: 0.28; }
.blk.is-on { fill-opacity: 0.3; stroke-width: 3.5px; stroke-dasharray: 8 5; }
.em-home {
  fill: var(--c); stroke: #fff; stroke-width: 2px; vector-effect: non-scaling-stroke; cursor: pointer;
  transition: opacity 0.15s;
}
.em-lab { pointer-events: none; transition: opacity 0.15s; }
.em-lab circle { fill: var(--c); stroke: #fff; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.em-lab text { fill: #fff; font: 600 92px/1 var(--font-body); text-anchor: middle; }
/* Once a block is chosen, the rest step back. */
.has-choice .blk:not(.is-on) { fill-opacity: 0.07; stroke-opacity: 0.4; }
.has-choice .em-home:not(.is-on), .has-choice .em-lab:not(.is-on) { opacity: 0.25; }
/* With a home ringed, its block's badge steps back so the two don't collide. */
.has-home .em-lab.is-on { opacity: 0.3; }
.em-ring { pointer-events: none; }
.em-ring circle { fill: none; stroke: var(--c); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.em-ring .em-ring-halo { stroke: #fff; stroke-width: 7px; }

/* A block's number in its colour, as on the map. */
.blk-chip {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--c); color: #fff; font-size: 11px; font-weight: 600; line-height: 1;
}
.rep-blocks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.blk-chip-row { display: inline-flex; align-items: center; gap: 6px; }
.res-found .blk-chip { margin-right: 4px; vertical-align: 1px; }

.res-h2 { font-size: 24px; margin: 0 0 var(--space-3); }
.rep-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.rep-card { padding: var(--space-4); }
.rep-card .card-title { font-size: 20px; }
.rep-card .card-kicker { color: var(--color-accent-2-800); }
/* Phone numbers and email addresses as one tappable line each; long addresses
   break anywhere rather than pushing the page sideways. */
.contact-links { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.contact-links a { overflow-wrap: anywhere; text-decoration: none; padding: 3px 0; }
.contact-links a:hover { text-decoration: underline; }
.contact-links .text-muted { display: inline-block; min-width: 7.5em; font-size: 13px; }
.agent-card { padding: var(--space-4); gap: var(--space-3); }
.agent-card .card-title { font-size: 22px; margin: 0; }
.agent-notes { margin: 0; font-size: 14px; white-space: pre-line; }
.res-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-8); }
.res-foot p { margin: 0; font-size: 13px; }
@media (min-width: 900px) {
  .res-head { margin-top: var(--space-6); }
  .res-head h1 { font-size: 72px; line-height: 1; }
  .res-head .lede { font-size: 17px; max-width: 42ch; }
  .res-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-8); margin-top: var(--space-8); }
  .agent-card { position: sticky; top: var(--space-4); padding: var(--space-6); }
  .res-find { padding: var(--space-6); }
  .rep-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- JOINING AND MY DETAILS -------------------------------------------- */

.input-postcode { max-width: 12em; text-transform: uppercase; }
.home-pick-wrap { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.home-pick-wrap legend { font-size: 13px; margin-bottom: var(--space-2); padding: 0; }
.home-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: var(--space-2); align-content: start; }
.home-pick.is-long { max-height: min(22rem, 50vh); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--color-divider); border-radius: var(--radius-sm); padding: var(--space-2); }
.home-option[hidden], .home-search[hidden], .home-none[hidden] { display: none; }
.home-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; cursor: pointer;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-field);
}
.home-option:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-100); }
.home-option input { accent-color: var(--color-accent); }
.me-list { margin: 0; display: grid; gap: var(--space-2); font-size: 15px; }
.me-list > div { display: grid; grid-template-columns: 10em minmax(0, 1fr); gap: var(--space-2); }
.me-list dt { color: color-mix(in srgb, var(--color-text) 55%, transparent); font-size: 13px; padding-top: 2px; }
.me-list dd { margin: 0; overflow-wrap: anywhere; }
.me-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); margin-top: var(--space-6); align-items: start; }
.me-card { gap: var(--space-3); padding: var(--space-4); }
.me-card p { margin: 0; }
.me-card .btn { align-self: flex-start; }
.me-card .field { margin: 0; }
.me-choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.me-choice legend { font-size: 13px; margin-bottom: var(--space-2); padding: 0; }
.me-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); font-size: 13px; }
.me-links form { margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (min-width: 900px) {
  .me-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); margin-top: var(--space-8); }
  .me-card { padding: var(--space-6); }
}

/* Representatives' queue of requests to join. */
.requests { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); margin-top: var(--space-6); }
.request-card { gap: var(--space-3); padding: var(--space-4); }
.request-card.is-mine { box-shadow: inset 4px 0 0 var(--color-accent); }
.request-head { display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.request-when { font-size: 12px; }
.request-card .row form { margin: 0; }
@media (min-width: 900px) { .requests { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The privacy page. */
.prose { max-width: 68ch; margin-top: var(--space-6); font-size: 15px; line-height: 1.55; }
.prose h2 { font-size: 22px; margin: var(--space-6) 0 var(--space-2); }
.prose ul { padding-left: 1.2em; margin: 0 0 var(--space-3); }
.prose li { margin-bottom: var(--space-2); }
/* A fact still to be checked before go-live: impossible to miss. */
.confirm { background: var(--color-todo); outline: 1px dashed var(--color-todo-edge); padding: 0 3px; border-radius: 3px; }
.footer-links { display: inline-flex; gap: var(--space-4); }

/* --- DIRECTORY (representatives' full-page map) -------------------------- */

.dir { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); }
.dir-map { order: -1; min-width: 0; }
.dir-panel { min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.dir-title { font-size: 28px; margin: 0; }
.dir-count { margin: 0; font-size: 13px; }
.dir-list { list-style: none; margin: 0; padding: 0; }
.dir-street {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); padding: var(--space-3) 0 var(--space-1);
}
.dir-row a {
  display: grid; grid-template-columns: 12px minmax(0, 9em) minmax(0, 1fr); align-items: center; gap: var(--space-2);
  padding: 7px 8px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; font-size: 14px;
}
.dir-row a:hover { background: var(--color-surface); }
.dir-names { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 2px solid var(--c); }
.dir-dot.is-hollow { background: transparent; }
.map-key-line { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: var(--space-2) 0 0; }
.map-key-line .dir-dot + * { margin-right: var(--space-2); }
.em-home.is-hollow { fill: #fff; stroke: var(--c); stroke-width: 2.5px; }
.estate-map.is-big { touch-action: pan-x pan-y; }
.estate-map.is-big svg { cursor: grab; }
.estate-map.is-big svg.is-dragging { cursor: grabbing; }
.map-zoom { display: flex; gap: 6px; justify-content: flex-end; margin-top: var(--space-2); }
.map-zoom button { min-width: 34px; }

.dir-home-head { display: flex; align-items: center; gap: var(--space-3); scroll-margin-top: var(--space-4); }
.dir-home-head h2 { font-size: 26px; margin: 0; line-height: 1.1; }
.dir-home-head .blk-chip { min-width: 30px; height: 30px; border-radius: 15px; font-size: 14px; }
.person-card { gap: var(--space-2); padding: var(--space-4); }
.person-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 16px; }
.person-notes { margin: 0; font-size: 14px; white-space: pre-line; }
.person-meta { font-size: 12px; }
.person-actions form { margin: 0; }
.person-edit summary, .person-add summary { cursor: pointer; font-size: 14px; color: var(--color-accent); }
.person-add { gap: var(--space-3); padding: var(--space-4); }
.person-add summary { font-size: 17px; color: inherit; }
.person-form { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-3); }
.person-form .field { margin: 0; }
.person-form .btn { align-self: flex-start; }
.field-hint { display: block; font-size: 12px; margin-top: 4px; color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.consent-row { align-items: center; gap: var(--space-2) var(--space-3); }
.consent-date { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.input-date { width: auto; min-height: 32px; }
.stale-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-todo); font-size: 13px;
}

@media (min-width: 900px) {
  .dir { display: grid; grid-template-columns: 380px minmax(0, 1fr); align-items: start; gap: var(--space-6); padding: var(--space-6) var(--space-8); }
  .dir-map { order: 0; position: sticky; top: var(--space-4); }
  .dir-panel { max-height: calc(100vh - 140px); overflow-y: auto; padding-right: var(--space-2); }
  .estate-map.is-big { overflow: hidden; }
  /* As tall as the window allows; the script widens the view to fill it. */
  .estate-map.is-big svg { min-width: 0; height: calc(100vh - 190px); min-height: 420px; aspect-ratio: auto; }
}

/* --- TOPIC EMAILS (representatives) -------------------------------------- */

.tabs-row { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-4); font-size: 14px; border-bottom: 1px solid var(--color-divider); padding-bottom: var(--space-2); }
.tabs-row a { color: inherit; text-decoration: none; }
.tabs-row a[aria-current="page"] { color: var(--color-accent); font-weight: 600; }
.emails-head { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; justify-content: space-between; margin-top: var(--space-6); }
.send-groups { display: flex; flex-direction: column; gap: var(--space-6); margin-top: var(--space-6); }
.send-group { display: flex; flex-direction: column; gap: var(--space-2); }
.send-group:not(:has(.send-row)) { display: none; }
.send-row { text-decoration: none; color: inherit; gap: 4px; padding: var(--space-3) var(--space-4); }
.send-row:hover { box-shadow: var(--shadow-md); }
.send-row.is-yours-to-approve { box-shadow: inset 4px 0 0 var(--color-accent); }
.send-subject { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.send-meta { font-size: 13px; }
.compose { margin-top: var(--space-4); }
.compose-card { gap: var(--space-3); padding: var(--space-4); max-width: 760px; }
.compose-card .field { margin: 0; }
.compose-body { min-height: 260px; font-size: 15px; line-height: 1.5; }
.compose-actions { gap: var(--space-2) var(--space-3); }
.send-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-top: var(--space-4); align-items: start; }
.email-preview { background: var(--color-neutral-100); gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--color-divider); }
.email-preview-from { font-size: 12px; }
.email-preview-subject { font-size: 18px; overflow-wrap: anywhere; }
.email-preview-body p { margin: 0 0 var(--space-3); white-space: pre-line; overflow-wrap: anywhere; }
.email-preview-foot { font-size: 12px; border-top: 1px solid var(--color-divider); padding-top: var(--space-2); margin: 0; }
.fake-link { color: var(--color-accent); text-decoration: underline; }
.send-actions { gap: var(--space-3); padding: var(--space-4); }
.send-actions p { margin: 0; }
.send-actions form { margin: 0; }
.topic-card { gap: var(--space-3); padding: var(--space-4); }
.topic-card.is-retired { opacity: 0.65; }
.topic-pick { margin-bottom: var(--space-3); }
.topic-pick a { text-decoration: none; }
.wa-warning { gap: var(--space-1); padding: var(--space-3) var(--space-4); background: var(--color-todo); font-size: 14px; }
.wa-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wa-table th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 55%, transparent); padding: var(--space-2) var(--space-2) var(--space-2) 0; border-bottom: 1px solid var(--color-divider); }
.wa-table td { padding: var(--space-2) var(--space-2) var(--space-2) 0; border-bottom: 1px solid var(--color-divider); overflow-wrap: anywhere; }
.wa-number { white-space: nowrap; font-variant-numeric: tabular-nums; }
.topic-ticks .field { margin-top: var(--space-2); }
@media (min-width: 900px) {
  .send-view { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-8); }
  .email-preview { padding: var(--space-6); }
  .send-actions { position: sticky; top: var(--space-4); }
}

/* --- COMMITTEE ------------------------------------------------------------ */

.admin-nav { background: var(--color-surface); }
.admin-grid { display: grid; gap: var(--space-8); align-items: start; margin-top: var(--space-8); }
@media (min-width: 1000px) { .admin-grid { grid-template-columns: 1.3fr 1fr; } }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sector-picker { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sector-picker label {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 6px 13px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--color-divider); background: var(--color-bg);
}
.sector-picker label:has(input:checked) {
  background: var(--color-accent-100); border-color: var(--color-accent);
}
.sector-picker input { accent-color: var(--color-accent); }

/* Representatives' contacts page. */
.consent { align-items: flex-start; line-height: 1.4; }
.consent input { flex: none; margin-top: 1px; }
.contact-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  padding-block: var(--space-2); border-top: 1px solid var(--color-divider);
}
.contact-row > div { display: flex; flex-direction: column; flex: 1; min-width: 12em; }
.contact-row .text-muted { font-size: 13px; }
.blocks-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
@media (min-width: 600px) { .blocks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.homes-card { gap: var(--space-3); }
.homes-card summary { cursor: pointer; }
.homes-card[open] summary { margin-bottom: var(--space-2); }
.homes-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2) var(--space-6); }
.home-row { display: grid; grid-template-columns: 11em minmax(0, 1fr); align-items: center; gap: var(--space-2); font-size: 14px; }
@media (min-width: 900px) { .homes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Drag-to-draw sector editor. The plan image never changes, so the editor only
   ever has to place rectangles over a fixed backdrop. */
.editor { position: relative; touch-action: none; user-select: none; cursor: crosshair; }
.editor .plan-rect { pointer-events: auto; cursor: move; }
.editor .plan-rect.is-selected { border-color: var(--color-accent); border-width: 3px; }
.editor-handle {
  position: absolute; right: -7px; bottom: -7px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--color-accent); border: 2px solid var(--color-bg);
  cursor: nwse-resize;
}
.editor-hint {
  font-size: 12px; color: color-mix(in srgb, var(--color-text) 55%, transparent);
  margin-top: var(--space-2);
}

/* People who can sign in. */
.person-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  padding-top: var(--space-3); border-top: 1px solid var(--color-divider);
}
.person-who { display: flex; flex-direction: column; flex: 1 1 14em; min-width: 0; }
.person-who .text-muted { font-size: 13px; overflow-wrap: anywhere; }
.person-last { font-size: 12px !important; }
.person-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.person-controls select { width: auto; min-width: 11em; }
.person-remove { margin: calc(-1 * var(--space-1)) 0 var(--space-2); }
.change-row { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 14px; }

@media print {
  .nav, .btn, .footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

.add-ticks { gap: var(--space-2); margin-top: 28px; }
[data-for-method][hidden], [data-for-role][hidden] { display: none; }
.input-code { font-size: 22px; letter-spacing: 0.2em; max-width: 9em; font-variant-numeric: tabular-nums; }
.auth-help { margin: 0; }

.rep-card > summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rep-card > summary::-webkit-details-marker { display: none; }
.rep-card > summary .card-title::after { content: '▸'; margin-left: 8px; font-size: 0.8em; color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.rep-card[open] > summary .card-title::after { content: '▾'; }
.rep-card[open] > summary { margin-bottom: var(--space-2); }
.rep-card[hidden], .rep-search[hidden], .rep-none[hidden] { display: none; }
.rep-search { margin-bottom: var(--space-3); }
.block-reps { gap: var(--space-2); margin-bottom: var(--space-3); }
.block-reps-names { margin: 0; }
.block-reps-edit summary { cursor: pointer; font-size: 14px; }
.block-reps-edit[open] summary { margin-bottom: var(--space-2); }

/* Documents */
.docs-tools { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
.docs-tools[hidden], .doc-row[hidden], .doc-none[hidden] { display: none; }
.docs-cats .btn[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.doc-row { flex-direction: row; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.doc-kind { flex: none; width: 44px; height: 44px; border-radius: var(--radius-sm); display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; background: var(--color-field); color: var(--color-accent); border: 1px solid var(--color-divider); }
.doc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-title { font-weight: 600; color: var(--color-text); text-decoration: none; overflow-wrap: anywhere; }
.doc-title:hover { text-decoration: underline; }
.doc-meta { font-size: 13px; }
.doc-meta .tag { margin-left: 6px; }
.doc-form { gap: var(--space-3); max-width: 44rem; }
.doc-tell { display: flex; flex-direction: column; gap: var(--space-2); }
.doc-tell[hidden] { display: none; }
.edit-map-link { align-self: flex-start; margin-bottom: var(--space-3); }

/* Action tracker. The left edge says who's responsible, as the spreadsheet's
   colour key did: green Rosetree, orange Weston, grey third party; the
   representatives in the site's own accent. */
:root {
  --resp-reps: var(--color-accent);
  --resp-rosetree: #2f8a4f;
  --resp-weston: #d9822b;
  --resp-third: #8a8f99;
  --tone-overdue: #b42318;
  --tone-soon: #b26b00;
}
.act-head h2, .act-show h2 { font-size: 32px; margin: 0; }
.act-head { margin-top: var(--space-6); }
.act-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: var(--space-3); margin: var(--space-4) 0; }
.act-tile { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text); text-decoration: none; border: 2px solid transparent; }
.act-tile strong { font-family: var(--font-heading); font-size: 30px; line-height: 1; }
.act-tile span { font-size: 13px; color: color-mix(in srgb, var(--color-text) 65%, transparent); }
.act-tile.tone-overdue strong { color: var(--tone-overdue); }
.act-tile.tone-soon strong { color: var(--tone-soon); }
.act-tile.tone-rosetree strong { color: var(--resp-rosetree); }
.act-tile:hover { border-color: var(--color-divider); }
.act-tile.is-on { border-color: var(--color-accent); background: var(--color-field); }
.act-decisions { margin-bottom: var(--space-4); background: var(--color-accent-100); }
.act-decisions summary { cursor: pointer; }
.act-decisions ul { margin: var(--space-2) 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.act-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.act-filters .input { width: auto; flex: 0 1 auto; }
.act-filters .act-search { flex: 1 1 14rem; }
.act-search[hidden], .act-none[hidden], .act-row[hidden], .act-group[hidden] { display: none; }
.act-view { margin-left: auto; display: flex; gap: 4px; }
.act-count { font-size: 13px; margin: 0 0 var(--space-3); }
.act-group { margin-bottom: var(--space-5); }
.act-group h3, .act-col h3 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 var(--space-2); }
.act-list { display: flex; flex-direction: column; gap: var(--space-2); }
.act-row { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border-radius: var(--radius-sm); border-left: 5px solid var(--resp-reps);
  color: var(--color-text); text-decoration: none; }
a.act-row:hover { background: var(--color-field); }
.resp-rosetree { border-left-color: var(--resp-rosetree); }
.resp-weston { border-left-color: var(--resp-weston); }
.resp-third { border-left-color: var(--resp-third); }
.act-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.act-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.act-ref { display: inline-block; min-width: 1.8em; margin-right: 6px; font-size: 12px; font-weight: 700;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.act-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: color-mix(in srgb, var(--color-text) 65%, transparent); }
.act-latest { font-size: 14px; }
.due-overdue { color: var(--tone-overdue); font-weight: 600; }
.due-soon { color: var(--tone-soon); font-weight: 600; }
.prio { font-weight: 700; }
.prio-urgent { color: var(--tone-overdue); }
.prio-high { color: var(--tone-soon); }
.pub { font-size: 12px; color: var(--resp-rosetree); }
.status { flex: none; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--color-neutral-200); color: var(--color-neutral-800); }
.status-in_progress { background: var(--color-accent-100); color: var(--color-accent-800); }
.status-waiting { background: #fbe9cc; color: #7a4a00; }
.status-complete { background: #dcefe2; color: #1f5c35; }
.act-board { display: grid; grid-template-columns: repeat(4, minmax(15rem, 1fr)); gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-2); }
.act-col { display: flex; flex-direction: column; gap: var(--space-2); background: var(--color-neutral-100); border-radius: var(--radius-md); padding: var(--space-3); min-width: 15rem; }
.act-col .act-row { background: var(--color-field); }
.act-col .status { display: none; }
.act-empty { font-size: 13px; margin: 0; }
.act-summary { margin-top: var(--space-6); }
.act-summary summary { cursor: pointer; }
.act-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-4); margin-top: var(--space-3); }
.act-summary h4 { margin: 0 0 var(--space-2); font-size: 14px; }
.act-show { margin-top: var(--space-6); }
.act-show-head { border-left: 5px solid var(--resp-reps); padding: var(--space-2) 0 var(--space-2) var(--space-4); margin: var(--space-3) 0 var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.act-show-head h2 { font-size: 26px; line-height: 1.25; }
.act-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 14px; }
.act-source { margin: 0; font-size: 13px; }
.act-show-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 860px) { .act-show-grid { grid-template-columns: 1fr; } .act-board { grid-template-columns: repeat(4, 80vw); } }
.act-context { margin: 0; white-space: pre-line; font-size: 14px; line-height: 1.5; }
.act-timeline ol { list-style: none; margin: 0; padding: 0 0 0 var(--space-3); border-left: 2px solid var(--color-divider); display: flex; flex-direction: column; gap: var(--space-3); }
.act-timeline li { position: relative; display: flex; flex-direction: column; gap: 2px; }
.act-timeline li::before { content: ''; position: absolute; left: calc(-1 * var(--space-3) - 6px); top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-neutral-400); }
.act-timeline li.is-public::before { background: var(--resp-rosetree); }
.act-timeline p { margin: 0; white-space: pre-line; font-size: 14px; }
.act-when { font-size: 12px; }
.act-change { font-size: 14px; }
.act-note { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--color-divider); }
.act-link { display: flex; gap: 6px; align-items: baseline; color: var(--color-text); text-decoration: none; font-size: 14px; padding: 4px 0; }
.act-link .status { margin-left: auto; }
.act-link-pick { display: flex; flex-direction: column; gap: 4px; max-height: 22rem; overflow-y: auto; margin-top: var(--space-2); }
.act-form { gap: var(--space-3); max-width: 52rem; }
.act-publish { display: flex; flex-direction: column; gap: var(--space-2); }

/* The top bar: the site name, then the sections and Sign out together on the
   right; the open section highlighted. A section with more pages shows them
   on a second row, scrolling sideways on a phone rather than wrapping. */
.nav { flex-wrap: wrap; row-gap: var(--space-2); }
.nav-main { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; margin-left: auto; }
.nav-main a[aria-current="page"] { color: var(--color-accent); font-weight: 600; text-decoration: underline;
  text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-sub { position: relative; z-index: 1; display: flex; gap: var(--space-4); align-items: center; overflow-x: auto; white-space: nowrap;
  padding-top: var(--space-2); padding-bottom: var(--space-2); background: var(--color-surface);
  scrollbar-width: none; }
.nav-sub::-webkit-scrollbar { display: none; }
/* On a phone the menu scrolls sideways: fade its right edge so it's clear there's more. */
@media (max-width: 899.98px) {
  .nav-sub { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); padding-right: 40px; }
}
.nav-sub a { color: inherit; text-decoration: none; font-size: 14px; }
.nav-sub a:hover, .nav-sub a[aria-current="page"] { color: var(--color-accent); }
.nav-sub a[aria-current="page"] { font-weight: 600; }

/* The map hub: the estate map across the page, layers above, the chosen
   layer's list underneath. */
.hub { margin-top: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.hub-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.hub-head h2 { font-size: 32px; margin: 0; }
.hub-layers { display: flex; flex-wrap: wrap; gap: 4px; background: var(--color-surface); padding: 4px; border-radius: 22px; max-width: 100%; }
.hub-layers a { padding: 6px 16px; border-radius: 999px; text-decoration: none; color: var(--color-text); font-size: 14px; font-weight: 600; white-space: nowrap; }
.hub-layers a.is-on { background: var(--color-accent); color: #fff; }
.hub-section { display: flex; flex-direction: column; gap: var(--space-3); }
.hub-section + .hub-section { border-top: 1px solid var(--color-divider); padding-top: var(--space-5); margin-top: var(--space-3); }
.hub-walk { margin-left: auto; }
.hub-map .estate-map.is-big svg { height: clamp(340px, 58vh, 900px); min-height: 0; aspect-ratio: auto; }
@media (max-width: 899.98px) { .hub-map .estate-map { overflow-x: auto; } .hub-map .estate-map.is-big svg { height: auto; aspect-ratio: 4920 / 2240; min-width: 720px; } }
.hub-list { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); }
.hub-list-head { flex-wrap: wrap; gap: var(--space-2); align-items: baseline; }
.hub-list-head h3 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hub-list-head h3 .text-muted { font-size: 14px; font-weight: 400; }
.hub-clear { font-size: 13px; font-weight: 400; }
.hub-homes { columns: 3 22rem; column-gap: var(--space-6); }
.hub-homes .dir-street, .hub-homes .dir-row { break-inside: avoid; }
.hub-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--space-2); }
.hub-block { gap: 4px; text-decoration: none; color: var(--color-text); border-left: 5px solid var(--c); }
.hub-block.is-on { background: var(--color-field); outline: 2px solid var(--c); }
.hub-block-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hub-block-reps { font-size: 13px; }
.em-badge circle { fill: #b42318; stroke: #fff; stroke-width: 3px; vector-effect: non-scaling-stroke; }
.em-badge text { fill: #fff; font: 700 70px/1 var(--font-body); text-anchor: middle; }
.em-badges a:hover circle { fill: #7a1810; }

/* Street lights (map points): marker and status colours. */
.em-point circle { fill: #fff; stroke: #2f8a4f; stroke-width: 4px; vector-effect: non-scaling-stroke; }
.em-point text { fill: #1f5c35; font: 700 54px/1 var(--font-body); text-anchor: middle; }
.em-point.st-out circle { stroke: #b42318; fill: #fde8e6; } .em-point.st-out text { fill: #b42318; }
.em-point.st-flickering circle { stroke: #b26b00; fill: #fff4dc; } .em-point.st-flickering text { fill: #7a4a00; }
.em-point.st-reported circle { stroke: var(--color-accent); fill: var(--color-accent-100); } .em-point.st-reported text { fill: var(--color-accent-800); }
/* .em-point.is-on: see "Picked on the map" below. */
.em-points a:hover circle:not(.em-pick) { stroke-width: 7px; }
.pst-working { background: #dcefe2; color: #1f5c35; }
.pst-out { background: #fde8e6; color: #b42318; }
.pst-flickering { background: #fbe9cc; color: #7a4a00; }
.pst-reported { background: var(--color-accent-100); color: var(--color-accent-800); }
.light-dot { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.hub-lights { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--space-2); }
.hub-light { gap: 4px; text-decoration: none; color: var(--color-text); }
.hub-light .status { align-self: flex-start; }
.hub-light.is-on { background: var(--color-field); outline: 2px solid var(--color-accent); }
.light-card { gap: var(--space-3); }

/* The gardening map (partials/plan.njk): the estate map turned portrait. */
:root { --garden-green: #2f9e44; }
.garden-map svg { display: block; width: 100%; height: auto; aspect-ratio: 3280 / 4920; }
.gs { fill: color-mix(in srgb, var(--garden-green) 14%, transparent); stroke: var(--garden-green); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.gs.is-on { fill: color-mix(in srgb, var(--color-accent) 30%, transparent); stroke: var(--color-accent); stroke-width: 3px; }
.gs-badge circle { fill: #fff; stroke: var(--garden-green); stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.gs-badge text { fill: var(--color-text); font: 700 120px/1 var(--font-body); text-anchor: middle; }
.gs-badge.gs-sm text { font-size: 100px; }
.gs-badge.is-on circle { fill: var(--color-accent); stroke: var(--color-accent); }
.gs-badge.is-on text { fill: #fff; }

/* Budgets (hub layer, directory/budget.njk). */
:root { --budget: #e67700; }
/* Not in the chosen schedule: plain grey, not faded, since faded flats sharing a pin stack into a solid dot. */
.has-ringed .em-home:not(.is-ringed) { fill: #ced4da; }
.em-home.is-ringed { stroke: var(--budget); stroke-width: 4px; }
.has-ringed .em-home.is-ringed { opacity: 1; }   /* even with a home chosen (.has-choice fades the rest) */
.seg-links { display: flex; gap: 4px; background: var(--color-surface); padding: 4px; border-radius: 999px; }
.seg-links a { padding: 4px 14px; border-radius: 999px; text-decoration: none; color: var(--color-text); font-size: 14px; font-weight: 600; }
.seg-links a.is-on { background: var(--color-accent); color: #fff; }
.budget-card { gap: var(--space-3); }
.budget-figs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; font-variant-numeric: tabular-nums; }
/* On a schedule's own page the over/under sits with the figures, same size. */
.budget-head .budget-over { font-size: inherit; }
.budget-over { font-size: 13px; font-weight: 600; }
.budget-over.is-over { color: var(--tone-overdue); }
.budget-over.is-under { color: #1f5c35; }
.budget-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--space-4); align-items: start; }
.budget-tables .num, .budget-tables th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.budget-tables .sec td { font-weight: 600; padding-top: var(--space-3); color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.budget-tables tfoot td { font-weight: 700; border-top: 2px solid var(--color-divider); }
.budget-here-list { display: flex; flex-direction: column; }
.budget-here-row { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--color-text); border-bottom: 1px solid var(--color-divider); }
.budget-here-row:hover { background: color-mix(in srgb, var(--color-text) 5%, transparent); }
.budget-here-row.is-on { background: var(--color-field); outline: 2px solid var(--budget); }
.budget-card .budget-tables .card { background: var(--color-field); }
#budgets { scroll-margin-top: var(--space-4); }
.budget-share-line { flex-basis: 100%; font-size: 13px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
#shares { scroll-margin-top: var(--space-4); }
.budget-share-table th.num, .budget-share-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.budget-share-table .share-input { width: 7.5em; text-align: right; padding: 4px 8px; display: inline-block; }
.budget-share-paste summary { cursor: pointer; color: var(--color-accent); }
.budget-share-paste textarea { margin-top: 6px; font-family: ui-monospace, monospace; font-size: 13px; }

/* Issues (issues/*.njk, the hub's Issues layer). */
.ist-open { background: #fde8e6; color: #b42318; }
.ist-pending { background: #fbe9cc; color: #7a4a00; }
.ist-booked { background: var(--color-accent-100); color: var(--color-accent-800); }
.ist-fixed { background: #dcefe2; color: #1f5c35; }
.ist-wont_fix { background: var(--color-surface); color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.iss-report { display: flex; flex-direction: column; gap: var(--space-2); }
.iss-report-head { gap: 6px; text-decoration: none; color: var(--color-text); border-left: 5px solid var(--color-accent); }
.iss-report-title { font-size: 20px; font-weight: 700; }
.iss-file { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.iss-file a { flex: 1; min-width: 10em; word-break: break-word; }
.iss-spot-pick { cursor: crosshair; border-radius: 12px; overflow: hidden; }
.iss-spot-pick svg { display: block; width: 100%; height: auto; }
.iss-spot-pick .blk { pointer-events: none; }
.iss-spot-mark circle { fill: color-mix(in srgb, #b42318 25%, transparent); stroke: #b42318; stroke-width: 3px; vector-effect: non-scaling-stroke; }
.iss-spot-mark circle.dot { fill: #b42318; }
/* An issue at a light or a spot, on the map. */
.em-spot rect { fill: #b42318; stroke: #fff; stroke-width: 3px; vector-effect: non-scaling-stroke; }
.em-spot text { fill: #fff; font: 700 54px/1 var(--font-body); text-anchor: middle; }
.em-spots a:hover rect { fill: #7a1810; }

/* Picked on the map (a light, an issue): bigger, filled solid in its own
   colour (a light keeps its status colour), inside a blue ring (Garth,
   2026-10-31: a dark blue dot with a white edge read smaller, not picked). */
/* Doubled class: above the status colours .em-point circle gives every circle. */
.estate-map .em-pick.em-pick { fill: color-mix(in srgb, var(--color-accent) 18%, transparent); stroke: var(--color-accent); stroke-width: 5px; vector-effect: non-scaling-stroke; }
.em-point.is-on circle:not(.em-pick) { fill: #2f8a4f; stroke: #fff; stroke-width: 3px; }
.em-point.is-on.st-out circle:not(.em-pick) { fill: #b42318; }
.em-point.is-on.st-flickering circle:not(.em-pick) { fill: #b26b00; }
.em-point.is-on.st-reported circle:not(.em-pick) { fill: var(--color-accent); }
.em-point.is-on text { fill: #fff; font-size: 70px; }
.em-badge.is-on text { font-size: 86px; }
.em-spot.is-on rect { stroke-width: 4px; }
/* Hover text for map markers (app.js, data-tip). */
.map-tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 320px;
  background: var(--color-text); color: #fff; font-size: 13px; line-height: 1.4;
  padding: 8px 10px; border-radius: 8px; white-space: pre-line; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.map-tip:first-line { font-weight: 700; }
.iss-pick { gap: var(--space-3); border-left: 5px solid var(--color-accent); }
.iss-pick .act-facts { margin: 0; }
.act-row.is-on { outline: 2px solid var(--color-accent); background: var(--color-field); }
/* Walk the site (directory/walk.njk), phone first. */
.walk { max-width: 560px; display: flex; flex-direction: column; gap: var(--space-4); padding-bottom: var(--space-6); }
.walk-gps { flex-direction: row; justify-content: space-between; align-items: baseline; gap: var(--space-3); border-left: 6px solid #b26b00; }
.walk-gps.is-good { border-left-color: #2f8a4f; }
.walk-acc { font-size: 20px; font-weight: 700; }
.walk-coords { font-size: 12px; font-variant-numeric: tabular-nums; }
.walk-notes p { margin: 0 0 var(--space-2); font-size: 14px; }
.walk-big { width: 100%; min-height: 72px; font-size: 22px; border-radius: 16px; }
.walk-result { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-2); font-size: 16px; }
.walk-result:empty { display: none; }
.walk-result.is-ok { color: #1f5c35; font-weight: 600; }
.walk-result.is-bad { color: var(--tone-overdue); }
.walk-result .btn { flex: 1 1 auto; }
.budget-compare th.num, .budget-compare td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.budget-compare .sec td { font-weight: 600; padding-top: var(--space-3); color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.budget-compare tfoot td { font-weight: 700; border-top: 2px solid var(--color-divider); }
.budget-diff.is-over { color: var(--tone-overdue); font-weight: 600; }
.budget-diff.is-under { color: #1f5c35; }
.budget-linked { display: block; font-size: 12px; color: color-mix(in srgb, var(--color-text) 65%, transparent); }
.budget-linked .inline-form { display: inline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--color-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.budget-link-pick { margin-top: 4px; font-size: 13px; }
.budget-link-pick summary { cursor: pointer; color: var(--color-accent); }
.budget-link-pick form { margin-top: 6px; }
/* A light that isn't working: a badge with a struck-out bolt (out, fault
   reported), or a plain bolt (flickering), on its top-right shoulder. The
   long selectors keep the light's own circle colours off the badge. */
.estate-map .em-point .em-fault circle.em-fault-bg { fill: #b42318; stroke: #fff; stroke-width: 3px; vector-effect: non-scaling-stroke; }
.estate-map .em-point.st-flickering .em-fault circle.em-fault-bg { fill: #b26b00; }
.estate-map .em-point.st-reported .em-fault circle.em-fault-bg { fill: var(--color-accent); }
.em-fault path { fill: #fff; }
.em-fault line { stroke: #fff; stroke-width: 6px; stroke-linecap: round; }

/* People who can sign in (admin/people.njk): a searchable grid of cards. */
.people-tools { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; }
.people-tools .input { flex: 1 1 16em; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--space-3); }
.people-card { gap: 4px; }
.people-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.people-line { font-size: 13px; overflow-wrap: anywhere; }
.people-card .chip-list { margin-top: 4px; }
.people-edit { margin-top: var(--space-2); border-top: 1px solid var(--color-divider); padding-top: var(--space-2); }
.people-edit summary { cursor: pointer; color: var(--color-accent); font-size: 14px; font-weight: 600; }
.people-edit[open] { display: flex; flex-direction: column; gap: var(--space-2); }
.people-edit select { width: 100%; }
.people-notes { font-size: 13px; }
.people-notes summary { cursor: pointer; }
.people-add summary { cursor: pointer; }
.role-admin { background: var(--color-accent); color: #fff; }
.role-representative { background: var(--color-accent-100); color: var(--color-accent-800); }
.role-resident { background: var(--color-surface); color: var(--color-text); }
.people-card[hidden], .people-tools[hidden] { display: none; }

/* People who can sign in as a table (Garth, 2026-10-31: a data grid, not tiles).
   The table spans the page; Add someone, Backups and Recent changes sit below. */
.admin-grid.people-page { grid-template-columns: 1fr; }
.people-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-4); align-items: start; }
.people-table-wrap { padding: 0; overflow-x: auto; }
.people-table th, .people-table td { vertical-align: middle; }
.people-table td { font-size: 14px; }
.people-table .people-signin { overflow-wrap: anywhere; max-width: 18rem; }
.people-table .tag { margin: 1px 2px 1px 0; }
.people-table .people-edit-cell { text-align: right; white-space: nowrap; }
.sort-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.sort-btn::after { content: ' ↕'; opacity: .35; }
[aria-sort="ascending"].sort-btn::after { content: ' ↑'; opacity: 1; }
[aria-sort="descending"].sort-btn::after { content: ' ↓'; opacity: 1; }
.people-edit-row > td { background: var(--color-field); }
.people-edit-panel { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: flex-end; }
.people-edit-form { align-items: flex-end; gap: var(--space-2) var(--space-4); }
.people-edit-form select { width: auto; min-width: 11em; }
.people-email-form { align-items: flex-end; gap: var(--space-2); }
.people-email-form .input { min-width: 16em; }
.people-note { font-size: 13px; align-self: center; }
.people-row[hidden], .people-edit-row[hidden] { display: none; }
/* On a phone: each person stacks into a block, labels from data-label. */
@media (max-width: 760px) {
  .people-table thead { display: none; }
  .people-table, .people-table tbody, .people-table tr, .people-table td { display: block; width: 100%; }
  .people-table .people-row { padding: var(--space-2) var(--space-3); border-top: 1px solid var(--color-divider); }
  .people-table .people-row td { border: 0; padding: 2px 0; }
  .people-table .people-row td[data-label]::before { content: attr(data-label) ": "; color: color-mix(in srgb, var(--color-text) 60%, transparent); font-size: 12px; }
  .people-table .people-row td:first-child::before { content: none; }
  .people-table .people-edit-cell { text-align: left; padding-top: var(--space-2) !important; }
}
.seg-links a.is-on .text-muted { color: rgba(255, 255, 255, .8); }

/* A block's representatives on the map hub (assign and remove). */
.block-rep-card { gap: var(--space-2); }
.block-rep-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--color-divider); }
.block-rep-add { align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.block-rep-add select { width: auto; min-width: 16em; max-width: 100%; }
#block { scroll-margin-top: var(--space-4); }

/* Tracker themes (actions/themes.njk). */
.theme-table .num { text-align: right; width: 6em; }
.theme-rename { gap: var(--space-2); flex-wrap: nowrap; align-items: center; }
.theme-rename .input { flex: 1; min-width: 8em; }
.theme-add { align-items: flex-end; gap: var(--space-3); }

/* Following (partials/follow-button.njk). */
.act-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.follow-form { display: inline-flex; }
.follow-form .btn { white-space: nowrap; }
.follow-form .is-following { color: var(--color-accent); border-color: var(--color-accent); }
.me-follows { display: flex; flex-direction: column; }
.me-follow { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 8px 0; border-bottom: 1px solid var(--color-divider); }

/* Grids (Garth, 2026-11-02: grids, not tiles): .grid-table, sorted and
   folded by app.js data-tree-table. On a phone each row stacks into a block
   with its column names, as the People table does. */
.grid-wrap { padding: 0; overflow-x: auto; }
.pad > .grid-wrap:first-child { margin-top: var(--space-3); }
.grid-table .blk-chip-row { margin-right: 12px; }
.grid-table td { font-size: 14px; vertical-align: middle; }
.grid-table .g-muted, .grid-table .iss-ref, .grid-table .iss-when { white-space: nowrap; color: color-mix(in srgb, var(--color-text) 65%, transparent); }
.grid-table .g-main { min-width: 14rem; }
.grid-table .g-main > a { font-weight: 600; }
.grid-table .g-sub, .grid-table .iss-in { display: block; font-size: 12px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.grid-table .g-act { text-align: right; white-space: nowrap; }
.grid-table .num, .grid-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid-table .g-main .blk-chip, .grid-table .g-main .light-dot { margin-right: 4px; }
.grid-table .g-act form { display: inline-flex; }
.grid-table tr.is-folded { display: none; }
.grid-table tr.tree-parent td { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.grid-table tr.tree-group td { background: color-mix(in srgb, var(--color-text) 6%, transparent); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.grid-table tr.tree-child .g-main, .grid-table tr.iss-child .iss-title { padding-left: 2.6rem; }
.grid-table tr > td:first-child { border-left: 4px solid transparent; }
.grid-table tr.resp-reps > td:first-child { border-left-color: var(--resp-reps); }
.grid-table tr.resp-rosetree > td:first-child { border-left-color: var(--resp-rosetree); }
.grid-table tr.resp-weston > td:first-child { border-left-color: var(--resp-weston); }
.grid-table tr.resp-third > td:first-child { border-left-color: var(--resp-third); }
.grid-table .input { padding: 4px 8px; }
.tree-fold, .iss-fold { background: none; border: 0; padding: 0 8px 0 0; font: inherit; font-size: 20px; line-height: 1; vertical-align: -2px; cursor: pointer; color: var(--color-accent); }
.tree-tools, .iss-tree-tools { gap: var(--space-3); margin-bottom: var(--space-2); font-size: 14px; }
.grid-table tr.is-on td { background: var(--color-field); }
.grid-table tr.is-retired td { opacity: .6; }
.grid-table tr.is-mine > td:first-child { border-left-color: var(--color-accent); }
.grid-table tr.is-yours-to-approve > td:first-child { border-left-color: var(--color-accent); }
.tag-shown { background: color-mix(in srgb, #2f8a4f 15%, transparent); color: #1f5c35; }
.grid-table .iss-title { min-width: 16rem; }
.grid-table .iss-title a { font-weight: 600; }
.grid-table tr.iss-parent td { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.grid-table tr.iss-parent .iss-title a { font-size: 15px; }
@media (max-width: 700px) {
  .grid-table thead { display: none; }
  .grid-table, .grid-table tbody, .grid-table tr, .grid-table td { display: block; width: 100%; }
  .grid-table tr { padding: var(--space-2) var(--space-3); border-top: 1px solid var(--color-divider); border-left: 4px solid transparent; }
  .grid-table tr.is-folded, .grid-table tr[hidden] { display: none; }
  .grid-table td { border: 0; padding: 2px 0; }
  .grid-table td[data-label]::before { content: attr(data-label) ": "; color: color-mix(in srgb, var(--color-text) 60%, transparent); font-size: 12px; }
  .grid-table td.g-main::before, .grid-table td.iss-title::before, .grid-table td.iss-ref::before, .grid-table td.g-act::before { content: none; }
  .grid-table tr.tree-child, .grid-table tr.iss-child { padding-left: var(--space-5); }
  .grid-table tr.tree-child .g-main, .grid-table tr.iss-child .iss-title { padding-left: 0; }
  .grid-table tr > td:first-child { border-left: 0; }
  .grid-table .g-act { text-align: left; padding-top: var(--space-2); }
}

/* A home's budgets (partials/home-budgets.njk), in a card on the map. */
.home-budgets td, .home-budgets th { font-size: 13px; }
/* In the narrow home card the rows stay rows, even on a phone, and fit it. */
.home-budgets.is-compact { width: 100%; table-layout: auto; }
.home-budgets.is-compact .g-main { min-width: 0; width: 100%; }
.home-budgets.is-compact td, .home-budgets.is-compact th { padding-left: 6px; padding-right: 6px; }
.home-budgets.is-compact td:first-child, .home-budgets.is-compact th:first-child { padding-left: 0; border-left: 0; }
.home-budgets.is-compact thead { display: table-header-group; }
@media (max-width: 700px) {
  .home-budgets.is-compact, .home-budgets.is-compact tbody, .home-budgets.is-compact tfoot { display: table-row-group; width: auto; }
  .home-budgets.is-compact { display: table; width: 100%; }
  .home-budgets.is-compact tr { display: table-row; padding: 0; border: 0; }
  .home-budgets.is-compact td { display: table-cell; width: auto; padding: 6px 8px; }
}
.home-budgets tfoot td { border-top: 2px solid var(--color-divider); }
.homes-table .dir-dot { display: inline-block; vertical-align: middle; margin-right: 4px; }
