/* Forestbrook Community Watch - one design system for the public site and
 * the volunteer site (/watch). Decided by Jonathan Taylor, October 11,
 * 2026: "most professional, least distraction, most serious". This
 * replaces the October 10 palette (BR10 amended again; see REGISTER).
 *
 * Rules: flat surfaces, thin borders, 4px corners, no gradients, no
 * shadows (except the confirm dialog), system sans-serif type, no gold.
 * Every component is defined once here; pages only combine them.
 *
 * Colors and contrast (WCAG 2.2 AA, F43; ratios against --bg / white):
 *   --text     charcoal   #2E2E2E  12.9 / 13.6  body text, headings
 *   --muted    slate      #5E5E58   6.2 /  6.5  secondary text
 *   --primary  evergreen  #1F4D3A   9.1 /  9.6  links, buttons, top bar
 *   --danger   red        #A3261B   7.0 /  7.4  911 wording, errors, destructive
 *   --line     stone      #E6E2D9   borders and dividers (decorative)
 *   --mist     mist       #D9E8F1   information notes (background only)
 *   --saved    light blue #5C9BD1   check mark on a field just saved
 *
 * Widths: phones up to 640px. The top bar folds its links behind a Menu
 * button when they would not fit on one line (menu.js measures), and
 * always at 640px and under.
 */
/* Light (default). Every color on the site comes from these names, so
   the dark theme below only has to redefine them. */
:root {
  color-scheme: light;
  --bg: #FAF9F4;
  --surface: #FFFFFF;
  --panel: #F3F1EB;
  --field: #FFFFFF;
  --line: #E6E2D9;
  --line-strong: #C9C3B6;
  --text: #2E2E2E;
  --muted: #5E5E58;
  --primary: #1F4D3A;
  --primary-hover: #163A2B;
  --primary-tint: #E7EFEA;
  --primary-line: #B9CFC3;
  --btn: #1F4D3A;
  --btn-hover: #163A2B;
  --on-btn: #FFFFFF;
  --bar: #1F4D3A;
  --on-bar: #FFFFFF;
  --on-bar-soft: rgba(255, 255, 255, .86);
  --bar-line: rgba(255, 255, 255, .25);
  --bar-hover: rgba(255, 255, 255, .1);
  --mist: #D9E8F1;
  --mist-line: #9DBBD0;
  --mist-text: #1F3A4D;
  --saved: #5C9BD1;   /* light blue check mark on a saved field */
  --yes: #1E8A3C;     /* green y on the People list (two-step login on) */
  --vote-yes: #3A7FC1;  /* blue: approved by vote (October 20, 2026) */
  /* The colors an area can be drawn in (October 20, 2026; the same in both themes) */
  --area-red: #B03A2E; --area-orange: #C4661F; --area-olive: #7A8A1E; --area-evergreen: #1F4D3A; --area-teal: #2A7F7A; --area-blue: #3F6B8C; --area-violet: #6E4A7E;
  --lavender: #7B6FA3;  /* denied by vote */
  --orange: #C96A12;    /* a vote nobody can win: talk it over */
  --saved-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235C9BD1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E");
  --danger: #A3261B;
  --danger-hover: #861E15;
  --danger-tint: #F8E7E4;
  --danger-line: #E3B7B1;
  --btn-danger: #A3261B;
  --warn-tint: #F4EEDD;
  --warn-line: #B9A46A;
  --warn-text: #7A5600;
  --pass: #1D6B3E;
  --amber: #A15C07;        /* the "1" badge: white text 5.2:1, both themes */
  --shade: rgba(30, 34, 32, .55);
  --map-filter: none;
  --radius: 4px;
  --gap: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Dark (decided October 11, 2026): evergreen #0F3D2E bar, charcoal
   #1A1D1F page, slate #2B3238 panels, graphite #4B5563 borders, mist
   #94A3B8 family for secondary text; lighter greens for links. Used when
   the person picks Dark, or picks Device and their device is set to dark.
   Contrast on --surface: text 12.1, muted 6.6, primary 8.2, danger 6.1;
   white on buttons 5.0, on the bar 12.2. Keep the two dark blocks below
   identical (tests/flow.php checks). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1A1D1F; --surface: #23282C; --panel: #2B3238; --field: #1E2225;
    --line: #353D44; --line-strong: #4B5563;
    --text: #E6E8EA; --muted: #A2AEBB;
    --primary: #86D0A8; --primary-hover: #A9E0C2; --primary-tint: #1D3A2E; --primary-line: #2F5A45;
    --btn: #2E7D55; --btn-hover: #36905F; --on-btn: #FFFFFF;
    --bar: #0F3D2E; --on-bar: #FFFFFF; --on-bar-soft: rgba(255, 255, 255, .82); --bar-line: rgba(255, 255, 255, .2); --bar-hover: rgba(255, 255, 255, .08);
    --mist: #22313D; --mist-line: #3D5568; --mist-text: #CFE0EE;
    --saved: #8FC1EA; --yes: #5FD37A; --vote-yes: #6FAEE6; --lavender: #B7A9E0; --orange: #F0A050;
    --saved-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%238FC1EA' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E");
    --danger: #F08A7E; --danger-hover: #F5A79E; --danger-tint: #3A2321; --danger-line: #6B3530; --btn-danger: #B3362A;
    --warn-tint: #2F2A1C; --warn-line: #6B5B2E; --warn-text: #E2C46E;
    --pass: #86D0A8; --shade: rgba(0, 0, 0, .6); --map-filter: brightness(.82) contrast(1.05);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1A1D1F; --surface: #23282C; --panel: #2B3238; --field: #1E2225;
  --line: #353D44; --line-strong: #4B5563;
  --text: #E6E8EA; --muted: #A2AEBB;
  --primary: #86D0A8; --primary-hover: #A9E0C2; --primary-tint: #1D3A2E; --primary-line: #2F5A45;
  --btn: #2E7D55; --btn-hover: #36905F; --on-btn: #FFFFFF;
  --bar: #0F3D2E; --on-bar: #FFFFFF; --on-bar-soft: rgba(255, 255, 255, .82); --bar-line: rgba(255, 255, 255, .2); --bar-hover: rgba(255, 255, 255, .08);
  --mist: #22313D; --mist-line: #3D5568; --mist-text: #CFE0EE;
    --saved: #8FC1EA; --yes: #5FD37A; --vote-yes: #6FAEE6; --lavender: #B7A9E0; --orange: #F0A050;
    --saved-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%238FC1EA' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E");
  --danger: #F08A7E; --danger-hover: #F5A79E; --danger-tint: #3A2321; --danger-line: #6B3530; --btn-danger: #B3362A;
  --warn-tint: #2F2A1C; --warn-line: #6B5B2E; --warn-text: #E2C46E;
  --pass: #86D0A8; --shade: rgba(0, 0, 0, .6); --map-filter: brightness(.82) contrast(1.05);
}

