/* ============================================================
   ChucksList — site.css  (Accessible Edition)
   • Respects browser font-size preference (rem-only, no html px lock)
   • Fluid type scale with clamp() — scales with viewport
   • Light / dark mode: prefers-color-scheme + data-theme toggle
   • All original selectors preserved — drop-in replacement
   ============================================================ */


/* ============================================================
   DESIGN TOKENS — LIGHT MODE
   ============================================================ */

:root,
[data-theme="light"] {
  /* Surfaces
     Aligned 2026-08-18 to the Chuck's List campaign-email palette
     (scripts/campaign_theme.py CL_PAPER/CL_SURFACE/CL_ROW_ALT/CL_IMAGE_FRAME)
     so the website and the email share one signature tone. */
  --color-bg:            #f5efe4;   /* CL_PAPER */
  --color-surface:       #fdf9f3;   /* CL_SURFACE */
  --color-surface-2:     #f7f2e8;   /* CL_ROW_ALT */
  --color-surface-3:     #efe8dc;   /* CL_IMAGE_FRAME */
  --color-border:        rgba(182, 99, 36, 0.18);  /* derived from CL_LINK */

  /* Text (CL_INK / CL_MUTED from the email palette) */
  --color-text:          #221d17;   /* CL_INK */
  --color-text-muted:    #665b50;   /* CL_MUTED */
  --color-text-soft:     #8a7a68;   /* lighter step between muted and border */
  --color-text-inverse:  #ffffff;

  /* Primary (email link/CTA rust-orange, CL_LINK) */
  --color-primary:       #b66324;
  --color-primary-hover: #96501d;
  --color-primary-soft:  rgba(182, 99, 36, 0.08);

  /* Accent (email header/footer link accent, CL_FOOTER_LINK) */
  --color-accent:        #e19a60;
  --color-accent-soft:   #e8c8a6;

  /* Highlight (email header/footer band green, CL_BAND) */
  --color-highlight:       #2b3d2e;
  --color-highlight-hover: #1f2c22;
  --color-highlight-soft:  #d9e7e0;

  /* Semantic */
  --color-success: #437a22;
  --color-warning: #9b5b17;
  --color-danger:  #8a2f2a;

  /* Shadows */
  --shadow-sm: 0 2px 8px  rgba(42, 28, 16, 0.08);
  --shadow-md: 0 8px 24px rgba(42, 28, 16, 0.12);
  --shadow-lg: 0 16px 40px rgba(42, 28, 16, 0.16);

  /* Border radius */
  --radius-sm:   0.4rem;
  --radius-md:   0.75rem;
  --radius-lg:   1.25rem;
  --radius-pill: 999px;

  /* Layout */
  --content-width:  1180px;
  --content-narrow: 760px;

  /* Spacing (4px base unit) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* ── Fluid type scale ────────────────────────────────────────
     All values use rem so they scale with the user's browser
     font-size setting (e.g., if they've set 20px as default,
     everything scales up proportionally).
     clamp(floor, preferred, ceiling)
     ──────────────────────────────────────────────────────── */
  --text-xs:   clamp(0.8125rem,  0.78rem  + 0.18vw, 0.9375rem);  /* 13→15px */
  --text-sm:   clamp(0.9375rem,  0.9rem   + 0.22vw, 1.0625rem);  /* 15→17px */
  --text-base: clamp(1.0625rem,  1rem     + 0.28vw, 1.1875rem);  /* 17→19px */
  --text-lg:   clamp(1.1875rem,  1.1rem   + 0.55vw, 1.4375rem);  /* 19→23px */
  --text-xl:   clamp(1.5rem,     1.3rem   + 1vw,    2.25rem);    /* 24→36px */
  --text-2xl:  clamp(2rem,       1.5rem   + 2vw,    3.5rem);     /* 32→56px */

  /* Transitions */
  --transition-base: 180ms ease;
}


/* ============================================================
   DESIGN TOKENS — DARK MODE
   prefers-color-scheme is the default; data-theme allows manual toggle
   ============================================================ */

[data-theme="dark"],
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Surfaces
       Aligned 2026-08-18 to the campaign email's dark-mode overrides
       (scripts/campaign_theme.py email_style_css() prefers-color-scheme
       block) so light/dark tone on the website matches the email. */
    --color-bg:            #141413;
    --color-surface:       #1e221b;
    --color-surface-2:     #1e221c;
    --color-surface-3:     #232924;
    --color-border:        rgba(225, 154, 96, 0.16);

    /* Text */
    --color-text:          #f3eadb;
    --color-text-muted:    #d3c7b8;
    --color-text-soft:     #a99a86;
    --color-text-inverse:  #141413;

    /* Primary (email dark-mode link color) */
    --color-primary:       #e19a60;
    --color-primary-hover: #eeb686;
    --color-primary-soft:  rgba(225, 154, 96, 0.14);

    /* Accent */
    --color-accent:        #d6edf0;
    --color-accent-soft:   rgba(214, 237, 240, 0.16);

    /* Highlight (email section-label teal, dark variant) */
    --color-highlight:       #244145;
    --color-highlight-hover: #2f545a;
    --color-highlight-soft:  rgba(214, 237, 240, 0.15);

    /* Semantic */
    --color-success: #6daa45;
    --color-warning: #d4902a;
    --color-danger:  #d46060;

    /* Shadows */
    --shadow-sm: 0 2px 8px  rgba(0, 0, 0, 0.28);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.46);
  }
}

