/* =====================================================================
   Trailhead — shared mockup styles  (v0.3 — synced with style_guide.html)
   ===================================================================== */

/* ===== Tokens ===== */
:root {
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
  --nav-h: 64px;
  --header-h: 60px;  /* Bumped from 52 to fit 44×44 header buttons (WCAG 2.5.5) */

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;

  /* Color */
  --ink:       #111714;
  --ink-2:     #3a3f3c;
  --muted:     #6e7470;
  --line:      #e8e6e0;
  --line-2:    #f1efe9;
  --paper:     #ffffff;
  --paper-2:   #fafaf6;
  --paper-3:   #f4f3ee;
  --accent:    #2c5234;
  --accent-d:  #1f3a25;
  --accent-s:  #eaf0ec;
  --trail:     #7a4f29;
  --trail-s:   #f5ecda;
  --sig-yes:   #2c5234;
  --sig-no:    #9b3a3a;
  --sig-int:   #7a4f29;
  --sig-go:    #1f3a25;
  --warn:      #856008;
  --warn-s:    #fbf1d4;
  --ok:        #1e7e34;
  --ok-s:      #e6f4ea;

  /* G5 promote-pass tokens (style-alignment Phase 1). */
  --warn-border: #d97706;   /* amber edge for .th-is-dirty / pending list rows */
  --sig-no-s:    #fef2f2;   /* error-red soft fill (form invalid, destructive) */
  --sab-h:       64px;      /* sticky-action-bar height (layout offset) */
  --kind-meal:   #2a6d63;   --kind-meal-s: #e2efed;
  --kind-ride:   #2f5f7a;   --kind-ride-s: #e6eef3;
  --kind-gear:   #7a4f29;   --kind-gear-s: #f5ecda;
  --kind-task:   #5b4a82;   --kind-task-s: #ece8f4;

  /* Channel accents — flat taxonomy (all / parents / scouts / leaders / asms /
     patrol:X). A communication channel is shown *visually* — an icon + this
     hue + a soft background — never as a text label. `patrol:X` reuses the
     scout/patrol hue, tinted per-patrol in code. */
  --ch-all:        var(--accent);   --ch-all-s:     var(--accent-s);
  --ch-parents:    #2f5f7a;         --ch-parents-s: #e6eef3;
  --ch-scouts:     #7a4f29;         --ch-scouts-s:  #f5ecda;
  --ch-leaders:    #5b4a82;         --ch-leaders-s: #ece8f4;
  --ch-asms:       #2a6d63;         --ch-asms-s:    #e2efed;
  --ch-patrol:     #9a4a33;         --ch-patrol-s:  #f3dcd2;

  /* Motion */
  --ease-soft:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 120ms;
  --t-med:  220ms;
  --t-slow: 320ms;

  /* Hold-to-confirm gesture (slice 5.3) — JS timer in hold-confirm.js
     mirrors this duration. Keep them in lockstep. */
  --hold-duration: 500ms;

  /* Spacing scale — one scale, every viewport. Card padding / gap / section
     gap / type sizes do NOT tier up at desktop; only the frame width does.
     Search-replace literal 4/8/12/14/16/20/24/32 → these tokens as pages get
     rewritten. */
  --space-1: 4px;    /* icon ↔ text inside a chip; pill gap */
  --space-2: 8px;    /* default section gap (.th-pad { gap }); tight gaps */
  --space-3: 12px;   /* icon ↔ text gap in a .th-list item; event/poll card side padding */
  --space-4: 14px;   /* roomier card padding (.th-card used it before 2026-10-21) */
  --space-5: 16px;   /* larger card padding; group gap */
  --space-6: 20px;   /* takeover-section vertical spacing */
  --space-7: 24px;   /* hero / brand block padding */
  --space-8: 32px;   /* hero spacing; top-of-page breathing */

  /* Spacing half-steps — value-exact tokens for the 2/6/10px values the
     scale was missing (~110 declarations used them). Not a re-scale. */
  --space-0:  2px;
  --space-1h: 6px;
  --space-2h: 10px;

  /* One gap between form fields (field→field, field→button) on every form. */
  --form-gap: var(--space-5);

  /* Font size — value-exact; named by px so a swap never changes rendering.
     Phase 4 collapses these to a smaller set. Rare sizes stay literal. */
  --fs-9: 9px;
  --fs-10: 10px;
  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-24: 24px;   /* Hero role (style guide §07b): .share-hero h1, the page title on mini-app pages */

  /* Radius — value-exact. */
  --radius-6: 6px;
  --radius-8: 8px;
  --radius-10: 10px;
  --radius-12: 12px;
  --radius-14: 14px;
  --radius-pill: 999px;

  /* Elevation — value-exact. Focus rings stay literal (colour-parametric). */
  --shadow-card: 0 8px 32px -16px rgba(17, 23, 20, 0.18);
  --shadow-up: 0 -4px 16px -4px rgba(17, 23, 20, 0.12);
  --shadow-xs: 0 1px 2px rgba(17, 23, 20, 0.05);
  --shadow-sm: 0 1px 3px rgba(17, 23, 20, 0.12);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 24px 48px -16px rgba(17, 23, 20, 0.35);
  --shadow-cta: 0 8px 24px -8px rgba(44, 82, 52, 0.4);
  --shadow-coach: 0 12px 30px -8px rgba(0, 0, 0, 0.4);
  --shadow-toast: 0 6px 20px rgba(0, 0, 0, 0.18);
  --shadow-hair: 0 1px 2px rgba(0, 0, 0, 0.04);

  /* Stacking — named layers; local 1/2/10/11/-1 stay literal. */
  --z-header: 5;
  --z-nav: 50;
  --z-strip: 51;
  --z-coach: 60;
  --z-overlay: 1000;
  --z-toast: 9999;
  /* amber: the guest / pending tone (2026-10). Not --warn: --warn-s is #fbf1d4, --warn #856008. */
  --amber-s:   #fef3c7;
  --amber-ink: #92400e;
}

/* ===== Global base ===== */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  accent-color: var(--accent);
}
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body { overflow-x: clip; }  /* clip, not hidden: `hidden` makes the body a scroll container and sticky bars stop sticking */
html, body { max-width: 100%; }

body.th-screen {
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01" 1, "cv11" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* The DOCUMENT scrolls (Chrome's address bar can then slide away). The header sticks to the top and the
     bottom bars stick to the bottom of the viewport inside .th-frame. (admin-live keeps its own one-screen lock below.) */
  min-height: 100vh;
  min-height: 100dvh;
}

::selection {
  background: #d6dfd8;
  color: var(--accent-d);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

/* Inline links underline by default (WCAG 1.4.1 — must be distinguishable
   without relying on color alone). Link-shaped components like .th-btn,
   .th-nav-tab, .next-card, etc. explicitly set `text-decoration: none`. */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: var(--space-6); margin: 0; }

/* Tabular numerals */
.th-tnum, .th-modal-step {
  font-variant-numeric: tabular-nums;
}

.th-balance { text-wrap: balance; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Focus-visible only for keyboard users */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-8);
}
button:focus-visible, .th-signal:focus-visible, .th-nav-tab:focus-visible {
  border-radius: var(--radius-12);
}

/* =====================================================================
   FRAME — responsive (production)
   - Mobile (any width): full-bleed; the page IS the app
   - Wide viewports: same shape, capped width so a 1920px monitor doesn't
     stretch a single column of cards. NEVER a fake "phone-in-the-middle".
   - At least the full viewport height; the DOCUMENT scrolls (header + bottom bars are sticky).
   ===================================================================== */
.th-frame {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  width: 100%;
  max-width: 640px;       /* sensible cap; lets it feel mobile on big screens */
  margin: 0 auto;
  min-height: 100vh;          /* fallback */
  min-height: 100dvh;         /* at least the viewport; a short page still pins its bars to the bottom */
  isolation: isolate;
}

@media (min-width: 768px) {
  body.th-screen {
    /* Soft tint behind the centered frame on wide screens; differentiates
       the app surface from the page background without faking a phone. */
    background: #f4f2ee;
  }
  .th-frame {
    box-shadow: var(--shadow-card);
  }
}

/* No fake OS status bar — this is a responsive web app, not a native app;
   the device draws the real bar. (Was `.phone-statusbar` — removed.) */

/* =====================================================================
   APP HEADER — sticky, scroll-aware
   ===================================================================== */
.th-app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  flex: 0 0 auto;
  min-height: var(--header-h);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: var(--space-2);
  transition: border-color var(--t-med) var(--ease-soft),
              background var(--t-med) var(--ease-soft);
}
.th-app-header.th-is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
}
/* Mobile: header pushes down for safe-area top inset */
.th-app-header { padding-top: max(var(--space-2), var(--safe-top)); }
@media (min-width: 768px) { .th-app-header { padding-top: var(--space-2); } }

.th-header-btn {
  /* WCAG 2.5.5 — 44×44 touch target. Icon glyph stays ~18-20px (sized by
     consumers / lucide); the hit area is the full button bounds. */
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.th-header-btn:hover { background: var(--paper-3); }
/* Leader actions on a detail page: icon buttons in the header's right slot
   (header-actions.js). The right column grows to fit 1-3 buttons. */
.th-app-header:has(.th-header-actions) { grid-template-columns: 44px 1fr auto; }
.th-header-actions { display: flex; align-items: center; justify-content: flex-end; }
/* One meta line: type pill, date, place, audience, one icon size, wraps as a unit. */
.th-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1h) var(--space-3); margin: 0; font-size: var(--fs-13); color: var(--ink-2); }
.th-meta-line > span { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; }
.th-meta-line svg, .th-meta-line i { width: 14px; height: 14px; flex: 0 0 auto; color: var(--muted); }
.th-header-btn .th-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--accent);
  color: #fff;
  font-size: var(--fs-9);
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 1px var(--space-1);
  min-width: 14px;
  text-align: center;
  line-height: 1.4;
}
.th-header-btn-text {
  width: auto;
  padding: 0 var(--space-3);
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--accent);
}
.th-header-title { text-align: center; min-width: 0; }
.th-header-eyebrow {
  font-size: var(--fs-10);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1px;
  font-variant-numeric: tabular-nums;
}
.th-header-h {
  font-size: var(--fs-15);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================================
   FRAME CONTENT
   ===================================================================== */
.th-frame-content {
  flex: 1 0 auto;          /* grows to push the bottom bars down; never a scroll box */
  min-width: 0;
}
.th-frame-content > .th-pad {
  padding: var(--space-2) var(--space-5) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* =====================================================================
   NAV BAR — fixed-bottom navigation, M3 pill highlight
   ===================================================================== */
.th-nav-bar {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: stretch;
}
.th-nav-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.th-nav-tab:hover { color: var(--ink); text-decoration: none; }
.th-nav-tab.th-is-active { color: var(--accent-d); font-weight: 600; }
.th-nav-tab .th-nav-ico-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 28px;
  border-radius: var(--radius-14);
  transition: background var(--t-med) var(--ease-soft);
}
.th-nav-tab.th-is-active .th-nav-ico-wrap {
  background: #d6dfd8;
}
.th-nav-tab svg { width: 22px; height: 22px; stroke-width: 2; }
.th-nav-tab.th-is-active svg { stroke-width: 2.4; }

/* =====================================================================
   ACTION AREA
   ===================================================================== */
.th-action-area {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: var(--z-nav);
  padding: var(--space-2h) var(--space-4);
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.th-action-area-only {
  /* When no nav follows, action area gets safe-area inset */
  padding-bottom: calc(10px + var(--safe-bottom));
}

/* =====================================================================
   [G5] STICKY ACTION BAR (§B#3)
   Floats above the viewport bottom (position:fixed) when a mode is active
   — bulk-select, save-pending, rearrange. Hidden at rest (display:none);
   shown by adding .th-is-visible to the bar itself (save-bar pattern) OR by a
   mode class on .th-frame (bulk/rearrange — page keeps its local trigger rule).
   Distinct from .th-action-area (normal-flow flex element); do NOT collapse.
   ===================================================================== */
.th-sticky-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px calc(12px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-up);
  z-index: var(--z-nav);
  display: none;          /* hidden by default */
  gap: var(--space-2);
  align-items: center;
}
/* Show variant A: .th-is-visible on the bar itself (save/edit-pending flows) */
.th-sticky-action-bar.th-is-visible { display: flex; }
/* (Variant B: a mode class on .th-frame drives display:flex — kept page-local.) */

/* Info slot: "3 changes" / "6 selected" label on the left */
.th-sticky-action-bar .th-sab-info {
  flex: 1;
  font-size: var(--fs-12);
  color: var(--muted);
}
.th-sticky-action-bar .th-sab-info strong {
  color: var(--ink);
  font-weight: 700;
}

/* Hide the bottom nav while a Variant-A bar is active. */
.th-sticky-action-bar.th-is-visible ~ * #th-bottom-nav,
.th-sticky-action-bar.th-is-visible + #th-bottom-nav { display: none; }

/* SELECTION STRIP — accent count banner that sits above the action bar
   when rows are checked. Always a sibling of .th-sticky-action-bar; shown by
   each page's mode class. --sab-h drives the offset so the two never
   collide if the bar height changes. */
.th-sel-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--sab-h) + var(--safe-bottom));
  z-index: var(--z-strip);
  background: var(--accent);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-13);
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: space-between;
}
.th-sel-strip .th-sab-clear {
  background: transparent;
  border: 0;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* =====================================================================
   BUTTON
   ===================================================================== */
.th-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1h);
  font-family: inherit;
  font-weight: 600;
  font-size: var(--fs-15);
  padding: var(--space-3) 18px;
  min-height: 44px;
  border-radius: var(--radius-12);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-soft),
              transform var(--t-fast) var(--ease-soft),
              border-color var(--t-fast) var(--ease-soft);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.005em;
  text-decoration: none;
}
.th-btn:active { transform: scale(0.97); }
.th-btn:hover { text-decoration: none; }
.th-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(31, 58, 37, 0.4) inset;
}
.th-btn-primary:hover { background: var(--accent-d); color: #fff; }
.th-btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
.th-btn-secondary:hover { background: var(--paper-2); border-color: #d8d6d0; }
.th-btn-ghost {
  background: transparent;
  color: var(--accent);
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
}
.th-btn-ghost:hover { background: var(--accent-s); }
.th-btn-block { width: 100%; }
.th-btn-lg { padding: var(--space-4) 22px; font-size: var(--fs-16); border-radius: var(--radius-14); min-height: 48px; }
/* WCAG 2.5.5 — visual stays a compact pill (13px text, 10px radius); hit
   area is expanded to 44px via an invisible ::before so the pill doesn't
   round into a circle. Same pattern as .th-role-chip. */
.th-btn-sm { padding: var(--space-1h) var(--space-3); font-size: var(--fs-13); border-radius: var(--radius-10); position: relative; }
.th-btn-sm::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 44px; min-height: 44px; width: 100%; height: 100%; }
.th-btn .th-btn-ico { width: 18px; height: 18px; }
/* [G5] destructive button (irreversible actions) (§B#8) */
.th-btn-destructive {
  background: var(--sig-no);
  color: #fff;
  border: 0;
}
.th-btn-destructive:hover { filter: brightness(0.92); }

/* =====================================================================
   SIGNAL PILL
   ===================================================================== */
.th-signal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px var(--space-4);
  min-height: 36px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-14);
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-soft),
              background var(--t-fast) var(--ease-soft),
              color var(--t-fast) var(--ease-soft),
              transform var(--t-fast) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}
.th-signal:hover { border-color: #b8b6b0; }
.th-signal:active { transform: scale(0.97); }
.th-signal.th-is-active.th-yes { border-color: var(--sig-yes); color: var(--sig-yes); background: var(--accent-s); font-weight: 600; }
.th-signal.th-is-active.th-no  { border-color: var(--sig-no);  color: var(--sig-no);  background: #f7e9e9;       font-weight: 600; }
.th-signal.th-is-active.th-int { border-color: var(--sig-int); color: var(--sig-int); background: var(--trail-s); font-weight: 600; }
.th-signal.th-is-active.th-go  { border-color: var(--sig-go);  color: var(--sig-go);  background: #d6dfd8;       font-weight: 600; }

/* Compact variant — for vote controls on poll cards / detail rows where the
   full-size pill is too heavy. Also: when a choice is already made, render
   only the picked pill (`.th-is-active`) rather than the whole group. */
/* WCAG 2.5.5 — visual stays a compact pill (13px text); hit area is
   expanded to 44px via an invisible ::before so the pill doesn't round into
   a circle. Same pattern as .th-role-chip. */
.th-signal-sm { padding: var(--space-1h) 11px; font-size: var(--fs-13); gap: var(--space-1); position: relative; }
.th-signal-sm::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 44px; min-height: 44px; width: 100%; height: 100%; }
.th-signal-sm svg { width: 13px; height: 13px; }

/* M1 / M2 — "saved" feedback after RSVP / vote: the pill scale-pulses and a
   small "Saved ✓" pip rises beside it. */
@keyframes signal-pulse {
  0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); }
}
.th-signal.th-just-saved { animation: signal-pulse 320ms var(--ease-spring); }
.th-saved-pip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-11); font-weight: 600; color: var(--accent);
  opacity: 0; transform: translateY(2px);
}
.th-saved-pip svg { width: 12px; height: 12px; }
.th-saved-pip.th-show { animation: rise-fade 1.8s var(--ease-soft) forwards; }
@keyframes rise-fade {
  0% { opacity: 0; transform: translateY(2px); }
  18% { opacity: 1; transform: translateY(0); }
  78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-2px); }
}

/* =====================================================================
   CARD
   ===================================================================== */
.th-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-14);
  padding: var(--space-2h);
  position: relative; /* anchor for `.share-btn` (bottom-right share icon) */
}
.th-card-tinted { background: var(--paper-2); }
/* [G5] tinted-card hue modifiers (§C.1) */
.th-card-tinted-accent {
  background: var(--accent-s);
  border-left: 3px solid var(--accent);
}
.th-card-tinted-trail {
  background: var(--trail-s);
  border-left: 3px solid var(--trail);
}
/* [G5] destructive card (remove-Scout row etc.) (§B#8) */
.th-card-destructive { border-color: var(--sig-no); }
.th-card-destructive .th-name { color: var(--sig-no); }
.th-card-dashed { border-style: dashed; }
.th-card-button {
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-soft),
              background var(--t-fast) var(--ease-soft),
              transform var(--t-fast) var(--ease-soft),
              box-shadow var(--t-fast) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: inherit;
  display: block;
}
.th-card-button:hover {
  border-color: #c8c4ba;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
}
.th-card-button:active { background: var(--paper-2); transform: scale(0.99); }

/* Common card patterns */
.th-card-row {
  display: flex;
  align-items: center;
  gap: var(--space-2h);
}
.th-card-row .th-body { flex: 1 1 auto; min-width: 0; }
.th-card-row .th-body .th-name { font-weight: 600; font-size: var(--fs-14); color: var(--ink); }
.th-card-row .th-body .th-sub  { font-size: var(--fs-12); color: var(--muted); }
.th-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 0;
}
.th-card-head h2,
.th-card-head h3 {
  margin: 0;
  font-size: var(--fs-15);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.th-card .th-meta {
  font-size: var(--fs-12);
  color: var(--muted);
  margin: var(--space-0) 0 0; /* the meta line is often a <p>: no browser-default 12px margins */
}

/* =====================================================================
   [G5] LIST-ROW (§B#1) — separator-style flex rows inside a card.
   Canonical replacement for: .scout-row (patrols), .audit-row, .info-row,
   .rsvp-row, .token-row, .proposal-row, .setting-row,    .th-help-row (mockup), .pers-row (mockup). Card-internal full-border
   variants (.pos-row, .rank-row, year-end .scout-row) use .th-list-row.th-is-inset.
   ===================================================================== */
.th-list-row {
  display: flex;
  align-items: center;
  gap: var(--space-2h);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line-2);
}
.th-list-row:last-child { border-bottom: 0; }

/* Body — the flex-1 expanding cell (.th-body or .th-who child) */
.th-list-row .th-body,
.th-list-row .th-who { flex: 1; min-width: 0; }

/* Modifier: top-anchored items (multi-line body text + a small leading dot) */
.th-list-row.th-is-start { align-items: flex-start; }

/* Modifier: border-top style (row opens from top; first clears top border) */
.th-list-row.th-is-top-border {
  border-bottom: 0;
  border-top: 1px solid var(--line-2);
}
.th-list-row.th-is-top-border:first-child { border-top: 0; }

/* Modifier: card-internal full-border collapse (pos-row / rank-row / year-end scout-row).
   First/last rows pick up the corner radii. */
.th-list-row.th-is-inset {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
  padding: var(--space-2h) var(--space-3);
}
.th-list-row.th-is-inset:first-child {
  border-top: 1px solid var(--line);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.th-list-row.th-is-inset:last-child {
  border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Dirty / unsaved-edit state — amber left accent bar + tinted background */
.th-list-row.th-is-dirty {
  background: var(--warn-s);
  border-left: 3px solid var(--warn-border);
}

/* =====================================================================
   CHIP
   ===================================================================== */
.th-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2h);
  border-radius: var(--radius-pill);
  font-size: var(--fs-12);
  font-weight: 500;
  background: var(--paper-3);
  color: var(--ink-2);
  line-height: 1.4;
}
.th-chip-accent { background: var(--accent-s); color: var(--accent-d); }
.th-chip-trail  { background: var(--trail-s);  color: var(--trail); }
.th-chip-warn   { background: var(--warn-s);   color: var(--warn); }
.th-chip-tap {
  padding: 7px var(--space-3);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-soft);
}
.th-chip-tap:hover { background: var(--line); }
.th-chip svg { width: 11px; height: 11px; }

/* [G5] kind-chip — proposal-kind badge (meal / ride / gear / task) (§B#11) */
.th-kind-chip {
  display: inline-block;
  padding: var(--space-0) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-11);
  font-weight: 600;
  background: var(--paper-3);
  color: var(--ink-2);
  text-transform: capitalize;
}
.th-kind-chip.th-meal { background: var(--kind-meal-s); color: var(--kind-meal); }
.th-kind-chip.th-ride { background: var(--kind-ride-s); color: var(--kind-ride); }
.th-kind-chip.th-gear { background: var(--kind-gear-s); color: var(--kind-gear); }
.th-kind-chip.th-task { background: var(--kind-task-s); color: var(--kind-task); }

/* =====================================================================
   ROLE CHIP — minimal closed set of tappable letter-chips next to a name.
   Adults: P (parent), PL / APL / SPL / QM (youth positions), ASM / SM (adult
   leaders). A plain Scout shows NO chip — just their rank badge — *except* a
   brand-new Scout with no rank yet, who shows the `S` placeholder until a
   parent picks a rank. Stack with .th-role-chip-stack when a person holds several.
   Tap → expands to the full title. Never render the app-admin bit as a chip.
   ===================================================================== */
.th-role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--radius-6);
  font-size: var(--fs-10);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--paper-3);
  color: var(--ink-2);
  text-decoration: none;
  /* Default: chip is DECORATION. The container (.roster-cell, .card, etc.)
     is the actual tap target — per a11y audit "make the cell the target,
     chip is decoration." Standalone tappable variant below promotes the
     hit area to 44×44 without changing the visible pill size. */
  cursor: default;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
}
.th-role-chip:hover { background: var(--line); text-decoration: none; }
/* When a role-chip IS an <a> or <button> (standalone interactive), expand the
   hit area to 44×44 via a transparent pseudo-element. Visible pill is unchanged.
   WCAG 2.5.5. */
a.th-role-chip, button.th-role-chip {
  cursor: pointer;
  position: relative;
}
a.th-role-chip::before, button.th-role-chip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  width: 100%;
  height: 100%;
}
.th-role-chip.th-is-parent  { background: var(--ch-parents-s); color: var(--ch-parents); }   /* P */
.th-role-chip.th-is-youth   { background: var(--ch-scouts-s);  color: var(--ch-scouts); }     /* PL APL SPL QM, and the S placeholder */
.th-role-chip.th-is-leader  { background: var(--ch-leaders-s); color: var(--ch-leaders); }    /* ASM SM */
/* Admin (A) — shown only to admin viewers (admins seeing who else is admin).
   A distinct violet so it never reads as a parent/leader/youth role. */
