/* ==========================================================================
   📜 HISTORIC CREEDS & CONFESSIONS EXPLORER STYLES
   ========================================================================== */

.creeds-explorer-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Hero & Header Section */
.creeds-hero-wrap {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.creeds-hero-wrap::before {
  content: "📜";
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 5rem;
  opacity: 0.12;
  pointer-events: none;
}

.creeds-hero-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.creeds-hero-title h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.02em;
}

.creeds-badge-count {
  background: var(--brand-gold);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.creeds-hero-desc {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 850px;
  margin: 0;
}

/* Category & Tradition Filter Tabs */
.creeds-category-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

.creed-cat-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.creed-cat-pill:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--brand-primary);
}

.creed-cat-pill.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Utility & Controls Row */
.creeds-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.creeds-search-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.creeds-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  font-size: 0.88rem;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.creeds-search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(31, 92, 63, 0.15);
}

.creeds-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.creeds-view-modes {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.creeds-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.creeds-mode-btn:hover {
  color: var(--text-main);
}

.creeds-mode-btn.active {
  background: var(--bg-surface);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   VIEW 1: Interactive Clause Explorer Layout (2 Columns)
   ========================================================================== */
.creeds-explorer-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(340px, 1.25fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .creeds-explorer-grid {
    grid-template-columns: 1fr;
  }
}

/* Creed Selection Chips */
.creeds-selector-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.creed-select-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: var(--shadow-sm);
}

.creed-select-chip:hover {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.creed-select-chip.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.creed-chip-year {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
}

/* Creed Document Card (Left Column) */
.creed-doc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.creed-doc-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.creed-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.creed-doc-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.creed-latin-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.creed-doc-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-creed-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-creed-action:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.creed-doc-summary {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Clauses Stream */
.creed-clauses-stream {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 680px;
  overflow-y: auto;
}

.creed-clause-block {
  padding: 0.95rem 1.15rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.creed-clause-block:hover {
  background: var(--bg-surface);
  border-color: var(--brand-primary);
  border-left-color: var(--brand-primary);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

.creed-clause-block.active {
  background: var(--bg-surface);
  border-color: var(--brand-primary);
  border-left: 4px solid var(--brand-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.clause-tag-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.clause-num-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand-primary);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.clause-doctrine-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.clause-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-main);
  margin: 0;
}

.clause-text em {
  color: var(--brand-gold);
  font-style: italic;
  font-weight: 700;
}

.clause-orig-sub {
  font-size: 0.82rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
}

/* Doctrinal Dossier Card (Right Column) */
.creed-dossier-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  animation: dossierFadeIn 0.2s ease;
}

@keyframes dossierFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dossier-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dossier-eyebrow {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
}

.dossier-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.dossier-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 640px;
  overflow-y: auto;
}

/* Heresy Guardrail Box */
.dossier-heresy-box {
  background: linear-gradient(135deg, rgba(181, 83, 9, 0.08) 0%, rgba(181, 83, 9, 0.03) 100%);
  border: 1px solid rgba(181, 83, 9, 0.25);
  border-left: 4px solid var(--brand-gold);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.heresy-box-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.heresy-box-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0;
}

/* Scripture Proofs Row */
.dossier-section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.scripture-proofs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.scripture-blb-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--brand-primary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.scripture-blb-pill:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.dossier-prose-block {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.dossier-prose-block strong {
  color: var(--text-main);
}

/* Curriculum Day Anchors */
.curriculum-anchors-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.curriculum-day-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.curriculum-day-pill:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Logos Library Link Pill */
.logos-dossier-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.logos-dossier-btn:hover {
  background: var(--brand-navy, #1d3b5c);
  color: #ffffff;
  border-color: var(--brand-navy, #1d3b5c);
}

/* ==========================================================================
   VIEW 2: Side-by-Side Ecumenical Comparison Matrix
   ========================================================================== */
.creeds-matrix-table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  padding: 1.5rem;
}

.creeds-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 900px;
}

.creeds-matrix-table th {
  background: var(--bg-subtle);
  padding: 1rem 1.15rem;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 2;
}

.creeds-matrix-table th:first-child {
  border-top-left-radius: var(--radius-md);
  width: 180px;
}

.creeds-matrix-table th:last-child {
  border-top-right-radius: var(--radius-md);
}

.creeds-matrix-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-main);
  font-family: var(--font-serif);
}

.matrix-row-doctrine {
  font-family: var(--font-sans) !important;
  font-weight: 800;
  color: var(--brand-primary) !important;
  font-size: 0.82rem !important;
  background: var(--bg-subtle);
  border-right: 1px solid var(--border-color);
}

.creeds-matrix-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .creeds-matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.matrix-highlight-term {
  color: var(--brand-gold);
  font-weight: 700;
}

/* ==========================================================================
   VIEW 3: Liturgical Recitation Mode
   ========================================================================== */
.creed-recitation-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .creed-recitation-card {
    padding: 1.5rem;
  }
}

.recitation-header {
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.recitation-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.recitation-prose {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.85;
  color: var(--text-main);
  text-wrap: pretty;
}

.recitation-prose p {
  margin-bottom: 1.25rem;
}

.recitation-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
