/**
 * tools.css — Isolated Stylesheet for the 8 New Devotional Tools
 * Encuentra Tu Salmo (https://encuentratusalmo.com/)
 * 
 * Strict namespace isolation (prefixed with .tool- / .app-) to preserve existing website styles.
 * Fully compatible with light and dark mode variables, WCAG AAA accessible, 100% mobile-responsive.
 */

/* Main Container for Tool Pages */
.tool-hero {
  background: transparent;
  color: var(--bg-hero-text);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.tool-hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: #FFFFFF;
}

.tool-hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #D1D5DB;
  max-width: 780px;
  margin: 0 auto;
}

.tool-page-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
}

/* Tool Application Card */
.tool-app-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 3.5rem;
  position: relative;
}

.tool-card-heading {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Tool Form Controls */
.tool-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tool-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tool-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tool-select, .tool-input {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.tool-select:focus, .tool-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-red-glow);
}

.tool-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent-red);
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-red);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn-primary:hover {
  background-color: var(--accent-red-hover);
  border-color: var(--accent-red-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
  text-decoration: none;
}

.tool-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ========================================================
   TOOL 1: COMPARADOR DE SALMOS
======================================================== */
.compare-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.compare-column-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.compare-column-header {
  border-bottom: 2px solid var(--accent-red);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.compare-column-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.compare-stat-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compare-meta-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.compare-meta-item strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.compare-meta-item p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0;
}

.compare-pill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.compare-pill-tag {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.compare-pill-tag.shared-tag {
  background-color: var(--accent-red-light);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.compare-synthesis-box {
  background-color: var(--bg-subtle);
  border-left: 4px solid var(--accent-red);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
}

.compare-synthesis-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

/* ========================================================
   TOOL 2: CALCULADORA DE TIEMPO DE LECTURA
======================================================== */
.speed-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.speed-btn {
  flex: 1 1 calc(25% - 0.75rem);
  min-width: 130px;
  padding: 0.75rem 1rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.speed-btn.active {
  background-color: var(--accent-red);
  border-color: var(--accent-red);
  color: #FFFFFF;
  box-shadow: var(--shadow-red);
}

.calc-results-hero {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.calc-time-display {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--accent-red);
  line-height: 1.2;
  margin: 0.5rem 0;
}

.calc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.calc-stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.calc-stat-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.reading-timer-container {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
  margin-top: 2rem;
  display: none;
}

.timer-countdown {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin: 1rem 0;
}

.timer-progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 1rem 0 1.5rem;
}

.timer-progress-fill {
  height: 100%;
  background-color: var(--accent-red);
  width: 0%;
  transition: width 0.3s linear;
}

/* ========================================================
   TOOL 3: ANALIZADOR DE PALABRAS DE LOS SALMOS
======================================================== */
.word-search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.word-results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
}

.word-occurrences-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.word-occurrence-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s ease;
}

.word-occurrence-item:hover {
  border-color: var(--accent-red);
}

.occurrence-psalm-link {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 0.4rem;
  display: block;
}

.occurrence-verse-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
  margin: 0;
}

mark.highlight-word {
  background-color: rgba(220, 38, 38, 0.25);
  color: var(--accent-red);
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* ========================================================
   TOOL 4: SALMO 119 EXPLORADOR DEL ALFABETO HEBREO
======================================================== */
.hebrew-letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.hebrew-letter-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.hebrew-letter-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
}

.hebrew-letter-card.active {
  background-color: var(--accent-red);
  border-color: var(--accent-red);
  color: #FFFFFF;
  box-shadow: var(--shadow-red);
}

.hebrew-char {
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: block;
}

.hebrew-name {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  display: block;
  opacity: 0.85;
}

.section-detail-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-top: 1.5rem;
}

.section-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.section-letter-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-big-glyph {
  font-size: 2.5rem;
  color: var(--accent-red);
  line-height: 1;
}

.section-verses-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1.5rem;
}

/* ========================================================
   TOOL 5: CONTEXTO DE VERSÍCULOS
======================================================== */
.context-hero-display {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--accent-red);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
}

.context-target-verse {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.context-trio-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.context-trio-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
}

.context-trio-box.center-box {
  border-color: var(--accent-red);
  box-shadow: 0 4px 18px var(--accent-red-glow);
}

.context-trio-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-red);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