.th-role-chip.th-is-admin   { background: #ede9fe; color: #6d28d9; }                          /* A */
/* No-position placeholder — faded muted indicator (e.g. a Scout with no troop/patrol
   position assigned on admin-positions.html). Background-free so it reads as "empty". */
.th-role-chip.th-is-none    { background: transparent; color: var(--muted); opacity: .5; cursor: default; }
.th-role-chip.th-is-none svg { width: 12px; height: 12px; display: block; }
.th-role-chip-stack { display: inline-flex; align-items: center; gap: 3px; }

/* =====================================================================
   RANK BADGE — a Scout's rank as a glyph in a colour-coded shield. No BSA
   artwork. The glyph is the element's text content: S Scout · T Tenderfoot ·
   2 Second Class · 1 First Class · ★ Star · ♥ Life — Eagle's bird is drawn
   into the shield (white), so .rank-eagle's text content stays empty. Each
   rank has its own hue (the shield fill). Adults never have one. The shield
   is a background SVG so it scales cleanly. Fold onto an avatar with
   .th-avatar-rank. Shield path (24×24): M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6
   8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z
   ===================================================================== */
.th-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  padding-bottom: 3px;        /* sit the glyph in the shield's body, off the point */
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  background: center / contain no-repeat;
  /* fallback = the Scout / neutral look (a .rank-* class normally overrides) */
  color: #56524a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6 8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z' fill='%23ddd9cf' stroke='%23bdb8aa' stroke-width='1'/%3E%3C/svg%3E");
}
.th-rank-badge.th-rank-scout { color: #56524a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6 8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z' fill='%23ddd9cf' stroke='%23bdb8aa' stroke-width='1'/%3E%3C/svg%3E"); }
.th-rank-badge.th-rank-tf    { color: #6e5320; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6 8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z' fill='%23e6cf9c' stroke='%23cab474' stroke-width='1'/%3E%3C/svg%3E"); }
.th-rank-badge.th-rank-2c    { color: #41592f; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6 8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z' fill='%23cfdec5' stroke='%23a6bf96' stroke-width='1'/%3E%3C/svg%3E"); }
.th-rank-badge.th-rank-1c    { color: #27554f; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6 8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z' fill='%23c1dedb' stroke='%2393bfba' stroke-width='1'/%3E%3C/svg%3E"); }
.th-rank-badge.th-rank-star  { color: #7a5810; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6 8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z' fill='%23f3cf6e' stroke='%23d4ab38' stroke-width='1'/%3E%3C/svg%3E"); }
.th-rank-badge.th-rank-life  { color: #8a2c2c; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6 8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z' fill='%23edc6c6' stroke='%23d49a9a' stroke-width='1'/%3E%3C/svg%3E"); }
.th-rank-badge.th-rank-eagle { color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a1 1 0 0 1 1 1v6.5c0 4.6-3.6 8.4-9 11.5-5.4-3.1-9-6.9-9-11.5V4a1 1 0 0 1 1-1z' fill='%2339568c' stroke='%232a4470' stroke-width='1'/%3E%3Cpath d='M12 6.6c-.8 0-1.45.6-1.45 1.35 0 .28.09.53.25.74-1.85-1.25-4.15-1.6-6.3-1 1.65.73 2.75 1.4 3.5 2.55-1.3-.28-2.65-.17-3.8.48 1.75.12 3.05.65 4.2 1.75h7.3c1.15-1.1 2.45-1.63 4.2-1.75-1.15-.65-2.5-.76-3.8-.48.75-1.15 1.85-1.82 3.5-2.55-2.15-.6-4.45-.25-6.3 1 .16-.21.25-.46.25-.74 0-.75-.65-1.35-1.45-1.35z' fill='%23fff'/%3E%3Cpath d='M11.15 5.75c0-.47.38-.85.85-.85s.85.38.85.85l-.38 1.05h-.94z' fill='%23fff'/%3E%3C/svg%3E"); }
/* ★ and ♥ glyphs are a hair smaller than the letters so they don't crowd the shield */
.th-rank-badge.th-rank-star, .th-rank-badge.th-rank-life { font-size: 9.5px; }
.th-rank-badge-sm { width: 18px; height: 18px; padding-bottom: var(--space-0); font-size: 8.5px; }
.th-rank-badge-sm.th-rank-star, .th-rank-badge-sm.th-rank-life { font-size: 8px; }
.th-rank-badge-lg { width: 32px; height: 32px; padding-bottom: var(--space-1); font-size: var(--fs-15); }
.th-rank-badge-lg.th-rank-star, .th-rank-badge-lg.th-rank-life { font-size: 13.5px; }
.th-rank-badge-xl { width: 44px; height: 44px; padding-bottom: var(--space-1h); font-size: 21px; }  /* the rank picker */
.th-rank-badge-xl.th-rank-star, .th-rank-badge-xl.th-rank-life { font-size: 19px; }
.th-avatar-rank { position: relative; overflow: visible; }

/* ===== Roster grid =====
   Shared troop-roster presentation: Scouts grouped by patrol, shown as a
   responsive grid of cells (2-up on a phone, 3-up in the wider desktop frame
   via auto-fit minmax — no breakpoint). One source of truth used by every
   roster screen (Leadership & positions, Organize patrols, …); each page
   plugs in its own action (tap-to-assign, select-to-move). Markup helper:
   apps/shared/vendor/roster-grid.js (window.RosterGrid). */
/* 2-up on phones, 3-up in the wider desktop frame. auto-fit minmax can't hit
   exactly 2/3 once card+frame padding is subtracted (it collapsed to 1-up on a
   360px phone), so pin the counts with one breakpoint. */
.th-roster-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
@media (min-width: 600px) { .th-roster-grid { grid-template-columns: 1fr 1fr 1fr; } }
.th-roster-cell { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1h); width: 100%; min-width: 0; text-align: left; padding: var(--space-2h); border: 1px solid var(--line); border-radius: var(--radius-12); background: var(--paper); font: inherit; cursor: pointer; }
.th-roster-cell:active { background: var(--paper-2); }
/* The cell currently being acted on (picker open / selected) — unmistakable
   so there's never doubt which Scout you're changing. */
.th-roster-cell.th-is-active,
.th-roster-cell.th-is-selected { border-color: var(--accent); background: var(--accent-s); }
.th-roster-cell.th-is-active { box-shadow: 0 0 0 1px var(--accent); }
.th-roster-cell-top { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; }
.th-roster-cell .th-rank-badge-sm { width: 20px; height: 20px; font-size: var(--fs-10); flex: 0 0 auto; }
.th-roster-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.th-roster-name { font-size: var(--fs-14); font-weight: 600; color: var(--ink); min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-roster-sub { font-size: var(--fs-11); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-roster-cell .th-avatar-sm { flex: 0 0 auto; }
.th-roster-trail { flex: 0 0 auto; display: inline-flex; align-items: center; color: var(--muted); }
/* Read-only roster (reference list, not tappable). */
.th-roster-cell.th-is-static { cursor: default; }
.th-roster-cell.th-is-static:active { background: var(--paper); }
.th-roster-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.th-roster-chip { font-size: var(--fs-10); font-weight: 700; padding: var(--space-0) 7px; border-radius: var(--radius-pill); background: var(--accent-s); color: var(--accent-d); letter-spacing: 0.01em; }
.th-roster-chip.th-is-none { color: var(--muted); opacity: .5; display: inline-flex; }
.th-roster-chip.th-is-none svg { width: 16px; height: 16px; }
.th-roster-chip.th-is-pl { background: var(--amber-s); color: var(--amber-ink); }
.th-roster-chip.th-is-apl { background: #dbeafe; color: #1e40af; }
/* Select-mode checkbox — corner overlay, shown only while .th-is-rearrange. */
/* Visual-only indicator — the whole cell is the tap target (the page's click
   handler drives the checked + selected state), so the box itself ignores clicks. */
.th-roster-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; flex: 0 0 auto; display: none; pointer-events: none; appearance: none; -webkit-appearance: none; border: 2px solid var(--line); border-radius: 5px; background: var(--paper); }
.th-is-rearrange .th-roster-check { display: block; }
.th-roster-check:checked { background: var(--accent); border-color: var(--accent); }
.th-roster-check:checked::after { content: '✓'; color: #fff; font-size: var(--fs-13); font-weight: bold; display: block; text-align: center; line-height: 18px; }
/* An inline panel (e.g. the position picker) spans the full grid width on its
   own line, directly after the cell it belongs to. */
.th-roster-grid > .th-roster-panel { grid-column: 1 / -1; }
.th-avatar-rank .th-rank-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  padding-bottom: var(--space-0);
  font-size: 7.5px;
  filter: drop-shadow(0 0 1.5px var(--paper)) drop-shadow(0 0 1px var(--paper));
}
.th-avatar-rank .th-rank-badge.th-rank-star, .th-avatar-rank .th-rank-badge.th-rank-life { font-size: 7px; }

/* =====================================================================
   CHANNEL CHIP — the visual stand-in for a communication channel (all /
   parents / scouts / leaders / asms / patrol:X). Icon + hue + soft bg.
   Never a text label. Optional: a card "posted on" a channel can carry the
   hue as an inset left bar (.th-card.th-on-channel).
   ===================================================================== */
.th-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: var(--space-1) var(--space-2h) var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--ch-all-s);
  color: var(--ch-all);
  white-space: nowrap;
}
.th-channel-chip svg { width: 15px; height: 15px; flex: 0 0 auto; stroke-width: 2.25; }
/* Icon-only — on cards / list rows where the channel name isn't spelled out:
   a slightly bigger glyph in a snug round dot of the channel hue. */
.th-channel-chip.th-ico-only { padding: var(--space-1); gap: 0; }
.th-channel-chip.th-ico-only svg { width: 16px; height: 16px; }
.th-channel-chip.th-ch-parents { background: var(--ch-parents-s); color: var(--ch-parents); }
.th-channel-chip.th-ch-scouts  { background: var(--ch-scouts-s);  color: var(--ch-scouts); }
.th-channel-chip.th-ch-leaders { background: var(--ch-leaders-s); color: var(--ch-leaders); }
.th-channel-chip.th-ch-asms    { background: var(--ch-asms-s);    color: var(--ch-asms); }
.th-channel-chip.th-ch-patrol  { background: var(--ch-patrol-s);  color: var(--ch-patrol); }
/* the "this one's picked" state in a channel picker (compose) */
.th-channel-chip.th-is-selected { box-shadow: 0 0 0 2px currentColor; }

.th-card.th-on-channel { box-shadow: inset 3px 0 0 var(--ch-all); }
.th-card.th-on-channel.th-ch-parents { box-shadow: inset 3px 0 0 var(--ch-parents); }
.th-card.th-on-channel.th-ch-scouts  { box-shadow: inset 3px 0 0 var(--ch-scouts); }
.th-card.th-on-channel.th-ch-leaders { box-shadow: inset 3px 0 0 var(--ch-leaders); }
.th-card.th-on-channel.th-ch-asms    { box-shadow: inset 3px 0 0 var(--ch-asms); }
.th-card.th-on-channel.th-ch-patrol  { box-shadow: inset 3px 0 0 var(--ch-patrol); }

/* =====================================================================
   CE-PILL — channel-and-entity stacked pill (§03d, Approach A).
   - One tinted pill carrying TWO icons: the entity icon (event-type:
     tent/bus/presentation/…  or poll-glyph: megaphone) + the channel
     icon (flag/users/shield/…). Background hue is the channel color.
   - This replaces the older "separate .event-type + .channel-chip"
     arrangement. Color is the fast-scan cue; the channel icon SHAPE is
     the WCAG 1.4.1 non-color cue. Both signals are always present.
   - When a card sits on a channel, also drop the .th-on-channel band — the
     pill carries the color now. Patrol NAME stays in the meta line.
   ===================================================================== */
.th-ce-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: var(--space-1) 9px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  color: var(--ink-2);
  white-space: nowrap;
  flex: 0 0 auto;
}
.th-ce-pill svg,
.th-ce-pill i { width: 14px; height: 14px; flex: 0 0 auto; }
.th-ce-pill .th-sep {
  width: 1px;
  height: 12px;
  background: currentColor;
  opacity: 0.25;
  margin: 0 1px;
}
.th-ce-pill.th-ch-all     { background: var(--ch-all-s);     color: var(--ch-all); }
.th-ce-pill.th-ch-parents { background: var(--ch-parents-s); color: var(--ch-parents); }
.th-ce-pill.th-ch-scouts  { background: var(--ch-scouts-s);  color: var(--ch-scouts); }
.th-ce-pill.th-ch-leaders { background: var(--ch-leaders-s); color: var(--ch-leaders); }
.th-ce-pill.th-ch-asms    { background: var(--ch-asms-s);    color: var(--ch-asms); }
.th-ce-pill.th-ch-patrol  { background: var(--ch-patrol-s);  color: var(--ch-patrol); }

/* =====================================================================
   EVENT TYPE — every event has one; a small icon leads the card title so the
   agenda reads at a glance. ~7 types, each also adapting the compose form:
     meeting       presentation   start time only (minimal)
     outing        bus            single day · drop-off + pickup + headcount
     campout       tent           multi-day range · packing list · drop-off/pickup
     service       heart-handshake project details · sign-up slots
     ceremony      award          Court of Honor / Blue & Gold · program order
     social        party-popper   potluck / social · who-brings-what (help-out)
     fundraiser    hand-coins     goal · shifts/slots
   (Distinct from the *channel* — who it's posted to — and the *state* chip.)
   ===================================================================== */
.th-event-type {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--paper-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.th-event-type svg { width: 15px; height: 15px; color: var(--ink-2); }
.th-event-type-sm { width: 20px; height: 20px; border-radius: var(--radius-6); }
.th-event-type-sm svg { width: 13px; height: 13px; }

/* =====================================================================
   AVATAR
   ===================================================================== */
.th-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--accent-s);
  color: var(--accent-d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--fs-14);
  flex: 0 0 auto;
  letter-spacing: -0.01em;
}
.th-avatar-trail { background: var(--trail-s); color: var(--trail); }
.th-avatar-sm { width: 28px; height: 28px; font-size: var(--fs-11); }
.th-avatar-lg { width: 48px; height: 48px; font-size: var(--fs-18); }

/* =====================================================================
   [G5] HERO-ICO (§B#9) — 80px full-bleed icon circle for confirmation /
   completion screens. .th-is-tinted = accent-s + pulse ring (pending);
   .th-is-solid = accent fill + pop-in (done).
   ===================================================================== */
.th-hero-ico {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-2) auto var(--space-5);
}
.th-hero-ico svg,
.th-hero-ico i { width: 40px; height: 40px; }

.th-hero-ico.th-is-tinted {
  background: var(--accent-s);
  color: var(--accent-d);
  position: relative;
}
.th-hero-ico.th-is-tinted::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--accent);
  opacity: 0;
  animation: hero-pulse 2s var(--ease-soft) infinite;
}
@keyframes hero-pulse {
  0%   { transform: scale(0.9); opacity: 0.4; }
  100% { transform: scale(1.1); opacity: 0; }
}

.th-hero-ico.th-is-solid {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-cta);
  animation: hero-pop 480ms var(--ease-spring) both;
}
@keyframes hero-pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .th-hero-ico.th-is-tinted::after { animation: none; }
  .th-hero-ico.th-is-solid { animation: none; }
}

/* =====================================================================
   [G5] SPINNER (§B#10) — indeterminate progress indicator.
   Canonical 24px; .th-is-sm = 18px (inline), .th-is-lg = 32px (takeover).
   ===================================================================== */
.th-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--accent);
  animation: spinner-spin 0.8s linear infinite;
  flex-shrink: 0;
}
.th-spinner.th-is-sm { width: 18px; height: 18px; }
.th-spinner.th-is-lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes spinner-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .th-spinner { animation: none; } }

/* =====================================================================
   [G5] DANGER-ZONE (§B#8) — section wrapper for irreversible actions.
   ===================================================================== */
.th-danger-zone {
  margin-top: var(--space-7);
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
}
.th-danger-zone h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--ink);
}
.th-danger-zone p {
  margin: 0 0 var(--space-2h);
  font-size: var(--fs-12);
  color: var(--muted);
  line-height: 1.5;
}

/* =====================================================================
   FORM
   ===================================================================== */
.th-field { display: flex; flex-direction: column; }
/* helper text under a field: muted, tight to its field, never closer to the
   NEXT field than to its own (the stack gap separates groups). */
.th-field-help { margin: var(--space-1) 0 0; font-size: var(--fs-12); line-height: 1.5; color: var(--muted); }
.th-field-label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--space-1h);
  display: block;
}
.th-field-input,
.th-field-textarea {
  font-family: inherit;
  font-size: var(--fs-16);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-10);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  transition: border-color var(--t-fast) var(--ease-soft),
              box-shadow var(--t-fast) var(--ease-soft);
}
/* opt-in compact variant for tight rows (the 3 time selects): smaller side padding. */
.th-field-input.th-is-compact { padding-left: var(--space-2); padding-right: var(--space-2); }
.th-field-input:focus,
.th-field-textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 82, 52, 0.12);
}

/* [G3 2b] check-row — native checkbox + label, for per-type form flags
   (e.g. "Permission slip required"). Tappable whole row. */
.th-check-row {
  display: flex;
  align-items: center;
  gap: var(--space-2h);
  cursor: pointer;
  font-size: var(--fs-15);
  color: var(--ink);
}
.th-check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

/* [G3 2b-honorees] honoree picker — Scouts grouped by rank, compact chips
   that wrap horizontally so a big roster fits without a long scroll. */
.th-honoree-group-label {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-3) 0 var(--space-1h);
}
.th-honoree-group-label:first-child { margin-top: 0; }
.th-honoree-wrap { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* The pill IS the toggle — no separate checkbox. Tap to select (solid fill),
   tap again to deselect. Compact so a roster fits on the smallest screen, and
   the same control is reused for adult honorees. */
.th-honoree-chip {
  appearance: none;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1h);
  padding: var(--space-1h) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: var(--fs-14);
  line-height: 1.2;
  color: var(--ink);
  background: #fff;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.th-honoree-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.th-honoree-chip.th-is-selected { background: var(--accent); border-color: var(--accent); color: #fff; }
/* A leading check appears only when selected (CSS pseudo so the JS stays
   about state, not markup). */
.th-honoree-chip.th-is-selected::before { content: "✓"; font-size: var(--fs-12); line-height: 1; }

/* [G5] char-count (counter below a textarea) (§B#12) */
.th-char-count {
  font-size: var(--fs-11);
  color: var(--muted);
  text-align: right;
  margin: var(--space-1) 0 0;
}

/* [G5] sent-state (sign-up success confirmation) (§B#6) */
.th-sent-state { text-align: center; padding: var(--space-7) 0; }
.th-sent-state .th-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-s);
  color: var(--accent-d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.th-sent-state h2 { margin: 0 0 var(--space-1h); color: var(--ink); }
.th-sent-state p  { margin: 0; color: var(--muted); }

/* [G5] step-progress (onboarding pip bar) (§B#7) */
.th-step-progress { display: flex; gap: var(--space-1); width: 100%; margin: 0 0 18px; }
.th-step-progress .th-pip {
  flex: 1 1 0;
  height: 3px;
  background: var(--line);
  border-radius: var(--radius-pill);
}
.th-step-progress .th-pip.th-is-done { background: var(--accent); }

/* =====================================================================
   SEG — segmented control (responsive: wraps when out of room)
   ===================================================================== */
.th-seg {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--paper-2, #ecebe7);
  border-radius: var(--radius-12);
}
.th-seg button {
  /* Size to content so wrap kicks in cleanly when container is full,
     instead of squishing each button below its text width. */
  flex: 0 0 auto;
  padding: var(--space-2) var(--space-2h);
  border: 0;
  background: transparent;
  color: var(--ink-2, #444);
  font-size: var(--fs-13);
  font-weight: 500;
  border-radius: 9px;
  white-space: nowrap;
  transition: background var(--t-fast, 120ms) var(--ease-soft, ease), color var(--t-fast, 120ms) var(--ease-soft, ease);
}
/* opt-in even grid (audience pickers): 3 equal columns, buttons fill their cell */
.th-seg.th-seg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-1h); }
.th-seg.th-seg-grid button { flex: 1; min-width: 0; white-space: normal; }
.th-seg button:hover { background: rgba(0, 0, 0, 0.04); }
.th-seg button.th-is-active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* =====================================================================
   SEG-RANK — the rank picker: a 4+3 grid of small cards, one per rank
   (Scout → Eagle), each a ~24px rank badge + a short label. Used wherever a
   parent sets/changes a Scout's rank — onboard-add-scout, the Edit-Scout
   dialog, scout-detail's "Change rank" sheet, rank-home's "Change rank".
   7 items in a 4-col grid → 4 on the first row, 3 on the second (left-aligned).
   ===================================================================== */
.th-seg-rank {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1h);
}
.th-seg-rank button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: var(--space-2) var(--space-1);
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-10);
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--t-fast) var(--ease-soft),
              background var(--t-fast) var(--ease-soft);
}
.th-seg-rank button:hover { border-color: #c8c4ba; background: var(--paper-2); }
.th-seg-rank button.th-is-active,
.th-seg-rank button.th-is-selected { border-color: var(--accent); background: var(--accent-s); }
.th-seg-rank button .th-rank-badge { width: 24px; height: 24px; padding-bottom: 3px; font-size: var(--fs-11); }
.th-seg-rank button .th-rank-badge.th-rank-star,
.th-seg-rank button .th-rank-badge.th-rank-life { font-size: var(--fs-10); }
.th-seg-rank button .th-label {
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.2;
}

/* =====================================================================
   TYPE-GRID — the event-type picker: a 4+3 grid of icon tiles, one per
   event type (meeting → fundraiser). Mirrors .th-seg-rank; the active tile
   gets the accent treatment and its .th-event-type square goes solid accent.
   ===================================================================== */
.th-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1h);
}
.th-type-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: var(--space-2) var(--space-1);
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-10);
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--t-fast) var(--ease-soft),
              background var(--t-fast) var(--ease-soft);
}
.th-type-grid button:hover { border-color: #c8c4ba; background: var(--paper-2); }
.th-type-grid button.th-is-active { border-color: var(--accent); background: var(--accent-s); }
.th-type-grid button.th-is-active .th-event-type { background: var(--accent); }
.th-type-grid button.th-is-active .th-event-type svg { color: #fff; }
.th-type-grid button .th-label {
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.2;
}

/* =====================================================================
   BANNER
   ===================================================================== */
.th-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2h) var(--space-3);
  border-radius: var(--radius-10);
  font-size: var(--fs-13);
  line-height: 1.45;
  background: var(--accent-s);
  color: var(--accent-d);
  border-left: 3px solid var(--accent);
}
.th-banner.th-warn { background: var(--warn-s); color: var(--warn); border-left-color: var(--warn); }
/* [G5] transient-status variants (§B#13) */
.th-banner.th-ok   { background: var(--ok-s);     color: var(--ok);        border-left-color: var(--ok); }
.th-banner.th-info { background: var(--accent-s);  color: var(--accent-d);  border-left-color: var(--accent); }
.th-banner.th-err  { background: var(--sig-no-s);  color: var(--sig-no);    border-left-color: var(--sig-no); }
.th-banner svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* =====================================================================
   [G5] CALLOUT — persistent page-level explainer. Always visible when
   the page renders; frames what a page does or asserts a critical
   constraint. Never dismissible, never toggled by JS. Contrast with
   .th-banner (transient status, shown/hidden by JS). Default accent hue =
   green (informational); .th-callout-warn = amber (caution, not an error).
   ===================================================================== */
.th-callout {
  padding: var(--space-2h) var(--space-3);
  border-radius: var(--radius-10);
  font-size: var(--fs-13);
  line-height: 1.45;
  background: var(--accent-s);
  color: var(--accent-d);
  border-left: 3px solid var(--accent);
}
.th-callout-warn {
  background: var(--warn-s);
  color: var(--warn);
  border-left-color: var(--warn);
}
/* .th-callout-accent is an explicit alias of the default accent treatment,
   kept so pages can name the hue intentionally alongside .th-callout-warn. */
.th-callout-accent {
  background: var(--accent-s);
  color: var(--accent-d);
  border-left-color: var(--accent);
}

/* =====================================================================
   [G5] FIELD VALIDATION KIT (§B#5)
   Three cooperating pieces:
     1. .th-form-error — inline message below a field (or at form top).
     2. .th-field-input.th-is-invalid — red border + soft halo on the input.
     3. @keyframes shake + .th-field-input.th-error — brief shake on submit
        attempt when a required field is empty or invalid.
   Cleared by JS on next user input. Pair .th-is-invalid fields with a
   .th-banner.th-warn at the top of the form for screen-reader users.
   ===================================================================== */
.th-form-error {
  color: var(--sig-no);
  font-size: var(--fs-13);
  margin: var(--space-1) 0 0;
  min-height: 1em;
  line-height: 1.4;
}
.th-field-input.th-is-invalid,
.th-field-textarea.th-is-invalid,
.th-seg-rank.th-is-invalid {
  border-color: var(--sig-no);
  box-shadow: 0 0 0 3px rgba(155, 58, 58, 0.10);
}
@keyframes shake {
  0%,  100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80%      { transform: translateX(3px);  }
}
.th-field-input.th-error,
.th-field-textarea.th-error {
  animation: shake 400ms var(--ease-soft);
}

/* Honor the HTML [hidden] attribute even on components that set display:
   above (e.g. .th-banner is display:flex, which silently clobbers [hidden]'s
   built-in display:none). Page-level toggles use `el.hidden = true/false`
   and expect this to win. */
[hidden] { display: none !important; }

/* =====================================================================
   EYEBROW / SECTION HEADER
   ===================================================================== */
.th-eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.th-eyebrow .th-meta {
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  float: right;
}

/* =====================================================================
   LIST
   ===================================================================== */
.th-list { display: flex; flex-direction: column; }
.th-list .th-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1h) 0;
  border-bottom: 1px solid var(--line-2);
}
.th-list .th-item:first-child { padding-top: 0; }
.th-list .th-item:last-child  { padding-bottom: 0; border-bottom: 0; }
.th-list .th-item .th-body { flex: 1 1 auto; min-width: 0; }
.th-list .th-item .th-body .th-name { font-weight: 500; font-size: var(--fs-14); color: var(--ink); }
.th-list .th-item .th-body .th-sub  { font-size: var(--fs-12); color: var(--muted); }
.th-list .th-item .th-right { color: var(--muted); font-size: var(--fs-12); white-space: nowrap; flex: 0 0 auto; }

/* Activity row (activity-row.js): desktop keeps time on the right; phones stack
   entity icon over channel icon, full sentence on line 1, "audience · time" muted on line 2. */
