/* ── Ayah page ─────────────────────────────────────────────────── */

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.page-heading h1 {
  margin: 0;
}

/* ── Dashboard ────────────────────────────────────────────────── */

.review-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--accent-subtle, rgba(79,70,229,0.06));
  border-color: var(--accent, #4f46e5);
}

.review-prompt-text {
  margin: 0;
  font-size: 0.97rem;
}

/* ── Compare page ─────────────────────────────────────────────── */

.compare-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.compare-save-card {
  margin-top: 1rem;
}

.compare-note {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

.compare-login-nudge {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
}

.highlight-legend {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.92rem;
}

.compare-grid.no-highlights mark.word-unique {
  background: none;
  font-weight: inherit;
}

/* Practice Mode */
.practice-controls {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.practice-controls.active { display: flex; }

.compare-grid.practice-mode .verse-card:first-child {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.25s;
}
.compare-grid.practice-mode.practice-right .verse-card:first-child {
  filter: none;
  user-select: auto;
  pointer-events: auto;
}
.compare-grid.practice-mode.practice-right .verse-card:last-child {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}
.compare-grid.practice-mode.revealed .verse-card:first-child,
.compare-grid.practice-mode.revealed .verse-card:last-child {
  filter: none !important;
  user-select: auto !important;
  pointer-events: auto !important;
}

.related-pairs {
  margin-top: 1.5rem;
}

.related-pairs-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.related-pairs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.related-pair-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45em 0.75em;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  font-size: 0.88rem;
  transition: border-color 0.15s, background 0.15s;
}

.related-pair-link:hover {
  border-color: var(--accent);
  background: rgba(0,0,0,0.02);
}

.related-pair-refs {
  font-weight: 500;
}

.related-pair-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

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

/* ── Search page ──────────────────────────────────────────────── */

.search-pairs-form {
  margin: 1.25rem 0;
}

.search-pairs-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-pairs-input {
  flex: 1;
  padding: 0.55em 0.85em;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  min-width: 0;
}

.search-pairs-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-pairs-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.search-pairs-error {
  color: var(--error, #c0392b);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

.category-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 0.9rem;
}

.filter-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-pill:hover {
  background: #e8f4f2;
  border-color: #b8d8d3;
  color: #1a6b5e;
}

.filter-pill.active {
  background: #1a6b5e;
  border-color: #1a6b5e;
  color: #fff;
}

@media (max-width: 600px) {
  .search-pairs-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Stats strip (homepage) ───────────────────────────────────── */

.lp-stats {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-num {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Empty states with icons ──────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.25rem 0 0.5rem;
  color: var(--muted);
}

.empty-state svg {
  width: 2.25rem;
  height: 2.25rem;
  opacity: 0.45;
  flex-shrink: 0;
}

/* ── Search empty state ───────────────────────────────────────── */

.search-empty-state {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.search-empty-state svg {
  width: 2.25rem;
  height: 2.25rem;
  opacity: 0.45;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.search-empty-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* ── Juz index ────────────────────────────────────────────────── */

.juz-index-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.65rem;
  margin-top: 1rem;
}

.juz-index-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text-muted);
  gap: 0.3rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.juz-index-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.juz-index-card.has-pairs {
  border-color: var(--accent);
  color: var(--text);
}

.juz-index-num {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.juz-index-card.has-pairs .juz-index-num {
  color: var(--accent);
}

.juz-index-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.juz-index-empty {
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 980px) {
  .juz-index-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 600px) {
  .juz-index-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Landing page ─────────────────────────────────────────────── */

.lp-main {
  padding-top: 0;
}

/* Hero */

.lp-hero {
  position: relative;
  padding: 3.5rem 0 4rem;
  border-bottom: 1px solid var(--border);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}

.lp-hero-inner {
  max-width: 900px;
  width: 100%;
}

/* Desktop split: text left, buttons right */
.lp-hero-layout {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

.lp-hero-text {
  flex: 1;
  min-width: 0;
}

/* Side action buttons (hero + browse CTA) */
.lp-side-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-shrink: 0;
  width: 210px;
}

.lp-side-actions .lp-cta-primary,
.lp-side-actions .lp-cta-secondary {
  width: 100%;
  justify-content: center;
}

/* Scroll cue: pinned to bottom of hero */
.lp-scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  color: var(--text-muted);
  opacity: 0.45;
  animation: lp-bounce 2s ease-in-out infinite;
}

@keyframes lp-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

.lp-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

.lp-headline {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 1.2rem;
}

.lp-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 0;
  line-height: 1.7;
}

/* Diff preview inside hero */
.lp-hero-diff {
  margin-bottom: 0.75rem;
}

/* Sections */

.lp-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.lp-section-inner {
  max-width: 820px;
}

.lp-section-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
  text-align: center;
}

.lp-section-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 2rem;
  text-align: center;
}

.lp-quote {
  font-size: 1.08rem;
  font-style: italic;
  color: var(--text);
  text-align: center;
  margin: 0 auto 1.25rem;
  line-height: 1.75;
  max-width: 660px;
}

.lp-story-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 auto;
  max-width: 620px;
  text-align: center;
}

/* Feature grid */

.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.lp-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.25rem;
}