/* ========================================================
   TOOL 6: GENERADOR DE PLAN DE LECTURA DE LOS SALMOS
======================================================== */
.schedule-presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.preset-plan-btn {
  padding: 0.65rem 1.2rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-plan-btn.active {
  background-color: var(--accent-red);
  border-color: var(--accent-red);
  color: #FFFFFF;
}

.plan-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.plan-days-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.plan-day-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.plan-day-card.completed {
  border-color: #10B981;
  background-color: rgba(16, 185, 129, 0.05);
}

.plan-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.plan-day-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.plan-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.plan-psalms-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.plan-psalm-pill {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-red);
  text-decoration: none;
}

.plan-psalm-pill:hover {
  text-decoration: underline;
}

/* ========================================================
   TOOL 7: PARALELISMO HEBREO EN LOS SALMOS
======================================================== */
.parallel-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.parallel-tab-btn {
  padding: 0.85rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.parallel-tab-btn.active {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

.parallel-card-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.75rem;
}

.parallel-verse-reference {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.parallel-lines-container {
  background-color: var(--bg-subtle);
  border-left: 4px solid var(--accent-red);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.8;
}

.parallel-line-a {
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.parallel-line-b {
  color: var(--text-secondary);
  padding-left: 2rem;
}

/* ========================================================
   TOOL 8: HERRAMIENTA PARA MEMORIZAR SALMOS
======================================================== */
.memorize-controls-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.memorize-mode-selector {
  display: flex;
  gap: 0.5rem;
}

.memorize-exercise-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.memorize-words-flow {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 2.2;
  color: var(--text-primary);
  word-spacing: 0.15em;
}

.memorize-blank-input {
  display: inline-block;
  min-width: 90px;
  width: auto;
  padding: 0.2rem 0.5rem;
  margin: 0 0.3rem;
  border: none;
  border-bottom: 2px solid var(--accent-red);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-align: center;
  outline: none;
  border-radius: 4px;
}

.memorize-blank-input.correct {
  border-color: #10B981;
  background-color: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.memorize-blank-input.incorrect {
  border-color: #EF4444;
  background-color: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.memorize-score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
}

/* ========================================================
   HOMEPAGE SECTION: EXPLORA MÁS HERRAMIENTAS
======================================================== */
.section-more-tools {
  padding: 5rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.more-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.tool-feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.tool-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tool-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background-color: #18181B;
}

.tool-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tool-feature-card:hover .tool-card-media img {
  transform: scale(1.05);
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.tool-feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.tool-feature-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-top: auto;
  transition: transform 0.2s ease;
}

.tool-feature-link:hover {
  transform: translateX(4px);
  text-decoration: underline;
}

/* Individual Tool Theme Card Accents */
.card-tool-comparador { border-top: 4px solid #4F46E5; }
.card-tool-comparador:hover { border-color: #6366F1; }
.card-tool-comparador .tool-badge { background: rgba(79, 70, 229, 0.15); color: #6366F1; border: 1px solid rgba(79, 70, 229, 0.3); }

.card-tool-calculadora { border-top: 4px solid #D97706; }
.card-tool-calculadora:hover { border-color: #F59E0B; }
.card-tool-calculadora .tool-badge { background: rgba(217, 119, 6, 0.15); color: #F59E0B; border: 1px solid rgba(217, 119, 6, 0.3); }

.card-tool-analizador { border-top: 4px solid #059669; }
.card-tool-analizador:hover { border-color: #10B981; }
.card-tool-analizador .tool-badge { background: rgba(5, 150, 105, 0.15); color: #10B981; border: 1px solid rgba(5, 150, 105, 0.3); }

.card-tool-salmo119 { border-top: 4px solid #DC2626; }
.card-tool-salmo119:hover { border-color: #EF4444; }
.card-tool-salmo119 .tool-badge { background: rgba(220, 38, 38, 0.15); color: #EF4444; border: 1px solid rgba(220, 38, 38, 0.3); }

.card-tool-contexto { border-top: 4px solid #0891B2; }
.card-tool-contexto:hover { border-color: #06B6D4; }
.card-tool-contexto .tool-badge { background: rgba(8, 145, 178, 0.15); color: #06B6D4; border: 1px solid rgba(8, 145, 178, 0.3); }

.card-tool-plan { border-top: 4px solid #7C3AED; }
.card-tool-plan:hover { border-color: #8B5CF6; }
.card-tool-plan .tool-badge { background: rgba(124, 58, 237, 0.15); color: #8B5CF6; border: 1px solid rgba(124, 58, 237, 0.3); }

.card-tool-paralelismo { border-top: 4px solid #E11D48; }
.card-tool-paralelismo:hover { border-color: #F43F5E; }
.card-tool-paralelismo .tool-badge { background: rgba(225, 29, 72, 0.15); color: #F43F5E; border: 1px solid rgba(225, 29, 72, 0.3); }

.card-tool-memorizar { border-top: 4px solid #2563EB; }
.card-tool-memorizar:hover { border-color: #3B82F6; }
.card-tool-memorizar .tool-badge { background: rgba(37, 99, 235, 0.15); color: #3B82F6; border: 1px solid rgba(37, 99, 235, 0.3); }

/* Mobile Responsiveness for Tools */
@media (max-width: 768px) {
  .tool-hero-title {
    font-size: 1.85rem;
  }
  .compare-columns-grid {
    grid-template-columns: 1fr;
  }
  .context-trio-grid {
    grid-template-columns: 1fr;
  }
  .tool-app-card {
    padding: 1.5rem;
  }
  .calc-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .tool-hero {
    padding: 3rem 0 2.5rem;
  }
  .tool-hero-title {
    font-size: 1.6rem;
  }
  .hebrew-letters-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .word-search-bar {
    flex-direction: column;
  }
  .speed-btn {
    flex: 1 1 calc(50% - 0.75rem);
  }
}

/* ========================================================
   COMPREHENSIVE DEVOTIONAL TOOLS COMPONENT STYLES
======================================================== */

/* Metric Stats Grid */
.stats-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.stats-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent-red);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stats-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-red);
}
.metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.metric-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Common interactive pills & chips */
.speed-pill-btn, .plan-preset-pill, .practice-mode-pill, .level-step-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.speed-pill-btn:hover, .plan-preset-pill:hover, .practice-mode-pill:hover, .level-step-btn:hover {
  border-color: var(--accent-red);
  color: var(--text-primary);
}
.speed-pill-btn.active, .plan-preset-pill.active, .practice-mode-pill.active, .level-step-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.quick-word-chip {
  padding: 0.35rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-word-chip:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Tool Empty State */
.tool-empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}
.tool-empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.tool-empty-state h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.tool-empty-state p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Timer status notices */
.timer-status-notice {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  display: inline-block;
  transition: all 0.3s ease;
}
.timer-status-notice.running {
  color: #3B82F6;
  background: rgba(59, 130, 246, 0.1);
}
.timer-status-notice.completed {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  font-weight: 700;
}
.timer-status-notice.paused {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
}

/* Psalm preview & reading verses */
.reading-psalm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.reading-verses-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.reading-verse-line {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.reading-verse-line:hover {
  border-color: var(--border-color);
}
.reading-verse-line .verse-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-red);
  min-width: 1.75rem;
}
.reading-verse-line .verse-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Psalm Frequency Cards */
.psalm-frequency-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.frequency-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.frequency-verses-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.frequency-verse-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.frequency-verse-item .verse-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-red);
  white-space: nowrap;
}
.frequency-verse-item .verse-content {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0;
}

/* Psalm 119 letter grid & hero */
.hebrew-alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.hebrew-tile-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.35rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
}
.hebrew-tile-btn:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
}
.hebrew-tile-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.hebrew-tile-btn.active .hebrew-char,
.hebrew-tile-btn.active .hebrew-name,
.hebrew-tile-btn.active .hebrew-vv {
  color: #FFFFFF !important;
}
.hebrew-tile-btn .hebrew-char {
  font-size: 1.75rem;
  line-height: 1.1;
  color: var(--text-primary);
  font-weight: 700;
}
.hebrew-tile-btn .hebrew-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.2rem;
}
.hebrew-tile-btn .hebrew-vv {
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.salmo119-hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 1.5rem;
}
.salmo119-hero-top {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.salmo119-badge-letter {
  width: 72px;
  height: 72px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.salmo119-badge-letter .big-hebrew {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--accent-red);
  line-height: 1;
}
.salmo119-hero-info {
  flex: 1;
  min-width: 250px;
}
.salmo119-meta-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-red);
  letter-spacing: 0.5px;
}

/* Verse Context Explorer */
.context-container-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 1.5rem;
}
.context-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.context-verses-stream {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}
.context-verse-row {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.2s ease;
  position: relative;
}
.context-verse-row.target-highlight {
  background: rgba(220, 38, 38, 0.08);
  border: 2px solid var(--accent-red);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.15);
}
.context-verse-row.context-surrounding {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  opacity: 0.85;
}
.context-verse-row.context-surrounding:hover {
  opacity: 1;
  border-color: var(--text-secondary);
}
.verse-indicator-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--accent-red);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}
.context-rel-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  display: block;
}
.verse-row-body {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.verse-num-badge {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-red);
  min-width: 1.5rem;
}
.verse-num-badge.muted {
  color: var(--text-secondary);
}
.verse-lead-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0;
}
.verse-sub-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}
.tool-btn-copy {
  margin-top: 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tool-btn-copy:hover {
  border-color: var(--accent-red);
  color: var(--text-primary);
}
.context-editorial-meta {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.context-meaning-quote {
  font-style: italic;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent-red);
  background: rgba(220, 38, 38, 0.05);
  margin-top: 0.75rem;
  color: var(--text-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Reading Schedule Day Rows */
.plan-schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.plan-day-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}
.plan-day-row.is-completed {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.06);
}
.plan-day-row.is-completed .plan-day-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}
.plan-day-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.plan-day-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
}
.plan-day-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}
.plan-day-psalms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.plan-psalm-chip {
  padding: 0.25rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}
.plan-psalm-chip:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Parallelism Explorer */
.parallel-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.parallel-example-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.parallel-example-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-secondary);
}
.parallel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.parallel-ref-title h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.parallel-ref-tag {
  font-size: 0.85rem;
  color: var(--accent-red);
  font-weight: 700;
}
.parallel-type-pill {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}
.parallel-type-pill.pill-synonym {
  background: rgba(37, 99, 235, 0.15);
  color: #3B82F6;
  border: 1px solid rgba(37, 99, 235, 0.3);
}
.parallel-type-pill.pill-antithetic {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.parallel-type-pill.pill-synthetic {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.parallel-verses-duo {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.parallel-line-box {
  background: var(--bg-card);
  border-left: 4px solid var(--border-color);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.85rem 1.25rem;
}
.parallel-line-box.line-a {
  border-left-color: var(--accent-red);
}
.parallel-line-box.line-b {
  border-left-color: #3B82F6;
  margin-left: 1rem;
}
.parallel-line-box .line-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.25rem;
}
.parallel-line-box .line-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
}
.parallel-card-explanation {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.parallel-card-footer {
  display: flex;
  justify-content: flex-end;
}

/* Memorization Trainer Practice Box */
.memorize-box-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 1.5rem;
}
.memorize-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.progressive-level-bar {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-card);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}
.memorize-text-surface {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 2.3;
  color: var(--text-primary);
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  min-height: 120px;
}
.hidden-word-slot {
  display: inline-block;
  background: rgba(220, 38, 38, 0.15);
  border-bottom: 2px solid var(--accent-red);
  color: transparent;
  user-select: none;
  cursor: pointer;
  padding: 0 0.4rem;
  border-radius: 3px;
  transition: all 0.2s ease;
}
.hidden-word-slot:hover {
  background: rgba(220, 38, 38, 0.3);
}
.hidden-word-slot.peeking {
  color: var(--text-primary);
}
.visible-word {
  color: var(--text-primary);
}
.blank-input {
  display: inline-block;
  border: none;
  border-bottom: 2px solid var(--accent-red);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  padding: 0.15rem 0.35rem;
  margin: 0 0.25rem;
  border-radius: 4px;
  outline: none;
  transition: all 0.2s ease;
}
.blank-input.correct {
  border-color: #10B981 !important;
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10B981 !important;
}
.blank-input.incorrect {
  border-color: #EF4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  color: #EF4444 !important;
}
.memorize-controls-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.active-memorized {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #F59E0B !important;
  color: #F59E0B !important;
}

/* Print Styles for Reading Plan */
@media print {
  .site-header, .site-footer, .tool-hero, .schedule-presets-bar, #constellation-canvas {
    display: none !important;
  }
  .tool-page-container {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .plan-day-card, .plan-day-row {
    break-inside: avoid;
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
}