.th-list .th-item .th-act-when { display: none; }
.th-list .th-item .th-act-meta.th-act-noaud { display: none; }
@media (max-width: 719px) {
  .th-list .th-item { align-items: flex-start; }
  .th-list .th-item .th-ce-pill { flex-direction: column; gap: var(--space-1); padding: var(--space-1h) var(--space-1); }
  .th-list .th-item .th-ce-pill .th-sep { width: 12px; height: 1px; margin: 0; }
  .th-list .th-item .th-act-name { white-space: normal; overflow: visible; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .th-list .th-item .th-act-when { display: inline; }
  .th-list .th-item .th-act-meta.th-act-noaud { display: block; }
  .th-list .th-item .th-act-right { display: none; }
}

/* §07g Activity-row unread cue. The .th-ce-pill carries the channel color
   already; we can't tint a single corner of the pill to mean "unread"
   without breaking the channel signal. So we mark unread on the name —
   bold weight is the same pattern bell-feed lists use everywhere else,
   and a colorblind viewer still reads "unread" via the weight contrast. */
.th-list .th-item.th-is-unread .th-body .th-name { font-weight: 700; }

/* =====================================================================
   SCOUT SUMMARY CARD (§07h) — compact card per Scout, laid out in an
   auto-fit grid. Used on shell-home Rank Up + rank.html multi-Scout
   picker. Each card surfaces rank + what they're working on + last
   completed. Click → /rank.html?scout_id=… (Scout's full requirements
   view). Replaces the one-line nav rows that wasted horizontal space.
   ===================================================================== */
.th-scout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2);
}
.th-scout-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-12);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color var(--t-fast) var(--ease-soft),
              background var(--t-fast) var(--ease-soft),
              transform 80ms ease;
}
.th-scout-card:hover { border-color: var(--accent-s); background: var(--paper-2); }
.th-scout-card:active { transform: scale(0.99); }
.th-scout-card .th-sc-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.th-scout-card .th-sc-head .th-rank-badge { flex: 0 0 auto; }
.th-scout-card .th-sc-identity { min-width: 0; flex: 1; }
.th-scout-card .th-sc-name {
  font-weight: 600;
  font-size: var(--fs-14);
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.th-scout-card .th-sc-rank {
  font-size: var(--fs-11);
  color: var(--muted);
  margin-top: 1px;
}
.th-scout-card .th-sc-working {
  font-size: var(--fs-12);
  color: var(--ink-2);
  margin-top: var(--space-1);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.th-scout-card .th-sc-working.th-is-quiet {
  color: var(--muted);
  font-style: italic;
}
.th-scout-card .th-sc-working.th-is-signoff {
  color: var(--accent);
  font-weight: 600;
}
.th-scout-card .th-sc-last {
  font-size: var(--fs-11);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
/* Sign-off ready accent — left-edge stripe when a Scout has done_self
   marks awaiting parent Scoutbook attestation. */
.th-scout-card.th-is-signoff {
  border-left: 3px solid var(--accent);
  padding-left: calc(var(--space-3) - 2px);
}

/* =====================================================================
   TRAIL ILLUSTRATION (empty states)
   ===================================================================== */
.th-trail-illust {
  display: block;
  margin: 0 auto;
}

/* =====================================================================
   [G5] SKELETON SHIMMER + EMPTY STATE (§B#4)
   .th-skel — animated placeholder row while first fetch resolves.
   .th-list-empty — centred zero-state block (icon circle + copy).
   ===================================================================== */
@keyframes skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.th-skel {
  height: 64px;
  border-radius: var(--radius-12);
  background: linear-gradient(
    90deg,
    var(--paper-2) 0%,
    var(--paper-3) 50%,
    var(--paper-2) 100%
  );
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
  margin-bottom: var(--space-3);
}
@media (prefers-reduced-motion: reduce) {
  .th-skel { animation: none; }
}
.th-list-empty {
  color: var(--muted);
  font-size: var(--fs-14);
  padding: var(--space-8) var(--space-5);
  text-align: center;
  line-height: 1.5;
}
.th-list-empty .th-ico {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

/* =====================================================================
   [G5] MINI-APP STATES (§B#11)
   .th-state-error / .th-state-empty — centred takeover messages.
   .th-gated-shell — hide page body until JS resolves auth/data.
   .th-signed-out-cta — CTA row shown to signed-out visitors.
   .th-header-who — mini-app header identity string.
   ===================================================================== */
.th-state-error,
.th-state-empty {
  text-align: center;
  padding: 48px var(--space-6);
  color: var(--muted);
}
.th-state-error h2,
.th-state-empty h2 {
  margin: 0 0 var(--space-2);
  color: var(--ink);
  font-size: var(--fs-18);
}
.th-state-error p,
.th-state-empty p { margin: 0; }

.th-gated-shell { display: none; }
.th-gated-shell.th-is-ready { display: block; }

.th-signed-out-cta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-5);
}
.th-signed-out-cta.th-is-centered { justify-content: center; }

.th-header-who {
  font-size: var(--fs-12);
  color: var(--ink-2);
  padding-right: var(--space-1h);
}

/* =====================================================================
   WEEK STRIP (Rank Up)
   ===================================================================== */
.th-week-strip {
  display: flex;
  gap: var(--space-1h);
  padding: var(--space-2);
  background: var(--paper-2);
  border-radius: var(--radius-12);
  border: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.th-week-strip::-webkit-scrollbar { display: none; }
.th-week-strip .th-day {
  flex: 0 0 auto;
  min-width: 42px;
  padding: var(--space-1h) var(--space-2);
  text-align: center;
  border-radius: var(--radius-8);
  background: var(--paper);
  font-size: var(--fs-11);
  color: var(--muted);
  border: 1px solid var(--line-2);
  font-weight: 500;
}
.th-week-strip .th-day .th-num {
  font-size: var(--fs-16);
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.1;
}
.th-week-strip .th-day.th-today {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.th-week-strip .th-day.th-today .th-num { color: #fff; }
.th-week-strip .th-day.th-marked {
  background: var(--accent-s);
  border-color: var(--accent);
  color: var(--accent-d);
}
.th-week-strip .th-day.th-marked .th-num { color: var(--accent-d); }

/* =====================================================================
   REQ CHIP (Rank Up requirement state)
   ===================================================================== */
.th-req-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2h);
  border-radius: var(--radius-8);
  font-size: var(--fs-11);
  font-weight: 700;
  background: var(--paper-3);
  color: var(--ink-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.th-req-chip.th-working  { background: var(--trail-s);  color: var(--trail); }
.th-req-chip.th-complete { background: var(--accent-s); color: var(--accent-d); }
.th-req-chip.th-signed   { background: var(--accent);   color: #fff; }

/* =====================================================================
   TALLY BAR / TALLY ROW — poll results. Leader-only on the open-poll list +
   detail; revealed to everyone on close (M10 — the lock morphs to this bar,
   segments grow from 0). Up to 4 option colors + a "silent / not yet voted"
   neutral segment.
   ===================================================================== */
.th-tally-bar {
  display: flex;
  height: 10px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--line-2);
}
.th-tally-bar > span { display: block; height: 100%; transition: width var(--t-slow) var(--ease-soft); }
.th-tally-bar .th-seg-yes, .th-tally-bar .th-seg-1 { background: var(--sig-yes); }
.th-tally-bar .th-seg-int, .th-tally-bar .th-seg-2 { background: var(--sig-int); }
.th-tally-bar .th-seg-no,  .th-tally-bar .th-seg-3 { background: var(--sig-no); }
.th-tally-bar .th-seg-go,  .th-tally-bar .th-seg-4 { background: #6e7470; }
.th-tally-bar .th-seg-silent { background: var(--line); }

.th-tally-rows { display: flex; flex-direction: column; gap: 7px; margin-top: var(--space-2h); }
.th-tally-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-13);
}
.th-tally-row .th-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); flex: 0 0 auto; }
.th-tally-row .th-dot.th-seg-yes, .th-tally-row .th-dot.th-seg-1 { background: var(--sig-yes); }
.th-tally-row .th-dot.th-seg-int, .th-tally-row .th-dot.th-seg-2 { background: var(--sig-int); }
.th-tally-row .th-dot.th-seg-no,  .th-tally-row .th-dot.th-seg-3 { background: var(--sig-no); }
.th-tally-row .th-dot.th-seg-go,  .th-tally-row .th-dot.th-seg-4 { background: #6e7470; }
.th-tally-row .th-dot.th-seg-silent { background: var(--line); }
.th-tally-row .th-lbl { flex: 1 1 auto; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-tally-row .th-pct { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.th-tally-row .th-cnt { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--fs-12); }
.th-tally-row.th-silent .th-lbl, .th-tally-row.th-silent .th-cnt { color: var(--muted); font-style: italic; }

/* Compact inline form — "● 7 camporee · ● 4 cohasset · ● 1 either" */
.th-tally-stats { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: var(--fs-12); color: var(--muted); }
.th-tally-stats .th-tally-stat { display: inline-flex; align-items: center; gap: var(--space-1h); }
.th-tally-stats .th-tally-stat .th-dot { width: 7px; height: 7px; border-radius: var(--radius-pill); flex: 0 0 auto; }
.th-tally-stats .th-tally-stat .th-dot.th-seg-yes, .th-tally-stats .th-tally-stat .th-dot.th-seg-1 { background: var(--sig-yes); }
.th-tally-stats .th-tally-stat .th-dot.th-seg-int, .th-tally-stats .th-tally-stat .th-dot.th-seg-2 { background: var(--sig-int); }
.th-tally-stats .th-tally-stat .th-dot.th-seg-no,  .th-tally-stats .th-tally-stat .th-dot.th-seg-3 { background: var(--sig-no); }
.th-tally-stats .th-tally-stat .th-dot.th-seg-go,  .th-tally-stats .th-tally-stat .th-dot.th-seg-4 { background: #6e7470; }

/* =====================================================================
   UTILITY classes
   ===================================================================== */
.th-row { display: flex; align-items: center; gap: var(--space-3); }
.th-row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.th-stack-2 { display: flex; flex-direction: column; gap: var(--space-2); }
/* .th-form-actions = the button row at the foot of a form (Back · Submit), buttons share
   the width. Was page-local in events-mini/share.html and an inline style in
   polls-mini/share.html; promoted here 2026-10-16 so it is defined once. */
.th-form-actions { display: flex; gap: var(--space-2h); margin-top: var(--space-6); }
.th-form-actions .th-btn { flex: 1; }

/* .th-form-stack = the rhythm INSIDE a card/form: field→field, field→button, --form-gap.
   Gap is the --form-gap token. */
.th-stack-3 { display: flex; flex-direction: column; gap: var(--space-3); }
/* forms use ONE gap token (--form-gap), so every field stack matches. */
.th-form-stack { display: flex; flex-direction: column; gap: var(--form-gap); }
.th-stack-4 { display: flex; flex-direction: column; gap: var(--space-5); }
.th-text-muted { color: var(--muted); }
.th-text-trail { color: var(--trail); }
.th-text-sm { font-size: var(--fs-13); }
.th-text-xs { font-size: var(--fs-12); }
.th-fwm { font-weight: 500; }
.th-fwsb { font-weight: 600; }
.th-flex-1 { flex: 1 1 auto; min-width: 0; }

/* Truncate-with-ellipsis — the long-content rule. Card titles, list-item
   names, metas → .th-truncate (1 line + ellipsis). The card / row that wraps
   the text is the tap target; users learn ellipsis = "tap for more." No
   1-row vs 2-row markup branches. .th-truncate-2 is the 2-line clamp variant
   for descriptions where 1 line is too thin.
   `min-width: 0` lets the element actually shrink inside a flex parent. */
.th-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.th-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
          line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
}

/* =====================================================================
   SHARE-LINK MINI-APP LAYOUT (responsive — phone or desktop)
   For events.trailhead.app, polls.trailhead.app, rankup.trailhead.app.
   No fixed nav. Centered content, max ~720px on desktop.
   ===================================================================== */

/* Page shell — applied to <body> on share-link pages.
   Independent of `body.th-screen` (which is mobile-iframe-locked); this body
   scrolls naturally and carries the typography defaults itself. */
.th-share-shell {
  background: var(--paper-2);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: 1.45;
  color: var(--ink);
  font-feature-settings: "ss01" 1, "cv11" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The Save / Cancel bar sits just above the bottom tab bar when the page has one. */
.th-frame:has(> .th-nav-bar) > .th-action-area { bottom: var(--nav-h); }

/* Top header — slim brand bar, sticky */
.th-share-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  /* Full-bleed bar, but its CONTENT is capped to the same centered 720px
     column as .share-main — otherwise the brand + who-am-i (and the switcher)
     get pushed to the screen edges on desktop while the body sits centered. */
  padding: 14px max(20px, calc((100% - 720px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  position: sticky;
  top: 0;
  z-index: 10;
}
.th-share-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2h);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--fs-15);
  letter-spacing: -0.005em;
}
.th-share-brand .th-mark {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.th-share-signin {
  font-size: var(--fs-13);
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

/* who-am-i menu — sign-out popover anchored to the signed-in name in the
   mini-app header. Wired by /vendor/who-am-i.js. */
.th-who-am-i-menu { position: relative; display: inline-block; }
/* The trigger is the person icon (+ the name from 720px): a 44px tap target. */
#who-am-i.th-who-trigger { display: inline-flex; align-items: center; gap: var(--space-1h); min-height: 44px; min-width: 44px; justify-content: center; }
.th-who-name { display: none; font-weight: 500; color: var(--ink); }
@media (min-width: 720px) { .th-who-name { display: inline; } }
.th-who-pop-label { margin: 0; padding: var(--space-2) var(--space-3); font-size: var(--fs-12); color: var(--muted); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.th-who-trigger { cursor: pointer; user-select: none; }
.th-who-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.th-who-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-8);
  box-shadow: var(--shadow-pop);
  min-width: 160px;
  padding: var(--space-1);
  z-index: 11;
}
.th-who-pop[hidden] { display: none; }
.th-who-pop-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-2h) var(--space-3);
  border-radius: var(--radius-6);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: var(--fs-14);
  cursor: pointer;
  color: var(--ink);
}
.th-who-pop-item:hover,
.th-who-pop-item:focus-visible {
  background: var(--paper-2);
  outline: none;
}
.th-who-pop-item.th-sign-out { color: var(--sig-no); }

/* Multi-patrol picker — revealed when "A patrol" is selected in the compose
   audience picker. Lays out as an "All patrols" shortcut row above a 3-col
   grid of toggleable patrol chips. Source: A6 mockup at
   architecture/mockups/mobile/patrol-picker-compose.html. */
.th-patrol-chips {
  display: block;
  margin-top: var(--space-2);
}
.th-patrol-chips[hidden] { display: none; }
.th-patrol-shortcut-row {
  margin-bottom: var(--space-1h);
}
.th-patrol-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  justify-content: center;
  padding: var(--space-1h) var(--space-2h);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-11);
  font-weight: 600;
  background: var(--ch-all-s);
  color: var(--ch-all);
}
.th-patrol-shortcut.th-is-selected { box-shadow: 0 0 0 2px currentColor; }
.th-patrol-shortcut i { width: 13px; height: 13px; }
.th-patrol-picker-chips {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}
.th-patrol-picker-chips .th-channel-chip {
  cursor: pointer;
  border: 0;
  font: inherit;
  font-size: var(--fs-11);
  font-weight: 600;
  padding: 5px var(--space-2);
  justify-content: center;
}
/* The chip's hue + the meta-line label already carry the "this is a patrol"
   cue; the flag glyph is redundant inside the picker grid. */
.th-patrol-picker-chips .th-channel-chip i { display: none; }
.th-channel-chip.th-is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.th-patrol-summary {
  margin-top: var(--space-2h);
  padding: var(--space-2) var(--space-3);
  background: var(--paper-2);
  border-radius: var(--radius-8);
  font-size: var(--fs-13);
  color: var(--ink);
}
.th-patrol-summary strong { color: var(--muted); font-weight: 500; margin-right: var(--space-1h); }
.th-patrol-summary .th-none { color: var(--muted); font-style: italic; }

/* Scout-PL audience lock — shown to a Scout-PL/SPL in place of the picker
   when their authority allows exactly one valid audience. Read-only label +
   the locked channel chip. */
.th-audience-lock {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.th-audience-lock[hidden] { display: none; }
.th-audience-lock-label {
  font-size: var(--fs-12);
  color: var(--ink-2);
  font-weight: 500;
}

/* A4 "you're in" welcome card — shown on a mini-app index when ?signedin=1
   lands the user there fresh from /verify. Tappable away; same share-card
   chrome with a tighter footer of two buttons. */
.th-welcome-card[hidden] { display: none; }
.th-welcome-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Mini-app pages migrated onto the umbrella's screen/frame shell.
   They keep the share-header (switcher injects here) and build their content from the
   umbrella's own primitives (.th-pad page container, .th-card, .th-card-head, .th-meta),
   inside the locked .th-frame so the body locks and only .th-frame-content scrolls —
   identical rendering model to the umbrella. Scoped to `body.th-screen .th-frame >` so the
   share-shell pages (still body.th-share-shell) are completely untouched.
   --------------------------------------------------------------------- */
body.th-screen .th-frame > .th-share-header {
  /* The frame's pinned top region: sticky to the top of the scrolling document (a positioned box, so the
     notice band can anchor inside it). */
  position: sticky;
  top: 0;
  flex: 0 0 auto;
}
body.th-screen .th-frame > .th-frame-content { background: var(--paper-2); }

/* Page head — title + meta + description */
.th-page-head { margin: 0; } /* section spacing = the .th-pad / .th-mini-* container gap */
.th-page-head .th-eyebrow { margin-bottom: var(--space-2); }
/* Kicker row above the hero title: the entity marker (.th-ce-pill) + the eyebrow.
   The marker sits here, not inside the <h1>, so the title wraps cleanly (as in
   the mini-app mockups); one rule for every share page that shows an entity. */
.th-page-head .th-hero-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.th-page-head .th-hero-kicker .th-eyebrow { margin: 0; }
/* Hero role, style guide §07b: 24 / 800 at every width ("don't responsive-tier-up
   type sizes"). Was 28 → 36 / 700 from the pre-guide mockup stylesheet. */
.th-page-head h1 {
  font-size: var(--fs-24);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 var(--space-3);
  /* Plain wrapping: fill each line as far as it goes (Corey: "Fall campout at Camp" fits on
     line one). balance / pretty both pulled words down to even the lines out. */
  text-wrap: wrap;
}
.th-page-head .th-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.th-page-head .th-desc {
  color: var(--ink-2);
  font-size: var(--fs-15);
  line-height: 1.55;
  margin: 0;
}
/* CUSTOM PRIMITIVE — leader action row (style guide: "Leader action row").
   Edit / Approvals / … as compact secondary buttons under a mini-app hero. Mini-app
   pages only: their header holds the app tabs, so leader actions can't go in the
   header the way the umbrella's do (.th-header-actions). */
.th-action-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }

/* Guest RSVP button row (Going / Maybe / Can't) inside a .th-card. */
.th-guest-rsvp-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Table → cards (responsive) */
.th-share-table {
  width: 100%;
  border-collapse: collapse;
}
.th-share-table thead th {
  text-align: left;
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
}
.th-share-table tbody td {
  padding: var(--space-3);
  font-size: var(--fs-14);
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.th-share-table tbody tr:last-child td { border-bottom: none; }
.th-share-table .th-col-action {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

/* Phone collapse — at <720px, render the table as stacked cards */
@media (max-width: 719px) {
  .th-share-table thead { display: none; }
  .th-share-table,
  .th-share-table tbody,
  .th-share-table tr,
  .th-share-table td {
    display: block;
    width: 100%;
  }
  .th-share-table tbody tr {
    border: 1px solid var(--line);
    border-radius: var(--radius-10);
    margin-bottom: var(--space-2);
    padding: var(--space-3);
  }
  .th-share-table tbody td {
    border: none;
    padding: var(--space-1) 0;
  }
  .th-share-table td.th-col-action {
    text-align: left;
    margin-top: var(--space-2);
  }
  .th-share-table td[data-label]:before {
    content: attr(data-label);
    display: block;
    font-size: var(--fs-11);
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: var(--space-0);
  }
}

/* Submit row — inline at form-end on desktop, full-width on phone */
.th-share-submit {
  margin-top: var(--space-7);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}
@media (max-width: 719px) {
  .th-share-submit { justify-content: stretch; }
  .th-share-submit .th-btn { flex: 1; }
}

/* CUSTOM PRIMITIVE — mini-app footer: one compact quiet credit (the umbrella has none). */
.th-mini-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-3) var(--space-5);
  text-align: center;
  font-size: var(--fs-12);
  color: var(--muted);
}
.th-mini-footer a { color: var(--muted); text-decoration: underline; }
.th-mini-footer p { margin: 0; }

/* =====================================================================
   HOLD-TO-CONFIRM GESTURE (slice 5.3)
   - Press-and-hold a button for --hold-duration to fire a destructive /
     irreversible action (e.g. set Scout rank). Releasing early cancels.
   - The radial conic-gradient fills the button border-area while the
     pointer is held; once full, the JS handler runs.
   - Reduced-motion path bypasses the fill and uses a tap → modal flow
     instead — see .th-hold-confirm-overlay below.
   ===================================================================== */
.th-hold-progress {
  position: relative;
  isolation: isolate;
}
.th-hold-progress::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(var(--accent) var(--hold-fill, 0%), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 66%);
          mask: radial-gradient(circle, transparent 64%, #000 66%);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-soft);
  z-index: -1;
}
.th-hold-progress.th-is-holding::before {
  opacity: 1;
  animation: hold-fill var(--hold-duration) linear forwards;
}
.th-hold-progress.th-is-confirmed::before {
  opacity: 1;
  --hold-fill: 100%;
  background: conic-gradient(var(--accent) 100%, transparent 0);
}
@keyframes hold-fill {
  from { --hold-fill: 0%; }
  to   { --hold-fill: 100%; }
}
/* The custom property animation needs registration for older engines; the
   keyframe falls back to a width-based pseudo on those. */
@property --hold-fill {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: false;
}

@media (prefers-reduced-motion: reduce) {
  .th-hold-progress::before { display: none; }
  .th-hold-progress.th-is-holding::before { animation: none; }
}

/* Reduced-motion confirm modal injected by hold-confirm.js */
.th-hold-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 23, 20, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-overlay);
  padding: var(--space-6);
}
.th-hold-confirm-card {
  background: var(--paper);
  border-radius: var(--radius-14);
  padding: var(--space-6);
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-float);
}
.th-hold-confirm-msg {
  margin: 0 0 var(--space-5);
  font-size: var(--fs-15);
  color: var(--ink);
  line-height: 1.45;
}
.th-hold-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* Visually-hidden utility — content reachable to assistive tech but not
   painted. Used for per-page <h1> on surfaces whose visible heading is
   styled as <h2> or whose primary identity is the brand chrome (logo).
   Pattern lifted from WebAIM. */
.th-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;
}

/* C6 umbrella bottom nav lives in `.th-nav-bar` / `.th-nav-tab` / `.th-nav-ico-wrap`
   above (mockup-aligned). bottom-nav.js injects that markup; pages don't
   need a `.has-bottom-nav` body class — the nav participates in the
   frame's flex layout. */

/* =====================================================================
   META-ACTION — §09 Kind A "act on everything" affordance
   - Quiet inline button at the top of an affected list (Mark all read,
     Approve all proposals). NOT multi-select (that's §09 Kind B).
   - The verb states the count: "Mark 4 unread as read".
   ===================================================================== */
.th-meta-action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1h);
  padding: var(--space-1h) var(--space-2h);
  margin: 0 0 var(--space-2h);
  font: inherit;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-s);
  border: 1px solid transparent;
  border-radius: var(--radius-8);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-soft),
              border-color var(--t-fast) var(--ease-soft);
}
.th-meta-action:hover {
  background: var(--paper);
  border-color: var(--accent);
}
.th-meta-action svg,
.th-meta-action i { width: 14px; height: 14px; }

/* =====================================================================
   SECTION-INTRO — small explanatory line below a section eyebrow
   ===================================================================== */
.th-section-intro {
  font-size: var(--fs-12);
  color: var(--muted);
  margin: -2px 0 var(--space-2);
  line-height: 1.5;
}

/* =====================================================================
   NAV-CARD — compact list rows for the management nav (me.html)
   - Smaller than .th-card .th-item; built for "many small targets, lots of
     stacking" (Leadership / Administration / Patrol-leadership sections).
   - Variants tint the ico bg: is-admin (amber), is-troop (violet),
     is-patrol (green).
   ===================================================================== */
.th-nav-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-14);
  overflow: hidden;
}
.th-nav-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px var(--space-4);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
}
.th-nav-row:last-child { border-bottom: 0; }
.th-nav-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-s);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.th-nav-ico i,
.th-nav-ico svg { width: 16px; height: 16px; }
.th-nav-body { flex: 1; min-width: 0; }
.th-nav-name { font-size: var(--fs-14); font-weight: 600; color: var(--ink); }
.th-nav-sub  { font-size: var(--fs-12); color: var(--muted); margin-top: 1px; }
.th-nav-chev { color: var(--muted); font-size: var(--fs-18); }

.th-nav-card.th-is-admin             { background: var(--paper-2); border-color: var(--line); }
.th-nav-card.th-is-admin .th-nav-ico    { background: var(--amber-s); color: var(--amber-ink); }
.th-nav-card.th-is-troop  .th-nav-ico   { background: #ede9fe; color: #5b21b6; }
.th-nav-card.th-is-patrol .th-nav-ico   { background: #dcfce7; color: #15803d; }

/* =====================================================================
   BADGE-FUTURE — "this section isn't built yet" inline marker
   ===================================================================== */
.th-badge-future {
  display: inline-block;
  font-size: var(--fs-9);
  font-weight: 700;
  padding: var(--space-0) var(--space-1h);
  border-radius: var(--radius-6);
  background: var(--amber-s);
  color: var(--amber-ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
  margin-left: var(--space-1);
}

/* =====================================================================
   STAT-STRIP — at-a-glance count row at the top of a section
   - Default 4 cells (me-admin section); use --stat-cols to override
     (me-pl uses 3 cells; an SPL hub might use 5).
   - Cell shows num over uppercase label; is-flag tints amber when the
     value needs attention (e.g. "3 pending invites").
   ===================================================================== */
.th-stat-strip {
  display: grid;
  grid-template-columns: repeat(var(--stat-cols, 4), 1fr);
  gap: var(--space-1h);
  margin-bottom: var(--space-2h);
}
.th-stat-strip.th-stat-3 { --stat-cols: 3; }
.th-stat-strip.th-stat-4 { --stat-cols: 4; }
.th-stat-cell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-10);
  padding: var(--space-2) var(--space-1h);
  text-align: center;
}
.th-stat-cell .th-stat-num {
  font-size: var(--fs-16);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
}
.th-stat-cell .th-stat-lbl {
  font-size: var(--fs-9);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
}
.th-stat-cell.th-is-flag             { background: var(--amber-s); border-color: #fde68a; }
.th-stat-cell.th-is-flag .th-stat-num   { color: var(--amber-ink); }
.th-stat-cell.th-is-flag .th-stat-lbl   { color: var(--amber-ink); }

/* =====================================================================
   ATTN-CARD — "Needs attention" nudges (the tiny-hands list)
   - Amber border; rows are tappable links to whatever needs doing.
   ===================================================================== */
.th-attn-card {
  background: var(--paper);
  border: 1px solid #fde68a;
  border-radius: var(--radius-12);
  padding: var(--space-2h) var(--space-3);
  margin-bottom: var(--space-3);
}
.th-attn-head {
  display: flex;
  align-items: center;
  gap: var(--space-1h);
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--amber-ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1h);
}
.th-attn-row {
  display: flex;
  align-items: center;
  gap: var(--space-2h);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line-2);
  text-decoration: none;
  color: inherit;
}
.th-attn-row:first-of-type { border-top: 0; }
.th-attn-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.th-attn-body strong { font-size: var(--fs-13); font-weight: 600; color: var(--ink); }
.th-attn-sub { font-size: var(--fs-11); color: var(--muted); line-height: 1.35; }
.th-attn-act {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--accent);
  padding: var(--space-1) var(--space-2h);
  border-radius: var(--radius-8);
  flex: 0 0 auto;
}
.th-attn-row:hover .th-attn-act { background: var(--accent-s); }

/* =====================================================================
   ALL-CAUGHT-UP — §09d compressed-celebrate empty-state pill
   - Same spatial slot as an .th-attn-card (or a workflow card); shrinks
     to a single affirmative line when there's nothing to do.
   - Rule: --ok accent (not --accent), affirmative copy ("All Scouts
     accounted for", not "No unassigned Scouts"), checkmark icon.
   ===================================================================== */
.th-all-caught-up {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--ok-s);
  border: 1px solid var(--ok);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius-10);
  font-size: var(--fs-13);
  color: var(--ok);
  font-weight: 600;
}
.th-all-caught-up i,
.th-all-caught-up svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* =====================================================================
   PATROL-CARD — the admin-patrols / admin-leadership patrol container
   - One --ch-patrol hue covers every patrol regardless of count (§03b
     channel-chip rule: the band marks scope, not identity). Identity
     comes from the patrol name in the head row.
   - is-unassigned amber-tints the card for the "Scouts not yet placed"
     workflow surface; pair with .th-unassigned-note for the explainer.
   ===================================================================== */
.th-patrol-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-14);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}
.th-patrol-head {
  display: flex;
  align-items: center;
  gap: var(--space-2h);
  margin-bottom: var(--space-2h);
}
.th-patrol-flag {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--ch-patrol-s);
  color: var(--ch-patrol);
}
.th-patrol-flag i,
.th-patrol-flag svg { width: 18px; height: 18px; }
.th-patrol-name {
  flex: 1;
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.th-patrol-count {
  font-size: var(--fs-12);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.th-patrol-edit {
  color: var(--accent);
  font-size: var(--fs-13);
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-1) var(--space-2h);
  border-radius: var(--radius-8);
}
.th-patrol-edit:hover { background: var(--accent-s); }

.th-patrol-card.th-is-unassigned {
  border-left: 3px solid #d97706;
  background: #fffbeb;
}
.th-patrol-card.th-is-unassigned .th-patrol-count {
  color: var(--amber-ink);
  font-weight: 600;
}

/* The unassigned explainer that sits inside an is-unassigned patrol-card. */
.th-unassigned-note {
  font-size: var(--fs-12);
  color: var(--amber-ink);
  line-height: 1.45;
  margin: 0 0 var(--space-2h);
  padding: var(--space-2) var(--space-2h);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-8);
}

/* =====================================================================
   BADGE-CLIP wrapper utility (§07c)
   - Absolute-positioned badges/affordances on top of an element that
     itself has overflow:hidden (typically .th-truncate / .th-truncate-2) get
     clipped. Wrap the truncating element in .th-badge-clip; the wrapper
     is the positioning context and lets badges escape; the inner
     element keeps its truncate behavior.
   ===================================================================== */
.th-badge-clip {
  position: relative;
  overflow: visible;
  min-width: 0;
  flex: 1;
}

/* =====================================================================
   RANK PAGE — shared styles for the rank surface.
   Used by the umbrella's apps/mobile/rank.html and the rank-up mini-app's
   apps/rankup-mini/requirement.html so both pages stay in sync without
   per-file duplication. Any rank-page change lands here once and shows
   up on both surfaces automatically.
   ===================================================================== */

/* ── Buddy panel (Help you / Need you) ── */
.th-buddy-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-12); overflow: hidden; }
.th-buddy-row { display: flex; align-items: center; gap: var(--space-2h); width: 100%; padding: var(--space-2h) var(--space-3); background: transparent; border: 0; cursor: pointer; font-family: inherit; text-align: left; transition: background var(--t-fast) var(--ease-soft); -webkit-tap-highlight-color: transparent; }
.th-buddy-row + .th-buddy-row, .th-buddy-row + .th-buddy-detail, .th-buddy-detail + .th-buddy-row { border-top: 1px solid var(--line-2); }
.th-buddy-row:hover { background: var(--paper-2); }
.th-buddy-row .th-ico { width: 28px; height: 28px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.th-buddy-row .th-ico svg { width: 14px; height: 14px; }
.th-buddy-row.th-help .th-ico { background: var(--accent-s); color: var(--accent-d); }
.th-buddy-row.th-need .th-ico { background: var(--trail-s); color: var(--trail); }
.th-buddy-row .th-label { flex: 0 0 auto; font-size: var(--fs-13); font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
.th-buddy-row .th-pile { flex: 1 1 auto; display: flex; align-items: center; min-width: 0; }
.th-buddy-row .th-pile .th-av { width: 22px; height: 22px; border-radius: var(--radius-pill); margin-left: -6px; border: 2px solid var(--paper); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-10); font-weight: 700; flex-shrink: 0; }
.th-buddy-row .th-pile .th-av:first-child { margin-left: 0; }
.th-buddy-row.th-help .th-pile .th-av { background: var(--accent); color: #fff; }
.th-buddy-row.th-need .th-pile .th-av { background: var(--trail); color: #fff; }
.th-buddy-row .th-pile .th-empty { font-size: var(--fs-11); color: var(--muted); font-style: italic; margin-left: 0; }
.th-buddy-row .th-count { flex: 0 0 auto; font-size: var(--fs-13); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; }
.th-buddy-row .th-chev { flex: 0 0 auto; color: var(--muted); transition: transform var(--t-med) var(--ease-soft); }
.th-buddy-row .th-chev svg { width: 16px; height: 16px; display: block; }
.th-buddy-row.th-is-open .th-chev { transform: rotate(180deg); }
.th-buddy-detail { background: var(--paper-2); padding: var(--space-2) var(--space-3) var(--space-3); border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: var(--space-1h); }
.th-buddy-detail .th-b-row { display: flex; align-items: center; gap: var(--space-2h); padding: var(--space-1h) 0; }
.th-buddy-detail .th-b-row .th-av { width: 26px; height: 26px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-11); font-weight: 700; flex-shrink: 0; }
.th-buddy-row.th-help + .th-buddy-detail .th-b-row .th-av { background: var(--accent); color: #fff; }
.th-buddy-row.th-need + .th-buddy-detail .th-b-row .th-av { background: var(--trail); color: #fff; }
.th-buddy-detail .th-b-row .th-body { flex: 1; min-width: 0; }
.th-buddy-detail .th-b-row .th-name { font-size: var(--fs-13); font-weight: 600; color: var(--ink); }
.th-buddy-detail .th-b-row .th-reqs { font-family: var(--font-mono); font-size: var(--fs-11); color: var(--muted); }
.th-buddy-detail .th-b-foot { font-size: var(--fs-11); color: var(--muted); font-style: italic; padding: var(--space-1) 0 0; border-top: 1px dashed var(--line); margin-top: var(--space-1); text-wrap: balance; }

/* ── Req table ── */
.th-req-table { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-12); overflow: hidden; }
.th-req-table-head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2h) var(--space-4); background: var(--paper-2); border-bottom: 1px solid var(--line); }
.th-req-table-head .th-badge { font-size: var(--fs-10); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--trail); }
.th-req-table-head .th-ttl { flex: 1; font-size: var(--fs-14); font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
.th-req-table-head .th-meta { font-size: var(--fs-11); color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.th-req-table-head .th-edit-rank { background: transparent; border: 0; color: var(--accent); cursor: pointer; font-family: inherit; font-size: var(--fs-11); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; padding: var(--space-0) var(--space-1); text-decoration: none; }
.th-req-table-head .th-edit-rank svg { width: 11px; height: 11px; }
.th-req-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 22px; align-items: center; gap: var(--space-2); width: 100%; padding: 11px var(--space-3); background: var(--paper); border: 0; border-bottom: 1px solid var(--line-2); cursor: pointer; font-family: inherit; text-align: left; transition: background var(--t-fast) var(--ease-soft); -webkit-tap-highlight-color: transparent; }
.th-req-row:last-child { border-bottom: 0; }
.th-req-row:hover, .th-req-row.th-is-open { background: var(--paper-2); }
.th-req-row .th-col-num { font-weight: 700; font-size: var(--fs-12); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; font-family: var(--font-mono); }
.th-req-row.th-done .th-col-num { color: var(--accent-d); }
.th-req-row.th-working .th-col-num { color: var(--trail); }
.th-req-row .th-col-label { font-size: var(--fs-14); color: var(--ink); font-weight: 500; letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-req-row.th-done .th-col-label { color: var(--accent-d); }
.th-req-row.th-working .th-col-label { color: var(--trail); }
.th-req-row .th-col-meta { display: flex; align-items: center; gap: var(--space-1); font-size: var(--fs-11); font-weight: 600; font-variant-numeric: tabular-nums; }
.th-req-row .th-col-state { display: flex; align-items: center; justify-content: center; color: var(--line); }
.th-req-row .th-col-state svg { width: 18px; height: 18px; }
.th-req-row.th-working .th-col-state { color: var(--trail); }
.th-req-row.th-done .th-col-state { color: var(--accent); }

/* Capsule pips — two side-by-side counts in the meta column:
     .th-pip.th-done    → green "✓ N" count of patrol-mates who've done it
     .th-pip.th-working → tan "○ N" count of patrol-mates currently working on it
   Each renders only when its count is > 0 (silence reads cleaner than "0"). */
.th-req-row .th-col-meta .th-pip {
  display: inline-flex; align-items: center; gap: var(--space-0);
  padding: var(--space-0) 7px; border-radius: var(--radius-pill);
  background: var(--paper-3); color: var(--muted);
}
.th-req-row .th-col-meta .th-pip svg { width: 10px; height: 10px; }
.th-req-row .th-col-meta .th-pip.th-done    { background: var(--accent-s); color: var(--accent-d); }
.th-req-row .th-col-meta .th-pip.th-working { background: var(--trail-s);  color: var(--trail); }

/* ── Row detail (state picker, hold-to-confirm, sign-off) ── */
.th-req-detail-wrap { background: var(--paper-2); border-bottom: 1px solid var(--line-2); }
.th-req-detail { padding: var(--space-4); }
.th-req-bsa { font-size: var(--fs-13); color: var(--ink-2); line-height: 1.5; margin: 0 0 var(--space-4); }
.th-pick-hint { font-size: var(--fs-11); color: var(--muted); margin: 0 0 var(--space-2); display: flex; align-items: center; gap: 5px; }
.th-pick-hint svg { width: 12px; height: 12px; }
.th-state-picker { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-1h); }
.th-hold-btn { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-3) var(--space-1h); border: 1.5px solid var(--line); border-radius: var(--radius-10); background: var(--paper); cursor: pointer; font-size: var(--fs-12); font-weight: 600; color: var(--ink-2); font-family: inherit; transition: border-color var(--t-fast) var(--ease-soft), background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.th-hold-btn:disabled, .th-hold-btn[aria-disabled="true"] { cursor: default; opacity: 0.45; }
.th-hold-btn .th-lbl, .th-hold-btn svg { position: relative; z-index: 2; }
.th-hold-btn svg { width: 18px; height: 18px; }
.th-hold-btn .th-fill { position: absolute; inset: 0 100% 0 0; z-index: 1; transition: right 700ms linear; pointer-events: none; }
.th-hold-btn.th-empty .th-fill { background: var(--paper-3); }
.th-hold-btn.th-working .th-fill { background: var(--trail-s); }
.th-hold-btn.th-done .th-fill { background: var(--accent-s); }
.th-hold-btn.th-is-pressing .th-fill { right: 0; }
.th-hold-btn.th-is-active.th-empty { border-color: var(--ink-2); background: var(--paper-3); color: var(--ink); }
.th-hold-btn.th-is-active.th-working { border-color: var(--trail); background: var(--trail-s); color: var(--trail); }
.th-hold-btn.th-is-active.th-done { border-color: var(--accent); background: var(--accent-s); color: var(--accent-d); }
.th-hold-btn.th-just-set { animation: rk-pop 280ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes rk-pop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
.th-hold-btn .th-micro { font-size: var(--fs-9); font-weight: 600; opacity: 0.6; letter-spacing: 0.04em; text-transform: uppercase; position: relative; z-index: 2; margin-top: 1px; }
.th-hold-btn.th-is-active .th-micro { display: none; }
@media (prefers-reduced-motion: reduce) {
  .th-hold-btn .th-fill, .th-signoff-btn .th-fill { transition: none; }
  .th-hold-btn.th-just-set { animation: none; }
}
.th-signoff-line { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--line); }
.th-signoff-line .th-helper { font-size: var(--fs-11); color: var(--muted); margin: 0 0 var(--space-2); }
.th-signoff-btn { position: relative; overflow: hidden; width: 100%; }
.th-signoff-btn .th-fill { position: absolute; inset: 0 100% 0 0; background: var(--accent-s); transition: right 700ms linear; pointer-events: none; }
.th-signoff-btn.th-is-pressing .th-fill { right: 0; }
.th-signoff-btn span { position: relative; z-index: 2; }

/* ── Coachmark (rank-page transient hint) ── */
.th-coachmark { position: fixed; left: 14px; right: 14px; bottom: calc(var(--nav-h) + var(--safe-bottom) + 22px); max-width: 612px; margin: 0 auto; background: var(--ink); color: #fff; padding: var(--space-3) var(--space-4); border-radius: var(--radius-14); font-size: var(--fs-13); font-weight: 500; z-index: var(--z-coach); box-shadow: var(--shadow-coach); display: flex; align-items: center; gap: var(--space-2h); }
.th-coachmark svg { width: 18px; height: 18px; flex-shrink: 0; }
.th-coachmark .th-body { flex: 1; line-height: 1.4; }
.th-coachmark .th-dismiss { background: transparent; border: 0; color: rgba(255,255,255,0.7); cursor: pointer; font-family: inherit; font-size: var(--fs-13); font-weight: 600; padding: var(--space-1) var(--space-1h); }

/* ── Future-rank collapsibles + Earned-block ── */
.th-rank-coll { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-12); overflow: hidden; margin-bottom: var(--space-3); }
.th-rank-coll-head { display: flex; align-items: center; gap: var(--space-2h); width: 100%; padding: var(--space-3) var(--space-4); background: transparent; border: 0; cursor: pointer; font-family: inherit; text-align: left; transition: background var(--t-fast) var(--ease-soft); -webkit-tap-highlight-color: transparent; }
.th-rank-coll-head:hover { background: var(--paper-2); }
.th-rank-coll-head .th-num { width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--paper-3); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: var(--fs-13); font-weight: 700; }
.th-rank-coll-head .th-name { flex: 1; min-width: 0; font-size: var(--fs-14); font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.th-rank-coll-head .th-meta { flex: 0 0 auto; font-size: var(--fs-11); color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.th-rank-coll-head .th-chev { color: var(--muted); transition: transform var(--t-med) var(--ease-soft); flex-shrink: 0; }
.th-rank-coll-head .th-chev svg { width: 16px; height: 16px; display: block; }
.th-rank-coll.th-is-open .th-rank-coll-head .th-chev { transform: rotate(180deg); }
.th-rank-coll-body { border-top: 1px solid var(--line); }
.th-rank-coll-body .th-req-row { background: var(--paper); }

.th-earned-block { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-12); overflow: hidden; margin-bottom: var(--space-3); }
.th-earned-block summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-2h); padding: var(--space-2h) var(--space-4); -webkit-tap-highlight-color: transparent; }
.th-earned-block summary::-webkit-details-marker { display: none; }
.th-earned-block summary .th-ico { width: 24px; height: 24px; border-radius: var(--radius-pill); background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.th-earned-block summary .th-ico svg { width: 13px; height: 13px; }
.th-earned-block summary .th-ttl { font-size: var(--fs-13); font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
.th-earned-block summary .th-meta { margin-left: auto; font-size: var(--fs-11); color: var(--muted); font-variant-numeric: tabular-nums; }
.th-earned-block summary .th-chev { color: var(--muted); transition: transform var(--t-med) var(--ease-soft); }
.th-earned-block summary .th-chev svg { width: 14px; height: 14px; display: block; }
.th-earned-block[open] summary .th-chev { transform: rotate(180deg); }
.th-earned-body { padding: var(--space-1h) var(--space-4) var(--space-3); border-top: 1px solid var(--line); }
.th-earned-rank { display: flex; align-items: baseline; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-13); }
.th-earned-rank:last-child { border-bottom: 0; }
.th-earned-rank .th-name { font-weight: 600; color: var(--ink); }
.th-earned-rank .th-reqs { color: var(--muted); margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-11); }