.lp-feature-icon {
  margin-bottom: 0.75rem;
  color: var(--accent);
  display: flex;
}

.lp-feature-card h3 {
  font-size: 0.97rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  color: var(--text);
}

.lp-feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

.lp-login-note {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
}

/* Steps */

.lp-steps {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lp-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.lp-step-num {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.88rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.lp-step h3 {
  font-size: 0.97rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--text);
}

.lp-step p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

/* Browse CTA (bottom) — desktop split */

.lp-browse-cta {
  border-bottom: none;
  padding-bottom: 5rem;
}

.lp-browse-split {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.lp-browse-text {
  flex: 1;
  min-width: 0;
}

.lp-browse-text .lp-section-title {
  text-align: left;
  margin-bottom: 0.6rem;
}

.lp-browse-text .lp-sub {
  max-width: none;
}

/* CTAs (shared button styles) */

.lp-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65em 1.5em;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.lp-cta-primary:hover {
  background: var(--accent-strong);
}

.lp-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.62em 1.1em;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.lp-cta-secondary:hover {
  border-color: var(--accent);
  background: rgba(0,0,0,0.02);
}

/* Diff cards */

.lp-diff-example {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.lp-diff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.lp-diff-ref {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.lp-diff-arabic {
  font-family: "Amiri Quran", "Noto Naskh Arabic", serif;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  line-height: 2.1;
  direction: rtl;
  text-align: right;
  color: #0b2734;
  margin: 0;
}

.lp-diff-caption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  text-align: center;
}

/* Responsive */

/* Tablet: stack hero layout, keep buttons in a row */
@media (max-width: 980px) {
  .lp-hero-layout {
    flex-direction: column;
    gap: 1.75rem;
    margin-bottom: 2.5rem;
  }

  .lp-hero-text {
    text-align: center;
  }

  .lp-hero-text .lp-eyebrow,
  .lp-hero-text .lp-headline {
    text-align: center;
  }

  .lp-hero-text .lp-sub {
    margin: 0 auto;
  }

  .lp-side-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }

  .lp-side-actions .lp-cta-primary,
  .lp-side-actions .lp-cta-secondary {
    width: auto;
  }

  .lp-browse-split {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .lp-browse-text .lp-section-title {
    text-align: center;
  }

  .lp-browse-text .lp-sub {
    margin: 0 auto;
    max-width: 540px;
  }
}

/* Mobile: stack buttons full-width */
@media (max-width: 640px) {
  .lp-hero {
    padding: 2.5rem 0 4rem;
  }

  .lp-section {
    padding: 2.5rem 0;
  }

  .lp-diff-example {
    grid-template-columns: 1fr;
  }

  .lp-side-actions {
    flex-direction: column;
    width: 100%;
  }

  .lp-side-actions .lp-cta-primary,
  .lp-side-actions .lp-cta-secondary {
    width: 100%;
  }

}