/* Manual toggle override — wins over media query */
[data-theme="dark"] {
  --color-bg:            #141413;
  --color-surface:       #1e221b;
  --color-surface-2:     #1e221c;
  --color-surface-3:     #232924;
  --color-border:        rgba(225, 154, 96, 0.16);
  --color-text:          #f3eadb;
  --color-text-muted:    #d3c7b8;
  --color-text-soft:     #a99a86;
  --color-text-inverse:  #141413;
  --color-primary:       #e19a60;
  --color-primary-hover: #eeb686;
  --color-primary-soft:  rgba(225, 154, 96, 0.14);
  --color-accent:        #d6edf0;
  --color-accent-soft:   rgba(214, 237, 240, 0.16);
  --color-highlight:       #244145;
  --color-highlight-hover: #2f545a;
  --color-highlight-soft:  rgba(214, 237, 240, 0.15);
  --color-success: #6daa45;
  --color-warning: #d4902a;
  --color-danger:  #d46060;
  --shadow-sm: 0 2px 8px  rgba(0, 0, 0, 0.28);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.46);
}


/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  /* ── Do NOT set font-size in px here ──────────────────────
     Leaving html font-size unset (or at 100%) means 1rem
     equals whatever the user has chosen in their browser
     settings. This is the single most important accessibility
     rule for font sizing.
     ────────────────────────────────────────────────────── */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: none;
  text-size-adjust: none;
  scroll-padding-top: var(--space-16);
  hanging-punctuation: first last;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    linear-gradient(180deg, rgba(245, 239, 228, 0.95), rgba(245, 239, 228, 0.985)),
    radial-gradient(circle at top left,  rgba(225, 154, 96, 0.08),  transparent 32%),
    radial-gradient(circle at top right, rgba(43,  61, 46, 0.10),  transparent 28%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Dark mode body background uses dark surfaces */
[data-theme="dark"] body,
@media (prefers-color-scheme: dark) {
  body {
    background-image:
      linear-gradient(180deg, rgba(20, 20, 19, 0.98), rgba(20, 20, 19, 1)),
      radial-gradient(circle at top left,  rgba(225, 154, 96, 0.06),  transparent 32%),
      radial-gradient(circle at top right, rgba(36, 65, 69, 0.07), transparent 28%);
  }
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  line-height: 1.1;
  text-wrap: balance;
}

p, ul, ol {
  margin-top: 0;
}

p,
li,
figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition:
    color var(--transition-base),
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

a:hover,
a:focus {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

::selection {
  background: rgba(122, 46, 31, 0.18);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

table {
  border-collapse: collapse;
  width: 100%;
}


/* ============================================================
   DARK MODE THEME TOGGLE BUTTON
   Add this anywhere in your base template:
     <button data-theme-toggle aria-label="Switch to dark mode"
             title="Toggle light/dark mode"
             style="position:fixed;bottom:1.25rem;right:1.25rem;
                    z-index:9999;">🌙</button>
   Then include the JS snippet below in your base template.
   ============================================================ */

[data-theme-toggle] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

[data-theme-toggle]:hover {
  background: var(--color-surface-2);
  box-shadow: var(--shadow-md);
}


/* ============================================================
   ACCESSIBILITY UTILITIES
   ============================================================ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  z-index: 1000;
  border-radius: var(--radius-sm);
}

.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;
}


/* ============================================================
   LAYOUT
   ============================================================ */

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.container-narrow {
  width: min(calc(100% - 2rem), var(--content-narrow));
  margin: 0 auto;
}


/* ============================================================
   HEADER & NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 242, 0.96);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .site-header {
  background: rgba(33, 29, 24, 0.96);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: 78px;
  padding: var(--space-4) 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--color-text-inverse);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(145deg, var(--color-primary), var(--color-accent));
  box-shadow: var(--shadow-sm);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.1;
}

.brand-subtitle {
  margin: 0.15rem 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Nav */

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__item {
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  touch-action: manipulation;
}

.site-nav__list a:hover,
.site-nav__list a:focus {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  text-decoration: none;
}

.site-nav__list a.is-active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.nav-logout-form {
  display: inline-flex;
  margin: 0;
}

.nav-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 0.95rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.nav-logout-button:hover,
.nav-logout-button:focus {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* Admin subnav */

.admin-subnav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.admin-subnav__inner {
  display: flex;
}

.admin-subnav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  width: 100%;
}

/* Each workflow area (Review workflow / Setup / Diagnostics) is a native
   <details> "nested menu" -- works without JS, and the summary reads like
   a normal nav pill until expanded. Groups are mutually exclusive and
   auto-close on outside click/Escape via the small script in base.html. */
.admin-subnav__group {
  position: relative;
  /* Opening a group on mobile pushes the rest of the list down; without
     this, Chromium's scroll-anchoring can nudge the viewport right as a
     follow-up tap on a newly-revealed flyout link lands, occasionally
     cancelling that tap's navigation ("menu hangs" on mobile). */
  overflow-anchor: none;
}

.admin-subnav__group summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
  /* Skip the browser's double-tap-to-zoom ambiguity delay on this
     control, so a tap always registers as a single, immediate toggle. */
  touch-action: manipulation;
}

.admin-subnav__group summary::-webkit-details-marker {
  display: none;
}

.admin-subnav__group summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.admin-subnav__group[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.admin-subnav__group summary:hover,
.admin-subnav__group summary:focus,
.admin-subnav__group summary.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.admin-subnav__flyout {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0.35rem;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.admin-subnav__flyout a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
}

.admin-subnav__flyout a:hover,
.admin-subnav__flyout a:focus {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.admin-subnav__flyout a.is-active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

@media (min-width: 761px) {
  /* Desktop: flyout is a real dropdown panel anchored under its summary,
     so opening it doesn't push the rest of the page down. */
  .admin-subnav__flyout {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 210;
  }
}

@media (max-width: 760px) {
  .admin-subnav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-subnav__group summary {
    width: 100%;
  }

  .admin-subnav__flyout {
    width: 100%;
    box-shadow: none;
  }
}

/* Hamburger toggle */

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  touch-action: manipulation;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-text);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin-left: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    z-index: 200;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: var(--space-3) var(--space-4);
    gap: 0.25rem;
  }

  .site-nav__list a {
    width: 100%;
    justify-content: flex-start;
  }
}


/* ============================================================
   HERO & PAGE HERO
   ============================================================ */

.hero,
.page-hero {
  padding: var(--space-16) 0 var(--space-12);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-8);
  align-items: stretch;
}