/* ---- Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; font-weight: 650; letter-spacing: -0.005em; }
h1 { font-size: 1.75rem; margin: 0 0 .25rem; }
h2 { font-size: 1.125rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
h4 { font-size: .95rem; margin: .75rem 0 .25rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
strong { font-weight: 650; }
code { font: .9em var(--mono); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border: 1px solid var(--line); }
.skip:focus { left: 16px; }
.muted, .meta, .hint, .remedy { color: var(--muted); }
.meta { font-size: .9rem; }
.due { color: var(--primary); font-weight: 650; }
.urgent { color: var(--danger); font-weight: 600; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.key { overflow-wrap: anywhere; font-family: var(--mono); }
.lede { font-size: 1.05rem; color: var(--muted); }

/* ---- Top bar (both sites) ------------------------------------------- */
.topbar { background: var(--bar); color: var(--on-bar); }
.topbar-inner { max-width: 76rem; margin: 0 auto; padding: 0 16px; min-height: 56px; display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.brand { color: var(--on-bar); text-decoration: none; padding: 8px 0; white-space: nowrap; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-name { font-weight: 650; font-size: 1.25rem; line-height: 1.15; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { display: flex; align-items: center; gap: 4px; font-size: .6875rem; line-height: 1.3; font-weight: 500; letter-spacing: .02em; color: var(--on-bar-soft); }
.brand-lock { flex: none; }
.brand:hover { color: var(--on-bar); }
.topbar :focus-visible { outline-color: var(--on-bar); }
.nav { display: flex; flex-wrap: wrap; align-items: center; flex: 1; gap: 0 24px; min-width: 0; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.nav .nav-user { margin-left: auto; }
/* Bar links are always bold so nothing shifts when one becomes current; the current one is light blue (Jonathan, October 18, 2026). */
.nav a, .nav .link { color: var(--on-bar-soft); text-decoration: none; font: 650 .9rem/1 var(--font); white-space: nowrap; padding: 20px 0 17px; display: inline-block; border-bottom: 3px solid transparent; background: none; border-radius: 0; }
.nav a:hover, .nav .link:hover { color: var(--on-bar); background: none; }
.nav a[aria-current="page"] { color: var(--saved); border-bottom-color: var(--saved); }
.nav .nav-cta a { background: var(--on-bar); color: var(--bar); padding: 9px 14px; border-radius: var(--radius); border: 0; font-weight: 650; }
.nav .nav-cta a:hover { background: var(--on-bar-soft); color: var(--bar); }
.menu-toggle { display: inline-flex; align-items: center; margin-left: auto; background: transparent; color: var(--on-bar); border: 1px solid var(--on-bar-soft); padding: 7px 12px; font: 600 .95rem/1 var(--font); border-radius: var(--radius); cursor: pointer; }
.menu-toggle:hover { background: var(--bar-hover); }
.menu-toggle .bars { display: inline-block; width: 14px; height: 10px; margin-right: 8px; vertical-align: -1px;
  border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
.menu-toggle .bars::after { content: ''; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; }
.badge { display: inline-block; min-width: 1.5em; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: var(--on-bar); color: var(--bar); font: 700 .75rem/1.3 var(--font); text-align: center; vertical-align: 1px; }

/* Folded menu (October 11, 2026, after catsoftheboardwalk.org's pattern).
   The links stay in the bar while they fit on one line; menu.js measures
   that and, when they don't (or at 640px and under), adds .is-collapsed.
   The Menu button then opens a card hung from it, over a dimmed page that
   doesn't move. The card scrolls inside itself when the list is longer
   than the screen. Without JavaScript the links just wrap in the bar. */
/* Sticky (Jonathan, October 11, 2026): the bar stays at the top while the
   page scrolls. Anchor jumps stop below it (scroll-padding-top). */
.topbar { position: sticky; top: 0; z-index: 100; }
html { scroll-padding-top: 72px; }
.topbar-inner { position: relative; }
.topbar.is-collapsed .menu-toggle { display: inline-flex; align-items: center; }
.topbar.is-collapsed .nav { display: none; }
.topbar .menu-toggle[aria-expanded="true"] { background: var(--on-bar); color: var(--bar); border-color: var(--on-bar); }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) {
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
  position: absolute; top: calc(100% - 2px); right: 16px; width: 280px; max-width: calc(100vw - 32px);
  padding: 0; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}
.nav-body { display: contents; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-body { display: block; padding: 8px; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) ul { flex-direction: column; align-items: stretch; gap: 0; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-main + .nav-user { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) a, .topbar :is(.nav.open.in-collapsed, .menu-card.open) .link {
  display: block; width: 100%; text-align: left; color: var(--text); padding: 11px 12px; font: 500 1rem/1.2 var(--font);
  border: 0; border-left: 3px solid transparent; border-radius: 0; text-decoration: none; min-height: 0; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) a:hover, .topbar :is(.nav.open.in-collapsed, .menu-card.open) .link:hover { background: var(--panel); color: var(--text); }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) a[aria-current="page"] { border-left-color: var(--primary); background: var(--primary-tint); font-weight: 650; color: var(--text); }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) :focus-visible { outline-color: var(--primary); outline-offset: -2px; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-cta a { margin-top: 8px; text-align: center; border-left: 0; background: var(--btn); color: var(--on-btn); border-radius: var(--radius); font-weight: 650; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-cta a:hover { background: var(--btn-hover); color: var(--on-btn); }
.menu-card .menu-actions .nav-group.nav-cta > .group-head { margin-top: 8px; text-align: center; border-left: 0; background: var(--btn); color: var(--on-btn); border-radius: var(--radius); font-weight: 650; padding: 10px 14px; }
.menu-card .menu-actions .nav-group.nav-cta > .group-head::after { border-color: var(--on-btn); }
.menu-card .menu-actions .nav-group.nav-cta > .group-head:hover, .menu-card .menu-actions .nav-group.nav-cta.open > .group-head { background: var(--btn-hover); color: var(--on-btn); }
.menu-card .menu-actions .nav-group.open > .sub a { margin-top: 0; text-align: left; background: none; color: var(--text); font-weight: 500; }
.menu-card .menu-actions .nav-group.open > .sub a:hover { background: var(--panel); color: var(--text); }
/* The public menu card (always reachable from the menu button): links only
   when the bar is folded, then the three buttons; sign in in light green. */
.menu-card { display: none; }
.menu-card ul { list-style: none; margin: 0; padding: 0; }
.menu-card .menu-links { display: none; }
.topbar.is-collapsed .menu-card .menu-links { display: block; }
.topbar.is-collapsed .menu-card .menu-actions { margin-top: 6px; padding-top: 2px; border-top: 1px solid var(--line); }
.topbar-public .menu-toggle, .topbar-watch .menu-toggle { display: inline-flex; align-items: center; }
/* Drop-down groups in the bar (ACC, Communication, Connect): a <details>
   whose summary looks like a link; the list opens as a small card under it.
   In the Menu card (bar folded) the group is a heading over its links. */
.nav .nav-group details { position: relative; }
.nav .nav-group details:not([open]) > ul { display: none; }
.nav .nav-group summary { list-style: none; cursor: pointer; color: var(--on-bar-soft); font: 650 .9rem/1 var(--font); white-space: nowrap; padding: 20px 14px 17px 0; display: inline-block; border-bottom: 3px solid transparent; position: relative; }
.nav .nav-group summary::-webkit-details-marker { display: none; }
.nav .nav-group summary::after { content: ''; position: absolute; right: 0; top: 23px; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.nav .nav-group summary:hover, .nav .nav-group details[open] > summary { color: var(--on-bar); }
.nav .nav-group summary.is-current { color: var(--saved); border-bottom-color: var(--saved); }
.nav .nav-group details > ul { position: absolute; top: 100%; left: -10px; z-index: 101; min-width: 12rem; flex-direction: column; align-items: stretch; gap: 0;
  padding: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .22); }
.nav .nav-group details > ul a { display: block; color: var(--text); padding: 10px 12px; border: 0; border-left: 3px solid transparent; border-radius: 0; font: 500 .95rem/1.2 var(--font); }
.nav .nav-group details > ul a:hover { background: var(--panel); color: var(--text); }
.nav .nav-group details > ul a[aria-current="page"] { border-left-color: var(--primary); background: var(--primary-tint); font-weight: 650; }
.nav .nav-group details > ul .badge { background: var(--btn); color: var(--on-btn); }
/* In the Menu card a group is a row (its name, a chevron); pressing it
   slides its choices out to the left of the card (Jonathan, October 16,
   2026). On a narrow screen the card is narrower so the choices still
   slide out beside it. Without JavaScript the choices simply sit under
   the name. */
.menu-card .group-head { display: block; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent; border-radius: 0; color: var(--text); padding: 11px 12px; font: 500 1rem/1.2 var(--font); min-height: 0; cursor: pointer; position: relative; }
.menu-card .group-head::after { content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border: solid var(--muted); border-width: 1.5px 0 0 1.5px; transform: rotate(-45deg); }
.menu-card .group-head:hover, .menu-card .nav-group.open > .group-head { background: var(--panel); color: var(--text); }
.menu-card .nav-group.is-current > .group-head { border-left-color: var(--primary); font-weight: 650; }
.menu-card .nav-group > .sub { display: none; }
.menu-card .nav-group.open > .sub { display: block; position: absolute; right: calc(100% + 8px); top: 0; width: 220px; padding: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .22); animation: fb-slide-left .18s ease-out; }
@keyframes fb-slide-left { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 639px) {
  .topbar.is-collapsed .menu-card.open { width: 240px; right: 12px; }
  .menu-card .nav-group.open > .sub { width: 190px; right: calc(100% + 6px); }
}
@media (max-width: 439px) {
  .topbar.is-collapsed .menu-card.open { width: 200px; }
  .topbar.is-collapsed .menu-card.open a, .topbar.is-collapsed .menu-card.open .link, .menu-card .group-head { padding: 10px 10px; font-size: .95rem; }
  .menu-card .nav-group.open > .sub { width: 170px; }
  .menu-card .nav-group.open > .sub a { padding: 9px 10px; font-size: .95rem; }
}
html:not(.js) .menu-card .nav-group > .sub { display: block; }
html:not(.js) .menu-card .nav-group > .sub a { padding-left: 24px; }
html:not(.js) .menu-card .group-head::after { display: none; }
@media (prefers-reduced-motion: reduce) { .menu-card .nav-group.open > .sub { animation: none; } }
.menu-card .nav-group + li, .menu-card li + .nav-group { margin-top: 2px; }
/* The buttons in the Menu card, each colored for its use: My account light
   Handbook and My account evergreen (nav-cta), System mist blue
   (nav-sys), Sign out plain outline (nav-plain). */
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-sys a { margin-top: 8px; text-align: center; border: 1px solid var(--mist-line); border-left-width: 1px; background: var(--mist); color: var(--mist-text); border-radius: var(--radius); font-weight: 650; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-sys a:hover { background: var(--mist-line); color: var(--mist-text); }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-plain .link, .topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-plain a { margin-top: 8px; text-align: center; border: 1px solid var(--line-strong); border-left-width: 1px; background: var(--surface); color: var(--text); border-radius: var(--radius); font-weight: 650; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-plain .link:hover { background: var(--panel); color: var(--text); }
.menu-card .nav-plain form { display: block; }
.menu-toggle.icon-only { padding: 9px 11px; }
.menu-toggle.icon-only .bars { margin-right: 0; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-login a, .topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-login .link { margin-top: 8px; text-align: center; border: 1px solid var(--primary-line); border-left-width: 1px; background: var(--primary-tint); color: var(--primary); border-radius: var(--radius); font-weight: 650; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-login a:hover, .topbar :is(.nav.open.in-collapsed, .menu-card.open) .nav-login .link:hover { background: var(--primary-line); color: var(--primary); }
.menu-card .nav-login form { display: block; }
.menu-card .nav-login .link { display: block; width: 100%; text-decoration: none; }
.topbar :is(.nav.open.in-collapsed, .menu-card.open) .badge { background: var(--btn); color: var(--on-btn); }
/* The pointer: a small square turned on its corner, touching the button. */
.topbar :is(.nav.open.in-collapsed, .menu-card.open)::before { content: ""; position: absolute; top: -7px; right: 30px; width: 12px; height: 12px;
  background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.nav-backdrop { position: fixed; inset: 0; z-index: 99; background: var(--shade); }
.nav-backdrop[hidden] { display: none; }
@media (max-width: 360px) { .topbar :is(.nav.open.in-collapsed, .menu-card.open) { right: 12px; } }

.test-banner { margin: 0; padding: 8px 16px; background: var(--warn-tint); border-bottom: 1px solid var(--warn-line); text-align: center; font-size: .95rem; }

/* ---- Page frame ------------------------------------------------------ */
.page { max-width: 76rem; margin: 0 auto; padding: 28px 16px 40px; }
.page-public { max-width: 48rem; }
.narrow { max-width: 30rem; }
/* Sign-in pages: one centered panel. */
.page > .narrow { margin: 16px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.page > .narrow > :last-child { margin-bottom: 0; }
.page > .narrow .stack { max-width: none; }
.page > .narrow .stack > button { align-self: stretch; }
main.page.narrow { margin: 0 auto; }
@media (max-width: 640px) { .page > .narrow { padding: 20px; margin-top: 0; } }
.foot, .site-foot { max-width: 76rem; margin: 0 auto; padding: 16px 16px 32px; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); }
.site-foot { max-width: 48rem; }
.foot, .site-foot { text-align: center; }
.foot p, .site-foot p { margin: 0 0 4px; }
.foot a, .site-foot a { color: var(--muted); }
.fine-print { margin: 14px 0 0; font-size: .6875rem; line-height: 1.5; }
.foot .fine-print p, .site-foot .fine-print p { margin: 0; }
.fine-print p > span { display: inline-block; }
.fine-print p > span + span { margin-left: .4em; }
.fine-print span span { white-space: nowrap; }
/* Appearance switch (footer). */
.theme-switch { display: inline-flex; align-items: center; gap: 0; margin-top: 10px; font-size: .85rem; }
.theme-switch span { margin-right: 10px; color: var(--muted); }
.theme-switch button { min-height: 30px; padding: 4px 12px; font: 500 .85rem/1.2 var(--font); background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 0; margin-left: -1px; }
.theme-switch button:first-of-type { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.theme-switch button:last-of-type { border-radius: 0 var(--radius) var(--radius) 0; }
.theme-switch button:hover { background: var(--primary-tint); color: var(--text); border-color: var(--line-strong); }
.theme-switch button[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); border-color: var(--btn); position: relative; }

/* Page heading with optional actions on the right. */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 0 0 24px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 20rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { display: inline-block; margin: 0 0 12px; font-size: .9rem; text-decoration: none; }
.back:hover { text-decoration: underline; }
.page > h1 { margin-bottom: .5rem; }
.page > h1 + p:not([class]), .page > .back + h1 + p:not([class]) { color: var(--muted); margin-bottom: 20px; }

/* Stat tiles (dashboard). */
.stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; min-width: 9rem; }
.stat dt, .stat .stat-label { font-size: .8rem; color: var(--muted); margin: 0; }
.stat dd, .stat .stat-value { margin: 2px 0 0; font-size: 1.5rem; font-weight: 650; line-height: 1.2; }
.stat .stat-small { font-size: .95rem; font-weight: 500; }

/* ---- Cards ----------------------------------------------------------- */
.block, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 var(--gap); min-width: 0; }
.block > :last-child, .card > :last-child { margin-bottom: 0; }
.block h2, .card h2 { font-size: 1.05rem; }
.block h3 { margin-top: 1rem; }
.card-panel { background: var(--panel); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--gap); margin: 0 0 var(--gap); }
.cards > .block, .cards > .card { margin: 0; display: flex; flex-direction: column; }
.cards > .block > .more:last-child, .cards > .card > .more:last-child { margin-top: auto; padding-top: 8px; }
.cards .wide { grid-column: span 2; }
/* A card with something newer than your last look: a pale gray-blue
   outline and a hint of that color behind it, breathing slowly (Jonathan,
   October 16, 2026). Opening the section clears it. */
.cards > .block.fresh { outline: 3px solid var(--mist-line); outline-offset: -1px; border-color: var(--mist-line); background: var(--mist); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mist-line) 35%, transparent); animation: fb-fresh 2s ease-in-out infinite; }
.whats-new { display: block; font-size: .875rem; font-weight: 600; color: var(--mist-text); margin-top: 2px; }
@keyframes fb-fresh {
  0%, 100% { outline-color: var(--mist-line); background: var(--mist); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mist-line) 35%, transparent); }
  50% { outline-color: color-mix(in srgb, var(--mist-line) 25%, transparent); background: var(--surface); box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .cards > .block.fresh { animation: none; } }
/* Tiles (October 20, 2026): the whole card opens its main page; the links inside keep theirs. */
.cards > .tile { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.cards > .tile:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.cards > .tile:hover > .more, .cards > .tile:hover .more-row a:first-child { text-decoration: underline; }
.cards > .tile > .more, .cards > .tile > .more-row { display: inline-block; align-self: flex-start; margin-left: -8px; padding: 6px 8px; border: 1px solid transparent; border-radius: var(--radius); }
.cards > .tile > .more:hover, .cards > .tile > .more-row:hover { border-color: var(--line-strong); background: var(--panel); }
/* A menu link with something new in its tab pulses light blue (October 18, 2026). */
.nav .nav-group details > ul a.fresh-link, .menu-card .sub a.fresh-link { color: var(--saved); font-weight: 650; animation: fb-fresh-link 2s ease-in-out infinite; }
@keyframes fb-fresh-link { 0%, 100% { color: var(--saved); } 50% { color: var(--text); } }
@media (prefers-reduced-motion: reduce) { .nav .nav-group details > ul a.fresh-link, .menu-card .sub a.fresh-link { animation: none; } }
@media (max-width: 640px) { .cards .wide { grid-column: auto; } }
.more { font-weight: 600; text-decoration: none; }
.more::after { content: " \2192"; }
.more:hover { text-decoration: underline; }
.more-row { margin: 0; }
.cards > .block > .more-row:last-child { margin-top: auto; padding-top: 8px; }
details.block > summary { margin: 0; }

/* ---- Buttons --------------------------------------------------------- */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .95rem/1.2 var(--font);
  padding: 10px 16px; min-height: 40px; border-radius: var(--radius); border: 1px solid var(--btn);
  background: var(--btn); color: var(--on-btn); cursor: pointer; text-decoration: none; text-align: center; }
button:not(:disabled):hover, .button:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--on-btn); }
button.secondary, .button.secondary { background: var(--surface); color: var(--primary); border-color: var(--line-strong); }
button.light, .button.light { background: var(--saved); border-color: var(--saved); color: #fff; }
button.light:not(:disabled):hover, .button.light:hover { background: var(--vote-yes); border-color: var(--vote-yes); color: #fff; }
button.secondary:not(:disabled):hover, .button.secondary:hover { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
button.danger, .button.danger { background: var(--btn-danger); border-color: var(--btn-danger); color: #fff; }
button.danger:not(:disabled):hover, .button.danger:hover { filter: brightness(1.1); }
button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--primary); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
button.link:not(:disabled):hover { background: none; color: var(--primary-hover); }
button.small, .button.small { padding: 6px 10px; min-height: 32px; font-size: .875rem; }
button:disabled, input[type=submit]:disabled { opacity: .55; cursor: default; }
form.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions + section.block, .actions + p, .actions + .danger-zone { margin-top: var(--gap); }

/* ---- Forms ----------------------------------------------------------- */
label { font-weight: 600; font-size: .95rem; }
.stack { display: flex; flex-direction: column; gap: 6px; max-width: 44rem; }
.stack > label:not(.check) { margin-top: 8px; }
.stack > button, .stack > .actions { align-self: flex-start; margin-top: 10px; }
.stack + p, form + p { margin-top: 16px; }
.form { max-width: 44rem; }
.form label { display: block; margin: 14px 0 4px; }
.form > button { margin-top: 8px; }
label.check, .form label.check { display: block; position: relative; padding-left: 28px; font-weight: 400; margin: 8px 0; }
label.check > input { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; margin: 0; accent-color: var(--btn); }
/* A single choice looks like a square box, not a round radio (Jonathan, October 20, 2026): filled when chosen, with a white inset. */
input[type=radio] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); vertical-align: -3px; cursor: pointer; }
input[type=radio]:checked { background: var(--btn); border-color: var(--btn); box-shadow: inset 0 0 0 3px var(--surface); }
input[type=radio]:focus-visible { outline: 2px solid var(--saved); outline-offset: 2px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select, textarea {
  font: inherit; font-size: 1rem; width: 100%; padding: 9px 11px; min-height: 42px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--field); color: var(--text); }
textarea { min-height: 6rem; line-height: 1.5; }
select { width: auto; max-width: 100%; }
.stack select, .form select { width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 2px solid var(--primary-line); outline-offset: 0; }
/* Links and buttons show a focus ring only for the keyboard (Tab), never
   after a click or when a script moves focus for a screen reader. */
a:focus:not(:focus-visible), button:focus:not(:focus-visible), [data-quiet-focus]:focus { outline: none; box-shadow: none; }
input[type=file] { font: inherit; font-size: .95rem; max-width: 100%; }
/* Photo thumbnails on a complaint or request, and the overlay a click opens. */
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs img, a.thumb img { width: 140px; height: 105px; object-fit: cover; display: block; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); }
a.thumb { display: inline-block; vertical-align: middle; margin: 4px 8px 4px 0; }
.fb-lightbox { position: fixed; inset: 0; z-index: 1300; background: var(--shade); display: flex; align-items: center; justify-content: center; padding: 24px; }
.fb-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); background: var(--surface); }
.fb-lightbox-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; background: var(--surface); color: var(--text); border: 0; font: 600 1.5rem/1 var(--font); }
.fb-lightbox-x:hover { background: var(--panel); color: var(--text); }
/* The x on a note or step in a complaint's history (removes it). */
.entry-remove { display: inline-block; margin-left: 6px; vertical-align: middle; }
.entry-x { min-height: 0; width: 22px; height: 22px; padding: 0; border-radius: 50%; background: var(--surface); color: var(--muted); border: 1px solid var(--line-strong); font: 600 .95rem/1 var(--font); }
.entry-x:hover { background: var(--btn-danger); border-color: var(--btn-danger); color: #fff; }
/* The photo picker (photos.js): thumbnails of what's chosen, each with an
   x to take it out; a PDF shows as a small card with its name. */
.photo-picks { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.photo-picks[hidden] { display: none; }
.photo-pick { position: relative; width: 112px; height: 84px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.photo-pick img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-pick-doc { width: auto; max-width: 16rem; min-width: 112px; display: flex; align-items: center; padding: 0 36px 0 12px; }
.photo-pick-name { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-pick-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); font: 600 1rem/1 var(--font); }
.photo-pick-x:hover { background: var(--btn-danger); border-color: var(--btn-danger); color: #fff; }
/* Saved: a light blue check in the field's top right corner (ui.js adds
   "saved" after a save, until the field changes again). A radio or checkbox
   group shows it inside its box; a lone checkbox on its label. */
input.saved:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), textarea.saved, select.saved {
  background-image: var(--saved-check); background-repeat: no-repeat; background-size: 16px 16px; background-position: right 10px top 12px; padding-right: 34px; }
select.saved { background-position: right 30px center; }
fieldset.saved, label.check.saved { position: relative; }
fieldset.saved { padding-right: 40px; }
fieldset.saved::after, label.check.saved::after { content: ''; position: absolute; top: 10px; right: 10px; width: 16px; height: 16px; background: var(--saved-check) no-repeat center / 16px 16px; }
label.check.saved::after { top: 2px; right: 0; }
fieldset.saved > legend { padding-right: 24px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0 0; padding: 12px 16px 14px; min-width: 0; background: var(--surface); }
legend { font-weight: 650; padding: 0 6px; }
.form fieldset { margin: 0 0 16px; }
.req, .opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.hint { display: block; font-size: .875rem; margin: 0 0 4px; }
.hint.problem { color: var(--danger); font-weight: 600; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { min-width: 0; }
.mail-actions { margin-top: 6px; align-items: center; gap: 8px; }
.row .stack { flex: 1 1 10rem; }
.row select { flex: 1 1 12rem; }
.row-nowrap { flex-wrap: nowrap; align-items: stretch; max-width: 44rem; }
.row-nowrap > select, .row-nowrap > input { flex: 1 1 auto; min-width: 0; width: auto; }
.row-nowrap > button { flex: none; }
.form .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form .pair > div { min-width: 0; }
/* Date and time: never wider than their space; on phones one per line
   (iPhone boxes overlapped side by side, October 11, 2026). */
input[type=date], input[type=time] { min-width: 0; max-width: 100%; }
@media (max-width: 640px) {
  .form .pair { grid-template-columns: 1fr; }
  .row:has(input[type=date], input[type=time]) { flex-direction: column; align-items: stretch; }
  .row:has(input[type=date], input[type=time]) > * { flex: none; }
}
@supports (-webkit-touch-callout: none) {
  input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; text-align: left; }
}

/* ---- Messages -------------------------------------------------------- */
.flash, .note, .error, .archived, .update-note { border: 1px solid; border-left-width: 4px; border-radius: var(--radius); padding: 10px 14px; margin: 0 0 var(--gap); }
.flash { background: var(--primary-tint); border-color: var(--primary-line); border-left-color: var(--primary); }
.flash-blue { background: var(--mist); border-color: var(--mist-line); border-left-color: var(--saved); color: var(--mist-text); }
.note, .archived, .update-note { background: var(--mist); border-color: var(--mist-line); border-left-color: var(--mist-text); color: var(--mist-text); }
.note a { color: var(--mist-text); }
.note a.button { color: #fff; }
.pw-field { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; flex: 1 1 14rem; }   /* the mailbox starting password inside the directions sheet (October 18, 2026) */   /* the text-the-invitation button inside a note (October 18, 2026) */
.error { background: var(--danger-tint); border-color: var(--danger-line); border-left-color: var(--danger); }
.error p, .note p { margin: 4px 0; }
.note > :last-child, .error > :last-child { margin-bottom: 0; }
.preview-banner { background: var(--bar); color: var(--on-bar); padding: 10px 14px; border-radius: var(--radius); }
.preview-banner a { color: var(--on-bar); }
.emergency, p.urgent { border: 1px solid var(--danger); background: var(--danger-tint); padding: 10px 16px; border-radius: var(--radius); color: var(--danger); font-weight: 600; margin: 0 0 var(--gap); text-align: center; }
p.urgent strong { font-weight: 600; }
.urgent a { color: var(--danger); }
details.note > summary { color: var(--mist-text); }

/* ---- Lists ----------------------------------------------------------- */
.plain, .people, .notice-list, .timeline { list-style: none; padding: 0; margin: 0; }
.plain > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain > li:first-child { padding-top: 0; }
.plain > li:last-child { border-bottom: 0; padding-bottom: 0; }
.people > li, .notice-list > li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.people > li:first-child, .notice-list > li:first-child { padding-top: 0; }
.people > li:last-child, .notice-list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.people > li > a:first-child { font-weight: 600; }
.people li.mine-shift { border-left: 3px solid var(--primary); padding-left: 12px; }
.history li { font-size: .95rem; }
.plain.cols { columns: 2; column-gap: 32px; margin-bottom: 12px; }
.plain.cols > li { break-inside: avoid; padding: 6px 0; }
.plain.cols > li:first-child { padding-top: 6px; }
.plain.cols > li:last-child { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
@media (max-width: 640px) { .plain.cols { columns: 1; } }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: 14px; }
.quick { list-style: none; padding: 0; margin: 0; }
.quick li { border-bottom: 1px solid var(--line); }
.quick li:last-child { border-bottom: 0; }
.quick a { display: block; padding: 8px 0; text-decoration: none; font-weight: 500; }
.quick a::after { content: " \2192"; }
.quick a:hover { text-decoration: underline; }

/* Facts: label / value pairs. */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 12px; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 8px; } }

/* ---- Tabs (filters) -------------------------------------------------- */
.filters, .tabs { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0 0 var(--gap); border-bottom: 1px solid var(--line); }
.filters a, .filters strong, .tabs a, .tabs strong { display: inline-block; padding: 8px 0 9px; margin-bottom: -1px; border-bottom: 2px solid transparent; text-decoration: none; font-size: .95rem; font-weight: 500; }
.filters strong, .tabs strong, .tabs a[aria-current="page"] { border-bottom-color: var(--primary); color: var(--text); font-weight: 650; }
.filters a:hover, .tabs a:hover { border-bottom-color: var(--line-strong); }

/* ---- Status labels --------------------------------------------------- */
.pill, .state, .evidence { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.state-new, .state-received, .pill-new, .pill-pending { background: var(--danger-tint); color: var(--danger); border-color: var(--danger-line); }
.state-assigned, .state-info_needed, .state-reviewing, .state-awaiting_info, .state-validated, .state-forwarded, .state-response_received, .state-verified, .state-warned, .state-fining, .pill-open, .pill-confirmed { background: var(--primary-tint); color: var(--primary); border-color: var(--primary-line); }
.state-closed, .state-unverified, .state-dismissed, .state-not_forwarded, .state-not_acc, .state-resolved, .state-no_violation, .pill-closed, .pill-unsubscribed { background: var(--panel); color: var(--muted); }
.pill-info { background: var(--mist); color: var(--mist-text); border-color: var(--mist-line); }
/* Status pill on the People list: the status word plus y/n for two-step
   login, green y / red n (October 17, 2026). */
.pill-mfa { margin: 6px 10px 0 0; }
.pill-mfa .status-word { color: var(--saved); font-weight: 600; }
.mfa-yn { font-weight: 700; }
.mfa-y { color: var(--yes); }
.mfa-n { color: var(--danger); }
.people-table td.lead { min-width: 12rem; }
/* Positions held, under a name on the People list (October 17, 2026). */
.role-line { display: block; font-size: .85rem; font-weight: 400; color: var(--saved); line-height: 1.3; }
td.email { overflow-wrap: anywhere; min-width: 9rem; }
td.perms { min-width: 16rem; }
.evidence { margin: 0 0 12px; background: var(--primary-tint); color: var(--primary); border-color: var(--primary-line); }
.evidence-unverified { background: var(--panel); color: var(--muted); border-color: var(--line); }
.evidence-corrected { background: var(--danger-tint); color: var(--danger); border-color: var(--danger-line); }
.status-line { margin: 6px 0 var(--gap); color: var(--muted); }
.st-pass { color: var(--pass); font-weight: 700; } .st-fail { color: var(--danger); font-weight: 700; }
.st-warn { color: var(--warn-text); font-weight: 700; } .st-info { color: var(--muted); }
.remedy { display: block; font-size: .875rem; }

/* ---- Tables (stack into rows on phones) ------------------------------ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--panel); font-size: .8rem; font-weight: 650; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td { overflow-wrap: break-word; }
.block > .table-wrap:first-child, .block > table:first-child { margin-top: -4px; }
.table-card { padding: 0; overflow: hidden; }
.table-card > .table-wrap, .table-card > table { margin: 0; }
.table-card th:first-child, .table-card td:first-child { padding-left: 20px; }
.table-card th:last-child, .table-card td:last-child { padding-right: 20px; }
.table-card .empty { padding: 20px; margin: 0; color: var(--muted); }
.table-card > h2 { padding: 18px 20px 12px; margin: 0; }
.table-card > p:not(.empty) { padding: 0 20px; }
td.nowrap, th.nowrap { white-space: nowrap; }
td a.row-link { font-weight: 600; }
td.lead { min-width: 9rem; }
@media (max-width: 640px) {
  table.stack-table, table.stack-table tbody, table.stack-table tr, table.stack-table td { display: block; width: 100%; }
  table.stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  table.stack-table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  table.stack-table tr:last-child { border-bottom: 0; }
  table.stack-table td { border: 0; padding: 1px 0 !important; }
  table.stack-table td[data-label]:not(.lead)::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; }
  table.stack-table td.lp[data-label]::before { content: attr(data-label) " "; }
  .handbook table.stack-table td.lead { font-weight: 600; }
  table.stack-table td.lead { font-size: 1rem; padding-bottom: 3px !important; }
  table.stack-table td.minor { display: none; }
  .block:not(.table-card) table.stack-table tr { padding-left: 0; padding-right: 0; }
}

/* ---- Maps, photos, chat, timeline ------------------------------------ */
.leaflet-tile-pane { filter: var(--map-filter); }
.map { position: relative; z-index: 0; isolation: isolate; height: 320px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0 12px; background: var(--panel); }
.photos, .notice-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0 0 12px; }
.photos img, .notice-photos img, .photo-pick img { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.photo-pick { display: flex; flex-direction: column; gap: 4px; }
.qr { max-width: 220px; background: #fff; /* stays white so phones can scan it */ padding: 8px; margin: 8px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.qr svg { display: block; width: 100%; height: auto; }
.codes { columns: 2; list-style: none; padding: 0; font: 1.05rem var(--mono); }
.codes li { padding: 4px 0; }
.timeline li { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 0 0 14px; }
.timeline li.kind-outbound { border-left-color: var(--primary); }
.timeline li.kind-inbound { border-left-color: var(--mist-line); }
.timeline p { margin: 0 0 4px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--primary); padding: 6px 0; }
.inline-details > summary { display: inline; font-weight: 500; text-decoration: underline; padding: 0; }
.chat-list { list-style: none; padding: 0; margin: 0 0 8px; }
.chat-msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 8px; overflow-wrap: anywhere; }
.chat-msg.mine { border-left: 3px solid var(--primary); }
.chat-meta { margin: 0 0 2px; font-size: .875rem; }
.chat-body { margin: 0; }
.chat-removed { margin: 0; font-style: italic; color: var(--muted); }
.chat-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: 4px; font-size: .9rem; }
.chat-form { margin-bottom: 4px; }
/* Send floats inside the message box, lower right, a little off the edges (Jonathan, October 20, 2026). */
.chat-compose { position: relative; }
.chat-compose textarea { display: block; width: 100%; padding-bottom: 3.2rem; }
.chat-compose .chat-send { position: absolute; right: 10px; bottom: 10px; margin: 0; }
.chat [data-chat-status] { margin: 0 0 8px; min-height: 1.2em; }
.email-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: .9rem/1.55 var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }

/* ---- Police numbers -------------------------------------------------- */
.police { border-top: 1px solid var(--line); margin: 32px 0 8px; padding-top: 20px; }
.police h2 { font-size: 1.05rem; }
.police a, .police-line a { font-weight: 600; }
.police-line { margin: 0 0 var(--gap); font-size: .95rem; text-align: center; }
.not-police { text-align: center; }
.danger-zone { border-color: var(--danger-line); }
/* The email to the POA, shown before sending. */
.poa-preview { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 12px 14px; font-size: .9rem; }
.poa-preview .email-head { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 10px; }
.poa-preview p:last-child { margin-bottom: 0; }
/* Overlay forms (<dialog class="sheet">; ui.js). */
dialog.sheet { width: min(40rem, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 10px 28px rgba(0, 0, 0, .22); }
dialog.sheet::backdrop { background: var(--shade); }
dialog.sheet-small { width: min(26rem, calc(100% - 32px)); }
.addr-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.addr-line form.inline { display: inline; }
.pw-box { display: inline-block; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); font-size: 1.05rem; user-select: all; }
.danger-link { color: var(--danger); }
/* A form that can't be used yet (the next notice before the 30 days are
   up): a translucent cover with the words that say when. */
.masked { position: relative; }
.masked > * { pointer-events: none; opacity: .45; filter: grayscale(.4); }
.masked::after { content: attr(data-masked); position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; text-align: center; padding: 48px 24px; font-size: 1.1rem; font-weight: 650; color: var(--text); background: color-mix(in srgb, var(--surface) 55%, transparent); border-radius: var(--radius); }
/* Positions page (October 16, 2026): each position is a collapsible row.
   The address and holder on one line, the title under it; open it for
   the description and the one-line "who holds it" form. */
