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

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

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

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

.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-select {
  padding: 0.55em 0.75em;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.search-pairs-select: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);
}

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

  .search-pairs-select {
    width: 100%;
  }
}

/* ── Surah index ──────────────────────────────────────────────── */

.surah-index-list {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.surah-index-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1rem;
  text-decoration: none;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  font-size: 0.9rem;
}

.surah-index-row:last-child {
  border-bottom: none;
}

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

.surah-index-row.has-pairs {
  color: var(--text);
}

.surah-index-num {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.surah-index-name {
  font-weight: 500;
}

.surah-index-row.has-pairs .surah-index-name {
  font-weight: 600;
}

.surah-index-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 0.1em 0.55em;
  min-width: 1.4em;
  text-align: center;
  line-height: 1.6;
}

.surah-index-empty {
  font-size: 0.78rem;
  color: var(--border);
  text-align: right;
}

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

.juz-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 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: 600px) {
  .juz-index-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}

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

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

.lp-hero-inner {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.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: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.lp-cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
}

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

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

.lp-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 260px;
  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;
}

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

.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);
  border-left: 3px solid var(--accent);
  margin: 0 auto 1.25rem;
  padding: 0.5rem 0 0.5rem 1.25rem;
  line-height: 1.75;
  max-width: 680px;
}

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

.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 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 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  line-height: 1;
}

.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-steps {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  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;
}

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

.lp-browse-inner {
  text-align: center;
  margin: 0 auto;
}

.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;
}

@media (max-width: 600px) {
  .lp-hero {
    padding: 2rem 0;
  }

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

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