/* Grace Reformed Members — styles carried over from the grace-reformed-members theme,
   plus additions for forms, tables, calendar and admin screens (bottom of file). */


:root {
  --navy: #183549;
  --navy-deep: #102333;
  --navy-mid: #24485f;
  --cream: #f6f1e7;
  --paper: #fbf8f2;
  --ink: #1a2330;
  --muted: #5c6670;
  --flame: #c2410c;
  --gold: #c4a35a;
  --rule: #e2d9c8;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --text-display: clamp(2.5rem, 1.4rem + 4vw, 4.5rem);
  --text-title: clamp(2rem, 1.3rem + 2.2vw, 3.25rem);
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
address { font-style: normal; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--navy);
  text-wrap: balance;
  font-weight: 500;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.gold-rule { width: 4rem; height: 1px; background: var(--gold); margin: 2rem auto 0; }
.gold-line { width: 3.5rem; height: 1px; background: var(--gold); margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1.5rem;
  font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-flame { background: var(--flame); color: var(--cream); }
.btn-flame:hover { background: var(--navy); }
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-navy:hover { background: var(--navy-mid); }
.btn-outline { background: transparent; color: var(--cream); border-color: rgba(246,241,231,0.7); }
.btn-outline:hover { background: var(--cream); color: var(--navy); }
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: var(--cream); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--cream); }

.chrome-sticky { position: sticky; top: 0; z-index: 40; }
.site-header { position: relative; padding-top: env(safe-area-inset-top); }
.utility {
  display: none; background: var(--navy-deep); color: rgba(246,241,231,0.75);
  font-size: 0.75rem; letter-spacing: 0.02em;
}
.utility-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 1rem; padding: 0.4rem 0; }
.utility p { margin: 0; }
.utility a { text-decoration: none; }
.utility a:hover { color: var(--gold); }

.nav-bar { background: var(--navy); border-bottom: 1px solid rgba(196,163,90,0.2); }
.nav-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.65rem 0; }
.brand { min-width: 0; flex: 1; }
.brand img { height: 2.5rem; width: auto; max-width: 100%; object-fit: contain; object-position: left; }

.desk-nav { display: none; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; line-height: 1; white-space: nowrap;
  padding: 0.5rem 0.4rem; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  color: rgba(246,241,231,0.85);
}
.nav-link:hover, .nav-link.is-active, .current-menu-item > .nav-link { color: var(--gold); }

.nav-drop { position: relative; display: flex; align-items: center; }
.caret {
  display: block; width: 0; height: 0; margin-left: 0.28rem;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor; opacity: 0.7; translate: 0 1px;
}
.nav-menu {
  display: none; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  min-width: 14rem; padding: 0.5rem 0; background: var(--navy-deep);
  border: 1px solid rgba(196,163,90,0.3); box-shadow: 0 12px 30px rgba(0,0,0,0.25); z-index: 50;
}
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { display: block; }
.nav-menu a {
  display: block; padding: 0.65rem 1rem; color: rgba(246,241,231,0.85);
  text-decoration: none; font-size: 0.95rem;
}
.nav-menu a:hover { background: var(--navy-mid); color: var(--gold); }

.menu-btn {
  width: 2.75rem; height: 2.75rem; border: 0; background: transparent;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.menu-btn span { display: block; width: 1.25rem; height: 2px; background: var(--cream); }
.menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { background: var(--navy-deep); max-height: min(100dvh, calc(100dvh - env(safe-area-inset-top))); overflow-y: auto; }
.mobile-nav[hidden] { display: none; }
.mobile-nav nav { padding: 1.25rem 1.5rem 2rem; }
.mobile-block { border-bottom: 1px solid rgba(246,241,231,0.1); padding: 0.4rem 0; }
.mobile-nav a { display: block; padding: 0.75rem 0; color: var(--cream); text-decoration: none; font-size: 1.1rem; }
.mobile-nav a.sub { padding-left: 0.85rem; color: rgba(246,241,231,0.7); font-size: 1rem; }

.page-hero { position: relative; overflow: hidden; background: var(--navy); color: var(--cream); text-align: center; }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.page-hero-veil { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(16,35,51,0.7), rgba(24,53,73,0.75), #102333); }
.page-hero-inner { position: relative; padding: 4rem 0; }
.page-hero.is-compact .page-hero-inner { padding: 3.25rem 0; }
.page-hero h1 { margin: 0.85rem 0 0; font-size: var(--text-title); font-style: italic; font-weight: 500; color: var(--cream); }
.page-hero .lede { max-width: 36rem; margin: 1.15rem auto 0; color: rgba(246,241,231,0.8); }

.section { padding: 3.5rem 0; }
.section-cream { background: var(--cream); }
.section-paper { background: var(--paper); }
.section-navy { background: var(--navy); color: var(--cream); }
.section-navy h2, .section-navy h3 { color: var(--cream); }
.section h2 { font-size: var(--text-title); font-style: italic; margin: 0.7rem 0 0; }

.cards { display: grid; gap: 1.25rem; margin-top: 2rem; }
.card {
  display: flex; flex-direction: column; padding: 1.7rem;
  border: 1px solid var(--rule); background: var(--cream); text-decoration: none; color: inherit;
}
.card:hover { border-color: var(--navy); }
.card h3 { margin: 1.1rem 0 0; font-size: 1.5rem; font-style: italic; }
.card p { margin: 0.7rem 0 0; font-size: 0.92rem; color: var(--muted); flex: 1; }
.more { margin-top: 1.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--navy); }
.card:hover .more { color: var(--flame); }
.lock-note { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 0; }

.times-strip { background: var(--navy-deep); color: var(--cream); }
.times-strip-inner { display: grid; }
.time-cell { padding: 1.4rem 1.2rem; text-align: center; border-bottom: 1px solid rgba(246,241,231,0.1); }
.time-cell:last-child { border-bottom: 0; }
.time-cell p.time { margin: 0.45rem 0 0; font-family: var(--font-display); font-size: 1.85rem; font-style: italic; color: var(--cream); }

.site-footer { background: var(--navy-deep); color: var(--cream); }
.footer-grid { display: grid; gap: 2.5rem; padding: 3.5rem 0; }
.footer-brand img { height: 3rem; width: auto; }
.footer-brand p { max-width: 28rem; margin: 1.15rem 0 0; font-size: 0.9rem; color: rgba(246,241,231,0.7); }
.times { list-style: none; margin: 0.75rem 0 1.4rem; padding: 0; font-size: 0.9rem; color: rgba(246,241,231,0.8); }
.times li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.25rem 0; }
.times span:last-child { color: var(--gold); font-variant-numeric: tabular-nums; }
.footer-visit address { font-size: 0.9rem; color: rgba(246,241,231,0.8); line-height: 1.65; }
.footer-visit a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.footer-visit a:hover { color: var(--gold); }
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1.15rem; font-size: 0.9rem; }
.footer-links a { color: rgba(246,241,231,0.7); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.footer-bar { border-top: 1px solid rgba(246,241,231,0.1); }
.footer-bar-inner { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.1rem 0; font-size: 0.75rem; color: rgba(246,241,231,0.5); }
.footer-bar p { margin: 0; }

.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; margin-top: 0.3rem; border: 1px solid var(--rule); background: var(--paper);
  color: var(--ink); font: inherit; padding: 0.6rem 0.75rem; outline: none;
}
.field input { height: 2.75rem; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--navy); }