.pos-list { border-top: 1px solid var(--line); }
details.pos { border-bottom: 1px solid var(--line); }
details.pos > summary { display: flex; flex-direction: column; gap: 2px; padding: 12px 28px 12px 0; position: relative; font-weight: 400; color: var(--text); }
details.pos > summary::-webkit-details-marker { display: none; }
details.pos > summary { list-style: none; }
/* The folder arrow (October 18, 2026, global): closed points right, open points down. */
details.pos > summary::after { content: ''; position: absolute; right: 10px; top: 19px; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; }
details.pos[open] > summary::after { transform: rotate(45deg); top: 16px; }
details:not(.pos):not(.nav-group details):not(.inline-details) > summary { list-style: none; position: relative; padding-right: 26px; }
details:not(.pos):not(.nav-group details):not(.inline-details) > summary::-webkit-details-marker { display: none; }
details:not(.pos):not(.nav-group details):not(.inline-details) > summary::after { content: ''; position: absolute; right: 8px; top: .95em; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-50%) rotate(-45deg); transition: transform .15s; }
details:not(.pos):not(.nav-group details):not(.inline-details)[open] > summary::after { transform: translateY(-70%) rotate(45deg); }
.pos-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pos-head strong { font-weight: 650; }
.pos-holder { color: var(--saved); font-weight: 600; }
.pos-title { font-weight: 400; }
.pos-body { padding: 0 0 14px; }
.pos-body > p { margin: 0 0 10px; }
.pick-line { align-items: center; gap: 8px; margin-top: 4px; }
.pick-line select { flex: 0 1 20rem; }
/* A person's permissions: six folders in two columns (October 16, 2026). */
.perm-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
.perm-col { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 640px) { .perm-groups { grid-template-columns: 1fr; gap: 12px; } }
.perm-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 12px; }
.perm-group > summary { padding: 10px 0; }
.perm-group > summary .muted { font-weight: 400; font-size: .85rem; margin-left: 6px; }
.perm-list { border-top: 1px solid var(--line); padding: 4px 0 8px; }
.perm-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; }
.perm-name { font-weight: 600; flex: 1 1 10rem; }
.perm-list form.inline button { padding: 4px 10px; font-size: .85rem; }
/* The history panel shows about ten entries and scrolls for the rest. */
.history-panel { max-height: 24.5rem; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; }
.history-panel > li { padding: 8px 0; line-height: 1.5; }
.history-panel > li:first-child { padding-top: 8px; }
.history-panel > li:last-child { padding-bottom: 8px; }
/* The patrol tabs (October 16, 2026): History, Log, Shifts, Areas, Report; the ACC tabs reuse the style. */
.patrol-tabs { gap: 0 28px; margin-top: 0; position: relative; }
.public-tabs { margin-bottom: 18px; }
/* The section head sticks under the top bar while the page scrolls (Jonathan, October 18, 2026); same colors as the page. */
/* Its resting place is its stuck place (Jonathan, October 18, 2026): the
   page's top padding is taken up, so the head never moves when the page
   starts to scroll. */
