/* ============================================
   Wrights Grove Communications Hub
   Design System — derived from the brand kit
   ============================================ */

:root {
  /* Brand Colors — matched to the wrightsgrove.org redesign (wgbc-redesign.netlify.app) */
  --gold: #D4A531;
  --gold-dark: #B88A1F;        /* darker gold for text/buttons that need contrast */
  --gold-light: #F3E6C4;
  --gold-soft: #FAF3E2;
  --charcoal: #1A1A1A;         /* redesign --ink */
  --charcoal-soft: #353535;    /* redesign --body */
  --stone: #6B6B6B;            /* redesign --muted */
  --cream: #F3ECE0;            /* warm panel tone (redesign --cream-deep) */
  --cream-border: #E8E2D4;     /* redesign --line */
  --white: #FFFFFF;
  --bg: #FAF7F1;               /* warm cream page background (redesign --cream) */

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', 'Calibri', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20, 18, 14, 0.05);
  --shadow-md: 0 8px 24px rgba(20, 18, 14, 0.08);
  --shadow-lg: 0 16px 48px rgba(20, 18, 14, 0.12);

  /* Layout */
  --max-w: 1080px;
  --max-w-narrow: 720px;
}

/* ============================================
   Reset & base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Base scale: 18px (was 16px) so all rem units grow proportionally. */
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--charcoal);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-feature-settings: 'kern', 'liga', 'ss01';
}

/* Skip-to-content link — invisible until tabbed to */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--charcoal);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.15s;
}
.skip-to-content:focus { top: 16px; outline: 2px solid var(--gold); outline-offset: 2px; }

/* Bigger, clearer keyboard focus rings everywhere */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  line-height: 1.15;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p {
  font-size: 1rem;
  line-height: 1.7;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.muted { color: var(--charcoal-soft); }
.subtle { color: var(--stone); font-size: 0.95rem; }

a {
  color: var(--charcoal);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--gold);
  text-decoration-thickness: 2px;
}

/* ============================================
   Layout primitives
   ============================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.stack > * + * { margin-top: var(--s-5); }
.stack-sm > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-6); }

/* ============================================
   Header / nav
   ============================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--cream-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
}

.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
}
.site-brand img {
  height: 38px;
  width: auto;
}
.site-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.site-brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}
.site-brand-sub {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  gap: var(--s-5);
  align-items: center;
}
.site-nav a {
  font-size: 0.95rem;
  color: var(--charcoal-soft);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: var(--s-3) var(--s-2);
}
.site-nav a:hover { color: var(--charcoal); }
.site-nav a.active {
  color: var(--charcoal);
}
.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
}

.signout-btn {
  background: none;
  border: 1px solid var(--cream-border);
  padding: 10px 18px;
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  margin-left: var(--s-4);
}
.signout-btn:hover {
  border-color: var(--charcoal-soft);
  color: var(--charcoal);
}

/* Mobile header: keep the brand on one line and slim the text-size control so
   the brand, menu button, and A−/A/A+ all fit across a phone without overlap. */
@media (max-width: 760px) {
  .site-header-inner { gap: var(--s-3); padding: var(--s-4); }
  .site-brand-name { font-size: 1rem; }
  .site-brand-name, .site-brand-sub { white-space: nowrap; }
}

/* Friendly confirm modal — replaces the browser's built-in confirm() */
.wg-confirm-backdrop {
  position: fixed; inset: 0;
  background: rgba(43, 43, 43, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.wg-confirm-backdrop.show { display: flex; }
.wg-confirm {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.wg-confirm h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--charcoal);
}
.wg-confirm p {
  color: var(--charcoal-soft);
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.55;
}
.wg-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.wg-confirm-actions .btn { min-width: 110px; }

/* Toast — small success message that slides in from the bottom */
.wg-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--charcoal);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
.wg-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.wg-toast::before {
  content: '✓ ';
  color: var(--gold);
  margin-right: 6px;
  font-weight: 700;
}

/* Dropdown nav groups */
.nav-group { position: relative; }
.nav-group-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--charcoal-soft);
  font-weight: 500;
  padding: var(--s-3) var(--s-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-group-toggle:hover { color: var(--charcoal); }
.nav-group-toggle .caret {
  font-size: 9px;
  margin-left: 2px;
  transition: transform 0.15s;
  display: inline-block;
}
.nav-group[aria-expanded="true"] .nav-group-toggle .caret {
  transform: rotate(180deg);
}

.nav-group-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 100;
  margin-top: 4px;
}
/* Click-only dropdowns (was hover+click; hover removed for shaky-mouse users) */
.nav-group[aria-expanded="true"] .nav-group-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-group-menu a {
  display: block;
  padding: 12px 20px;
  font-size: 0.95rem;
  color: var(--charcoal);
  text-decoration: none;
}
.nav-group-menu a:hover {
  background: var(--gold-soft);
  color: var(--charcoal);
}
.nav-group-menu a::after { display: none; }
.nav-group-menu a.active {
  color: var(--charcoal);
  background: var(--gold-soft);
  font-weight: 600;
}
.nav-group-menu a.active::after { display: none; }