.hero-side {
  display: grid;
  gap: var(--space-4);
}

.hero h1,
.page-hero h1 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-2xl);
  line-height: 0.98;
}

.hero h1 {
  max-width: 12ch;
}

.hero p,
.page-hero p {
  margin: 0 0 var(--space-5);
  max-width: 72ch;
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero-mini-list {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.hero-mini-list li {
  position: relative;
  padding-left: 1rem;
}

.hero-mini-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translateY(-50%);
}


/* ============================================================
   GRIDS
   ============================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.split-grid,
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: var(--space-6);
}


/* ============================================================
   CARDS & PANELS
   ============================================================ */

.hero-panel,
.panel,
.feature-card,
.contact-card,
.list-card,
.process-step,
.portal-card,
.highlight-card,
.page-card,
.archive-item,
.event-item,
.board-card,
.empty-state,
#events-calendar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-panel {
  padding: var(--space-10);
}

.panel,
.feature-card,
.contact-card,
.list-card,
.process-step,
.portal-card,
.highlight-card,
.page-card,
.archive-item,
.event-item,
.board-card {
  padding: var(--space-6);
}

.highlight-card {
  background:
    linear-gradient(180deg, rgba(43, 61, 46, 0.09), rgba(43, 61, 46, 0.02)),
    var(--color-surface);
  border-color: rgba(43, 61, 46, 0.18);
}

[data-theme="dark"] .highlight-card {
  background:
    linear-gradient(180deg, rgba(36, 65, 69, 0.09), rgba(36, 65, 69, 0.02)),
    var(--color-surface);
  border-color: rgba(36, 65, 69, 0.22);
}


/* ============================================================
   BADGES & LABELS
   ============================================================ */

.eyebrow,
.kicker,
.chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow,
.chip,
.tag {
  border-radius: var(--radius-pill);
}

.eyebrow {
  margin-bottom: var(--space-4);
  padding: 0.45rem 0.8rem;
  background: var(--color-accent-soft);
  color: var(--color-primary);
  text-transform: uppercase;
}

.kicker {
  margin-bottom: var(--space-3);
  color: var(--color-highlight);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chip {
  padding: 0.2rem 0.55rem;
  background: var(--color-highlight-soft);
  color: var(--color-highlight);
}

.chip--origin {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

.chip--warning {
  background: rgba(225, 154, 96, 0.15);
  color: var(--color-primary);
}

.chip--sm {
  padding: 0.15rem 0.45rem;
  font-size: var(--text-xs);
}

.submission-audit-history {
  margin-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
}

.submission-audit-history__list {
  list-style: none;
  margin: var(--space-2) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.submission-audit-history__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.tag {
  padding: 0.35rem 0.65rem;
  background: rgba(225, 154, 96, 0.10);
  color: var(--color-primary);
}

[data-theme="dark"] .tag {
  background: rgba(225, 154, 96, 0.12);
}

.tag-chip-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 0.35rem);
  background: var(--color-surface, #fff);
}

.tag-chip-input__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag-chip-input__text {
  flex: 1 1 8rem;
  min-width: 8rem;
  border: none;
  outline: none;
  padding: 0.35rem 0.2rem;
  background: transparent;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.35rem 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(225, 154, 96, 0.10);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 700;
}

[data-theme="dark"] .tag-chip {
  background: rgba(225, 154, 96, 0.12);
}

.tag-chip__remove {
  border: none;
  background: none;
  cursor: pointer;
  font-size: var(--text-sm);
  line-height: 1;
  color: inherit;
  padding: 0 0.2rem;
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ============================================================
   TYPOGRAPHY — HEADINGS & TEXT
   ============================================================ */

.highlight-card h2,
.panel h2,
.section-heading h2,
.page-hero h1 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xl);
  line-height: 1.06;
}

.feature-card h3,
.list-card h3,
.contact-card h3,
.process-step h3,
.panel h3,
.portal-card h3,
.page-card h3,
.archive-item h3,
.event-item h3,
.board-card h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
  line-height: 1.15;
}

.highlight-card p,
.panel p,
.section-heading p,
.feature-card p,
.contact-card p,
.list-card p,
.process-step p,
.portal-card p,
.page-card p,
.brand-subtitle,
.archive-meta,
.event-meta,
.board-card__meta,
.event-detail-meta,
.mini-feed-meta {
  color: var(--color-text-muted);
}

.inline-actions,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.tag-row {
  gap: var(--space-2);
  margin-top: var(--space-4);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  transition:
    color var(--transition-base),
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.button-primary {
  color: var(--color-text-inverse);
  background: var(--color-primary);
}

.button-primary:hover,
.button-primary:focus {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  text-decoration: none;
}

.button-secondary {
  color: var(--color-primary);
  background: transparent;
  border-color: rgba(122, 46, 31, 0.25);
}

.button-secondary:hover,
.button-secondary:focus {
  background: var(--color-primary-soft);
  text-decoration: none;
}

[data-theme="dark"] .button-secondary {
  border-color: rgba(225, 154, 96, 0.28);
}

.button-approve {
  color: var(--color-text-inverse);
  background: var(--color-success);
}

.button-approve:hover,
.button-approve:focus {
  background: var(--color-success);
  filter: brightness(0.92);
  color: var(--color-text-inverse);
  text-decoration: none;
}

.button-danger {
  color: var(--color-text-inverse);
  background: var(--color-danger);
}

.button-danger:hover,
.button-danger:focus {
  background: var(--color-danger);
  filter: brightness(0.92);
  color: var(--color-text-inverse);
  text-decoration: none;
}

.button-small {
  min-height: 32px;
  padding: 0.35rem 0.7rem;
  font-size: var(--text-sm);
}

/* ============================================================
   COMPACT ADMIN SUBMISSION TABLE (v2.6 -- 9.5)
   ============================================================ */

.table-scroll {
  overflow-x: auto;
}

.admin-queue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.admin-queue-table th,
.admin-queue-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid rgba(122, 46, 31, 0.14);
  white-space: nowrap;
  vertical-align: middle;
}