.section-head { position: sticky; top: var(--bar-h, 56px); z-index: 90; background: var(--bg); margin: -28px -16px 20px; padding: 10px 16px 0; }
.section-head .page-head { margin: 0 0 2px; align-items: center; }
.section-head .page-head h1 { font-size: 1.42rem; line-height: 1.2; font-weight: 400; }   /* the tab name after "Communication:" is normal weight (Jonathan, October 18, 2026); the section stays bold */
.section-head .page-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.who { margin: 0; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.who strong { color: var(--text); font-weight: 650; }
@media (max-width: 640px) { .section-head { margin: -20px -16px 16px; } .who { display: none; } .section-head .page-actions { align-items: flex-start; } }
/* A button on the tab row, at the right, out of the flow (the do-not-send list). */
.has-tab-actions { padding-right: 11rem; }
.tab-actions { position: absolute; right: 0; top: 2px; z-index: 2; }
.tab-actions .button { padding: 6px 12px; min-height: 32px; font-size: .875rem; }
.tab-text-link { font-size: .875rem; line-height: 32px; white-space: nowrap; }   /* "Patrol chat (n)" at the right of the Connect tabs (October 19, 2026) */
@media (max-width: 640px) { .has-tab-actions { padding-right: 0; padding-bottom: 40px; } .tab-actions { top: auto; bottom: 4px; right: auto; left: 0; } }
.patrol-tabs a { font-size: .97rem; padding: 10px 0 11px; }
/* The owner's name on a complaint: one line, field and Save. */
.owner-line { align-items: center; gap: 8px; margin: 0; }
.owner-line input, .owner-line select { flex: 0 1 22rem; width: auto; }
/* The Users tab (October 17, 2026): each account is a folder; the summary
   is the name (positions under it) and, to the right or wrapped under it
   on a phone, the email, the status pill, the last sign-in and a reset link. */
/* The Users tab in rank order (October 18, 2026): an unfilled position is a plain line; the volunteers follow under a light blue label. */
.user-vacant { padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-vacant .user-line { padding: 0 28px 0 0; }
.user-group-head { padding: 14px 12px 6px; border-bottom: 1px solid var(--line); }
.user-group-head .sec-label { color: var(--saved); font-weight: 650; font-size: 1.05rem; }
.user-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 16px; }
/* The row's link to the person's page in the full-screen overlay (October 19, 2026). */
.user-row { position: relative; border-bottom: 1px solid var(--line); }
.user-row:not(.user-vacant) > .user-line { padding: 12px 28px 12px 0; align-items: center; }
.user-row:not(.user-vacant) > .user-line::after { content: ''; position: absolute; right: 10px; top: 19px; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.user-open { display: flex; flex: 1 1 auto; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; color: inherit; text-decoration: none; min-width: 0; }
.user-row:not(.user-vacant):hover { background: var(--panel); }
.user-open .user-meta { margin-left: auto; }
.user-name { display: flex; flex-direction: column; min-width: 10rem; }
.user-name strong { font-weight: 650; }
.user-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; max-width: 100%; }
.summary-act button.link { font-size: .9rem; }
.history-fold > summary { padding: 0; }
.history-fold[open] > summary { margin-bottom: 10px; }
.user-body { padding-top: 8px; }
.user-body .block { margin-top: 12px; }
.pos-body .map { height: 300px; }
/* The section's name in light blue before each page title (October 17, 2026): "ACC: Letters". */
.sec { color: var(--saved); font-weight: 650; }
h1 .sec { font-size: 1.067em; }   /* the bold section a point larger than the tab name after it (Jonathan, October 18, 2026) */
.sec::after { content: ':'; }
/* A note with a button at its right (Positions: Open mailbox). */
.note-with-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.note-with-action > p { margin: 0; flex: 1 1 auto; }
.note-with-action > .button { flex: none; color: var(--on-btn); }
.note-with-action > .button:hover { color: var(--on-btn); }
@media (max-width: 640px) { .note-with-action { flex-direction: column; align-items: stretch; } }
/* A mailed letter: a big light blue check (the Letters tab, October 17, 2026). */
.mailed-check { display: inline-block; font-size: 2.4rem; line-height: 1; color: var(--saved); font-weight: 700; vertical-align: middle; margin-right: 6px; }
.mailed-when { color: var(--muted); font-size: .9rem; }
@media (max-width: 639px) {
  table.stack-table tr.row-mailed { position: relative; padding-right: 56px; }
  tr.row-mailed .mailed-check { position: absolute; top: 8px; right: 12px; font-size: 2.6rem; }
}
.recall-link { font-size: .85rem; }
/* The fine, when the 30 days are up (Jonathan, October 18, 2026): red, seen at once. */
.fine-fold > summary { color: var(--danger); }
/* A letter written and emailed to the office (October 18, 2026): the big light blue check and the words beside it. */
.told { display: flex; gap: 14px; align-items: flex-start; background: var(--mist); color: var(--mist-text); border: 1px solid var(--mist-line); border-radius: 4px; padding: 12px 14px; margin: 0 0 var(--gap); }
.told > div { flex: 1 1 auto; min-width: 0; }
.told p { margin: 0 0 6px; }
.told .muted { color: var(--mist-text); opacity: .8; }
.told-check { display: inline-block; font-size: 2.6rem; line-height: 1; color: var(--saved); font-weight: 700; flex: none; }
.told-check.small { font-size: 1.3rem; vertical-align: middle; margin-right: 2px; }
/* Complaints, requests, concerns, patrols and neighbors as expandable rows (October 18, 2026): the summary is the old table row; the body is the record. */
.crow-head, .crow-line { display: grid; grid-template-columns: 9.5rem 5rem minmax(0, 1fr) 5.5rem 13rem; gap: 10px; align-items: center; }
.rrow-list .crow-head, .rrow-list .crow-line { grid-template-columns: 9.5rem 5rem minmax(0, 1.4fr) minmax(0, 1fr) 11rem; }
.krow-list .crow-head, .krow-list .crow-line { grid-template-columns: minmax(0, 1.2fr) 7.5rem minmax(0, 1fr) 8rem 9.5rem; }
.prow-list .crow-head, .prow-list .crow-line { grid-template-columns: 15rem minmax(0, 1fr) minmax(0, 1fr) 14rem; }
.prow-list .crow-status { white-space: normal; }
/* A row that is a link to the full-screen overlay (Patrols > History, October 19, 2026): laid out like a folder row, with an arrow pointing right. */
a.crow-link { display: block; padding: 12px 28px 12px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; position: relative; }
a.crow-link:hover { background: var(--panel); }
a.crow-link::after { content: ''; position: absolute; right: 10px; top: 19px; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.nrow-list .crow-head, .nrow-list .crow-line { grid-template-columns: minmax(0, 1.4fr) 7rem 9rem 6.5rem; }
.rrow-list .crow-from, .krow-list .crow-from, .prow-list .crow-from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions-line { margin: 8px 0 0; }
.crow-head { padding: 8px 28px 6px 0; font-size: .8rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.crow-head > span { cursor: pointer; user-select: none; }
.crow-head > span:hover { color: var(--text); }
.crow-head > span[data-dir]::after { content: ' \25B4'; } .crow-head > span[data-dir="desc"]::after { content: ' \25BE'; }
.told-wait { background: var(--panel); border-color: var(--line); color: var(--text); }
.told-wait .told-check { color: var(--muted); font-size: 2rem; }
.crow > summary { padding-top: 10px; padding-bottom: 10px; }
.crow-ref { font-weight: 650; }
.crow-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.crow-body { padding-top: 8px; }
.crow-body .block { margin-left: 0; margin-right: 0; }
.lazy-wait { padding: 8px 0; }
@media (max-width: 820px) {
  .crow-head { display: none; }
  .crow-line { grid-template-columns: 1fr auto; grid-template-areas: "ref date" "addr addr" "status from"; gap: 2px 10px; }
  .crow-ref { grid-area: ref; } .crow-date { grid-area: date; font-size: .85rem; color: var(--muted); }
  .crow-addr { grid-area: addr; white-space: normal; } .crow-from { grid-area: from; font-size: .85rem; white-space: normal; } .crow-status { grid-area: status; white-space: normal; }
  .prow-list .crow-line { grid-template-areas: "ref ref" "addr addr" "from status"; }
  .nrow-list .crow-line { grid-template-areas: "ref ref" "addr status" "from from"; }
  .crow-list .crow-head, .crow-list .crow-line { grid-template-columns: 1fr auto; }
}
/* Folders on the Notices, Alerts and Updates tabs (October 17, 2026); all folders start closed. */
.folder-list { margin-bottom: var(--gap); }
/* A thick rule between the groups on the Templates tab (October 18, 2026). */
.folder-list.thick-rule { border-top: 3px solid var(--line-strong); margin-top: calc(var(--gap) * -1 + 12px); }
.folder > summary .pos-head strong { font-size: 1.05rem; }
.folder .pos-body { padding-top: 4px; }
.show-pick { margin: 0 0 var(--gap); }
.show-pick select { flex: 0 1 18rem; }
/* The letters page: the date and its button on one line. */
.date-act { align-items: center; gap: 8px; }
form.date-act input[type=date]:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]) { width: 8.75rem; flex: none; padding-left: 8px; padding-right: 4px; }
.row-actions .date-act { flex-wrap: wrap; gap: 8px; }
.row-actions .void-link { margin-top: 6px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; }
/* Volunteers' photos: small circles beside names (Forestbrook\Avatars). */
.avatar { display: inline-block; border-radius: 50%; object-fit: cover; vertical-align: middle; background: var(--panel); border: 1px solid var(--line); flex: none; }
.avatar-24 { width: 24px; height: 24px; }
.avatar-28 { width: 28px; height: 28px; }
.avatar-96 { width: 96px; height: 96px; }
.with-avatar { display: flex; align-items: center; gap: 8px; }
.danger-zone > summary { color: var(--danger); }
.hb-public { display: inline-block; margin: -4px 0 10px; padding: 1px 8px; border: 1px solid var(--mist-line); border-radius: var(--radius); background: var(--mist); color: var(--mist-text); font-size: .75rem; font-weight: 600; }
@media print { .hb-public { display: none; } }
.police-line a, a[href^="tel:"] { white-space: nowrap; }
.dt-note { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); }