.nav-group.has-active > .nav-group-toggle {
  color: var(--charcoal);
  font-weight: 600;
}

@media (max-width: 760px) {
  .nav-group { width: 100%; }
  .nav-group-toggle {
    width: 100%;
    text-align: left;
    color: var(--stone);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    padding: 12px 0 4px;
    cursor: default;
  }
  .nav-group-toggle .caret { display: none; }
  .nav-group-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    padding: 0 0 4px 12px;
    min-width: auto;
    margin: 0;
    background: transparent;
  }
  .nav-group-menu a { padding: 6px 0; font-size: 0.95rem; }
  .nav-group-menu a:hover { background: transparent; }
}

/* ============================================
   Mobile nav
   ============================================ */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-2);
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--s-5);
    border-bottom: 1px solid var(--cream-border);
    transform: translateY(-100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: -1;
    visibility: hidden;
  }
  .site-nav.open {
    transform: translateY(0);
    visibility: visible;
  }
}

/* ============================================
   Page hero
   ============================================ */
.hero {
  padding: var(--s-9) 0 var(--s-7);
  text-align: center;
}
.hero h1 {
  margin-top: var(--s-3);
  margin-bottom: var(--s-4);
}
.hero p {
  font-size: 1.15rem;
  color: var(--charcoal-soft);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--r-md);
  padding: var(--s-6);
  transition: all 0.25s ease;
}
.card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card h3 {
  margin-bottom: var(--s-2);
  color: var(--charcoal);
}
.card p { color: var(--charcoal-soft); font-size: 0.95rem; }

.card-eyebrow {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--s-3);
}

/* Card grid */
.grid {
  display: grid;
  gap: var(--s-5);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ============================================
   Forms
   ============================================ */
.field-group {
  margin-bottom: var(--s-5);
}

.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: var(--s-2);
}

.field-hint {
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  font-style: italic;
  margin-bottom: var(--s-3);
  margin-top: -4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-sm);
  padding: var(--s-3) var(--s-4);
  transition: all 0.2s ease;
  line-height: 1.5;
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font-body);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 14px var(--s-5);
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--charcoal);
  color: var(--white);
}
.btn-primary:hover {
  background: #000;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: var(--gold);
  color: var(--charcoal);
}
.btn-gold:hover {
  background: #C2962A;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--charcoal);
}

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--cream-border);
}
.btn-ghost:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.btn-sm {
  padding: 6px var(--s-3);
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* ============================================
   Output / result blocks
   ============================================ */
.output-block {
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-left: 4px solid var(--gold);
  border-radius: var(--r-sm);
  padding: var(--s-5);
  margin-top: var(--s-4);
  position: relative;
  font-family: var(--font-body);
  white-space: pre-wrap;
  line-height: 1.7;
}

.output-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--cream-border);
}

.output-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.copy-btn {
  background: var(--white);
  border: 1px solid var(--cream-border);
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--charcoal-soft);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}
.copy-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.copy-btn.copied {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.output-body {
  font-size: 0.95rem;
  color: var(--charcoal);
  white-space: pre-wrap;
}

/* ============================================
   Pills (for filters / tags)
   ============================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--r-pill);
  color: var(--charcoal-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.pill:hover {
  border-color: var(--charcoal-soft);
  color: var(--charcoal);
}
.pill.active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

/* ============================================
   Section dividers
   ============================================ */
.section-rule {
  border: none;
  border-top: 1px solid var(--cream-border);
  margin: var(--s-7) 0;
}

.gold-mark {
  text-align: center;
  color: var(--gold);
  font-size: 1.5rem;
  margin: var(--s-7) 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--cream-border);
  padding: var(--s-7) 0 var(--s-6);
  margin-top: var(--s-9);
  text-align: center;
  color: var(--charcoal-soft);
  font-size: 0.85rem;
}
.site-footer p { margin-top: var(--s-2); }
.site-footer .verse {
  font-style: italic;
  color: var(--charcoal-soft);
  margin-bottom: var(--s-2);
}

/* ============================================
   Password gate
   ============================================ */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
  background: var(--bg);
}
.gate-card {
  max-width: 420px;
  width: 100%;
  background: var(--white);
  border-radius: var(--r-md);
  padding: var(--s-7);
  text-align: center;
  border: 1px solid var(--cream-border);
  box-shadow: var(--shadow-lg);
}
.gate-card img {
  height: 100px;
  margin-bottom: var(--s-4);
}
.gate-card h2 {
  margin-bottom: var(--s-2);
  font-size: 1.5rem;
}
.gate-card .muted {
  margin-bottom: var(--s-6);
  font-size: 0.9rem;
}
.gate-error {
  color: #B85450;
  font-size: 0.85rem;
  margin-top: var(--s-3);
  font-style: italic;
}

/* ============================================
   Brand guide page
   ============================================ */
.swatch-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s-5);
  align-items: center;
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--cream-border);
}
.swatch-row:last-child { border-bottom: none; }