[data-theme="dark"] .admin-queue-table th,
[data-theme="dark"] .admin-queue-table td {
  border-bottom-color: rgba(230, 185, 140, 0.16);
}

.admin-queue-table th {
  font-weight: 700;
  position: sticky;
  top: 0;
  background: var(--color-surface);
}

.admin-queue-table td:nth-child(2) {
  white-space: normal;
  max-width: 320px;
}

/* Keep Approve/Reject/Archive/Split reachable without requiring an
   operator to scroll a wide table horizontally (v2.6.4 P0.3): the actions
   cell sticks to the right edge of the scrollable table area, with a
   background/shadow so it stays legible over the row content behind it. */
.admin-queue-table th:last-child,
.admin-queue-table td:last-child {
  position: sticky;
  right: 0;
  background: var(--color-surface);
  box-shadow: -6px 0 6px -6px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .admin-queue-table th:last-child,
[data-theme="dark"] .admin-queue-table td:last-child {
  background: var(--color-surface);
}

.admin-queue-table th:last-child {
  z-index: 2;
}

.admin-queue-table__actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  white-space: normal;
}

.admin-queue-table__actions form {
  display: inline;
}

/* Pagination controls for /admin/queue and /admin/submissions (P0.2) */
.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.admin-pagination__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.admin-pagination__summary,
.admin-pagination__page {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.admin-pagination .is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.chip--ready {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.filter-form--compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}


/* ============================================================
   SECTIONS
   ============================================================ */

.section,
.page-header,
.board-filters,
.calendar-shell,
.board-results,
.event-group {
  padding: var(--space-8) 0;
}

.section-heading {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.event-group h2 {
  margin-bottom: 1rem;
}


/* ============================================================
   WEATHER CARDS
   ============================================================ */

.weather-grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .weather-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.weather-card {
  padding: var(--space-8);
}

.weather-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.weather-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-inverse);
  background: var(--color-text-soft);
}

.weather-card__icon--noaa { background: #004f9f; }
.weather-card__icon--wu   { background: #1f4e79; }
.weather-card__icon--dwg  { background: #2f5d50; }
.weather-card__icon--fire { background: #8a2f2a; }

.weather-card__subtitle {
  margin: 0.15rem 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.weather-card__external {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}


/* ============================================================
   LISTS
   ============================================================ */

.hero-mini-list,
.footer-links,
.footer-meta,
.mini-feed,
.archive-list,
.event-list,
.meta-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-feed,
.archive-list,
.event-list,
.board-list {
  display: grid;
  gap: var(--space-4);
}

.board-list {
  gap: 1rem;
}

.list-excerpt {
  margin: 0 0 var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.edition-toc {
  margin-bottom: var(--space-8);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface-2);
}

.edition-toc h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
}

.edition-toc ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding-left: 1.25rem;
}

.edition-section {
  margin-top: var(--space-8);
  scroll-margin-top: 6rem;
}

.edition-section:first-child {
  margin-top: 0;
}

.edition-section__band {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.edition-section__band h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.edition-entry {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}

.edition-entry h3 {
  margin: 0 0 var(--space-2);
}

.edition-entry .rich-copy p {
  margin-top: 0;
  margin-bottom: var(--space-2);
}

.edition-entry .rich-copy p:last-child {
  margin-bottom: 0;
}

.edition-entry--with-image {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  flex-wrap: wrap;
}

.edition-entry--with-image .edition-entry__body {
  flex: 1 1 320px;
  min-width: 0;
}

.edition-entry__thumb {
  flex: 0 0 auto;
  margin: 0;
}

.edition-entry__thumb img {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.list-thumb {
  flex: 0 0 auto;
  margin: 0;
}

.list-thumb img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.list-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-soft);
  font-size: var(--text-xs);
  text-align: center;
}

.detail-inline-image {
  margin: var(--space-5) 0;
}

.detail-inline-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.detail-image-link {
  display: block;
  border-radius: var(--radius-md);
  /* Images across public event/bulletin/job detail pages are wrapped
     in a link to their full-size original so visitors can open,
     save, or download them -- a cursor + subtle hover affordance
     makes that clickable/expected behavior visible. */
  transition: opacity 0.15s ease;
}

.detail-image-link:hover,
.detail-image-link:focus-visible {
  opacity: 0.85;
}

.detail-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
}

.detail-image-gallery img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

@media (max-width: 760px) {
  .edition-entry--with-image {
    flex-direction: column-reverse;
  }

  .edition-entry__thumb img {
    /* Keep a bounded thumbnail box on mobile instead of a full-width,
       height:auto image that made list rows feel oversized. */
    width: 100%;
    height: 180px;
  }

  .list-thumb img,
  .list-thumb--empty {
    width: 64px;
    height: 64px;
  }
}

.jobs-board-heading {
  margin-bottom: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--color-accent);
  background: var(--color-surface-2);
}

.jobs-board-heading .kicker {
  margin-bottom: var(--space-2);
}

.jobs-board-heading h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
}

.jobs-board-heading p {
  margin: 0;
  color: var(--color-text-muted);
}

.jobs-list {
  gap: 0;
  border-top: 1px solid var(--color-border);
}