/* ---- Public pages ---------------------------------------------------- */
.page section { margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.notice-list > li > a { font-weight: 600; }
.reference { font-size: 1.25rem; }
.holding h1 { margin-bottom: .5rem; }

/* ---- Handbook -------------------------------------------------------- */
.handbook h2 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1.2rem; }
.handbook h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.handbook table { margin: 8px 0 14px; }
.handbook a { overflow-wrap: anywhere; }
.handbook li { margin: 3px 0; }
/* Section tabs (handbook.js): D and 1-13, one section showing at a time. */
.hb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--gap); }
.hb-tabs [role=tab] { min-width: 40px; min-height: 40px; padding: 0 10px; font-weight: 650; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.hb-tabs [role=tab]:hover { background: var(--primary-tint); color: var(--text); border-color: var(--primary); }
.hb-tabs [role=tab][aria-selected="true"] { background: var(--btn); color: var(--on-btn); border-color: var(--btn); }
.hb-panel > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.hb-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 400; font-size: .8125rem; }   /* small and normal weight so long titles fit a phone (Jonathan, October 19, 2026) */
.hb-pager a { text-decoration: none; }
.hb-pager a:hover { text-decoration: underline; }
.hb-pager a:last-child { text-align: right; }
.toc ol { margin-top: 6px; columns: 2; column-gap: 32px; }
.toc li { padding: 3px 0; }
@media (max-width: 640px) { .toc ol { columns: 1; } }


