/* ==========================================================================
   Committees Directory — Bureaucratic Paper Redesign (Phase 2 Slice 5, 2026-05-01)

   Replaces all glass-morphism with opaque manila paper panels.
   Paper panels sit on dark onyx background ("documents on desk").
   3-tier org chart + list view + governance info section.

   Anti-patterns removed:
     ✗ backdrop-filter: blur() — removed from all panels (was 6 instances)
     ✗ rgba(255,255,255,0.03-0.05) ghost panels → opaque paper
     ✗ rgba cyan/blue glass borders → var(--rule-primary) hairline
     ✗ border-radius: 8-12px → 0 on document panels
     ✗ glow box-shadow → hard-offset shadow
     ✗ text-shadow: 0 0 15px cyan → plain ink colors

   JS contract preserved: all selectors used by committees-directory.js
   are maintained unchanged. No JS edits needed.

   Tier ink-stamp colors (replaces glass tier rings):
     Tier 1 (Governing Bodies)    → var(--ink-stamp)       #b8332a red
     Tier 2 (Core Ministries)     → var(--ink-accent)      #1d4a8c blue
     Tier 3 (Specialized Svcs)    → var(--ink-green)       #1a5c2e green
   ========================================================================== */


/* -------------------------------------------------------------------------
   Page base — dark desk background
   ------------------------------------------------------------------------- */