.jobs-list .board-card .rich-copy {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jobs-list .board-card {
  padding: var(--space-5) 0;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-queue-list {
  gap: 0;
  border-top: 1px solid var(--color-border);
}

.admin-queue-list .board-card {
  padding: var(--space-5) 0;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.board-card--with-image {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  flex-wrap: wrap;
}

.board-card--with-image .board-card__body {
  flex: 1 1 320px;
  min-width: 0;
}

@media (max-width: 760px) {
  .board-card--with-image {
    flex-direction: column-reverse;
  }
}

.mini-feed li {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.mini-feed li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mini-feed-title {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
  color: var(--color-text);
}

.archive-meta,
.event-meta,
.meta-line,
.board-card__meta,
.event-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
}

.event-detail-meta {
  margin: 1rem 0;
}

.post-attachment {
  margin: 1.25rem 0;
  padding: var(--space-4, 1rem);
  border: 1px solid var(--border-color, #D9CFC0);
  border-radius: var(--radius-md, 8px);
  background: var(--surface-alt, rgba(0, 0, 0, 0.03));
}

.post-attachment h3 {
  margin: 0 0 0.35rem;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-attachment__meta {
  margin: 0 0 0.75rem;
  font-size: var(--text-sm);
  color: var(--text-muted, #665B50);
}

.post-attachment .button {
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  .post-attachment {
    border-color: var(--border-color-dark, #2F322B);
    background: rgba(255, 255, 255, 0.04);
  }
}

.archive-body,
.event-body,
.rich-copy {
  /* Rendered post bodies come from admin/operator-authored markdown and
     can contain long unbroken tokens (URLs pasted with no spaces, etc).
     Without this, such a token never wraps and pushes the surrounding
     card/page into horizontal overflow on both public pages and the
     admin preview panel. */
  overflow-wrap: break-word;
  word-break: break-word;
}

.archive-body img,
.event-body img,
.rich-copy img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: var(--space-4) 0;
  border-radius: var(--radius-md);
}

.archive-body p:last-child,
.event-body p:last-child,
.notice-box p:last-child {
  margin-bottom: 0;
}


/* ============================================================
   NOTICES & CALLOUTS
   ============================================================ */

.notice-box,
.portal-note {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.flash-shell {
  padding: var(--space-4) 0 0;
}

.flash-stack {
  display: grid;
  gap: var(--space-3);
}

.flash-message {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-highlight);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.flash-message--success {
  border-left-color: var(--color-success);
}

.flash-message--warning {
  border-left-color: var(--color-warning);
}

.flash-message--error {
  border-left-color: var(--color-danger);
}

.notice-box {
  border-left: 4px solid var(--color-accent);
  background: rgba(225, 154, 96, 0.08);
}

[data-theme="dark"] .notice-box {
  background: rgba(212, 129, 74, 0.10);
}

.notice-box--warning {
  border-left-color: var(--color-warning, #a86b00);
}

.notice-box--warning strong {
  color: var(--color-text);
}

.notice-box__actions {
  margin-top: var(--space-2, 0.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1, 0.25rem);
}

.portal-note {
  margin-top: var(--space-4);
  border-left: 4px solid var(--color-highlight);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(43, 61, 46, 0.08);
  font-size: var(--text-sm);
}

[data-theme="dark"] .portal-note {
  background: rgba(36, 65, 69, 0.10);
}

.embed-placeholder {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  min-height: 260px;
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 2px dashed rgba(122, 46, 31, 0.25);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .embed-placeholder {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(225, 154, 96, 0.22);
}

.embed-placeholder strong {
  font-size: var(--text-base);
}

.embed-placeholder code {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  border-radius: 0.35rem;
  background: var(--color-primary-soft);
  font-size: var(--text-sm);
}


/* ============================================================
   FORMS
   ============================================================ */

.form-grid {
  display: grid;
  gap: var(--space-4);
}

.form-row {
  display: grid;
  gap: var(--space-2);
}

.form-row label {
  font-weight: 700;
  font-size: var(--text-base);
}

.form-row input,
.form-row select,
.form-row textarea,
.filter-form input,
.filter-form select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(122, 46, 31, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
  font-size: var(--text-base);
  color: var(--color-text);
}

[data-theme="dark"] .form-row input,
[data-theme="dark"] .form-row select,
[data-theme="dark"] .form-row textarea,
[data-theme="dark"] .filter-form input,
[data-theme="dark"] .filter-form select {
  background: var(--color-surface-2);
  border-color: rgba(230, 185, 140, 0.20);
  color: var(--color-text);
}

.form-row textarea {
  min-height: 160px;
  resize: vertical;
}

.required-note {
  font-weight: 400;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted, #665B50);
}

.workflow-notice {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border-left: 3px solid var(--color-accent, #9E5514);
  background: rgba(158, 85, 20, 0.08);
  font-size: var(--text-sm);
}

[data-theme="dark"] .workflow-notice {
  background: rgba(230, 185, 140, 0.10);
}

.form-error-summary {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border: 2px solid var(--color-danger, #a3312a);
  border-radius: var(--radius-sm);
  background: rgba(163, 49, 42, 0.08);
}

.form-error-summary a {
  font-weight: 700;
}

.field-error {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-danger, #a3312a);
}

.form-warning {
  padding: var(--space-3);
  border: 1px solid rgba(178, 58, 34, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(178, 58, 34, 0.08);
}

.form-warning strong {
  color: #8a2c17;
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 400;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: auto;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: var(--color-highlight);
  box-shadow: 0 0 0 3px rgba(43, 61, 46, 0.12);
}

.form-row input:focus-visible,
.form-row select:focus-visible,
.form-row textarea:focus-visible,
.filter-form input:focus-visible,
.filter-form select:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 2px;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-form span {
  font-weight: 600;
  font-size: var(--text-sm);
}

.filter-form button {
  min-height: 46px;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-highlight);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 700;
  transition:
    background-color var(--transition-base),
    box-shadow var(--transition-base);
}

.filter-form button:hover,
.filter-form button:focus {
  background: var(--color-highlight-hover);
}

.filter-note {
  margin: 0.75rem 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.filter-note a {
  font-weight: 600;
}

.empty-state {
  padding: 2rem 1rem;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.5);
}

.admin-summary-grid,
.admin-edit-grid {
  align-items: start;
}

/* v2.6.4 P1.4: operator feedback described the permanent side-by-side
   working-copy/preview layout as cramped. Stack the editor above the
   preview by default at every breakpoint; .admin-summary-grid (import
   job/campaign summary panels) is unaffected. */
.admin-edit-grid {
  grid-template-columns: 1fr;
}

.staging-edit-workspace {
  grid-template-columns: 1fr;
}

.admin-editor,
.admin-preview {
  height: 100%;
}

.admin-editor .form-grid {
  gap: var(--space-5);
}

.admin-editor__content textarea {
  min-height: 280px;
  font-family: Georgia, "Times New Roman", serif;
}

.admin-editor__content,
.admin-editor__content .EasyMDEContainer,
.admin-editor__content .CodeMirror {
  /* Belt-and-suspenders alongside the .form-row fix above: constrain the
     markdown editor's own box so a long unbroken token (URL, etc.) wraps
     within the editor instead of growing it past the form's width. */
  min-width: 0;
  max-width: 100%;
}

.form-help {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.admin-preview .event-body {
  margin-top: var(--space-4);
}

.admin-preview ul {
  margin-bottom: 0;
}

.admin-staging-workspace {
  display: block;
}

.staging-mode-switch {
  display: inline-flex;
  margin-bottom: var(--space-4);
  padding: 0.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}

.staging-mode-switch__tab {
  min-height: 42px;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 700;
  cursor: pointer;
}

.staging-mode-switch__tab.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.staging-mode-switch__tab:focus-visible {
  outline: 3px solid rgba(43, 61, 46, 0.25);
  outline-offset: 2px;
}

.staging-edit-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: var(--space-6);
  align-items: start;
}

.staging-edit-workspace[hidden],
.work-item-actions__mode[hidden] {
  display: none;
}

/* Global [hidden] enforcement: several admin form elements toggled by
   initializeTypeSpecificFields() (data-event-only-field) also carry a
   `display` value from a class selector (.split-grid, .form-row,
   .notice-box, etc.) with equal CSS specificity to the browser's built-in
   `[hidden] { display: none }` UA rule. Because this stylesheet loads
   after the UA stylesheet, those class rules were winning, so setting the
   `hidden` attribute did not actually hide the element -- the Event date
   input stayed visible (and, since it also carries `required`, still
   blocked submitting the form for Bulletins/Jobs). This rule restores
   `hidden` as authoritative for every element, regardless of what other
   display-setting classes it also has.
*/
[hidden] {
  display: none !important;
}

.staging-edit-workspace .decision-panel,
.staging-edit-workspace .split-panel,
.staging-edit-workspace .utility-panel {
  grid-column: 1 / -1;
}

.admin-hero {
  padding: var(--space-10) 0 var(--space-6);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-6);
}

.admin-table th,
.admin-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.admin-table th {
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.admin-filters,
.admin-staging-inbox {
  padding: var(--space-6) 0;
}

.staging-queue {
  border-top: 1px solid var(--color-border);
}

.staging-queue__item {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(300px, 1fr) auto;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-5) var(--space-5);
  margin: var(--space-3) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 0.5rem);
  background: var(--color-surface, #fff);
}

.staging-queue__main {
  padding-right: var(--space-4);
}

.staging-queue__item h2 {
  margin: var(--space-2) 0;
  font-size: var(--text-base);
}

.staging-queue__status,
.work-item-context {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.status-text {
  font-weight: 700;
  text-transform: capitalize;
}

.status-text--error,
.status-text--attention,
.staging-queue__warning {
  color: var(--color-highlight);
}

.staging-queue__sender,
.staging-queue__warning {
  margin: 0;
  font-size: var(--text-sm);
}

.staging-queue__facts,
.source-facts {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm, 0.35rem);
}

.staging-queue__facts div,
.source-facts div {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) minmax(0, 1fr);
  gap: var(--space-3);
  padding: 0.2rem 0;
}

.staging-queue__facts dt,
.source-facts dt {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.staging-queue__facts dd,
.source-facts dd {
  margin: 0;
  font-size: var(--text-sm);
}

.staging-queue__open {
  min-width: 6rem;
  border-radius: var(--radius-sm);
}

.staging-queue__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  min-width: 10rem;
}

.staging-queue__triage {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.staging-queue__triage form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.staging-queue__type-form select {
  flex: 1;
  min-width: 0;
}

.work-item-context {
  margin-top: var(--space-4);
}

.work-item-actions {
  position: sticky;
  z-index: 10;
  top: 78px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.work-item-actions .button {
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
}

.work-item-actions form {
  display: flex;
}

.work-item-actions__mode {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.source-panel {
  max-width: 1100px;
  margin: 0 auto;
}

.source-panel__next {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.workspace-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.workspace-heading > div {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
}

.workspace-heading h2 {
  margin: 0 0 var(--space-3);
}

.workspace-heading p {
  margin: 0;
  font-size: var(--text-xs);
}

.workspace-step {
  color: var(--color-primary);
  font-weight: 800;
}

.email-source-frame {
  width: 100%;
  min-height: 680px;
  border: 1px solid var(--color-border);
  background: #ffffff;
}

.admin-log-tail {
  max-height: 420px;
  overflow-y: auto;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: var(--text-sm);
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-output {
  min-height: 10rem;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.editor-details,
.utility-details {
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.editor-details > summary,
.utility-details > summary,
.decision-panel > summary,
.split-panel > summary,
.utility-panel > summary {
  padding: var(--space-4) 0;
  font-weight: 700;
  cursor: pointer;
}

.attachment-item {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.decision-panel {
  border-left: 4px solid var(--color-highlight);
}

.decision-panel__body,
.split-panel__body,
.utility-panel__body {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: start;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.merge-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.admin-shell .site-footer {
  display: none;
}

.metadata-grid,
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.attachment-grid img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  margin: var(--space-3) 0;
}

.admin-image-reorder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.admin-image-reorder__buttons {
  display: flex;
  gap: var(--space-2);
}

.approval-checks li::marker {
  color: var(--color-text-muted);
}

.approval-checks .is-ready::marker {
  color: var(--color-primary);
}

.approval-checks .is-missing {
  color: var(--color-highlight);
  font-weight: 700;
}

.approval-checks .is-optional {
  color: var(--color-text-muted);
}

/* Admin submission edit: sectioned layout (feature/admin-workflow-v2) */
.admin-editor .form-grid {
  max-width: 780px;
}

.admin-edit-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.admin-edit-section:first-of-type {
  margin-top: var(--space-6);
}

.admin-edit-section .section-heading {
  padding: 0;
  margin-bottom: var(--space-4);
}

.admin-edit-section .section-heading h3 {
  margin: 0 0 var(--space-2);
}

.admin-legacy-date-warning {
  margin-bottom: var(--space-4);
  border-left: 4px solid var(--color-highlight);
}

.admin-image-status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.admin-image-preview {
  display: block;
  max-width: 420px;
  height: auto;
  border-radius: var(--radius-md);
}

.admin-image-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
}

.admin-image-toggle input[type="checkbox"] {
  width: auto;
}

.chip--ready {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.chip--image-badge {
  display: inline-block;
  margin: var(--space-2) 0;
}

.chip--pdf-only-badge {
  display: inline-block;
  margin: var(--space-2) var(--space-2) var(--space-2) 0;
  color: var(--color-warning, #a86b00);
}

.admin-import-summary {
  margin-top: var(--space-4);
}

.admin-import-form {
  margin-top: var(--space-4);
}

.admin-import-grid {
  align-items: end;
}

[data-theme="dark"] .empty-state {
  background: rgba(255, 255, 255, 0.04);
}

#events-calendar {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] #events-calendar {
  background: var(--color-surface);
}


/* ============================================================
   FULLCALENDAR
   ============================================================ */

.fc {
  --fc-border-color:                  rgba(122, 46, 31, 0.16);
  --fc-page-bg-color:                 transparent;
  --fc-neutral-bg-color:              rgba(239, 231, 217, 0.45);
  --fc-list-event-hover-bg-color:     rgba(122, 46, 31, 0.06);
  --fc-today-bg-color:                rgba(225, 154, 96, 0.08);
  --fc-event-bg-color:                var(--color-primary);
  --fc-event-border-color:            var(--color-primary);
  --fc-event-text-color:              #ffffff;
  --fc-button-bg-color:               var(--color-highlight);
  --fc-button-border-color:           var(--color-highlight);
  --fc-button-hover-bg-color:         var(--color-highlight-hover);
  --fc-button-hover-border-color:     var(--color-highlight-hover);
  --fc-button-active-bg-color:        var(--color-primary);
  --fc-button-active-border-color:    var(--color-primary);
  font-size: var(--text-sm);
}

[data-theme="dark"] .fc {
  --fc-border-color:              rgba(230, 185, 140, 0.14);
  --fc-neutral-bg-color:          rgba(42, 36, 29, 0.55);
  --fc-list-event-hover-bg-color: rgba(225, 154, 96, 0.08);
  --fc-today-bg-color:            rgba(225, 154, 96, 0.10);
  --fc-event-text-color:          #1a1612;
}

.fc .fc-toolbar {
  gap: 0.75rem;
}

.fc .fc-toolbar-title {
  font-size: var(--text-lg);
  line-height: 1.1;
}

.fc .fc-button {
  box-shadow: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font-size: var(--text-xs);
  line-height: 1.1;
  white-space: nowrap;
}

.fc .fc-button-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.fc .fc-toolbar-chunk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.fc .fc-daygrid-event,
.fc .fc-timegrid-event {
  border-radius: 0.35rem;
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  margin-top: auto;
  padding: var(--space-12) 0;
  border-top: 1px solid rgba(122, 46, 31, 0.14);
  background: rgba(239, 231, 217, 0.78);
}

[data-theme="dark"] .site-footer {
  background: rgba(20, 20, 19, 0.92);
  border-top-color: rgba(230, 185, 140, 0.12);
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 var(--space-3);
}

.footer-grid p,
.footer-grid li {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.footer-links,
.footer-meta {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer-link {
  text-decoration: none;
  font-size: var(--text-sm);
}

.footer-link:hover,
.footer-link:focus {
  text-decoration: underline;
}

.footer-tech-link {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
}

.footer-tech-link:hover,
.footer-tech-link:focus {
  color: var(--color-primary);
}


/* ============================================================
   HOME PORTAL GRID
   ============================================================ */

.home-portal-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .home-portal-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-auto-rows: 1fr;
    align-items: start;
  }

  .home-portal-subscribe { grid-row: 1 / span 2; }
  .home-portal-support   { grid-row: 1 / span 1; }
  .home-portal-manage    { grid-row: 2 / span 1; }
}

@media (max-width: 767px) {
  .home-portal-grid {
    grid-template-columns: 1fr;
  }

  .home-portal-subscribe,
  .home-portal-support,
  .home-portal-manage {
    grid-row: auto;
  }
}


/* ============================================================
   ZOHO SIGNUP FORM
   ============================================================ */

.quick_form_13_css[name="SIGNUP_BODY"] {
  width: 100% !important;
  max-width: 360px;
  margin: 0 auto;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface) !important;
  box-shadow: var(--shadow-sm);
}

#SIGNUP_HEADING {
  padding: 0 0 var(--space-4) !important;
  font-size: var(--text-base) !important;
  font-weight: 700;
  color: var(--color-text) !important;
  background: transparent !important;
}

.zoho-field {
  position: relative;
  width: 100%;
  margin-top: var(--space-3);
}

.zoho-field input[type="text"],
.zoho-field input[type="email"] {
  width: 100%;
  height: 44px;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(122, 46, 31, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.95);
  font-size: var(--text-sm);
}

[data-theme="dark"] .zoho-field input[type="text"],
[data-theme="dark"] .zoho-field input[type="email"] {
  background: var(--color-surface-2);
  border-color: rgba(230, 185, 140, 0.20);
  color: var(--color-text);
}

.zoho-field--choices {
  margin-top: var(--space-4);
}

.zoho-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: var(--text-sm);
  font-weight: 600;
}

.zoho-choices {
  display: grid;
  gap: 0.35rem;
  font-size: var(--text-sm);
}

.zoho-choices label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.zoho-submit {
  position: relative;
  width: 100%;
  margin-top: var(--space-5);
}

#zcWebOptin {
  width: 100% !important;
  height: 46px !important;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background-color: var(--color-primary) !important;
  color: var(--color-text-inverse) !important;
  font-size: var(--text-sm) !important;
  font-weight: 700 !important;
  cursor: pointer;
}

#zcWebOptin:hover,
#zcWebOptin:focus {
  background-color: var(--color-primary-hover) !important;
}


/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

@media (max-width: 1100px) {
  .hero-grid,
  .feature-grid,
  .split-grid,
  .home-portal-grid,
  .preview-grid,
  .contact-grid,
  .footer-grid,
  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .staging-queue__item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .staging-queue__facts {
    grid-column: 1;
  }

  .staging-queue__actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .feature-grid .feature-card:last-child,
  .contact-grid .contact-card:last-child {
    grid-column: span 2;
  }

  /* .split-grid above forces 2 columns at this breakpoint, which
     unintentionally overrode the always-stacked single-column layout
     for the admin editor/preview and staging edit workspace (both are
     .split-grid variants). Re-assert single column here so the intent
     from the base .admin-edit-grid / .staging-edit-workspace rules
     holds at every width, not just above 1100px and below 760px. */
  .admin-edit-grid,
  .staging-edit-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .calendar-shell {
    padding-top: var(--space-4);
  }

  .fc .fc-header-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: stretch;
  }

  .fc .fc-toolbar-chunk {
    justify-content: center;
  }

  .fc .fc-toolbar-title {
    font-size: var(--text-base);
    text-align: center;
  }

  .fc .fc-button,
  .fc .fc-today-button {
    padding: 0.42rem 0.55rem;
    font-size: var(--text-xs);
  }

  .fc .fc-button-group {
    justify-content: center;
  }

  .fc .fc-list-day-cushion,
  .fc .fc-list-table td,
  .fc .fc-list-table th {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .hero-grid,
  .feature-grid,
  .split-grid,
  .steps,
  .home-portal-grid,
  .preview-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .admin-staging-workspace,
  .staging-edit-workspace,
  .metadata-grid,
  .attachment-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .staging-queue__item {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .staging-queue__facts,
  .staging-queue__actions {
    grid-column: auto;
    grid-row: auto;
  }

  .staging-queue__actions {
    width: 100%;
  }

  .work-item-actions {
    position: static;
  }

  .work-item-actions .button {
    flex: 1 1 auto;
  }

  .email-source-frame {
    min-height: 520px;
  }

  .feature-grid .feature-card:last-child,
  .contact-grid .contact-card:last-child {
    grid-column: auto;
  }

  .hero-panel,
  .highlight-card,
  .panel,
  .portal-card,
  .list-card,
  .contact-card,
  .process-step,
  .page-card,
  .archive-item,
  .event-item,
  .board-card {
    padding: var(--space-6);
  }

  .container,
  .container-narrow {
    width: min(calc(100% - 1.2rem), var(--content-width));
  }

  .hero h1,
  .page-hero h1 {
    max-width: none;
  }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Zoho signup response inside subscription card */
.zoho-inline-result-wrap {
  margin-top: var(--space-4);
}

.zoho-inline-result {
  display: none;
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.zoho-inline-result.is-visible {
  display: block;
}

.zoho-local-confirm {
  display: none;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-highlight-soft);
  color: var(--color-text);
  text-align: left;
  font-size: var(--text-sm);
}

.zoho-local-confirm.is-visible {
  display: block;
}

.zoho-local-confirm .zoho-result-text {
  margin: 0;
  font-weight: 600;
}

.zoho-local-confirm .zoho-manage-link {
  margin: var(--space-2) 0 0;
  font-weight: 400;
}

/* Error/invalid and unconfirmed states get a visible left border + icon
   prefix (not color alone -- see v2.6.8 accessibility requirement) so
   the distinction is legible without relying on color perception. */
.zoho-local-confirm[data-state="invalid"],
.zoho-local-confirm[data-state="unconfirmed"] {
  border-color: var(--color-danger, #a33);
  border-left-width: 4px;
}

.zoho-local-confirm[data-state="invalid"] .zoho-result-text::before,
.zoho-local-confirm[data-state="unconfirmed"] .zoho-result-text::before {
  content: "\26A0 ";
}

.zoho-local-confirm[data-state="duplicate"] {
  border-color: var(--color-primary);
  border-left-width: 4px;
}
/* ============================================================
   EASYMDE TOOLBAR ICON FALLBACK (v2.6.4 P1.5)
   The bundled EasyMDE assets reference Font Awesome icon classes
   (fa fa-bold, fa fa-italic, etc.) for its toolbar buttons, but this
   project does not bundle Font Awesome. Without it those icons render
   as blank/invisible buttons -- this is the "blank rich-text toolbar
   buttons" defect from the v2.6.4 handoff report. Rather than adding a
   new icon-font dependency, render short text/glyph labels via ::after
   on the toolbar button's own class (each button's plain-English
   accessible name/title is already set by EasyMDE via title/aria-label,
   so this is a purely visual, dependency-free fallback).
   ============================================================ */

.editor-toolbar button.bold:after {
  content: "B";
  font-weight: 700;
}

.editor-toolbar button.italic:after {
  content: "I";
  font-style: italic;
}

.editor-toolbar button.quote:after {
  content: "\201C";
}

.editor-toolbar button.unordered-list:after {
  content: "\2022";
}

.editor-toolbar button.ordered-list:after {
  content: "1.";
  font-size: 65%;
}

.editor-toolbar button.link:after {
  content: "\1F517";
}

.editor-toolbar button.undo:after {
  content: "\21B6";
}

.editor-toolbar button.redo:after {
  content: "\21B7";
}