/* ---- Spacing helpers: last, so no component rule overrides them ------ */
.spaced { margin-top: var(--gap); }
/* One standard gap after any form, before whatever follows it (but not
   between forms sitting side by side in a row of buttons). */
:not(.actions):not(.row):not(.chat-actions):not(.page-actions) > form:not(.inline) + * { margin-top: var(--gap); }

/* The narrowest phones (320px): the full name still fits beside Menu. */
@media (max-width: 360px) {
  .topbar-inner { padding: 0 12px; }
  .topbar .menu-toggle { padding: 7px 10px; }
  .brand-name { letter-spacing: -.02em; }
}

/* ---- Phones: less on screen ------------------------------------------ */
@media (max-width: 640px) {
  /* A form's buttons: one per line, all the same width. */
  form .actions > button, form .actions > .button { flex: 1 1 100%; }
  .topbar-inner { gap: 0 12px; }
  .brand { flex: 1 1 0; }
  .brand-name { font-size: clamp(1rem, 4.4vw + .1rem, 1.15rem); }
  .menu-toggle { flex: none; }
  h1 { font-size: 1.45rem; }
  .page { padding-top: 20px; }
  .block, .card { padding: 16px; }
  .page-head { margin-bottom: 18px; }
  .page-actions { width: 100%; }
  /* Buttons at the top of a page fill the row evenly. */
  .page-actions > .button, .page-actions > button, main > .actions > .button, main > .actions > button { flex: 1 1 auto; }
  .hide-phone { display: none !important; }
  .stats .stat { flex: 1 1 8rem; min-width: 0; }
}

/* ---- Print (the handbook's "Save as PDF") ---------------------------- */
/* The full-screen overlay (Jonathan, October 19, 2026): a shift, its chat
   or a meeting over the page, filling the window, X at the top right. */