.th-footer-note { font-size: var(--fs-11); color: var(--muted); text-align: center; margin: var(--space-1) 0 0; line-height: 1.55; text-wrap: balance; }

/* =====================================================================
   TALLY + COORDINATION — § 5 view ③ funding view (leader-facing)
   Promoted from architecture/mockups/mobile/event-funding.html.
   ===================================================================== */
.th-tally-num { font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.th-tally-lbl { font-size: var(--fs-11); color: var(--muted); margin-top: var(--space-1); line-height: 1.3; }

/* "Ways to make it work" — the family-level support checklist (§ 5 view ②).
   Promoted from architecture/mockups/mobile/event-parent.html. */
.th-decide { display: flex; gap: var(--space-1h); flex-wrap: wrap; margin-top: var(--space-2); }

/* Per-Scout RSVP decide rows. Desktop keeps the original inline layout
   (avatar | name | buttons-to-the-right). On phone footprints the long
   labels ("We can make it" / "Can't this time") fight the name for width and
   truncate it to "Ha…", so below 480px the buttons drop to a full-width
   stack BELOW the identity and the name gets the whole row. */
.th-rsvp-decide + .th-rsvp-decide { margin-top: var(--space-2); }   /* stacked person cards (umbrella); a mini-app section card turns them into divided rows */
.th-rsvp-decide .th-signal-group { display: flex; flex-wrap: wrap; gap: var(--space-1h); justify-content: flex-end; }
/* The monogram is a secondary identifier — don't render it at the name's
   weight. Smaller circle + font; the rank pip stays pinned to the corner. */
.th-rsvp-decide .th-avatar-rank .th-avatar { width: 30px; height: 30px; font-size: var(--fs-12); }
/* Phones: ONE line per Scout (2026-10-21). The Going / Maybe / Can't trio becomes a compact
   segmented toggle beside the name (≈170px, fits at 360) instead of a full-width row below it —
   about 60px less per Scout. A long name truncates (truncate-and-tap). */
@media (max-width: 430px) {
  .th-rsvp-decide { flex-wrap: nowrap; }
  .th-rsvp-decide .th-signal-group { flex: 0 0 auto; flex-wrap: nowrap; gap: 0; }
  .th-rsvp-decide .th-signal-group .th-signal { border-radius: 0; padding: var(--space-1h) var(--space-2); font-size: var(--fs-12); }
  .th-rsvp-decide .th-signal-group .th-signal + .th-signal { margin-left: -1px; }
  .th-rsvp-decide .th-signal-group .th-signal:first-child { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
  .th-rsvp-decide .th-signal-group .th-signal:last-child { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
  .th-rsvp-decide .th-signal-group .th-signal.th-is-active { position: relative; z-index: 1; }
}
.th-help-row { display: flex; align-items: center; gap: var(--space-2h); padding: var(--space-2h) 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.th-help-row:first-child { border-top: 0; }
.th-help-row .th-body { flex: 1 1 auto; min-width: 0; }
.th-help-row .th-name { font-size: var(--fs-14); line-height: 1.3; }
.th-help-row .th-sub { font-size: var(--fs-12); line-height: 1.35; }
.th-help-box { width: 20px; height: 20px; border: 2px solid var(--line); border-radius: var(--radius-6); flex: 0 0 auto;
  display: grid; place-items: center; transition: background var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft); }
.th-help-box svg { width: 13px; height: 13px; color: #fff; opacity: 0; }
.th-help-row.th-is-checked .th-help-box { background: var(--accent); border-color: var(--accent); }
.th-help-row.th-is-checked .th-help-box svg { opacity: 1; }

/* Campout meal grid (slice 3b) — meals are the structured exception to the
   atomic help-row: the claim is the .th-help-box, but the body carries a short
   description, a needs-help flag, and the allergy sign-off, so the row is
   top-aligned and not itself a tap target. */
.th-meal-row { align-items: flex-start; cursor: default; }
.th-meal-row .th-meal-claim { cursor: pointer; margin-top: 1px; }
.th-meal-menu { margin-top: var(--space-2); font-size: var(--fs-13); line-height: 1.5; resize: vertical; }
.th-meal-desc { white-space: pre-line; }
.th-meal-help-toggle, .th-meal-signoff { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2);
  font-size: var(--fs-13); color: var(--ink-2); cursor: pointer; }
.th-meal-help-toggle input, .th-meal-signoff input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
.th-meal-signoff.th-is-confirmed { color: var(--accent-d); font-weight: 600; }
.th-meal-release { margin-top: var(--space-2); }

/* Mini-app switcher header (NAV-01 / D4) — app-switcher.js restructures the
   page's .th-share-header into a TWO-ROW header: the existing brand + who-am-i
   become the top row (.th-sw-top-row), and the switcher (Events · Polls · Rank Up
   + Trailhead) is the second row INSIDE the same sticky header. */
/* Two-row header: brand + who-am-i breathe on top, a COMPACT, centered
   switcher beneath (sized to content — not stretched across the column). */
/* ONE bar (2026-10-21): [Trailhead mark + small word → Trailhead home] [Events · Polls ·
   Rank Up] [person menu]. The tabs say which app you're in, so the brand is just "Trailhead";
   phones show only the person icon (name from 720px, .th-who-name). */
.th-share-header.th-has-switcher { flex-direction: row; align-items: center; gap: var(--space-2);
  padding: var(--space-1h) max(var(--space-3), calc((100% - 720px) / 2)); }
.th-share-header.th-has-switcher .th-share-brand { flex: 0 0 auto; gap: var(--space-1); font-size: var(--fs-12); color: var(--ink-2); text-decoration: none; }
.th-share-header.th-has-switcher .th-share-brand .th-mark { width: 20px; height: 20px; }
.th-share-header.th-has-switcher .th-share-signin { flex: 0 0 auto; color: var(--ink-2); }
.th-sw-row-wrap { flex: 1 1 auto; min-width: 0; }
/* Detail pages: the back link sits in the bar in place of the Trailhead mark (app-switcher.js). */
.th-share-header.th-has-back .th-share-brand { display: none; }
.th-share-header > .th-page-back { flex: 0 0 auto; margin: 0; min-height: 44px; font-size: var(--fs-14); }
.th-sw-row { display: flex; align-items: stretch; justify-content: center; gap: var(--space-2); }
.th-sw-group { display: flex; gap: var(--space-0); flex: 0 0 auto; background: var(--paper-2); border-radius: var(--radius-12); padding: 3px; }
.th-sw-tab { min-width: 62px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: var(--space-1h) var(--space-2h);
  border: 0; background: transparent; border-radius: 9px; font-family: inherit; font-size: var(--fs-11); font-weight: 600;
  color: var(--muted); cursor: pointer; text-decoration: none;
  transition: background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft); }
.th-sw-tab i { width: 18px; height: 18px; }
.th-sw-tab:hover { color: var(--ink-2); }
/* The selected mini-app highlights green — "you are here". */
.th-sw-tab.th-is-active { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.th-sw-tab.th-is-active i { color: #fff; }

/* =====================================================================
   MINI-APP LAYOUT — one shape for every mini-app page (2026-10-21,
   architecture/mini-app-layout-2026-10-21.md S1-S6). All scoped to
   `html[data-app]` so the umbrella (apps/mobile) is untouched.
   ===================================================================== */
/* S1 — the header slot is reserved: the person icon is there before /me answers
   (who-am-i.js), so nothing jitters; signed out is a short "Sign in" link only. */
html[data-app] .th-share-header .th-share-signin { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.th-who-ghost { color: var(--muted); }

/* S1 (phones, < 720) — the app tabs move to the umbrella's bottom nav (.th-nav-bar, built by
   app-switcher.js, the last child of .th-frame so content is never covered); the top bar keeps
   only the Trailhead mark (-> Trailhead home) and the person icon. From 720 the tabs live in
   the top bar and the bottom nav is hidden. */
html[data-app] .th-share-header .th-share-brand { min-height: 44px; }
@media (max-width: 719px) {
  html[data-app] .th-share-header.th-has-switcher { justify-content: space-between; }
  html[data-app] .th-share-header .th-sw-row-wrap,
  html[data-app] .th-share-header .th-share-brand > span { display: none; }
  html[data-app] .th-share-header.th-has-switcher .th-share-brand .th-mark { width: 26px; height: 26px; }
}
@media (min-width: 720px) {
  html[data-app] .th-nav-bar { display: none; }
}

/* S3 — one spacing rule, the umbrella's: the page is a .th-pad (top 8, sides 16, gap 8 between
   sections, no per-card margin). Tablet/desktop (>= 720) widens only the sides to 24; the
   header content lines up with the same sides. */
@media (min-width: 720px) {
  html[data-app] .th-frame-content > .th-pad { padding-inline: var(--space-7); }
  html[data-app] .th-share-header,
  html[data-app] .th-share-header.th-has-switcher { padding-inline: var(--space-7); }
}

/* One width, everywhere (Corey, 2026-11-20): the mini-apps keep the Trailhead frame (640px, mobile-first)
   on every screen, the same as the main app. No desktop widening, no two-column lists. */

/* Card heads: the title never wraps; the muted sub-line takes the rest, right-aligned. */
html[data-app] .th-card-head > :is(h2, h3) { white-space: nowrap; flex: 0 0 auto; }
html[data-app] .th-card-head > .th-meta { min-width: 0; text-align: right; }
/* A label right under a card head (RSVP's Headcount) keeps the umbrella's small gap. */
html[data-app] .th-card-head + div > .th-eyebrow:first-child { margin-top: var(--space-2); }

/* S2 — CUSTOM PRIMITIVE: .th-page-head, the top of every mini-app page's content, in this
   order (each part optional): back link row (.th-page-back) · kicker (.th-hero-kicker:
   entity pill + eyebrow) · h1 · description (.th-desc) · meta chips (.th-meta) ·
   .th-action-row. Type + spacing come from the page-head rules above. Left-aligned, never floating. */
.th-page-head .th-action-row { margin-top: var(--space-3); justify-content: flex-start; }
@media (max-width: 430px) {
  /* Date · place · Add to calendar fit on one line at 360: smaller chips, tighter gap. */
  .th-page-head .th-meta { gap: var(--space-1h); margin-bottom: var(--space-3); }
  .th-page-head .th-meta .th-chip { font-size: var(--fs-12); padding: var(--space-1) var(--space-2); }
}
.th-page-head h1 { margin-bottom: var(--space-2); }
.th-page-head .th-desc { margin-bottom: var(--space-3); }
.th-page-back { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 32px; margin-bottom: var(--space-1); color: var(--ink-2); text-decoration: none; font-size: var(--fs-13); font-weight: 500; }
.th-page-back i, .th-page-back svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* S4 — CUSTOM PRIMITIVE: list-row meta line. A list row is line 1 title (.th-truncate) +
   state chip, line 2 meta: ONE line, ellipsis, never wrapped. The whole row is the tap target. */
.th-row-meta { display: flex; align-items: center; gap: var(--space-1h); min-width: 0; margin: var(--space-0) 0 0; color: var(--muted); font-size: var(--fs-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-row-meta > * { flex: 0 0 auto; }
.th-row-meta > .th-truncate { flex: 0 1 auto; }

/* S5 — CUSTOM PRIMITIVE: .th-mini-grid. One column at every width (the Trailhead frame is 640px), 8 gap (the .th-pad gap).
   .th-is-list   a list of cards or rows (landings, share links, approvals)
   .th-mini-form single column, max 640, centred (compose, edit, close, set-rank, sign-up) —
                 wraps the page head + the form. */
.th-mini-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); align-items: start; }
.th-mini-grid > .th-event-card, .th-mini-grid > .th-poll-card, .th-mini-grid > .th-scout-card { margin-bottom: 0; }
.th-mini-grid > .th-scout-card { flex-direction: row; align-items: center; gap: var(--space-3); }
.th-mini-main, .th-mini-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); align-content: start; min-width: 0; }
.th-mini-form { max-width: 640px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-2); }

/* NOTICE BAND (Corey, 2026-10-21; mini-apps first) — /vendor/notice.js. ONE home for every
   message about an action: confirmations, errors, warnings, first-time hints. A planned spot, one
   colour band; it never moves the page, never covers a button or content.
   Phones (< 720): drops into the empty middle of the top bar (left/right set by JS to clear the
   bar's controls). Tablet + desktop (>= 720): the page head reserves its top-right corner for it. */
html[data-app] .th-share-header { position: sticky; top: 0; }
.th-notice { --notice-w: 17rem; --notice-h: auto; --notice-top: var(--space-7); --notice-left: var(--space-2); --notice-right: var(--space-2); /* bar position: set per show by notice.js */
  /* The style guide's banner shape (§08b, .th-banner): soft fill, a 3px bar on the left, icon then text. It floats, so a light shadow. */
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1h) var(--space-2h); border: 0; border-left: 3px solid; border-radius: var(--radius-10);
  font-size: var(--fs-13); line-height: 1.35; box-shadow: var(--shadow-sm);
  opacity: 0; pointer-events: none; z-index: 20;
  transition: opacity var(--t-fast) var(--ease-soft), transform var(--t-fast) var(--ease-soft); }
.th-notice.th-is-on { opacity: 1; pointer-events: auto; }
.th-notice[data-mode="bar"] { position: fixed; top: var(--notice-top); left: var(--notice-left); right: var(--notice-right); min-height: var(--notice-h);
  transform: translateY(-90%); z-index: calc(var(--z-header) + 1); }
.th-notice[data-mode="bar"].th-is-on { transform: translateY(-50%); }
.th-notice[data-mode="inline"] { position: relative; width: 100%; font-size: var(--fs-15); padding: var(--space-2h) var(--space-3); box-shadow: none; }  /* a landing's try-it slot above a card: same band, in flow in a reserved spot */
.th-notice[data-mode="head"] { position: absolute; top: 0; right: 0; width: var(--notice-w); transform: translateY(calc(-1 * var(--space-2))); }
.th-notice[data-mode="head"].th-is-on { transform: none; }
.th-notice .th-notice-text { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th-notice .th-notice-ico, .th-notice svg { width: 16px; height: 16px; flex: 0 0 auto; }
.th-notice .th-notice-close { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.th-notice.th-ok   { background: var(--ok-s);     color: var(--ok);       border-left-color: var(--ok); }
.th-notice.th-info { background: var(--accent-s); color: var(--accent-d); border-left-color: var(--accent); }
.th-notice.th-warn { background: var(--warn-s);   color: var(--warn);     border-left-color: var(--warn); }
.th-notice.th-err  { background: var(--sig-no-s); color: var(--sig-no);   border-left-color: var(--sig-no); }
/* Countdown for a notice that fades on its own (green / yellow): a thin bar drains over 5 s. */
.th-notice { overflow: hidden; }
.th-notice .th-notice-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: 0.35; transform-origin: left; transform: scaleX(0); }
.th-notice.th-is-counting.th-is-on .th-notice-timer { animation: th-notice-drain 5s linear forwards; }
@keyframes th-notice-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (min-width: 720px) {
  /* The planned spot: the page head always keeps the band's corner free (titles wrap before it). */
  html[data-app] .th-page-head { position: relative; padding-right: calc(var(--notice-w, 17rem) + var(--space-3)); }
}
@media (prefers-reduced-motion: reduce) { .th-notice { transition: none; } .th-notice.th-is-counting.th-is-on .th-notice-timer { animation: none; transform: scaleX(0.5); } }

/* NO CARD IN A CARD (Corey, 2026-10-21). Inside a section card (.th-card), item "cards" (event / poll /
   Scout cards, RSVP person rows, the Help-out box) render as divided ROWS: no second border,
   radius or background, no second side padding. The section card keeps its padding, so there is
   still breathing room; every item gains ~2 × 12px of width and loses the stacked gaps. */
html[data-app] .th-card :is(.th-event-card, .th-poll-card, .th-scout-card, .th-card) {
  border: 0; border-radius: 0; box-shadow: none; background: transparent;
  margin: 0; padding: var(--space-2h) 0;
}
html[data-app] .th-card :is(.th-event-card, .th-poll-card, .th-scout-card, .th-card):hover { background: transparent; }
html[data-app] .th-card .th-scout-card .th-open { margin-left: auto; }   /* "Open progress" sits at the row's right edge */
html[data-app] .th-card :is(.th-event-card, .th-poll-card, .th-scout-card, .th-card) + :is(.th-event-card, .th-poll-card, .th-scout-card, .th-card) {
  border-top: 1px solid var(--line-2);
}
/* A flattened box that only wraps rows (the Help-out box) adds no padding of its own. */
html[data-app] .th-card .th-card:has(> .th-card) { padding: 0; }
/* Lists of rows sit flush: the dividers do the separating, not a grid gap. */
html[data-app] .th-card .th-mini-grid.th-is-list { row-gap: 0; }

/* PHONE DENSITY (Corey, 2026-10-21): same words, less scrolling. Inter stays (the site font,
   --font-sans); the room comes from padding and line height, on phones only (< 720px):
   divided rows 10 → 8, body copy line height 1.55 → 1.45 (card padding + head spacing are the
   umbrella's .th-card / .th-card-head values: one source). */
@media (max-width: 719px) {
  html[data-app] .th-card :is(.th-event-card, .th-poll-card, .th-scout-card, .th-card) { padding-top: var(--space-2); padding-bottom: var(--space-2); }
  html[data-app] .th-page-head .th-desc, html[data-app] .th-card p { line-height: 1.45; }
}

/* Signed-out value-prop landing (NAV-02, /vendor/value-prop.js) is built from
   style-guide classes only (.th-page-head, .th-eyebrow, .th-desc, .th-chip-accent, .th-btn-block,
   .th-card, .th-card-head); the page-local .vp-* family was removed 2026-10-16. */

/* Umbrella landing — the scrollable marketing page at `/` (onboarding.html).
   The hero + the three mini-app cards come from /vendor/value-prop.js (style-guide
   classes) so the umbrella reads as the home of the family, not a separate product. Net-new
   classes live HERE (defork rule) so any future surface can reuse them. */
.th-lp-section { padding: var(--space-7) var(--space-6) var(--space-6); }
.th-lp-section + .th-lp-section { border-top: 1px solid var(--line); }
.th-lp-section-eyebrow {
  font-size: var(--fs-11); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 var(--space-3);
}
.th-lp-section-h {
  font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink);
  margin: 0 0 var(--space-5); line-height: 1.25;
}
/* Three-card grid for the value-prop cards + the showcase. Stacks on phone,
   wraps to a row at modern-phone+ widths so the desktop frame doesn't look
   like one long column. */
.th-lp-card-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 520px) {
  .th-lp-card-grid.th-lp-card-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* How-it-works — three numbered steps. Pure list, no decoration beyond the
   numeral chip. */
.th-lp-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.th-lp-step { display: flex; gap: var(--space-4); align-items: flex-start; }
.th-lp-step-n {
  width: 30px; height: 30px; border-radius: var(--radius-pill); flex: 0 0 auto;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--fs-14);
}
.th-lp-step-h { font-size: var(--fs-15); font-weight: 700; color: var(--ink); margin: var(--space-1) 0 var(--space-1); line-height: 1.3; }
.th-lp-step-sub { font-size: var(--fs-14); line-height: 1.5; color: var(--ink-2); margin: 0; }

/* Showcase — three glyph tiles mirroring the app-switcher lineup (no
   Trailhead "door" tile, per project_trailhead_miniapp_positioning). Each
   tile links into the corresponding mini-app via the share-link route the
   onboard flow already understands. Visually a calmer, taller analog of
   .th-sw-tab so it sits comfortably inside the landing card grid. */
.th-lp-showcase { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-3); }
.th-lp-show-tile {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-5) var(--space-3); border: 1px solid var(--line);
  border-radius: var(--radius-14); background: var(--paper); text-decoration: none;
  color: var(--ink); transition: border-color var(--t-fast) var(--ease-soft),
    background var(--t-fast) var(--ease-soft);
}
.th-lp-show-tile:hover { border-color: var(--accent); background: var(--accent-s); }
.th-lp-show-tile i { width: 28px; height: 28px; color: var(--accent); }
.th-lp-show-tile .th-lp-show-name { font-size: var(--fs-14); font-weight: 700; }
.th-lp-show-tile .th-lp-show-sub  { font-size: var(--fs-12); color: var(--muted); text-align: center; }

/* Trust card — one calm card, no compliance badge chrome
   (feedback_no_audit_chrome). Plain bullets in a single padded card. */
.th-lp-trust {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-14);
  background: var(--accent-s);
}
.th-lp-trust h3 {
  font-size: var(--fs-15); font-weight: 700; color: var(--accent-d); margin: 0;
  display: flex; align-items: center; gap: var(--space-2);
}
.th-lp-trust h3 i { width: 18px; height: 18px; }
.th-lp-trust ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.th-lp-trust li { font-size: var(--fs-14); line-height: 1.5; color: var(--ink); position: relative; padding-left: 18px; }
.th-lp-trust li::before { content: ''; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--accent); }
.th-lp-trust .th-lp-trust-cta { font-size: var(--fs-13); color: var(--accent-d); font-weight: 600; text-decoration: none; }
.th-lp-trust .th-lp-trust-cta:hover { text-decoration: underline; }

/* FAQ — native <details> accordion. The pattern is used elsewhere
   (e.g. .th-earned-block), but this is the landing-specific tuning: full-width
   row, clean separator line, single-icon caret rotation. Zero JS. */