body {
  background: transparent; /* cloud-background.js paints the background via .cloud-background */
  color: var(--ink-primary, #0a0908);
}

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */

.committees-nav {
  padding: 0.75rem 1.25rem;
  background: transparent;
  /* removed: backdrop-filter: blur(10px) */
}

.committees-nav .back-link {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-meta, #6b5f50);
  text-decoration: none;
  text-transform: uppercase;
}

.committees-nav .back-link:hover {
  color: var(--ink-accent, #1d4a8c);
}


/* -------------------------------------------------------------------------
   Main Container
   ------------------------------------------------------------------------- */

.committees-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  padding-left: calc(1.5rem + 70px); /* room for nav rail */
}


/* -------------------------------------------------------------------------
   Cover panel — DOCUMENT NO. ORG-000
   ------------------------------------------------------------------------- */

.committees-cover {
  background: var(--paper-bg-aged, #ede8db);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-deep, 6px 6px 0 rgba(0,0,0,0.20));
  text-align: center;
  padding: 2rem 2rem 1.75rem;
  margin-bottom: 1.5rem;
}

.committees-doc-number {
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ink-meta, #6b5f50);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.committees-cover-title {
  font-family: 'Michroma', monospace;
  font-size: clamp(1.2rem, 3.5vw, 2.2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-primary, #0a0908);
  line-height: 1.1;
  margin: 0 0 0.6rem;
}

.committees-cover-subtitle {
  font-family: 'Spectral', Georgia, serif;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-secondary, #3a3530);
  letter-spacing: 0.04em;
  margin: 0 0 1.25rem;
}

.committees-cover-rule {
  width: 60px;
  height: 3px;
  background: var(--rule-primary, #1a1a1a);
  margin: 0 auto;
}


/* -------------------------------------------------------------------------
   Section containers — double-rule header (shared pattern)
   ------------------------------------------------------------------------- */

.committees-section {
  background: var(--paper-bg, #f7f3ea);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-md, 3px 3px 0 rgba(0,0,0,0.16));
  margin-bottom: 1.5rem;
  overflow: hidden;
  color: var(--ink-primary, #0a0908);
}

.committees-section-header {
  background: var(--paper-bg-aged, #ede8db);
  border-bottom: 3px double var(--rule-primary, #1a1a1a);
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.committees-section-title {
  font-family: 'Michroma', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-primary, #0a0908);
  margin: 0;
  padding: 0.65rem 0;
}

.committees-section-meta {
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--ink-meta, #6b5f50);
  text-transform: uppercase;
}

.committees-section-body {
  padding: 1.25rem 1.5rem;
}


/* -------------------------------------------------------------------------
   Overview Statistics — 4 stat cards
   ------------------------------------------------------------------------- */

.committees-overview {
  /* wrapper — no extra margin; spacing handled by .committees-section */
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.overview-card {
  background: var(--paper-bg-alt, #ffffff);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-sm, 2px 2px 0 rgba(0,0,0,0.14));
  padding: 1.25rem 1rem;
  text-align: center;
  /* removed: backdrop-filter, border-radius: 8px, rgba ghost bg, glow hover */
}

.overview-card:hover {
  box-shadow: var(--shadow-md, 3px 3px 0 rgba(0,0,0,0.16));
  transform: translateY(-1px);
}

.overview-value {
  display: block;
  font-family: 'Michroma', monospace;
  font-size: 2rem;
  color: var(--ink-accent-dark, #0e2a56);
  margin-bottom: 0.5rem;
  /* removed: text-shadow glow */
}

.overview-label {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  color: var(--ink-meta, #6b5f50);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


/* -------------------------------------------------------------------------
   Organizational Chart Section
   ------------------------------------------------------------------------- */

.org-chart-section {
  /* wrapped by .committees-section */
}

.org-chart {
  background: var(--paper-bg, #f7f3ea);
  border-top: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  padding: 1.5rem 1.25rem;
  /* removed: border-radius: 12px, rgba glass bg, white-alpha border */
}


/* Tier rows */
.org-tier {
  margin-bottom: 1.25rem;
}

.tier-label {
  font-family: 'Courier New', monospace;
  font-size: 0.62rem;
  color: var(--ink-meta, #6b5f50);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  /* removed: background rgba(255,255,255,0.03), border-radius */
}

.tier-committees {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  flex-wrap: wrap;
}


/* Connecting Lines Between Tiers — now simple ink rules */
.org-connector {
  height: 2rem;
  position: relative;
  margin: 0 auto 1.25rem;
  max-width: 800px;
}

.org-connector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 100%;
  background: var(--rule-primary, #1a1a1a);
  transform: translateX(-50%);
  opacity: 0.25;
  /* removed: cyan gradient glow */
}


/* -------------------------------------------------------------------------
   Committee Cards in Org Chart
   ------------------------------------------------------------------------- */

.committee-card {
  background: var(--paper-bg-alt, #ffffff);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-sm, 2px 2px 0 rgba(0,0,0,0.14));
  padding: 1.1rem 1rem;
  min-width: 200px;
  max-width: 260px;
  flex: 1;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  position: relative;
  /* removed: backdrop-filter: blur(10px), border-radius: 8px, rgba ghost bg */
}

.committee-card:hover {
  box-shadow: var(--shadow-deep, 6px 6px 0 rgba(0,0,0,0.20));
  transform: translateY(-2px);
  /* removed: glow, scale */
}

/* Arrow indicator on hover */
.committee-card::after {
  content: '→';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--ink-accent, #1d4a8c);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.committee-card:hover::after {
  opacity: 1;
}

.committee-name {
  font-family: 'Michroma', monospace;
  font-size: 0.72rem;
  color: var(--ink-primary, #0a0908);
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
  /* removed: cyan color, text-shadow */
}

.committee-description {
  font-family: 'Spectral', Georgia, serif;
  font-size: 0.8rem;
  color: var(--ink-secondary, #3a3530);
  line-height: 1.55;
  margin-bottom: 0.75rem;
  min-height: 3.5rem;
  /* replaced: Courier New white-alpha → Spectral ink-secondary */
}

.committee-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  /* removed: white-alpha border */
}

.committee-stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Michroma', monospace;
  font-size: 1rem;
  color: var(--ink-accent-dark, #0e2a56);
  margin-bottom: 0.2rem;
  /* removed: cyan glow */
}

.stat-text {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  color: var(--ink-meta, #6b5f50);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  /* removed: white-alpha */
}


/* -------------------------------------------------------------------------
   Tier-specific stamp colors (replaces gold/cyan/blue glass tier rings)
   -------------------------------------------------------------------------
   Applied via .tier-1, .tier-2, .tier-3 parent selectors.
   Uses a ::before stamp badge on each card rather than border-glow.
   ------------------------------------------------------------------------- */

/* Tier 1 — red ink stamp (Governing Body) */
.tier-1 .committee-card {
  border-top: 3px solid var(--ink-stamp, #b8332a);
}

.tier-1 .committee-name {
  color: var(--ink-stamp, #b8332a);
}

.tier-1 .stat-number {
  color: var(--ink-stamp, #b8332a);
}

/* Tier 2 — blue ink stamp (Core Ministry) */
.tier-2 .committee-card {
  border-top: 3px solid var(--ink-accent, #1d4a8c);
}

.tier-2 .committee-name {
  color: var(--ink-accent-dark, #0e2a56);
}

.tier-2 .stat-number {
  color: var(--ink-accent, #1d4a8c);
}

/* Tier 3 — green ink stamp (Specialized Service) */
.tier-3 .committee-card {
  border-top: 3px solid var(--ink-green, #1a5c2e);
}

.tier-3 .committee-name {
  color: var(--ink-green, #1a5c2e);
}

.tier-3 .stat-number {
  color: var(--ink-green, #1a5c2e);
}


/* -------------------------------------------------------------------------
   Committee List Section
   ------------------------------------------------------------------------- */

.committees-list-section {
  /* wrapped by .committees-section */
}

/* View toggle — paper rectangle buttons */
.view-toggle {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--paper-bg-aged, #ede8db);
  border-bottom: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  /* removed: border-radius: 8px, rgba glass bg */
}

.toggle-btn {
  padding: 0.5rem 1.25rem;
  background: var(--paper-bg, #f7f3ea);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  color: var(--ink-secondary, #3a3530);
  font-family: 'Michroma', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  /* removed: rgba ghost bg, border-radius: 4px */
}

.toggle-btn:hover {
  background: var(--paper-bg-alt, #ffffff);
  color: var(--ink-primary, #0a0908);
}

.toggle-btn.active {
  background: var(--ink-accent-dark, #0e2a56);
  border-color: var(--ink-accent-dark, #0e2a56);
  color: #ffffff;
  box-shadow: var(--shadow-sm, 2px 2px 0 rgba(0,0,0,0.14));
  /* removed: rgba blue glow */
}

.committees-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.committees-list.hidden {
  display: none;
}


/* List View Committee Cards */
.committee-list-item {
  background: var(--paper-bg-alt, #ffffff);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  border-left: 4px solid var(--ink-accent, #1d4a8c);
  box-shadow: var(--shadow-sm, 2px 2px 0 rgba(0,0,0,0.14));
  padding: 1rem 1.1rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  /* removed: rgba ghost bg, border-radius: 4px, fadeInUp animation */
}

.committee-list-item:hover {
  box-shadow: var(--shadow-md, 3px 3px 0 rgba(0,0,0,0.16));
  transform: translateX(3px);
  /* removed: rgba(255,255,255,0.08) hover, glow */
}

.committee-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.committee-list-name {
  font-family: 'Michroma', monospace;
  font-size: 0.78rem;
  color: var(--ink-primary, #0a0908);
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* removed: cyan color */
}

.committee-tier-badge {
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  color: var(--ink-meta, #6b5f50);
  background: var(--paper-bg-aged, #ede8db);
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  border-radius: 0;
  white-space: nowrap;
  /* removed: rgba ghost bg, border-radius: 3px */
}

.committee-list-description {
  font-family: 'Spectral', Georgia, serif;
  font-size: 0.82rem;
  color: var(--ink-secondary, #3a3530);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  /* replaced: Courier New white-alpha → Spectral ink-secondary */
}

.committee-list-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
}

.committee-list-stat {
  font-family: 'Courier New', monospace;
  font-size: 0.68rem;
  color: var(--ink-meta, #6b5f50);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.committee-list-stat strong {
  color: var(--ink-accent-dark, #0e2a56);
  font-family: 'Michroma', monospace;
  font-weight: normal;
}


/* -------------------------------------------------------------------------
   Governance Information — 3 description cards
   ------------------------------------------------------------------------- */

.governance-info {
  /* wrapped by .committees-section */
}

.governance-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.governance-card {
  background: var(--paper-bg-alt, #ffffff);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-sm, 2px 2px 0 rgba(0,0,0,0.14));
  padding: 1.1rem 1.25rem;
  /* removed: rgba black bg, border-radius: 8px, white-alpha border, glow hover */
}

.governance-title {
  font-family: 'Michroma', monospace;
  font-size: 0.68rem;
  color: var(--ink-primary, #0a0908);
  margin: 0 0 0.6rem 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  padding-bottom: 0.4rem;
  /* removed: cyan color */
}

.governance-text {
  font-family: 'Spectral', Georgia, serif;
  font-size: 0.82rem;
  color: var(--ink-secondary, #3a3530);
  line-height: 1.65;
  margin: 0;
  /* replaced: Courier New white-alpha → Spectral ink-secondary */
}


/* -------------------------------------------------------------------------
   Loading State
   ------------------------------------------------------------------------- */

.committees-loading {
  text-align: center;
  padding: 3rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--ink-meta, #6b5f50);
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.committees-loading.hidden {
  display: none;
}

.loading-text {
  margin: 0.75rem 0 0;
  color: var(--ink-meta, #6b5f50);
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* -------------------------------------------------------------------------
   Error State
   ------------------------------------------------------------------------- */

.committees-error {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--paper-bg-alt, #ffffff);
  border: 1.5px solid var(--ink-stamp, #b8332a);
  box-shadow: var(--shadow-sm, 2px 2px 0 rgba(0,0,0,0.14));
  margin: 1.5rem 0;
  /* removed: rgba red glass, border-radius: 8px */
}

.committees-error.hidden {
  display: none;
}

.committees-error p {
  color: var(--ink-stamp, #b8332a);
  font-family: 'Michroma', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  margin: 0;
}


/* -------------------------------------------------------------------------
   Mobile Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .tier-committees {
    flex-direction: column;
    align-items: center;
  }

  .committee-card {
    max-width: 400px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .committees-container {
    padding: 0.75rem 1rem 3rem;
    padding-left: calc(1rem + 70px);
  }

  .committees-cover-title {
    font-size: 1.2rem;
  }

  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-value {
    font-size: 1.5rem;
  }

  .org-chart {
    padding: 1.25rem 0.75rem;
  }

  .committee-card {
    min-width: 100%;
  }

  .committees-list {
    grid-template-columns: 1fr;
  }

  .governance-content {
    grid-template-columns: 1fr;
  }

  .committee-list-header {
    flex-direction: column;
    gap: 0.4rem;
  }

  .committee-list-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .view-toggle {
    flex-direction: column;
    align-items: stretch;
  }

  .toggle-btn {
    text-align: center;
  }
}