.full-sheet { position: fixed; inset: 0; z-index: 1050; background: var(--bg); color: var(--text); display: none; flex-direction: column; }
.full-sheet.is-open { display: flex; }
.full-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--bar); color: var(--on-bar); flex: none; }
.full-title { margin: 0; font-size: 1.1rem; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-close { flex: none; width: 40px; height: 40px; min-height: 0; padding: 0; border: 1px solid var(--on-bar-soft); border-radius: var(--radius); background: transparent; color: var(--on-bar); font-size: 1.6rem; line-height: 1; }
.full-close:not(:disabled):hover { background: var(--bar-hover); color: var(--on-bar); }
/* The record's tabs in the overlay's head: white, bold, the current one light blue like the top bar; the first is the title. */
.full-tabs { display: flex; align-items: center; gap: 0 22px; flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.full-tabs::-webkit-scrollbar { display: none; }
.full-tabs[hidden] { display: none; }
.full-tabs a { display: inline-block; padding: 8px 0; border-bottom: 2px solid transparent; text-decoration: none; font-size: 1rem; font-weight: 700; color: var(--on-bar); }
.full-tabs a:first-child { font-size: 1.1rem; }
.full-tabs a[aria-current="page"] { color: var(--saved); border-bottom-color: var(--saved); }
.full-tabs a:hover { border-bottom-color: var(--on-bar-soft); }
.full-title[hidden] { display: none; }
[data-record-tabs] { display: none !important; }
.pdf-line { margin: 0 0 10px; }
.pdf-pick { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; } .pdf-pick select { width: auto; max-width: 100%; }
.pdf-frame-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }
.pdf-frame { display: block; width: 100%; height: calc(100vh - 230px); min-height: 420px; border: 0; background: #fff; }
.full-body { flex: 1 1 auto; overflow: auto; padding: 20px 16px 40px; outline: none; }
.full-body > .embed { max-width: 56rem; margin: 0 auto; }
.full-body .section-head, .full-body .back, .full-body .back-line, .full-body .tabs, .full-body .filters, .full-body .help-band { display: none; }
.full-body .page-head h1, .full-body h1 { font-size: 1.4rem; }
.full-only { display: none; }
.full-body .full-only { display: block; }
body.full-open { overflow: hidden; }
/* The step strip on a complaint or request (Jonathan, October 20, 2026):
   green done, blue now, gray later, red for how it ended. */
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0 0 8px; padding: 0; counter-reset: step; }
.step { display: flex; align-items: flex-start; gap: 8px; flex: 1 1 9rem; position: relative; padding: 6px 10px 6px 0; min-width: 0; }
.step + .step::before { content: ''; position: absolute; left: -2px; top: 19px; width: 0; }
.step-mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 650 .85rem/1 var(--font); border: 2px solid var(--line-strong); color: var(--muted); background: var(--surface); }
.step-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; padding-top: 3px; }
.step-text strong { font-weight: 650; color: var(--muted); font-size: .92rem; }
.step-detail { font-size: .8rem; color: var(--muted); }
.step-done .step-mark { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-done .step-text strong { color: var(--text); }
.step-current .step-mark { background: var(--saved); border-color: var(--saved); color: #fff; }
.step-current .step-text strong { color: var(--saved); }
.step-current .step-detail { color: var(--text); }
.step-wait .step-mark { background: var(--mist); border-color: var(--mist-line); color: var(--mist-text); }
.step-wait .step-text strong { color: var(--text); }
.step-end .step-mark { background: var(--danger); border-color: var(--danger); color: #fff; }
.step-end .step-text strong { color: var(--danger); }
.step-talk .step-mark { background: var(--orange); border-color: var(--orange); color: #fff; }
.step-talk .step-text strong { color: var(--orange); }
.step-talk .step-detail { color: var(--text); }
.sees-line { margin: 0 0 var(--gap); padding: 8px 12px; background: var(--panel); border-radius: var(--radius); font-size: .875rem; color: var(--muted); }
.sees-line strong { color: var(--text); font-weight: 600; }
.share-pick { margin: 4px 0 0; padding: 0; border: 0; }
.share-pick .check { display: block; margin: 2px 0; }
.shared-tag { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--mist); color: var(--mist-text); border: 1px solid var(--mist-line); font-size: .78rem; font-weight: 600; margin-right: 4px; vertical-align: 1px; }
@media (max-width: 640px) { .stepper { flex-direction: column; gap: 2px; } .step { flex-basis: auto; padding: 3px 0; } }
/* The instructions panel (Jonathan, October 18, 2026): the (i) beside a
   title, the band that slides out from under the tabs, and the drawer
   that slides in from the left with every section and Print. */
.help-i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0 0 0 4px;
  border: 0; border-radius: 50%; background: var(--saved); color: #fff; font: italic 700 14px/1 Georgia, "Times New Roman", serif; vertical-align: middle; cursor: pointer; position: relative; top: -2px; }
.help-i:not(:disabled):hover, .help-i.is-open { background: var(--primary); color: #fff; }
.help-i:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.page > .help-band { margin-bottom: 20px; }
.help-band { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; margin: 0 -16px; }
.help-band.is-open { grid-template-rows: 1fr; }
.help-band-inner { overflow: hidden; min-height: 0; }
.help-band-body { padding: 14px 16px 0; max-height: 11.5rem; overflow: hidden; position: relative; }
.help-band-body::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2.4rem; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.help-band-body h2 { font-size: 1.05rem; margin: 0 0 6px; }
.help-band-body h3 { font-size: .95rem; margin: 0 0 4px; }
.help-band-body p, .help-band-body li { margin: 0 0 6px; font-size: .9rem; line-height: 1.5; }
.help-band-body ul { margin: 0; padding-left: 1.2em; }
.help-band-row { display: flex; gap: 14px; align-items: center; padding: 8px 16px 12px; border-bottom: 1px solid var(--line); }
.help-drawer { position: fixed; inset: 0; z-index: 1000; }
.help-drawer[hidden], .help-band[hidden] { display: none; }
.help-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .3s ease; }
.help-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(26rem, 92vw); background: var(--surface); color: var(--text); border-right: 1px solid var(--line-strong);
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .3s ease; box-shadow: 0 0 24px rgba(0, 0, 0, .2); }
.help-drawer.is-open .help-scrim { opacity: 1; }
.help-drawer.is-open .help-panel { transform: none; }
.help-drawer.no-anim .help-scrim, .help-drawer.no-anim .help-panel { transition: none; }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bar); color: var(--on-bar); }
.help-head h2 { margin: 0; font-size: 1.15rem; color: inherit; }
.help-head button.secondary { background: transparent; color: var(--on-bar); border-color: var(--bar-line); }
.help-head button.secondary:not(:disabled):hover { background: var(--bar-hover); color: var(--on-bar); border-color: var(--on-bar-soft); }
.help-body { overflow: auto; padding: 16px 18px 32px; flex: 1 1 auto; outline: none; }
.help-toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 10px 14px; margin: 0 0 20px; }
.help-toc ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.help-toc li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: .92rem; }
.help-toc li .link { color: var(--muted); text-decoration: none; }
.help-toc li .link:hover { text-decoration: underline; color: var(--primary); }
.help-section { padding-top: 6px; margin-bottom: 26px; border-top: 1px solid var(--line); }
.help-section h2 { font-size: 1.15rem; margin: 12px 0 2px; }
.help-intro { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.help-topic h3 { font-size: .98rem; margin: 14px 0 4px; }
.help-topic p, .help-topic li { font-size: .92rem; line-height: 1.55; margin: 0 0 8px; }
.help-topic ul { padding-left: 1.2em; margin: 0 0 8px; }
.help-print-head, .help-role-head { display: none; }
.help-not-mine { display: none; }   /* a section the reader cannot use themselves: printed for a role only */
.help-role { font-size: .85rem; color: var(--on-bar); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.help-head > div { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.help-role select { width: 7.5rem; flex: 0 0 auto; padding: 4px 28px 4px 6px; font-size: .85rem; min-height: 0; }
@media (max-width: 640px) { .help-role { display: none; } }
body.help-drawer-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .help-band, .help-scrim, .help-panel { transition: none; } }
@media print {
  body.help-drawer-open > :not(#help-drawer) { display: none !important; }
  body.help-drawer-open #help-drawer, body.help-drawer-open .help-panel { position: static; width: auto; transform: none; box-shadow: none; border: 0; display: block; }
  body.help-drawer-open .help-scrim, body.help-drawer-open .help-head, body.help-drawer-open .help-toc { display: none !important; }
  body.help-drawer-open .help-print-head { display: block; font-size: 10pt; color: #444; margin: 0 0 12pt; }
  body.help-drawer-open .help-body { overflow: visible; padding: 0; }
  body.help-drawer-open .help-section { break-inside: auto; border-top: 0; }
  body.help-drawer-open .help-section h2, body.help-drawer-open .help-topic h3 { break-after: avoid; }
  body.help-drawer-open .help-topic { break-inside: avoid; }
  body.help-drawer-open.help-print-one .help-section:not(.is-print-target) { display: none !important; }
  body.help-drawer-open.help-print-role .help-not-mine { display: block; }
  body.help-drawer-open.help-print-role .help-off { display: none !important; }
  body.help-drawer-open.help-print-role .help-role-head { display: block; border-bottom: 1px solid #999; margin: 0 0 14pt; padding: 0 0 8pt; }
  body.help-drawer-open.help-print-role .help-role-head h2 { margin: 0 0 4pt; font-size: 14pt; }
  body.help-drawer-open.help-print-role .help-role-head p { margin: 0; font-size: 10pt; }
}
@media print {
  /* Print is always light, whatever the screen theme. */
  :root:not(#x), :root[data-theme]:not(#x) { color-scheme: light; --bg: #fff; --surface: #fff; --panel: #F3F3F3; --text: #000; --muted: #444;
    --line: #CCC; --line-strong: #999; --primary: #1F4D3A; --primary-tint: #fff; --primary-line: #999; --mist: #fff; --mist-text: #000; --danger: #A3261B; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .block, .card, .handbook, .toc { background: #fff; color: #000; }
  .topbar, .foot, .site-foot, .test-banner, .skip, .no-print, .page-actions, .flash, .back { display: none !important; }
  .page { max-width: none; padding: 0; }
  .block, .card { border: 0; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .hb-panel[hidden] { display: block !important; }
  .hb-tabs, .hb-pager { display: none !important; }
  .handbook h2 { break-after: avoid; }
  .hb-panel:nth-of-type(2) { break-before: page; }
  .hb-panel + .hb-panel > h2:first-child { margin-top: 1.6rem; }
  .handbook h3, .handbook h4 { break-after: avoid; }
  .handbook table, .handbook tr, .handbook li { break-inside: avoid; }
  .toc { break-after: page; }
  .toc ol { columns: 1; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ---- Folders on a record (October 20, 2026): the sections of a complaint or request as collapsible folders ---- */
details.block.folder > summary { padding: 4px 28px 4px 0; }
details.block.folder > summary h2 { display: inline; margin: 0; font-size: 1.15rem; line-height: 1.3; color: var(--primary); }
details.block.folder[open] > summary { margin-bottom: 12px; }
details.block.folder > summary::after { top: 50%; }
details.block.folder[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
.chat-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 var(--gap); }
.chat-line .badge { margin-left: 2px; }
.fold-count { font-weight: 400; font-size: .9rem; }
.fold-tag { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: #fff; vertical-align: 3px; white-space: nowrap; }
.fold-approved { background: var(--vote-yes); }
.fold-denied { background: var(--lavender); }
.fold-talk { background: var(--orange); }
.fold-pending { background: var(--muted); }
.talk-box { border: 1px solid var(--orange); border-left-width: 4px; border-radius: var(--radius); padding: 10px 14px; margin: 0 0 var(--gap); }
/* Attention (Jonathan, October 23, 2026): the same orange, wherever the person reading must act next:
   the homeowner asked for more, the chair with a new request, a member not yet ready, the voting to open. */
.attention { border: 1px solid var(--orange); border-left-width: 4px; border-radius: var(--radius); padding: 10px 14px; margin: 0 0 var(--gap); }
.attention > p { margin: 0 0 6px; }
.attention > p:last-child { margin-bottom: 0; }
.attention strong { color: var(--orange); }
.note.attention { background: transparent; border-color: var(--orange); color: inherit; }
.note.attention a { color: var(--primary); }
.conditions-panel > h2 + .attention, .conditions-panel .attention { margin-top: 4px; }
.conditions-panel > details.inline-details + h2, .conditions-panel > form + h2 { margin-top: 18px; }   /* air between More information and Conditions */
.talk-text { color: var(--orange); }
.locked-line { color: var(--muted); margin: 0; }
.actions-line { margin: 0 0 12px; }
.conditions .condition { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 0 0 14px; }
.conditions .cond-accepted { border-left-color: var(--vote-yes); }
.conditions .cond-dropped { border-left-color: var(--lavender); }
.conditions .cond-stuck { border-left-color: var(--orange); }
.cond-head { margin: 0 0 4px; }
.cond-head .fold-tag { margin-left: 4px; vertical-align: 1px; }
.cond-answer, .cond-own { align-items: center; gap: 8px; margin-top: 6px; }
/* People in columns (Jonathan, October 23, 2026): name, tag, date and action line up down the list;
   a note or comment takes the whole next line. Members, Review, Votes, Block captains. */
.cols > li { display: grid; grid-template-columns: minmax(9rem, 16rem) 8.5rem minmax(0, 1fr) max-content; gap: 4px 12px; align-items: center; }
.cols .col-name { min-width: 0; overflow-wrap: anywhere; }
.cols .col-tag .fold-tag { margin-left: 0; vertical-align: 0; }
.cols .col-when { min-width: 0; }
.cols .prewrap { grid-column: 1 / -1; }
.cols form.inline { grid-column: 4; justify-self: end; margin: 0; }
@media (max-width: 640px) {
  .cols > li { grid-template-columns: minmax(0, 1fr) max-content max-content; }
  .cols .col-when { grid-column: 1 / -1; }
  .cols form.inline { grid-column: 3; }
}
.ready-row { gap: 8px; align-items: center; }
.starters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
[data-acc-add] { margin-top: 10px; }   /* air between the section drop-down and Add another condition (Jonathan, October 23, 2026) */
.info-list .info-row { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 0 0 14px; }
.info-list .info-ask { border-left-color: var(--primary); }
.info-list .info-answer { border-left-color: var(--saved); }
/* The signature box on the ACC request form, and the drawing on the request (October 23, 2026). */
.sign-label { margin: 14px 0 2px; font-weight: 600; }
.sign-pad { position: relative; margin: 6px 0 0; }
.sign-pad canvas { display: block; width: 100%; max-width: 40rem; height: auto; aspect-ratio: 800 / 220; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); touch-action: none; cursor: crosshair; }
.sign-pad [data-sign-clear] { margin-top: 6px; }
.sign-img { display: block; max-width: 16rem; height: auto; margin-top: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.open-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: var(--gap); }
/* The watch's photos, with a caption under each (October 23, 2026). */
.thumbs.captioned li { display: inline-flex; flex-direction: column; gap: 4px; max-width: 12rem; vertical-align: top; }
.thumb-cap { font-size: .85rem; line-height: 1.35; }
.cond-answer [aria-pressed="true"] { box-shadow: 0 0 0 2px var(--saved) inset; }
.mode-pick { display: flex; gap: 0 18px; flex-wrap: wrap; align-items: center; border: 0; padding: 0; margin: 0 0 6px; }
.mode-pick.swatches { gap: 0 8px; }
.mode-pick legend { font-weight: 600; padding: 0; margin-right: 6px; float: left; }
.swatch { display: inline-flex; align-items: center; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
/* Small flat color boxes, not circles (Jonathan, October 20, 2026); the chosen one gets a dark outline, its color still showing. */
.swatch-dot { display: inline-block; width: 16px; height: 16px; border-radius: 3px; background: var(--sw, var(--primary)); border: 1px solid var(--line-strong); box-sizing: border-box; }
.sw-red { --sw: var(--area-red); } .sw-orange { --sw: var(--area-orange); } .sw-olive { --sw: var(--area-olive); } .sw-evergreen { --sw: var(--area-evergreen); } .sw-teal { --sw: var(--area-teal); } .sw-blue { --sw: var(--area-blue); } .sw-violet { --sw: var(--area-violet); }
.swatch input:checked + .swatch-dot { outline: 2px solid var(--text); outline-offset: 2px; }
.swatch input:focus-visible + .swatch-dot { outline: 2px solid var(--saved); outline-offset: 2px; }
.entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0 0 4px; }
/* A list that grows with its data scrolls inside its panel once it has more than seven items (October 20, 2026). */
.grow-scroll { max-height: 24rem; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; border-bottom: 1px solid var(--line); }
.entry-head .entry-remove { margin-left: 0; }
