/* Interactive Greek Exegetical Bible Stylesheet (NASB 95 Base) */

:root {
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --bg-sidebar: #f1f5f9; /* The slightly dark shade of blue in the BG on the left */
  --bg-subtle: #e2e8f0;
  --bg-popover: #ffffff;
  --border-main: #e2e8f0;
  --border-subtle: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  
  --accent-primary: #1e40af;
  --accent-primary-hover: #1d4ed8;
  --accent-primary-light: #eff6ff;
  --accent-primary-border: #bfdbfe;
  
  --accent-gold: #2563eb;
  --accent-gold-light: #eff6ff;
  --accent-emerald: #059669;
  --accent-emerald-light: #d1fae5;
  --accent-purple: #7c3aed;
  --accent-purple-light: #ede9fe;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-popover: 0 12px 24px -4px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04);

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Newsreader", "Charter", "Iowan Old Style", "Palatino", "Georgia", "Cambria", serif;
  --font-greek: "Cardo", "Gentium Plus", "SBL Greek", "Times New Roman", serif;
}

[data-theme="dark"] {
  --bg-main: #0b0f17;
  --bg-card: #131b2a;
  --bg-sidebar: #0f1724;
  --bg-subtle: #192336;
  --bg-popover: #1a2436;
  --border-main: #2a374d;
  --border-subtle: #1e2a3e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  
  --accent-primary: #3b82f6;
  --accent-primary-hover: #60a5fa;
  --accent-primary-light: #1e3a8a33;
  --accent-primary-border: #1e40af;
  
  --accent-gold: #60a5fa;
  --accent-gold-light: #1e3a8a33;
  --accent-emerald: #10b981;
  --accent-emerald-light: #064e3b33;
  --accent-purple: #a855f7;
  --accent-purple-light: #581c8733;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-popover: 0 16px 32px -4px rgba(0, 0, 0, 0.6), 0 6px 12px -2px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-main);
  padding: 0.75rem 1.75rem;
  height: 64px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-badge {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #7c3aed 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.38rem 0.72rem;
  border-radius: 0.55rem;
  letter-spacing: -0.01em;
  font-family: var(--font-greek);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.logo-title {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.version-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(180, 83, 9, 0.08);
}

[data-theme="dark"] .version-pill {
  background: rgba(30, 64, 175, 0.25);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.4);
}

.logo-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  letter-spacing: 0.01em;
}

/* =======================================================
   PROMINENT ACTIVE BOOK & CHAPTER LOCATION BANNERS
   ======================================================= */

/* Top App Header Active Location Indicator */
.header-active-location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  margin-left: 0.6rem;
  cursor: pointer;
}

.header-active-location:hover {
  border-color: var(--accent-primary);
  background: var(--accent-primary-light);
}

.header-loc-book {
  font-weight: 700;
  color: var(--text-main);
}

.header-loc-chap {
  font-weight: 800;
  color: var(--accent-primary);
}