.swatch {
  width: 200px;
  height: 140px;
  border-radius: var(--r-sm);
  border: 1px solid var(--cream-border);
}

.swatch-info h4 {
  margin-bottom: var(--s-3);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.swatch-codes {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-2);
  font-size: 0.85rem;
  margin-bottom: var(--s-3);
}
.swatch-codes .label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
}
.swatch-codes .value {
  font-family: var(--font-mono);
  color: var(--charcoal);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .swatch-row { grid-template-columns: 1fr; }
  .swatch { width: 100%; max-width: 280px; }
}

/* ============================================
   Voice example boxes
   ============================================ */
.voice-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  margin: var(--s-5) 0;
}
@media (max-width: 600px) {
  .voice-pair { grid-template-columns: 1fr; }
}

.voice-cell {
  padding: var(--s-5);
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  font-style: italic;
}
.voice-cell.before {
  background: #F7F7F7;
  border: 1px solid #E5E5E5;
  color: var(--charcoal-soft);
}
.voice-cell.after {
  background: var(--cream);
  border: 1px solid var(--gold);
  color: var(--charcoal);
}
.voice-cell .voice-label {
  display: block;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.voice-cell.before .voice-label { color: var(--charcoal-soft); }
.voice-cell.after .voice-label { color: var(--gold); }

/* ============================================
   Subject line library
   ============================================ */
.subject-card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-left: 3px solid var(--gold);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  transition: all 0.2s ease;
}
.subject-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--gold);
}
.subject-text {
  font-size: 1rem;
  color: var(--charcoal);
  font-weight: 500;
  flex: 1;
}
.subject-cat {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ============================================
   Channel labels (announcement builder)
   ============================================ */
.channel-output {
  margin-bottom: var(--s-6);
}

/* ============================================
   Loading spinner
   ============================================ */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gold-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Page-load fade-in
   ============================================ */
.fade-in {
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hidden by default — toggled by JS */
.hidden { display: none !important; }

/* ============================================
   Disabled state (e.g. AI not configured)
   ============================================ */
.notice {
  background: var(--gold-soft);
  border: 1px solid var(--gold-light);
  border-left: 4px solid var(--gold);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-5);
  font-size: 0.9rem;
  color: var(--charcoal);
}
.notice strong { color: var(--charcoal); }

/* ============================================
   Print
   ============================================ */
/* ============================================
   Print styles — for paper handouts and binders.
   The admin team will print directly from the browser.
   ============================================ */
@media print {
  /* Page setup */
  @page { margin: 0.6in; }
  html { font-size: 11pt; }
  body {
    background: white;
    color: black;
    line-height: 1.45;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide things that don't belong on paper */
  .site-header, .site-footer, .site-nav, .nav-toggle,
  .text-size, .skip-to-content,
  .admin-bar, .admin-tabs, .members-controls, .add-member-btn,
  .m-actions, .org-chart-actions, .nav-group,
  .wg-confirm-backdrop, .wg-toast, .modal-backdrop,
  .ministry-toc, button, .copy-btn, .signout-btn,
  .back-to-top, .print-btn {
    display: none !important;
  }

  /* Show full URLs after links (so paper is useful even disconnected) */
  a[href^="http"]::after,
  a[href^="/"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
    word-break: break-all;
  }
  a[href^="mailto:"]::after,
  a[href^="tel:"]::after,
  a[href^="#"]::after { content: ""; }

  /* Color-safe versions of brand bits */
  h1, h2, h3, h4 { color: #000; page-break-after: avoid; }
  h1 { font-size: 22pt; }
  h2 { font-size: 16pt; }
  h3 { font-size: 13pt; }
  .eyebrow { color: #666; font-size: 8pt; }

  /* Keep cards / sections from breaking across pages */
  .card, .person-card, .ministry-block, .admin-ministry, .photo-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: white !important;
  }

  /* Grids stack to a single column on paper */
  .grid, .grid-2, .dir-grid, .members-grid {
    display: block;
  }
  .grid > *, .dir-grid > *, .members-grid > * {
    margin-bottom: 12pt;
  }

  /* Tables */
  table, .roster-table {
    border-collapse: collapse;
    width: 100%;
    page-break-inside: auto;
  }
  thead { display: table-header-group; }
  tr { page-break-inside: avoid; }
  th, td { border: 1px solid #999; padding: 6pt 8pt; }

  /* Verse / footer-style block */
  .verse { font-style: italic; color: #555; }

  /* Hide the QR code section on print (Gallery page) */
  .submit-banner, .qr-card { display: none !important; }

  /* Make sure main content uses the full width */
  main, .container, .container-narrow {
    max-width: 100% !important;
    padding: 0 !important;
  }
}

/* Visible "Print this page" button styling */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--r-sm);
  color: var(--charcoal-soft);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.print-btn:hover {
  border-color: var(--gold);
  color: var(--charcoal);
  background: var(--gold-soft);
}

/* Back-to-top button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--white);
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.15s;
  z-index: 90;
}
.back-to-top.show { opacity: 0.85; visibility: visible; }
.back-to-top:hover { opacity: 1; transform: translateY(-2px); }