.th-lp-faq { display: flex; flex-direction: column; }
.th-lp-faq details {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.th-lp-faq details:first-of-type { border-top: 1px solid var(--line); }
.th-lp-faq summary {
  list-style: none; cursor: pointer; padding: var(--space-4) 0;
  font-size: var(--fs-15); font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  -webkit-tap-highlight-color: transparent;
}
.th-lp-faq summary::-webkit-details-marker { display: none; }
.th-lp-faq summary::after {
  content: ''; flex: 0 0 auto; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform var(--t-fast) var(--ease-soft);
}
.th-lp-faq details[open] summary::after { transform: rotate(-135deg); }
.th-lp-faq .th-lp-faq-a {
  font-size: var(--fs-14); line-height: 1.55; color: var(--ink-2);
  margin: 0; padding: 0 0 var(--space-5);
}

/* Final CTA band — repeats the primary action at the bottom of the scroll. */
.th-lp-final {
  text-align: center;
  padding: var(--space-8) var(--space-6) var(--space-7);
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.th-lp-final .th-lp-final-h {
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink);
  margin: 0 0 var(--space-5); line-height: 1.2;
}
.th-lp-final a.th-btn { max-width: 360px; margin: 0 auto; }
.th-lp-final .th-lp-final-doors { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.th-lp-final .th-lp-final-doors a { font-size: var(--fs-14); color: var(--accent); text-decoration: none; }
.th-lp-final .th-lp-final-doors a.th-muted { color: var(--muted); }

/* Landing v2 (2026-10-22 mockups, approved): the mini-app landings are one screen -- hero, two steps,
   the real screen the family will tap, one button. Same pieces on the Trailhead page. */
.th-lp-figure { margin: 0 auto; width: 100%; max-width: 420px; }
/* The landing keeps the Trailhead width on every screen: one mobile-first column, at most 640px, centered
   (the main app's width), even inside the wider mini-app frame. */
.th-lp-col { max-width: 640px; margin: 0 auto; width: 100%; }
html[data-app] .th-lp-col > .th-page-head { padding-right: 0; }  /* the signed-in notice band's reserved corner is not needed on a landing */
.th-lp-action { display: block; width: 100%; height: auto; border-radius: var(--radius-12); box-shadow: var(--shadow-card); }
.th-lp-slot { display: grid; align-items: center; min-height: 3.9rem; margin-bottom: var(--space-2); }
.th-lp-slot > * { grid-area: 1 / 1; }
.th-lp-hint { text-align: center; margin: 0; }
.th-lp-cap { text-align: center; margin-top: var(--space-2); }
.th-lp-next { text-align: center; }
.th-lp-apps { display: flex; flex-direction: column; gap: var(--space-3); }
.th-lp-app { display: flex; gap: var(--space-3); align-items: center; color: inherit; text-decoration: none; }
.th-lp-app p { margin: 0; }
.th-lp-app b { display: block; }
.th-lp-ico { flex: none; width: 40px; height: 40px; border-radius: var(--radius-10); background: var(--accent-s); color: var(--accent); display: grid; place-items: center; }
.th-lp-ico svg { width: 20px; height: 20px; }
.th-lp-bullets { margin: 0; padding-left: var(--space-5); }
.th-lp-bullets li { margin: 0 0 var(--space-2); }
.th-lp-links { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); font-size: var(--fs-14); }
.th-lp-links a { color: var(--accent); text-decoration: none; font-weight: 600; }


/* Household-news indicator — a house glyph + thin separator INSIDE the state
   chip on event/poll list cards (§ 5 Batch D, memory project-trailhead-household-news).
   Lights when someone in the household responded/voted since the last visit;
   clears on opening the detail page. Calm "new to you" marker, never a badge. */
.th-chip .th-hh-pre { display: inline-flex; align-items: center; color: var(--accent); }
.th-chip .th-hh-pre svg { width: 11px; height: 11px; stroke-width: 2.5; }
.th-chip .th-hh-sep { display: inline-block; width: 1px; height: 10px; background: currentColor; opacity: 0.35; margin: 0 5px 0 var(--space-1); vertical-align: middle; }

/* Scout status chip — the Scout's own RSVP resolution on a list card (§ 5).
   Neutral while pending ("Interested"), then color + icon when a grown-up
   confirms: Going (green) / Maybe (amber) / Can't (red, dignified — never an
   error-X). Sits in the same right-rail slot the parent's house glyph uses;
   a viewer is one role, so they never collide. */
.th-sc { display: inline-flex; align-items: center; gap: 5px; padding: var(--space-1) var(--space-2h); border-radius: var(--radius-pill); font-size: var(--fs-12); font-weight: 600; line-height: 1; white-space: nowrap; }
.th-sc svg { width: 13px; height: 13px; }
.th-sc-go    { color: var(--sig-yes); background: var(--accent-s); }
.th-sc-maybe { color: var(--sig-int); background: var(--trail-s); }
.th-sc-no    { color: var(--sig-no);  background: #f7e9e9; }
.th-sc-pend  { color: var(--muted);   background: var(--paper-2); }

/* =====================================================================
   RANK-UP MOMENTUM MONITOR (.mo-*) — leader/PL momentum quantifier.
   Rolling 7d + 30d stat blocks, an N-week trend spark, per-patrol /
   per-scout rows each with a mini sparkline. Shared by the umbrella
   rank-momentum page and the rankup-mini momentum page (window.Momentum).
   ===================================================================== */
.th-mo-hero { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-14); padding: var(--space-5); margin-bottom: var(--space-4); }
.th-mo-stats { display: flex; gap: var(--space-2h); margin-bottom: var(--space-4); }
.th-mo-stats .th-stat { flex: 1; padding: var(--space-2h) var(--space-3); background: var(--paper-2); border-radius: var(--radius-12); }
.th-mo-stats .th-cap { font-size: var(--fs-11); font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.th-mo-stats .th-row2 { display: flex; align-items: baseline; gap: 7px; }
.th-mo-stats .th-big { font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.th-mo-stats .th-sub2 { font-size: var(--fs-9); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: var(--space-1h); }
.th-mo-trend-h { font-size: var(--fs-9); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--space-1h); }
.th-mo-sub { font-size: var(--fs-12); color: var(--muted); margin: var(--space-2h) 0 0; }
.th-mo-delta { font-size: var(--fs-12); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; padding: 3px var(--space-2); border-radius: var(--radius-pill); }
.th-mo-delta svg { width: 12px; height: 12px; }
.th-mo-delta.th-up { background: var(--accent-s); color: var(--accent-d); }
.th-mo-delta.th-flat { background: var(--paper-3); color: var(--muted); }
.th-mo-delta.th-down { background: var(--trail-s); color: var(--trail); }

.th-mo-spark { display: flex; align-items: flex-end; gap: var(--space-1); height: 52px; width: 100%; }
.th-mo-spark .th-wk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.th-mo-spark .th-bar { width: 100%; background: var(--trail-s); border-radius: 4px 4px 2px 2px; min-height: 3px; }
.th-mo-spark .th-wk.th-now .th-bar { background: var(--accent); }
.th-mo-spark .th-wk .th-lbl { font-size: var(--fs-9); color: var(--muted); font-variant-numeric: tabular-nums; }
.th-mo-spark .th-wk.th-now .th-lbl { color: var(--accent-d); font-weight: 700; }
.th-mo-spark.th-mini { height: 30px; gap: var(--space-0); }
.th-mo-spark.th-mini .th-bar { background: var(--accent); opacity: 0.38; }
.th-mo-spark.th-mini .th-wk.th-now .th-bar { opacity: 1; }


.th-mo-sec-h { font-size: var(--fs-10); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 var(--space-2); }
.th-mo-list { display: flex; flex-direction: column; gap: var(--space-2); }
.th-mo-row { display: grid; grid-template-columns: auto minmax(0,1fr) 60px auto; align-items: center; gap: var(--space-2h); width: 100%; text-align: left; padding: 11px var(--space-3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-12); font: inherit; }
.th-mo-row.th-nolead { grid-template-columns: minmax(0,1fr) 60px auto; }
.th-mo-row .th-lead { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.th-mo-row .th-av { width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--accent-s); color: var(--accent-d); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-12); }
.th-mo-row .th-name { font-size: var(--fs-14); font-weight: 600; color: var(--ink); letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-mo-row .th-rmeta { font-size: var(--fs-11); color: var(--muted); margin-top: var(--space-0); display: flex; align-items: center; gap: var(--space-1h); flex-wrap: nowrap; min-width: 0; }
.th-mo-row.th-quiet .th-name { color: var(--ink-2); }
.th-mo-row .th-num { text-align: right; white-space: nowrap; }
.th-mo-row .th-num .th-n { display: block; font-size: var(--fs-12); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.th-mo-row .th-num .th-lab { display: block; font-size: var(--fs-11); color: var(--muted); text-transform: none; letter-spacing: 0; }
.th-mo-quiet-pill { white-space: nowrap; font-size: var(--fs-10); font-weight: 700; color: var(--trail); background: var(--trail-s); padding: var(--space-0) 7px; border-radius: var(--radius-pill); }
.th-mo-moving-pill { white-space: nowrap; font-size: var(--fs-10); font-weight: 700; color: var(--accent-d); background: var(--accent-s); padding: var(--space-0) 7px; border-radius: var(--radius-pill); }
.th-mo-foot { font-size: var(--fs-11); color: var(--muted); text-align: center; margin: var(--space-5) 0 0; line-height: 1.55; }

/* ── Share button (universal share-2 affordance) ─────────────────────────
   Bottom-right of every shareable card (events + polls, list + detail).
   The host card must be position:relative so the absolute corner placement
   lands. Stops the parent card's tap-through via the JS delegate. */
/* WCAG 2.5.5 — 44×44 hit area; visible glyph stays 18px (`.th-share-btn svg`). */
.th-share-btn { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: var(--radius-pill); border: 1px solid var(--line-2, var(--line, #e6e3dc)); background: var(--paper, #fff); color: var(--muted, #6e6a62); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; box-shadow: var(--shadow-hair); transition: background 120ms, color 120ms, border-color 120ms; z-index: 2; }
.th-share-btn:hover, .th-share-btn:focus-visible { background: var(--paper-2, #f6f3ec); color: var(--ink, #2a2823); border-color: var(--line, #d9d4c8); outline: none; }
.th-share-btn:active { background: var(--paper-3, var(--paper-2, #efebe1)); }
/* Icon stays 18px; .th-share-ring is opted out via :not() so it can fill the button. */
.th-share-btn i, .th-share-btn > svg:not(.th-share-ring) { width: 18px; height: 18px; }
.th-share-btn .th-share-ring { width: 44px; height: 44px; }

/* Transient toast surfaced after a clipboard fallback (or a share error).
   Pinned bottom-center, auto-dismisses; no modal, no scrim. */
.th-share-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(8px); background: var(--ink, #2a2823); color: var(--paper, #fff); font-size: var(--fs-13); font-weight: 600; padding: 9px var(--space-4); border-radius: var(--radius-pill); box-shadow: var(--shadow-toast); opacity: 0; transition: opacity 180ms, transform 180ms; z-index: var(--z-toast); pointer-events: none; }
.th-share-toast.th-is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }
.th-share-toast.th-is-err { background: var(--sig-no, #c0392b); }

/* Board #38 — share-link countdown chip pinned next to the share-2 icon.
   `.th-share-wrap` replaces the bare `.th-share-btn` corner placement when an
   `expiresAt` was supplied to ShareButton.render; both the pill and the
   button sit together in the bottom-right slot. `.th-is-expired` swaps the
   muted pill for a warn tint so a leader can spot a stale link at a glance
   (the chip text reads "Refresh" — tapping the button mints + extends). */
.th-share-wrap { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: var(--space-1h); z-index: 2; }
.th-share-wrap .th-share-btn { position: static; }
/* Inline variant — sits in document flow inside an action row (next to Edit /
   Approvals etc.) rather than pinned to a card corner. Used where the host is
   a tall/short container that would otherwise park the corner-pinned button in
   empty space (e.g. the umbrella event detail). Stays `position: relative` (NOT
   static) so the absolute `.th-share-ring` (inset:0) still anchors to the button
   — a static parent would let the ring escape to the page's top-left. */
.th-share-btn.th-is-inline { position: relative; right: auto; bottom: auto; }
.th-share-wrap.th-is-inline { position: relative; right: auto; bottom: auto; }
/* Inline placement (card-head status line / detail action row): a compact disc
   that sits cleanly next to the status chip instead of floating over content,
   while keeping a 44×44 invisible hit area (WCAG 2.5.5). */
.th-share-btn.th-is-inline { width: 30px; height: 30px; box-shadow: none; }
.th-share-btn.th-is-inline::before { content: ''; position: absolute; inset: -7px; }
.th-share-btn.th-is-inline .th-share-ring { width: 30px; height: 30px; }
/* Right-aligned action group on a card-head line: status chip + share icon. */
.th-card-head-actions { display: inline-flex; align-items: center; gap: var(--space-1h); flex: 0 0 auto; }
/* Circular countdown ring around the share-2 icon. The ring DRAINS over the
   7-day TTL: full ring = freshly minted; thin sliver = near expiry; dashed
   red ring = expired (tap = re-mint). Replaces the older `.share-countdown`
   text chip — one indicator does at-a-glance + state. */
.th-share-ring { position: absolute; inset: 0; transform: rotate(-90deg); pointer-events: none; }
.th-share-ring-track { fill: none; stroke: var(--line, #d9d4c8); stroke-width: 2; opacity: 0.5; }
.th-share-ring-fill { fill: none; stroke: var(--accent, #2c5234); stroke-width: 2.5; stroke-linecap: round; transition: stroke-dashoffset 0.4s ease, stroke 0.3s ease; }
.th-share-wrap.th-is-warn .th-share-ring-fill { stroke: var(--warn, #d97706); }
.th-share-wrap.th-is-expired .th-share-ring-fill { stroke: var(--sig-no, #c0392b); stroke-dasharray: 3 4; stroke-dashoffset: 0; }
.th-share-wrap.th-is-expired .th-share-btn { color: var(--sig-no, #c0392b); }

/* ── Guest identify form + persistent approval banner (Slice E) ─────────
   Inline only (no modals / sheets, per feedback_no_floating_modals); used by
   events-mini/event.html (RSVP-as-guest) + polls-mini/vote.html (vote-as-guest).
   `.th-guest-fields` = 2-col form grid (.th-field.th-span-2 spans both columns);
   `.th-guest-banner` is layered onto `.th-banner.th-info` and gives it a right-side
   action button. */
.th-guest-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2h);
  margin-top: var(--space-2);
}
.th-guest-fields .th-field.th-span-2 { grid-column: 1 / -1; }
.th-guest-fields .th-field-label { margin-bottom: var(--space-1); }
/* Compact guest form (2026-10-21, /vendor/guest-form.js): the reason is one line under the title;
   "Your Scout" is a labelled optional group; the Scout's first name + a narrow last-initial box
   share a row. Same questions, less scrolling on a 360px phone. */
.th-guest-why { margin: var(--space-1) 0 0; }
.th-guest-group { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1h);
  margin: var(--space-2) 0 0; padding-top: var(--space-2h); border-top: 1px solid var(--line-2);
  font-size: var(--fs-13); font-weight: 600; color: var(--ink); }
.th-guest-group .th-meta { font-weight: 400; }
.th-guest-scout { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.45fr); gap: var(--space-2h); }
.th-field-input.th-is-initial { text-transform: uppercase; }
.th-guest-banner {
  margin-bottom: var(--space-4);
  gap: var(--space-2h);
  align-items: center;
}
.th-guest-banner .th-grow { flex: 1; min-width: 0; }
.th-guest-banner button {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  font: inherit;
  font-size: var(--fs-13);
  padding: var(--space-1h) var(--space-2h);
  border-radius: var(--radius-8);
  cursor: pointer;
  flex-shrink: 0;
}
.th-guest-banner button:disabled { opacity: 0.6; cursor: default; }

/* =====================================================================
   PAGE-SCOPED STYLES — lifted from each page's own <style> on 2026-10-18 (scripts/codemods/lift-page-styles.mjs).
   Every rule is scoped to its page with :where(.th-page-<slug>, …), which adds no specificity, so it behaves exactly as it did
   inside the page. These are custom primitives waiting for the consolidation pass: map each onto a style-guide primitive,
   promote it into the guide, or keep it — see architecture/style-alignment/traversal.md.
   ===================================================================== */

/* ---- page: about-safety (apps/mobile/about-safety.html) ---- */
/* The safety one-pager is a Council-facing artifact: long-form text,
       clean type, comfortable reading. Use shared design tokens for color +
       spacing; no card chrome, no tap targets — it's a document.

       Constraints honored:
       - NO admin/audit chrome on user surfaces (G7) — but THIS page IS the
         single policy page (per saved memory feedback_no_audit_chrome).
       - Public page (no auth). No bell. No nav.
       - Mobile-first; reads top-to-bottom on any width. */
    .th-safety-doc:where(.th-page-about-safety, .th-page-about-safety *) {
      max-width: 720px;
      margin: 0 auto;
      padding: 20px 16px 48px;
      line-height: 1.5;
      color: var(--ink);
    }
    .th-safety-doc .th-doc-title:where(.th-page-about-safety, .th-page-about-safety *) {
      font-size: 22px;
      font-weight: 700;
      margin: 8px 0 4px;
      letter-spacing: -0.01em;
      color: var(--ink);
    }
    .th-safety-doc .th-subtitle:where(.th-page-about-safety, .th-page-about-safety *) {
      color: var(--muted);
      font-size: 13px;
      margin: 0 0 20px;
    }
    .th-safety-doc h2:where(.th-page-about-safety, .th-page-about-safety *) {
      font-size: 16px;
      font-weight: 700;
      margin: 28px 0 8px;
      color: var(--accent-d, var(--accent));
    }
    .th-safety-doc h3:where(.th-page-about-safety, .th-page-about-safety *) {
      font-size: 14px;
      font-weight: 600;
      margin: 16px 0 6px;
    }
    .th-safety-doc p:where(.th-page-about-safety, .th-page-about-safety *) {
      margin: 0 0 10px;
      font-size: 14px;
    }
    .th-safety-doc ul:where(.th-page-about-safety, .th-page-about-safety *) {
      margin: 6px 0 12px;
      padding-left: 20px;
      font-size: 14px;
    }
    .th-safety-doc ul li:where(.th-page-about-safety, .th-page-about-safety *) { margin: 4px 0; }
    .th-safety-doc table:where(.th-page-about-safety, .th-page-about-safety *) {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
      margin: 8px 0 16px;
    }
    .th-safety-doc table th:where(.th-page-about-safety, .th-page-about-safety *),
    .th-safety-doc table td:where(.th-page-about-safety, .th-page-about-safety *) {
      padding: 8px 10px;
      text-align: left;
      vertical-align: top;
      border-bottom: 1px solid var(--line-2);
    }
    .th-safety-doc table th:where(.th-page-about-safety, .th-page-about-safety *) {
      font-weight: 600;
      color: var(--ink);
      background: var(--paper-2);
    }
    /* Document-tone tweaks on the shared .th-callout: longer-form copy gets
       slightly larger type + roomier padding than the default banner-sized
       callout. */
    .th-safety-doc .th-callout:where(.th-page-about-safety, .th-page-about-safety *) {
      padding: 12px 14px;
      border-radius: 8px;
      margin: 0 0 18px;
      font-size: 14px;
    }
    .th-safety-doc .th-footer-note:where(.th-page-about-safety, .th-page-about-safety *) {
      font-size: 12px;
      color: var(--muted);
      margin-top: 28px;
      padding-top: 14px;
      border-top: 1px solid var(--line-2);
    }
    .th-safety-doc .th-signoff:where(.th-page-about-safety, .th-page-about-safety *) {
      font-style: italic;
      color: var(--muted);
      margin: 18px 0 0;
      text-align: center;
    }

/* ---- page: admin-bulk-rank (apps/mobile/admin-bulk-rank.html) ---- */
.th-patrol-block:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { margin-bottom:14px; }
    .th-patrol-block-head:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { display:flex; align-items:center; gap:8px; margin-bottom:6px; padding:0 4px; }
    .th-patrol-block-name:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:0.05em; flex:1; }
    .th-patrol-block-stat:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }

    /* Same select-mode shape as admin-members:
       - Header "Select" toggles
       - sel-strip up top shows count + "Catch up rank" action
       - Tapping the action expands an inline .role-inline panel with rank
         chips spanning the full grid width.
       - No per-row controls. No floating bottom action bar. */
    .th-is-select-mode .th-roster-check:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { display:block; }

    .th-sel-strip:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { position:static; background:var(--accent); color:#fff; padding:8px 14px; font-size:13px; font-weight:600; display:none; align-items:center; gap:10px; flex-wrap:wrap; }
    .th-is-select-mode.th-has-selection .th-sel-strip:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { display:flex; }
    .th-sel-strip-count:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { flex:1 1 auto; min-width:80px; }
    .th-sel-strip-actions:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { display:flex; gap:6px; flex:0 0 auto; flex-wrap:wrap; }
    .th-sel-strip-actions .th-btn:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { padding:4px 10px; font-size:12px; font-weight:600; }
    .th-sel-strip-actions .th-btn-secondary:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { background:rgba(255,255,255,0.18); color:#fff; border-color:rgba(255,255,255,0.35); }
    .th-sel-strip-actions .th-btn-secondary:hover:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { background:rgba(255,255,255,0.28); }

    /* Inline rank-picker — same shape as the .role-inline pattern on
       admin-members. Appended at the end of the list when "Catch up rank"
       is tapped; spans full width below the patrol blocks. */
    .th-rank-inline:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { background:var(--paper-2); border-radius:12px; margin:8px 0; padding:12px; animation:th-admin-bulk-rank-rank-in 180ms ease; }
    @keyframes th-admin-bulk-rank-rank-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
    .th-rank-inline h3:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { margin:0 0 8px; font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:0.04em; }
    .th-rank-inline .th-rank-list:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
    @media (min-width:600px) { .th-rank-inline .th-rank-list:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { grid-template-columns:1fr 1fr 1fr 1fr; } }
    .th-rank-opt:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { display:flex; align-items:center; gap:8px; width:100%; text-align:left; padding:10px 12px; border:1.5px solid var(--line); border-radius:10px; background:var(--paper); cursor:pointer; font:inherit; font-size:14px; color:var(--ink); }
    .th-rank-opt:hover:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { border-color:var(--accent); }
    .th-rank-actions:where(.th-page-admin-bulk-rank, .th-page-admin-bulk-rank *) { display:flex; gap:8px; margin-top:10px; justify-content:flex-end; }

/* ---- page: admin-guests (apps/mobile/admin-guests.html) ---- */
/* Group headers (matches admin-members). */
    .th-group-h:where(.th-page-admin-guests, .th-page-admin-guests *) { display:flex; align-items:center; gap:8px; margin:18px 0 6px; }
    .th-group-h:first-child:where(.th-page-admin-guests, .th-page-admin-guests *) { margin-top:0; }
    .th-group-h .th-eyebrow:where(.th-page-admin-guests, .th-page-admin-guests *) { margin:0; }

    /* Guest cell trail — inline Approve / Decline buttons. No floating modal,
       no native confirm() — feedback_no_floating_modals + feedback_no_native_confirm. */
    .th-guest-trail:where(.th-page-admin-guests, .th-page-admin-guests *) { display:flex; gap:6px; flex:0 0 auto; }
    /* WCAG 2.5.5 — visible pill stays compact; hit area is 44×44 via invisible ::before. */
    .th-btn-mini:where(.th-page-admin-guests, .th-page-admin-guests *) { padding:5px 10px; font-size:12px; font-weight:600; border-radius:8px; border:1px solid var(--line); background:var(--paper); cursor:pointer; font:inherit; color:var(--ink); display:inline-flex; align-items:center; justify-content:center; position:relative; }
    .th-btn-mini:where(.th-page-admin-guests, .th-page-admin-guests *)::before { content:""; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); min-width:44px; min-height:44px; width:100%; height:100%; }
    .th-btn-mini:hover:where(.th-page-admin-guests, .th-page-admin-guests *) { border-color:var(--accent); }
    .th-btn-mini.th-is-primary:where(.th-page-admin-guests, .th-page-admin-guests *) { background:var(--accent); color:#fff; border-color:var(--accent); }
    .th-btn-mini.th-is-primary:hover:where(.th-page-admin-guests, .th-page-admin-guests *) { background:var(--accent-d, #1f3a25); }
    .th-btn-mini.th-is-danger:where(.th-page-admin-guests, .th-page-admin-guests *) { color:var(--sig-no); border-color:transparent; }
    .th-btn-mini.th-is-danger:hover:where(.th-page-admin-guests, .th-page-admin-guests *) { border-color:var(--sig-no); }

    /* Decline-confirm bar — morphs in place on the row (mirrors the bulk-remove
       pattern in admin-members.html: "Decline N? They can be re-invited. · Keep / Decline"). */
    .th-decline-confirm:where(.th-page-admin-guests, .th-page-admin-guests *) { background:var(--sig-no-s, #fdecec); border:1px solid var(--sig-no, #c0392b); border-left:3px solid var(--sig-no, #c0392b); border-radius:10px; padding:8px 12px; margin:6px 0 10px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12px; font-weight:600; color:var(--sig-no, #c0392b); }
    .th-decline-confirm-msg:where(.th-page-admin-guests, .th-page-admin-guests *) { flex:1 1 auto; min-width:140px; }
    .th-decline-confirm .th-btn-mini:where(.th-page-admin-guests, .th-page-admin-guests *) { flex:0 0 auto; }
    .th-decline-confirm .th-btn-mini.th-is-danger:where(.th-page-admin-guests, .th-page-admin-guests *) { background:var(--sig-no, #c0392b); color:#fff; border-color:var(--sig-no, #c0392b); }

    /* Position chip — "Guest · pending" / "Guest · approved". */
    .th-role-chip.th-is-guest:where(.th-page-admin-guests, .th-page-admin-guests *) { background:var(--amber-s); color:var(--amber-ink); }
    .th-role-chip.th-is-guest-approved:where(.th-page-admin-guests, .th-page-admin-guests *) { background:var(--accent-s); color:var(--accent-d, #1f3a25); }

    /* Guest review = a household-shaped row (like roster.html shows a household)
       with EVERYTHING visible + Approve/Decline inline. One click to approve —
       no expand, no buried actions. Each guest is one full-width .th-list-row. */
    .th-guests-card:where(.th-page-admin-guests, .th-page-admin-guests *) { padding-top: 2px; padding-bottom: 2px; }
    .th-guest-row .th-body:where(.th-page-admin-guests, .th-page-admin-guests *) { min-width: 0; }
    .th-guest-row .th-gname:where(.th-page-admin-guests, .th-page-admin-guests *) { font-size: 14px; font-weight: 600; color: var(--ink); }
    .th-guest-row .th-gscout:where(.th-page-admin-guests, .th-page-admin-guests *) { font-size: 12px; color: var(--muted); }
    .th-guest-row .th-gcontact:where(.th-page-admin-guests, .th-page-admin-guests *) { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; line-height: 1.4; }
    .th-guest-row .th-gcontact a:where(.th-page-admin-guests, .th-page-admin-guests *) { color: var(--accent); text-decoration: none; }
    .th-guest-row .th-gactions:where(.th-page-admin-guests, .th-page-admin-guests *) { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
    .th-guest-row.th-is-active:where(.th-page-admin-guests, .th-page-admin-guests *) { background: var(--sig-no-s, #fdecec); border-radius: 8px; }
    /* #55 — coarse signup-region trust flag (soft, never a block). */
    .th-region-ok:where(.th-page-admin-guests, .th-page-admin-guests *) { color:var(--ok, #1e7e34); font-weight:600; }
    .th-region-warn:where(.th-page-admin-guests, .th-page-admin-guests *) { color:var(--warn, #b45309); font-weight:700; }
    .th-is-empty-inline:where(.th-page-admin-guests, .th-page-admin-guests *) { color:var(--muted); opacity:0.6; font-style:italic; }

    /* .flash retired → shared .th-banner (.th-err red / .th-ok green). */

    .th-empty-state:where(.th-page-admin-guests, .th-page-admin-guests *, .th-page-admin-live, .th-page-admin-live *) { padding:32px 16px; text-align:center; }
    .th-empty-state .th-empty-ico:where(.th-page-admin-guests, .th-page-admin-guests *, .th-page-admin-live, .th-page-admin-live *) { width:48px; height:48px; color:var(--muted); opacity:0.5; margin:0 auto 10px; display:block; }
    .th-empty-state p:where(.th-page-admin-guests, .th-page-admin-guests *, .th-page-admin-live, .th-page-admin-live *) { font-size:14px; color:var(--muted); margin:0; line-height:1.5; }

    /* Approved-this-month is collapsible (matches the <details> usage on
       admin-positions.html etc.). */
    details.th-approved-section:where(.th-page-admin-guests, .th-page-admin-guests *) { margin-top:18px; }
    details.th-approved-section > summary:where(.th-page-admin-guests, .th-page-admin-guests *) { cursor:pointer; list-style:none; padding:6px 0; font-size:12px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); display:flex; align-items:center; gap:6px; }
    details.th-approved-section > summary:where(.th-page-admin-guests, .th-page-admin-guests *)::-webkit-details-marker { display:none; }
    details.th-approved-section > summary:where(.th-page-admin-guests, .th-page-admin-guests *)::after { content:'›'; transition:transform 180ms ease; }
    details.th-approved-section[open] > summary:where(.th-page-admin-guests, .th-page-admin-guests *)::after { transform:rotate(90deg); }

/* ---- page: admin-households (apps/mobile/admin-households.html) ---- */
.th-hh-card:where(.th-page-admin-households, .th-page-admin-households *) { background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:14px; margin-bottom:10px; }
    /* one person per full-width row, as the mockup shows (architecture/mockups/mobile/admin-households.html): the Scout roster's 2-up grid squeezed an adult's name, email and call button into half a card ("Mr. …") */
    .th-hh-card .th-roster-grid:where(.th-page-admin-households, .th-page-admin-households *) { grid-template-columns: 1fr; }
    .th-hh-head:where(.th-page-admin-households, .th-page-admin-households *) { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
    .th-hh-title:where(.th-page-admin-households, .th-page-admin-households *) { flex:1; font-size:14px; font-weight:700; color:var(--ink); }
    .th-hh-meta:where(.th-page-admin-households, .th-page-admin-households *) { font-size:11px; color:var(--muted); }
    .th-hh-sec-label:where(.th-page-admin-households, .th-page-admin-households *) { font-size:10px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; color:var(--muted); margin:8px 2px 6px; }
    .th-hh-sec-label:first-child:where(.th-page-admin-households, .th-page-admin-households *) { margin-top:0; }
    /* Households is a read-only grouped roster. Cells render via RosterGrid.cell
       (static — no tap target); the household card IS the grouping wrapper.
       Adults get a tap-to-call phone pill in the cell's trail slot — universal
       action (tel: works on iOS / Android / desktop). */
    .th-hh-call:where(.th-page-admin-households, .th-page-admin-households *) { display:inline-flex; align-items:center; gap:4px; padding:4px 8px; border:1px solid var(--line); border-radius:999px; background:var(--paper); color:var(--ink); font-size:11px; font-weight:600; text-decoration:none; white-space:nowrap; }
    .th-hh-call:hover:where(.th-page-admin-households, .th-page-admin-households *) { border-color:var(--accent); background:var(--accent-s); color:var(--accent-d,#1f3a25); }
    .th-hh-call svg:where(.th-page-admin-households, .th-page-admin-households *) { width:12px; height:12px; color:var(--accent); flex:0 0 auto; }

/* ---- page: admin-members (apps/mobile/admin-members.html) ---- */
.th-seg-tabs:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; gap:4px; padding:4px; background:var(--paper-2); border-radius:12px; margin-bottom:14px; }
    .th-seg-tabs button:where(.th-page-admin-members, .th-page-admin-members *) { flex:1; padding:8px 10px; background:transparent; border:0; font:inherit; font-size:13px; font-weight:600; color:var(--muted); border-radius:8px; cursor:pointer; }
    .th-seg-tabs button.th-is-active:where(.th-page-admin-members, .th-page-admin-members *) { background:var(--paper); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,0.04); }
    .th-seg-tabs .th-count:where(.th-page-admin-members, .th-page-admin-members *) { font-weight:500; }
    .th-tab-content:where(.th-page-admin-members, .th-page-admin-members *) { display:none; }
    .th-tab-content.th-is-active:where(.th-page-admin-members, .th-page-admin-members *) { display:block; }

    .th-bulk-invite:where(.th-page-admin-members, .th-page-admin-members *) { background:var(--accent-s); border:1px solid var(--accent); border-radius:14px; padding:12px 14px; margin-bottom:14px; }
    .th-bulk-invite h2:where(.th-page-admin-members, .th-page-admin-members *) { font-size:14px; font-weight:700; color:var(--accent-d,#1f3a25); margin:0 0 6px; }
    .th-bulk-invite p:where(.th-page-admin-members, .th-page-admin-members *) { font-size:12px; color:var(--accent-d,#1f3a25); margin:0 0 8px; line-height:1.45; }
    .th-bulk-invite .th-actions:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; gap:8px; margin-top:8px; align-items:center; flex-wrap:wrap; }
    .th-bulk-invite .th-count:where(.th-page-admin-members, .th-page-admin-members *) { flex:1; min-width:80px; font-size:11px; color:var(--accent-d,#1f3a25); font-weight:600; }
    .th-bulk-invite .th-btn:where(.th-page-admin-members, .th-page-admin-members *) { padding:6px 14px; font-size:13px; }

    /* Members render on the shared .roster-* grid (like Leadership & positions);
       the select-mode checkbox shows on a roster cell in this page's mode. */
    .th-is-select-mode .th-roster-check:where(.th-page-admin-members, .th-page-admin-members *) { display:block; }
    /* .member-row is kept only for the Pending-invites list (a different entity). */
    .th-member-row:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; align-items:center; gap:10px; padding:10px 0; border-top:1px solid var(--line); }
    .th-member-row:first-of-type:where(.th-page-admin-members, .th-page-admin-members *) { border-top:0; padding-top:6px; }
    .th-member-body:where(.th-page-admin-members, .th-page-admin-members *) { flex:1; min-width:0; }
    .th-member-name:where(.th-page-admin-members, .th-page-admin-members *) { font-size:14px; font-weight:500; color:var(--ink); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
    .th-member-sub:where(.th-page-admin-members, .th-page-admin-members *) { font-size:12px; color:var(--muted); margin-top:1px; }

    .th-is-select-mode #th-bottom-nav:where(.th-page-admin-members, .th-page-admin-members *) { display:none; }
    /* Transient action error — inline banner, never an alert(). */
    /* .flash retired → shared .th-banner (.th-err red / .th-ok green). */

    /* Select-mode top strip — in-flow below the header. Hosts the count + bulk
       actions in one place; replaces the prior bottom sticky-action-bar
       (feedback_no_floating_modals — no fixed-bottom panel). */
    .th-sel-strip:where(.th-page-admin-members, .th-page-admin-members *) { position:static; background:var(--accent); color:#fff; padding:8px 14px; font-size:13px; font-weight:600; display:none; align-items:center; gap:10px; flex-wrap:wrap; }
    .th-is-select-mode.th-has-selection .th-sel-strip:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; }
    .th-sel-strip-count:where(.th-page-admin-members, .th-page-admin-members *) { flex:1 1 auto; min-width:80px; }
    .th-sel-strip-actions:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; gap:6px; flex:0 0 auto; flex-wrap:wrap; }
    .th-sel-strip-actions .th-btn:where(.th-page-admin-members, .th-page-admin-members *) { padding:4px 10px; font-size:12px; font-weight:600; }
    .th-sel-strip-actions .th-btn-secondary:where(.th-page-admin-members, .th-page-admin-members *) { background:rgba(255,255,255,0.18); color:#fff; border-color:rgba(255,255,255,0.35); }
    .th-sel-strip-actions .th-btn-secondary:hover:where(.th-page-admin-members, .th-page-admin-members *) { background:rgba(255,255,255,0.28); }
    .th-sel-strip-actions .th-btn-destructive:where(.th-page-admin-members, .th-page-admin-members *) { background:#fff; color:var(--sig-no); border-color:#fff; }
    /* Bulk-remove confirm — the strip morphs in place (no native confirm()). */
    .th-sel-strip.th-is-confirming .th-sel-strip-actions:where(.th-page-admin-members, .th-page-admin-members *) { display:none; }
    .th-bulk-confirm:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; gap:6px; align-items:center; flex:0 0 auto; flex-wrap:wrap; }
    .th-bulk-confirm-msg:where(.th-page-admin-members, .th-page-admin-members *) { font-size:12px; font-weight:600; color:#fff; }
    .th-bulk-confirm .th-btn:where(.th-page-admin-members, .th-page-admin-members *) { padding:4px 10px; font-size:12px; font-weight:600; }
    .th-bulk-confirm .th-btn-ghost:where(.th-page-admin-members, .th-page-admin-members *) { background:rgba(255,255,255,0.18); color:#fff; border-color:rgba(255,255,255,0.35); }
    .th-bulk-confirm .th-btn-destructive:where(.th-page-admin-members, .th-page-admin-members *) { background:#fff; color:var(--sig-no); border-color:#fff; }

    .th-pending-pill:where(.th-page-admin-members, .th-page-admin-members *) { font-size:10px; font-weight:700; padding:2px 8px; border-radius:8px; background:var(--amber-s); color:var(--amber-ink); letter-spacing:0.04em; text-transform:uppercase; }
    .th-group-h:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; align-items:center; gap:8px; margin:18px 0 6px; }
    .th-group-h:first-child:where(.th-page-admin-members, .th-page-admin-members *) { margin-top:0; }
    .th-group-h .th-eyebrow:where(.th-page-admin-members, .th-page-admin-members *) { margin:0; }
    /* Pending-invite row + actions (Members tab, top group). */
    .th-invite-row:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; align-items:center; gap:10px; padding:10px 0; border-top:1px solid var(--line); }
    .th-invite-row:first-of-type:where(.th-page-admin-members, .th-page-admin-members *) { border-top:0; }
    .th-ir-body:where(.th-page-admin-members, .th-page-admin-members *) { flex:1; min-width:0; }
    .th-ir-email:where(.th-page-admin-members, .th-page-admin-members *) { font-size:14px; font-weight:600; color:var(--ink); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
    .th-ir-meta:where(.th-page-admin-members, .th-page-admin-members *) { font-size:11px; color:var(--muted); margin-top:1px; }
    .th-ir-actions:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; gap:6px; flex:0 0 auto; }
    /* WCAG 2.5.5 — visible pill stays compact; hit area is 44px tall. */
    /* WCAG 2.5.5 — visible pill stays compact; hit area is 44×44 via invisible ::before. */
    .th-btn-mini:where(.th-page-admin-members, .th-page-admin-members *) { padding:5px 10px; font-size:12px; font-weight:600; border-radius:8px; border:1px solid var(--line); background:var(--paper); cursor:pointer; font:inherit; color:var(--ink); display:inline-flex; align-items:center; justify-content:center; position:relative; }
    .th-btn-mini:where(.th-page-admin-members, .th-page-admin-members *)::before { content:""; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); min-width:44px; min-height:44px; width:100%; height:100%; }
    .th-btn-mini:hover:where(.th-page-admin-members, .th-page-admin-members *) { border-color:var(--accent); }
    .th-btn-mini.th-is-danger:where(.th-page-admin-members, .th-page-admin-members *) { color:var(--sig-no); border-color:transparent; }
    .th-btn-mini.th-is-danger:hover:where(.th-page-admin-members, .th-page-admin-members *) { border-color:var(--sig-no); }
    /* Invite tab — cleaned-email preview chips + send results. */
    .th-invite-chips:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
    .th-invite-chip:where(.th-page-admin-members, .th-page-admin-members *) { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border:1px solid var(--line); border-radius:999px; background:var(--paper); font-size:12px; color:var(--ink); }
    .th-invite-chip.th-is-bad:where(.th-page-admin-members, .th-page-admin-members *) { border-color:var(--sig-no); color:var(--sig-no); }
    .th-invite-chip .th-x:where(.th-page-admin-members, .th-page-admin-members *) { cursor:pointer; color:var(--muted); border:0; background:none; font:inherit; font-size:14px; padding:0; line-height:1; }
    .th-result-row:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; border-top:1px solid var(--line); font-size:13px; }
    .th-result-row:first-of-type:where(.th-page-admin-members, .th-page-admin-members *) { border-top:0; }
    .th-result-ok:where(.th-page-admin-members, .th-page-admin-members *) { color:var(--accent); font-weight:600; flex:0 0 auto; }
    .th-result-bad:where(.th-page-admin-members, .th-page-admin-members *) { color:var(--sig-no); font-weight:600; flex:0 0 auto; }

    /* Role picker — INLINE panel that expands directly below the tapped member
       row (no floating modal; matches the app's inline-selection convention). */
    .th-role-inline:where(.th-page-admin-members, .th-page-admin-members *) { background:var(--paper-2); border-radius:12px; margin:2px 0 8px; padding:10px; animation:th-admin-members-role-in 180ms ease; }
    @keyframes th-admin-members-role-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
    .th-role-inline .th-role-list:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; flex-direction:column; gap:6px; }
    .th-role-sec-label:where(.th-page-admin-members, .th-page-admin-members *) { font-size:10px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); margin:2px 2px 6px; }
    .th-role-inline .th-admin-opt:where(.th-page-admin-members, .th-page-admin-members *) { margin-top:2px; }
    .th-role-opt:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px; border:1.5px solid var(--line); border-radius:10px; background:var(--paper); cursor:pointer; font:inherit; }
    .th-role-opt.th-is-current:where(.th-page-admin-members, .th-page-admin-members *) { border-color:var(--accent); background:var(--accent-s); }
    .th-role-opt-body:where(.th-page-admin-members, .th-page-admin-members *) { flex:1; display:flex; flex-direction:column; }
    .th-role-opt-label:where(.th-page-admin-members, .th-page-admin-members *) { font-size:14px; font-weight:600; color:var(--ink); }
    .th-role-opt-sub:where(.th-page-admin-members, .th-page-admin-members *) { font-size:12px; color:var(--muted); margin-top:1px; }
    .th-role-opt-check:where(.th-page-admin-members, .th-page-admin-members *) { color:var(--accent); opacity:0; }
    .th-role-opt-check svg:where(.th-page-admin-members, .th-page-admin-members *) { width:18px; height:18px; display:block; }
    .th-role-opt.th-is-current .th-role-opt-check:where(.th-page-admin-members, .th-page-admin-members *) { opacity:1; }
    .th-role-actions:where(.th-page-admin-members, .th-page-admin-members *) { display:flex; gap:8px; margin-top:10px; }

/* ---- page: admin-patrols (apps/mobile/admin-patrols.html) ---- */
.th-patrol-head:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
    .th-patrol-flag:where(.th-page-admin-patrols, .th-page-admin-patrols *) { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex:0 0 auto; background:var(--ch-patrol-s,#dcfce7); color:var(--ch-patrol,#a8543c); }
    .th-patrol-flag i:where(.th-page-admin-patrols, .th-page-admin-patrols *) { width:18px; height:18px; }
    .th-patrol-flag.th-is-warn:where(.th-page-admin-patrols, .th-page-admin-patrols *) { background:var(--amber-s); color:var(--amber-ink); }
    .th-patrol-name:where(.th-page-admin-patrols, .th-page-admin-patrols *) { flex:1; font-size:16px; font-weight:700; color:var(--ink); letter-spacing:-0.005em; }
    .th-patrol-count:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
    .th-patrol-edit:where(.th-page-admin-patrols, .th-page-admin-patrols *) { color:var(--accent); font-size:13px; font-weight:600; text-decoration:none; padding:4px 10px; border-radius:8px; }

    .th-leadership:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:flex; gap:8px; margin-bottom:10px; padding:8px 10px; background:var(--paper-2); border-radius:10px; font-size:12px; }
    .th-lead-cell:where(.th-page-admin-patrols, .th-page-admin-patrols *) { flex:1; }
    .th-lead-lbl:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:10px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:0.05em; }
    .th-lead-val:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:13px; font-weight:600; color:var(--ink); margin-top:2px; }
    .th-lead-val.th-is-empty:where(.th-page-admin-patrols, .th-page-admin-patrols *) { color:var(--muted); font-weight:500; font-style:italic; }

    .th-scout-check:where(.th-page-admin-patrols, .th-page-admin-patrols *) { width:24px; height:24px; flex:0 0 auto; display:none; appearance:none; -webkit-appearance:none; border:2px solid var(--line); border-radius:5px; background:var(--paper); cursor:pointer; }
    .th-is-rearrange .th-scout-check:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:inline-block; }
    .th-scout-check:checked:where(.th-page-admin-patrols, .th-page-admin-patrols *) { background:var(--accent); border-color:var(--accent); }
    .th-scout-check:checked:where(.th-page-admin-patrols, .th-page-admin-patrols *)::after { content:'✓'; color:#fff; font-size:14px; font-weight:bold; display:block; text-align:center; line-height:20px; margin-top:-2px; }
    .th-scout-avatar:where(.th-page-admin-patrols, .th-page-admin-patrols *) { width:30px; height:30px; flex:0 0 auto; }
    .th-scout-body:where(.th-page-admin-patrols, .th-page-admin-patrols *) { flex:1; min-width:0; }
    .th-scout-name:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:14px; font-weight:500; color:var(--ink); }
    .th-scout-meta:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:flex; gap:6px; align-items:center; margin-top:2px; }
    .th-pos-chip:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:10px; font-weight:700; padding:1px 6px; border-radius:8px; background:var(--accent-s); color:var(--accent); letter-spacing:0.04em; }
    .th-pos-chip.th-is-pl:where(.th-page-admin-patrols, .th-page-admin-patrols *) { background:var(--amber-s); color:var(--amber-ink); }
    .th-pos-chip.th-is-apl:where(.th-page-admin-patrols, .th-page-admin-patrols *) { background:#dbeafe; color:#1e40af; }
    .th-scout-hint:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:11px; color:var(--muted); margin-top:2px; font-style:italic; }
    .th-scout-hint strong:where(.th-page-admin-patrols, .th-page-admin-patrols *) { color:var(--ink); font-style:normal; font-weight:600; }
    .th-scout-hint.th-is-empty:where(.th-page-admin-patrols, .th-page-admin-patrols *) { color:var(--muted); }
    .th-quick-assign:where(.th-page-admin-patrols, .th-page-admin-patrols *) { padding:6px 10px; font:inherit; font-size:12px; font-weight:600; color:#fff; background:var(--accent); border:0; border-radius:8px; cursor:pointer; flex:0 0 auto; }
    .th-quick-assign.th-is-pick:where(.th-page-admin-patrols, .th-page-admin-patrols *) { background:transparent; color:var(--accent); border:1px solid var(--accent); }
    .th-is-rearrange .th-quick-assign:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:none; }

    .th-all-accounted:where(.th-page-admin-patrols, .th-page-admin-patrols *) {
      display:flex; align-items:center; gap:8px;
      padding:8px 12px; margin-bottom:12px;
      background:var(--ok-s,#e6f4ea); border:1px solid var(--ok,#1e7e34);
      border-left:3px solid var(--ok,#1e7e34);
      border-radius:10px;
      font-size:13px; color:var(--ok,#1e7e34); font-weight:600;
    }
    .th-all-accounted i:where(.th-page-admin-patrols, .th-page-admin-patrols *) { width:14px; height:14px; flex:0 0 auto; }

    /* Move-mode bar — sticky bottom; replaces bottom-nav while active. */
    .th-is-rearrange .th-sticky-action-bar:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:flex; }
    .th-sticky-action-bar .th-btn:where(.th-page-admin-patrols, .th-page-admin-patrols *) { flex:1; }
    .th-is-rearrange #th-bottom-nav:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:none; }

    .th-header-btn.th-is-toggle:where(.th-page-admin-patrols, .th-page-admin-patrols *) { width:auto; padding:0 10px; font-size:13px; font-weight:600; color:var(--accent); }
    .th-is-rearrange .th-header-btn.th-is-toggle:where(.th-page-admin-patrols, .th-page-admin-patrols *) { color:var(--ink); background:var(--accent-s); border-radius:8px; }

    /* In-flow top strip (below the header), not the bottom-floating fixed variant.
       Keep layout local; only the show trigger is shared. */
    .th-sel-strip:where(.th-page-admin-patrols, .th-page-admin-patrols *) { position:static; background:var(--accent); color:#fff; padding:8px 14px; font-size:13px; font-weight:600; display:none; align-items:center; justify-content:space-between; }
    .th-is-rearrange.th-has-selection .th-sel-strip:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:flex; }

    .th-create-card:where(.th-page-admin-patrols, .th-page-admin-patrols *) { border:1px dashed var(--line); background:var(--paper); border-radius:14px; padding:14px; display:flex; align-items:center; gap:10px; cursor:pointer; margin-top:12px; }
    .th-create-card:hover:where(.th-page-admin-patrols, .th-page-admin-patrols *) { border-color:var(--accent); background:var(--accent-s); }
    .th-create-card .th-ico:where(.th-page-admin-patrols, .th-page-admin-patrols *) { width:32px; height:32px; border-radius:8px; background:var(--paper-2); color:var(--muted); display:flex; align-items:center; justify-content:center; }
    .th-is-rearrange .th-create-card:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:none; }

    /* Inline target-patrol chooser (no modal — feedback_no_floating_modals).
       Two uses: the Move bar morphs into these chips, and the Unassigned
       "Pick patrol…" expands a chip row right below the Scout. */
    .th-move-actions:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:flex; gap:8px; width:100%; }
    .th-sticky-action-bar.th-is-choosing .th-move-actions:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:none; }
    .th-patrol-choose:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:flex; flex-wrap:wrap; gap:6px; align-items:center; width:100%; }
    .th-patrol-choose.th-is-inline:where(.th-page-admin-patrols, .th-page-admin-patrols *) { padding:10px; background:var(--paper-2); border:1px solid var(--accent); border-radius:12px; margin:2px 0 8px; animation:th-admin-patrols-pc-in 160ms ease; }
    @keyframes th-admin-patrols-pc-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
    .th-patrol-choose-lbl:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:12px; font-weight:700; color:var(--muted); margin-right:2px; }
    .th-patrol-pick-chip:where(.th-page-admin-patrols, .th-page-admin-patrols *) { padding:7px 12px; border:1.5px solid var(--line); border-radius:999px; background:var(--paper); font:inherit; font-size:13px; font-weight:600; color:var(--ink); cursor:pointer; }
    .th-patrol-pick-chip:hover:where(.th-page-admin-patrols, .th-page-admin-patrols *) { border-color:var(--accent); background:var(--accent-s); }
    .th-patrol-pick-chip.th-is-unassigned:where(.th-page-admin-patrols, .th-page-admin-patrols *) { border-style:dashed; color:var(--muted); }
    .th-patrol-choose .th-pc-cancel:where(.th-page-admin-patrols, .th-page-admin-patrols *) { background:transparent; border:0; color:var(--muted); font:inherit; font-size:14px; cursor:pointer; padding:6px 8px; margin-left:auto; }
    /* Transient action error — shared .th-banner err (inline, never an alert()). */

    /* Inline PL/APL picker — uses the SHARED roster grid (rank shield + name,
       2/3-up responsive) as every other people-picker in the app. NOT a vertical
       text list. [[feedback_role_letter_chips]] + [[feedback_customer_delight]]. */
    .th-patrol-leadership-picker:where(.th-page-admin-patrols, .th-page-admin-patrols *) { background:var(--paper-2); border:1px solid var(--accent); border-radius:12px; margin:2px 0 10px; padding:10px; animation:th-admin-patrols-plp-in 180ms ease; }
    @keyframes th-admin-patrols-plp-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
    .th-patrol-leadership-picker .th-plp-h:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:13px; font-weight:700; color:var(--ink); margin:0 2px 8px; }
    .th-patrol-leadership-picker .th-grp-h:where(.th-page-admin-patrols, .th-page-admin-patrols *) { font-size:10px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); margin:8px 2px 6px; }
    .th-patrol-leadership-picker .th-plp-slot:where(.th-page-admin-patrols, .th-page-admin-patrols *) { margin-bottom:8px; }
    /* "— none —" cell: empty rank-shield slot (dashed border, muted em-dash). */
    .th-patrol-leadership-picker .th-plp-none-badge:where(.th-page-admin-patrols, .th-page-admin-patrols *) {
      background:none !important; border:1px dashed var(--line); border-radius:4px;
      color:var(--muted); display:inline-flex; align-items:center; justify-content:center;
      width:18px; height:18px; font-size:12px; font-weight:600; padding:0;
    }
    .th-patrol-leadership-picker .th-pos-actions:where(.th-page-admin-patrols, .th-page-admin-patrols *) { display:flex; gap:8px; margin-top:4px; }
    .th-patrol-card.th-is-active:where(.th-page-admin-patrols, .th-page-admin-patrols *) { box-shadow:0 0 0 1px var(--accent); }
    .th-patrol-edit:where(.th-page-admin-patrols, .th-page-admin-patrols *) { cursor:pointer; border:0; background:transparent; font:inherit; }

/* ---- page: admin-plc (apps/mobile/admin-plc.html) ---- */
/* Adult-monitor toggles reuse the admin-positions .pos-opt primitive (the
       combinable multi-select on/off button) — page-local styles, same shape. */
    .th-pos-opt:where(.th-page-admin-plc, .th-page-admin-plc *) { display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px; border:1.5px solid var(--line); border-radius:10px; background:var(--paper); cursor:pointer; font:inherit; margin-bottom:6px; }
    .th-pos-opt.th-is-on:where(.th-page-admin-plc, .th-page-admin-plc *) { border-color:var(--accent); background:var(--accent-s); }
    .th-pos-opt[disabled]:where(.th-page-admin-plc, .th-page-admin-plc *) { cursor:default; opacity:0.9; }
    .th-pos-opt .th-ob:where(.th-page-admin-plc, .th-page-admin-plc *) { flex:1; display:flex; flex-direction:column; }
    .th-pos-opt .th-ol:where(.th-page-admin-plc, .th-page-admin-plc *) { font-size:14px; font-weight:600; color:var(--ink); }
    .th-pos-opt .th-oh:where(.th-page-admin-plc, .th-page-admin-plc *) { font-size:11px; color:var(--muted); margin-top:1px; }
    .th-pos-opt .th-ock:where(.th-page-admin-plc, .th-page-admin-plc *) { color:var(--accent); opacity:0; }
    .th-pos-opt .th-ock svg:where(.th-page-admin-plc, .th-page-admin-plc *) { width:18px; height:18px; display:block; }
    .th-pos-opt.th-is-on .th-ock:where(.th-page-admin-plc, .th-page-admin-plc *) { opacity:1; }
    .th-plc-eyebrow:where(.th-page-admin-plc, .th-page-admin-plc *) { font-size:11px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); margin:18px 2px 8px; }
    .th-plc-macros:where(.th-page-admin-plc, .th-page-admin-plc *) { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
    .th-plc-macro:where(.th-page-admin-plc, .th-page-admin-plc *) { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border:1.5px solid var(--line); border-radius:999px; background:var(--paper); cursor:pointer; font:inherit; font-size:13px; font-weight:600; color:var(--ink); }
    .th-plc-macro.th-is-on:where(.th-page-admin-plc, .th-page-admin-plc *) { border-color:var(--accent); background:var(--accent-s); color:var(--accent); }
    .th-plc-macro[disabled]:where(.th-page-admin-plc, .th-page-admin-plc *) { cursor:default; opacity:0.75; }

/* ---- page: admin-positions (apps/mobile/admin-positions.html) ---- */
.th-patrol-group:where(.th-page-admin-positions, .th-page-admin-positions *) { margin-bottom:18px; }
    .th-patrol-group-h:where(.th-page-admin-positions, .th-page-admin-positions *) { font-size:11px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); margin:0 0 6px; }
    /* The roster grid + cell live in shared.css (.roster-*) — one source of
       truth shared with Organize patrols. Only the position-picker internals
       below are page-specific. The picker spans the full grid width (.th-roster-panel). */
    .th-pos-inline:where(.th-page-admin-positions, .th-page-admin-positions *) { background:var(--paper-2); border:1px solid var(--accent); border-radius:12px; margin:2px 0 8px; padding:10px; animation:th-admin-positions-pos-in 180ms ease; }
    @keyframes th-admin-positions-pos-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
    .th-pos-inline .th-grp-h:where(.th-page-admin-positions, .th-page-admin-positions *) { font-size:10px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); margin:2px 2px 6px; }
    .th-pos-list:where(.th-page-admin-positions, .th-page-admin-positions *) { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
    .th-pos-opt:where(.th-page-admin-positions, .th-page-admin-positions *) { display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:9px 12px; border:1.5px solid var(--line); border-radius:10px; background:var(--paper); cursor:pointer; font:inherit; }
    .th-pos-opt.th-is-on:where(.th-page-admin-positions, .th-page-admin-positions *) { border-color:var(--accent); background:var(--accent-s); }
    .th-pos-opt .th-ob:where(.th-page-admin-positions, .th-page-admin-positions *) { flex:1; display:flex; flex-direction:column; }
    .th-pos-opt .th-ol:where(.th-page-admin-positions, .th-page-admin-positions *) { font-size:14px; font-weight:600; color:var(--ink); }
    .th-pos-opt .th-oh:where(.th-page-admin-positions, .th-page-admin-positions *) { font-size:11px; color:var(--muted); margin-top:1px; }
    .th-pos-opt .th-ock:where(.th-page-admin-positions, .th-page-admin-positions *) { color:var(--accent); opacity:0; }
    .th-pos-opt .th-ock svg:where(.th-page-admin-positions, .th-page-admin-positions *) { width:18px; height:18px; display:block; }
    .th-pos-opt.th-is-on .th-ock:where(.th-page-admin-positions, .th-page-admin-positions *) { opacity:1; }
    .th-pos-actions:where(.th-page-admin-positions, .th-page-admin-positions *) { display:flex; gap:8px; }

/* ---- page: admin-settings (apps/mobile/admin-settings.html) ---- */
.th-setting-card:where(.th-page-admin-settings, .th-page-admin-settings *) { background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:14px; margin-bottom:12px; }
    .th-setting-card h2:where(.th-page-admin-settings, .th-page-admin-settings *) { font-size:14px; font-weight:700; color:var(--ink); margin:0 0 12px; }
    .th-setting-lbl:where(.th-page-admin-settings, .th-page-admin-settings *) { font-size:12px; font-weight:600; color:var(--muted); flex:0 0 110px; }
    .th-setting-val:where(.th-page-admin-settings, .th-page-admin-settings *) { flex:1; min-width:0; }
    /* Child-scoped dirty highlight on the input (.th-is-dirty lives on .setting-val, not the row) */
    .th-setting-val.th-is-dirty .th-field-input:where(.th-page-admin-settings, .th-page-admin-settings *) { border-color:var(--warn-border); background:var(--warn-s); font-weight:600; }
    body.th-has-dirty #th-bottom-nav:where(.th-page-admin-settings, .th-page-admin-settings *) { display:none; }
    /* Transient action error — inline banner, never an alert(). */
    /* .flash retired → shared .banner (.err red / .ok green). */

/* ---- page: admin-year-end (apps/mobile/admin-year-end.html) ---- */
.th-filter-bar:where(.th-page-admin-year-end, .th-page-admin-year-end *) { display:flex; gap:6px; margin-bottom:8px; flex-wrap:wrap; }
    .th-filter-chip:where(.th-page-admin-year-end, .th-page-admin-year-end *) { padding:6px 10px; border:1px solid var(--line); border-radius:18px; background:var(--paper); font:inherit; font-size:12px; font-weight:600; color:var(--muted); cursor:pointer; }
    .th-filter-chip.th-is-active:where(.th-page-admin-year-end, .th-page-admin-year-end *) { background:var(--accent); color:#fff; border-color:var(--accent); }

    /* Year-end is always select-mode (the page IS the picker), so the corner
       roster checkbox is always shown. Mirror admin-members' is-select-mode. */
    .th-roster-check:where(.th-page-admin-year-end, .th-page-admin-year-end *) { display:block; }

    /* Transient action error — inline banner, never an alert(). */
    #flash:where(.th-page-admin-year-end, .th-page-admin-year-end *) { margin-bottom:12px; }

    /* Bar-morph confirm — same pattern as admin-members bulk-remove. */
    .th-has-selection .th-sticky-action-bar:where(.th-page-admin-year-end, .th-page-admin-year-end *) { display:flex; }
    .th-sticky-action-bar .th-btn:where(.th-page-admin-year-end, .th-page-admin-year-end *) { flex:1; }
    .th-bulk-actions:where(.th-page-admin-year-end, .th-page-admin-year-end *) { display:flex; gap:8px; width:100%; }
    .th-sticky-action-bar.th-is-confirming .th-bulk-actions:where(.th-page-admin-year-end, .th-page-admin-year-end *) { display:none; }
    .th-bulk-confirm:where(.th-page-admin-year-end, .th-page-admin-year-end *) { display:flex; gap:8px; align-items:center; width:100%; flex-wrap:wrap; }
    .th-bulk-confirm-msg:where(.th-page-admin-year-end, .th-page-admin-year-end *) { flex:1; min-width:140px; font-size:13px; font-weight:600; color:var(--ink); }

    body.th-has-selection #th-bottom-nav:where(.th-page-admin-year-end, .th-page-admin-year-end *) { display:none; }

/* ---- page: audit-log (apps/mobile/audit-log.html) ---- */
.th-callout:where(.th-page-audit-log, .th-page-audit-log *) { margin-bottom:14px; }
    .th-audit-dot:where(.th-page-audit-log, .th-page-audit-log *) { width:8px; height:8px; border-radius:50%; background:var(--muted); margin-top:6px; flex:0 0 auto; }
    .th-audit-dot.th-is-create:where(.th-page-audit-log, .th-page-audit-log *) { background:var(--accent); }
    .th-audit-dot.th-is-delete:where(.th-page-audit-log, .th-page-audit-log *) { background:var(--sig-no,#b91c1c); }
    .th-audit-dot.th-is-system:where(.th-page-audit-log, .th-page-audit-log *) { background:var(--muted); }
    .th-audit-body:where(.th-page-audit-log, .th-page-audit-log *) { flex:1; min-width:0; }
    .th-audit-action:where(.th-page-audit-log, .th-page-audit-log *) { font-size:13px; color:var(--ink); line-height:1.4; }
    .th-audit-when:where(.th-page-audit-log, .th-page-audit-log *) { font-size:11px; color:var(--muted); margin-top:2px; font-variant-numeric:tabular-nums; }
    .th-viewer-pill:where(.th-page-audit-log, .th-page-audit-log *) { font-size:10px; font-weight:700; padding:2px 6px; border-radius:6px; background:var(--paper-2); color:var(--muted); text-transform:uppercase; letter-spacing:0.06em; margin-left:6px; }
    .th-viewer-pill.th-is-admin:where(.th-page-audit-log, .th-page-audit-log *) { background:#fde68a; color:#78350f; }

/* ---- page: bootstrap-pending (apps/mobile/bootstrap-pending.html) ---- */
/* Progress dots — three slots, one filled per ratification (admin counts
       as filled by virtue of being the provisional admin). */
    .th-ratify-dots:where(.th-page-bootstrap-pending, .th-page-bootstrap-pending *) { display: flex; gap: 6px; margin: 4px 0 0; }
    .th-ratify-dot:where(.th-page-bootstrap-pending, .th-page-bootstrap-pending *) {
      width: 28px; height: 8px; border-radius: 999px;
      background: var(--paper-3);
      transition: background var(--t-med) var(--ease-soft);
    }
    .th-ratify-dot.th-is-filled:where(.th-page-bootstrap-pending, .th-page-bootstrap-pending *) { background: var(--accent); }

/* ---- page: compliance (apps/mobile/compliance.html) ---- */
.th-callout:where(.th-page-compliance, .th-page-compliance *) { margin-bottom:14px; }
    .th-summary:where(.th-page-compliance, .th-page-compliance *) { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:14px; }
    .th-summary-cell:where(.th-page-compliance, .th-page-compliance *) { background:var(--paper); border:1px solid var(--line); border-radius:10px; padding:12px; text-align:center; }
    .th-summary-cell .th-num:where(.th-page-compliance, .th-page-compliance *) { font-size:24px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
    .th-summary-cell .th-lbl:where(.th-page-compliance, .th-page-compliance *) { font-size:11px; color:var(--muted); margin-top:2px; }
    .th-out-of-scope:where(.th-page-compliance, .th-page-compliance *) { background:var(--amber-s); border:1px solid var(--amber-ink); border-radius:10px; padding:12px; color:#78350f; font-size:12px; line-height:1.5; margin-bottom:14px; }
    .th-out-of-scope strong:where(.th-page-compliance, .th-page-compliance *) { color:#78350f; }
    .th-info-ico:where(.th-page-compliance, .th-page-compliance *) { width:30px; height:30px; border-radius:8px; background:var(--accent-s); color:var(--accent); display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
    .th-info-ico i:where(.th-page-compliance, .th-page-compliance *) { width:14px; height:14px; }
    .th-info-body:where(.th-page-compliance, .th-page-compliance *) { flex:1; }
    .th-info-name:where(.th-page-compliance, .th-page-compliance *) { font-size:14px; font-weight:500; color:var(--ink); }
    .th-info-sub:where(.th-page-compliance, .th-page-compliance *) { font-size:11px; color:var(--muted); margin-top:1px; }

/* ---- page: event-compose (apps/mobile/event-compose.html) ---- */
.th-form-error:where(.th-page-event-compose, .th-page-event-compose *) { color: var(--sig-no); font-size: 13px; margin: 2px 0 0; min-height: 1em; }

/* ---- page: event-edit (apps/mobile/event-edit.html) ---- */
.th-danger-zone:where(.th-page-event-edit, .th-page-event-edit *) { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-2); }
    .th-danger-zone h3:where(.th-page-event-edit, .th-page-event-edit *) { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
    .th-danger-zone p:where(.th-page-event-edit, .th-page-event-edit *) { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
    .th-gated:where(.th-page-event-edit, .th-page-event-edit *) { display: none; }
    .th-gated.th-is-ready:where(.th-page-event-edit, .th-page-event-edit *) { display: block; }
    .th-state-error:where(.th-page-event-edit, .th-page-event-edit *) { text-align: center; padding: 48px 20px; color: var(--muted); }
    .th-state-error h2:where(.th-page-event-edit, .th-page-event-edit *) { margin: 0 0 8px; color: var(--ink); font-size: 18px; }

/* ---- page: event (apps/mobile/event.html) ---- */
/* Taller skel rows than the shared 64px — these stand in for event cards. */
    .th-skel:where(.th-page-event, .th-page-event *) { height: 70px; }
    /* `#event-root` hosts the page-level `.th-share-btn` in its bottom-right.
       The extra bottom padding keeps the absolutely-positioned 36×36 button
       clear of the last card / leader-row content. */
    #event-root:where(.th-page-event, .th-page-event *) { position: relative; padding-bottom: 56px; }

/* ---- page: events (apps/mobile/events.html) ---- */
/* Taller skel rows than the shared 64px — these stand in for event cards. */
    .th-skel:where(.th-page-events, .th-page-events *) { height: 70px; }

/* ---- page: onboard-done (apps/mobile/onboard-done.html) ---- */
/* Heavier checkmark stroke than the shared default — completion glyph. */
    .th-hero-ico.th-is-solid svg:where(.th-page-onboard-done, .th-page-onboard-done *) { stroke-width: 3; }

/* ---- page: onboard-email (apps/mobile/onboard-email.html) ---- */
.th-step-progress:where(.th-page-onboard-email, .th-page-onboard-email *) { display:flex; gap:4px; width:100%; margin:0 0 18px; }
    .th-step-progress .th-pip:where(.th-page-onboard-email, .th-page-onboard-email *) { flex:1 1 0; height:3px; background:var(--line); border-radius:999px; }
    .th-step-progress .th-pip.th-is-done:where(.th-page-onboard-email, .th-page-onboard-email *) { background:var(--accent); }
    .th-btn[disabled]:where(.th-page-onboard-email, .th-page-onboard-email *) { opacity:.6; pointer-events:none; }
    @keyframes th-onboard-email-shake {
      0%, 100% { transform: translateX(0); }
      10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
      20%, 40%, 60%, 80% { transform: translateX(3px); }
    }
    .th-field-input.th-error:where(.th-page-onboard-email, .th-page-onboard-email *) { animation: th-onboard-email-shake 400ms var(--ease-soft); }

/* ---- page: onboard-sent (apps/mobile/onboard-sent.html) ---- */
/* Match the prior local treatment — shared .th-hero-ico defaults to 40px
       glyph + 8px/16px margin; this screen used 36px + 16px/20px. */
    .th-hero-ico svg:where(.th-page-onboard-sent, .th-page-onboard-sent *) { width: 36px; height: 36px; }
    .th-hero-ico.th-is-tinted:where(.th-page-onboard-sent, .th-page-onboard-sent *) { margin: 16px auto 20px; }

/* ---- page: onboarding (apps/mobile/onboarding.html) ---- */
/* Page-local: the brand lockup that sits ABOVE the rendered hero
       block. The hero block itself (headline + line + chips + CTA + fine)
       comes from /vendor/value-prop.js — the SAME source the three minis
       use, so the umbrella can never drift from its own children. */
    .th-lp-lockup:where(.th-page-onboarding, .th-page-onboarding *) {
      display: flex; align-items: center; justify-content: center; gap: 9px;
      margin: 0; padding: 30px 22px 0;
      font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
    }
    .th-lp-lockup img:where(.th-page-onboarding, .th-page-onboarding *) { width: 30px; height: 30px; flex: 0 0 auto; }
    /* The hero block mounts inside .lp-hero, which sets the side padding to
       match the rest of the landing sections. */
    .th-lp-hero:where(.th-page-onboarding, .th-page-onboarding *) { padding: var(--space-5) var(--space-6) var(--space-4); }
    /* Secondary doors below the hero CTA. */
    .th-lp-doors:where(.th-page-onboarding, .th-page-onboarding *) { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-6) 0; }
    .th-lp-doors a:where(.th-page-onboarding, .th-page-onboarding *) { font-size: 14px; color: var(--accent); text-decoration: none; font-weight: 500; }
    .th-lp-doors a.th-muted:where(.th-page-onboarding, .th-page-onboarding *) { color: var(--muted); font-weight: 400; }
    .th-lp-scroll-cue:where(.th-page-onboarding, .th-page-onboarding *) { display: inline-flex; align-items: center; gap: 4px; }
    .th-lp-scroll-cue i:where(.th-page-onboarding, .th-page-onboarding *) { width: 14px; height: 14px; }

/* ---- page: poll-close (apps/mobile/poll-close.html) ---- */
/* Page-specific tweaks; everything else uses /shared.css. */
    #close-summary:where(.th-page-poll-close, .th-page-poll-close *) { min-height: 120px; resize: vertical; }

/* ---- page: poll-compose (apps/mobile/poll-compose.html) ---- */
#options-block:where(.th-page-poll-compose, .th-page-poll-compose *) { display: none; }
    #options-block.th-is-on:where(.th-page-poll-compose, .th-page-poll-compose *) { display: flex; }
    .th-option-row:where(.th-page-poll-compose, .th-page-poll-compose *) { display: flex; gap: 8px; margin-top: 8px; }
    .th-option-row input:where(.th-page-poll-compose, .th-page-poll-compose *) { flex: 1; }

/* ---- page: poll-edit (apps/mobile/poll-edit.html) ---- */
#options-block:where(.th-page-poll-edit, .th-page-poll-edit *) { display: none; }
    #options-block.th-is-on:where(.th-page-poll-edit, .th-page-poll-edit *) { display: flex; }
    .th-option-row:where(.th-page-poll-edit, .th-page-poll-edit *) { display: flex; gap: 8px; margin-top: 8px; }
    .th-option-row input:where(.th-page-poll-edit, .th-page-poll-edit *) { flex: 1; }
    .th-option-row .th-opt-del:where(.th-page-poll-edit, .th-page-poll-edit *) { flex: 0 0 auto; }

/* ---- page: polls (apps/mobile/polls.html) ---- */
/* Taller skel rows than the shared 64px — these stand in for poll cards. */
    .th-skel:where(.th-page-polls, .th-page-polls *) { height: 70px; }
    /* Press state handled by .th-card-button:active */
    /* Deprecate pl-group-label in favor of .th-eyebrow */
    .th-signal-group:where(.th-page-polls, .th-page-polls *) { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
    .th-vote-status:where(.th-page-polls, .th-page-polls *) { font-size: 13px; color: var(--muted); margin: 12px 0 0; min-height: 1.4em; }
    .th-vote-status.th-saved:where(.th-page-polls, .th-page-polls *) { color: var(--accent-d); }
    .th-vote-status.th-error:where(.th-page-polls, .th-page-polls *) { color: var(--sig-no); }
    .th-closed-banner:where(.th-page-polls, .th-page-polls *) {
      display: flex; align-items: flex-start; gap: 10px; padding: 12px;
      background: var(--paper-2); border-radius: 10px; font-size: 13px; color: var(--ink-2);
      line-height: 1.5; margin-top: 12px;
    }
    .th-closed-banner i:where(.th-page-polls, .th-page-polls *) { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; margin-top: 2px; }
    .th-close-affordance:where(.th-page-polls, .th-page-polls *) { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
    .th-close-affordance .th-helper:where(.th-page-polls, .th-page-polls *) { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
    /* Anchor for the page-level `.th-share-btn` (bottom-right of the detail). */
    #detail-view:where(.th-page-polls, .th-page-polls *) { position: relative; padding-bottom: 56px; }

/* ---- page: qr-scan (apps/mobile/qr-scan.html) ---- */
.th-scan-stage:where(.th-page-qr-scan, .th-page-qr-scan *) {
      flex: 1 1 auto; min-height: 0;
      display: flex; flex-direction: column; align-items: center;
      justify-content: center; padding: 28px 22px; gap: 18px; text-align: center;
    }
    .th-scan-eyebrow:where(.th-page-qr-scan, .th-page-qr-scan *) {
      font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
      text-transform: uppercase; color: var(--muted);
    }
    .th-scan-title:where(.th-page-qr-scan, .th-page-qr-scan *) { font-size: 22px; font-weight: 700; margin: 6px 0 4px; text-wrap: balance; }
    .th-scan-sub:where(.th-page-qr-scan, .th-page-qr-scan *) { font-size: 14px; color: var(--muted); max-width: 320px; line-height: 1.5; text-wrap: balance; }
    .th-scan-status:where(.th-page-qr-scan, .th-page-qr-scan *) {
      display: flex; align-items: center; gap: 10px;
      padding: 14px 18px; border-radius: 14px;
      background: var(--paper-2); border: 1px solid var(--line);
      width: 100%; max-width: 320px;
    }
    .th-scan-status.th-is-error:where(.th-page-qr-scan, .th-page-qr-scan *) { border-color: var(--sig-no); color: var(--sig-no); }
    .th-scan-status.th-is-ok:where(.th-page-qr-scan, .th-page-qr-scan *) { border-color: var(--ok); color: var(--ok); }
    .th-manual-form:where(.th-page-qr-scan, .th-page-qr-scan *) { width: 100%; max-width: 320px; }
    .th-manual-input:where(.th-page-qr-scan, .th-page-qr-scan *) {
      font-family: var(--font-mono);
      font-size: 22px; letter-spacing: 0.3em; text-align: center;
    }

/* ---- page: rank (apps/mobile/rank.html) ---- */
/* Taller skel rows than the shared 64px — these stand in for Scout-list rows. */
    .th-skel:where(.th-page-rank, .th-page-rank *) { height: 70px; }
    .th-sc-link:where(.th-page-rank, .th-page-rank *) { text-decoration: none; color: inherit; display: block; transition: transform 80ms ease; }
    .th-sc-link:active:where(.th-page-rank, .th-page-rank *) { transform: scale(0.995); }

    /* Rank-page styles (buddy panel, req table, capsule pips, hold-to-confirm
       picker, sign-off line, coachmark, future-rank collapsibles, earned-block)
       live in shared.css under "RANK PAGE" — both this umbrella page and the
       rank-up mini-app's requirement.html share them by inheritance. */

/* ---- page: roster (apps/mobile/roster.html) ---- */
/* Roster — each section is sub-grouped (rank for Scouts, title for
       Leaders; Parents are flat) and rendered on the SHARED roster grid
       (.roster-* in shared.css via window.RosterGrid) — same render as
       Leadership & positions / Organize patrols / Members. Only the
       sub-group label is local. */
    .th-roster-group:where(.th-page-roster, .th-page-roster *) { margin-bottom: 14px; }
    .th-roster-group-label:where(.th-page-roster, .th-page-roster *) {
      font-size: 11px; font-weight: 700; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 6px;
    }
    /* Compact household expand — tap ANY person (Scout / Parent / Leader) to
       see the household. Same affordance for everyone. Adults: name + a pill
       per contact channel (icon + actual address/number — the whole pill is a
       universal mailto:/tel: action). Scouts: rank shield + name + patrol +
       position chip — no contact info (YPT floor). */
    .th-household-expand:where(.th-page-roster, .th-page-roster *) {
      background: var(--paper-2); border: 1px solid var(--accent);
      border-radius: 10px; padding: 8px 10px; margin: 2px 0 8px;
      animation: th-roster-hh-in 180ms ease;
    }
    @keyframes th-roster-hh-in { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform: translateY(0); } }
    .th-household-expand .th-he-row:where(.th-page-roster, .th-page-roster *) { padding: 6px 0; }
    .th-household-expand .th-he-row + .th-he-row:where(.th-page-roster, .th-page-roster *) { border-top: 1px solid var(--line); }
    /* Adult */
    .th-household-expand .th-he-adult-name:where(.th-page-roster, .th-page-roster *) { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
    .th-household-expand .th-he-pills:where(.th-page-roster, .th-page-roster *) { display: flex; flex-wrap: wrap; gap: 6px; }
    .th-household-expand .th-he-pill:where(.th-page-roster, .th-page-roster *) {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 4px 10px 4px 8px;
      background: var(--paper); border: 1px solid var(--line);
      border-radius: 999px;
      font-size: 12px; color: var(--ink);
      text-decoration: none;
      max-width: 100%;
    }
    .th-household-expand .th-he-pill:hover:where(.th-page-roster, .th-page-roster *) { border-color: var(--accent); background: var(--accent-s); }
    .th-household-expand .th-he-pill > span:where(.th-page-roster, .th-page-roster *) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    .th-household-expand .th-he-pill i:where(.th-page-roster, .th-page-roster *),
    .th-household-expand .th-he-pill svg:where(.th-page-roster, .th-page-roster *) { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; }
    .th-household-expand .th-he-no-contact:where(.th-page-roster, .th-page-roster *) { font-size: 12px; color: var(--muted); font-style: italic; }
    /* Scout */
    .th-household-expand .th-he-scout:where(.th-page-roster, .th-page-roster *) { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .th-household-expand .th-he-scout .th-rank-badge:where(.th-page-roster, .th-page-roster *) { flex: 0 0 auto; }
    .th-household-expand .th-he-name:where(.th-page-roster, .th-page-roster *) { font-size: 13px; font-weight: 500; color: var(--ink); flex: 0 0 auto; }
    .th-household-expand .th-he-meta:where(.th-page-roster, .th-page-roster *) { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex: 1 1 auto; min-width: 0; }
    .th-household-expand .th-he-meta-text:where(.th-page-roster, .th-page-roster *) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- page: scout-detail (apps/mobile/scout-detail.html) ---- */
/* Inline-confirm action bar — same pattern as admin-members bulk-remove
       (no native confirm()). Tapping the Remove card morphs this bar in;
       Keep dismisses, Remove commits. */
    .th-sticky-action-bar.th-is-visible:where(.th-page-scout-detail, .th-page-scout-detail *) { display: flex; }
    .th-sticky-action-bar .th-bulk-confirm:where(.th-page-scout-detail, .th-page-scout-detail *) { display:flex; gap:8px; align-items:center; width:100%; flex-wrap:wrap; }
    .th-sticky-action-bar .th-bulk-confirm-msg:where(.th-page-scout-detail, .th-page-scout-detail *) { flex:1; min-width:140px; font-size:13px; font-weight:600; color:var(--ink); }
    /* Transient action error — inline banner, never an alert(). */
    /* .flash retired → shared .banner (.err red / .ok green). */

/* ---- page: scout-handoff-qr (apps/mobile/scout-handoff-qr.html) ---- */
/* Dark takeover so the QR is high-contrast and scannable across a room.
       The shell migration wraps content in .th-frame-content (default bg
       --paper-2); carry the dark bg onto it too, else the white text lands on
       a light wrapper inside the dark frame (white-on-white). */
    body.th-screen .th-frame:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { background: #0f1411; color: #fff; }
    /* match shared.css's `body.th-screen .th-frame > .th-frame-content` specificity
       (0,3,1) so the dark bg wins over the default --paper-2 wrapper. */
    body.th-screen .th-frame > .th-frame-content:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { background: #0f1411; color: #fff; }
    .th-qr-stage:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      flex: 1 1 auto; min-height: 0;
      display: flex; flex-direction: column; align-items: center;
      justify-content: space-between;
      padding: 24px 22px 16px; gap: 16px; text-align: center;
    }
    .th-qr-eyebrow:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
      text-transform: uppercase; color: rgba(255,255,255,0.55);
    }
    .th-qr-title:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      font-size: 20px; font-weight: 700; letter-spacing: -0.005em;
      margin: 6px 0 4px; text-wrap: balance;
    }
    .th-qr-sub:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      font-size: 13px; color: rgba(255,255,255,0.7);
      max-width: 280px; line-height: 1.5; margin: 0 auto; text-wrap: balance;
    }
    .th-qr-card:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      background: #fff; width: 260px; height: 260px;
      border-radius: 20px; padding: 18px;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 12px 40px -8px rgba(0,0,0,0.4);
    }
    .th-qr-card #qr-svg-host:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
    .th-qr-card #qr-svg-host svg:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { width: 100%; height: 100%; }
    .th-qr-code-text:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      font-family: var(--font-mono);
      font-size: 22px; letter-spacing: 0.3em; font-weight: 500;
      color: #fff; background: rgba(255,255,255,0.08);
      padding: 12px 18px; border-radius: 10px;
      border: 1px solid rgba(255,255,255,0.15);
    }
    .th-qr-meta:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      display: flex; gap: 12px; font-size: 12px;
      color: rgba(255,255,255,0.6); align-items: center;
    }
    .th-qr-meta .th-dot:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      width: 6px; height: 6px; border-radius: 999px; background: var(--trail);
    }
    .th-qr-actions:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { display: flex; gap: 8px; width: 100%; }
    .th-qr-actions .th-btn-secondary:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) {
      background: rgba(255,255,255,0.10); color: #fff;
      border-color: rgba(255,255,255,0.16);
    }
    .th-qr-actions .th-btn-secondary:hover:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { background: rgba(255,255,255,0.16); }
    .th-qr-error:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { color: #ff7a7a; font-size: 13px; min-height: 1em; }
    .th-qr-trust:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { list-style: none; padding: 0; margin: 8px 0 4px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.6; }
    .th-qr-trust strong:where(.th-page-scout-handoff-qr, .th-page-scout-handoff-qr *) { color: #fff; }

/* ---- page: shell-home (apps/mobile/shell-home.html) ---- */
.th-home-card-link:where(.th-page-shell-home, .th-page-shell-home *) { text-decoration: none; color: inherit; display: block; }
    .th-home-card-link:active:where(.th-page-shell-home, .th-page-shell-home *) { transform: scale(0.995); }
    .th-home-card-link:where(.th-page-shell-home, .th-page-shell-home *) { transition: transform 80ms ease; }
    .th-home-empty:where(.th-page-shell-home, .th-page-shell-home *) {
      color: var(--muted);
      font-size: 14px;
      padding: 14px 2px;
      line-height: 1.5;
    }

/* ---- page: events-approvals (apps/events-mini/approvals.html) ---- */
/* .th-gated-shell / .th-state-error / .th-state-empty / .th-kind-chip / .th-form-error
       now in shared.css. .proposal-row base flex/border + .th-who folded into
       shared .th-list-row; proposal-specific child + responsive rules stay. */
    .th-proposal-row .th-who .th-name:where(.th-page-events-approvals, .th-page-events-approvals *) {
      font-weight: 600;
      color: var(--ink);
      font-size: 15px;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .th-proposal-row .th-who .th-sub:where(.th-page-events-approvals, .th-page-events-approvals *) {
      color: var(--muted);
      font-size: 12px;
      margin-top: 4px;
      line-height: 1.45;
    }
    .th-proposal-row .th-actions:where(.th-page-events-approvals, .th-page-events-approvals *) { display: flex; gap: 8px; flex: 0 0 auto; }

    .th-signal-count:where(.th-page-events-approvals, .th-page-events-approvals *) {
      color: var(--muted);
      font-size: 12px;
    }
    @media (max-width: 519px) {
      .th-proposal-row:where(.th-page-events-approvals, .th-page-events-approvals *) { flex-direction: column; align-items: stretch; }
      .th-proposal-row .th-actions:where(.th-page-events-approvals, .th-page-events-approvals *) { width: 100%; }
      .th-proposal-row .th-actions .th-btn:where(.th-page-events-approvals, .th-page-events-approvals *) { flex: 1; }
    }

/* ---- page: events-compose (apps/events-mini/compose.html) ---- */
.th-field-row:where(.th-page-events-compose, .th-page-events-compose *) { display: flex; gap: 12px; }
    .th-field-row > .th-field:where(.th-page-events-compose, .th-page-events-compose *) { flex: 1; min-width: 0; }
    /* .form-error / .gated-shell / .state-error / .header-who now in shared.css */

/* ---- page: events-edit (apps/events-mini/edit.html) ---- */
.th-field-row:where(.th-page-events-edit, .th-page-events-edit *) { display: flex; gap: 12px; }
    .th-field-row > .th-field:where(.th-page-events-edit, .th-page-events-edit *) { flex: 1; min-width: 0; }
    /* .th-form-error / .th-gated-shell / .th-state-error / .th-header-who now in shared.css */
    /* .th-danger-zone left local — §B#8 destructive pass owns its promotion. */
    .th-danger-zone:where(.th-page-events-edit, .th-page-events-edit *) { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-2); }
    .th-danger-zone h3:where(.th-page-events-edit, .th-page-events-edit *) { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
    .th-danger-zone p:where(.th-page-events-edit, .th-page-events-edit *) { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---- page: events-event (apps/events-mini/event.html) ---- */
/* Anchor the page-level `.th-share-btn` to the bottom-right of the main
       column. Padding-bottom keeps the absolute button clear of content. */
    .th-pad:where(.th-page-events-event, .th-page-events-event *) { position: relative; }
  

    /* .th-state-empty / .th-state-error / .th-signed-out-cta now in shared.css */
    /* RSVP card markup (.th-rsvp-decide / .th-avatar-rank / .th-tally / .th-help-row) is
       rendered by the shared event-detail module and styled by shared.css —
       the old local .rsvp-row rules were removed in the G5 de-fork (slice 2). */
    /* .guest-fields + .guest-banner now in shared.css (slice E promote). */

/* ---- page: events-index (apps/events-mini/index.html) ---- */
.th-event-card:where(.th-page-events-index, .th-page-events-index *) {
      display: block;
      padding: var(--space-2h) var(--space-3);
      border: 1px solid var(--line-2);
      border-radius: 12px;
      text-decoration: none;
      color: inherit;
      background: var(--paper);
      margin-bottom: var(--space-2);
      transition: background 120ms;
      position: relative; /* anchor for .share-btn */
    }
    .th-event-card:hover:where(.th-page-events-index, .th-page-events-index *) { background: var(--paper-2); }
    .th-event-card .th-card-head:where(.th-page-events-index, .th-page-events-index *) {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 12px;
    }
    .th-event-card h3:where(.th-page-events-index, .th-page-events-index *) {
      margin: 0; font-size: var(--fs-15); color: var(--ink);
      display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1;
    }
    .th-event-card h3 .th-ce-pill:where(.th-page-events-index, .th-page-events-index *) { flex: 0 0 auto; }
    .th-event-card h3.th-truncate:where(.th-page-events-index, .th-page-events-index *) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .th-event-card .th-card-head .th-chip:where(.th-page-events-index, .th-page-events-index *), .th-event-card .th-card-head .th-sc:where(.th-page-events-index, .th-page-events-index *) { flex: 0 0 auto; }
    .th-empty:where(.th-page-events-index, .th-page-events-index *) {
      text-align: center;
      padding: 48px 20px;
      color: var(--muted);
    }

/* ---- page: events-share (apps/events-mini/share.html) ---- */
    .th-field-row:where(.th-page-events-share, .th-page-events-share *) { display: flex; gap: 12px; }
    .th-field-row > .th-field:where(.th-page-events-share, .th-page-events-share *) { flex: 1; min-width: 0; }
    /* .th-form-error / .th-gated-shell / .th-state-error now in shared.css */
    /* .th-form-actions now in shared.css */

    .th-scope-options:where(.th-page-events-share, .th-page-events-share *) {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .th-scope-options label:where(.th-page-events-share, .th-page-events-share *) {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 10px;
      cursor: pointer;
      background: var(--paper);
      transition: border-color var(--t-fast) var(--ease-soft), background var(--t-fast) var(--ease-soft);
    }
    .th-scope-options label:hover:where(.th-page-events-share, .th-page-events-share *) { background: var(--paper-2); }
    .th-scope-options input[type="radio"]:where(.th-page-events-share, .th-page-events-share *) { margin-top: 3px; }
    .th-scope-options .th-label-body:where(.th-page-events-share, .th-page-events-share *) { flex: 1; min-width: 0; }
    .th-scope-options .th-label-title:where(.th-page-events-share, .th-page-events-share *) { font-weight: 600; color: var(--ink); font-size: 14px; }
    .th-scope-options .th-label-sub:where(.th-page-events-share, .th-page-events-share *) { color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.45; }

    .th-actions-options:where(.th-page-events-share, .th-page-events-share *) {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .th-actions-options label:where(.th-page-events-share, .th-page-events-share *) {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 10px;
    }
    .th-actions-options input[type="checkbox"]:disabled + .th-label-body:where(.th-page-events-share, .th-page-events-share *) { color: var(--muted); }

    .th-minted-card:where(.th-page-events-share, .th-page-events-share *) {
      background: var(--accent-s, #e7efe7);
      border: 1px solid var(--accent, #2c5234);
      padding: 14px;
      border-radius: 12px;
      margin-top: 16px;
    }
    .th-minted-url:where(.th-page-events-share, .th-page-events-share *) {
      display: flex;
      gap: 8px;
      align-items: stretch;
      margin-top: 10px;
    }
    /* the field itself is .th-field-input; this keeps only the copyable-URL mono look */
    .th-minted-url input:where(.th-page-events-share, .th-page-events-share *) {
      flex: 1;
      font-family: 'JetBrains Mono', ui-monospace, monospace;
      font-size: var(--fs-12);
      min-width: 0;
      width: auto;
    }
    .th-tokens-list:where(.th-page-events-share, .th-page-events-share *) { margin-top: 18px; }
    /* .token-row base flex/border + .th-who folded into shared .th-list-row */
    .th-token-row .th-who .th-name:where(.th-page-events-share, .th-page-events-share *) { font-weight: 600; color: var(--ink); font-size: 13px; }
    .th-token-row .th-who .th-sub:where(.th-page-events-share, .th-page-events-share *) { color: var(--muted); font-size: 11px; margin-top: 2px; }
    .th-empty-tokens:where(.th-page-events-share, .th-page-events-share *) { color: var(--muted); font-size: 13px; padding: 12px 0; }

/* ---- page: polls-close (apps/polls-mini/close.html) ---- */
/* Page-specific tweaks; everything else uses /shared.css. */
    /* .th-char-count now in shared.css */
    #close-summary:where(.th-page-polls-close, .th-page-polls-close *) { min-height: 120px; resize: vertical; }

/* ---- page: polls-compose (apps/polls-mini/compose.html) ---- */
/* .th-form-error / .th-gated-shell / .th-state-error / .th-header-who now in shared.css */
    #options-block:where(.th-page-polls-compose, .th-page-polls-compose *) { display: none; }
    #options-block.th-is-on:where(.th-page-polls-compose, .th-page-polls-compose *) { display: block; }
    .th-option-row:where(.th-page-polls-compose, .th-page-polls-compose *) { display: flex; gap: 8px; margin-top: 8px; }
    .th-option-row input:where(.th-page-polls-compose, .th-page-polls-compose *) { flex: 1; }
    .th-option-row button:where(.th-page-polls-compose, .th-page-polls-compose *) { flex: 0 0 auto; }

/* ---- page: polls-index (apps/polls-mini/index.html) ---- */
.th-poll-card:where(.th-page-polls-index, .th-page-polls-index *) {
      display: block;
      padding: var(--space-2h) var(--space-3);
      border: 1px solid var(--line-2);
      border-radius: 12px;
      text-decoration: none;
      color: inherit;
      background: var(--paper);
      margin-bottom: var(--space-2);
      transition: background 120ms;
      position: relative; /* anchor for .share-btn */
    }
    .th-poll-card:hover:where(.th-page-polls-index, .th-page-polls-index *) { background: var(--paper-2); }
    .th-poll-card .th-card-head:where(.th-page-polls-index, .th-page-polls-index *) {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 12px;
    }
    .th-poll-card h3:where(.th-page-polls-index, .th-page-polls-index *) {
      margin: 0; font-size: var(--fs-15); color: var(--ink);
      display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1;
    }
    .th-poll-card h3 .th-ce-pill:where(.th-page-polls-index, .th-page-polls-index *) { flex: 0 0 auto; }
    .th-poll-card h3.th-truncate:where(.th-page-polls-index, .th-page-polls-index *) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .th-poll-card .th-card-head .th-chip:where(.th-page-polls-index, .th-page-polls-index *), .th-poll-card .th-card-head .th-sc:where(.th-page-polls-index, .th-page-polls-index *) { flex: 0 0 auto; }
    .th-empty:where(.th-page-polls-index, .th-page-polls-index *) {
      text-align: center;
      padding: 48px 20px;
      color: var(--muted);
    }

/* ---- page: polls-share (apps/polls-mini/share.html) ---- */
/* .th-form-error / .th-gated-shell / .th-state-error now in shared.css */
    .th-link-out:where(.th-page-polls-share, .th-page-polls-share *) { word-break: break-all; background: var(--paper-2); padding: 10px 12px; border-radius: 6px; font-family: var(--font-mono); font-size: 12px; margin-top: 12px; }

/* ---- page: polls-vote (apps/polls-mini/vote.html) ---- */
/* Anchor the page-level `.th-share-btn` to the bottom-right of the main
       column (universal share-2 affordance — apps/shared/vendor/share-button.js). */
    .th-pad:where(.th-page-polls-vote, .th-page-polls-vote *) { position: relative; }
  

    /* .th-state-empty / .th-state-error now in shared.css */
    .th-signal-group:where(.th-page-polls-vote, .th-page-polls-vote *) {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .th-vote-status:where(.th-page-polls-vote, .th-page-polls-vote *) {
      font-size: 13px;
      color: var(--muted);
      margin: 12px 0 0;
      min-height: 1.4em;
    }
    .th-vote-status.th-saved:where(.th-page-polls-vote, .th-page-polls-vote *) {
      color: var(--accent-d, var(--accent));
    }
    .th-vote-status.th-error:where(.th-page-polls-vote, .th-page-polls-vote *) {
      color: var(--sig-no);
    }
    .th-closed-banner:where(.th-page-polls-vote, .th-page-polls-vote *) {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px;
      background: var(--paper-2);
      border-radius: 10px;
      font-size: 13px;
      color: var(--ink-2);
      line-height: 1.5;
      margin-top: 8px;
    }
    .th-closed-banner i:where(.th-page-polls-vote, .th-page-polls-vote *) {
      width: 16px; height: 16px;
      color: var(--muted);
      flex-shrink: 0;
      margin-top: 2px;
    }
    .th-close-affordance:where(.th-page-polls-vote, .th-page-polls-vote *) {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px dashed var(--line-2);
    }
    .th-close-affordance .th-helper:where(.th-page-polls-vote, .th-page-polls-vote *) {
      font-size: 12px;
      color: var(--muted);
      margin: 0 0 8px;
    }
    /* .guest-fields + .guest-banner now in shared.css (slice E promote). */

/* ---- page: rankup-index (apps/rankup-mini/index.html) ---- */
/* Scout-row card — clone of events-mini's .event-card, restyled for the
       rankup hub: avatar on the left, name + rank badge in the middle, a
       chevron-like nudge on the right. Avoids inventing new design tokens —
       falls back to the shared.css palette so a token change cascades. */
    .th-scout-card:where(.th-page-rankup-index, .th-page-rankup-index *) {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      border: 1px solid var(--line-2);
      border-radius: 12px;
      text-decoration: none;
      color: inherit;
      background: var(--paper);
      margin-bottom: 12px;
      transition: background 120ms;
    }
    .th-scout-card:hover:where(.th-page-rankup-index, .th-page-rankup-index *) { background: var(--paper-2); }
    .th-scout-card:last-child:where(.th-page-rankup-index, .th-page-rankup-index *) { margin-bottom: 0; }
    .th-scout-card .th-avatar:where(.th-page-rankup-index, .th-page-rankup-index *) {
      width: 40px; height: 40px;
      border-radius: 50%;
      background: var(--accent-s);
      color: var(--accent-d);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 15px;
      flex-shrink: 0;
    }
    .th-scout-card .th-body:where(.th-page-rankup-index, .th-page-rankup-index *) { flex: 1; min-width: 0; }
    .th-scout-card .th-name:where(.th-page-rankup-index, .th-page-rankup-index *) { font-weight: 600; color: var(--ink); font-size: 15px; }
    .th-scout-card .th-sub:where(.th-page-rankup-index, .th-page-rankup-index *) {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 3px;
      font-size: 12px;
      color: var(--muted);
    }
    .th-scout-card .th-rank-chip:where(.th-page-rankup-index, .th-page-rankup-index *) {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 999px;
      background: var(--accent-s);
      color: var(--accent-d);
      font-weight: 600;
      font-size: 11px;
      letter-spacing: 0.01em;
    }
    .th-scout-card .th-open:where(.th-page-rankup-index, .th-page-rankup-index *) {
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 13px;
    }
    .th-empty:where(.th-page-rankup-index, .th-page-rankup-index *) {
      text-align: center;
      padding: 48px 20px;
      color: var(--muted);
    }
    .th-empty .th-ico:where(.th-page-rankup-index, .th-page-rankup-index *) {
      width: 48px; height: 48px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--paper-3);
      margin-bottom: 12px;
    }
    /* .signed-out-cta now in shared.css */

/* ---- page: rankup-requirement (apps/rankup-mini/requirement.html) ---- */
/* .th-skel / .th-list-empty / .th-state-error / .th-signed-out-cta / .th-header-who
       now in shared.css. Taller 70px skel rows (Scout-list anatomy) keep a
       local height override. */
    .th-skel:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { height: 70px; }

    /* S5/S6 — per-requirement helpers opt-in + ask (rank-up mini-app only,
       not in shared.css since this surface is the only consumer for now). */
    .th-helpers-block:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
    .th-helpers-q:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 0 0 8px; }
    .th-helper-pills:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { display: flex; flex-wrap: wrap; gap: 6px; }
    .th-helper-pill:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { font-family: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; }
    .th-helper-pill:hover:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { border-color: var(--accent); }
    .th-helper-pill.th-is-active:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { background: var(--accent-s); border-color: var(--accent); color: var(--accent-d); }
    .th-helper-pill:disabled:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { opacity: 0.6; cursor: default; }
    .th-helper-mates:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
    .th-helper-mate:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { display: flex; align-items: center; gap: 8px; }
    .th-helper-mate .th-av:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { width: 24px; height: 24px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .th-helper-mate .th-nm:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
    .th-helper-ask:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { font-family: inherit; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--accent); background: var(--paper); color: var(--accent-d); cursor: pointer; }
    .th-helper-ask:disabled:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { opacity: 0.6; cursor: default; }
    .th-helper-foot:where(.th-page-rankup-requirement, .th-page-rankup-requirement *) { font-size: 11px; color: var(--muted); font-style: italic; margin: 8px 0 0; line-height: 1.5; }

    /* (Rank-page CSS — buddy panel, req table, capsule pips, hold-btn,
       signoff-line, coachmark, rank-coll — moved to shared.css "RANK PAGE"
       section so this mini-app and apps/mobile/rank.html stay in sync.) */


/* =====================================================================
   INLINE-STYLE CLASSES — what used to be style="" on elements (2026-10-18, architecture/style-alignment/inline-styles-action-plan.md).
   Single-purpose classes are !important on purpose: they replace an inline style, which beat every component rule, so they
   must too. Once one of these sits on an element, it owns that property there: to change it, change the class; to hand the
   property back to the component, remove the class.
   ===================================================================== */

/* Icon sizes (a Lucide <i> becomes an <svg> that keeps its classes). */
.th-glyph-13 { width:13px !important; height:13px !important; }
.th-glyph-14 { width:14px !important; height:14px !important; }
.th-glyph-16 { width:16px !important; height:16px !important; }
.th-glyph-18 { width:18px !important; height:18px !important; }
.th-glyph-20 { width:20px !important; height:20px !important; }
.th-glyph-22 { width:22px !important; height:22px !important; }
.th-glyph-24 { width:24px !important; height:24px !important; }
.th-glyph-28 { width:28px !important; height:28px !important; }

/* Roles: bundles of inline style that recurred, named (not !important; each was checked against the cascade). */
/* date + hour + minute + am/pm on one line (the event forms) */
.th-dt-stack { display: flex; flex-direction: column; gap: var(--space-1h); }
.th-dt-row { display: flex; gap: var(--space-1h); }
.th-dt-row > select { flex: 1; min-width: 0; }
/* the centred one-line note in an empty or loading list; .th-err for the failed load */
.th-list-note { color: var(--muted); text-align: center; padding: var(--space-7) 0; }
.th-list-note.th-err { color: var(--sig-no); }
/* small helper text under a field or a card */
.th-hint { font-size: var(--fs-12); color: var(--muted); line-height: 1.5; }
/* a muted link with no underline, hover included */
.th-link-quiet, .th-link-quiet:hover { color: var(--muted); text-decoration: none; }

/* States and variants that replaced the last held inline styles (2026-10-19; found by MM3-0246/0247: each was a missing
   primitive, not a one-off). Not !important: each sits after the page sections it competes with, and was pixel-checked. */
/* a gated form shown as a column once it's ready (the code used to force display:flex on it) */
.th-gated-stack.th-is-ready { display: flex; flex-direction: column; gap: var(--space-5); }
/* someone invited who hasn't finished signing up */
.th-avatar.th-is-pending { background: var(--paper-3); color: var(--muted); }
/* an empty slot, e.g. "someone could help here" */
.th-avatar.th-is-placeholder { background: var(--paper-2); color: var(--muted); }
/* the skeleton shown in place of a person's name while it loads */
.th-skel-name { display: inline-block; height: 1em; width: 7em; vertical-align: -0.15em; border-radius: var(--radius-6); margin: 0; }
/* the padding of a list's "Loading…" state; the code removes it when the list arrives */
.th-loading-pad { padding: var(--space-5) var(--space-1); }
/* a row of a checklist (a mark and its text) */
.th-check-row { align-items: flex-start; padding: 3px 0; }
/* something not yet relevant (a later step of a checklist) */
.th-is-dim { opacity: 0.55; }

/* =====================================================================
   LIVE (admin-live.html) — the organization-admin panel: stat cards, one
   trend chart, bars, a troops table and a feed that fit one screen (no page
   scroll). A card you can drill into is a button with `.th-is-drill` and a ›
   in its header; its detail opens in `.th-live-panel` in place of the feed
   (never a modal). One hue (--accent); text is always a text token; state is
   icon + word, never colour alone. Style guide §11.
   ===================================================================== */
.th-frame.th-is-wide { max-width: 1440px; }
/* The live panel is a one-screen dashboard: it keeps the locked frame (the page itself does not scroll). */
body.th-page-admin-live.th-screen { height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
body.th-page-admin-live .th-frame { height: 100vh; height: 100dvh; overflow: hidden; }
body.th-page-admin-live .th-frame-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.th-live-main { overflow: hidden; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
.th-live-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); flex: 0 0 auto; min-width: 0; font-size: var(--fs-12); color: var(--muted); font-variant-numeric: tabular-nums; }
.th-live-head > * { min-width: 0; }
.th-live-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--ok); flex: 0 0 auto; animation: th-live-pulse 2.4s var(--ease-soft) infinite; }
.th-live-dot.th-is-stale { background: var(--warn-border); animation: none; }
@keyframes th-live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.th-live-status { display: inline-flex; align-items: center; gap: var(--space-1h); padding: var(--space-0) var(--space-2h); border-radius: var(--radius-pill); font-size: var(--fs-12); font-weight: 600; background: var(--ok-s); color: var(--ok); }
.th-live-status.th-is-busy { background: var(--warn-s); color: var(--warn); }
.th-live-status.th-is-over { background: var(--sig-no-s); color: var(--sig-no); }

/* the grid: 12 columns, fixed to the space under the head. Cards take their content's height; the feed (or the open drill panel) takes whatever is left. */
.th-live-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto minmax(0, 1fr); gap: var(--space-2); overflow: hidden; }
.th-live-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); }
.th-live-stats.th-is-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.th-live-main [hidden] { display: none; }
.th-live-card { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-0); padding: var(--space-2) var(--space-3); text-align: left; font: inherit; color: inherit; text-decoration: none; justify-self: stretch; align-self: stretch; }
.th-live-card.th-is-trend { grid-column: span 5; }
.th-live-card.th-is-half { grid-column: span 3; }
.th-live-card.th-is-third { grid-column: span 4; contain: size; }   /* its height comes from the cards beside it; its rows fit or hide */
.th-live-card.th-is-full { grid-column: 1 / -1; }
.th-live-card-head { display: flex; align-items: center; gap: var(--space-1h); min-width: 0; flex: 0 0 auto; }
.th-live-card-head > .th-eyebrow { flex: 1 1 auto; min-width: 0; }
.th-live-more { flex: 0 0 auto; font-size: var(--fs-11); color: var(--muted); font-variant-numeric: tabular-nums; }

/* drill affordance: the whole card is the button, the › says so */
.th-live-card.th-is-drill { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color var(--t-fast) var(--ease-soft), background var(--t-fast) var(--ease-soft); }
.th-live-card.th-is-drill:hover { border-color: var(--accent); background: var(--paper-2); }
.th-live-card.th-is-drill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.th-live-card.th-is-drill[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-s); }
.th-live-chev { flex: 0 0 auto; color: var(--muted); }
.th-live-card.th-is-drill:hover .th-live-chev, .th-live-card.th-is-drill[aria-expanded="true"] .th-live-chev { color: var(--accent); }
.th-live-card.th-is-notable { outline: 2px solid var(--warn-border); outline-offset: -2px; }

/* stat card */
.th-live-stat-body { display: flex; flex-direction: column; gap: var(--space-0); min-width: 0; }
.th-live-num { font-size: var(--fs-24); font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.th-live-sub { font-size: var(--fs-12); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 0; }
.th-live-delta { display: inline-flex; align-items: center; gap: var(--space-0); font-weight: 600; color: var(--muted); }
.th-live-delta.th-is-up { color: var(--ok); }
.th-live-delta.th-is-down { color: var(--warn); }

/* trend chart: a short fixed band (170 px; 120 on a tablet or phone, 96 on a small phone) */
.th-live-chart { position: relative; flex: 0 0 auto; height: 170px; touch-action: pan-y; }
.th-live-chart svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; outline: none; }
.th-live-chart svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-6); }
.th-live-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.th-live-line.th-is-ctx { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
.th-live-axis { stroke: var(--line); stroke-width: 1; }
.th-live-tick { fill: var(--muted); font-size: var(--fs-11); font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.th-live-value { fill: var(--ink); font-size: var(--fs-12); font-weight: 700; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.th-live-cross { stroke: var(--muted); stroke-width: 1; }
.th-live-point { fill: var(--paper); stroke: var(--accent); stroke-width: 2; }
.th-live-point.th-is-ctx { stroke: var(--muted); stroke-width: 1; }
.th-live-tip-box { fill: var(--paper); stroke: var(--line); stroke-width: 1; }
.th-live-tip-text { fill: var(--ink); font-size: var(--fs-12); font-weight: 600; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.th-live-hit { fill: transparent; }
.th-live-legend { display: inline-flex; align-items: center; gap: var(--space-2); flex: 0 0 auto; font-size: var(--fs-11); color: var(--muted); }
.th-live-legend-item { display: inline-flex; align-items: center; gap: var(--space-1); }
.th-live-swatch { width: 18px; height: 6px; display: block; }

/* bars: single hue, fixed contract order; on a narrow phone they become one row of labelled values */
.th-live-bars { list-style: none; margin: 0; padding: 0; flex: 0 0 auto; display: flex; flex-direction: column; gap: var(--space-1h); }
.th-live-bar-row { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); font-size: var(--fs-12); color: var(--ink); min-width: 0; }
.th-live-bar-svg { display: block; width: 100%; height: 8px; border-radius: var(--radius-pill); background: var(--paper-3); overflow: hidden; }
.th-live-bar-fill { fill: var(--accent); }
.th-live-bar-val { min-width: 2.5em; text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* rows: the troops table, the feed and every drill list. Cells truncate; `.th-is-opt` cells drop on a narrow phone. */
.th-live-rows { list-style: none; margin: 0; padding: 0; position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.th-live-row { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-13); color: var(--ink); min-width: 0; flex: 0 0 auto; }
.th-live-row:last-child { border-bottom: 0; }
.th-live-row[hidden] { display: none; }
.th-live-row.th-is-head { font-size: var(--fs-11); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding-top: 0; }
.th-live-cell { flex: 1 1 0; min-width: 0; }
.th-live-cell.th-is-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.th-live-cell.th-is-time { min-width: 2.25rem; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
/* tables: figure and header columns size to their content (max-content), names take the flexible track and truncate;
   each row is a subgrid of its table so the columns line up. a = name + 4 figures (troops), b = 2 names + 3 figures
   (patrols), c = chip, 2 names, figure (people online), d = age + text (feed). */
.th-is-cols-a, .th-is-cols-b, .th-is-cols-c, .th-is-cols-d { display: grid; align-content: start; column-gap: var(--space-2); }
.th-is-cols-a { grid-template-columns: minmax(0, 1fr) repeat(4, max-content); }
.th-is-cols-b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) repeat(3, max-content); }
.th-is-cols-c { grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr) max-content; }
.th-is-cols-d { grid-template-columns: max-content minmax(0, 1fr); }
.th-is-cols-a > .th-live-row:not([hidden]), .th-is-cols-b > .th-live-row:not([hidden]), .th-is-cols-c > .th-live-row:not([hidden]), .th-is-cols-d > .th-live-row:not([hidden]) { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
/* the feed: one column, two from 1280 px (column 1 fills with whole rows, then column 2) */
.th-live-cols { display: flex; gap: var(--space-5); flex: 1 1 auto; min-height: 0; min-width: 0; }
.th-live-cols > .th-live-rows { flex: 1 1 0; min-width: 0; }
.th-live-rows.th-is-col2 { display: none; }
@media (min-width: 1280px) { .th-live-rows.th-is-col2 { display: grid; } }

/* the drill panel: replaces the feed while open; as tall as its content, up to the space left; its body scrolls beyond that, the page never does */
.th-live-panel { grid-column: 1 / -1; align-self: start; max-height: 100%; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
.th-live-panel-head { display: flex; align-items: center; gap: var(--space-2); flex: 0 0 auto; min-width: 0; }
.th-live-panel-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--fs-15); font-weight: 600; }
.th-live-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* 420 to 1023 px: stat cards 3 x 2, trend full width, bars and troops side by side, the feed fills the rest */
@media (max-width: 1023px) {
  .th-live-grid { grid-template-rows: auto auto auto minmax(0, 1fr); }
  .th-live-grid.th-is-drilling { grid-template-rows: auto minmax(0, 1fr); }
  .th-live-grid.th-is-drilling > .th-is-sub { display: none; }
  .th-live-stats, .th-live-stats.th-is-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .th-live-stats.th-is-five > :last-child { grid-column: span 2; }
  .th-live-chart { height: 120px; }
  .th-live-card.th-is-trend { grid-column: 1 / -1; }
  .th-live-card.th-is-half, .th-live-card.th-is-third { grid-column: span 6; }
}

/* under 420 px: stat cards 2 x 3 with the number and its note on one line, a 96 px trend, bars as one row, troops as now and week change only */
@media (max-width: 419px) {
  .th-live-grid { grid-template-rows: auto auto auto auto minmax(0, 1fr); }
  .th-live-grid.th-is-drilling { grid-template-rows: auto minmax(0, 1fr); }
  .th-live-stats, .th-live-stats.th-is-five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1h); }
  .th-live-card.th-is-third { contain: none; max-height: 8.5rem; }
  .th-is-cols-a { grid-template-columns: minmax(0, 1fr) repeat(2, max-content); }
  .th-is-cols-b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) repeat(2, max-content); }
  .th-live-card.th-is-half, .th-live-card.th-is-third { grid-column: 1 / -1; }
  .th-live-stat-body { flex-direction: row; align-items: baseline; gap: var(--space-2); }
  .th-live-stat-body > .th-live-sub { flex: 1 1 0; }
  .th-live-num { font-size: var(--fs-18); }
  .th-live-chart { height: 96px; }
  .th-live-bars { flex-direction: row; justify-content: stretch; gap: var(--space-1); }
  .th-live-bar-row { flex: 1 1 0; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; font-size: var(--fs-10); }
  .th-live-bar-row > :first-child { grid-row: 2; max-width: 100%; color: var(--muted); }
  .th-live-bar-val { grid-row: 1; text-align: center; font-size: var(--fs-13); }
  .th-live-bar-svg { display: none; }
  .th-live-cell.th-is-opt { display: none; }
  .th-live-main { padding: var(--space-1h) var(--space-2); gap: var(--space-1h); }
  .th-live-grid { gap: var(--space-1h); }
  .th-live-card, .th-live-panel { padding: var(--space-1h) var(--space-3); }
  .th-live-row { padding: var(--space-0) 0; }
  .th-live-head { flex-wrap: nowrap; }
  .th-live-head > .th-is-opt { display: none; }
}

/* short screens (a phone on its side, 667 x 375): one screen cannot hold the panel, so the main area scrolls instead of
   clipping. Rows take their content height and the trend a fixed one; the drill body keeps its own scroll. Taller screens
   keep the no-scroll fit. */
@media (max-height: 560px) {
  .th-live-main { overflow-y: auto; overscroll-behavior: contain; }
  .th-live-grid, .th-live-grid.th-is-drilling { flex: 0 0 auto; grid-template-rows: none; overflow: visible; }
  .th-live-chart { flex: 0 0 auto; height: 120px; }
  .th-live-panel-body { max-height: 60vh; }
}

/* oneoff:start — generated by scripts/style-alignment/inline/extract.mjs (inline-styles plan, step 6) */
/* ONE-OFF STYLES: the long tail of style="" that matched no ladder class or role, moved here verbatim, one class per distinct
   style per file, !important like the inline style it replaces. Consolidation debt, not primitives: map each onto a style-guide
   primitive or the ladder, then delete it (architecture/style-alignment/traversal.md). */
/* mobile/admin-bulk-rank.html */
.th-admin-bulk-rank-1 { width:auto !important; padding:0 10px !important; }
/* mobile/admin-members.html */
.th-admin-members-1 { width:auto !important; padding:0 10px !important; }
.th-admin-members-2 { padding:10px 14px !important; background:var(--amber-s) !important; border:1px solid #f59e0b !important; color:var(--amber-ink) !important; }
.th-admin-members-3 { line-height:1.4 !important; }
.th-admin-members-4 { letter-spacing:0.04em !important; }
.th-admin-members-5 { display:inline-flex !important; gap:4px !important; }
.th-admin-members-6 { background:var(--paper-2) !important; }
/* mobile/admin-patrols.html */
.th-admin-patrols-1 { flex:2 !important; }
.th-admin-patrols-2 { display:contents !important; }
.th-admin-patrols-3 { font-size:14px !important; }
.th-admin-patrols-4 { margin-top:1px !important; }
.th-admin-patrols-5 { padding:8px 0 !important; }
/* mobile/admin-plc.html */
.th-admin-plc-1 { padding:6px 2px 2px !important; }
.th-admin-plc-2 { padding:6px 2px !important; }
/* mobile/admin-settings.html */
.th-admin-settings-1 { margin:14px 0 !important; }
/* mobile/admin-year-end.html */
.th-admin-year-end-1 { padding:12px 0 !important; }
/* mobile/bootstrap-confirm.html */
.th-bootstrap-confirm-1 { font-size:18px !important; line-height:1.3 !important; letter-spacing:-0.005em !important; }
.th-bootstrap-confirm-3 { line-height:1.45 !important; }
/* mobile/bootstrap-create.html */
.th-bootstrap-create-1 { margin:0 0 2px !important; }
.th-bootstrap-create-2 { line-height:1.45 !important; }
.th-bootstrap-create-3 { font-weight:400 !important; text-transform:none !important; }
/* mobile/bootstrap-pending.html */
.th-bootstrap-pending-1 { font-size:24px !important; font-weight:800 !important; letter-spacing:-0.015em !important; }
.th-bootstrap-pending-2 { line-height:1.45 !important; }
.th-bootstrap-pending-3 { font-size:14px !important; cursor:pointer !important; }
/* mobile/compliance.html */
.th-compliance-1 { font-size:11px !important; margin:14px 0 !important; }
/* mobile/event-edit.html */
.th-event-edit-2 { margin:10px 0 18px !important; }
.th-event-edit-3 { display:inline-flex !important; gap:4px !important; }
.th-event-edit-4 { padding-top:10px !important; border-top:1px solid var(--line-2) !important; }
.th-event-edit-5 { background:var(--sig-no) !important; color:#fff !important; }
/* mobile/event.html */
.th-event-1 { font-size:16px !important; }
.th-event-2 { line-height:1.5 !important; }
.th-event-3 { flex-wrap:wrap !important; }
.th-event-4 { margin-top:0 !important; }
.th-event-6 { white-space:pre-wrap !important; line-height:1.5 !important; }
/* mobile/invite-parent.html */
.th-invite-parent-1 { border-color:var(--accent) !important; background:var(--accent-s) !important; }
.th-invite-parent-2 { color:var(--accent-d) !important; }
.th-invite-parent-3 { color:var(--accent-d) !important; opacity:0.85 !important; }
.th-invite-parent-4 { word-break:break-all !important; text-align:left !important; }
/* mobile/me.html */
.th-me-2 { background:var(--paper-2) !important; }
.th-me-3 { --stat-cols:3 !important; }
.th-me-4 { --stat-cols:4 !important; }
.th-me-5 { background:var(--amber-s) !important; color:var(--amber-ink) !important; font-size:11px !important; padding:2px 8px !important; border-radius:8px !important; margin-left:6px !important; }
.th-me-6 { margin-right:6px !important; }
.th-me-7 { margin:8px 0 !important; }
.th-me-8 { font-size:18px !important; }
.th-me-9 { margin-left:6px !important; }
/* mobile/onboard-add-scout.html */
.th-onboard-add-scout-1 { padding: 4px 16px 0 !important; }
.th-onboard-add-scout-2 { padding-top:8px !important; }
.th-onboard-add-scout-3 { font-size:24px !important; letter-spacing:-0.01em !important; line-height:1.2 !important; }
.th-onboard-add-scout-4 { line-height:1.55 !important; }
.th-onboard-add-scout-5 { flex:0 0 96px !important; }
.th-onboard-add-scout-6 { text-transform:uppercase !important; }
.th-onboard-add-scout-7 { font-weight:400 !important; text-transform:none !important; }
.th-onboard-add-scout-8 { align-items:flex-start !important; }
.th-onboard-add-scout-9 { flex-shrink:0 !important; }
.th-onboard-add-scout-10 { line-height:1.5 !important; }
.th-onboard-add-scout-11 { width:48px !important; height:48px !important; margin:0 auto 10px !important; }
/* mobile/onboard-done.html */
.th-onboard-done-1 { padding: 16px 16px 0 !important; }
.th-onboard-done-2 { padding-top:16px !important; }
.th-onboard-done-3 { font-size:28px !important; font-weight:800 !important; letter-spacing:-0.01em !important; line-height:1.15 !important; }
.th-onboard-done-4 { max-width:300px !important; margin:0 auto 16px !important; line-height:1.55 !important; }
.th-onboard-done-5 { text-align:left !important; }
.th-onboard-done-6 { align-items:flex-start !important; }
.th-onboard-done-7 { flex-shrink:0 !important; }
.th-onboard-done-8 { font-size:14px !important; }
.th-onboard-done-9 { width:11px !important; height:11px !important; vertical-align:-1px !important; }
/* mobile/onboard-email.html */
.th-onboard-email-1 { padding: 20px 16px 0 !important; }
.th-onboard-email-2 { padding-top:4px !important; }
.th-onboard-email-3 { font-size:24px !important; letter-spacing:-0.01em !important; line-height:1.2 !important; }
.th-onboard-email-4 { line-height:1.55 !important; }
.th-onboard-email-5 { border:0 !important; padding:6px 0 !important; }
.th-onboard-email-6 { flex-shrink:0 !important; }
/* mobile/onboard-sent.html */
.th-onboard-sent-1 { padding: 20px 16px 0 !important; }
.th-onboard-sent-2 { padding-top:8px !important; }
.th-onboard-sent-3 { font-size:24px !important; letter-spacing:-0.01em !important; line-height:1.2 !important; }
.th-onboard-sent-4 { max-width:300px !important; margin:0 auto 16px !important; line-height:1.55 !important; }
.th-onboard-sent-5 { text-align:left !important; }
.th-onboard-sent-6 { padding-left:18px !important; line-height:1.7 !important; }
.th-onboard-sent-7 { width:100% !important; }
.th-onboard-sent-8 { text-align:left !important; width:100% !important; border:1px dashed var(--accent) !important; }
.th-onboard-sent-9 { word-break:break-all !important; text-align:left !important; display:block !important; }
/* mobile/onboard-troop-link.html */
.th-onboard-troop-link-1 { line-height:1.55 !important; }
.th-onboard-troop-link-2 { background:var(--ch-parents-s) !important; color:var(--ch-parents) !important; }
.th-onboard-troop-link-3 { background:var(--accent-s) !important; color:var(--accent-d) !important; }
/* mobile/poll-compose.html */
.th-poll-compose-1 { align-self:flex-start !important; }
/* mobile/poll-edit.html */
.th-poll-edit-1 { align-self:flex-start !important; }
.th-poll-edit-2 { margin-bottom:2px !important; }
.th-poll-edit-3 { width:15px !important; height:15px !important; }
/* mobile/polls.html */
.th-polls-1 { font-size:18px !important; letter-spacing:-0.005em !important; line-height:1.3 !important; }
.th-polls-2 { line-height:1.5 !important; }
.th-polls-3 { flex-wrap:wrap !important; }
.th-polls-4 { background:var(--amber-s) !important; color:var(--amber-ink) !important; font-size:10px !important; }
.th-polls-5 { margin:8px 2px 0 !important; }
/* mobile/profile-edit.html */
.th-profile-edit-1 { flex:0 0 92px !important; }
/* mobile/qr-scan.html */
.th-qr-scan-1 { width:100% !important; }
/* mobile/rank-momentum.html */
.th-rank-momentum-1 { height:120px !important; border-radius:14px !important; }
.th-rank-momentum-2 { font-size:16px !important; }
/* mobile/rank.html */
.th-rank-1 { font-size:16px !important; }
.th-rank-2 { border:0 !important; padding:0 !important; }
.th-rank-3 { background:var(--paper-3) !important; }
/* mobile/roster.html */
.th-roster-1 { justify-content:center !important; min-height:400px !important; }
.th-roster-2 { opacity:0.3 !important; }
.th-roster-3 { padding:8px 0 !important; }
/* mobile/scout-detail.html */
.th-scout-detail-2 { text-align:right !important; }
.th-scout-detail-3 { border-color:var(--sig-no) !important; background:var(--paper) !important; }
/* mobile/scout-edit.html */
.th-scout-edit-1 { text-transform:uppercase !important; width:96px !important; }
.th-scout-edit-2 { font-weight:400 !important; }
/* mobile/scout-handoff-qr.html */
.th-scout-handoff-qr-1 { gap:5px !important; }
.th-scout-handoff-qr-2 { width:100% !important; }
.th-scout-handoff-qr-3 { color:rgba(255,255,255,0.5) !important; margin:6px 0 2px !important; }
.th-scout-handoff-qr-4 { padding:10px 12px !important; border:1px dashed rgba(255,255,255,0.35) !important; border-radius:10px !important; background:rgba(255,255,255,0.04) !important; }
.th-scout-handoff-qr-5 { font-size:11px !important; letter-spacing:0.06em !important; text-transform:uppercase !important; color:rgba(255,255,255,0.55) !important; }
.th-scout-handoff-qr-6 { font-size:11px !important; color:rgba(255,255,255,0.5) !important; }
/* mobile/shell-home.html */
.th-shell-home-1 { background:var(--paper-3) !important; }
.th-shell-home-2 { font-size:14px !important; line-height:1.4 !important; }
.th-shell-home-3 { font-size:17px !important; letter-spacing:-0.005em !important; }
.th-shell-home-4 { line-height:1.45 !important; }
/* events-mini/edit.html */
.th-events-edit-1 { padding-top:10px !important; border-top:1px solid var(--line-2) !important; }
.th-events-edit-2 { background:var(--sig-no) !important; color:#fff !important; }
/* events-mini/event.html */
.th-events-event-1 { white-space:pre-wrap !important; line-height:1.5 !important; }
.th-events-event-4 { line-height:1.55 !important; }
/* events-mini/share.html */
.th-events-share-1 { color:var(--accent-d, #1f3a25) !important; }
.th-events-share-2 { font-size: 14px !important; }
/* events-mini/sign-up.html */
.th-events-sign-up-2 { padding:12px !important; border:1px dashed var(--accent) !important; border-radius:8px !important; background:rgba(44,82,52,0.04) !important; }
.th-events-sign-up-3 { word-break:break-all !important; }
/* polls-mini/index.html */
/* polls-mini/share.html */
.th-polls-share-1 { margin:0 0 16px !important; }
.th-polls-share-2 { margin-top:18px !important; }
/* polls-mini/sign-up.html */
.th-polls-sign-up-2 { padding:12px !important; border:1px dashed var(--accent) !important; border-radius:8px !important; background:rgba(44,82,52,0.04) !important; }
.th-polls-sign-up-3 { word-break:break-all !important; }
/* rankup-mini/momentum.html */
.th-rankup-momentum-1 { height:120px !important; border-radius:14px !important; }
.th-rankup-momentum-2 { font-size:16px !important; }
/* rankup-mini/requirement.html */
.th-rankup-requirement-1 { font-size:14px !important; }
.th-rankup-requirement-2 { border:0 !important; padding:0 !important; }
/* rankup-mini/sign-up.html */
.th-rankup-sign-up-2 { padding:12px !important; border:1px dashed var(--accent) !important; border-radius:8px !important; background:rgba(44,82,52,0.04) !important; }
.th-rankup-sign-up-3 { word-break:break-all !important; }
/* shared/vendor/event-detail.js */
.th-event-detail-1 { padding:18px 8px !important; }
.th-event-detail-2 { color:var(--sig-yes) !important; }
.th-event-detail-3 { color:var(--sig-int) !important; }
.th-event-detail-4 { color:var(--accent-d) !important; }
.th-event-detail-5 { line-height:1.5 !important; }
.th-event-detail-6 { border-left:3px solid var(--accent) !important; }
.th-event-detail-8 { width:15px !important; height:15px !important; }
.th-event-detail-9 { margin-top:0 !important; }
/* shared/vendor/momentum.js */
.th-momentum-2 { justify-content:flex-end !important; }
.th-momentum-3 { color:var(--line) !important; }
/* shared/vendor/patrol-picker.js */
.th-patrol-picker-1 { padding:16px !important; }
/* oneoff:end */

/* ladder:start — generated by scripts/style-alignment/inline/ladder.mjs; edit there, not here */
/* The closed ladder: single-purpose classes that replaced inline styles, each pointing at a token where one exists
   (th-mt-3 = --space-3; the suffix is the token's: th-mt-0 is --space-0 = 2px, zero is th-m-none / th-mb-none). */
/* margin (th-m-none first: the side classes after it win) */
.th-m-none { margin:0 !important; }
.th-mt-0 { margin-top:var(--space-0) !important; }
.th-mt-1 { margin-top:var(--space-1) !important; }
.th-mt-1h { margin-top:var(--space-1h) !important; }
.th-mt-2 { margin-top:var(--space-2) !important; }
.th-mt-2h { margin-top:var(--space-2h) !important; }
.th-mt-3 { margin-top:var(--space-3) !important; }
.th-mt-4 { margin-top:var(--space-4) !important; }
.th-mt-5 { margin-top:var(--space-5) !important; }
.th-mb-none { margin-bottom:0 !important; }
.th-mb-1 { margin-bottom:var(--space-1) !important; }
.th-mb-1h { margin-bottom:var(--space-1h) !important; }
.th-mb-2 { margin-bottom:var(--space-2) !important; }
.th-mb-2h { margin-bottom:var(--space-2h) !important; }
.th-mb-3 { margin-bottom:var(--space-3) !important; }
.th-mb-4 { margin-bottom:var(--space-4) !important; }
.th-mr-1 { margin-right:var(--space-1) !important; }
.th-ml-auto { margin-left:auto !important; }
.th-mx-0 { margin-left:var(--space-0) !important; margin-right:var(--space-0) !important; }

/* gap and layout */
.th-gap-1h { gap:var(--space-1h) !important; }
.th-gap-2 { gap:var(--space-2) !important; }
.th-gap-2h { gap:var(--space-2h) !important; }
.th-flex { display:flex !important; }
.th-flex-none { flex:0 0 auto !important; }
.th-grow { flex:1 !important; }
.th-minw-0 { min-width:0 !important; }
.th-items-center { align-items:center !important; }
.th-justify-end { justify-content:flex-end !important; }
.th-inline-flex { display:inline-flex !important; }

/* text */
.th-text-center { text-align:center !important; }
.th-text-accent { color:var(--accent) !important; }
.th-text-ink-2 { color:var(--ink-2) !important; }
.th-text-ink { color:var(--ink) !important; }
.th-text-no { color:var(--sig-no) !important; }
.th-fwb { font-weight:700 !important; }
.th-nodeco { text-decoration:none !important; }
/* last, so no display helper above can beat it */
[hidden] { display: none !important; }
/* ladder:end */


/* review-bugs 2026-10-21 */
/* Scout sign-in code: two groups of three, spaced by CSS so copying yields "123456" (no space character between). */
.th-qr-code-group + .th-qr-code-group { margin-inline-start: var(--space-3); }
/* A pill that keeps its slot while hidden, so showing/hiding it never shifts the page. */
.th-all-caught-up.th-is-reserved { visibility: hidden; }