.header-loc-verse-badge {
  display: inline-block;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .header-loc-verse-badge {
  background: #3b82f6;
  color: #0f172a;
}

/* Reader Sticky Top Banner (Always clearly visible when scrolling) */
.sticky-reading-banner {
  position: sticky;
  top: 64px;
  z-index: 80;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 3.5rem;
  margin: -2.5rem -3.5rem 1.8rem -3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .sticky-reading-banner {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.sticky-banner-left {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.sticky-testament-pill {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.42rem;
  border-radius: 4px;
  background: rgba(30, 64, 175, 0.08);
  color: var(--accent-primary);
  border: 1px solid rgba(30, 64, 175, 0.25);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .sticky-testament-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.35);
}

.sticky-ref-heading {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.2;
}

.sticky-chapter-arrow {
  background: none;
  border: 1.5px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.1rem 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sticky-verse-arrow {
  font-size: 0.95rem;
  padding: 0.15rem 0.45rem;
  color: var(--accent-primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.sticky-verse-arrow:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-primary);
}

.sticky-chapter-arrow:hover {
  background: var(--accent-primary-light, rgba(30, 64, 175, 0.08));
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.sticky-chapter-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

[data-theme="dark"] .sticky-chapter-arrow {
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .sticky-chapter-arrow:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: #60a5fa;
}

.sticky-verse-tag {
  display: inline-flex;
  align-items: center;
  background: #fef3c7;
  color: #92400e;
  border: 1.5px solid #f59e0b;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.18rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.18);
}

[data-theme="dark"] .sticky-verse-tag {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: #d97706;
}

.sticky-banner-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-clear-selection {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clear-selection:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Grammar & Exegesis Drawer Top Location Banner */
.drawer-location-banner {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.06), rgba(99, 102, 241, 0.06));
  border: 1px solid rgba(30, 64, 175, 0.18);
  border-radius: 8px;
  padding: 0.65rem 0.95rem;
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .drawer-location-banner {
  background: rgba(30, 58, 138, 0.25);
  border-color: rgba(96, 165, 250, 0.25);
}

.drawer-location-ref {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

[data-theme="dark"] .drawer-location-ref {
  color: #93c5fd;
}

.drawer-location-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.icon-btn {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  height: 34px;
  padding: 0 0.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: var(--border-subtle);
}

/* Main Layout */
.app-container {
  display: flex;
  flex: 1;
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
}



.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.passage-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.passage-card-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.8rem 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.passage-card-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.passage-card-btn.active {
  border-color: var(--accent-primary);
  background-color: var(--accent-primary-light);
  box-shadow: var(--shadow-sm);
}

.passage-card-ref {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.passage-card-focus {
  font-size: 0.75rem;
  font-family: var(--font-greek);
  color: var(--accent-primary);
  font-weight: 600;
}

.passage-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Reader Main Workspace */
.reader-main {
  flex: 1;
  padding: 2.5rem 3.5rem;
  max-width: 880px;
  margin: 0 auto;
}

.passage-header {
  margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.passage-badge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.passage-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  box-shadow: 0 1px 2px rgba(30, 64, 175, 0.08);
}

[data-theme="dark"] .passage-badge {
  background: rgba(30, 64, 175, 0.25);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.4);
}

.passage-title {
  font-size: 2rem;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.passage-subtitle {
  font-size: 1.05rem;
  color: #c2410c;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.passage-intro {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3.5px solid var(--accent-primary);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
}

/* Scripture Text Content */
.scripture-container {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.95;
  color: var(--text-main);
  position: relative;
}

.verse-row {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.7rem;
  line-height: 1.85;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.verse-row:hover {
  background: rgba(0, 0, 0, 0.025);
}

[data-theme="dark"] .verse-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.verse-gutter {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 2.8rem;
  flex-shrink: 0;
  margin-right: 0.75rem;
  user-select: none;
}

.verse-num {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}

.verse-star-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--text-faint);
  opacity: 0.35;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.verse-row:hover .verse-star-btn {
  opacity: 0.85;
}

.verse-star-btn.is-saved,
.verse-star-btn[data-saved="true"] {
  opacity: 1 !important;
  color: var(--accent-gold) !important;
}

.verse-star-btn:hover {
  opacity: 1 !important;
  transform: scale(1.25);
}

.verse-text-content {
  flex: 1;
  min-width: 0;
}

/* =======================================================
   MINIMAL SCRIPTURE WORDS (CLEAN & UNDISTRACTING)
   ======================================================= */

.expandable-token {
  position: relative;
  display: inline !important;
  color: inherit;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  border-bottom: none;
  padding: 0;
  transition: all 0.15s ease;
}

.expandable-token .token-word {
  text-decoration: underline dotted #60a5fa;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  border-bottom: none;
  padding: 0;
}

[data-theme="dark"] .expandable-token .token-word {
  color: #60a5fa;
  text-decoration-color: rgba(96, 165, 250, 0.45);
}

.expandable-token:hover .token-word,
.expandable-token.active-focus .token-word {
  color: #1e3a8a;
  text-decoration: underline solid var(--accent-primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  background-color: var(--accent-primary-light);
  border-bottom: none;
}

[data-theme="dark"] .expandable-token:hover .token-word,
[data-theme="dark"] .expandable-token.active-focus .token-word {
  color: #93c5fd;
  text-decoration-color: #93c5fd;
  background-color: rgba(30, 58, 138, 0.35);
}

/* Word swap behavior between Standard and Expanded View */
.expandable-token .standard-text {
  display: inline;
}

.expandable-token .expanded-text {
  display: none;
}

/* When Expanded View Mode is active on body */
body.expanded-phrase-mode .expandable-token.has-wuest-expansion .standard-text {
  display: none;
}

body.expanded-phrase-mode .expandable-token.has-wuest-expansion .expanded-text {
  display: inline;
  font-family: inherit;
  font-style: normal;
  font-weight: 500;
  color: var(--text-main, #0f172a);
  text-decoration: underline solid var(--accent-primary, #3b82f6);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border-bottom: none;
  margin: 0;
  transition: all 0.15s ease;
}

body.expanded-phrase-mode .expandable-token.has-wuest-expansion:hover .expanded-text,
body.expanded-phrase-mode .expandable-token.has-wuest-expansion.active-focus .expanded-text {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-main, #0f172a);
  text-decoration-color: var(--accent-primary, #2563eb);
}

[data-theme="dark"] body.expanded-phrase-mode .expandable-token.has-wuest-expansion .expanded-text {
  color: var(--text-main, #f8fafc);
  background: transparent;
  text-decoration-color: #60a5fa;
}

[data-theme="dark"] body.expanded-phrase-mode .expandable-token.has-wuest-expansion:hover .expanded-text {
  background: rgba(59, 130, 246, 0.22);
}

/* =======================================================
   HEADER READING TOGGLE (STANDARD VS. EXPANDED)
   ======================================================= */
.reading-toggle-group {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  gap: 2px;
}

[data-theme="dark"] .reading-toggle-group {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.reading-toggle-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.reading-toggle-btn:hover {
  color: var(--text-main, #0f172a);
}

.reading-toggle-btn.active {
  background: var(--bg-card, #ffffff);
  color: var(--accent-primary, #2563eb);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .reading-toggle-btn.active {
  background: #1e293b;
  color: #60a5fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.expandable-token.active-focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 1px;
}

/* Subtle, discreet footnote marker */
.footnote-mark {
  font-family: inherit;
  font-size: 0.68em;
  font-weight: 600;
  color: var(--accent-primary);
  opacity: 0.8;
  margin-left: 1px;
  margin-right: 0;
  vertical-align: 0.35em;
  line-height: 0;
  user-select: none;
  display: inline;
}

.expandable-token:hover .footnote-mark {
  opacity: 1;
}

/* =======================================================
   SLEEK, COMPACT BREAKOUT WINDOW (RESTORED TO ORIGINAL CLEAN DESIGN)
   ======================================================= */

.breakout-window {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 310px;
  max-width: min(310px, calc(100vw - 32px));
  max-height: min(380px, calc(100vh - 120px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border-main) transparent;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-main);
  border-radius: 8px;
  padding: 8px 11px;
  font-family: var(--font-ui);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 500;
  pointer-events: auto; /* ALLOWS CURSOR TO HOVER/READ INSIDE */
  text-align: left;
  line-height: 1.38;
  cursor: default;
}

.breakout-window::-webkit-scrollbar {
  width: 4px;
}
.breakout-window::-webkit-scrollbar-thumb {
  background-color: var(--border-main);
  border-radius: 4px;
}

/* Invisible bridge so moving cursor into window never loses hover */
.breakout-window::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  pointer-events: auto;
}

/* Crisp downward caret (default: window above token) */
.breakout-window::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--bg-card) transparent transparent transparent;
  pointer-events: none;
}

/* =======================================================
   COLLISION-AWARE POSITIONING: BOTTOM & SIDES
   ======================================================= */

/* When placed BELOW token (insufficient room above) */
.breakout-window.pos-bottom {
  bottom: auto;
  top: calc(100% + 8px);
}

.breakout-window.pos-bottom::before {
  top: auto;
  bottom: 100%;
  height: 12px;
}

.breakout-window.pos-bottom::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent var(--bg-card) transparent;
}

/* When shifted to align with LEFT edge of token */
.breakout-window.pos-align-left {
  left: 0;
  transform: none;
  --popover-tx: 0;
}

.breakout-window.pos-align-left::after {
  left: 18px;
  transform: none;
}

/* When shifted to align with RIGHT edge of token */
.breakout-window.pos-align-right {
  left: auto;
  right: 0;
  transform: none;
  --popover-tx: 0;
}

.breakout-window.pos-align-right::after {
  left: auto;
  right: 18px;
  transform: none;
}

/* Show on hover of token or window */
.expandable-token:hover .breakout-window,
.expandable-token.show-popover .breakout-window,
.breakout-window:hover {
  display: block;
  animation: popoverFadeIn 0.15s ease-out;
}

.expandable-token:hover .breakout-window.pos-bottom,
.expandable-token.show-popover .breakout-window.pos-bottom,
.breakout-window.pos-bottom:hover {
  animation: popoverFadeInBelow 0.15s ease-out;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translate(var(--popover-tx, -50%), 4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(var(--popover-tx, -50%), 0) scale(1);
  }
}

@keyframes popoverFadeInBelow {
  from {
    opacity: 0;
    transform: translate(var(--popover-tx, -50%), -4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(var(--popover-tx, -50%), 0) scale(1);
  }
}

.breakout-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
  margin-bottom: 5px;
}

.breakout-greek {
  font-family: var(--font-greek);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.breakout-greek small {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: normal;
  color: var(--text-muted);
}

.breakout-tag {
  font-size: 0.65rem;
  font-family: monospace;
  font-weight: 700;
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.breakout-expansion {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
  line-height: 1.35;
}

.breakout-explanation {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.breakout-sources {
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px dotted var(--border-subtle);
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.breakout-tip {
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.68rem;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
}

/* Interlinear Row */
.interlinear-sub {
  display: none;
  font-family: var(--font-greek);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: normal;
  display: block;
  line-height: 1.2;
}

body[data-interlinear="false"] .interlinear-sub {
  display: none !important;
}

/* Right Exegetical Drawer / Inspector */
.exegetical-inspector {
  width: 390px;
  min-width: 390px;
  max-width: 390px;
  background-color: var(--bg-card);
  border-left: 1px solid var(--border-main);
  padding: 1.75rem 1.5rem;
  overflow-y: auto;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  flex-shrink: 0;
}

.inspector-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
  gap: 1rem;
}

.inspector-empty-icon {
  font-size: 2.5rem;
  opacity: 0.7;
}

.inspector-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.inspector-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.inspector-greek-title {
  font-family: var(--font-greek);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1.2;
}

.inspector-translit {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.tag-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-aorist {
  background-color: var(--accent-primary-light);
  color: var(--accent-primary);
}

.tag-passive {
  background-color: var(--accent-emerald-light);
  color: var(--accent-emerald);
}

.tag-code {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  font-family: monospace;
}

.detail-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-main);
}

.contrast-card {
  border-left: 3.5px solid var(--accent-primary);
  background-color: rgba(30, 64, 175, 0.05);
}

.contrast-card .detail-text {
  color: var(--text-main);
}

.source-card {
  border-left: 3.5px solid var(--accent-indigo, #6366f1);
  background-color: rgba(99, 102, 241, 0.05);
}

.source-card .detail-text {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Footer info */
.app-footer {
  margin-top: 2.5rem;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

/* Mobile Responsiveness */
@media (max-width: 1080px) {
  .app-container {
    flex-direction: column;
  }
  .passage-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-main);
  }
  .exegetical-inspector {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-main);
    position: static;
    height: auto;
  }
  .reader-main {
    padding: 1.5rem;
  }
  .sticky-reading-banner {
    margin: -1.5rem -1.5rem 1.25rem -1.5rem;
    padding: 0.75rem 1.5rem;
  }
}


/* =======================================================
   OMNIBAR SEARCH & JUMP BAR
   ======================================================= */

.omnibar-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.2rem 0.5rem 0.2rem 0.85rem;
  width: 440px;
  max-width: 100%;
  transition: all 0.2s ease;
}

.omnibar-container:focus-within {
  border-color: var(--accent-primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.omnibar-icon {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
  user-select: none;
}

.omnibar-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--text-main);
  font-family: var(--font-ui);
}

.omnibar-input::placeholder {
  color: var(--text-faint);
  font-size: 0.82rem;
}

.omnibar-book-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.omnibar-book-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background-color: var(--accent-primary-light);
}

.loading-tag {
  font-size: 0.72rem;
  font-weight: 700;
  background-color: var(--accent-primary-light);
  color: var(--accent-primary);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* =======================================================
   CHAPTER PAGINATION NAV BAR
   ======================================================= */

.chapter-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.nav-chapter-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-chapter-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background-color: var(--accent-primary-light);
}

.chapter-indicator {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* =======================================================
   BOOK & CHAPTER SELECTOR MODAL
   ======================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.15s ease-out;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: 14px;
  width: 720px;
  max-width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-search {
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-search-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-sidebar);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

.modal-search-input:focus {
  border-color: var(--accent-primary);
  background-color: var(--bg-card);
}

.testament-tabs {
  display: flex;
  padding: 0.6rem 1.5rem 0;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.testament-tab {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.testament-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}

.book-btn {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.book-btn:hover {
  background-color: var(--accent-primary-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.chapter-grid-container {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}

.chapter-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.btn-back {
  background: none;
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-back:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 0.5rem;
}

.chapter-cell-btn {
  height: 42px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.chapter-cell-btn:hover {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

@media (max-width: 768px) {
  .omnibar-container {
    width: 100%;
    order: 3;
    margin-top: 0.5rem;
  }
}


/* =======================================================
   FULL BIBLE NAVIGATION SIDEBAR
   ======================================================= */

.passage-sidebar {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-main);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-nav-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.sidebar-filter-input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
  font-family: var(--font-ui);
  box-sizing: border-box;
}

.sidebar-filter-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.sidebar-tabs {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.sidebar-tab {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.15rem;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sidebar-tab.active {
  background-color: var(--accent-primary);
  color: #ffffff;
}

/* Scrollable container for all books - min-height: 0 is mandatory for flex shrinking */
.sidebar-book-list {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 4px;
}

.sidebar-book-list::-webkit-scrollbar {
  width: 6px;
}
.sidebar-book-list::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-book-list::-webkit-scrollbar-thumb {
  background-color: var(--border-main);
  border-radius: 3px;
}

/* Book Accordion Card */
.nav-book-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nav-book-card.is-active-book {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
  background-color: #eff6ff;
}

.nav-book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
  transition: background-color 0.15s ease;
}

.nav-book-row:hover {
  background-color: var(--accent-primary-light);
  color: var(--accent-primary);
}

.nav-book-card.is-active-book .nav-book-row {
  background-color: var(--accent-primary-light);
  color: var(--accent-primary);
  font-weight: 700;
}

.nav-book-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-ch-count {
  font-size: 0.7rem;
  color: var(--text-faint);
  font-weight: 500;
}

.nav-chevron {
  font-size: 0.68rem;
  color: var(--text-faint);
  transition: transform 0.2s ease;
  display: inline-block;
}

.nav-book-card.is-open .nav-chevron {
  transform: rotate(90deg);
  color: var(--accent-primary);
}

/* Chapter Grid inside Book Card */
.nav-chapters-panel {
  display: none;
  padding: 0.55rem;
  background-color: #eff6ff;
  border-top: 1px solid #dbeafe;
  max-height: 220px;
  overflow-y: auto;
}

.nav-chapters-panel::-webkit-scrollbar {
  width: 5px;
}
.nav-chapters-panel::-webkit-scrollbar-thumb {
  background-color: var(--border-main);
  border-radius: 3px;
}

.nav-book-card.is-open .nav-chapters-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 0.35rem;
}

.nav-ch-pill {
  height: 30px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-ch-pill:hover {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.nav-ch-pill.active-chapter {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.4);
}

/* Highlight items in sidebar */
.highlight-item-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.highlight-item-btn:hover,
.highlight-item-btn.active {
  border-color: var(--accent-primary);
  background-color: var(--accent-primary-light);
}

/* Responsive Overrides */
@media (max-width: 1080px) {
  .app-container {
    flex-direction: column;
  }
  .passage-sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 360px;
    max-height: 360px;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border-main);
  }
  .exegetical-inspector {
    width: 100%;
    min-width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-main);
    position: static;
    height: auto;
    max-height: none;
  }
  .reader-main {
    padding: 1.5rem 1rem;
    max-width: 100%;
  }
  .sticky-reading-banner {
    margin: -1.5rem -1rem 1.25rem -1rem;
    padding: 0.65rem 1rem;
  }
}

/* Search Dropdown Styles */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  z-index: 1000;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  margin-top: 0.5rem;
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}
.dropdown-header {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  font-weight: 600;
}
.dropdown-header:first-child {
  border-top: none;
}
.dropdown-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
  transition: background 0.2s;
}
.dropdown-item:last-child {
  border-bottom: none;
}
.dropdown-item:hover {
  background: var(--bg-sidebar);
}

/* ==========================================================================
   Home Hub & Introductory Portal Styles
   ========================================================================== */

.home-hub-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.75rem;
}

.home-hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary-border);
  padding: 0.25rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 2px rgba(30, 64, 175, 0.06);
}

.home-hero-title {
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.home-hero-subtitle {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
}

/* ==========================================================================
   Home Action Grid & Graphical Launchpad
   ========================================================================== */

.home-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
  margin-top: 0.25rem;
}

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

.home-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: 12px;
  padding: 1.15rem 1.15rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.action-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.action-card-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.icon-blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
}

.icon-purple {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #7c3aed;
}

.icon-teal {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
}

.icon-amber {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
}

.action-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.1rem;
}

.action-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Hub 1: Scripture Pills Grid */
.scripture-pills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.scripture-pill-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.45rem 0.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-main);
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.scripture-pill-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.pill-book {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text-main);
}

.scripture-pill-btn:hover .pill-book {
  color: #2563eb;
}

.pill-topic {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.05rem;
}

.action-card-footer {
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Hub 2: Search Box & Root Chips */
.home-search-box {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.home-search-input {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 7px;
  border: 1.5px solid var(--border-main);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.home-search-input:focus {
  border-color: #3b82f6;
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.home-search-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.home-search-btn:hover {
  background: #1d4ed8;
}

.root-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.root-chip-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-main);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.root-chip-btn:hover {
  background: #f5f3ff;
  border-color: #8b5cf6;
  transform: translateY(-1px);
}

.root-english {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.root-chip-btn:hover .root-english {
  color: #6d28d9;
}

.root-greek {
  font-family: var(--font-greek);
  font-size: 0.78rem;
  color: #6d28d9;
  font-weight: 600;
}

/* Hub 3: Primer Lessons Grid */
.primer-lessons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.primer-lesson-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-main);
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.primer-lesson-btn:hover {
  background: #ecfdf5;
  border-color: #10b981;
  transform: translateY(-1px);
}

.lesson-num-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: #059669;
  background: #ffffff;
  border: 1px solid #a7f3d0;
  padding: 0.1rem 0.32rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.lesson-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.primer-lesson-btn:hover .lesson-name {
  color: #047857;
}

/* Hub 4: Visual Tools List */
.tools-visual-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.tool-visual-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-main);
  border-radius: 7px;
  padding: 0.42rem 0.65rem;
}

.tool-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.aspect-badge-icon {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.root-badge-icon {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.lexicon-badge-icon {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.tool-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.tool-text strong {
  color: var(--text-main);
}

.action-demo-btn {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
  border: 1.5px solid #bfdbfe;
  border-radius: 7px;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-demo-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* Dark Mode Overrides for Action Grid */
[data-theme="dark"] .home-action-card {
  background: var(--bg-card);
  border-color: var(--border-main);
}

[data-theme="dark"] .home-action-card:hover {
  border-color: var(--accent-primary-border);
}

[data-theme="dark"] .scripture-pill-btn,
[data-theme="dark"] .root-chip-btn,
[data-theme="dark"] .primer-lesson-btn,
[data-theme="dark"] .tool-visual-item {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .scripture-pill-btn:hover {
  background: #1e3a8a;
  border-color: #60a5fa;
}

[data-theme="dark"] .root-chip-btn:hover {
  background: #2e1065;
  border-color: #c084fc;
}

[data-theme="dark"] .primer-lesson-btn:hover {
  background: #064e3b;
  border-color: #34d399;
}

[data-theme="dark"] .lesson-num-badge {
  background: #0f172a;
}

[data-theme="dark"] .action-demo-btn {
  background: #1e293b;
  border-color: #3b82f6;
  color: #93c5fd;
}

[data-theme="dark"] .action-demo-btn:hover {
  background: #2563eb;
  color: #ffffff;
}

.calendar-card {
  grid-column: 1 / -1;
}

.gateway-toggle-devo-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-main);
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.65rem 1.15rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 0.5rem;
}

.gateway-toggle-devo-btn:hover {
  background: var(--accent-primary-light);
  border-color: var(--accent-primary-border);
}

/* Devotional Styles */
.devotional-container {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}
.devo-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.devo-date-badge {
  display: inline-block;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 0.3rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
}

.devo-intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: 8px;
  padding: 1.35rem 1.6rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  line-height: 1.65;
}

.devo-intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  background: var(--accent-primary-light);
  border: 1px solid var(--accent-primary-border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.devo-intro-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.65rem;
}

.devo-intro-body {
  font-size: 0.96rem;
  color: var(--text-main);
  line-height: 1.7;
  font-family: var(--font-ui);
}
.devo-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--accent-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}
.devo-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.devo-content {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-main);
}
.devo-content p {
  margin-bottom: 1.5rem;
}

.verse-row-container:hover {
  background: var(--bg-sidebar);
}

.delete-saved-btn:hover { color: var(--accent-primary) !important; transform: scale(1.1); }
.verse-star-btn:hover { transform: scale(1.1); }

/* =======================================================
   BIBLICAL STUDY GUIDE PRIMER STYLING
   ======================================================= */

.study-guide-container {
  padding: 2.5rem 2rem;
  max-width: 960px;
  margin: 0 auto;
  color: var(--text-main);
  animation: fadeIn 0.3s ease;
}

.guide-hero {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.guide-pill-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.guide-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--accent-primary);
  margin: 0 0 0.75rem 0;
  line-height: 1.25;
}

.guide-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 1.75rem auto;
  line-height: 1.6;
}

.guide-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.guide-nav-pill {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.guide-nav-pill:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.guide-section-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.guide-section-num {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: var(--font-sans);
  color: var(--accent-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.guide-section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--accent-primary);
  margin: 0 0 0.35rem 0;
}

.guide-section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

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

.guide-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.lang-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.lang-card-header {
  margin-bottom: 0.75rem;
}

.lang-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.lang-name {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.lang-orig {
  font-family: var(--font-greek);
  color: var(--accent-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Distinct jewel tones for each Biblical language */
.lang-card-hebrew {
  border-top: 3.5px solid #2563eb;
}
.lang-card-hebrew .lang-tag {
  color: #2563eb;
}
.lang-card-hebrew .lang-orig {
  color: #2563eb;
}

.lang-card-aramaic {
  border-top: 3.5px solid #7c3aed;
}
.lang-card-aramaic .lang-tag {
  color: #7c3aed;
}
.lang-card-aramaic .lang-orig {
  color: #7c3aed;
}

.lang-card-greek {
  border-top: 3.5px solid #059669;
}
.lang-card-greek .lang-tag {
  color: #059669;
}
.lang-card-greek .lang-orig {
  color: #059669;
}

[data-theme="dark"] .lang-card-hebrew .lang-orig { color: #60a5fa; }
[data-theme="dark"] .lang-card-aramaic .lang-orig { color: #c084fc; }
[data-theme="dark"] .lang-card-greek .lang-orig { color: #34d399; }

.lang-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.lang-list {
  padding-left: 1.2rem;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.lang-list li {
  margin-bottom: 0.5rem;
}

.guide-box-highlight {
  background: var(--accent-primary-light);
  border-left: 4px solid var(--accent-primary);
  padding: 1.25rem 1.4rem;
  border-radius: 0 8px 8px 0;
}

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

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.guide-table th {
  background: var(--bg-sidebar);
  color: var(--accent-primary);
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--border-light);
}

.guide-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  line-height: 1.5;
}

.aspect-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-aorist {
  background: rgba(43, 76, 126, 0.15);
  color: var(--accent-primary);
}

.badge-present {
  background: rgba(46, 117, 89, 0.15);
  color: #2e7559;
}

.badge-perfect {
  background: var(--accent-purple-light);
  color: var(--accent-purple);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.badge-imperfect {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.guide-jump-btn {
  display: inline-block;
  margin-top: 0.4rem;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  color: var(--accent-primary);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.guide-jump-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.sub-card {
  background: var(--bg-sidebar);
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid var(--border-subtle);
}

.sub-card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
  color: var(--accent-primary);
}

.sub-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.voice-item {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border-subtle);
}

.voice-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.voice-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.callout-gold {
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
  color: var(--text-main);
}

[data-theme="dark"] .callout-gold {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.compound-example {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.compound-formula {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.compound-formula strong {
  color: var(--accent-primary);
}

.compound-result {
  font-size: 0.92rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.case-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.1rem;
}

.case-card.case-card-featured {
  background: var(--accent-primary-light) !important;
  border: 1px solid var(--accent-primary-border) !important;
}

.case-badge {
  display: inline-block;
  background: rgba(43, 76, 126, 0.12);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.case-badge.case-badge-featured {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
}

.case-title {
  margin: 0 0 0.35rem 0;
  font-size: 1rem;
  color: var(--text-main);
}

.case-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.guide-steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-step-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg-sidebar);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.step-num {
  min-width: 2.2rem;
  height: 2.2rem;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
}

.step-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: var(--accent-primary);
}

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

.guide-action-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.guide-action-btn:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
}


/* Paged Guide Sidebar and Navigation */
.guide-nav-list {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 0 0.5rem 0.5rem 0.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.5rem;
}

.guide-badge-count {
  background: var(--accent-primary-light);
  border: 1px solid var(--accent-primary-border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--accent-primary);
  font-weight: 700;
}

.guide-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
  font-family: inherit;
}

.guide-nav-item:hover {
  background: var(--bg-sidebar);
  border-color: var(--border-light);
  transform: translateX(2px);
}

.guide-nav-item.active {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 3px 10px rgba(43, 76, 126, 0.25);
}

.guide-nav-num {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--accent-primary);
  line-height: 1;
}

.guide-nav-item.active .guide-nav-num {
  color: #ffffff;
}

.guide-nav-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.guide-nav-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.guide-nav-item.active .guide-nav-title {
  color: #ffffff;
}

.guide-nav-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.guide-nav-item.active .guide-nav-sub {
  color: rgba(255, 255, 255, 0.8);
}

.guide-section-page {
  animation: fadeIn 0.25s ease;
}

.guide-page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 1rem;
}

.guide-page-indicator {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guide-nav-prev-btn,
.guide-nav-next-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.guide-nav-prev-btn:hover,
.guide-nav-next-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.guide-nav-pill {
  cursor: pointer;
}

.guide-nav-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.verse-row.verse-selected {
  background: rgba(30, 64, 175, 0.07) !important;
  border-left: 3.5px solid var(--accent-primary);
  border-radius: 0 4px 4px 0;
  transition: background 0.3s ease, border-left 0.3s ease;
}

/* ==========================================================================
   Scholarly Concordance & Core Roots UI
   ========================================================================== */

.concordance-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem 1rem;
}

.concordance-header-box {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.concordance-query-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  text-transform: capitalize;
  letter-spacing: -0.02em;
}

.concordance-query-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.5;
}

.concordance-testament-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.concordance-testament-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: 9999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.concordance-testament-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-primary-border);
  background: var(--accent-primary-light);
}

.concordance-testament-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.2);
}

.concordance-testament-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.concordance-testament-tag.nt {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary-border);
}

.concordance-testament-tag.ot {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

[data-theme="dark"] .concordance-testament-tag.ot {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

.concordance-section-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.concordance-roots-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.concordance-root-chip {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.concordance-root-chip:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.concordance-root-chip.active {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: #ffffff !important;
}

.concordance-root-chip-greek {
  font-family: var(--font-greek);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.concordance-root-chip.active .concordance-root-chip-greek {
  color: #ffffff !important;
}

.concordance-root-chip-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-sidebar);
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
}

.concordance-root-chip.active .concordance-root-chip-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.concordance-active-root-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3.5px solid var(--accent-primary);
  border-radius: 6px;
  padding: 0.75rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.concordance-banner-title {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.95rem;
}

.concordance-banner-forms {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: 0.4rem;
}

.concordance-banner-def {
  margin-top: 0.25rem;
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.45;
}

.concordance-books-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.concordance-book-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.concordance-book-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.concordance-book-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.concordance-book-count {
  font-size: 0.75rem;
  opacity: 0.85;
}

.concordance-verse-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.concordance-verse-card:hover {
  border-color: var(--accent-primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.concordance-verse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.concordance-verse-ref {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.concordance-verse-jump-btn {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.concordance-verse-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  font-family: var(--font-serif);
}

.concordance-mark {
  background-color: #fef08a;
  color: #1e293b;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

[data-theme="dark"] .concordance-mark {
  background-color: rgba(234, 179, 8, 0.3);
  color: #fef08a;
}

.concordance-root-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-primary-light);
  border: 1px solid var(--accent-primary-border);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-main);
}

.concordance-root-pill-greek {
  font-family: var(--font-greek);
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.95rem;
}

.concordance-root-pill-nuance {
  color: var(--text-muted);
}

/* =======================================================
   TODAY IN THE BIBLICAL CALENDAR (HOME PAGE BANNER)
   ======================================================= */
.home-today-season-card {
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-left: 4.5px solid var(--accent-primary);
  border-radius: 12px;
  padding: 0.85rem 1.35rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-today-season-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.today-season-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.today-season-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
}

.today-season-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
  display: inline-block;
}

.today-season-headline {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.today-season-date {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.today-season-sep {
  color: var(--border-main);
}

.today-season-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.today-season-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.today-season-btn {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.today-season-btn:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  transform: translateX(2px);
}

/* =======================================================
   DEDICATED CALENDAR & DEVOTIONAL PAGE
   ======================================================= */
.calendar-page-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.25rem 2rem 5rem;
}

.calendar-back-btn {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: 6px;
  padding: 0.4rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  transition: all 0.15s ease;
}

.calendar-back-btn:hover {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  border-color: var(--accent-primary-border);
}

.calendar-page-hero {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-left: 4.5px solid var(--accent-primary);
  border-radius: 12px;
  padding: 1.6rem 1.85rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.calendar-hero-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.calendar-date-pill {
  background: #eff6ff;
  color: var(--accent-primary);
  border: 1px solid #bfdbfe;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
}

.calendar-season-pill {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
}

.calendar-page-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
  line-height: 1.25;
}

.calendar-page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.calendar-scriptures-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.calendar-scripture-chip {
  background: #f8fafc;
  border: 1px solid var(--border-main);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.calendar-scripture-chip:hover {
  background: var(--accent-primary-light);
  border-color: var(--accent-primary);
}

[data-theme="dark"] .home-today-season-card {
  background: #131b2a;
  border-color: #1e3a8a;
}
[data-theme="dark"] .calendar-page-hero {
  background: #131b2a;
  border-color: #2a374d;
}
[data-theme="dark"] .calendar-scripture-chip {
  background: #192336;
  border-color: #2a374d;
}
[data-theme="dark"] .calendar-back-btn {
  background: #131b2a;
  border-color: #2a374d;
  color: #94a3b8;
}

/* Verse Commentary & Inspector Navigation Styles */
.back-to-verse-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  margin-bottom: 0.75rem;
}

.back-to-verse-btn:hover {
  background: var(--accent-primary-light);
  border-color: var(--accent-primary);
}

[data-theme="dark"] .back-to-verse-btn {
  background: #192336;
  border-color: #2a374d;
  color: #93c5fd;
}

/* Interactive Strong's Word Chips (English + Strong's #) */
.strongs-word-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  text-decoration: none;
}

.strongs-word-chip:hover {
  background: var(--accent-primary-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(30, 64, 175, 0.12);
}

.strongs-chip-english {
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: -0.01em;
}

.strongs-chip-id {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--accent-primary);
  opacity: 0.85;
}

[data-theme="dark"] .strongs-word-chip {
  background: #192336;
  border-color: #2a374d;
  color: #e2e8f0;
}

[data-theme="dark"] .strongs-word-chip:hover {
  background: #23334d;
  border-color: #60a5fa;
  color: #93c5fd;
}

[data-theme="dark"] .strongs-chip-id {
  color: #93c5fd;
}

/* Sample verse links on Word Root Page */
.strongs-sample-verse-link {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-indigo, #6366f1);
  padding: 0.22rem 0.5rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.strongs-sample-verse-link:hover {
  background: var(--accent-indigo, #6366f1);
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="dark"] .strongs-sample-verse-link {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

[data-theme="dark"] .strongs-sample-verse-link:hover {
  background: #6366f1;
  color: #ffffff;
}

.btn-full-concordance {
  transition: all 0.15s ease;
}

.btn-full-concordance:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* Reading Mode Selector (Top Header Bar) */
.reading-mode-selector {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle, #e2e8f0);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

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

.mode-btn.active {
  background: var(--bg-card, #ffffff);
  color: var(--accent-primary, #1e40af);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mode-btn-icon {
  font-size: 0.85rem;
}

.mode-btn-label {
  letter-spacing: -0.01em;
}

[data-theme="dark"] .reading-mode-selector {
  background: #192336;
  border-color: #2a374d;
}

[data-theme="dark"] .mode-btn {
  color: #94a3b8;
}

[data-theme="dark"] .mode-btn:hover {
  color: #f1f5f9;
}

[data-theme="dark"] .mode-btn.active {
  background: #23334d;
  color: #93c5fd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Expanded Wuest / AMP Translation Phrasing */
.expanded-wuest-phrase {
  font-weight: 600;
  color: var(--accent-primary, #1e40af);
  border-bottom: 1.5px dotted rgba(30, 64, 175, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0 2px;
}
/* =====================================================================
 * AMP READING MODE STYLES
 * ===================================================================== */
.amp-bracket {
  color: var(--accent-primary);
  font-weight: 500;
  background-color: var(--accent-primary-light, rgba(30, 64, 175, 0.04));
  padding: 0 0.15rem;
  border-radius: 3px;
  font-style: italic;
}

[data-theme="dark"] .amp-bracket {
  color: #93c5fd;
  background-color: rgba(59, 130, 246, 0.12);
}

.amp-paren {
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
}

[data-theme="dark"] .amp-paren {
  color: #94a3b8;
}
.expanded-wuest-phrase:hover {
  background: var(--accent-primary-light, rgba(30, 64, 175, 0.08));
  border-bottom-color: var(--accent-primary, #1e40af);
  border-radius: 3px;
}

[data-theme="dark"] .expanded-wuest-phrase {
  color: #93c5fd;
  border-bottom-color: rgba(147, 197, 253, 0.4);
}

[data-theme="dark"] .expanded-wuest-phrase:hover {
  background: rgba(147, 197, 253, 0.1);
  border-bottom-color: #93c5fd;
}

.expanded-wuest-phrase.active-focus {
  background: rgba(30, 64, 175, 0.15);
  border-bottom: 2px solid var(--accent-primary, #1e40af);
  border-radius: 3px;
}

[data-theme="dark"] .expanded-wuest-phrase.active-focus {
  background: rgba(147, 197, 253, 0.2);
  border-bottom: 2px solid #93c5fd;
}