.list-row {
  display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule); align-items: baseline; text-decoration: none; color: inherit;
}
.list-row h3 { margin: 0.2rem 0 0; font-size: 1.45rem; font-style: italic; }
.list-meta { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.prose { max-width: 42rem; margin-inline: auto; font-size: 1.125rem; line-height: 1.75; }
.household-grid { display: grid; gap: 1.25rem; }
.household-card { border: 1px solid var(--rule); background: var(--cream); padding: 1.5rem; }
.household-card h3 { margin: 0.35rem 0 0; font-size: 1.5rem; font-style: italic; }
.household-card .office { margin: 0.3rem 0 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--flame); }
.file-card { border: 1px solid var(--rule); background: var(--cream); padding: 1.5rem; }
.file-card h3 { margin: 0.4rem 0 0; font-size: 1.45rem; font-style: italic; }
.muted { color: var(--muted); }
.tag { color: var(--gold); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.locked-notice { max-width: 36rem; margin: 4rem auto; text-align: center; }

@media (min-width: 640px) {
  .brand img { height: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bar-inner { flex-direction: row; justify-content: space-between; }
  .cards { grid-template-columns: 1fr 1fr; }
  .household-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .utility { display: block; }
  .times-strip-inner { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .desk-nav { display: flex; }
  .menu-btn, .mobile-nav { display: none !important; }
  .brand img { height: 3.5rem; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .times-strip-inner { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1280px) {
  .nav-link { padding: 0.5rem 0.55rem; font-size: 0.72rem; letter-spacing: 0.16em; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ------------------------------------------------------------------
   Additions for the self-managed members site
   ------------------------------------------------------------------ */
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--navy-deep); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
a { text-underline-offset: 2px; }
/* :not(.btn) — a button inside text (e.g. a post's Edit button) keeps its own colours (v1.7.9) */
.prose a:not(.btn), .panel a:not(.btn), .alert a:not(.btn), .help a:not(.btn), .small a:not(.btn), .muted a:not(.btn) { color: var(--navy); }
.prose a:not(.btn):hover, .panel a:not(.btn):hover { color: var(--flame); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 2.5rem; }
.right { display: flex; justify-content: flex-end; margin-top: 1rem; }
.empty { padding: 1.5rem 0; }
.h-sm { font-size: 1.75rem; font-style: italic; margin: 0.4rem 0 1rem; }
.section h2.h-sm { font-size: 1.75rem; }
ul.plain { list-style: none; padding: 0; margin: 0.5rem 0; }
ul.plain li { padding: 0.3rem 0; }
code { background: var(--cream); padding: 0.1rem 0.3rem; font-size: 0.85em; }
blockquote { margin: 0.75rem 0; padding-left: 1rem; border-left: 2px solid var(--gold); color: var(--muted); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0; }

/* nav additions */
button.nav-link { background: none; border: 0; cursor: pointer; font-family: inherit; }
.badge { display: inline-block; min-width: 1.2rem; padding: 0.1rem 0.35rem; margin-left: 0.25rem; background: var(--flame); color: var(--cream); border-radius: 999px; font-size: 0.65rem; letter-spacing: 0; text-align: center; }
.mobile-block .eyebrow { margin-top: 0.75rem; }

/* layout helpers */
.split { display: grid; gap: 2.5rem; }
/* v1.7.9: on a phone the sign-in box comes first; beside the text from 900 px */
.split > .split-first-mobile { order: -1; }
.area-grid { display: grid; gap: 2rem; align-items: start; }
.grid-2, .grid-3 { display: grid; gap: 0 1rem; }
.narrow { max-width: 30rem; }
.narrow-wide { max-width: 46rem; }
.stack > * + * { margin-top: 0.25rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.btn-sm { min-height: 2.2rem; padding: 0 1rem; font-size: 0.72rem; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: #a3230b; border-color: #a3230b; }
.btn-danger:hover { background: #a3230b; color: var(--cream); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.linklike.danger { color: #a3230b; }
.inline-form { display: inline; }

/* panels & landing */
.panel { background: var(--paper); border: 1px solid var(--rule); padding: 1.5rem; margin-bottom: 1.5rem; }
.section-paper .panel { background: var(--cream); }
.panel.highlight { border-color: var(--gold); }
.panel-title { font-size: 2rem; font-style: italic; margin: 0.3rem 0 1rem; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3.5rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--navy); font-family: var(--font-display); font-size: 1.3rem; font-style: italic; }
.steps h3 { margin: 0; font-size: 1.4rem; font-style: italic; }
.steps p { margin: 0.35rem 0 0; color: var(--muted); }

/* forms */
.field input[type=file] { height: auto; padding: 0.5rem; }
.field input[type=checkbox], .field input[type=radio] { width: auto; height: auto; }
.field select[multiple] { min-height: 10rem; }
fieldset.field { border: 0; padding: 0; margin: 0 0 1rem; }
fieldset.field legend { padding: 0; margin-bottom: 0.4rem; }
fieldset.field legend span { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field.inline { display: inline-block; margin-right: 0.75rem; }
.field input:disabled, .field select:disabled, .field textarea:disabled { opacity: 0.7; }
.check { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.3rem 0; cursor: pointer; }
.check.inline { display: inline-flex; margin-left: 0.5rem; }
.checks { display: grid; gap: 0 1.5rem; }
.help { font-size: 0.82rem; color: var(--muted); margin: 0.25rem 0 1rem; }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.4em; text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* alerts & status */
.flashes { padding-top: 1.25rem; }
.alert { padding: 0.85rem 1rem; border-left: 3px solid var(--navy); background: var(--paper); margin: 0 0 1rem; }
.alert-success { border-color: #2f6b3a; background: #eef5ec; }
.alert-error { border-color: #a3230b; background: #fbecea; }
.alert-info { border-color: var(--gold); background: #faf4e4; }
.status { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.status-pending { color: #8a6d1f; }
.status-rejected, .status-disabled { color: #a3230b; }
.status-draft { color: var(--muted); }

/* toolbars, tabs, search */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tabs a { padding: 0.45rem 0.8rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--navy); }
.tabs a.is-active { color: var(--navy); border-bottom-color: var(--flame); }
.tabs .count { color: var(--gold); margin-left: 0.2rem; }
.search input, .filters input, .filters select, .moderate-form input { height: 2.4rem; border: 1px solid var(--rule); background: var(--paper); padding: 0 0.75rem; font: inherit; font-size: 0.95rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.moderate-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.moderate-form input { flex: 1 1 14rem; }
.bulk { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.pager { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 1.5rem 0; }
.pager a, .pager span { min-width: 2.2rem; padding: 0.3rem 0.6rem; text-align: center; border: 1px solid var(--rule); text-decoration: none; font-size: 0.9rem; }
.pager .is-current { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.pager .gap { border: 0; }

/* lists, tables */
.list { border-top: 1px solid var(--rule); }
.list-row p.muted { margin: 0.3rem 0 0; }
a.list-row:hover h3 { color: var(--flame); }
.doc-cat { margin-top: 1.5rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--navy); }
.table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
/* v1.27.3 sortable column headings (Manage → Users) */
.table th.th-sort a { color: inherit; text-decoration: none; white-space: nowrap; }
.table th.th-sort a:hover, .table th.th-sort a:focus-visible { color: var(--navy); text-decoration: underline; }
.table th.th-sort.is-sorted { color: var(--navy); }
.table th .sort-arrow { display: inline-block; margin-left: 0.35em; font-size: 0.85em; letter-spacing: 0; }
.table tr.is-muted td { color: var(--muted); }
.table a { color: var(--navy); }
.device-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.member-list li { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }

/* cards */
.card.is-locked { opacity: 0.6; }
.card.is-locked:hover { border-color: var(--rule); }

/* posts & comments */
.prose h3 { font-size: 1.5rem; font-style: italic; margin: 1.75rem 0 0.5rem; }
.prose ul { padding-left: 1.25rem; }
.event-facts { border: 1px solid var(--rule); background: var(--cream); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.event-facts p { margin: 0.2rem 0; }
.attachment { padding: 0.75rem 1rem; background: var(--cream); border: 1px solid var(--rule); }
.comments { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.comment { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.comment p { margin: 0.4rem 0; }
.comment.is-hidden { opacity: 0.55; }
.comment-form { margin-top: 1.5rem; }
.prose-sm { font-size: 0.98rem; }

/* directory */
.people li { padding: 0.45rem 0; border-bottom: 1px dashed var(--rule); }
.people li:last-child { border-bottom: 0; }
.people a { color: var(--navy); text-decoration: none; font-size: 0.92rem; }
.office { margin-left: 0.4rem; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--flame); }

/* calendar */
.cal-title { margin: 0 0.5rem; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); }
.cal-head { padding: 0.4rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); background: var(--cream); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: center; }
.cal-day { min-height: 4.5rem; padding: 0.3rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); overflow: hidden; }
.cal-day.is-pad { background: transparent; }
.cal-day.is-lords-day { background: #f8f2e3; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-num { display: block; font-family: var(--font-display); font-size: 1.1rem; color: var(--navy); }
.cal-event { display: block; margin-top: 0.2rem; padding: 0.1rem 0.3rem; font-size: 0.72rem; line-height: 1.3; text-decoration: none; color: var(--cream); background: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event b { font-weight: 600; }
.cal-event.vis-deacon, .dot.vis-deacon { background: #8a6d1f; }
.cal-event.vis-elder, .dot.vis-elder { background: var(--flame); }
.cal-event:hover { filter: brightness(1.15); }
.dot { display: inline-block; width: 0.7rem; height: 0.7rem; margin: 0 0.25rem 0 0.75rem; background: var(--navy); vertical-align: middle; }
.legend { margin-top: 0.75rem; }
@media (max-width: 639px) {
  .cal-event { font-size: 0; height: 0.45rem; padding: 0; }
  .cal-day { min-height: 3rem; }
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 2fr 1fr 1fr; }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .split > .split-first-mobile { order: 0; }
  .area-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .portal-feed.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
}
@media (min-width: 1024px) {
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
  .checks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- v1.1: Deacon Digest, end dates, church screens ---------- */
.digest-latest h2 { margin: 0.4rem 0 0.6rem; }
.digest-latest h2 a { text-decoration: none; }
.digest-image { max-width: min(100%, 48rem); border: 1px solid var(--rule); background: #fff; }

.your-posts summary { cursor: pointer; padding: 0.2rem 0; }
.your-posts[open] summary { margin-bottom: 0.75rem; }
.status-approved, .status-published { color: #2f6b3a; }

.signage-box { border: 1px solid var(--rule); background: var(--paper); padding: 1rem 1.1rem 0.4rem; margin: 0.5rem 0 1rem; }
.signage-box legend { padding: 0 0.4rem; }
.signage-fields[hidden] { display: none; }
.signage-source { width: 100%; }

.rte { border: 1px solid var(--rule); background: #fff; margin-top: 0.35rem; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.35rem; border-bottom: 1px solid var(--rule); background: var(--cream); }
.rte-bar button {
  min-width: 2.25rem; min-height: 2rem; padding: 0 0.6rem; border: 1px solid var(--rule); background: #fff;
  color: var(--navy); font: 600 0.85rem/1 var(--font-sans); cursor: pointer;
}
.rte-bar button:hover, .rte-bar button:focus-visible { border-color: var(--navy); outline: none; }
.rte-area { min-height: 7.5rem; padding: 0.75rem 0.9rem; font-size: 1.05rem; line-height: 1.5; outline: none; }
.rte-area:focus { box-shadow: inset 0 0 0 2px var(--gold); }
.rte-area p { margin: 0 0 0.6rem; }
.rte-area ul, .rte-area ol { margin: 0 0 0.6rem 1.3rem; padding: 0; }
.rte-count { margin: 0; padding: 0.3rem 0.9rem 0.45rem; font-size: 0.8rem; color: var(--muted); text-align: right; border-top: 1px solid var(--rule); }
.rte.is-over { border-color: #a3230b; }
.rte.is-over .rte-count { color: #a3230b; font-weight: 600; }

/* A small "what the screen shows" preview, in the screens' colours. */
.signage-preview-text {
  background: var(--navy-deep); color: var(--cream); padding: 1rem 1.25rem; margin: 0.75rem 0;
  font-family: var(--font-display); font-size: 1.25rem; line-height: 1.35; border-left: 3px solid var(--gold);
}
.signage-preview-text .eyebrow { margin-bottom: 0.4rem; }
.signage-preview-text p { margin: 0 0 0.5rem; }
.signage-preview-text ul, .signage-preview-text ol { margin: 0 0 0.5rem 1.4rem; padding: 0; }
.signage-summary { margin-top: 1.5rem; }

.key-box { font-family: ui-monospace, Consolas, monospace; font-size: 1rem; word-break: break-all; background: #fff; border: 1px dashed var(--gold); padding: 0.75rem 1rem; user-select: all; }
.screen-list td form { display: inline; }

/* v1.2 — "signed in as" banner for Administrators */
.imp-banner { background: #7a1d0a; color: #fff; position: relative; z-index: 50; }
.imp-banner-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; padding: 0.6rem 0; }
.imp-banner p { margin: 0; font-size: 0.92rem; }
.imp-banner form { margin: 0; }

/* ------------------------------------------------------------------
   Members' portal: tiles on the left, "what's new" pane on the right
   ------------------------------------------------------------------ */
.portal.section { padding-top: 2.5rem; }
.portal-layout { display: grid; gap: 2rem; align-items: start; }
.portal-rooms .eyebrow { margin-bottom: 0.85rem; }
.room-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.room-tile {
  display: flex; flex-direction: column; gap: 0.3rem; min-height: 5.5rem; padding: 1rem 1.1rem;
  background: var(--cream); border: 1px solid var(--rule); border-left: 3px solid var(--gold);
  text-decoration: none; color: inherit; transition: border-color 0.2s, background 0.2s;
}
.room-tile:hover, .room-tile:focus-visible { border-color: var(--navy); border-left-color: var(--flame); background: #fff; }
.room-title { font-family: var(--font-display); font-size: 1.3rem; font-style: italic; line-height: 1.15; color: var(--navy); }
.room-desc { font-size: 0.82rem; line-height: 1.4; color: var(--muted); }

.portal-pane { background: var(--cream); border: 1px solid var(--rule); padding: 1.5rem; }
.pane-highlights { display: grid; gap: 0.75rem; margin-bottom: 1.75rem; }
.highlight {
  display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1.15rem;
  background: var(--navy); color: var(--cream); text-decoration: none;
}
.highlight:hover { background: var(--navy-mid); }
.highlight-title { font-family: var(--font-display); font-size: 1.35rem; font-style: italic; line-height: 1.2; }
.highlight .feed-meta { color: rgba(246,241,231,0.7); }

.pane-section + .pane-section { margin-top: 1.75rem; }
.pane-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--navy); }
.section .pane-head h2 { margin: 0; font-size: 1.6rem; }
.pane-head .more { margin: 0; text-decoration: none; }
.pane-head .more:hover { color: var(--flame); }

.feed-item { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.feed-item:last-of-type { border-bottom: 0; }
.feed-item:hover .feed-title { color: var(--flame); }
.feed-title { font-weight: 600; color: var(--navy); line-height: 1.35; }
.feed-excerpt { font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.feed-meta { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.feed-event { flex-direction: row; align-items: center; gap: 0.9rem; }
.feed-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.date-badge { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.1rem; height: 3.3rem; border: 1px solid var(--gold); background: var(--paper); }
.db-mon { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--flame); }
.db-day { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; color: var(--navy); }

.pane-actions { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.pane-mine { margin-top: 1.5rem; }

@media (min-width: 640px) {
  .pane-highlights { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
}
@media (min-width: 960px) {
  .portal-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; }
  .portal-rooms { position: sticky; top: 7.5rem; }
  .portal-pane { padding: 1.75rem 2rem; }
}
@media (max-width: 520px) {
  /* Phones: compact two-column tiles so the news pane is close by */
  .room-tile { min-height: 0; padding: 0.75rem 0.85rem; }
  .room-title { font-size: 1.1rem; }
  .room-desc { display: none; }
}

/* Keep the logo from being squeezed out when the signed-in menu is long */
@media (min-width: 1024px) {
  .brand { flex: 0 0 auto; }
  .desk-nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 0.15rem; }
}

/* ---------- Discipleship groups (v1.3) ---------- */
.dg-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.dg-card { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem; background: var(--cream); border: 1px solid var(--rule);
  border-left: 3px solid var(--gold); text-decoration: none; color: inherit; }
.dg-card:hover, .dg-card:focus-visible { border-color: var(--navy); border-left-color: var(--flame); background: #fff; }
.dg-card .eyebrow { margin: 0; }
.dg-name { font-family: var(--font-display); font-size: 1.6rem; font-style: italic; line-height: 1.15; color: var(--navy); }
.dg-when { font-weight: 600; color: var(--navy); }
.dg-directory { display: grid; gap: 1.25rem; margin-top: 1rem; }
.dg-entry { display: grid; gap: 1.25rem; margin: 0; }
.dg-entry h3 { margin: 0.3rem 0 0.2rem; font-size: 1.6rem; font-style: italic; }
.dg-entry p { margin: 0.35rem 0; }
.dg-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border: 1px solid var(--rule); }
.dg-photo-preview { max-width: 100%; display: block; margin: 0.4rem 0; border: 1px solid var(--rule); }
.dg-ask { display: inline-block; }
.dg-ask > summary { list-style: none; cursor: pointer; }
.dg-ask > summary::-webkit-details-marker { display: none; }
.dg-ask[open] > summary { margin-bottom: 0.75rem; }
.dg-ask form { min-width: min(24rem, 80vw); }
.dg-block + .dg-block { margin-top: 2.5rem; }
.dg-announcement h3 { margin: 0.3rem 0 0.5rem; font-size: 1.45rem; font-style: italic; }
.dg-announcement.is-pinned { border-color: var(--gold); }
.dg-announcement.is-hidden, .feed-item.is-hidden, .dg-thread.is-hidden { opacity: 0.55; }
.dg-roster li { padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
.dg-roster li:last-child { border-bottom: 0; }
.dg-leave { margin: -0.5rem 0 1.5rem; text-align: right; }
.dg-actions { margin-top: 1rem; }
.dg-request { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.dg-request:last-child { border-bottom: 0; }
.dg-request input[type="text"] { width: 100%; }
.dg-add { margin-top: 1.5rem; gap: 1.5rem; }
.dg-edit { display: inline-block; margin-right: 0.5rem; }
.dg-edit > summary { display: inline; }
.dg-qr-preview svg { width: 9rem; height: 9rem; display: block; border: 1px solid var(--rule); }
@media (min-width: 720px) {
  .dg-entry:has(.dg-photo) { grid-template-columns: 14rem 1fr; }
}
@media (min-width: 1024px) {
  .dg-layout { grid-template-columns: minmax(0, 1fr) 22rem; }
}

/* ---------- v1.4 Directory photos ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold); box-shadow: 0 0 0 2px var(--paper); background: var(--navy); }
.avatar-lg { width: 7.5rem; height: 7.5rem; }
.avatar-initials { color: var(--gold); font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.04em; line-height: 1; user-select: none; }
.avatar-lg.avatar-initials { font-size: 2.6rem; }
.is-hidden-photo { opacity: 0.45; filter: grayscale(1); }
.family-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--gold); padding: 4px; background: var(--paper); }
.family-photo-empty { display: flex; align-items: center; justify-content: center; background: var(--navy); color: var(--gold); font-family: var(--font-display); font-size: 3.5rem; font-style: italic; border-color: var(--rule); }
.family-figure { margin: -0.25rem 0 0.75rem; }
.family-figure figcaption { margin-top: 0.35rem; }
.household-card.has-photo h3 { margin-top: 0; }
.family-add { margin: 0.2rem 0 0.4rem; }
.people .person { display: flex; gap: 0.85rem; align-items: flex-start; }
.people .person > div { min-width: 0; overflow-wrap: anywhere; }
.photo-tools { font-size: 0.8rem; color: var(--muted); }
.photo-pair { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; margin: 0.5rem 0 1rem; }
.photo-slot { display: grid; gap: 0.5rem; justify-items: start; }
.photo-slot .family-photo { max-width: 22rem; }
.photo-pair.is-compact .family-photo { max-width: 14rem; }
@media (min-width: 40rem) { .photo-pair { grid-template-columns: 3fr 2fr; } }
.photo-form { display: inline-flex; gap: 0.5rem; align-items: center; margin: 0; }
.photo-form.is-sending { opacity: 0.6; pointer-events: none; }
.file-btn { cursor: pointer; }
.photo-form:focus-within .file-btn { outline: 2px solid var(--flame); outline-offset: 2px; }
.photo-table img.family-photo { width: 8rem; }
.photo-table .avatar { width: 3.5rem; height: 3.5rem; }

/* Cropper */
body.crop-open { overflow: hidden; }
.crop-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(16, 35, 51, 0.82); }
.crop-dialog { width: min(40rem, 100%); max-height: 100%; overflow: auto; background: var(--paper); border-top: 3px solid var(--gold); padding: 1.25rem 1.5rem 1.5rem; }
.crop-title { margin: 0.1rem 0 0.25rem; font-size: 1.9rem; font-style: italic; }
.crop-stage { position: relative; width: 100%; max-height: 60vh; margin: 0 auto 1rem; overflow: hidden; background: var(--navy-deep); border: 1px solid var(--gold); cursor: grab; touch-action: none; }
.crop-stage.is-round { max-width: 26rem; }
.crop-stage.is-dragging { cursor: grabbing; }
.crop-stage:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }
.crop-canvas { display: block; width: 100%; height: 100%; }
.crop-guide { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(255,255,255,0.35) 33.33%, transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(255,255,255,0.35) 66.66%, transparent calc(66.66% + 0.5px)), linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(255,255,255,0.35) 33.33%, transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(255,255,255,0.35) 66.66%, transparent calc(66.66% + 0.5px)); }
.crop-stage.is-round .crop-guide { background: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(16, 35, 51, 0.55); outline: 1px solid rgba(196, 163, 90, 0.9); }
.crop-tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.crop-zoom { display: flex; align-items: center; gap: 0.6rem; flex: 1 1 14rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.crop-zoom input { flex: 1; accent-color: var(--flame); }

/* Bulk upload */
.dropzone { display: flex; align-items: center; justify-content: center; min-height: 7rem; padding: 1.5rem; text-align: center; border: 2px dashed var(--gold); background: var(--paper); color: var(--navy); cursor: pointer; }
.dropzone.is-over, .dropzone:focus-within { background: #fff; border-color: var(--flame); }
.bulk-table td { vertical-align: middle; }
.bulk-table select { max-width: 22rem; width: 100%; font: inherit; font-size: 0.9rem; padding: 0.35rem; }
.bulk-thumb { display: block; width: 6rem; height: auto; border: 1px solid var(--gold); padding: 2px; background: var(--paper); }
.bulk-thumb.kind-person { width: 3.5rem; border-radius: 50%; padding: 0; }
.bulk-thumb.is-empty { width: 3.5rem; height: 3.5rem; background: var(--rule); }
.status-approved { color: #2f6b3a; font-weight: 600; }
.status-error { color: #a3230b; font-weight: 600; }
.status-note { color: var(--muted); }

/* Printed directory (directory-print.php) */
.print-dir { background: #fff; color: #111; }
.print-dir .print-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: var(--navy); color: var(--cream); }
.print-dir .print-bar form { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; }
.print-dir .print-bar a, .print-dir .print-bar label { color: var(--cream); }
.print-head { text-align: center; padding: 1.5rem 1rem 0.5rem; }
.print-head img { width: 4rem; margin: 0 auto 0.5rem; }
.print-head h1 { margin: 0; font-size: 2.2rem; font-style: italic; }
.print-head p { margin: 0.2rem 0; color: #555; font-size: 0.85rem; }
.print-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.9rem; padding: 1rem; align-items: start; }
.print-house { break-inside: avoid; page-break-inside: avoid; border: 1px solid #c9bfae; padding: 0.6rem 0.7rem; font-size: 0.82rem; line-height: 1.35; }
.print-house .family-photo { padding: 2px; margin-bottom: 0.4rem; }
.print-house h3 { margin: 0 0 0.3rem; font-size: 1.15rem; font-style: italic; }
.print-house ul { list-style: none; margin: 0; padding: 0; }
.print-house li { display: flex; gap: 0.45rem; align-items: center; padding: 0.15rem 0; }
.print-house .avatar { width: 1.9rem; height: 1.9rem; font-size: 0.75rem; box-shadow: none; }
.print-house address { font-style: normal; margin-top: 0.3rem; color: #333; }
.print-house .office { margin-left: 0.3rem; font-size: 0.6rem; }
.print-dir.no-photos .avatar, .print-dir.no-photos .family-photo { display: none; }
.print-dir.no-photos .print-grid { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
@media print {
  @page { margin: 12mm; }
  .print-dir .print-bar { display: none; }
  .print-grid { grid-template-columns: repeat(3, 1fr); padding: 0; gap: 3mm; }
  .print-dir.no-photos .print-grid { grid-template-columns: repeat(4, 1fr); }
  .print-house { font-size: 8.5pt; }
  .avatar, .family-photo, .family-photo-empty { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.print-dir .print-bar select { font: inherit; font-size: 0.9rem; padding: 0.3rem 0.4rem; }
.btn[hidden], [data-nojs-submit][hidden] { display: none !important; }

/* ---------- v1.5 households, family members, private dates ---------- */
.hh-head { display: flex; gap: 0.9rem; align-items: center; }
.hh-head h3 { margin: 0; }
.household-card.has-photo .hh-head { display: block; }
.hh-adults { margin: 0.1rem 0 0; font-family: var(--font-display); font-size: 1.15rem; color: var(--navy); }
.hh-same { margin: 0.1rem 0 0; font-size: 0.78rem; color: var(--muted); font-style: italic; }
.avatar-family { width: 4rem; height: 4rem; font-size: 1.8rem; font-style: italic; }
.hh-shared { margin: 0.75rem 0 0.25rem; padding: 0.5rem 0.75rem; border-left: 2px solid var(--gold); background: var(--paper); font-size: 0.92rem; }
.hh-shared address { font-style: normal; }
.hh-shared a { color: var(--navy); text-decoration: none; }
.children { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; margin: 0.6rem 0 0; padding-top: 0.6rem; border-top: 1px dashed var(--rule); }
.children .child { display: flex; align-items: center; gap: 0.45rem; font-size: 0.95rem; }
.children .avatar { width: 2.25rem; height: 2.25rem; font-size: 0.85rem; }
.hh-edit { margin: 0.75rem 0 0; text-align: right; }
.hh-edit a { color: var(--flame); }
.field-static { margin: 0.35rem 0 0; }
.md-field { border: 0; padding: 0; margin: 0; }
.md-selects { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.md-selects select { width: auto; min-width: 7rem; }
.hh-members .hh-member { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.7rem 0; border-bottom: 1px dashed var(--rule); }
.hh-members .hh-member:last-child { border-bottom: 0; }
.hh-member-body { min-width: 0; flex: 1; }
.hh-member .tag { margin-left: 0.35rem; color: var(--muted); }
.tag.tag-gold, .hh-member .tag.tag-gold { color: var(--gold); }
.hh-details { margin-top: 0.4rem; }
.hh-details > summary { cursor: pointer; list-style: none; display: inline; }
.hh-details > summary::-webkit-details-marker { display: none; }
.hh-details[open] > form { margin-top: 0.6rem; padding: 0.85rem; background: var(--paper); border: 1px solid var(--rule); }
.hh-panel .panel-title { margin-top: 0; }
.move-form select { max-width: 13rem; }
.add-person { margin-top: 1rem; }
.add-person select { max-width: 26rem; }
.dates-table .is-today td { background: rgba(196, 163, 90, 0.18); }
.print-house .hh-adults { margin: 0 0 0.2rem; font-size: 0.95rem; }
.print-house .hh-same { margin: 0 0 0.2rem; font-size: 0.7rem; }
.print-house .hh-shared { margin: 0.2rem 0 0.3rem; padding: 0.15rem 0.4rem; background: none; font-size: inherit; }
.print-house .print-children { display: flex; flex-wrap: wrap; gap: 0.1rem 0.6rem; margin-top: 0.25rem; padding-top: 0.25rem; border-top: 1px dashed #c9bfae; }
.print-house .print-children li { padding: 0; }
.print-house .print-children .avatar { width: 1.5rem; height: 1.5rem; font-size: 0.6rem; }
[data-adult-only][hidden] { display: none !important; }

/* ---------- v1.5.1 A–Z letter bar, letter headings, household card order ---------- */
/* --chrome-h = height of the sticky site menu; --az-h = height of the letter bar. site.js measures both
   exactly; these are the no-JavaScript fallbacks for each menu size. */
:root { --chrome-h: calc(4.1rem + env(safe-area-inset-top)); --az-h: 2.8rem; }
@media (min-width: 640px) { :root { --chrome-h: calc(4.35rem + env(safe-area-inset-top)); } }
@media (min-width: 768px) { :root { --chrome-h: calc(6.4rem + env(safe-area-inset-top)); } }
@media (min-width: 1024px) { :root { --chrome-h: calc(7.07rem + env(safe-area-inset-top)); } }
@media (min-width: 1280px) { :root { --chrome-h: calc(6.9rem + env(safe-area-inset-top)); } } /* v1.6.3: one-row menu */
.az-bar {
  position: sticky; top: var(--chrome-h); z-index: 30;
  margin: 0 0 1.25rem; background: var(--paper);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--gold);
  box-shadow: 0 6px 10px -8px rgba(16, 35, 51, 0.35);
}
.az-bar ul {
  position: relative; /* keeps the screen-reader-only text inside the scroller */
  display: flex; margin: 0; padding: 0.2rem 0; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.az-bar li { flex: 1 0 auto; }
@media (max-width: 52rem) {
  /* On narrow screens the bar scrolls sideways: fade the right edge as a hint, with room to scroll clear of it. */
  .az-bar ul { padding-right: 1.5rem; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 1.75rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 1.75rem), transparent); }
}
.az-bar a, .az-bar .az-empty {
  display: block; min-width: 2.1rem; padding: 0.3rem 0.2rem; text-align: center;
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.3;
}
.az-bar a { color: var(--navy); text-decoration: none; }
.az-bar a:hover { color: var(--flame); background: var(--cream); }
.az-bar a:focus-visible { outline: 2px solid var(--flame); outline-offset: -2px; background: var(--cream); }
.az-bar .az-empty { color: #c9c1b2; cursor: default; }
.az-head { scroll-margin-top: calc(var(--chrome-h) + var(--az-h) + 0.75rem); }
.section .household-grid .az-head {
  grid-column: 1 / -1; margin: 0.75rem 0 -0.25rem; padding-bottom: 0.15rem;
  font-size: 2.1rem; font-style: italic; font-weight: 600; line-height: 1.1; color: var(--navy);
  border-bottom: 1px solid var(--gold);
}
.section .household-grid .az-head:first-child { margin-top: 0; }
.hh-table .az-row th { padding: 0.9rem 0.5rem 0.2rem; background: transparent; border-bottom: 1px solid var(--gold); text-align: left; }
.hh-table .az-head-row { display: block; font-family: var(--font-display); font-size: 1.7rem; font-style: italic; font-weight: 600; line-height: 1.1; color: var(--navy); letter-spacing: 0; text-transform: none; }

/* The household card: name first, then the photo (or initials circle), then the adults' first names. */
.household-card .hh-name { margin: 0 0 0.65rem; }
.hh-initials { margin: 0 0 0.35rem; }
.hh-sub { margin: 0 0 0.25rem; }
.household-card .family-figure { margin: 0 0 0.5rem; }

/* Printed directory: letter headings, kept with the households under them. Each letter is one grid; the
   heading and the first printed row sit in .print-keep, which is invisible on screen (display: contents) and
   a single unbreakable row when printing, so a heading never ends up alone at the foot of a page. */
.print-main { padding: 0 1rem 1rem; }
.print-main .print-grid { padding: 0; margin-top: 0.9rem; }
.print-keep { display: contents; }
.print-az {
  grid-column: 1 / -1; margin: 0.2rem 0 -0.35rem; padding-bottom: 0.1rem; font-size: 1.7rem; font-style: italic; font-weight: 600; line-height: 1.1;
  color: var(--navy); border-bottom: 1px solid var(--gold);
  break-after: avoid; page-break-after: avoid;
}
@media print {
  .print-main { padding: 0; }
  .print-main .print-grid { margin-top: 4mm; }
  .print-keep { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); gap: 3mm; align-items: start; break-inside: avoid; page-break-inside: avoid; }
  .print-dir.no-photos .print-keep { grid-template-columns: repeat(4, 1fr); }
  .print-az { font-size: 15pt; margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.hh-table .family-photo { width: 6.5rem; padding: 2px; } /* v1.5.1: a thumbnail in Manage → Households, not a full-width picture */

/* ---------- v1.5.2 the phone app: install button, map links, "Get the app" page, offline page ---------- */
.app-install {
  display: inline-flex; align-items: center; gap: 0.35rem; flex: none; min-height: 2.75rem; padding: 0 0.6rem;
  color: var(--cream); text-decoration: none; border: 1px solid rgba(196, 163, 90, 0.55);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
}
.app-install:hover, .app-install:focus-visible { color: var(--gold); border-color: var(--gold); }
.app-install svg { flex: none; }
.app-install-label { display: none; }
@media (min-width: 640px) { .app-install-short { display: none; } .app-install-label { display: inline; } }
@media (min-width: 1024px) {
  .app-install { margin-left: 0.5rem; padding: 0 0.45rem; }
  .app-install-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Already running as the installed app: no need to offer it. */
@media (display-mode: standalone), (display-mode: fullscreen) { .app-install { display: none; } }
.is-app .app-install { display: none; }

/* Addresses open the phone's maps app. */
a.map-link { color: inherit; text-decoration: none; display: inline-flex; gap: 0.35rem; align-items: flex-start; }
a.map-link svg { flex: none; margin-top: 0.2em; color: var(--flame); }
a.map-link:hover .map-text, a.map-link:focus-visible .map-text { text-decoration: underline; color: var(--navy); }
.hh-shared a.map-link { display: flex; }
.map-hint { color: var(--muted); font-size: 0.78rem; }

/* app.php */
.app-steps { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .app-steps { grid-template-columns: 1fr 1fr; } }
.app-steps .panel { margin: 0; }
.app-steps .panel.is-yours { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.app-steps h2 { font-size: 1.8rem; margin: 0.2rem 0 0.75rem; }
.yours-tag { display: none; margin-left: 0.5rem; color: var(--flame); font-family: var(--font-sans); font-size: 0.7rem; font-style: normal; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; vertical-align: middle; }
.is-yours .yours-tag { display: inline; }
.app-steps ol { margin: 0; padding-left: 1.3rem; }
.app-steps li { margin: 0.45rem 0; }
.app-steps li svg { vertical-align: -0.25em; color: var(--navy); }
.app-hero-row { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.app-hero-row img { width: 5.5rem; height: 5.5rem; border-radius: 22%; box-shadow: 0 4px 14px rgba(16, 35, 51, 0.25); }
.app-hero-row p { margin: 0; max-width: 40rem; }
.app-qr { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.app-qr svg { width: 9rem; height: 9rem; border: 1px solid var(--rule); padding: 0.4rem; background: #fff; }
.app-qr p { margin: 0; max-width: 26rem; }
.app-installed { display: none; }
.is-app .app-installed, .app-installed.is-shown { display: block; }
@media (display-mode: standalone) { .app-installed { display: block; } }

.app-qr { margin-top: 1.5rem; }
.app-qr h2 { margin: 0 0 0.5rem; font-size: 1.8rem; }
.is-ios .app-qr, .is-android .app-qr { display: none; }

/* ===================== v1.6 ===================== */

/* Version line in the footer */
.site-version { opacity: 0.85; letter-spacing: 0.04em; }
.print-version { margin-top: 1.5rem; font-size: 0.7rem; color: var(--muted); text-align: center; }

/* Photo or initials beside posts, comments and messages */
.avatar-sm { width: 2.5rem; height: 2.5rem; font-size: 0.95rem; box-shadow: none; }
.avatar-xs { width: 1.9rem; height: 1.9rem; font-size: 0.72rem; box-shadow: none; }
.post-byline { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.4rem; }
.post-byline .list-meta { margin: 0; }
.by-name { color: var(--navy); font-weight: 600; }
.feed-item-av { flex-direction: row; align-items: flex-start; gap: 0.8rem; }
.feed-item-av > .avatar { margin-top: 0.15rem; }
.feed-item-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.dg-person { display: flex; gap: 0.65rem; align-items: flex-start; }
.dg-person .avatar { margin-top: 0.1rem; }
.comment-row { display: flex; gap: 0.8rem; align-items: flex-start; }
.comment-row > .avatar { margin-top: 0.35rem; }
.comment-main { flex: 1; min-width: 0; }

/* Files & photos shared in a group */
.dgf-strip { margin: 0 0 1.5rem; padding: 1rem 1.1rem 1.1rem; background: #fff; border: 1px solid var(--rule); border-left: 3px solid var(--gold); }
.dgf-strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.7rem; }
.dgf-strip-title { margin: 0; font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy); }
.dgf-grid { list-style: none; margin: 0; padding: 0 0 0.3rem; display: grid; gap: 0.6rem; grid-auto-flow: column; grid-auto-columns: 8rem; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.dgf-grid > li { scroll-snap-align: start; }
.dgf-strip.is-grid { border-left-width: 1px; }
.dgf-strip.is-grid .dgf-grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); grid-auto-columns: auto; overflow: visible; }
.dgf-tile { display: flex; flex-direction: column; gap: 0.2rem; height: 100%; padding: 0.5rem; border: 1px solid var(--rule); background: var(--paper); text-decoration: none; color: inherit; }
.dgf-tile:hover, .dgf-tile:focus-visible { border-color: var(--navy); }
.dgf-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--rule); background: var(--cream); }
.dgf-tile .dgf-icon { width: 100%; aspect-ratio: 4 / 3; }
.dgf-name { font-size: 0.82rem; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.dgf-meta { font-size: 0.72rem; color: var(--muted); line-height: 1.3; }
.dgf-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--navy); background: var(--cream); }
.dgf-icon svg { width: 2.4rem; height: 3rem; }
.dgf-icon > span { position: absolute; bottom: 22%; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; }
.dgf-icon-pdf { color: #a3262a; }
.dgf-icon-doc { color: #24569e; }
.dgf-icon-sheet { color: #1f7a45; }
.dgf-icon-slides { color: #c2410c; }
.dgf-icon-audio, .dgf-icon-video { color: #6b3fa0; }
.dgf-msg { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.dgf-thumb img { width: 9rem; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.6rem; border: 1px solid var(--rule); }
.dgf-chip { display: inline-flex; align-items: center; gap: 0.5rem; max-width: 100%; padding: 0.3rem 0.65rem 0.3rem 0.3rem; background: rgba(255,255,255,0.85); border: 1px solid var(--rule); border-radius: 0.6rem; text-decoration: none; color: var(--ink); }
.dgf-chip .dgf-icon { width: 2rem; height: 2.4rem; background: transparent; }
.dgf-chip .dgf-icon svg { width: 1.6rem; height: 2rem; }
.dgf-chip .dgf-icon > span { font-size: 0.45rem; }
.dgf-chip > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.dgf-chip .dgf-name { -webkit-line-clamp: 1; }
.dgf-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.dgf-attach-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.7rem; border: 1px solid var(--rule); background: var(--paper); color: var(--navy); cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.dgf-attach-btn:hover, .dgf-attach input:focus-visible + * , .dgf-attach-btn:focus-within { border-color: var(--navy); }
.dgf-attach input:focus-visible ~ .dgf-chosen, .dgf-attach:focus-within .dgf-attach-btn { outline: 2px solid var(--gold); outline-offset: 1px; }
.dgf-chosen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; font-size: 0.78rem; }
.dgf-chosen li { padding: 0.15rem 0.5rem; background: var(--cream); border: 1px solid var(--rule); border-radius: 1rem; }
.dgf-field { border: 0; padding: 0; margin: 0; }
.dgf-existing li { padding: 0.25rem 0; }

/* Chat-style conversation */
.chat { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.chat-log { position: relative; list-style: none; margin: 0; padding: 0.4rem 0.9rem 1rem; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule); border-bottom: 0; } /* v1.8: no inner scroll box — the whole conversation runs down the page */
.chat-log:empty { display: none; }
.chat-day { text-align: center; margin: 1rem 0 0.6rem; }
.chat-day span { display: inline-block; padding: 0.15rem 0.8rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); background: var(--cream); border: 1px solid var(--rule); border-radius: 1rem; }
.chat-msg { display: flex; align-items: flex-end; gap: 0.5rem; margin-top: 0.15rem; scroll-margin-top: calc(var(--chrome-h) + 1rem); scroll-margin-bottom: 10rem; }
.chat-msg.is-first { margin-top: 0.7rem; }
.chat-avatar { flex: none; width: 2.5rem; }
.chat-stack { display: flex; flex-direction: column; align-items: flex-start; max-width: min(80%, 34rem); min-width: 0; }
.chat-name { margin: 0 0 0.15rem 0.7rem; font-size: 0.75rem; font-weight: 600; color: var(--navy); }
.chat-bubble { position: relative; padding: 0.45rem 0.8rem 0.35rem; background: #fff; border: 1px solid var(--rule); border-radius: 1.1rem; line-height: 1.45; font-size: 0.97rem; overflow-wrap: anywhere; }
.chat-msg:not(.is-mine).is-last .chat-bubble { border-bottom-left-radius: 0.3rem; }
.chat-text p { margin: 0 0 0.35rem; }
.chat-text p:last-child, .chat-text ul:last-child { margin-bottom: 0; }
.chat-text ul { margin: 0.2rem 0 0.35rem; padding-left: 1.2rem; }
.chat-text h3 { margin: 0.2rem 0; font-size: 1.15rem; }
.chat-time { display: block; margin-top: 0.1rem; font-size: 0.68rem; color: var(--muted); text-align: right; white-space: nowrap; }
.chat-msg.is-mine { flex-direction: row-reverse; }
.chat-msg.is-mine .chat-avatar { display: none; }
.chat-msg.is-mine .chat-stack { align-items: flex-end; }
.chat-msg.is-mine .chat-bubble { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.chat-msg.is-mine.is-last .chat-bubble { border-bottom-right-radius: 0.3rem; }
.chat-msg.is-mine .chat-time { color: rgba(246,241,231,0.7); }
.chat-msg.is-mine .chat-text a { color: #f3d79b; }
.chat-msg.is-mine .dgf-chip { background: rgba(255,255,255,0.95); }
.chat-msg.is-hidden .chat-bubble { opacity: 0.55; border-style: dashed; }
.chat-msg:target .chat-bubble { box-shadow: 0 0 0 3px rgba(196,163,90,0.55); }
.chat-more { position: relative; font-size: 0.8rem; }
.chat-more > summary { list-style: none; cursor: pointer; padding: 0 0.5rem; color: var(--muted); font-weight: 700; letter-spacing: 0.1em; line-height: 1.1; }
.chat-more > summary::-webkit-details-marker { display: none; }
.chat-more[open] > summary { color: var(--navy); }
.chat-menu { margin-top: 0.3rem; position: relative; z-index: 2; padding: 0.7rem; min-width: min(20rem, 70vw); background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 6px 18px rgba(16,35,51,0.12); }
.chat-menu .stack { gap: 0.5rem; }
.chat-menu form + form { margin-top: 0.4rem; }
/* v1.8: the reply box floats at the bottom of the screen while you read, and settles under the last message. */
.chat-compose { position: sticky; bottom: 0; z-index: 20; margin-top: 0; padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom)); background: var(--paper); border: 1px solid var(--rule); transition: box-shadow 0.2s; }
.chat-compose.is-stuck { box-shadow: 0 -8px 20px rgba(16,35,51,0.12); border-top-color: var(--gold); }
.chat-empty + .chat-log:empty + .chat-compose, .chat-log:empty + .chat-compose { margin-top: 0.5rem; }
.chat-compose textarea { width: 100%; min-height: 3rem; max-height: 30vh; resize: none; border-radius: 0.8rem; padding: 0.6rem 0.8rem; font: inherit; border: 1px solid var(--rule); background: #fff; }
.chat-compose textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.chat-compose-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
.chat-compose-bar .chat-send { margin-left: auto; }
.chat-compose .help { margin: 0.4rem 0 0; }
.chat-hint { display: none; }
@media (hover: hover) and (pointer: fine) { .chat-hint { display: inline; } }
@media (max-width: 40rem) {
  .chat-stack { max-width: 86%; }
  .chat-avatar { width: 2rem; }
  .chat-avatar .avatar { width: 2rem; height: 2rem; font-size: 0.75rem; }
  .dgf-attach-label { display: none; }
}

/* Formatting bar (bold / italic / emoji) */
.fmt-holder { position: relative; display: flex; flex-direction: column; }
.fmt-bar { display: flex; gap: 0.25rem; margin-bottom: 0.3rem; }
.fmt-btn { min-width: 2.2rem; height: 2.1rem; padding: 0 0.5rem; border: 1px solid var(--rule); background: var(--paper); color: var(--navy); font: inherit; font-size: 0.95rem; cursor: pointer; line-height: 1; }
.fmt-btn:hover, .fmt-btn:focus-visible, .fmt-btn[aria-expanded="true"] { border-color: var(--navy); background: #fff; }
.emoji-pop { position: absolute; z-index: 30; top: 2.5rem; left: 0; width: min(21rem, 92vw); max-height: 17rem; overflow-y: auto; padding: 0.5rem 0.6rem; background: #fff; border: 1px solid var(--rule); box-shadow: 0 10px 28px rgba(16,35,51,0.18); }
.emoji-group { margin: 0.35rem 0 0.15rem; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.1rem; }
.emoji { border: 0; background: transparent; font-size: 1.35rem; line-height: 1; padding: 0.3rem 0; cursor: pointer; border-radius: 0.4rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.emoji:hover, .emoji:focus-visible { background: var(--cream); outline: none; box-shadow: inset 0 0 0 1px var(--gold); }
.chat-compose .fmt-holder .emoji-pop { top: auto; bottom: 100%; margin-bottom: 0.3rem; }
.list-row-av { justify-content: flex-start; }
.list-row-av > .avatar { margin-top: 0.35rem; }
.list-row-av > .list-row-main { flex: 1; min-width: 0; }
.list-by { margin: 0.25rem 0 0; color: var(--muted); }
.post-byline-foot { margin-top: 1.5rem; }
.post-byline-foot p { margin: 0; }

/* Directory: view switch and the compact list (v1.6) */
.view-switch { display: inline-flex; align-items: center; gap: 0.25rem; margin: 0 0 1rem; padding: 0.2rem; border: 1px solid var(--rule); background: var(--paper); }
.view-switch-label { padding: 0 0.5rem 0 0.4rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.view-switch a { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--navy); }
.view-switch a.is-active { background: var(--navy); color: var(--cream); }
.view-switch a:not(.is-active):hover { background: var(--cream); }
.dir-list { max-width: 54rem; }
.dir-list .az-head { margin: 1.4rem 0 0.4rem; }
.dir-row { border: 1px solid var(--rule); border-top: 0; background: var(--cream); scroll-margin-top: 10rem; }
.dir-list .az-head + .dir-row { border-top: 1px solid var(--rule); }
.dir-row > summary { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto 1.2rem; gap: 0.85rem; align-items: center; padding: 0.55rem 0.85rem; cursor: pointer; list-style: none; }
.dir-row > summary::-webkit-details-marker { display: none; }
.dir-row > summary:hover { background: #fff; }
.dir-row-pic .family-photo { width: 3rem; height: 3rem; object-fit: cover; border-radius: 50%; border: 1px solid var(--gold); }
.dir-row-pic .avatar { width: 3rem; height: 3rem; font-size: 1.3rem; }
.dir-row-main { display: flex; flex-direction: column; min-width: 0; }
.dir-row-name { font-family: var(--font-display); font-size: 1.25rem; font-style: italic; color: var(--navy); line-height: 1.2; }
.dir-row-sub { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-row-contact { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.85rem; color: var(--navy); text-align: right; min-width: 0; }
.dir-row-email { color: var(--muted); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-row-more::before { content: "▸"; color: var(--gold); display: inline-block; transition: transform .15s; }
.dir-row[open] > summary .dir-row-more::before { transform: rotate(90deg); }
.dir-row[open] > summary { background: #fff; border-bottom: 1px dashed var(--rule); }
.dir-row-body { padding: 0.6rem 0.85rem 0.8rem 4.7rem; background: #fff; font-size: 0.93rem; }
.dir-row-body p { margin: 0.2rem 0; }
.dir-row-body a { color: var(--navy); }
.dir-row-addr { margin: 0.2rem 0; }
.dir-row-people li { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.3rem 0; }
.dir-row-people .avatar { margin-top: 0.1rem; }
.dir-row-people .office { margin-left: 0.25rem; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--flame); }
.dir-row-links { margin-top: 0.4rem !important; }
.child-contact { font-size: 0.82rem; }
.child-contact a { color: var(--navy); text-decoration: none; }
.print-child-contact { font-size: 0.85em; color: #444; }
@media (max-width: 40rem) {
  .dir-row > summary { grid-template-columns: 2.6rem minmax(0, 1fr) 1rem; }
  .dir-row > summary { gap: 0.2rem 0.7rem; padding: 0.5rem 0.7rem; }
  .dir-row-contact { grid-column: 2 / 3; align-items: flex-start; text-align: left; font-size: 0.82rem; }
  .dir-row-email { display: none; }
  .dir-row-name { font-size: 1.12rem; }
  .dir-row-more { grid-row: 1; grid-column: 3; }
  .dir-row-body { padding-left: 0.85rem; }
}

/* News feeds (v1.6) */
.feed-head { display: flex; align-items: center; gap: 0.8rem; }
.feed-head h2 { margin: 0; }
.feed-url { margin-top: 0.4rem; padding: 0.7rem 0.85rem; background: #fff; border: 1px solid var(--rule); border-left: 3px solid var(--gold); }
.feed-url input { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8rem; padding: 0.45rem; border: 1px solid var(--rule); background: var(--paper); }
.feed-url .help { margin-bottom: 0; }
.feed-newkey { margin: -1rem 0 1.5rem; text-align: right; }
@media (min-width: 64rem) { .feeds-layout { grid-template-columns: minmax(0, 1fr) 22rem; } }

/* Discipleship-groups map (v1.6, assets/js/gmap.js) */
.gmap { position: relative; height: 26rem; border: 1px solid var(--rule); background: #e9e3d6; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.gmap:focus-visible { box-shadow: 0 0 0 3px var(--gold); }
.gmap:not(.gmap-ready)::after { content: "Loading the map…"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.9rem; }
.gmap-view { position: absolute; inset: 0; cursor: grab; }
.gmap-view:active { cursor: grabbing; }
.gmap-tiles { position: absolute; inset: 0; filter: saturate(0.75) sepia(0.12); }
.gmap-tile { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.gmap-heat { position: absolute; left: 0; top: 0; pointer-events: none; mix-blend-mode: multiply; }
.gmap-pins { position: absolute; inset: 0; pointer-events: none; }
.gmap-pin { position: absolute; left: 0; top: 0; pointer-events: auto; width: 2rem; height: 2rem; margin: -1rem 0 0 -1rem; border-radius: 50%; border: 3px solid var(--gold); background: var(--navy); color: var(--cream); font: 700 0.85rem/1 var(--font-sans); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.35); display: grid; place-items: center; padding: 0; }
.gmap-pin.is-mine { background: var(--flame); }
.gmap-pin:hover, .gmap-pin:focus-visible { transform-origin: center; outline: 3px solid #fff; z-index: 2; }
.gmap-pin-edit { width: 30px; height: 40px; margin: -40px 0 0 -15px; border: 0; border-radius: 0; background: none; box-shadow: none; cursor: move; touch-action: none; }
.gmap-pin-edit svg { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35)); }
.gmap-popup { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: auto; cursor: auto; }
.gmap-popup-inner { position: absolute; bottom: 1.4rem; left: -8.5rem; width: 17rem; padding: 0.75rem 0.9rem 0.7rem; background: #fff; border: 1px solid var(--rule); border-top: 3px solid var(--gold); box-shadow: 0 8px 22px rgba(16,35,51,0.22); font-size: 0.88rem; line-height: 1.4; }
.gmap-popup-inner p { margin: 0 0 0.25rem; }
.gmap-popup-name { font-family: var(--font-display); font-size: 1.2rem; font-style: italic; color: var(--navy); padding-right: 1.2rem; }
.gmap-popup-when { font-weight: 600; color: var(--navy); }
.gmap-popup-area { color: var(--muted); }
.gmap-popup-status { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.gmap-popup-status.is-open { color: #1f7a45; }
.gmap-popup-link { display: inline-block; margin: 0.2rem 0 0.3rem; color: var(--flame); font-weight: 600; }
.gmap-popup-note { font-size: 0.72rem; color: var(--muted); font-style: italic; }
.gmap-popup-close { position: absolute; top: 0.3rem; right: 0.4rem; border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; }
.gmap-ctl { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 6; display: flex; flex-direction: column; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.gmap-btn { width: 2.2rem; height: 2.2rem; border: 1px solid var(--rule); background: #fff; color: var(--navy); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.gmap-btn + .gmap-btn { border-top: 0; }
.gmap-btn:hover, .gmap-btn:focus-visible { background: var(--cream); }
.gmap-attrib { position: absolute; right: 0; bottom: 0; z-index: 6; padding: 0.1rem 0.45rem; background: rgba(255,255,255,0.85); font-size: 0.68rem; color: var(--ink); pointer-events: none; }
.gmap-section .toolbar { margin-bottom: 0.4rem; }
.gmap-legend { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.35rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); font-size: 0.9rem; }
.gmap-legend li { display: flex; gap: 0.5rem; align-items: baseline; }
.gmap-legend a { color: var(--navy); text-decoration: none; font-weight: 600; }
.gmap-legend a:hover { color: var(--flame); }
.gmap-n { flex: none; display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--navy); color: var(--cream); border: 2px solid var(--gold); font-size: 0.7rem; font-weight: 700; }
.gmap-n.is-mine { background: var(--flame); }
.gmap-still { width: 100%; border: 1px solid var(--rule); }
.gmap-edit { height: 18rem; }
.gmap-edit-tools { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; font-size: 0.85rem; }
@media (max-width: 40rem) { .gmap { height: 21rem; } .gmap-popup-inner { width: 14rem; left: -7rem; } }

/* ---------- v1.6.1: Prayer requests under ACTS, bulletin buttons, roster reminders ---------- */
.acts-tabs { scroll-margin-top: 6rem; }
.acts-section { padding: 2rem 0 1rem; border-top: 1px solid var(--rule); scroll-margin-top: 5.5rem; }
.acts-section:first-of-type { border-top: 0; }
.your-posts + .acts-section { margin-top: 1rem; }
.acts-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.4rem 1.25rem; align-items: start; margin-bottom: 0.4rem; }
.acts-letter {
  display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%;
  background: var(--navy); color: var(--cream); border: 2px solid var(--gold);
  font-family: var(--font-display); font-size: 2.1rem; font-style: italic; line-height: 1;
}
.acts-intro h2 { margin: 0; font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); font-style: italic; }
.acts-count { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.55rem; border: 1px solid var(--rule); border-radius: 999px; font-family: var(--font-sans); font-size: 0.75rem; font-style: normal; font-weight: 600; color: var(--muted); vertical-align: middle; }
.acts-blurb { margin: 0.25rem 0 0; color: var(--ink); }
.acts-verse { margin: 0.35rem 0 0; font-family: var(--font-display); font-size: 1.12rem; font-style: italic; color: var(--muted); }
.acts-verse cite { font-family: var(--font-sans); font-size: 0.72rem; font-style: normal; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.acts-share { align-self: center; color: var(--navy); font-weight: 600; text-decoration: none; white-space: nowrap; }
.acts-share:hover { color: var(--flame); }
.acts-empty { margin: 0.6rem 0 0 4.85rem; }
.acts-more { margin: 0 0 0 4.85rem; }
.acts-more .more { display: inline-block; margin-top: 0.6rem; }
/* Compact prayer lines, indented under their heading (lined up with the heading text) */
.prayer-list { margin-left: 4.85rem; border-top: 1px solid var(--rule); }
.prayer-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 0.75rem; align-items: center;
  padding: 0.45rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit;
}
.prayer-row > .avatar { width: 1.75rem; height: 1.75rem; font-size: 0.7rem; }
.prayer-row-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prayer-row-title { font-family: var(--font-display); font-size: 1.2rem; font-style: italic; color: var(--navy); }
.prayer-row-excerpt { font-size: 0.9rem; color: var(--muted); }
.prayer-row-meta { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
a.prayer-row:hover .prayer-row-title { color: var(--flame); }
.prayer-cat-tag { display: inline-block; padding: 0.05rem 0.5rem; border: 1px solid var(--gold); border-radius: 999px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); background: var(--paper); }
@media (max-width: 40rem) {
  .acts-head { grid-template-columns: auto minmax(0, 1fr); }
  .acts-letter { width: 2.9rem; height: 2.9rem; font-size: 1.7rem; }
  .acts-share { grid-column: 1 / -1; justify-self: start; }
  .acts-empty, .acts-more, .prayer-list { margin-left: 1rem; }
  .prayer-row { grid-template-columns: auto minmax(0, 1fr); }
  .prayer-row-meta { grid-column: 2; font-size: 0.72rem; }
}
.bulletin-latest h2 { margin: 0.4rem 0 0.6rem; }
.bulletin-latest h2 a { text-decoration: none; }
.reminder-next { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.reminder-next li { margin: 0.15rem 0; }

/* v1.6.2: a Group guest asking to become a member */
.mr-details { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0 0 1rem; }
.mr-details dt { font-weight: 600; }
.mr-details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .mr-details { grid-template-columns: 1fr; } .mr-details dd { margin-bottom: 0.4rem; } }
.tag.tag-mr { color: var(--gold); }
/* v1.6.2: request panels on Manage → Users use .panel.highlight — keep them light (not the portal's navy .highlight cards) */
.panel.highlight, .panel.highlight:hover { display: block; background: var(--paper); color: var(--ink); }

/* v1.6.3: grouped menu — section headings, right-aligned menus at the end of the bar, current page */
.nav-menu .nav-heading {
  margin: 0; padding: 0.7rem 1rem 0.25rem; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
}
.nav-menu .nav-heading:not(:first-child) { margin-top: 0.35rem; border-top: 1px solid rgba(246,241,231,0.1); padding-top: 0.75rem; }
.nav-drop-end .nav-menu { left: auto; right: 0; transform: none; }
.nav-menu { max-height: calc(100vh - 9rem); overflow-y: auto; }
.nav-menu a[aria-current="page"] { color: var(--gold); }
.nav-account > .nav-link { text-transform: none; letter-spacing: 0.04em; font-size: 0.8rem; }
.mobile-nav .mobile-heading { margin: 0.6rem 0 0; padding-left: 0.85rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(196,163,90,0.85); }
.mobile-nav a.is-active { color: var(--gold); }
@media (min-width: 1024px) { .desk-nav .nav-link { padding: 0.5rem 0.38rem; letter-spacing: 0.1em; } }
@media (min-width: 1280px) { .desk-nav .nav-link { padding: 0.5rem 0.45rem; font-size: 0.72rem; letter-spacing: 0.1em; } }

/* ---------- v1.8 Communion roll ---------- */
.roll-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .roll-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.roll-stat { display: flex; flex-direction: column; padding: 1rem 1.1rem; background: var(--cream); border: 1px solid var(--rule); border-top: 3px solid var(--navy); text-decoration: none; color: var(--navy); }
a.roll-stat:hover { border-top-color: var(--flame); }
.roll-stat-n { font-size: 2.2rem; line-height: 1; font-weight: 600; }
.roll-stat-l { margin-top: 0.35rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.roll-pill, .doc-pill { display: inline-block; padding: 0.1rem 0.55rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 1rem; border: 1px solid var(--rule); background: #fff; color: var(--muted); white-space: nowrap; vertical-align: middle; }
.roll-pill.roll-communicant { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.roll-pill.roll-covenant { background: #faf4e4; border-color: var(--gold); color: #6d5417; }
.roll-pill.roll-censure { background: #fbecea; border-color: #a3230b; color: #a3230b; }
.roll-card .roll-now { margin: 0.25rem 0 0.4rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.roll-censure-form > summary { cursor: pointer; list-style: none; margin: 0; }
.roll-censure-form > summary::-webkit-details-marker { display: none; }
.roll-censure-form[open] > summary { margin-bottom: 0.75rem; }
.roll-table select { font: inherit; padding: 0.3rem 0.4rem; border: 1px solid var(--rule); background: #fff; }
.roll-summary td:not(:first-child), .roll-summary th:not(:first-child) { text-align: right; }
.roll-flows { margin-top: 1.25rem; }
.roll-flows .panel p { margin: 0.3rem 0; }
.roll-period .field.inline { margin-bottom: 0; }
.roll-mini { margin: 0.2rem 0 0.75rem; }

/* ---------- v1.8 Document versions ---------- */
.doc-pill.doc-current { background: #eef5ec; border-color: #2f6b3a; color: #2f6b3a; }
.doc-pill.doc-draft { background: #faf4e4; border-color: var(--gold); color: #6d5417; }
.doc-pill.doc-superseded { color: var(--muted); }
.doc-pill.doc-obsolete { background: #fbecea; border-color: #a3230b; color: #a3230b; }
.list-meta .doc-pill { letter-spacing: 0.08em; margin-left: 0.2rem; }
.doc-status-tabs { margin: -0.5rem 0 1rem; }
.doc-version-line { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.75rem; }
.doc-adopt { align-items: end; }
.doc-adopt-panel { margin-top: 1.5rem; }
.doc-versions tr.is-today td { background: #faf4e4; }
.doc-versions-h { margin-top: 2.5rem; }

/* ---------- v1.9 discipleship-group modules: tabs, Study, Prayer, meeting mode ---------- */
ol.plain { list-style: none; padding: 0; margin: 0.5rem 0; }
.dg-tabs { margin: 0 0 1.75rem; border-bottom: 1px solid var(--rule); }
.dg-tabs a { padding: 0.6rem 0.9rem; margin-bottom: -1px; }
.dg-week p { margin: 0.4rem 0; }
.dg-module { align-items: flex-start; padding: 0.5rem 0; border-bottom: 1px dashed var(--rule); }
.dg-module input { margin-top: 0.35rem; }
.dg-module-settings { border: 0; padding: 0.75rem 0 0; margin: 0; }

/* Prayer */
.dgp-views { margin-bottom: 1.25rem; }
.dgp-list { display: grid; gap: 0; }
.dgp-card { border-left: 3px solid var(--gold); }
.dgp-card h3 { margin: 0.35rem 0 0.3rem; font-size: 1.45rem; font-style: italic; }
.dgp-card h3 a { text-decoration: none; }
.dgp-card h3 a:hover { color: var(--flame); }
.dgp-card-ongoing { border-left-color: var(--navy-mid); }
.dgp-card-answered { border-left-color: #2f6b3a; }
.dgp-card-closed { border-left-color: var(--rule); opacity: 0.85; }
.dgp-excerpt { margin: 0.25rem 0 0.5rem; }
.dgp-request-title { margin: 0.6rem 0 0.35rem; font-size: 1.6rem; font-style: italic; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.dgp-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.dgp-foot p { margin: 0; }
.dgp-status { display: inline-block; padding: 0.05rem 0.5rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid currentColor; }
.dgp-status-active { color: var(--flame); }
.dgp-status-ongoing { color: var(--navy-mid); }
.dgp-status-answered { color: #2f6b3a; }
.dgp-status-closed { color: var(--muted); }
.dgp-flag { color: var(--navy); font-weight: 600; }
.dgp-pray { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0; }
.dgp-pray-note { flex-wrap: wrap; }
.dgp-pray-note input { min-width: min(16rem, 60vw); }
.dgp-prayed-done { color: #2f6b3a; font-weight: 600; font-size: 0.9rem; }
.dgp-answer { margin: 0.75rem 0 0.25rem; padding: 0.6rem 0.9rem; border-left: 2px solid #2f6b3a; background: #f1f6ef; }
.dgp-answer .eyebrow { margin: 0; color: #2f6b3a; }
.dgp-praise-head { margin: 0 0 1.25rem; }
.dgp-verse { margin: 0; font-family: var(--font-display); font-size: 1.6rem; font-style: italic; color: var(--navy); }
.dgp-verse cite { font-family: var(--font-sans); font-size: 0.85rem; font-style: normal; color: var(--muted); margin-left: 0.4rem; }
.dgp-vis { border: 0; padding: 0; margin: 0.5rem 0; }
.dgp-elder-note { color: var(--navy); }
.dgp-timeline { margin: 1rem 0 1.5rem; }
.dgp-tl-item { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px dashed var(--rule); }
.dgp-tl-item p { margin: 0; }
.dgp-tl-date { font-size: 0.8rem; font-weight: 600; color: var(--muted); padding-top: 0.1rem; }
.dgp-tl-start { color: var(--muted); font-size: 0.9rem; }
.dgp-prayed-list li { border-bottom: 1px solid var(--rule); }
.dgp-waiting .feed-title { color: var(--flame); }
.dgp-pairs li { padding: 0.15rem 0; }
.dgp-print-page { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.dgp-print-page h1 { font-size: 2.2rem; font-style: italic; margin: 0.2rem 0; }
.dgp-print-page h2 { font-size: 1.5rem; font-style: italic; margin: 1.75rem 0 0.5rem; border-bottom: 1px solid var(--rule); }
.dgp-print-item { padding: 0.45rem 0; border-bottom: 1px dashed var(--rule); break-inside: avoid; }
.dgp-print-item h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; margin: 0 0 0.15rem; color: var(--ink); }
.dgp-print-item .prose-sm p { margin: 0.15rem 0; }
.dgp-print-update { margin: 0.25rem 0 0; font-size: 0.92rem; }
@media print { .dgp-print .dgp-print-page { padding: 0; max-width: none; font-size: 10pt; } }

/* Study */
.dgs-overview { display: grid; gap: 1rem 1.5rem; }
.dgs-cover { width: 9rem; height: auto; border: 1px solid var(--rule); box-shadow: 0 4px 14px rgba(16,35,51,0.12); }
.dgs-title { margin: 0.2rem 0; font-size: 2.1rem; font-style: italic; }
.dgs-author { margin: 0; font-family: var(--font-display); font-size: 1.25rem; color: var(--navy-mid); }
.dgs-progress { height: 0.45rem; background: var(--rule); margin: 0.75rem 0 0.35rem; max-width: 22rem; }
.dgs-progress span { display: block; height: 100%; background: var(--gold); }
.dgs-description { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 0.75rem; }
.dgs-description h3 { margin-top: 0; }
.dgs-sessions { counter-reset: none; }
.dgs-session { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.75rem; align-items: start; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.dgs-session p { margin: 0.1rem 0 0; }
.dgs-num { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--navy); font-family: var(--font-display); font-size: 1.15rem; font-style: italic; }
.dgs-session.is-past .dgs-num { background: var(--gold); color: var(--navy-deep); }
.dgs-session.is-next { background: var(--paper); box-shadow: inset 3px 0 0 var(--flame); padding-left: 0.5rem; }
.dgs-session-title { font-weight: 600; color: var(--navy); text-decoration: none; }
.dgs-session-title:hover { color: var(--flame); }
.dgs-locked { color: var(--muted); font-style: italic; }
.dgs-read { color: #2f6b3a; font-weight: 600; }
.dgs-list li.is-current a { font-weight: 700; }
.dgs-session-head { margin-bottom: 1rem; }
.dgs-reading { margin: 0.3rem 0 0; }
.dgs-summary { border-color: var(--gold); }
.dgs-q { scroll-margin-top: calc(var(--chrome-h, 6rem) + 1rem); }
.dgs-q-text { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.3; color: var(--navy); }
.dgs-q-text p { margin: 0.2rem 0 0.6rem; }
.dgs-group-answer { margin-top: 0.5rem; padding: 0.75rem 1rem; background: var(--paper); border-left: 2px solid var(--gold); }
.section-paper .dgs-group-answer { background: #fff; }
.dgs-edit-answer { margin-top: 0.6rem; }
.dgs-edit-answer > summary { list-style: none; display: inline-flex; }
.dgs-edit-answer > summary::-webkit-details-marker { display: none; }
.dgs-edit-answer[open] > summary { margin-bottom: 0.6rem; }
.dgs-versions { margin-top: 0.6rem; }
.dgs-version { padding: 0.4rem 0; border-top: 1px dashed var(--rule); }
.dgs-version p { margin: 0.1rem 0; }
.dgs-private-note { color: var(--navy-mid); margin: 0.2rem 0 0.4rem; }
.dgs-response { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.55rem 0; border-top: 1px dashed var(--rule); }
.dgs-response.is-hidden { opacity: 0.55; }
.dgs-response-body { min-width: 0; flex: 1; }
.dgs-response-body > p { margin: 0; }
.dgs-response-body .prose-sm p { margin: 0.15rem 0; }
.dgs-respond { margin-top: 0.6rem; }
.dgs-respond textarea { width: 100%; }
.dgs-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; }
.dgs-pager a { color: var(--navy); }
.dgs-q-row { display: grid; grid-template-columns: 3.5rem 1fr; gap: 0 0.75rem; align-items: start; padding: 0.6rem 0; border-bottom: 1px dashed var(--rule); }
.dgs-q-row > .field:last-child { grid-column: 2; }
.dgs-q-pos input { width: 3.2rem; margin-top: 1.7rem; }
.dgs-q-row.is-new .dgs-q-body span { color: var(--muted); }
.dgs-lib-session h3 { margin: 0.2rem 0 0.4rem; font-style: italic; }
.dgs-lib-session ol { margin: 0.4rem 0 0; padding-left: 1.3rem; }
.dgs-lib-search { flex: 1; margin: 0; }
.dgs-lib-search input { width: 100%; }
.dgs-card-cover { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 0.4rem; border: 1px solid var(--rule); }
@media (min-width: 640px) {
  .dgs-overview:has(.dgs-cover) { grid-template-columns: 9rem 1fr; }
}

/* Meeting mode (full screen, for a TV) */
body.dgm-meeting { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--navy-deep); color: var(--cream); }
.dgm-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; justify-content: space-between; padding: 0.6rem 1.25rem; background: var(--navy); font-size: 0.9rem; }
.dgm-bar a { color: var(--cream); }
.dgm-bar-title { font-weight: 600; letter-spacing: 0.02em; }
.dgm-count { color: var(--gold); font-weight: 600; }
.dgm-stage { flex: 1; width: 100%; max-width: 70rem; margin: 0 auto; padding: 2rem 1.5rem; }
.dgm-slide { padding: 1.5rem 0 2.5rem; border-bottom: 1px solid rgba(246,241,231,0.15); }
.dgm-js .dgm-slide { border: 0; min-height: 50vh; display: flex; flex-direction: column; justify-content: center; }
.dgm-slide[hidden] { display: none !important; }
.dgm-slide .eyebrow { color: var(--gold); }
.dgm-slide h1 { color: var(--cream); font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem); font-style: italic; margin: 0.3rem 0; }
.dgm-reading { font-size: clamp(1.3rem, 1rem + 1.5vw, 2rem); color: var(--gold); margin: 0.3rem 0 1rem; }
.dgm-notes { max-width: 50rem; font-size: 1.15rem; color: rgba(246,241,231,0.85); }
.dgm-question { font-family: var(--font-display); font-size: clamp(2rem, 1.2rem + 3.2vw, 4rem); line-height: 1.2; color: var(--cream); }
.dgm-question p { margin: 0.3rem 0 1rem; }
.dgm-slide.is-discussed .dgm-question { color: rgba(246,241,231,0.7); }
.dgm-answers { margin: 0.5rem 0 1rem; max-width: 55rem; font-size: 1.1rem; }
.dgm-answers > summary { cursor: pointer; color: var(--gold); }
.dgm-answers li { padding: 0.3rem 0; }
.dgm-discussed { margin-top: 0.5rem; }
.dgm-nav { position: sticky; bottom: 0; display: flex; justify-content: center; gap: 1rem; padding: 0.75rem; background: rgba(16,35,51,0.92); }
.dgm-nav[hidden] { display: none; }
.dgm-nav .btn:disabled { opacity: 0.35; cursor: default; }
.dgm-summary { background: var(--cream); color: var(--ink); padding: 0.75rem 1.25rem 1rem; }
.dgm-summary textarea { width: 100%; margin: 0.5rem 0; font: inherit; padding: 0.6rem; border: 1px solid var(--rule); }
/* v1.24: the summary is the bottom third of the screen; the questions scroll on their own above it. */
.dgm-sum-head { display: flex; align-items: baseline; gap: 0.4rem 1rem; flex-wrap: wrap; }
.dgm-sum-title { font-weight: 600; color: var(--navy); }
.dgm-sum-toggle { margin-left: auto; }
.dgm-sum-toggle[hidden], .dgm-sum-grip[hidden] { display: none; }
body.dgm-meeting.dgm-js { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.dgm-js .dgm-top { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.dgm-js .dgm-stage { flex: 1 0 auto; display: flex; flex-direction: column; padding-top: 1rem; padding-bottom: 1rem; }
.dgm-js .dgm-slide { flex: 1 0 auto; min-height: 0; }
.dgm-js .dgm-summary { flex: 0 0 auto; height: var(--dgm-sum-h, 33.333vh); min-height: 7.5rem; max-height: 85vh; display: flex; flex-direction: column;
  position: relative; padding-top: 0.9rem; box-shadow: 0 -3px 12px rgba(0,0,0,0.35); }
.dgm-js .dgm-sum-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.dgm-js .dgm-summary textarea { flex: 1 1 auto; min-height: 3rem; resize: none; font-size: 1.1rem; line-height: 1.45; }
.dgm-js .dgm-summary .btn-row { flex: 0 0 auto; margin: 0; }
.dgm-js .dgm-summary.is-collapsed { height: auto; min-height: 0; padding-bottom: 0.6rem; }
.dgm-js .dgm-summary.is-collapsed .dgm-sum-body { display: none; }
.dgm-sum-grip { position: absolute; top: 0; left: 0; right: 0; height: 0.8rem; cursor: ns-resize; touch-action: none; }
.dgm-sum-grip::before { content: ""; position: absolute; left: 50%; top: 0.25rem; width: 3.5rem; height: 0.3rem; margin-left: -1.75rem; border-radius: 999px; background: var(--rule); }
.dgm-sum-grip:hover::before, .dgm-sum-grip:focus-visible::before, .dgm-summary.is-dragging .dgm-sum-grip::before { background: var(--gold); }
.dgm-sum-grip:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.dgm-summary.is-collapsed .dgm-sum-grip { display: none; }
body.dgm-dragging { cursor: ns-resize; user-select: none; }
@media (max-width: 40rem) {
  .dgm-js .dgm-summary { padding-left: 0.75rem; padding-right: 0.75rem; }
  .dgm-js .dgm-summary .btn-row > .small { display: none; }
}

/* v1.9.1: compact prayer rows — many requests on one screen */
.dgp-rows { margin: 0; border-top: 1px solid var(--rule); }
ul.plain.dgp-rows li.dgp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 1rem; align-items: center;
  padding: 0.5rem 0.25rem 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); border-left: 3px solid var(--flame); }
.dgp-row:hover { background: var(--paper); }
.dgp-row-ongoing { border-left-color: var(--navy-mid) !important; }
.dgp-row-answered { border-left-color: #2f6b3a !important; }
.dgp-row-closed { border-left-color: var(--rule) !important; }
.dgp-row-main { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.5rem; line-height: 1.35; }
.dgp-row-title { font-weight: 600; color: var(--navy); text-decoration: none; }
.dgp-row-title:hover { color: var(--flame); text-decoration: underline; }
.dgp-row-preview { flex: 1 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; color: var(--muted); }
.dgp-row-preview.is-answer { color: #2f6b3a; }
.dgp-row-meta { flex-basis: 100%; font-size: 0.78rem; color: var(--muted); }
.dgp-row-meta strong { color: var(--navy); font-weight: 600; }
.dgp-new { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--flame); }
.dgp-row-side { display: flex; align-items: center; gap: 0.75rem; white-space: nowrap; font-size: 0.8rem; color: var(--muted); }
.dgp-row-side a { color: var(--navy); }
.dgp-row .dgp-pray .btn { min-height: 1.9rem; padding: 0 0.7rem; }
.dgp-row .dgp-prayed-done { font-size: 0.8rem; }
/* Phones: one compact two-line row — title and who/when on the left, count and "I prayed" on the right.
   The preview is left out (it's on the request page). */
@media (max-width: 639px) {
  ul.plain.dgp-rows li.dgp-row { grid-template-columns: minmax(0, 1fr) auto; gap: 0 0.6rem; padding: 0.45rem 0.2rem 0.45rem 0.6rem; }
  .dgp-row-main { display: block; }
  .dgp-row-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.98rem; }
  .dgp-row-preview { display: none; }
  .dgp-new { display: none; }
  .dgp-row-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.74rem; }
  .dgp-row-side { flex-direction: column; align-items: flex-end; gap: 0.15rem; font-size: 0.7rem; }
  .dgp-row-counts a { display: none; }
  .dgp-row .dgp-pray .btn { min-height: 1.75rem; padding: 0 0.55rem; font-size: 0.62rem; letter-spacing: 0.08em; }
  .dgp-row .dgp-prayed-done { font-size: 0.7rem; }
  .dgp-views a { padding: 0.4rem 0.55rem; }
  .dg-tabs a { padding: 0.5rem 0.6rem; }
  .dgp-page-tools { gap: 0.4rem; }
  .dgp-page-tools .btn { padding: 0 0.7rem; }
}
@media (min-width: 640px) { .dgp-share-jump { display: none; } }
.dg-layout > * { min-width: 0; } /* long rows and scrolling tab bars never widen the page */

/* ---------- v1.10 Memory module (catechism & Scripture) ---------- */
.dgm-card { border-left: 3px solid var(--gold); }
.dgm-card.is-known { border-left-color: #2f6b3a; }
.dgm-front { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.25; color: var(--navy); margin: 0.2rem 0 0.6rem; }
.dgm-card-scripture .eyebrow { font-size: 0.85rem; }
.dgm-hint, .dgm-answer { margin: 0.4rem 0; }
.dgm-hint > summary, .dgm-answer > summary { cursor: pointer; color: var(--navy); font-weight: 600; font-size: 0.9rem; }
.dgm-hint p { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.06em; color: var(--muted); margin: 0.3rem 0; }
.dgm-back { font-size: 1.08rem; line-height: 1.55; margin: 0.4rem 0; padding: 0.6rem 0.9rem; background: #fff; border-left: 2px solid var(--gold); }
.dgm-card-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.dgm-sets { margin: 0; border-top: 1px solid var(--rule); }
ul.plain.dgm-sets li.dgm-set { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 0.7rem 0.25rem; border-bottom: 1px solid var(--rule); }
.dgm-set > div { min-width: 0; flex: 1; }
.dgm-set-title { font-weight: 600; color: var(--navy); text-decoration: none; margin-right: 0.5rem; }
.dgm-set-title:hover { color: var(--flame); text-decoration: underline; }
.dgm-progress { margin: 0.35rem 0 0.15rem; max-width: 16rem; }
.dgm-progress span { background: #2f6b3a; }
.dgm-upcoming li { padding: 0.2rem 0; }
.dgm-rows { margin: 0; border-top: 1px solid var(--rule); }
ol.plain.dgm-rows li.dgm-row { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 0 0.6rem; align-items: start;
  padding: 0.45rem 0.25rem; border-bottom: 1px solid var(--rule); }
.dgm-row-num { font-family: var(--font-display); font-size: 1.15rem; font-style: italic; color: var(--gold); text-align: right; padding-top: 0.05rem; }
.dgm-row-main > summary { cursor: pointer; list-style: none; line-height: 1.4; }
.dgm-row-main > summary::-webkit-details-marker { display: none; }
.dgm-row-front { color: var(--navy); font-weight: 600; }
.dgm-row-main[open] > summary { margin-bottom: 0.3rem; }
.dgm-row.is-known .dgm-row-front { color: var(--muted); font-weight: 400; }
.dgm-known-btn { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1.5px solid var(--rule); background: transparent; color: var(--muted);
  font-size: 1rem; cursor: pointer; line-height: 1; }
.dgm-known-btn[aria-pressed="true"] { background: #2f6b3a; border-color: #2f6b3a; color: #fff; }
.dgm-preview td { vertical-align: top; }
/* Practice page (full screen, like meeting mode) */
body.dgm-practice-page { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--navy-deep); color: var(--cream); }
.dgm-practice { flex: 1; width: 100%; max-width: 48rem; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.dgm-pcard { padding: 1.25rem 0 2rem; border-bottom: 1px solid rgba(246,241,231,0.15); }
.dgm-js .dgm-pcard { border: 0; min-height: 55vh; }
.dgm-pcard[hidden] { display: none !important; }
.dgm-pcard .eyebrow { color: var(--gold); }
.dgm-pfront { font-family: var(--font-display); font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.8rem); line-height: 1.2; margin: 0.3rem 0 1rem; color: var(--cream); }
.dgm-trans { font-family: var(--font-sans); font-size: 0.9rem; color: var(--gold); margin-left: 0.3rem; }
.dgm-pcard .dgm-hint > summary, .dgm-pcard .dgm-answer > summary { color: var(--gold); font-size: 1rem; }
.dgm-pcard .dgm-hint p { color: rgba(246,241,231,0.75); font-size: 1.35rem; }
.dgm-pcard .dgm-back { background: rgba(246,241,231,0.08); color: var(--cream); font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); border-left-color: var(--gold); }
.dgm-extra { color: rgba(246,241,231,0.7); }
.dgm-pknown { margin-top: 1rem; }
.dgm-empty { font-size: 1.2rem; text-align: center; margin-top: 3rem; }
@media (max-width: 639px) {
  .dgm-front { font-size: 1.35rem; }
  ul.plain.dgm-sets li.dgm-set { flex-wrap: wrap; }
}
@media (max-width: 639px) {
  .dgm-nav { gap: 0.5rem; }
  .dgm-nav .btn { white-space: nowrap; padding: 0 0.8rem; font-size: 0.72rem; }
  .dgm-upcoming li { font-size: 0.85rem; }
}
.dgm-upcoming .inline-form { white-space: nowrap; }

/* ---------- v1.11 Reading shelf and reader ---------- */
.dgr-shelf { display: grid; gap: 0; }
ul.plain.dgr-shelf li.dgr-doc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.25rem; align-items: center; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.dgr-doc-title { font-family: var(--font-display); font-size: 1.5rem; font-style: italic; color: var(--navy); text-decoration: none; margin-right: 0.5rem; }
.dgr-doc-title:hover { color: var(--flame); }
.dgr-doc-author { color: var(--navy-mid); }
.dgr-doc p { margin: 0.25rem 0; }
.dgr-progress { max-width: 22rem; margin: 0.5rem 0 0.25rem; }
.dgr-doc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.dgr-who { grid-column: 1 / -1; border-top: 1px dashed var(--rule); padding-top: 0.5rem; }
.dgr-who summary { cursor: pointer; color: var(--navy); font-weight: 600; }
.dgr-who li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule); }
@media (max-width: 639px) {
  ul.plain.dgr-shelf li.dgr-doc { grid-template-columns: 1fr; padding: 0.9rem 1rem; }
  .dgr-doc-side { flex-direction: row; align-items: center; justify-content: space-between; }
}
/* v1.14.1 covers ("album art") */
ul.plain.dgr-shelf li.dgr-doc.has-cover { grid-template-columns: auto minmax(0, 1fr) auto; }
.dg-cover-link { position: relative; display: block; align-self: start; line-height: 0; }
.dg-cover { width: 112px; height: 112px; object-fit: cover; object-position: top center; border-radius: 4px; background: var(--navy);
  box-shadow: 0 1px 2px rgba(24, 53, 73, 0.18), 0 4px 12px rgba(24, 53, 73, 0.14); }
.dg-cover-lg { width: 160px; height: 160px; }
.dg-cover-badge { position: absolute; right: 4px; bottom: 4px; line-height: 1; font-size: 0.85rem; background: rgba(24, 53, 73, 0.85);
  color: var(--cream); border-radius: 999px; padding: 0.2rem 0.3rem; }
.dg-cover-edit { display: flex; gap: 1rem; align-items: flex-start; }
.dg-cover-edit .help { margin-top: 0.35rem; }
@media (max-width: 639px) {
  ul.plain.dgr-shelf li.dgr-doc.has-cover { grid-template-columns: auto minmax(0, 1fr); }
  ul.plain.dgr-shelf li.dgr-doc.has-cover .dgr-doc-side { grid-column: 1 / -1; }
  .dg-cover { width: 76px; height: 76px; }
  .dg-cover-edit { flex-direction: column; }
}
.dgs-reading-link { margin: 0.35rem 0 0; }

/* The reader */
body.dgr-reader-page { margin: 0; background: #3b4148; color: var(--ink); }
.dgr-top { position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.dgr-bar { display: flex; align-items: center; gap: 0.5rem 0.75rem; flex-wrap: wrap;
  padding: calc(0.45rem + env(safe-area-inset-top)) 0.75rem 0.45rem; background: var(--navy); color: var(--cream); }
.dgr-back { color: var(--cream); text-decoration: none; font-size: 1.3rem; padding: 0 0.3rem; }
.dgr-title { flex: 1 1 8rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dgr-pageno { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; }
.dgr-pageno input { width: 3.6rem; padding: 0.2rem 0.3rem; font: inherit; text-align: center; border: 0; border-radius: 3px; }
.dgr-tools { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.dgr-tool { background: transparent; color: var(--cream); border: 1px solid rgba(246,241,231,0.45); padding: 0.25rem 0.55rem; font: inherit;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.3; }
.dgr-tool:hover, .dgr-tool:focus-visible { background: var(--cream); color: var(--navy); }
.dgr-tool[hidden] { display: none; }
.dgr-notice { margin: 0; padding: 0.5rem 0.9rem; background: #faf4e4; font-size: 0.9rem; }
.dgr-panel { background: var(--paper); padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--rule);
  max-height: 45vh; overflow: auto; }
.dgr-panel[hidden] { display: none; }
.dgr-search, .dgr-markform { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.dgr-search input, .dgr-markform input { flex: 1 1 12rem; padding: 0.4rem 0.5rem; font: inherit; border: 1px solid var(--rule); }
.dgr-results li, .dgr-marks li { padding: 0.3rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; }
.dgr-tts-row { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }
.dgr-tts-opt { font-size: 0.85rem; }
.dgr-tts-opt select { font: inherit; max-width: 14rem; }
.dgr-tts-now { margin: 0.45rem 0 0; font-size: 0.95rem; color: var(--navy); }
.dgr-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 8px 40vh; }
.dgr-loading { color: var(--cream); margin-top: 3rem; text-align: center; }
.dgr-loading a { color: var(--cream); }
.dgr-page { position: relative; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.35); flex: none; }
.dgr-page canvas { display: block; position: absolute; inset: 0; }
.dgr-page-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #c8c8c8; font-size: 2rem; }
.textLayer { position: absolute; inset: 0; overflow: hidden; line-height: 1; text-align: initial; -webkit-text-size-adjust: none; text-size-adjust: none;
  forced-color-adjust: none; transform-origin: 0 0; z-index: 2; }
.textLayer span, .textLayer br { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.textLayer ::selection { background: rgba(196, 163, 90, 0.4); }
.textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: -1; cursor: default; user-select: none; }

/* Listen buttons (read aloud) on ordinary pages */
.listen-btn[hidden] { display: none; }
.listen-btn { display: inline-flex; align-items: center; gap: 0.35rem; }
.listen-btn.is-speaking { background: var(--navy); color: var(--cream); border-color: var(--navy); }

/* ---------- v1.12 Read-along audiobooks ---------- */
.ra-badge { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.05rem 0.5rem; border-radius: 999px; vertical-align: middle;
  background: var(--rule); color: var(--navy); margin-left: 0.25rem; font-family: var(--font-sans); font-style: normal; }
.ra-badge-ready { background: #e3efe2; color: #2f5d2b; }
.ra-badge-draft { background: #fbe8d8; color: #8a3a0b; }
.ra-badge-audio { background: var(--navy); color: var(--cream); }
.ra-credit-short { color: var(--navy-mid); }
.ra-add { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ra-add select { font: inherit; max-width: 12rem; }
.ra-setup h2 { margin-top: 2rem; scroll-margin-top: calc(var(--chrome-h) + 1rem); }
.ra-steps { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.5rem 0 1rem; font-size: 0.92rem; }
.ra-steps a { color: var(--navy); }
.ra-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.ra-credit legend { font-weight: 700; color: var(--navy); }
.ra-lic-note { color: var(--navy-mid); min-height: 1em; margin: 0; }
.ra-checklist li { margin: 0.2rem 0; }
.ra-queue li { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding: 0.25rem 0; }
.ra-queue progress { width: 9rem; }
.ra-q-failed .ra-q-state { color: var(--flame); }
.ra-table-wrap { overflow-x: auto; }
.ra-tracks { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ra-tracks th { text-align: left; font-size: 0.8rem; color: var(--muted); font-weight: 600; padding: 0.3rem; }
.ra-tracks td { padding: 0.25rem 0.3rem; vertical-align: middle; }
.ra-tracks input { font: inherit; padding: 0.2rem 0.35rem; border: 1px solid var(--rule); width: 100%; min-width: 0; }
.ra-tracks .ra-no { width: 3.6rem; }
.ra-tracks input[data-ra-title] { min-width: 15rem; }
.ra-tracks input[data-ra-reader] { min-width: 9rem; }
.ra-tracks .ra-page { width: 4.8rem; }
.ra-tracks .ra-time { width: 5.2rem; }
.ra-tracks input.ra-guess { background: #fff6d6; border-color: var(--gold); }
.ra-introcell { white-space: nowrap; }
.ra-player-row td { padding-bottom: 0.6rem; border-bottom: 1px solid var(--rule); }
.ra-player-row audio { width: 100%; height: 2.2rem; }
.ra-dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
.ra-dl dt { font-weight: 600; color: var(--navy); }
.ra-dl dd { margin: 0; overflow-wrap: anywhere; }
.ra-chapters li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule); padding: 0.2rem 0; flex-wrap: wrap; }
@media (max-width: 40rem) { .ra-two { grid-template-columns: 1fr; } }

/* In the reader */
.ra-credits-card { width: min(100%, 900px); background: var(--paper); color: var(--ink); padding: 0.7rem 1rem; border-left: 4px solid var(--gold);
  box-shadow: 0 1px 6px rgba(0,0,0,0.35); }
.ra-credits-card p { margin: 0.15rem 0; }
.ra-credits-panel p { margin: 0.25rem 0; }
body.ra-has-player .dgr-pages { padding-bottom: calc(40vh + 9rem); }
.ra-player { position: fixed; left: 0; right: 0; bottom: var(--ra-bottom, 0px); z-index: 25; background: var(--navy-deep); color: var(--cream);
  padding: 0.45rem 0.9rem calc(0.45rem + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(0,0,0,0.35); }
.ra-player[hidden] { display: none; }
.ra-row { display: flex; align-items: center; gap: 0.5rem 0.75rem; flex-wrap: wrap; max-width: 60rem; margin: 0 auto; }
.ra-row + .ra-row { margin-top: 0.3rem; }
.ra-chapter { font: inherit; font-size: 0.92rem; max-width: min(100%, 26rem); background: var(--navy); color: var(--cream); border: 1px solid rgba(246,241,231,0.4); padding: 0.15rem 0.3rem; }
.ra-now { color: #d7d2c5; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 10rem; }
.ra-btn { background: transparent; color: var(--cream); border: 1px solid rgba(246,241,231,0.45); border-radius: 999px; font: inherit; font-size: 0.85rem;
  min-width: 2.6rem; height: 2.4rem; cursor: pointer; }
.ra-btn:hover, .ra-btn:focus-visible { background: var(--cream); color: var(--navy); }
.ra-play { min-width: 3rem; height: 3rem; font-size: 1.15rem; background: var(--flame); border-color: var(--flame); }
.ra-time { font-variant-numeric: tabular-nums; font-size: 0.85rem; min-width: 3.2rem; text-align: center; }
.ra-scrub { flex: 1 1 8rem; accent-color: var(--gold); min-width: 6rem; }
.ra-opt { font-size: 0.82rem; }
.ra-opt select { font: inherit; background: var(--navy); color: var(--cream); border: 1px solid rgba(246,241,231,0.4); }
.ra-link { background: none; border: 0; color: var(--cream); text-decoration: underline; font: inherit; font-size: 0.82rem; cursor: pointer; padding: 0; }
.ra-link[aria-pressed="true"] { text-decoration: none; color: var(--gold); }
.ra-link[aria-pressed="true"]::before { content: "✓ "; }
.ra-intro { max-width: 60rem; margin: 0.3rem auto 0; background: #2b4a60; padding: 0.3rem 0.6rem; font-size: 0.88rem; display: flex; gap: 0.75rem;
  align-items: center; justify-content: space-between; flex-wrap: wrap; border-radius: 3px; }
.ra-intro[hidden] { display: none; }
.ra-skip { background: var(--gold); color: var(--navy-deep); border: 0; border-radius: 999px; padding: 0.2rem 0.75rem; font: inherit; font-weight: 600; cursor: pointer; }
.ra-msg { max-width: 60rem; margin: 0.2rem auto 0; color: var(--gold); min-height: 0; }
.ra-msg:empty { display: none; }
.ra-note { max-width: 60rem; margin: 0.15rem auto 0; color: #b9b3a6; font-size: 0.75rem; }
.ra-more { display: none; }
.ra-back-chip { position: fixed; right: 1rem; bottom: calc(10.5rem + var(--ra-bottom, 0px)); z-index: 26; background: var(--gold); color: var(--navy-deep); border: 0;
  border-radius: 999px; padding: 0.45rem 1rem; font: inherit; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.35); cursor: pointer; }
.ra-back-chip[hidden] { display: none; }
@media (max-width: 40rem) {
  .ra-player { padding-left: 0.6rem; padding-right: 0.6rem; }
  .ra-note { display: none; }
  .ra-row-opts { gap: 0.3rem 0.7rem; }
  .ra-back-chip { bottom: calc(7.5rem + var(--ra-bottom, 0px)); }
  /* v1.13: on phones the play row comes first and the settings fold away behind ⋯, so ▶ is always in view. */
  .ra-more { display: inline-block; min-width: 2.2rem; }
  .ra-player:not(.is-open) .ra-row-opts, .ra-player:not(.is-open) .ra-now { display: none; }
  .ra-row-top .ra-chapter { max-width: 100%; flex: 1 1 100%; font-size: 0.85rem; }
  .ra-time { min-width: 2.4rem; font-size: 0.78rem; }
  .ra-scrub { min-width: 3rem; }
  .ra-row-main { flex-wrap: nowrap; gap: 0.4rem; }
}
@media (prefers-reduced-motion: reduce) { .ra-player * { transition: none !important; } }

/* ---------- v1.12.1 Reflowing text in the reader (books from RTF, Word, web pages, plain text) ---------- */
.dgt-pages { --dgt-scale: 1; }
.dgt-book { width: min(100%, 44rem); background: var(--paper); color: var(--ink); box-shadow: 0 1px 6px rgba(0,0,0,0.35);
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 3rem; font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: calc(1.3rem * var(--dgt-scale)); line-height: 1.55; }
.dgt-page { position: relative; padding-top: 1.6rem; scroll-margin-top: 4rem; }
.dgt-page + .dgt-page { border-top: 1px dashed var(--rule); margin-top: 1rem; }
.dgt-page::before { content: "p. " attr(data-n); position: absolute; top: 0.25rem; right: 0; font-family: var(--font-sans);
  font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.dgt-page p { margin: 0 0 0.8em; text-align: left; hyphens: auto; }
.dgt-page h1 { font-size: 1.9em; font-style: italic; color: var(--navy); margin: 0.6em 0 0.3em; line-height: 1.15; text-align: center; }
.dgt-page h2 { font-size: 1.45em; color: var(--navy); margin: 0.8em 0 0.5em; line-height: 1.2; }
.dgt-page h3 { font-size: 1.2em; color: var(--navy-mid); margin: 0.9em 0 0.4em; }
.dgt-page h4 { font-size: 1.05em; font-style: italic; margin: 0.8em 0 0.3em; }
.dgt-page blockquote { margin: 0 0 0.8em 1.5em; padding-left: 0.8em; border-left: 3px solid var(--rule); }
.dgt-page .dgt-li { padding-left: 1.2em; text-indent: -0.9em; }
.dgt-page .dgt-li::before { content: "• "; }
.dgt-page hr { border: 0; text-align: center; margin: 1.2em 0; }
.dgt-page hr::after { content: "⁂"; color: var(--muted); }
.dgt-page sup { font-size: 0.7em; }
@media (max-width: 40rem) { .dgt-book { font-size: calc(1.2rem * var(--dgt-scale)); box-shadow: none; } }
.ra-preview { display: flex; justify-content: center; background: #3b4148; padding: 1rem 0.5rem; margin-top: 1rem; }

/* ---------- v1.13 Word-by-word read-along ---------- */
.ra-code { background: var(--paper); border: 1px solid var(--rule); padding: 0.5rem 0.75rem; font-size: 0.85rem; overflow-x: auto; white-space: pre; }
.ra-q { font-weight: 700; }
.ra-q-good { color: #2f5d2b; }
.ra-q-check { color: var(--flame); }
.ra-sync-table td { vertical-align: top; }
::highlight(ra-word) { background-color: #ffe08a; color: inherit; }
::highlight(ra-sentence) { background-color: #fff4cf; }
.ra-hl { position: absolute; pointer-events: none; background: rgba(255, 214, 92, 0.55); border-radius: 2px; mix-blend-mode: multiply; z-index: 3; }
.ra-hl-s { background: rgba(255, 236, 170, 0.45); }
.dgt-book { position: relative; }
.ra-tappable .dgt-book, .ra-tappable .dgr-page { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .ra-hl { transition: none; } }

/* ---------- v1.14 LibriVox import, even volume, splitting, sentences, offline ---------- */
.ra-inline { display: flex; gap: 0.5rem; align-items: center; }
.ra-inline input { flex: 1; min-width: 0; }
.ra-tasks ol, .ra-tasks p { margin: 0; }
.ra-task { padding: 0.15rem 0; }
.ra-task-working, .ra-task-queued { color: var(--navy); font-weight: 600; }
.ra-task-failed { color: var(--flame); }
.ra-tools { gap: 1rem; margin-top: 1rem; }
.ra-tools textarea { width: 100%; font: inherit; font-size: 0.9rem; }
.ra-hl-ghost { background: transparent; }
.ra-offline { max-width: 60rem; margin: 0.3rem auto 0; color: var(--cream); }
.ra-offline .linklike { color: var(--gold); }
@media (max-width: 40rem) { .ra-player:not(.is-open) .ra-offline { display: none; } }

/* ---------- v1.13.2 Reading pages beside the recordings ---------- */
.ra-pane { position: fixed; top: 0; right: 0; bottom: 0; width: min(30rem, 100vw); z-index: 60; background: var(--paper);
  box-shadow: -4px 0 18px rgba(0,0,0,0.25); display: flex; flex-direction: column; }
.ra-pane[hidden] { display: none; }
.ra-pane-bar { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.7rem 0.9rem; background: var(--navy); color: var(--cream); }
.ra-pane-bar .muted { color: #c9c3b6; }
.ra-pane-close { margin-left: auto; color: var(--cream); font-size: 1.1rem; }
.ra-pane-tools { display: flex; gap: 0.5rem; padding: 0.5rem 0.9rem 0; align-items: center; }
.ra-pane-tools input[type=search] { flex: 1; font: inherit; padding: 0.3rem 0.5rem; border: 1px solid var(--rule); }
.ra-pane-go { width: 4.5rem; font: inherit; padding: 0.2rem 0.3rem; border: 1px solid var(--rule); }
.ra-pane-for { margin: 0.4rem 0.9rem; color: var(--navy); }
.ra-pane-hits { margin: 0 0.9rem; padding-left: 0; max-height: 9rem; overflow-y: auto; font-size: 0.82rem; }
.ra-pane-hits li { padding: 0.15rem 0; border-bottom: 1px solid var(--rule); }
.ra-pane-pages { position: relative; flex: 1; overflow-y: auto; background: #3b4148; padding: 0.6rem; }
.ra-pane-pages .dgt-book { width: 100%; font-size: 1rem; padding: 0.5rem 1rem 2rem; }
.ra-pane-pages .dgt-page::before { content: none; }
.ra-pane-pagebar { display: flex; align-items: center; gap: 0.5rem; margin: 0 -0.25rem 0.4rem; padding: 0.3rem 0.4rem; background: #efe9dc;
  font-family: var(--font-sans); font-size: 0.8rem; position: sticky; top: -0.6rem; z-index: 1; }
.ra-pane-pno { font-weight: 700; color: var(--navy); }
.ra-pane-starts { color: var(--flame); font-weight: 600; flex: 1; }
.ra-pane-pagebar .btn { margin-left: auto; padding: 0.15rem 0.6rem; font-size: 0.72rem; }
.ra-pane-isstart .ra-pane-pagebar { background: #fbe8d8; }
.ra-pane-flash { outline: 3px solid var(--gold); outline-offset: 2px; }
.ra-row-active td { background: #fff6d6; }
.ra-pagecell { white-space: nowrap; }
@media (min-width: 70rem) { body.ra-pane-on .ra-setup { margin: 0 31rem 0 1.5rem; max-width: none; } }

/* ---------- v1.15 Library tabs and the documents not yet in it ---------- */
.lib-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 1.25rem; border-bottom: 1px solid var(--rule); }
.lib-tabs a { padding: 0.5rem 0; color: var(--navy); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.lib-tabs a[aria-current="page"] { border-bottom-color: var(--flame); }
.lib-unshared { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.lib-unshared th, .lib-unshared td { text-align: left; padding: 0.5rem 0.5rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.lib-unshared th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
@media (max-width: 639px) {
  .lib-unshared thead { display: none; }
  .lib-unshared tr { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
  .lib-unshared td { border: 0; padding: 0; }
  .lib-unshared td:last-child { grid-row: 1 / span 3; grid-column: 2; align-self: center; }
}

/* ---------- v1.16: "Who can see this?" bands and notes (src/audience.php) ---------- */
.audience { --aud-ink: #183549; --aud-bg: #eef2f5; --aud-rule: #183549; background: var(--aud-bg); color: var(--aud-ink); border-bottom: 1px solid var(--rule); border-top: 4px solid var(--aud-rule); }
.audience-elders { --aud-ink: #6e1a0e; --aud-bg: #fbecea; --aud-rule: #a3230b; }
.audience-officers { --aud-ink: #5b3b05; --aud-bg: #faf1dc; --aud-rule: #b7791f; }
.audience-office { --aud-ink: #183549; --aud-bg: #eaf0f4; --aud-rule: #24485f; }
.audience-congregation { --aud-ink: #1f4d2a; --aud-bg: #eef5ec; --aud-rule: #2f6b3a; }
.audience-group { --aud-ink: #0f4a4a; --aud-bg: #e8f3f2; --aud-rule: #1d7472; }
.audience-inner { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.9rem 0; }
/* v1.16 rev. 2: collapsible band — the summary (label + who) always shows; the rest opens beneath */
.audience-summary { cursor: pointer; list-style: none; }
.audience-summary::-webkit-details-marker { display: none; }
.audience-head { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.audience-head .audience-line { margin: 0.1rem 0 0; }
.audience-toggle { flex: none; align-self: center; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--aud-rule); border: 1px solid currentColor; border-radius: 3px; padding: 0.2rem 0.55rem; white-space: nowrap; }
.audience-toggle::after { content: ""; display: inline-block; margin-left: 0.4rem; width: 0.4rem; height: 0.4rem; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: translateY(-0.15rem) rotate(45deg); transition: transform 0.15s; }
.audience-box[open] .audience-toggle::after { transform: translateY(0.05rem) rotate(-135deg); }
.audience-box[open] .when-closed, .audience-box:not([open]) .when-open { display: none; }
.audience-summary:focus-visible { outline: 2px solid var(--aud-rule); outline-offset: 2px; }
.audience-body { padding: 0 0 0.9rem calc(22px + 0.85rem); margin-top: -0.4rem; }
/* rev. 3: the collapsed bar is one slim line — label and "who" side by side, smaller padding, the who-line cut short with … */
.audience-box:not([open]) .audience-summary { padding: 0.2rem 0; align-items: center; gap: 0.6rem; }
.audience-box:not([open]) .audience-head { flex-direction: row; align-items: baseline; gap: 0.6rem; overflow: hidden; }
.audience-box:not([open]) .audience-head .audience-label { margin: 0; flex: none; }
.audience-box:not([open]) .audience-head .audience-line { margin: 0; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audience-box:not([open]) .audience-icon { margin-top: 0; }
.audience-box:not([open]) .audience-icon svg { width: 16px; height: 16px; }
.audience-box:not([open]) .audience-toggle { font-size: 0.68rem; padding: 0 0.4rem; line-height: 1.5; }
.audience:has(.audience-box:not([open])) { border-top-width: 3px; }
@media (max-width: 640px) {
  /* On a phone the label alone ("Elders only", "The whole congregation") says who; the full line is under Details. */
  .audience-box:not([open]) .audience-head .audience-line { display: none; }
}
@media (max-width: 640px) {
  .audience-toggle { font-size: 0.7rem; padding: 0.15rem 0.4rem; }
  .audience-body { padding-left: 0; }
}
.audience-icon { flex: none; display: inline-flex; color: var(--aud-rule); margin-top: 0.1rem; }
.audience-text { min-width: 0; }
.audience-label { margin: 0 0 0.15rem; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--aud-rule); }
.audience-line { margin: 0.1rem 0 0; font-size: 0.95rem; line-height: 1.45; }
.audience-extra { font-style: italic; }
.audience-people { margin-top: 0.35rem; font-size: 0.92rem; }
.audience-people summary { cursor: pointer; font-weight: 600; color: var(--aud-rule); }
.audience-people ul { margin: 0.35rem 0 0.25rem; padding-left: 1.2rem; columns: 2 14rem; }
.audience-note { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 1rem; padding: 0.7rem 0.85rem; font-size: 0.93rem; line-height: 1.45;
  background: var(--aud-bg, #eef2f5); color: var(--aud-ink, #183549); border-left: 4px solid var(--aud-rule, #183549); }
.audience-note.audience-elders { --aud-ink: #6e1a0e; --aud-bg: #fbecea; --aud-rule: #a3230b; }
.audience-note.audience-officers { --aud-ink: #5b3b05; --aud-bg: #faf1dc; --aud-rule: #b7791f; }
.audience-note.audience-office, .audience-note.audience-email { --aud-ink: #183549; --aud-bg: #eaf0f4; --aud-rule: #24485f; }
.audience-note.audience-congregation { --aud-ink: #1f4d2a; --aud-bg: #eef5ec; --aud-rule: #2f6b3a; }
.audience-note .audience-icon svg { width: 18px; height: 18px; }
.vis-help { margin: -0.25rem 0 1rem; padding-left: 1.1rem; font-size: 0.9rem; color: var(--muted); }
.vis-help li { margin: 0.15rem 0; }
.audience-tag { display: inline-block; padding: 0 0.4rem; border: 1px solid currentColor; border-radius: 3px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.audience-tag-elders { color: #a3230b; }
.audience-tag-officers { color: #8a5a0b; }
@media (max-width: 640px) {
  .audience-inner { padding: 0.75rem 0; }
  .audience-line { font-size: 0.9rem; }
}
@media print {
  .audience { border: 2px solid #000; background: none; color: #000; }
}

/* v1.17 The Library for every member: spotlight, Continue, search, My reading */
.dg-cover-sm { width: 64px; height: 64px; }
.ra-badge-spot { background: #fbf1d3; color: #7a5300; }
.lib-spot { display: flex; gap: 1.5rem; align-items: flex-start; margin: 0 0 1.75rem; border-color: var(--gold); border-left: 4px solid var(--gold); }
.lib-spot-cover { line-height: 0; flex: none; }
.lib-spot-text { min-width: 0; }
.lib-spot-text .eyebrow { margin: 0 0 0.25rem; }
.section .lib-spot-title { margin: 0 0 0.15rem; font-size: 1.9rem; }
.lib-spot-text p { margin: 0 0 0.5rem; }
.lib-continue { margin: 0 0 1.75rem; }
.section .lib-continue h2 { font-size: 1.5rem; margin: 0 0 0.6rem; }
.lib-continue-list { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.lib-continue-list li.panel { padding: 0.75rem; margin: 0; }
.lib-continue-link { display: flex; gap: 0.8rem; align-items: center; text-decoration: none; color: inherit; }
.lib-continue-link:hover .dgr-doc-title { color: var(--flame); }
.lib-continue-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1; }
.lib-continue-body .dgr-doc-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; }
.lib-continue-body .dgr-progress { margin: 0.3rem 0 0; max-width: none; display: block; }
.lib-search { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.lib-search input[type="search"] { font: inherit; padding: 0.4rem 0.6rem; border: 1px solid var(--rule); min-width: 15rem; background: var(--paper); }
.dgr-doc-side form { margin: 0; }
/* v1.17.1 The church's printed library (Libib), at the top of the Library */
.lib-shelves { display: flex; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 1rem 1.25rem; margin: 0 0 1.75rem; }
.lib-shelves-text { flex: 1 1 22rem; min-width: 0; }
.section .lib-shelves-title { font-size: 1.35rem; margin: 0 0 0.3rem; }
.lib-shelves-text p { margin: 0; }
.lib-shelves .btn { flex: none; }
.highlight.lib-spot-card { flex-direction: row; align-items: center; gap: 1rem; margin-bottom: 0.75rem; background: var(--navy);
  border-left: 4px solid var(--gold); }
.lib-spot-card-text { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.highlight.lib-spot-card .feed-excerpt { color: rgba(246, 241, 231, 0.85); }
.highlight.lib-spot-card .eyebrow { color: var(--gold); margin: 0; }
@media (max-width: 639px) {
  .lib-spot { flex-direction: column; gap: 0.9rem; }
  .lib-search input[type="search"] { min-width: 0; flex: 1; }
}

/* v1.17 The recordings on a book's set-up page: one card each, so every detail shows in full */
.ra-setup { max-width: 60rem; }
.ra-trk-list { display: grid; gap: 0.9rem; margin: 0.75rem 0 1rem; counter-reset: none; }
.ra-trk { border: 1px solid var(--rule); background: var(--paper); padding: 0.85rem 1rem 0.9rem; border-radius: 4px; }
.ra-trk.ra-row-active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25); }
.ra-trk label > span, .ra-trk-cell > label, .ra-trk-label { display: block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.2rem; }
.ra-trk input, .ra-trk textarea { font: inherit; padding: 0.3rem 0.45rem; border: 1px solid var(--rule); background: #fff; width: 100%; min-width: 0; box-sizing: border-box; }
.ra-trk textarea { resize: none; overflow: hidden; line-height: 1.35; }
.ra-trk textarea[data-ra-title] { font-weight: 600; color: var(--navy); }
.ra-trk-head { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: start; }
.ra-trk-del { margin-top: 1.55rem; }
.ra-trk-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr); gap: 0.75rem; margin: 0.7rem 0 0.6rem; align-items: start; }
.ra-trk-cell .small { display: block; margin-top: 0.2rem; line-height: 1.3; }
.ra-inline-sm { display: flex; gap: 0.35rem; align-items: center; }
.ra-inline-sm input { width: 5.5rem; flex: none; }
.ra-inline-sm .btn { padding: 0.3rem 0.6rem; }
.ra-trk-facts { display: flex; flex-direction: column; gap: 0.1rem; padding-top: 0.3rem; }
.ra-trk audio { width: 100%; height: 2.4rem; display: block; }
.ra-trk input.ra-guess { background: #fff6d6; border-color: var(--gold); }
.ra-trk-preview { margin-top: 0.75rem; border-top: 1px dashed var(--rule); padding-top: 0.6rem; }
.ra-trk-preview-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.5rem; }
.ra-trk-preview canvas { display: block; max-width: 100%; border: 1px solid var(--rule); background: #fff; box-shadow: 0 2px 8px rgba(24, 53, 73, 0.12); }
@media (max-width: 760px) {
  .ra-trk-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ra-trk-reader { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .ra-trk-head { grid-template-columns: 3.8rem minmax(0, 1fr); }
  .ra-trk-del { grid-column: 1 / -1; justify-self: end; margin: 0; }
  .ra-trk-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ v1.18 Photo gallery */
.gal-filter { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.gal-filter input[type=search] { min-width: 14rem; padding: .45rem .6rem; border: 1px solid var(--rule); background: #fff; font: inherit; }
.gal-filter select { padding: .45rem .5rem; border: 1px solid var(--rule); background: #fff; font: inherit; }
.gal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; }
.gal-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.gal-card:hover, .gal-card:focus-visible { box-shadow: 0 6px 18px rgba(16, 35, 51, .14); transform: translateY(-2px); }
.gal-card-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--paper); overflow: hidden; }
.gal-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-card-empty { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; }
.gal-card-body { display: flex; flex-direction: column; gap: .2rem; padding: .7rem .85rem .85rem; }
.gal-card-body strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--navy); line-height: 1.2; }
.gal-card-sm .gal-card-body strong { font-size: 1.05rem; }
.gal-badge { position: absolute; left: .4rem; top: .4rem; background: var(--flame); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .45rem; border-radius: 2px; letter-spacing: .02em; }
.gal-badge.is-hidden { background: var(--muted); }
.gal-foot { margin-top: 2rem; }
.gal-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.gal-head > div:first-child { flex: 1 1 22rem; }
.gal-desc { margin-top: .4rem; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .4rem; }
@media (min-width: 900px) { .gal-grid { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); } }
.gal-thumb { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper); }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gal-thumb:hover img, .gal-thumb:focus-visible img { transform: scale(1.03); }
.gal-thumb:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; }
.gal-add { margin-bottom: 1.5rem; }
.gal-uploader .gal-drop { border: 2px dashed var(--rule); padding: 1.1rem; text-align: center; background: var(--paper); margin-top: .5rem; }
.gal-uploader .gal-drop.is-over { border-color: var(--navy); background: #eef2f5; }
.gal-queue { margin-top: .9rem; }
.gal-progress { height: .5rem; background: var(--paper); border: 1px solid var(--rule); }
.gal-progress span { display: block; height: 100%; width: 0; background: var(--navy); transition: width .2s; }
.gal-queue-list { max-height: 12rem; overflow: auto; margin: .4rem 0 0; padding-left: 1.1rem; }
.gal-queue-list .is-ok { color: #2f6b3a; }
.gal-queue-list .is-error { color: #a3230b; }
.gal-sort { margin: 0 0 .8rem; }
.gal-bulk { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; position: sticky; top: var(--chrome-h, 0); z-index: 5; margin-bottom: 1rem; }
.gal-bulk select { padding: .35rem .5rem; font: inherit; border: 1px solid var(--rule); background: #fff; max-width: 100%; }
.gal-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.gal-edit { background: #fff; border: 1px solid var(--rule); padding: .5rem; display: flex; flex-direction: column; gap: .35rem; }
.gal-edit.is-pending { border-color: var(--flame); }
.gal-edit.is-hidden { opacity: .65; }
.gal-edit-pick { position: relative; display: block; cursor: pointer; }
.gal-edit-pick input[type=checkbox] { position: absolute; z-index: 2; top: .45rem; right: .45rem; width: 1.3rem; height: 1.3rem; accent-color: var(--navy); }
.gal-edit-pick:has(input:checked) .gal-thumb { outline: 3px solid var(--navy); outline-offset: -3px; }
.gal-zoom { position: absolute; z-index: 2; bottom: .4rem; right: .4rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: rgba(16, 35, 51, .75); color: #fff; font-size: 1rem; cursor: pointer; }
.gal-edit input[type=text] { width: 100%; padding: .35rem .45rem; border: 1px solid var(--rule); font: inherit; font-size: .9rem; }
.gal-edit-meta, .gal-edit-actions { margin: 0; }
/* Photos with an announcement */
.gal-strip { display: grid; gap: .4rem; margin: 1.25rem 0; grid-template-columns: repeat(2, 1fr); }
.gal-strip.gal-n1 { grid-template-columns: 1fr; max-width: 40rem; }
.gal-strip.gal-n1 .gal-thumb { aspect-ratio: auto; }
.gal-strip.gal-n1 .gal-thumb img { height: auto; max-height: 34rem; object-fit: contain; background: var(--paper); }
@media (min-width: 640px) { .gal-strip.gal-n3 { grid-template-columns: repeat(3, 1fr); } .gal-strip.gal-n4 { grid-template-columns: repeat(4, 1fr); } }
.gal-inline { margin: 1.25rem 0; max-width: 40rem; }
.gal-inline .gal-thumb { aspect-ratio: auto; }
.gal-inline .gal-thumb img { height: auto; }
.gal-inline figcaption { font-size: .9rem; color: var(--muted); margin-top: .35rem; font-style: italic; }
.gal-album-link { display: flex; gap: 1rem; align-items: center; margin: 1.25rem 0; }
.gal-album-link .gal-card { max-width: 18rem; flex: 1 1 14rem; }
.list-row .gal-row-thumb { width: 4.5rem; height: 4.5rem; object-fit: cover; flex: none; border: 1px solid var(--rule); }
.post-photos-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; }
.post-photos-edit figure { margin: 0; background: #fff; border: 1px solid var(--rule); padding: .35rem; display: flex; flex-direction: column; gap: .3rem; }
.post-photos-edit img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.post-photos-edit input[type=text] { width: 100%; font: inherit; font-size: .85rem; padding: .25rem .35rem; border: 1px solid var(--rule); }
.post-photos-edit .tag { font-family: ui-monospace, Consolas, monospace; font-size: .75rem; color: var(--navy); }
/* The large view */
html.gal-lb-open { overflow: hidden; }
.gal-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 14, 20, .97); display: grid; grid-template-columns: 3.5rem 1fr 3.5rem; grid-template-rows: auto 1fr; color: #fff; }
.gal-lightbox[hidden] { display: none; }
.gal-lb-top { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: .75rem; padding: .6rem .8rem; }
.gal-lb-count { margin-right: auto; font-size: .9rem; opacity: .85; }
.gal-lb-btn { background: none; border: 1px solid rgba(255, 255, 255, .4); color: #fff; font: inherit; font-size: .9rem; padding: .35rem .7rem; cursor: pointer; text-decoration: none; }
.gal-lb-btn:hover, .gal-lb-btn:focus-visible { background: rgba(255, 255, 255, .15); }
.gal-lb-close { font-size: 1.1rem; line-height: 1; }
.gal-lb-nav { background: none; border: 0; color: #fff; font-size: 3rem; line-height: 1; cursor: pointer; opacity: .75; align-self: center; height: 100%; }
.gal-lb-nav:hover, .gal-lb-nav:focus-visible { opacity: 1; background: rgba(255, 255, 255, .06); }
.gal-lb-nav[hidden] { visibility: hidden; display: block; }
.gal-lb-fig { grid-column: 2; grid-row: 2; min-width: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; padding-bottom: 1rem; }
.gal-lb-fig img { max-width: 100%; max-height: calc(100vh - 7rem); max-height: calc(100dvh - 7rem); object-fit: contain; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.gal-lb-fig figcaption { margin-top: .6rem; text-align: center; max-width: 48rem; font-size: .95rem; opacity: .9; padding: 0 .5rem; }
@media (max-width: 640px) {
  .gal-lightbox { grid-template-columns: 0 1fr 0; }
  .gal-lb-nav { position: fixed; bottom: .5rem; height: auto; font-size: 2.5rem; padding: 0 1rem; }
  .gal-lb-prev { left: 0; }
  .gal-lb-next { right: 0; }
}
fieldset.panel-sub { border: 1px solid var(--rule); background: var(--paper); padding: .9rem 1rem 1rem; margin: 0; }
fieldset.panel-sub legend { padding: 0 .4rem; }
.gal-cards-pane { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .6rem; }

/* ---------- v1.19 Care calendar ---------- */
.care-h { font-size: 1.75rem; margin: 0 0 .6rem; }
.care-sub { font-family: var(--font-sans); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 .4rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.care-day { font-family: var(--font-sans); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); margin: 1.4rem 0 .4rem; padding-bottom: .3rem; border-bottom: 1px solid var(--rule); }
.care-slots { display: grid; gap: .5rem; }
.care-slot { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem .8rem; background: var(--cream); border: 1px solid var(--rule); text-decoration: none; color: inherit; }
a.care-slot:hover { border-color: var(--navy); }
a.care-slot:hover .care-slot-title { color: var(--flame); }
.care-slot.is-mine { border-left: 3px solid #2f6b3a; }
.care-slot-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.care-slot-title { font-weight: 600; color: var(--navy); }
.care-for { font-weight: 400; color: var(--muted); }
.care-kind { display: inline-block; width: 1.3em; }
.care-slot-places { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .15rem; }
.care-badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; padding: .1rem .45rem; border: 1px solid var(--rule); background: var(--paper); color: var(--muted); white-space: nowrap; }
.care-badge.is-open { border-color: var(--flame); color: var(--flame); background: #fff7f2; }
.care-badge.is-full { border-color: #2f6b3a; color: #1f4d2a; background: #eef5ec; }
.care-badge.is-mine { border-color: #2f6b3a; color: #fff; background: #2f6b3a; }
.care-badge.is-alert { border-color: #a3230b; color: #fff; background: #a3230b; }
.care-leg { font-size: .78rem; padding: .05rem .4rem; border: 1px solid var(--rule); background: var(--paper); }
.care-leg.is-open { border-color: var(--flame); color: var(--flame); }
.care-leg.is-full { color: #1f4d2a; }
.care-arranged { font-size: .78rem; color: var(--muted); font-style: italic; }
.care-coord-strip { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding: .8rem 1rem; margin-bottom: 1.5rem; background: #faf1dc; border-left: 3px solid #b7791f; }
.care-coord-strip p { margin: 0; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.care-mine { margin-bottom: 2rem; }
.care-toolbar { margin-top: .5rem; }
.care-toolbar .care-h { margin: 0; }
.care-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.care-filter select { height: 2.4rem; border: 1px solid var(--rule); background: #fff; padding: 0 .5rem; font: inherit; font-size: .95rem; }
.care-need-cards { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.care-need-card { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; border: 1px solid var(--rule); background: var(--cream); text-decoration: none; color: inherit; }
.care-need-card:hover { border-color: var(--gold); }
.care-need-name { font-family: var(--font-display); font-size: 1.4rem; color: var(--navy); }
.care-need-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.care-need-head p { margin: 0; }
.care-tasks { display: grid; gap: .7rem; }
.care-task, .care-occ { padding: .9rem 1rem; border: 1px solid var(--rule); background: var(--cream); }
.care-task p, .care-occ p { margin: 0 0 .3rem; }
.care-task-title { font-size: 1.05rem; }
.care-reqs { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .95rem; }
.care-reqs li { margin: .1rem 0; }
.care-dates { border-top: 1px solid var(--rule); }
.care-date { display: grid; grid-template-columns: 1fr; gap: .4rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.care-date.is-skipped { opacity: .6; }
.care-date.is-mine { background: #f2f8f0; }
.care-date-when { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.care-date-what { display: flex; flex-direction: column; gap: .25rem; }
.care-helpers { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.care-date-act { display: flex; align-items: center; }
@media (min-width: 768px) {
  .care-date { grid-template-columns: 11rem 1fr auto; align-items: start; padding: .7rem .5rem; }
}
.care-private { margin: 0 0 1.5rem; padding: 1rem 1.1rem; background: #faf1dc; border: 1px solid #e3cf9c; border-left: 3px solid #b7791f; }
.care-private h3 { margin: 0 0 .2rem; font-size: 1.35rem; color: #5b3b05; }
.care-private-why { color: #5b3b05; margin: 0 0 .6rem; }
.care-dl { display: grid; grid-template-columns: 1fr; gap: .1rem .9rem; margin: 0; }
.care-dl dt { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .5rem; }
.care-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .care-dl { grid-template-columns: 11rem 1fr; }
  .care-dl dt { margin-top: .1rem; }
}
.care-places { display: grid; gap: 1rem; }
.care-place { padding: .2rem 1rem 1rem; border: 1px solid var(--rule); background: var(--cream); }
.care-place.is-wanted { border-color: var(--flame); box-shadow: 0 0 0 1px var(--flame); }
.care-helper-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.care-helper-list > li { padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.care-edit, .care-assign, .care-cant { margin-top: .4rem; }
.care-edit summary, .care-assign summary, .care-cant summary, .care-past summary, .care-history summary { cursor: pointer; color: var(--navy); font-weight: 600; font-size: .92rem; }
.care-helper-form, .care-remove-form { margin-top: .6rem; }
[data-care-typed].is-off { opacity: .45; }
.care-offer .check { margin-bottom: .3rem; }
.care-offer .btn { margin-top: .4rem; }
.care-yours { border-left: 3px solid #2f6b3a; }
.care-inline-form + .care-inline-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.care-prevnext { display: flex; gap: 1rem; }
.care-prevnext a { color: var(--navy); }
.care-fieldset { border: 1px solid var(--rule); background: var(--paper); padding: .8rem 1rem .9rem; margin: .4rem 0 1rem; }
.care-fieldset legend { padding: 0 .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.care-kinds { display: flex; flex-wrap: wrap; gap: .4rem; }
.care-kind-pick { display: inline-flex; gap: .35rem; align-items: center; padding: .4rem .7rem; border: 1px solid var(--rule); background: #fff; cursor: pointer; }
.care-kind-pick:has(input:checked) { border-color: var(--navy); background: #eaf0f4; font-weight: 600; }
.care-weekdays { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.care-wd { display: inline-flex; gap: .3rem; align-items: center; padding: .35rem .6rem; border: 1px solid var(--rule); background: #fff; cursor: pointer; }
.care-wd:has(input:checked) { border-color: var(--navy); background: #eaf0f4; font-weight: 600; }
.care-consent { margin: .6rem 0; padding: .6rem .8rem; background: #eef5ec; border-left: 3px solid #2f6b3a; }
.care-pick-list { max-height: 18rem; overflow-y: auto; border: 1px solid var(--rule); background: #fff; padding: .4rem .8rem; margin-bottom: 1rem; }
.care-pick-list .check[hidden] { display: none; }
.care-share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.care-share input { flex: 1 1 16rem; min-width: 0; height: 2.4rem; border: 1px solid var(--rule); padding: 0 .6rem; font: inherit; font-size: .9rem; background: #fff; }
.mt-sm { margin-top: .8rem; }
.care-share-row { display: grid; gap: .4rem; }
.care-share-act { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (min-width: 640px) {
  .care-share-row { grid-template-columns: 1fr auto; align-items: center; }
}
.care-share-note { margin-bottom: 1rem; }
.care-past-list, .care-history-list { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .92rem; }
.care-history-list li, .care-past-list li { margin: .25rem 0; }
.care-table td { font-size: .92rem; }
.care-attention-line { display: block; padding: .6rem 0; text-decoration: none; color: var(--ink); font-size: .92rem; }
.care-attention-line:hover { color: var(--flame); }
.care-slots-pane .care-slot { padding: .55rem .6rem; }
.care-attention .care-slots { margin-top: .5rem; }
.care-task-form [hidden], .care-pick-list [hidden] { display: none !important; }
/* v1.19: signing up for several dates at once (need page) */
.care-pick-help { margin: 0 0 .6rem; }
.care-quick-pick { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .8rem; }
.care-quick-pick[hidden] { display: none; }
.care-picks { display: flex; flex-wrap: wrap; gap: .35rem; }
.care-pick { display: inline-flex; gap: .35rem; align-items: center; padding: .3rem .6rem; border: 1px solid var(--flame); color: var(--flame); background: #fff; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.care-pick.is-on, .care-pick:has(input:checked) { background: var(--flame); color: #fff; }
.care-date-act { flex-wrap: wrap; gap: .5rem; }
.care-date-link { color: var(--navy); }
.care-pick-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem 1rem; margin-top: 1rem; background: var(--navy); color: var(--cream); padding-bottom: calc(.7rem + env(safe-area-inset-bottom)); }
.care-pick-bar .btn[disabled] { opacity: .5; cursor: default; }
.care-claim-list { margin: 0 0 1rem; padding-left: 1.1rem; }
.care-claim-list li { margin: .3rem 0; }
/* v1.19 (rev. 2): the sign-up board — Care calendar and each need's page */
.care-board-help { margin: 0 0 .8rem; max-width: 46rem; }
.care-board .care-day { margin-top: 1.6rem; }
.care-board .care-day:first-of-type { margin-top: .4rem; }
.care-board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.care-row { display: grid; grid-template-columns: 5.2rem 1fr; gap: .4rem .9rem; padding: .8rem .9rem; background: var(--cream); border: 1px solid var(--rule); border-left: 3px solid var(--flame); }
.care-row.is-full { border-left-color: var(--rule); opacity: .75; }
.care-row.is-mine { border-left-color: #2f6b3a; background: #f2f8f0; }
.care-row-when { display: flex; flex-direction: column; line-height: 1.2; }
.care-row-when strong { font-size: 1.02rem; color: var(--navy); white-space: nowrap; }
.care-row-when span { font-size: .8rem; color: var(--muted); }
.care-row-main { min-width: 0; }
.care-row-main p { margin: 0; }
.care-row-title { font-weight: 600; color: var(--navy); }
.care-row-meta { font-size: .85rem; color: var(--muted); }
.care-row-reqs { font-size: .85rem; color: #5b3b05; margin-top: .15rem !important; }
.care-row-reqs::before { content: "ⓘ "; }
.care-row-picks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
@media (min-width: 768px) {
  .care-row { grid-template-columns: 6rem 1fr auto; align-items: center; }
  .care-row-picks { grid-column: auto; justify-content: flex-end; max-width: 26rem; }
}
.care-chip { position: relative; display: inline-flex; gap: .45rem; align-items: center; min-height: 2.6rem; padding: .3rem .85rem .3rem .6rem; border: 1.5px solid var(--flame); background: #fff; color: var(--flame); font-size: .92rem; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; }
label.care-chip:hover { background: #fff7f2; }
.care-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.care-chip-box { width: 1.15rem; height: 1.15rem; border: 1.5px solid currentColor; background: #fff; flex: none; display: inline-grid; place-items: center; }
.care-chip.is-on, .care-chip:has(input:checked) { background: var(--flame); color: #fff; }
.care-chip.is-on .care-chip-box, .care-chip:has(input:checked) .care-chip-box { background: #fff; color: var(--flame); }
.care-chip.is-on .care-chip-box::after, .care-chip:has(input:checked) .care-chip-box::after { content: "✓"; font-size: .85rem; line-height: 1; font-weight: 800; }
.care-chip:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.care-chip-n { font-size: .75rem; font-weight: 400; opacity: .85; }
.care-chip.is-mine { border-color: #2f6b3a; background: #2f6b3a; color: #fff; cursor: default; }
.care-chip.is-full { border-color: var(--rule); color: var(--muted); background: var(--paper); cursor: default; font-weight: 400; }
.care-chip.is-open-ro { border-color: var(--rule); color: var(--flame); cursor: default; }
.care-row-more { font-size: .85rem; color: var(--navy); margin-left: .2rem; }
.care-quick-pick { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .5rem; }
.care-quick-btn { font: inherit; font-size: .85rem; padding: .35rem .7rem; border: 1px dashed var(--navy); background: transparent; color: var(--navy); cursor: pointer; }
.care-quick-btn.is-on { background: var(--navy); color: var(--cream); border-style: solid; }
.care-board .care-pick-bar { position: sticky; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem;
  margin-top: 1.2rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: var(--navy); color: var(--cream); box-shadow: 0 -4px 14px rgba(16,35,51,.18); }
.care-pick-bar .care-pick-count { font-weight: 600; }
.care-pick-actions { display: flex; gap: .9rem; align-items: center; margin-left: auto; }
.care-pick-bar .linklike { color: var(--cream); }
.care-pick-bar .btn[disabled] { opacity: .45; cursor: default; }
.care-pick-bar.is-active .btn { box-shadow: 0 0 0 2px var(--gold); }
.care-about summary { cursor: pointer; color: var(--navy); font-weight: 600; }
.care-about .care-tasks { margin-top: .7rem; }
.care-claim-list { list-style: none; padding: 0; }
.care-claim-list li { display: flex; gap: .8rem; padding: .45rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.care-claim-date { flex: none; width: 6.5rem; font-weight: 700; color: var(--navy); }
.care-claim-reqs { margin: .3rem 0 .8rem; padding: .5rem .8rem; background: #faf1dc; border-left: 3px solid #b7791f; }
.care-claim-reqs p { margin: 0; }
/* v1.19 phase 2: status taps, To call */
.care-status { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 .8rem; }
.care-tap { font: inherit; font-weight: 600; min-height: 2.9rem; padding: .4rem 1rem; border: 1.5px solid #2f6b3a; background: #fff; color: #1f4d2a; cursor: pointer; }
.care-tap:hover { background: #eef5ec; }
.care-tap.is-on { background: #2f6b3a; color: #fff; }
.care-call-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; align-items: flex-start; }
.care-call-head p { margin: 0; }
.care-call.is-called { opacity: .65; }
@media print { .care-call { break-inside: avoid; } .care-call form { display: none; } }
/* v1.19: the coordinator's board (need page) — who is in each place, tick open ones to arrange one helper */
.care-board.is-coord .care-row { border-left-color: #2f6b3a; }
.care-board.is-coord .care-row.is-gap { border-left-color: var(--flame); }
.care-row.is-skipped { opacity: .6; border-left-color: var(--rule); }
.care-chip.is-taken { border-color: #b9cdb6; background: #eef5ec; color: #1f4d2a; cursor: default; font-weight: 600; }
.care-chip-part { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.care-board.is-coord .care-row-picks { max-width: 34rem; }
.care-places-list summary { cursor: pointer; color: var(--navy); margin: .4rem 0 .6rem; }
/* v1.19 phase 3: helper load, closing, printable schedule */
.care-load .num { text-align: center; }
.care-load tr.is-busy td { background: #fff4ef; }
.care-close-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.care-close-list li { margin: .3rem 0; }
.care-print-page { max-width: 54rem; margin: 0 auto; padding: 0 1rem 2rem; }
.care-print-need { margin-top: 1.6rem; }
.care-print-need h2, .care-print-details { break-after: avoid; }
.care-print-need h2 { font-size: 1.6rem; margin: 0 0 .3rem; border-bottom: 1px solid var(--navy); }
.care-print-need h2 span { font-family: var(--font-sans); font-size: .9rem; color: #555; }
.care-print-details { font-size: .85rem; display: flex; flex-wrap: wrap; gap: .1rem 1.2rem; margin: .3rem 0 .6rem; }
.care-print-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.care-print-table th { text-align: left; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #555; border-bottom: 1px solid #999; padding: .3rem .4rem; }
.care-print-table td { padding: .3rem .4rem; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.care-print-table tr.care-print-first td { border-top: 1px solid #bbb; }
.care-print-open { font-weight: 700; color: #a3230b; }
.care-print-foot { margin-top: 2rem; font-size: .75rem; color: #777; text-align: center; }
.care-print .print-bar input[type=date] { font: inherit; font-size: .9rem; padding: .2rem .3rem; }
@media print { .care-print .print-bar { display: none; } .care-print-table tr { break-inside: avoid; } .care-print-open { color: #000; } }
.care-print-table td:first-child { white-space: nowrap; }
@media print { .care-print-table { font-size: 9.5pt; } }

/* ---------- v1.20: Roles & site administration ---------- */
.roles-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); margin: 1rem 0 1.5rem; }
.role-card { display: flex; flex-direction: column; gap: 0.35rem; }
.role-card .role-edit { margin-top: auto; margin-bottom: 0; }
.role-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.6rem; }
.role-head h2 { margin: 0; }
.perm-list { margin: 0.25rem 0 0.5rem; padding-left: 1.1rem; }
.perm-list li { margin: 0.15rem 0; }
.checks.checks-1 { grid-template-columns: 1fr; }
.rr-card h3 { margin: 0; }
.rr-card blockquote { margin: 0; }
.rr-extra { margin-top: 0.5rem; padding: 0.6rem 0.8rem; border: 1px dashed var(--rule); border-radius: 6px; background: var(--paper); }
.rr-extra summary { cursor: pointer; }
.sec-table td, .sec-table th { vertical-align: top; }
.sec-table input[type="number"] { width: 6.5rem; }
.sec-source { font-size: 0.78rem; color: var(--muted); }
.sec-warn { color: #a3230b; font-weight: 600; }
.departure-steps .check { align-items: flex-start; }
.departure-steps .check span.help { display: block; margin: 0.1rem 0 0; }
@media (max-width: 639px) {
  .sec-table thead { display: none; }
  .sec-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
  .sec-table td { display: block; border: 0; padding: 0.15rem 0; }
}

/* ---------- v1.22: Manage → Admin tools ---------- */
.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; }
.at-dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.45rem; vertical-align: 0.02em; flex: none; }
.at-ok { background: #2f7d4f; }
.at-warn { background: #c98a0b; }
.at-bad { background: #a3230b; }
.at-info { background: #8a96a3; }
.at-ok-text { color: #2f7d4f; } .at-warn-text { color: #8a5d00; } .at-bad-text { color: #a3230b; } .at-info-text { color: var(--muted); }
.at-summary { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.at-tile a { display: flex; flex-direction: column; gap: 0.15rem; height: 100%; padding: 0.85rem 1rem; background: var(--cream); border: 1px solid var(--rule); border-left: 4px solid #8a96a3; text-decoration: none; }
.at-tile a:hover { border-color: var(--navy); }
.at-tile-ok a { border-left-color: #2f7d4f; } .at-tile-warn a { border-left-color: #c98a0b; } .at-tile-bad a { border-left-color: #a3230b; }
.at-tile-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.at-tile-value { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; color: var(--navy); }
.at-tile-note { font-size: 0.82rem; color: var(--muted); }
.at-verdict { display: flex; align-items: baseline; font-weight: 600; margin: 0.25rem 0 0.75rem; }
.at-mini-label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0.75rem 0 0.4rem; }
.at-facts { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: 0.3rem 0.9rem; margin: 0 0 0.5rem; }
.at-facts dt { color: var(--muted); }
.at-facts dd { margin: 0; overflow-wrap: anywhere; }
.at-checks td:first-child { width: 62%; }
.at-row-bad td { background: #fbeeea; }
.at-row-warn td { background: #fdf6e3; }
.table .num { text-align: right; }
.at-php-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; margin: 0.2rem 0 0.4rem; }
.at-php-big strong { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--navy); }
.at-php-label { font-weight: 600; }
.at-branches tr.is-current td { background: #eef3f7; font-weight: 600; }
.at-you { display: inline-block; margin-left: 0.3rem; padding: 0 0.4rem; border-radius: 999px; background: var(--navy); color: var(--cream); font-size: 0.68rem; font-weight: 600; }
.at-missing { color: #a3230b; overflow-wrap: anywhere; }
.at-copy { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.at-copy code { flex: 1 1 18rem; min-width: 0; padding: 0.5rem 0.65rem; background: #fff; border: 1px solid var(--rule); font-size: 0.85rem; overflow-wrap: anywhere; }
.at-errors { margin-top: 0; }
.at-grid > * { min-width: 0; }
/* QR codes */
.at-qr { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) { .at-qr { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .at-qr-preview { position: sticky; top: calc(var(--chrome-h) + 1rem); } }
.at-qr-form textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9rem; }
.at-seg { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.at-seg label { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border: 1px solid var(--rule); border-radius: 999px; background: #fff; cursor: pointer; font-size: 0.9rem; }
.at-seg label:has(input:checked) { border-color: var(--navy); background: #eef3f7; font-weight: 600; }
.at-qr-build { padding: 0.75rem 0.9rem 0.1rem; margin-bottom: 1rem; border: 1px dashed var(--rule); background: #fff; }
.at-qr-build .btn-row { align-items: flex-end; }
.at-qr-presets .linklike { margin: 0 0.35rem; }
.at-fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.at-fieldset legend { padding: 0; margin-bottom: 0.4rem; letter-spacing: 0.08em; text-transform: none; font-size: 0.82rem; }
.at-levels { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.at-level { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.6rem 0.7rem; border: 1px solid var(--rule); background: #fff; cursor: pointer; }
.at-level:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #eef3f7; }
.at-level input { margin-top: 0.3rem; }
.at-level-body { display: flex; flex-direction: column; font-size: 0.85rem; line-height: 1.35; }
.at-level-body strong { font-size: 1.05rem; color: var(--navy); }
.at-level-pct { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.at-colors { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; margin-bottom: 1rem; }
.at-color { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.at-color input[type=color] { width: 2.6rem; height: 2.2rem; padding: 0.1rem; border: 1px solid var(--rule); background: #fff; cursor: pointer; }
.at-qr-save { border-top: 1px solid var(--rule); padding-top: 1rem; }
.at-qr-image { display: grid; place-items: center; aspect-ratio: 1; max-width: 22rem; margin: 0 auto 0.75rem; background: #fff; border: 1px solid var(--rule); }
.at-qr-image svg { display: block; width: 100%; height: auto; }
.at-qr-image p { padding: 1rem; text-align: center; }
.at-qr-image.is-faded svg { opacity: 0.25; }
.at-qr-problem { margin: 0 0 0.6rem; padding: 0.5rem 0.7rem; border-left: 3px solid #a3230b; background: #fbeeea; color: #7a1b08; font-size: 0.9rem; }
.at-qr-info { text-align: center; min-height: 1.4em; }
.at-downloads { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.at-downloads .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.at-saved { list-style: none; margin: 0; padding: 0; }
.at-saved-item { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.4rem 1rem; align-items: center; padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.at-saved-item.is-current { background: #eef3f7; padding-left: 0.5rem; padding-right: 0.5rem; }
.at-saved-thumb svg { width: 4.5rem; height: 4.5rem; display: block; border: 1px solid var(--rule); }
.at-saved-main { display: flex; flex-direction: column; min-width: 0; }
.at-saved-text { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8rem; overflow-wrap: anywhere; }
.at-saved-actions { grid-column: 1 / -1; }
@media (min-width: 900px) { .at-saved-item { grid-template-columns: 4.5rem minmax(0, 1fr) auto; } .at-saved-actions { grid-column: auto; justify-content: flex-end; } }
/* error logs */
.at-logtabs { margin-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.at-logtabs a { text-transform: none; letter-spacing: 0.02em; font-size: 0.85rem; }
.at-logfilter { display: flex; flex-wrap: wrap; gap: 0 0.75rem; align-items: flex-end; }
.at-logfilter .field { flex: 1 1 12rem; }
.at-logfilter .btn { margin-bottom: 1rem; }
.at-log { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid var(--rule); }
.at-log li { display: grid; grid-template-columns: auto auto 1fr; gap: 0.15rem 0.75rem; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--rule); border-left: 3px solid transparent; font-size: 0.85rem; }
.at-log-when { color: var(--muted); white-space: nowrap; }
.at-log-kind { font-weight: 600; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.at-log pre { grid-column: 1 / -1; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.8rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
.at-log-fatal { border-left-color: #a3230b !important; background: #fbeeea; } .at-log-fatal .at-log-kind { color: #a3230b; }
.at-log-warning { border-left-color: #c98a0b !important; } .at-log-warning .at-log-kind { color: #8a5d00; }
.at-log-notice .at-log-kind, .at-log-deprecated .at-log-kind { color: var(--muted); }
.at-log-actions { justify-content: space-between; }
@media (max-width: 639px) {
  .at-checks thead { display: none; }
  .at-checks tr { display: block; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
  .at-checks td { display: block; border: 0; padding: 0.1rem 0.25rem; width: auto !important; }
  .at-checks td:last-child { padding-left: 1.4rem; font-weight: 600; }
  .at-facts { grid-template-columns: 1fr; gap: 0 0; }
  .at-facts dd { margin-bottom: 0.4rem; }
}
/* v1.22: maintenance mode & backup */
.maint-banner { background: #8a5d00; color: #fff; position: relative; z-index: 50; }
.maint-banner-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; padding: 0.6rem 0; }
.maint-banner p { margin: 0; font-size: 0.92rem; }
.at-maint-on { border-color: #c98a0b; border-left: 4px solid #c98a0b; }
.at-details { margin: 0.75rem 0; }
.at-details summary { cursor: pointer; color: var(--navy); font-weight: 600; }
.at-maint-form { margin-top: 0.75rem; }
.at-until-at { max-width: 18rem; margin-bottom: 0.25rem; }
.at-steps { padding-left: 1.2rem; margin: 0.25rem 0 0; }
.at-steps li { margin: 0.25rem 0; }

/* ---------- v1.23: E-mail notifications ---------- */
.notify-section { border: 0; padding: 0; margin: 0.5rem 0 0.75rem; }
.notify-section legend { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 0.25rem; }
.notify-row { display: grid; gap: 0.35rem 1rem; padding: 0.6rem 0; border-top: 1px solid var(--rule); }
.notify-what { display: flex; flex-direction: column; min-width: 0; }
.notify-what .help { margin: 0.1rem 0 0; }
.notify-choice { display: flex; flex-wrap: wrap; gap: 0.35rem; align-self: center; }
.notify-choice label { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.65rem; border: 1px solid var(--rule); border-radius: 999px; background: #fff; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.notify-choice label:has(input:checked) { border-color: var(--navy); background: #eef3f7; font-weight: 600; }
.notify-choice label:has(input[value=off]:checked) { border-color: #a3230b; background: #fbeeea; color: #7a1b08; }
@media (min-width: 720px) { .notify-row { grid-template-columns: minmax(0, 1fr) auto; } }
.notify-locked summary, .notify-who summary { cursor: pointer; color: var(--navy); font-weight: 600; }
.notify-locked ul { margin: 0.4rem 0; padding-left: 1.1rem; }
.notify-locked li { margin: 0.2rem 0; }
.notify-elsewhere { color: var(--muted); }
.notify-table td:first-child { width: 48%; }
.notify-counts { white-space: nowrap; }
.notify-who p { margin: 0.25rem 0; }
.notify-warn { margin-bottom: 1.25rem; }
@media (max-width: 639px) {
  .notify-table thead { display: none; }
  .notify-table tr { display: block; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
  .notify-table td { display: block; border: 0; padding: 0.15rem 0.25rem; width: auto !important; }
}

/* ---------- v1.24 Highlights in the reader (assets/js/dg-marks.js) ---------- */
.dgt-book { cursor: text; }
::highlight(ra-pick) { background-color: rgba(96, 150, 220, 0.32); text-decoration: underline 2px rgba(40, 90, 170, 0.75); }
::highlight(ra-mark-yellow) { background-color: rgba(250, 221, 110, 0.55); }
::highlight(ra-mark-green) { background-color: rgba(150, 214, 150, 0.55); }
::highlight(ra-mark-blue) { background-color: rgba(150, 196, 240, 0.55); }
::highlight(ra-mark-pink) { background-color: rgba(244, 170, 200, 0.55); }
.mk-pick, .mk-saved { position: absolute; pointer-events: none; border-radius: 2px; mix-blend-mode: multiply; }
.mk-pick { background: rgba(96, 150, 220, 0.32); box-shadow: inset 0 -2px 0 rgba(40, 90, 170, 0.75); z-index: 4; }
.mk-saved { z-index: 2; }
.mk-yellow { background: rgba(250, 221, 110, 0.55); }
.mk-green { background: rgba(150, 214, 150, 0.55); }
.mk-blue { background: rgba(150, 196, 240, 0.55); }
.mk-pink { background: rgba(244, 170, 200, 0.55); }
.mk-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem;
  max-width: min(46rem, calc(100vw - 1.5rem)); background: var(--paper); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 10px; padding: 0.45rem 0.6rem; box-shadow: 0 4px 16px rgba(0,0,0,0.35); font-size: 0.9rem; }
.mk-bar[hidden] { display: none; }
.mk-bar-text { flex: 1 1 12rem; min-width: 0; font-family: var(--font-display); font-style: italic; font-size: 1rem; color: var(--navy);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-btn { font: inherit; font-size: 0.85rem; background: transparent; color: var(--navy); border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.3rem 0.7rem; cursor: pointer; white-space: nowrap; }
.mk-btn:hover, .mk-btn:focus-visible { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.mk-btn-main { background: var(--flame); border-color: var(--flame); color: #fff; font-weight: 600; }
.mk-btn[hidden] { display: none; }
.mk-x { padding: 0.3rem 0.55rem; }
@media (max-width: 40rem) {
  .mk-bar { left: 0.5rem; right: 0.5rem; transform: none; max-width: none; }
  .mk-bar-text { flex-basis: 100%; }
}
.mk-quote-preview { flex: 1 1 100%; border-left: 4px solid var(--gold); background: var(--cream); padding: 0.35rem 0.6rem; }
.mk-quote-preview[hidden] { display: none; }
.mk-quote-text { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--navy); }
.mk-colors { display: inline-flex; gap: 0.35rem; align-items: center; }
.mk-colors[hidden] { display: none; }
.mk-swatch { position: relative; display: inline-block; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--rule); cursor: pointer; }
.mk-swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mk-swatch:has(input:checked) { border-color: var(--navy); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--navy); }
.mk-swatch:has(input:focus-visible) { outline: 2px solid var(--flame); outline-offset: 3px; }
.dgr-marks-panel { max-height: min(70vh, 34rem); overflow-y: auto; }
.dgr-marks li.mk-item { display: block; }
.mk-head { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; align-items: baseline; }
.mk-play { font-weight: 600; }
.mk-quote { margin: 0.25rem 0 0.2rem; padding: 0.15rem 0.6rem; border-left: 4px solid var(--rule); font-family: var(--font-display); font-style: italic;
  font-size: 1.02rem; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mk-c-yellow .mk-quote { border-left-color: #e5bf3a; background: rgba(250, 221, 110, 0.22); }
.mk-c-green .mk-quote { border-left-color: #5fa95f; background: rgba(150, 214, 150, 0.22); }
.mk-c-blue .mk-quote { border-left-color: #4f8fd0; background: rgba(150, 196, 240, 0.22); }
.mk-c-pink .mk-quote { border-left-color: #d46b98; background: rgba(244, 170, 200, 0.22); }
.mk-note { margin: 0.15rem 0 0; }
.mk-edit { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 0.3rem; }
.mk-edit input[type="text"] { flex: 1 1 12rem; padding: 0.3rem 0.45rem; font: inherit; border: 1px solid var(--rule); }
.mk-item.is-flash { animation: mk-flash 1.6s ease-out; }
@keyframes mk-flash { 0%, 30% { background: rgba(250, 221, 110, 0.6); } 100% { background: transparent; } }
.mk-msg { color: var(--flame); }
.mk-msg[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .mk-item.is-flash { animation: none; outline: 2px solid var(--gold); } }

/* ---------- v1.24 Diaconal visitation (public/diaconate/…) ---------- */
.dv-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 2px solid var(--rule); margin: 0 0 1.25rem; }
.dv-tabs a { padding: 0.45rem 0.9rem; text-decoration: none; color: var(--navy); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.dv-tabs a:hover { border-bottom-color: var(--rule); }
.dv-tabs a.is-current { border-bottom-color: var(--flame); color: var(--ink); }
.dv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.dv-stat { display: flex; flex-direction: column; padding: 0.75rem 1rem; background: var(--cream); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.dv-stat strong { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--navy); }
.dv-stat span { font-size: 0.85rem; color: var(--muted); }
.dv-stat.is-alert { border-left: 4px solid var(--flame); }
.dv-stat.is-alert strong { color: var(--flame); }
.dv-stat:hover { border-color: var(--navy); }
.dv-badge { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; padding: 0.1rem 0.5rem; border-radius: 999px;
  background: #e8e4da; color: #4a463e; white-space: nowrap; vertical-align: middle; }
.dv-badge.is-ok { background: #dcefdc; color: #24572a; }
.dv-badge.is-soon { background: #fbefc9; color: #6d4c00; }
.dv-badge.is-overdue { background: #f8d9d2; color: #8f1f0b; }
.dv-badge.is-planned { background: #dbe7f5; color: #1d4677; }
.dv-badge.is-unassigned { background: #fff; color: var(--muted); border: 1px dashed #b8b2a5; }
.dv-badge.is-muted { background: #eeece6; color: #6c675d; }
.dv-badge.is-elders { background: #e6def3; color: #4a2d7a; }
.dv-due { color: var(--flame); font-weight: 600; }
.dv-fam-list { margin: 0 0 1rem; border-top: 1px solid var(--rule); }
.dv-fam-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) auto; gap: 0.4rem 1rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.dv-fam-name span, .dv-fam-state span, .dv-fam-state a { display: block; }
.dv-fam-act { margin: 0; justify-content: flex-end; }
@media (max-width: 48rem) { .dv-fam-row { grid-template-columns: 1fr; } .dv-fam-act { justify-content: flex-start; } }
.dv-visits, .dv-concerns, .dv-updates { margin: 0 0 1rem; border-top: 1px solid var(--rule); }
.dv-visit { display: grid; grid-template-columns: 12rem minmax(0, 1fr) auto; gap: 0.2rem 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.dv-visit-when { font-weight: 600; color: var(--navy); font-size: 0.92rem; }
.dv-visit-act { white-space: nowrap; }
.dv-visit-act .btn { margin-right: 0.35rem; }
.dv-visit-summary, .dv-visit-follow { grid-column: 2 / -1; }
.dv-visit-summary { font-size: 0.95rem; }
.dv-visit-summary p { margin: 0.2rem 0; }
.dv-visit.is-missed .dv-visit-when, .dv-visit.is-cancelled .dv-visit-when { color: var(--muted); text-decoration: line-through; }
@media (max-width: 40rem) { .dv-visit { grid-template-columns: 1fr; } .dv-visit-summary, .dv-visit-follow { grid-column: auto; } }
.dv-concern { padding: 0.5rem 0 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); border-left: 4px solid transparent; }
.dv-concern.is-urgent { border-left-color: var(--flame); }
.dv-concern.is-resolved { opacity: 0.8; }
.dv-concern-title { font-weight: 600; }
.dv-concerns-wide .dv-concern { padding-top: 0.65rem; padding-bottom: 0.65rem; }
.dv-updates li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.dv-updates li p.small { margin: 0 0 0.15rem; }
.dv-people-list li { padding: 0.35rem 0; }
.dv-addr { margin: 0.5rem 0; }
.dv-standing { margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px dashed var(--rule); }
.dv-standing p { margin: 0.2rem 0; }
.dv-actions { margin: 0.25rem 0 0.5rem; }
.dv-more summary { cursor: pointer; color: var(--navy); font-weight: 600; margin: 0.25rem 0 0.5rem; }
.dv-table td { vertical-align: top; }
.dv-tick { width: 2rem; }
.dv-bulk { margin-top: 1rem; }
.dv-bulk .btn-row { align-items: flex-end; }
.dv-load td, .dv-load th { padding: 0.25rem 0.35rem; }
.dv-wide { grid-template-columns: minmax(0, 1fr) 17rem; }
@media (max-width: 60rem) { .dv-wide { grid-template-columns: 1fr; } }
.dv-quote { margin: 0.3rem 0 0.6rem; padding: 0.35rem 0.75rem; border-left: 4px solid #8a6fbf; background: #f4f0fa; }
.dv-quote p { margin: 0.2rem 0; }
.dv-resolution { margin-top: 0.75rem; padding: 0.5rem 0.75rem; background: #eef6ee; border-left: 4px solid #5fa95f; }
.dv-resolution p { margin: 0.2rem 0; }
.dv-referral.is-answered { opacity: 0.9; }
.dv-referral h2 { margin: 0.1rem 0 0.2rem; }
.dv-version { align-items: center; margin: 0.5rem 0 0.25rem; }
.dv-version-tools { margin-left: auto; display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.dv-report-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.75rem; margin: 1rem 0 1.5rem; }
.dv-report-totals > div { display: flex; flex-direction: column; padding: 0.75rem 0.9rem; border: 1px solid var(--rule); background: var(--paper); }
.dv-report-totals strong { font-family: var(--font-display); font-size: 2rem; line-height: 1.05; color: var(--navy); }
.dv-report-totals span { font-weight: 600; font-size: 0.9rem; }
.dv-report-totals em { font-style: normal; font-size: 0.8rem; color: var(--muted); }
.dv-report-grid { gap: 1rem 2rem; align-items: start; }
.dv-report-grid table, .dv-report-families { width: 100%; }
.dv-report .num, .dv-print .num, .dv-help-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dv-report-resolved li { margin: 0.3rem 0; }
.dv-home .cards { margin-top: 0.75rem; }
.dv-settings { align-items: start; gap: 1.5rem; }
.dv-print-page .h-sm { margin-top: 1.25rem; border-bottom: 1px solid var(--navy); font-size: 1.25rem; }
@media print {
  .dv-print .dv-report-totals { grid-template-columns: repeat(5, 1fr); gap: 2mm; }
  .dv-print .dv-report-totals > div { padding: 2mm; break-inside: avoid; }
  .dv-print .table { font-size: 9pt; }
  .dv-print tr { break-inside: avoid; }
}
.dgm-js .dgm-nav { background: var(--navy-deep); box-shadow: 0 -10px 14px var(--navy-deep); }
.dv-wide { grid-template-columns: minmax(0, 1fr) 17rem; }
@media (max-width: 60rem) { .dv-wide { grid-template-columns: minmax(0, 1fr); } }
.area-grid > div, .area-grid > aside { min-width: 0; }
.dv-bulk select, .dv-filter select { max-width: 100%; }

/* ---------- v1.25 Diaconal visitation: questions, guidance, notes and prayer on a concern ---------- */
.dv-kind.is-question { background: #fde3c8; color: #8a3f00; }
.dv-kind.is-guidance { background: #dbe7f5; color: #1d4677; }
.dv-kind.is-note { background: #eeece6; color: #4f4a40; }
.dv-kind.is-prayer { background: #e6def3; color: #4a2d7a; }
.dv-entry.is-waiting { border-left: 4px solid #e08a2e; padding-left: 0.6rem; background: #fff8ef; }
.dv-entry.is-guidance { border-left: 4px solid #8fb0d8; padding-left: 0.6rem; }
.dv-entry.is-prayer { border-left: 4px solid #a993d1; padding-left: 0.6rem; }
.dv-answered { color: #24572a; font-weight: 600; }
.dv-replies { margin: 0.4rem 0 0.2rem 1.25rem; border-left: 2px solid var(--rule); padding-left: 0.75rem; }
.dv-updates .dv-replies li { border-bottom: 0; padding: 0.3rem 0; }
.dv-reply { margin-top: 0.3rem; }
.dv-reply summary { cursor: pointer; }
.dv-reply form { margin-top: 0.4rem; }
.dv-reply textarea { width: 100%; }
.dv-kind-help { align-self: end; margin: 0 0 0.6rem; }
.dv-waiting { margin: 0 0 0.5rem; }
.dv-prayers li { padding: 0.3rem 0; border-bottom: 1px dashed var(--rule); }
.dv-prayers li p { margin: 0; }
.dv-questions li { padding: 0.4rem 0; border-bottom: 1px solid var(--rule); }
.dv-questions li span { display: block; }

/* ---------- v1.25 Service groups (Church Life → Service groups) ---------- */
form.inline { display: inline; margin: 0; }
.sv-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin: 0 0 1.5rem; }
.sv-group-card { display: flex; gap: 0.85rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); align-items: flex-start; }
.sv-group-card:hover { border-color: var(--navy); }
.sv-group-card.is-mine { border-left: 4px solid #2f6b3a; }
.sv-icon { font-size: 1.8rem; line-height: 1; width: 2.2rem; text-align: center; flex: none; }
.sv-group-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.sv-group-name { font-family: var(--font-display); font-size: 1.35rem; color: var(--navy); line-height: 1.15; }
.sv-group-body .care-badge { align-self: flex-start; margin-top: 0.2rem; }
.sv-mine { margin: 0 0 1.5rem; padding: 0.9rem 1rem; background: var(--cream); border: 1px solid var(--rule); }
.sv-mine h2 { margin-top: 0; }
.sv-tasks, .sv-days, .sv-jobs, .sv-people, .sv-card-list { margin: 0 0 1rem; border-top: 1px solid var(--rule); }
.sv-task { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; padding: 0.55rem 0 0.55rem 0.7rem; border-bottom: 1px solid var(--rule); border-left: 4px solid transparent; }
.sv-task.is-urgent { border-left-color: var(--flame); }
.sv-task.is-claimed { border-left-color: #8a6fbf; }
.sv-task.is-done, .sv-task.is-declined { opacity: 0.75; }
.sv-task.is-reported { border-left-color: #e0a82e; background: #fffaf0; }
.sv-task-title { font-weight: 600; }
.sv-task-main { min-width: 0; }
.sv-task-act { flex: none; }
.sv-days li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.sv-add summary, .sv-done summary, .sv-recurring summary { cursor: pointer; }
.sv-add[open] summary { margin-bottom: 0.6rem; }
.sv-recurring summary { color: var(--navy); }
.sv-photo { max-width: 100%; max-height: 22rem; border: 1px solid var(--rule); }
.sv-job { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; padding: 0.6rem 0 0.6rem 0.7rem; border-bottom: 1px solid var(--rule); border-left: 4px solid transparent; }
.sv-job.is-mine { border-left-color: #2f6b3a; background: #f3f8f2; }
.sv-job.is-done { opacity: 0.75; }
.sv-job-act { flex: none; text-align: right; }
.sv-job-act form { margin: 0 0 0.2rem; }
.sv-people li { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; flex-wrap: wrap; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.sv-people .btn-row { margin: 0; gap: 0.6rem; }
.check.is-soon { opacity: 0.6; }
/* Greeting Cards calendar */
.sv-cal { border: 1px solid var(--rule); background: #fff; margin: 0 0 0.5rem; }
.sv-cal-head, .sv-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sv-cal-head span { padding: 0.35rem 0.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--navy); }
.sv-cal-day { min-height: 5.2rem; padding: 0.3rem 0.35rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 0.15rem; }
.sv-cal-day:nth-child(7n) { border-right: 0; }
.sv-cal-day.is-pad { background: #faf8f3; }
.sv-cal-day.is-today { background: #fff7e6; }
.sv-cal-num { font-size: 0.8rem; font-weight: 700; color: var(--navy); }
.sv-cal-dow { display: none; }
.sv-cal-ev { font-size: 0.78rem; line-height: 1.25; padding: 0.1rem 0.3rem; border-radius: 3px; background: #fbefc9; }
.sv-cal-ev.is-anniversary { background: #e6def3; }
.sv-cal-ev.is-claimed { outline: 1px dashed #8a6fbf; }
.sv-cal-ev.is-sent { background: #dcefdc; }
@media (max-width: 44rem) {
  .sv-cal-head { display: none; }
  .sv-cal-grid { grid-template-columns: 1fr; }
  .sv-cal-day { min-height: 0; border-right: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.5rem; }
  .sv-cal-day.is-pad, .sv-cal-day:not(.has-events):not(.is-today) { display: none; }
  .sv-cal-num { min-width: 4.2rem; }
  .sv-cal-dow { display: inline; font-weight: 400; color: var(--muted); }
}
.sv-card { display: flex; gap: 0.75rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.sv-card.is-sent { opacity: 0.75; }
.sv-card.is-past.is-open { opacity: 0.6; }
.sv-card-main { flex: 1; min-width: 0; }
.sv-card-act { flex: none; display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sv-occ li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
@media (max-width: 40rem) { .sv-task, .sv-job, .sv-card { flex-wrap: wrap; } .sv-task-act, .sv-job-act, .sv-card-act { width: 100%; text-align: left; justify-content: flex-start; } }

/* ---------- v1.26 Service groups: events and purchasing ---------- */
.sv-last { color: #8a3f00; background: #fff4e6; display: inline-block; padding: 0.05rem 0.4rem; margin-top: 0.15rem; }
.sv-potluck { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.75rem; margin: 0 0 1rem; }
.sv-pot { margin: 0; }
.sv-pot ul { margin: 0.3rem 0 0.5rem; }
.sv-pot-form input { width: 100%; }
.sv-bought { margin-top: 0.3rem; }
.sv-bought summary { cursor: pointer; }
.sv-bought form { margin-top: 0.4rem; padding: 0.6rem; background: var(--cream); border: 1px solid var(--rule); }
.sv-shop .sv-task-act form, .sv-tasks .sv-task-act form.inline { margin-left: 0.3rem; }
.sv-filter { align-items: flex-end; gap: 0.5rem 0.75rem; flex-wrap: wrap; }
.sv-filter .field { margin: 0; }
.sv-count input { width: 4.5rem; }
.sv-review input[type=text] { width: 100%; min-width: 4rem; }
.sv-review td { vertical-align: middle; }

/* ---------- v1.27 Service groups: care list, projects & drives, equipment log ---------- */
.sv-care-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.75rem; margin: 0 0 1rem; }
.sv-care-row { margin: 0; }
.sv-care-row p { margin: 0 0 0.35rem; }
.sv-care-name { font-size: 1.05rem; }
.sv-care-log { margin: 0 0 1rem; }
.sv-care-log li p { margin: 0 0 0.3rem; }
.sv-drive { display: grid; gap: 0.75rem; margin: 0 0 1rem; }
.sv-drive-item { margin: 0; }
.sv-drive-item p { margin: 0 0 0.4rem; }
.sv-bar { display: flex; height: 0.7rem; background: #efe8da; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; margin: 0.2rem 0 0.4rem; }
.sv-bar-in { background: #2f6b3a; }
.sv-bar-pledged { background: repeating-linear-gradient(45deg, #9cc39f, #9cc39f 4px, #c7e0c8 4px, #c7e0c8 8px); }
.sv-qty { width: 4.5rem; }
.sv-pledge { display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0 0.5rem 0.3rem 0; }
.sv-project { margin: 0 0 0.6rem; }
.sv-project p { margin: 0 0 0.3rem; }
.sv-drives { margin: 0 0 1.5rem; }
.sv-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0 0 0.6rem; }
.sv-facts dt { font-weight: 600; color: var(--muted); }
.sv-facts dd { margin: 0; }
.sv-cat th { background: var(--cream); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); }
.sv-filter .field { min-width: 9rem; }
@media (max-width: 40rem) { .sv-facts { grid-template-columns: 1fr; } .sv-facts dt { margin-top: 0.3rem; } }
ul.plain > li.sv-care-row, ul.plain > li.sv-drive-item, ul.plain > li.sv-project, .sv-care-log > li.panel { padding: 0.8rem 1rem; }

/* ---------- v1.27.2 Projects: move days ---------- */
.sv-proj-days { display: grid; gap: 0.75rem; margin: 0 0 0.8rem; }
ul.plain > li.sv-proj-day { margin: 0; padding: 0.8rem 1rem; }
.sv-proj-day p { margin: 0 0 0.35rem; }
.sv-proj-day.is-mine { border-left: 4px solid #2f6b3a; }
.sv-helping { font-size: 1.05rem; margin: 0 0 0.6rem; }

/* ---------- v1.29 Page reviews (reviews/*) ---------- */
.rv-work [hidden], .rv-new [hidden], form [data-rv-for][hidden], [data-rv-for-audience][hidden] { display: none !important; }
.rv-list { display: grid; gap: 0.8rem; margin: 0 0 1.5rem; }
ul.plain > li.rv-list-item { margin: 0; padding: 1rem 1.2rem; }
.rv-list-item p { margin: 0 0 0.4rem; }
.rv-list-title { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: baseline; }
.rv-table td:first-child { min-width: 14rem; }
.rv-choice { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.rv-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.2rem 1rem; padding: 0.4rem 0 0 1.6rem; }
.rv-people { padding-left: 1.6rem; }
.rv-people-list { max-height: 16rem; overflow-y: auto; border: 1px solid var(--rule); background: #fff; padding: 0.5rem 0.8rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.1rem 1rem; }
.rv-people-list label[hidden] { display: none; }
.rv-manage-head .status { margin: 0 0 0.3rem; }
.rv-manage-head p { margin: 0 0 0.3rem; }
.rv-share { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin-top: 0.8rem; }
.rv-share .field { flex: 1 1 22rem; margin: 0; }
.rv-share input { font-size: 0.9rem; }
.rv-tabs { display: flex; flex-wrap: wrap; gap: 0.2rem; border-bottom: 1px solid var(--rule); margin: 0 0 1.2rem; }
.rv-tabs a { padding: 0.55rem 0.9rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.9rem; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.rv-tabs a.is-on, .rv-tabs a:hover { color: var(--navy); border-bottom-color: var(--flame); }
.rv-filter { align-items: flex-end; margin: 0 0 1rem; }
.rv-filter .field { margin: 0; min-width: 9rem; }
.rv-queue { display: grid; gap: 0.8rem; }
ol.plain > li.rv-qnote { margin: 0; padding: 0.9rem 1.1rem; border-left: 4px solid var(--gold); }
.rv-qnote.rv-st-accepted, .rv-qnote.rv-st-done { border-left-color: #2f6b3a; }
.rv-qnote.rv-st-declined { border-left-color: #9ca3af; }
.rv-qnote:target { box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.3); }
.rv-qhead { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; align-items: center; margin: 0 0 0.5rem; }
.rv-qhead .status { margin-left: auto; }
.rv-qactions { display: grid; gap: 0.5rem; margin-top: 0.6rem; }
.rv-replyform { display: flex; gap: 0.5rem; }
.rv-replyform input { flex: 1; min-width: 0; }
.rv-inline { display: inline; }
.linkish { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font: inherit; letter-spacing: 0; text-transform: none; }
.linkish:hover { color: var(--flame); }
.rv-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.7rem; height: 1.7rem; padding: 0 0.4rem; border-radius: 0.85rem 0.85rem 0.85rem 0.15rem;
  background: var(--c, var(--flame)); color: #fff; font-weight: 700; font-size: 0.8rem; border: 0; cursor: pointer; flex: none; }
.rv-quote { margin: 0 0 0.5rem; padding: 0.3rem 0.7rem; border-left: 3px solid #facc15; background: #fefce8; font-size: 0.92rem; color: var(--ink); white-space: pre-wrap; }
.rv-diff { margin: 0 0 0.5rem; font-size: 0.95rem; white-space: pre-wrap; }
.rv-diff del { background: #fee2e2; color: #7f1d1d; text-decoration-color: #b91c1c; }
.rv-diff ins { background: #dcfce7; color: #14532d; text-decoration: none; }
.rv-body p { margin: 0 0 0.4rem; }
.rv-reply { margin: 0.4rem 0 0 1rem; padding: 0.35rem 0.7rem; border-left: 2px solid var(--rule); background: rgba(255, 255, 255, 0.6); }
.rv-reply p { margin: 0 0 0.2rem; }
.status.rv-status-open, .rv-badge.rv-status-open { color: #8a6d1f; }
.status.rv-status-accepted, .rv-badge.rv-status-accepted, .status.rv-status-done, .rv-badge.rv-status-done { color: #2f6b3a; }
.status.rv-status-declined, .rv-badge.rv-status-declined { color: var(--muted); }
.rv-subs li { margin: 0 0 0.3rem; }
.rv-rounds { display: grid; gap: 0.6rem; }
ol.plain > li.rv-rounds > li, .rv-rounds > li.panel { margin: 0; padding: 0.8rem 1rem; }
.rv-rounds p { margin: 0 0 0.3rem; }
.rv-preview { overflow: hidden; border: 1px solid var(--rule); background: #fff; }
.rv-preview iframe { display: block; border: 0; transform-origin: 0 0; }
.rv-danger { border-color: #e9b9ad; }

/* The review page */
.rv-work-body .site-footer { display: none; }
.rv-work { padding: 0 1rem 2rem; }
.rv-top { max-width: 100%; padding: 0.8rem 0 0.4rem; }
.rv-top p { margin: 0 0 0.25rem; }
.rv-title { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); margin: 0 0 0.2rem; }
.rv-instructions { margin: 0.3rem 0 0; max-width: 60rem; }
.rv-instructions summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.rv-round-pick select { padding: 0.1rem 0.3rem; font-size: 0.85rem; }
.rv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; gap: 1rem; align-items: start; }
.rv-stage-col { position: sticky; top: var(--rv-top, 0px); min-width: 0; }
.rv-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; padding: 0.4rem 0; }
.rv-tools, .rv-zoom { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.rv-zoom { margin-left: auto; }
.rv-tool { border: 1px solid var(--rule); background: var(--paper); color: var(--navy); font: 600 0.85rem/1 var(--font-sans); padding: 0.5rem 0.75rem; border-radius: 4px; cursor: pointer; }
.rv-tool:hover { border-color: var(--navy); }
.rv-tool.is-on { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.rv-colors { display: flex; gap: 0.3rem; }
.rv-color { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--rule); cursor: pointer; padding: 0; }
.rv-color.is-on { box-shadow: 0 0 0 2px var(--navy); }
.rv-hint { margin: 0 0 0.4rem; color: var(--muted); min-height: 1.2em; }
.rv-readonly { margin: 0; }
.rv-stage { position: relative; overflow: hidden; background: #e5e1d8; border: 1px solid var(--rule); }
.rv-stage.is-full { overflow-x: auto; }
.rv-scaler { position: relative; margin: 0 auto; }
.rv-scaler iframe { display: block; border: 0; transform-origin: 0 0; background: #fff; }
.rv-side { position: sticky; top: var(--rv-top, 0px); max-height: calc(100vh - var(--rv-top, 0px) - 1rem); overflow-y: auto; background: var(--paper); border: 1px solid var(--rule); padding: 0.8rem; }
.rv-side-head { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; margin: 0 0 0.6rem; }
.rv-side-head h2 { margin: 0; }
.rv-filters { display: flex; gap: 0.2rem; margin-left: auto; }
.rv-filters button { border: 1px solid var(--rule); background: #fff; font: 600 0.75rem/1 var(--font-sans); padding: 0.35rem 0.55rem; border-radius: 999px; cursor: pointer; color: var(--muted); }
.rv-filters button.is-on { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.rv-side-close { display: none; border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--navy); }
.rv-composer { background: #fff; border: 1px solid var(--gold); padding: 0.8rem; margin: 0 0 0.8rem; display: grid; gap: 0.5rem; }
.rv-composer .field { margin: 0; }
.rv-composer textarea { width: 100%; }
.rv-composer .eyebrow { color: var(--flame); }
.rv-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.rv-card { background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--gold); padding: 0.6rem 0.7rem; font-size: 0.93rem; cursor: pointer; }
.rv-card.rv-st-accepted, .rv-card.rv-st-done { border-left-color: #2f6b3a; }
.rv-card.rv-st-declined { border-left-color: #9ca3af; opacity: 0.85; }
.rv-card.is-active { box-shadow: 0 0 0 2px var(--flame); }
.rv-card-head { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0 0 0.4rem; }
.rv-card-who { flex: 1; line-height: 1.3; }
.rv-kind { display: block; font-size: 0.78rem; color: var(--muted); }
.rv-badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.rv-card-body { margin: 0 0 0.3rem; overflow-wrap: anywhere; }
.rv-card-meta { font-size: 0.75rem; color: var(--muted); margin: 0.2rem 0; }
.rv-unplaced { font-size: 0.78rem; color: #92400e; background: #fef3c7; padding: 0.2rem 0.4rem; margin: 0.3rem 0; }
.rv-card-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.rv-mini { border: 1px solid var(--rule); background: var(--paper); color: var(--navy); font: 600 0.74rem/1 var(--font-sans); padding: 0.35rem 0.55rem; border-radius: 3px; cursor: pointer; }
.rv-mini:hover { border-color: var(--navy); }
.rv-mini.is-primary { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.rv-mini.is-danger { color: #a3230b; }
.rv-card .rv-replyform { margin-top: 0.4rem; }
.rv-card .rv-edit { margin: 0.3rem 0; cursor: auto; }
.rv-card .rv-reply { margin-left: 0.4rem; }
.rv-empty { margin: 0.5rem 0; }
.rv-submit { position: sticky; bottom: -0.8rem; margin: 0.8rem -0.8rem -0.8rem; padding: 0.7rem 0.8rem; background: var(--cream); border-top: 1px solid var(--rule); display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; }
.rv-submit p { margin: 0; }
.rv-drawer-btn { display: none; }
.rv-dialog { border: 1px solid var(--rule); padding: 1.2rem; max-width: 32rem; width: calc(100% - 2rem); background: var(--paper); }
.rv-dialog::backdrop { background: rgba(16, 35, 51, 0.5); }
.rv-dialog textarea { width: 100%; }
.rv-toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--navy); color: var(--cream); padding: 0.7rem 1.1rem; border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); z-index: 80; max-width: calc(100% - 2rem); font-size: 0.92rem; }
.rv-toast.is-error { background: #a3230b; }
.rv-work.is-closed .rv-colors { display: none; }
@media (max-width: 63.99rem) {
  .rv-layout { grid-template-columns: minmax(0, 1fr); }
  .rv-side { position: fixed; top: auto; left: 0; right: 0; bottom: 0; max-height: 78vh; z-index: 70; transform: translateY(105%); transition: transform 0.2s ease; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25); border-radius: 12px 12px 0 0; }
  .rv-side.is-open { transform: none; }
  .rv-side-close { display: block; }
  .rv-drawer-btn { display: inline-flex; position: fixed; right: 1rem; bottom: 1rem; z-index: 60; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
  body.rv-side-open .rv-drawer-btn { display: none; }
  .rv-zoom { margin-left: 0; }
  .rv-filters { margin-left: 0; }
}

/* The printable change list */
body.rv-print { background: #fff; }
.rv-print-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; padding: 0.8rem 1rem; background: var(--cream); border-bottom: 1px solid var(--rule); }
.rv-print-bar select { padding: 0.3rem; }
.rv-print-page { max-width: 52rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.rv-print-page h1 { margin: 0.3rem 0 0.5rem; }
.rv-print-page header p { margin: 0 0 0.2rem; }
.rv-print-list { margin-top: 1.2rem; }
.rv-print-note { border-top: 1px solid var(--rule); padding: 0.7rem 0; break-inside: avoid; }
.rv-print-head { margin: 0 0 0.3rem; }
.rv-print-status { float: right; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
@media print { .no-print { display: none !important; } .rv-print-page { padding: 0; max-width: none; font-size: 10.5pt; } }
/* v1.30: Download as Word */
.rv-docx-out { border-color: var(--gold); }
.rv-docx-out .btn-row { align-items: flex-end; }
.rv-docx-out .field { margin: 0; min-width: 14rem; }

/* ---------- v1.34.1: tabs in the officers' rooms (Deacons, Elders, church office) ---------- */
.room-tabs { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: var(--chrome-h, 0); z-index: 30; box-shadow: 0 6px 10px -10px rgba(16, 35, 51, 0.35); }
.room-tabs-inner { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.room-tabs-inner::-webkit-scrollbar { display: none; }
.room-tab { flex: none; padding: 1rem 1rem 0.85rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.room-tab:hover { color: var(--navy); }
.room-tab.is-active { color: var(--navy); border-bottom-color: var(--flame); }
.room-tab:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.room-panel[hidden] { display: none !important; }
.room-more { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); align-items: start; }
@media (max-width: 600px) { .room-tab { padding: 0.85rem 0.75rem 0.7rem; font-size: 0.72rem; letter-spacing: 0.08em; } }

/* ---------- v1.34.1: cautions beside forms fold to one line too (src/audience.php) ---------- */
details.audience-fold { display: block; padding: 0; }
.audience-fold > summary { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem 0.85rem; cursor: pointer; list-style: none; }
.audience-fold > summary::-webkit-details-marker { display: none; }
.audience-fold > summary:focus-visible { outline: 2px solid var(--aud-rule); outline-offset: 2px; }
.audience-fold .audience-fold-lead { flex: 1; min-width: 0; }
.audience-fold .audience-toggle { align-self: center; }
.audience-fold[open] .when-closed, .audience-fold:not([open]) .when-open { display: none; }
.audience-fold[open] .audience-toggle::after { transform: translateY(0.05rem) rotate(-135deg); }
.audience-fold-body { padding: 0 0.85rem 0.75rem calc(0.85rem + 18px + 0.6rem); }
.audience-fold-body p { margin: 0; }

/* ---------- v1.35.1: the notification bell (top right) ---------- */
.wait-bell { position: relative; flex: none; margin-left: auto; }
.nav-bar-inner .desk-nav + .wait-bell { margin-left: 0.5rem; }
.wait-bell-btn { list-style: none; position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem;
  color: var(--cream); border: 1px solid rgba(196, 163, 90, 0.55); cursor: pointer; }
.wait-bell-btn::-webkit-details-marker { display: none; }
.wait-bell-btn:hover, .wait-bell-btn:focus-visible, .wait-bell[open] .wait-bell-btn { color: var(--gold); border-color: var(--gold); }
.wait-bell-count { position: absolute; top: -0.45rem; right: -0.45rem; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem; border-radius: 999px;
  background: var(--flame); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.25rem; text-align: center; box-shadow: 0 0 0 2px var(--navy); }
.wait-menu { position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 60; width: min(19rem, calc(100vw - 2rem)); padding: 0.5rem 0;
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-top: 3px solid var(--gold); box-shadow: 0 12px 30px rgba(16, 35, 51, 0.25); }
.wait-menu-head { margin: 0; padding: 0.35rem 1rem 0.5rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.wait-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem; color: var(--navy); text-decoration: none; border-top: 1px solid var(--rule); }
.wait-item:hover, .wait-item:focus-visible { background: var(--cream); color: var(--flame); }
.wait-item-n { flex: none; min-width: 1.6rem; padding: 0.1rem 0.4rem; border-radius: 999px; background: var(--flame); color: #fff; font-size: 0.8rem; font-weight: 700; text-align: center; }
.wait-empty { margin: 0; padding: 0.25rem 1rem 0.5rem; color: var(--muted); }
@media (min-width: 1024px) { .wait-bell { margin-left: 0.5rem; } }
@media (max-width: 639px) {
  /* On a phone the list drops under the header, full width, so it never runs off the screen. */
  .wait-menu { position: fixed; left: 1rem; right: 1rem; top: var(--chrome-h); width: auto; }
}

/* ---------- v2.8 Page reviews: change request numbers, colour-coded status, the change request log ---------- */
/* One colour per stage: Draft grey, Open blue, Changes pending amber, Ready for review purple, Completed green. */
.cr-stage-draft { --stg: #6b7280; --stg-bg: #eef0f2; --stg-ink: #374151; }
.cr-stage-open { --stg: #2563eb; --stg-bg: #e4eefc; --stg-ink: #1d4382; }
.cr-stage-pending { --stg: #d97706; --stg-bg: #fdf0d8; --stg-ink: #7c4a03; }
.cr-stage-ready { --stg: #7c3aed; --stg-bg: #efe7fc; --stg-ink: #4c1d95; }
.cr-stage-complete { --stg: #2f8f46; --stg-bg: #e2f3e6; --stg-ink: #1d5c2e; }
.cr-stage-deleted { --stg: #9ca3af; --stg-bg: #f3f4f6; --stg-ink: #6b7280; }
.cr-stage { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.18rem 0.65rem 0.18rem 0.5rem; border-radius: 999px; background: var(--stg-bg); color: var(--stg-ink);
  border: 1px solid color-mix(in srgb, var(--stg) 35%, transparent); font-size: 0.78rem; font-weight: 600; line-height: 1.35; white-space: nowrap; vertical-align: middle;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cr-stage-dot { flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--stg); }
.cr-stage-sm { font-size: 0.7rem; padding: 0.08rem 0.5rem 0.08rem 0.4rem; }
.cr-stage-sm .cr-stage-dot { width: 0.45rem; height: 0.45rem; }
.cr-stage-deleted.cr-stage { text-decoration: line-through; }
.rv-cr-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.82rem; font-weight: 600; color: var(--navy); letter-spacing: 0.01em; white-space: nowrap; }
a.rv-cr-code { text-decoration: none; }
a.rv-cr-code:hover { text-decoration: underline; color: var(--flame); }
.rv-item-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.rv-manual { display: inline-block; padding: 0 0.35rem; border: 1px solid var(--rule); border-radius: 0.25rem; font-size: 0.68rem; color: var(--muted); }
.rv-list-item.rv-list-ready { border-left: 3px solid #7c3aed; }
.rv-list-item.rv-list-open { border-left: 3px solid #2563eb; }

/* the index: status pills (count + filter), search, table */
.rv-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.6rem 0 0.9rem; }
.rv-pill { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; padding: 0.25rem 0.75rem 0.25rem 0.6rem;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--stg) 40%, transparent); background: var(--stg-bg); color: var(--stg-ink); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.rv-pill-active, .rv-pill-all { --stg: var(--navy); --stg-bg: #fff; --stg-ink: var(--navy); }
.rv-pill-all .cr-stage-dot { background: conic-gradient(#2563eb 0 25%, #d97706 0 50%, #7c3aed 0 75%, #2f8f46 0); }
.rv-pill-active .cr-stage-dot { background: conic-gradient(#2563eb 0 33%, #d97706 0 66%, #7c3aed 0); }
.rv-pill:hover { border-color: var(--stg); }
.rv-pill.is-on { background: var(--stg); color: #fff; border-color: var(--stg); }
.rv-pill.is-on .cr-stage-dot { background: #fff; }
.rv-pill-n { min-width: 1.4rem; padding: 0 0.35rem; border-radius: 999px; background: rgba(255, 255, 255, 0.7); color: inherit; font-size: 0.75rem; text-align: center; }
.rv-pill.is-on .rv-pill-n { background: rgba(255, 255, 255, 0.25); }
.rv-search { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0 0 1rem; }
.rv-search input[type=search] { flex: 1 1 16rem; max-width: 26rem; padding: 0.45rem 0.6rem; border: 1px solid var(--rule); background: #fff; font: inherit; font-size: 0.95rem; }
.rv-cr-table td { vertical-align: top; }
.rv-table.rv-cr-table td:first-child { min-width: 0; white-space: nowrap; }
.rv-table.rv-cr-table td:nth-child(2) { min-width: 13rem; }
.rv-cr-table td[data-label="Items"] { min-width: 9rem; }
.rv-items-text { white-space: nowrap; }
.rv-row-draft { --stg: #c3c8cf; } .rv-row-open { --stg: #2563eb; } .rv-row-pending { --stg: #d97706; } .rv-row-ready { --stg: #7c3aed; } .rv-row-complete { --stg: #2f8f46; }
.rv-cr-table tr.rv-row > td:first-child { box-shadow: inset 4px 0 0 var(--stg); padding-left: 0.8rem; }
.rv-row-complete td { color: var(--muted); }
.rv-meter { display: inline-block; width: 4.5rem; height: 0.4rem; margin-right: 0.4rem; border-radius: 999px; background: var(--rule); overflow: hidden; vertical-align: middle; }
.rv-meter > span { display: block; height: 100%; background: #2f8f46; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media (max-width: 719px) {
  /* On a phone each change request is a small card. */
  .rv-cr-table thead { display: none; }
  .rv-cr-table, .rv-cr-table tbody, .rv-cr-table tr, .rv-cr-table td { display: block; width: 100%; }
  .rv-cr-table tr.rv-row { position: relative; margin: 0 0 0.75rem; padding: 0.7rem 0.8rem 0.6rem 1rem; background: #fff; border: 1px solid var(--rule); box-shadow: inset 4px 0 0 var(--stg); }
  .rv-cr-table tr.rv-row > td, .rv-cr-table tr.rv-row > td:first-child, .rv-table.rv-cr-table td:nth-child(2) { padding: 0.12rem 0; border: 0; box-shadow: none; min-width: 0; }
  .rv-cr-table tr.rv-row > td[data-label="Submitted"], .rv-cr-table tr.rv-row > td[data-label="Updated"] { display: inline-block; width: auto; margin-right: 1rem; font-size: 0.85rem; color: var(--muted); }
  .rv-cr-table td[data-label="Submitted"]::before { content: "Submitted: "; }
  .rv-cr-table td[data-label="Updated"]::before { content: "Updated "; }
  .rv-cr-table td[data-label="Started by"]::before { content: "Started by "; color: var(--muted); }
}

/* the Manage page: number + status, the tracker, Mark completed, Change status by hand */
.rv-cr-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.4rem; }
.rv-cr-line .rv-cr-code { font-size: 0.95rem; }
.rv-flow { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.rv-tracker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 0.9rem; padding: 0; list-style: none; counter-reset: none; }
.rv-step { position: relative; display: grid; justify-items: center; gap: 0.15rem; padding: 0 0.3rem; text-align: center; color: var(--muted); }
.rv-step::before { content: ""; position: absolute; top: 0.6rem; left: calc(-50% + 0.8rem); right: calc(50% + 0.8rem); height: 2px; background: var(--rule); }
.rv-step:first-child::before { display: none; }
.rv-step-dot { position: relative; z-index: 1; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--stg) 55%, white); background: #fff; }
.rv-step-label { font-size: 0.8rem; font-weight: 600; line-height: 1.25; }
.rv-step-help { font-size: 0.72rem; line-height: 1.3; }
.rv-step.is-past .rv-step-dot { background: color-mix(in srgb, var(--stg) 45%, white); border-color: color-mix(in srgb, var(--stg) 60%, white); }
.rv-step.is-past::before, .rv-step.is-current::before { background: color-mix(in srgb, var(--stg) 50%, white); }
.rv-step.is-current { color: var(--stg-ink); }
.rv-step.is-current .rv-step-dot { background: var(--stg); border-color: var(--stg); box-shadow: 0 0 0 4px var(--stg-bg); }
.rv-step.is-current .rv-step-label { color: var(--stg-ink); }
@media (max-width: 559px) { .rv-step-help { display: none; } .rv-step-label { font-size: 0.72rem; } }
.rv-flow-actions { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; align-items: flex-end; }
.rv-complete { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; flex: 1 1 24rem; }
.rv-complete .field { flex: 1 1 16rem; margin: 0; }
.btn-complete { background: #2f8f46; color: #fff; border-color: #2f8f46; }
.btn-complete:hover { background: #1d5c2e; border-color: #1d5c2e; }
.rv-stage-change { flex: 1 1 18rem; }
.rv-stage-change > summary { cursor: pointer; color: var(--navy); text-decoration: underline; padding: 0.4rem 0; }
.rv-stage-change[open] { padding: 0.8rem 1rem; background: #fff; border: 1px solid var(--rule); }
.rv-stage-pick { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; border: 0; padding: 0; margin: 0; }
.rv-stage-pick legend { margin-bottom: 0.3rem; }
.rv-stage-pick .check { display: inline-flex; align-items: center; gap: 0.35rem; }

/* history (Manage → History, and the log) */
.rv-history { margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.rv-ev { position: relative; display: grid; grid-template-columns: 10rem 1fr; gap: 0.1rem 0.8rem; padding: 0.45rem 0 0.45rem 1rem; }
.rv-ev::before { content: ""; position: absolute; left: -0.4rem; top: 0.85rem; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--paper); border: 2px solid var(--rule); }
.rv-ev-stage::before { border-color: var(--navy); }
.rv-ev-deleted::before { border-color: #a3230b; }
.rv-ev-when { grid-row: span 3; padding-top: 0.15rem; }
.rv-ev-what { font-size: 0.92rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.rv-ev-note { font-style: italic; }
@media (max-width: 559px) { .rv-ev { grid-template-columns: 1fr; } .rv-ev-when { grid-row: auto; } }

/* the log */
.rv-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0 0 1rem; }
.rv-log-tools { display: inline-flex; gap: 0.4rem; margin-left: auto; }
.rv-crlist { display: grid; gap: 0.5rem; margin: 0; padding: 0; }
.rv-cr > details { background: #fff; border: 1px solid var(--rule); box-shadow: inset 4px 0 0 var(--stg, var(--rule)); }
.rv-cr-draft { --stg: #c3c8cf; } .rv-cr-open { --stg: #2563eb; } .rv-cr-pending { --stg: #d97706; } .rv-cr-ready { --stg: #7c3aed; } .rv-cr-complete { --stg: #2f8f46; } .rv-cr-deleted { --stg: #c9ccd1; }
.rv-cr > details > summary { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto auto; gap: 0.3rem 1rem; align-items: center; padding: 0.7rem 1rem 0.7rem 1.2rem; cursor: pointer; list-style: none; }
.rv-cr > details > summary::-webkit-details-marker { display: none; }
.rv-cr > details > summary:hover .rv-cr-title strong { color: var(--flame); }
.rv-cr > details > summary:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.rv-cr-title { display: grid; min-width: 0; }
.rv-cr-title strong { overflow-wrap: anywhere; }
.rv-cr-deleted .rv-cr-title strong { text-decoration: line-through; color: var(--muted); }
.rv-cr-items { white-space: nowrap; }
.rv-cr-body { padding: 0.2rem 1.2rem 1rem; border-top: 1px solid var(--rule); }
.rv-cr-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.5rem; }
.rv-cr-cols .eyebrow { margin: 0.8rem 0 0.5rem; }
.rv-items td { vertical-align: top; font-size: 0.9rem; }
@media (max-width: 799px) {
  .rv-cr-cols { grid-template-columns: 1fr; gap: 0; }
  .rv-cr > details > summary { grid-template-columns: 1fr auto; }
  .rv-cr > details > summary .rv-cr-title { grid-column: 1 / -1; grid-row: 2; }
  .rv-cr > details > summary .rv-cr-items { grid-column: 1 / -1; grid-row: 3; }
  .rv-log-tools { margin-left: 0; }
}
.rv-activity td { vertical-align: top; }
.print-only { display: none; }
@media print {
  .rv-log .print-only { display: block; }
  body:has(.rv-log) .chrome-sticky, body:has(.rv-log) .page-hero, body:has(.rv-log) .site-footer { display: none !important; }
  .rv-log .rv-cr > details > summary { padding: 0.35rem 0.6rem; }
  .rv-log .rv-cr { break-inside: avoid; }
}

/* v2.8.1: a form on its way (site.js) — the pressed button greys out and shows it is working */
form.is-sending button[aria-busy="true"], form.is-sending input[aria-busy="true"] { opacity: .65; cursor: progress; }

/* v2.11: Phone numbers panel (profile, household, Manage → Users / Households) and Send a text */
.tag.tag-ok { color: #2f6b3a; }
.tag.tag-muted { color: var(--muted); }
.phone-list { margin: 0.25rem 0 0.5rem; }
.phone-row { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.phone-row:last-child { border-bottom: 0; }
.phone-main a { font-weight: 600; text-decoration: none; }
.phone-code { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.4rem; }
.phone-code input { width: 7.5rem; max-width: 100%; }
.phone-sms { border-left: 3px solid var(--gold); padding-left: 0.75rem; }
.phone-sms .consent-text { font-style: italic; }
.phone-add { margin-top: 0.5rem; }
.phone-add > summary { font-weight: 600; }
.sms-count { font-variant-numeric: tabular-nums; }
.sms-count.is-over { color: var(--flame); font-weight: 600; }
.sms-preview { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 0.6rem 0.8rem; max-width: 22rem; overflow-wrap: anywhere; }
.sms-audience fieldset { border: 0; padding: 0; margin: 0; }
.sms-people { max-height: 16rem; overflow: auto; border: 1px solid var(--rule); padding: 0.4rem 0.6rem; background: #fff; }
[data-sms-bad] { color: #a3230b; font-weight: 600; }
.phone-code input { padding: 0.4rem 0.55rem; border: 1px solid var(--rule); border-radius: 4px; font: inherit; background: #fff; }
.phone-edit > summary { font-size: 0.9rem; }
/* v2.11.1: the Texts tab */
.sms-panel .sms-preview.muted { color: var(--muted); font-style: italic; }
.sms-link-result { background: var(--paper); border: 1px dashed var(--gold); padding: 0.5rem 0.65rem; overflow-wrap: anywhere; }
.sms-link-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.sms-check { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; margin: 0.5rem 0; }
.sms-check details { flex-basis: 100%; }
.sms-history li { padding: 0.4rem 0; border-bottom: 1px solid var(--rule); }
.sms-history li.is-current { background: var(--paper); }
.sms-receipts .nowrap { white-space: nowrap; }
.sms-dlv-delv, .sms-dlv-clic, .sms-dlv-click, .sms-dlv-open { color: #2f6b3a; font-weight: 600; }
.sms-dlv-fail, .sms-dlv-rejc, .sms-bad-count { color: #a3230b; font-weight: 600; }
@media (max-width: 640px) {
  .sms-receipts thead { display: none; }
  .sms-receipts tr { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
  .sms-receipts td { display: block; border: 0; padding: 0.05rem 0; }
  .sms-receipts td:first-child { font-weight: 600; }
}
.sms-cell-label { display: none; color: var(--muted); font-weight: 400; }
@media (max-width: 640px) { .sms-cell-label { display: inline; } }

/* v2.11.3: My profile in tabs */
.profile-tabs .room-panel { max-width: 880px; }
@media (min-width: 900px) {
  .profile-tabs .profile-security { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
}
