@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Literata:opsz,wght@7..72,300;7..72,400;7..72,600;7..72,700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #060810;
  --s1: #0b0f19;
  --s2: #111825;
  --c: #151d30;
  --c2: #1a2440;
  --g: #c9a84c;
  --gl: #e2c36e;
  --gd: #8a6d2b;
  --gg: rgba(201, 168, 76, 0.1);
  --t: #2dd4bf;
  --td: #1a9a89;
  --x: #e8edf5;
  --x2: #94a3b8;
  --x3: #64748b;
  --b: #1e293b;
  --mk: #fb923c;
  --md: #2dd4bf;
  --r: #f87171;
  --bl: #60a5fa;
  --pr: #a78bfa;
  --gr: #34d399;
}

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

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 15% 15%, rgba(201, 168, 76, 0.03) 0%, transparent 50%), radial-gradient(circle at 85% 85%, rgba(45, 212, 191, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--x);
  line-height: 1.75;
  direction: ltr;
  text-align: left;
}

body.ar {
  direction: rtl;
  text-align: right;
  font-family: 'IBM Plex Sans Arabic', 'Amiri', sans-serif;
}

[data-l="ar"] {
  display: none;
}

body.ar [data-l="en"] {
  display: none;
}

body.ar [data-l="ar"] {
  display: inline;
}

body.ar div[data-l="ar"],
body.ar p[data-l="ar"],
body.ar span[data-l="ar"] {
  display: block;
}

body.ar div[data-l="en"],
body.ar p[data-l="en"],
body.ar span[data-l="en"] {
  display: none;
}

div[data-l="ar"],
p[data-l="ar"] {
  display: none;
}

.w {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ═══ TOP BAR ═══ */
.top {
  background: rgba(6, 8, 16, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--b);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gd), var(--g), var(--gd), transparent);
  opacity: 0.4;
}

.top-in {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  gap: 0.5rem;
}

.logo {
  font-family: 'Amiri';
  font-size: 1.15rem;
  color: var(--g);
  margin-inline-end: 0.5rem;
  white-space: nowrap;
  cursor: pointer;
}

.logo:hover {
  color: var(--gl);
}

/* MAIN NAV */
.tabs {
  display: flex;
  gap: 0.15rem;
  flex: 1;
  align-items: center;
}

.hamburger-btn {
  display: none;
  background: none;
  border: 1px solid var(--b);
  color: var(--g);
  font-size: 1.3rem;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.hamburger-btn:hover,
.hamburger-btn.hamburger-active {
  background: var(--gg);
  color: var(--gl);
}

/* Direct nav link (Home) */
.nav-link {
  padding: 0.45rem 0.8rem;
  color: var(--x3);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.25s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--x);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.nav-active {
  color: var(--gl);
  background: var(--gg);
  font-weight: 600;
}

.nav-ico {
  font-size: 0.9rem;
}

/* Dropdown group */
.nav-group {
  position: relative;
}

.nav-group-btn {
  padding: 0.45rem 0.8rem;
  background: none;
  border: none;
  color: var(--x3);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.25s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-group-btn:hover {
  color: var(--x);
  background: rgba(255, 255, 255, 0.04);
}

.nav-group-active .nav-group-btn {
  color: var(--gl);
  font-weight: 600;
}

/* Arrow indicator */
.nav-arrow {
  font-size: 0.55rem;
  margin-inline-start: 0.15rem;
  transition: transform 0.25s;
  opacity: 0.5;
}

.nav-group.open .nav-arrow {
  transform: rotate(-90deg);
  opacity: 1;
}

/* Dropdown panel */
.nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: rgba(10, 12, 22, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--b);
  border-radius: 10px;
  padding: 0.35rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 200;
}

.nav-group.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(2px);
}

/* Dropdown items */
.nav-dd-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  color: var(--x3);
  font-family: inherit;
  font-size: 0.82rem;
  border-radius: 7px;
  text-decoration: none;
  transition: 0.2s;
  white-space: nowrap;
}

.nav-dd-item:hover {
  color: var(--x);
  background: rgba(255, 255, 255, 0.05);
}

.nav-dd-item.nav-dd-active {
  color: var(--gl);
  background: var(--gg);
  font-weight: 600;
}

.nav-dd-ico {
  font-size: 0.95rem;
}

/* Keep old .tab class for backward compat (unused now) */
.tab {
  display: none;
}

.lang-sw {
  display: flex;
  gap: 0.2rem;
  margin-inline-start: auto;
}

.lb {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--b);
  background: 0;
  color: var(--x3);
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: 0.3s;
}

.lb.on {
  background: var(--gg);
  color: var(--gl);
  border-color: var(--gd);
}

/* ═══ PAGES ═══ */
.page {
  display: none;
  padding: 2rem 0 3rem;
  min-height: 70vh;
}

.page.show {
  display: block;
  animation: fi .35s ease;
}

@keyframes fi {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* HERO */
/* ═══ Homepage Sections ═══ */
.home-sec {
  margin-bottom: 1.8rem;
}

.home-sec-hdr {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gl);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-sec-ico {
  font-size: 1.3rem;
}

.hero {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
}

.hero .bsm {
  font-family: 'Amiri';
  font-size: 2.2rem;
  color: var(--g);
  opacity: 0.5;
}

.hero h1 {
  font-family: 'Amiri';
  font-size: 2.3rem;
  color: var(--gl);
  margin: 0.6rem 0 0.5rem;
  line-height: 1.4;
}

body.ar .hero h1 {
  font-size: 2rem;
}

.hero p {
  color: var(--x2);
  max-width: 680px;
  margin: 0 auto;
  font-weight: 300;
  font-size: 0.95rem;
}

/* SECTION HEADERS */
.sh2 {
  font-family: 'Amiri';
  font-size: 1.5rem;
  color: var(--gl);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--gd), transparent) 1;
}

.sn {
  font-family: 'JetBrains Mono';
  font-size: 0.75rem;
  color: var(--t);
  background: rgba(45, 212, 191, 0.07);
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  border: 1px solid rgba(45, 212, 191, 0.1);
  direction: ltr;
}

.sdesc {
  color: var(--x2);
  max-width: 800px;
  margin-bottom: 1.8rem;
  font-size: 0.92rem;
  font-weight: 300;
}

/* ═══ STAT CARDS ═══ */
.sg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.sc2 {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 11px;
  padding: 1rem;
  text-align: center;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.sc2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gd), var(--g));
  opacity: 0;
  transition: 0.3s;
}

.sc2:hover {
  border-color: var(--gd);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.sc2:hover::before {
  opacity: 1;
}

.sv {
  font-family: 'JetBrains Mono';
  font-size: 1.9rem;
  color: var(--g);
  direction: ltr;
  line-height: 1.2;
}

.sl {
  font-size: 0.8rem;
  color: var(--x3);
  margin-top: 0.15rem;
}

.sc2.has-detail {
  cursor: pointer;
}

.sc2.has-detail .sl::after {
  content: ' ▸';
  font-size: 0.65rem;
  color: var(--gd);
  transition: 0.3s;
  display: inline-block;
}

.sc2.has-detail.open .sl::after {
  transform: rotate(90deg);
}

.stat-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s, margin 0.3s;
  opacity: 0;
  font-size: 0.78rem;
  color: var(--gl);
  line-height: 1.7;
  margin-top: 0;
  padding: 0 0.3rem;
}

.sc2.has-detail.open .stat-detail {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--b);
}

/* FEATURE CARDS on home */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.feat {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: 0.3s;
}

.feat:hover {
  border-color: var(--gd);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.feat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gd), var(--t));
  border-radius: 12px 12px 0 0;
  opacity: 0;
  transition: 0.3s;
}

.feat:hover::before {
  opacity: 1;
}

.feat {
  position: relative;
  overflow: hidden;
}

.feat-ico {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.feat h3 {
  color: var(--gl);
  font-family: 'Amiri';
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.feat p {
  color: var(--x2);
  font-size: 0.88rem;
  font-weight: 300;
}

/* ═══ TABLE ═══ */
.bx {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  padding: 1.3rem;
  margin-bottom: 1.3rem;
  overflow-x: auto;
}

.bx-t {
  font-size: 0.95rem;
  color: var(--gl);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.tb th {
  text-align: left;
  padding: 0.55rem 0.7rem;
  background: var(--gg);
  color: var(--gl);
  font-weight: 600;
  border-bottom: 2px solid var(--gd);
}

body.ar .tb th {
  text-align: right;
}

.tb td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--b);
  vertical-align: top;
}

.tb tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.nc {
  text-align: center;
  font-family: 'JetBrains Mono';
  color: var(--t);
  direction: ltr;
}

/* BAR */
.bc {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.br {
  display: grid;
  grid-template-columns: 45px 1fr 130px;
  gap: 0.6rem;
  align-items: center;
}

.bv {
  font-family: 'JetBrains Mono';
  font-size: 0.78rem;
  color: var(--x2);
  text-align: center;
  direction: ltr;
}

.btr {
  height: 24px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
  overflow: hidden;
  direction: ltr;
}

.bf {
  height: 100%;
  border-radius: 3px;
  transition: width 1s;
}

.bf1 {
  background: linear-gradient(90deg, var(--gd), var(--g));
}

.bf2 {
  background: linear-gradient(90deg, var(--td), var(--t));
}

.bf3 {
  background: linear-gradient(90deg, #2563eb, var(--bl));
}

.bf4 {
  background: linear-gradient(90deg, #dc2626, var(--r));
}

.bf5 {
  background: linear-gradient(90deg, #7c3aed, var(--pr));
}

.bf6 {
  background: linear-gradient(90deg, #059669, var(--gr));
}

.bf7 {
  background: linear-gradient(90deg, #c2410c, #fb923c);
}

.blab {
  font-family: 'Amiri';
  font-size: 1rem;
  color: var(--x);
  text-align: right;
  direction: rtl;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PAIR CARDS */
.pcg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.pc {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  padding: 1.3rem;
  transition: 0.3s;
}

.pc:hover {
  border-color: var(--gd);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.pc-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.pc-ar {
  font-family: 'Amiri';
  font-size: 1.75rem;
  color: var(--g);
  direction: rtl;
}

.pc-f {
  font-family: 'JetBrains Mono';
  font-size: 0.88rem;
  color: var(--t);
  background: rgba(45, 212, 191, 0.07);
  padding: 0.2rem 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(45, 212, 191, 0.1);
  direction: ltr;
}

.pc-tr {
  color: var(--x3);
  font-style: italic;
  font-size: 0.85rem;
}

.pc-m {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.25rem 0 0.5rem;
}

.pc-ctx {
  font-size: 0.83rem;
  color: var(--x2);
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.pc-r {
  font-size: 0.83rem;
  color: var(--x);
  padding-inline-start: 0.7rem;
  border-inline-start: 3px solid var(--gd);
  font-weight: 300;
  margin-bottom: 0.4rem;
}

.pc-refs {
  font-size: 0.78rem;
  direction: rtl;
  text-align: right;
  max-height: 10rem;
  overflow-y: auto;
  line-height: 1.6;
  margin-top: 0.5rem;
}

.pc-refs::-webkit-scrollbar {
  width: 4px;
}

.pc-refs::-webkit-scrollbar-thumb {
  background: var(--gd);
  border-radius: 4px;
}

.end-ref-btn {
  font-size: 0.72rem !important;
  padding: 0.15rem 0.45rem !important;
  margin: 0.12rem !important;
  cursor: pointer;
  min-height: unset !important;
}

.end-ayah-box {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--b);
  border-radius: 8px;
  padding: 0.7rem;
  margin-top: 0.3rem;
  width: 100%;
}

/* INSIGHTS */
.il {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.ic {
  display: flex;
  gap: 0.8rem;
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 10px;
  padding: 1.1rem;
  transition: 0.3s;
}

.ic:hover {
  border-color: var(--gd);
}

.ic-n {
  font-family: 'JetBrains Mono';
  font-size: 1.2rem;
  color: var(--gd);
  min-width: 2rem;
  direction: ltr;
  text-align: center;
}

.ic h4 {
  color: var(--gl);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  font-family: 'Amiri';
}

.ic p {
  color: var(--x2);
  font-size: 0.85rem;
  font-weight: 300;
}

/* MAKKI MADANI */
.mm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.mmc {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  padding: 1.2rem;
}

.mmc h3 {
  color: var(--g);
  font-family: 'Amiri';
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.mmc .md2 {
  color: var(--x2);
  font-size: 0.83rem;
  margin-bottom: 0.7rem;
  font-weight: 300;
}

.mpi {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0.5rem;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 5px;
  margin-bottom: 0.2rem;
}

.mpi .ma {
  font-family: 'Amiri';
  font-size: 1.05rem;
  color: var(--gl);
}

.mpi .mc {
  font-family: 'JetBrains Mono';
  color: var(--t);
  font-size: 0.82rem;
  direction: ltr;
}

.dbc {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  direction: ltr;
}

.db {
  height: 16px;
  background: linear-gradient(90deg, var(--td), var(--t));
  border-radius: 3px;
  min-width: 3px;
}

.dbl {
  font-family: 'JetBrains Mono';
  font-size: 0.73rem;
  color: var(--t);
}

/* ═══ SURAH EXPLORER ═══ */
.se-ctrl {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
  align-items: center;
}

.se-q {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 1rem;
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: 10px;
  color: var(--x);
  font-size: 0.9rem;
  font-family: inherit;
  outline: 0;
  transition: 0.3s;
}

.se-q:focus {
  border-color: var(--gd);
}

.se-q::placeholder {
  color: var(--x3);
}

.fb {
  padding: 0.4rem 0.85rem;
  background: var(--s2);
  border: 1px solid var(--b);
  color: var(--x2);
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  transition: 0.3s;
}

.fb:hover {
  border-color: var(--gd);
}

.fb.on {
  background: var(--gg);
  border-color: var(--g);
  color: var(--gl);
}

.se-cnt {
  font-family: 'JetBrains Mono';
  font-size: 0.8rem;
  color: var(--x3);
  background: var(--s2);
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--b);
}

/* SURAH CARD */
.scd {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  transition: 0.3s;
}

.scd:hover {
  border-color: rgba(201, 168, 76, 0.18);
}

.scd.op {
  border-color: var(--g);
  background: var(--c2);
}

.scd.op .shd .aw {
  transform: rotate(180deg);
}

.shd {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
}

.snum {
  font-family: 'JetBrains Mono';
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--g);
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gg);
  border-radius: 10px;
  border: 1px solid rgba(201, 168, 76, 0.1);
  flex-shrink: 0;
}

.sinf {
  flex: 1;
  min-width: 0;
}

.snms {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sne {
  font-size: 1rem;
  font-weight: 600;
}

.sna {
  font-family: 'Amiri';
  font-size: 1.3rem;
  color: var(--gl);
}

.smta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.15rem;
  flex-wrap: wrap;
}

.pbd {
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border-radius: 8px;
  font-weight: 600;
}

.pbd.mk {
  background: rgba(249, 115, 22, 0.07);
  color: var(--mk);
  border: 1px solid rgba(249, 115, 22, 0.1);
}

.pbd.md {
  background: rgba(45, 212, 191, 0.05);
  color: var(--md);
  border: 1px solid rgba(45, 212, 191, 0.08);
}

.vct {
  font-family: 'JetBrains Mono';
  font-size: 0.72rem;
  color: var(--x3);
}

.smain {
  margin-top: 0.4rem;
  padding: 0.5rem 0.7rem;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.07), rgba(45, 212, 191, 0.03));
  border-radius: 7px;
  border-inline-start: 4px solid var(--g);
  font-size: 0.92rem;
  color: var(--x);
  font-weight: 500;
}

.aw {
  color: var(--x3);
  transition: transform 0.3s;
  font-size: 1rem;
  flex-shrink: 0;
}

.sbd {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--b);
}

.scd.op .sbd {
  display: block;
  animation: fi .3s;
}

.nb {
  background: var(--gg);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 0.7rem 0;
}

.nb-l {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--g);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.nb-t {
  font-size: 0.88rem;
  color: var(--x);
  font-weight: 300;
  line-height: 1.75;
}

.sut {
  font-size: 0.75rem;
  color: var(--g);
  font-weight: 600;
  margin: 0.9rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.su {
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 0;
  overflow: hidden;
  transition: 0.25s;
}

.su:last-child {
  border-bottom: none;
}

.su:nth-child(odd) {
  background: rgba(255, 255, 255, 0.012);
}

.suh {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.7rem;
  cursor: pointer;
  background: transparent;
  border-radius: 0;
  transition: 0.2s;
}

.suh:hover {
  background: rgba(201, 168, 76, 0.04);
}

.su.act {
  border-color: rgba(45, 212, 191, 0.1);
  background: rgba(45, 212, 191, 0.025);
}

.sub {
  font-family: 'JetBrains Mono';
  font-size: 0.7rem;
  color: var(--t);
  background: rgba(45, 212, 191, 0.05);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(45, 212, 191, 0.07);
  white-space: nowrap;
  flex-shrink: 0;
  direction: ltr;
}

.stx {
  font-size: 0.85rem;
  flex: 1;
}

.sar {
  font-size: 0.65rem;
  color: var(--x3);
  transition: transform 0.3s;
}

.su.act .sar {
  transform: rotate(90deg);
  color: var(--t);
}

/* AYAH BOX */
.ayb {
  display: none;
  padding: 0.7rem;
  margin: 0 0 0.2rem;
  background: var(--s1);
  border-radius: 7px;
  border: 1px solid var(--b);
}

.su.act .ayb {
  display: block;
  animation: fi .25s;
}

.ayl {
  text-align: center;
  color: var(--x3);
  font-size: 0.82rem;
  padding: 0.8rem;
}

.ayl .sp {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--b);
  border-top-color: var(--t);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-inline-end: 0.4rem;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.ays {
  direction: rtl;
  text-align: right;
}

.ayi {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.ayi:last-child {
  border: none;
}

.ayt {
  font-family: 'Amiri';
  font-size: 1.3rem;
  color: var(--gl);
  line-height: 2.1;
}

.ayn {
  font-family: 'JetBrains Mono';
  font-size: 0.65rem;
  color: var(--t);
  background: rgba(45, 212, 191, 0.05);
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
  margin-inline-start: 0.2rem;
  direction: ltr;
  display: inline;
}

.aye {
  color: var(--r);
  font-size: 0.82rem;
  text-align: center;
  padding: 0.4rem;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--x3);
  font-size: 0.75rem;
  border-top: 1px solid var(--b);
  margin-top: 2rem;
}

@media(max-width:768px) {
  .w {
    padding: 0 1rem;
  }

  .mm {
    grid-template-columns: 1fr;
  }

  .pcg {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.4rem;
    line-height: 1.6;
  }

  .hero p {
    font-size: 0.88rem;
  }

  .br {
    grid-template-columns: 38px 1fr 100px;
  }

  .tabs {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 8, 16, 0.98);
    border-bottom: 1px solid var(--b);
    padding: 0.5rem;
    gap: 0.25rem;
    z-index: 150;
  }

  .tabs.tabs-open {
    display: flex;
  }

  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.15rem 0.5rem;
    display: none;
  }

  .nav-group.open .nav-dropdown {
    display: block;
  }

  .feat-grid {
    grid-template-columns: 1fr;
  }

  /* Stat grids — 2 columns on mobile */
  .sg {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem;
  }

  .sc2 {
    padding: 0.8rem 0.5rem;
  }

  .sc2 .sv {
    font-size: 1.3rem;
  }

  .sc2 .sl {
    font-size: 0.72rem;
  }

  /* Tables — horizontally scrollable */
  .bx {
    padding: 0.8rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tb {
    font-size: 0.75rem;
    min-width: 500px;
  }

  .tb th,
  .tb td {
    padding: 0.4rem 0.5rem;
  }

  /* Filter / Tag buttons */
  .da-ctrl {
    gap: 0.4rem;
  }

  .fb,
  .da-fb {
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
  }

  /* Dua cards */
  .da-card {
    padding: 0.9rem;
  }

  .da-card .da-title {
    font-size: 0.95rem;
  }

  .da-card .da-text {
    font-size: 1.1rem;
    line-height: 2;
  }

  /* Hero & section headers */
  .sdesc {
    font-size: 0.85rem;
  }

  /* Feature cards */
  .feat {
    padding: 1rem;
  }

  .feat h3 {
    font-size: 0.95rem;
  }

  .feat p {
    font-size: 0.8rem;
  }

  .feat-ico {
    font-size: 1.8rem;
  }

  /* Surah cards */
  .shd {
    padding: 0.7rem 0.8rem;
    gap: 0.5rem;
  }

  .snum {
    min-width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .sna {
    font-size: 1.1rem;
  }

  .sne {
    font-size: 0.85rem;
  }

  .smain {
    font-size: 0.82rem;
  }

  .sbd {
    padding: 0 0.7rem 0.7rem;
  }

  /* Verse text */
  .ayt {
    font-size: 1.15rem;
    line-height: 1.9;
  }

  /* Footer */
  footer {
    font-size: 0.7rem;
    padding: 1.5rem 0.5rem;
  }

  /* Parables grid */
  .pcg {
    gap: 0.8rem;
  }

  .pc {
    padding: 0.9rem;
  }

  /* Language toggle */
  .lang-sw {
    margin-inline-start: 0.5rem;
  }

  .lb {
    font-size: 0.68rem;
    padding: 0.25rem 0.45rem;
  }

  /* Theme button */
  .theme-btn {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .logo {
    font-size: 1rem;
  }
}

/* ═══ EXTRA SMALL SCREENS ═══ */
@media(max-width:480px) {
  .sg {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem;
  }

  .sc2 .sv {
    font-size: 1.1rem;
  }

  .sc2 .sl {
    font-size: 0.65rem;
  }

  .hero h1 {
    font-size: 1.2rem;
  }

  .top-in {
    padding: 0.4rem 0;
  }
}

/* ═══ LIGHT THEME ═══ */
body.light {
  --bg: #f8f6f1;
  --s1: #f0ece4;
  --s2: #e8e4db;
  --c: #ffffff;
  --c2: #faf8f4;
  --g: #9a7b2e;
  --gl: #7a5f1a;
  --gd: #c9a84c;
  --gg: rgba(154, 123, 46, 0.08);
  --t: #0f766e;
  --td: #0d6357;
  --x: #1a1a2e;
  --x2: #4a4a6a;
  --x3: #7a7a9a;
  --b: #e0dcd4;
  --mk: #c2410c;
  --md: #0f766e;
  --r: #dc2626;
  --bl: #2563eb;
  --pr: #7c3aed;
  --gr: #059669;
  color: #1a1a2e;
  background: #f8f6f1;
}

body.light .top {
  background: rgba(248, 246, 241, 0.97);
  border-bottom-color: #e0dcd4;
}

body.light .logo {
  color: var(--g);
}

body.light .nav-group-btn,
body.light .nav-link {
  color: #7a7a9a;
}

body.light .nav-group-btn:hover,
body.light .nav-link:hover {
  color: #1a1a2e;
  background: rgba(0, 0, 0, 0.04);
}

body.light .nav-group-active .nav-group-btn,
body.light .nav-link.nav-active {
  color: #7a5f1a;
}

body.light .nav-dropdown {
  background: rgba(250, 248, 244, 0.98);
  border-color: #e0dcd4;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

body.light .nav-dd-item {
  color: #7a7a9a;
}

body.light .nav-dd-item:hover {
  color: #1a1a2e;
  background: rgba(0, 0, 0, 0.04);
}

body.light .nav-dd-item.nav-dd-active {
  color: #7a5f1a;
  background: rgba(154, 123, 46, 0.1);
}

body.light .hamburger-btn {
  border-color: #e0dcd4;
  color: #9a7b2e;
}

/* Light theme mobile menu */
body.light .tabs {
  background: rgba(248, 246, 241, 0.98);
  border-bottom-color: #e0dcd4;
}

body.light .tabs .nav-dropdown {
  background: rgba(240, 236, 228, 0.95);
}

body.light .scd {
  background: #fff;
  border-color: #e0dcd4;
}

body.light .scd.op {
  background: #faf8f4;
  border-color: var(--g);
}

body.light .da-card,
.light .st-card,
.light .ab-card,
.light .mt-card,
.light .pc,
.light .ic,
.light .bx,
.light .sc2,
.light .mmc,
.light .feat {
  background: #fff;
  border-color: #e0dcd4;
}

body.light .da-card:hover,
.light .st-card:hover,
.light .ab-card:hover,
.light .mt-card:hover,
.light .pc:hover,
.light .feat:hover {
  border-color: var(--gd);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body.light .fb {
  background: #f0ece4;
  border-color: #e0dcd4;
  color: #4a4a6a;
}

body.light .fb.on {
  background: rgba(154, 123, 46, 0.1);
  border-color: var(--g);
  color: #7a5f1a;
}

body.light .lb {
  border-color: #e0dcd4;
  color: #7a7a9a;
}

body.light .lb.on {
  background: rgba(154, 123, 46, 0.1);
  color: #7a5f1a;
  border-color: var(--gd);
}

body.light .se-q,
.light .da-q {
  background: #f0ece4;
  border-color: #e0dcd4;
  color: #1a1a2e;
}

body.light .se-q::placeholder,
.light .da-q::placeholder {
  color: #999;
}

body.light .da-card .da-text,
.light .ab-sabab {
  background: linear-gradient(135deg, rgba(154, 123, 46, 0.06), rgba(15, 118, 110, 0.03));
}

body.light .ayt {
  color: #7a5f1a;
}

body.light .ayb,
.light .st-ayb {
  background: #f0ece4;
  border-color: #e0dcd4;
}

body.light .hero {
  color: #1a1a2e;
}

body.light .hero p {
  color: #4a4a6a;
}

body.light footer {
  border-top-color: #e0dcd4;
  color: #999;
}

body.light .smain {
  background: linear-gradient(135deg, rgba(154, 123, 46, 0.07), rgba(15, 118, 110, 0.03));
  border-inline-start-color: var(--g);
}

body.light .nb {
  background: rgba(154, 123, 46, 0.06);
  border-color: rgba(154, 123, 46, 0.12);
}

body.light .su {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light .su:nth-child(odd) {
  background: rgba(0, 0, 0, 0.015);
}

body.light .suh:hover {
  background: rgba(154, 123, 46, 0.06);
}

body.light .mt-v {
  background: linear-gradient(135deg, rgba(154, 123, 46, 0.05), rgba(154, 123, 46, 0.02));
}

body.light ::-webkit-scrollbar-track {
  background: #f0ece4;
}

body.light ::-webkit-scrollbar-thumb {
  background: #d0ccc4;
}

/* ═══ THEME TOGGLE ═══ */
.theme-sw {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-inline-start: 0.4rem;
}

.theme-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--b);
  background: transparent;
  color: var(--x3);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.theme-btn:hover {
  border-color: var(--gd);
  color: var(--g);
  background: var(--gg);
}

html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--b);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gd);
}

.esub {
  display: none;
}

.esub.show {
  display: block;
  animation: fi .3s;
}

.da-ctrl {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
  align-items: center;
}

.da-q {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 1rem;
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: 10px;
  color: var(--x);
  font-size: 0.9rem;
  font-family: inherit;
  outline: 0;
  transition: 0.3s;
}

.da-q:focus {
  border-color: var(--gd);
}

.da-q::placeholder {
  color: var(--x3);
}

.da-cnt {
  font-family: 'JetBrains Mono';
  font-size: 0.8rem;
  color: var(--x3);
  background: var(--s2);
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--b);
}

.da-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.da-gh {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.da-gh .sn-ar {
  font-family: 'Amiri';
  font-size: 1.1rem;
  color: var(--gl);
}

.da-gh .sn-en {
  font-size: 0.85rem;
  color: var(--x2);
  direction: ltr;
}

.da-gh .ln {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--gd), transparent);
}

body.ar .da-gh .ln {
  background: linear-gradient(to left, var(--gd), transparent);
}

.da-gh .gcnt {
  font-family: 'JetBrains Mono';
  font-size: 0.72rem;
  color: var(--x3);
  background: var(--s2);
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  border: 1px solid var(--b);
}

.da-card {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  padding: 1.2rem;
  transition: 0.3s;
  overflow: hidden;
}

.da-card:hover {
  border-color: var(--gd);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.da-card .da-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'JetBrains Mono';
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  margin-bottom: 0.6rem;
  direction: ltr;
}

.da-card.dua-card .da-ref {
  background: rgba(45, 212, 191, 0.06);
  color: var(--t);
  border: 1px solid rgba(45, 212, 191, 0.08);
}

.da-card.mtl-card .da-ref {
  background: rgba(96, 165, 250, 0.06);
  color: var(--bl);
  border: 1px solid rgba(96, 165, 250, 0.08);
}

.da-card .da-title {
  font-family: 'Amiri';
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gl);
  margin-bottom: 0.15rem;
  line-height: 1.7;
}

.da-card .da-title-en {
  font-size: 0.82rem;
  color: var(--x2);
  font-style: italic;
  margin-bottom: 0.7rem;
  direction: ltr;
  text-align: left;
}

.da-card .da-text {
  font-family: 'Amiri';
  font-size: 1.25rem;
  line-height: 2.2;
  color: var(--gl);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.06), rgba(201, 168, 76, 0.02));
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border-inline-start: 4px solid var(--gd);
  margin-bottom: 0.6rem;
  direction: rtl;
  text-align: right;
}

.da-card .da-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.da-card .da-cat {
  font-size: 0.7rem;
  padding: 0.12rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
}

.da-card.dua-card .da-cat {
  background: rgba(45, 212, 191, 0.06);
  color: var(--t);
  border: 1px solid rgba(45, 212, 191, 0.06);
}

.da-card.mtl-card .da-cat {
  background: rgba(96, 165, 250, 0.06);
  color: var(--bl);
  border: 1px solid rgba(96, 165, 250, 0.06);
}

.da-card .da-note {
  font-size: 0.82rem;
  color: var(--x2);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--b);
  font-weight: 300;
  line-height: 1.7;
}

.da-nores {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--x3);
  font-size: 0.95rem;
}


/* ═══ ASBAB AL-NUZUL PAGE ═══ */
.ab-card {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.7rem;
  transition: 0.3s;
}

.ab-card:hover {
  border-color: rgba(201, 168, 76, 0.18);
}

.ab-card.op {
  border-color: var(--g);
  background: var(--c2);
}

.ab-card.op .ab-aw {
  transform: rotate(180deg);
}

.ab-hd {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.ab-ref {
  font-family: 'JetBrains Mono';
  font-size: 0.7rem;
  color: var(--t);
  background: rgba(45, 212, 191, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  border: 1px solid rgba(45, 212, 191, 0.07);
  white-space: nowrap;
  flex-shrink: 0;
  direction: ltr;
  margin-top: 0.15rem;
}

.ab-info {
  flex: 1;
  min-width: 0;
}

.ab-title {
  font-family: 'Amiri';
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gl);
  line-height: 1.7;
  margin-bottom: 0.1rem;
}

.ab-title-en {
  font-size: 0.82rem;
  color: var(--x2);
  font-style: italic;
  direction: ltr;
  text-align: left;
  margin-bottom: 0.35rem;
}

.ab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.ab-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 8px;
  font-weight: 600;
}

.ab-tag.mk {
  background: rgba(249, 115, 22, 0.06);
  color: var(--mk);
  border: 1px solid rgba(249, 115, 22, 0.06);
}

.ab-tag.md {
  background: rgba(45, 212, 191, 0.05);
  color: var(--md);
  border: 1px solid rgba(45, 212, 191, 0.05);
}

.ab-tag.cat {
  background: rgba(168, 130, 250, 0.06);
  color: var(--pr);
  border: 1px solid rgba(168, 130, 250, 0.06);
}

.ab-aw {
  color: var(--x3);
  transition: transform 0.3s;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.ab-body {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--b);
}

.ab-card.op .ab-body {
  display: block;
  animation: fi .3s;
}

.ab-sabab {
  margin: 0.7rem 0;
  padding: 0.8rem;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.06), rgba(45, 212, 191, 0.03));
  border-radius: 8px;
  border-inline-start: 4px solid var(--gd);
}

.ab-sabab-h {
  font-size: 0.7rem;
  color: var(--g);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.ab-sabab-t {
  font-size: 0.88rem;
  color: var(--x);
  font-weight: 300;
  line-height: 1.85;
}

.ab-maqsad {
  margin: 0.5rem 0;
  padding: 0.7rem;
  background: rgba(168, 130, 250, 0.03);
  border: 1px solid rgba(168, 130, 250, 0.06);
  border-radius: 8px;
}

.ab-maqsad-h {
  font-size: 0.7rem;
  color: var(--pr);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.ab-maqsad-t {
  font-size: 0.85rem;
  color: var(--x);
  font-weight: 300;
  line-height: 1.8;
}

.ab-src {
  font-size: 0.72rem;
  color: var(--x3);
  margin-top: 0.5rem;
  font-weight: 300;
}


/* ═══ MUTASHABIHAT PAGE ═══ */
.mt-sub {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.mt-card {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.7rem;
  transition: 0.3s;
}

.mt-card:hover {
  border-color: rgba(201, 168, 76, 0.18);
}

.mt-card.op {
  border-color: var(--g);
  background: var(--c2);
}

.mt-card.op .mt-aw {
  transform: rotate(180deg);
}

.mt-hd {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.mt-num {
  font-family: 'JetBrains Mono';
  font-size: 0.85rem;
  color: var(--gd);
  min-width: 32px;
  text-align: center;
  margin-top: 0.2rem;
}

.mt-info {
  flex: 1;
  min-width: 0;
}

.mt-title {
  font-family: 'Amiri';
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gl);
  line-height: 1.7;
}

.mt-title-en {
  font-size: 0.82rem;
  color: var(--x2);
  font-style: italic;
  direction: ltr;
  text-align: left;
  margin-bottom: 0.3rem;
}

.mt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.mt-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 8px;
  font-weight: 600;
}

.mt-tag.vp {
  background: rgba(45, 212, 191, 0.06);
  color: var(--t);
  border: 1px solid rgba(45, 212, 191, 0.06);
}

.mt-tag.tl {
  background: rgba(251, 146, 60, 0.06);
  color: var(--mk);
  border: 1px solid rgba(251, 146, 60, 0.06);
}

.mt-tag.cat {
  background: rgba(168, 130, 250, 0.06);
  color: var(--pr);
  border: 1px solid rgba(168, 130, 250, 0.06);
}

.mt-aw {
  color: var(--x3);
  transition: transform 0.3s;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.mt-body {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--b);
}

.mt-card.op .mt-body {
  display: block;
  animation: fi .3s;
}

.mt-verses {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.7rem 0;
}

.mt-v {
  padding: 0.7rem;
  border-radius: 8px;
  border-inline-start: 4px solid var(--gd);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.05), rgba(201, 168, 76, 0.02));
}

.mt-v-ref {
  font-family: 'JetBrains Mono';
  font-size: 0.68rem;
  color: var(--t);
  margin-bottom: 0.3rem;
  direction: ltr;
}

.mt-v-text {
  font-family: 'Amiri';
  font-size: 1.2rem;
  line-height: 2.1;
  color: var(--gl);
  direction: rtl;
  text-align: right;
}

.mt-v-text .hl {
  color: var(--r);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(248, 113, 113, 0.3);
  text-underline-offset: 4px;
}

.mt-diff {
  margin: 0.6rem 0;
  padding: 0.7rem;
  background: rgba(248, 113, 113, 0.03);
  border: 1px solid rgba(248, 113, 113, 0.08);
  border-radius: 8px;
}

.mt-diff-h {
  font-size: 0.7rem;
  color: var(--r);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.mt-diff-t {
  font-size: 0.88rem;
  color: var(--x);
  font-weight: 300;
  line-height: 1.85;
}

.mt-wisdom {
  margin: 0.5rem 0;
  padding: 0.7rem;
  background: rgba(168, 130, 250, 0.03);
  border: 1px solid rgba(168, 130, 250, 0.06);
  border-radius: 8px;
}

.mt-wisdom-h {
  font-size: 0.7rem;
  color: var(--pr);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.mt-wisdom-t {
  font-size: 0.85rem;
  color: var(--x);
  font-weight: 300;
  line-height: 1.8;
}

.mt-link {
  margin: 0.5rem 0;
  padding: 0.7rem;
  background: rgba(251, 146, 60, 0.03);
  border: 1px solid rgba(251, 146, 60, 0.06);
  border-radius: 8px;
}

.mt-link-h {
  font-size: 0.7rem;
  color: var(--mk);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.mt-link-t {
  font-size: 0.85rem;
  color: var(--x);
  font-weight: 300;
  line-height: 1.8;
}

/* ═══ STORIES PAGE ═══ */
.st-card {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  transition: 0.3s;
}

.st-card:hover {
  border-color: rgba(201, 168, 76, 0.2);
}

.st-card.op {
  border-color: var(--g);
}

.st-card.op .st-hd .st-aw {
  transform: rotate(180deg);
}

.st-hd {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  cursor: pointer;
}

.st-ico {
  font-size: 1.8rem;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gg);
  border-radius: 12px;
  border: 1px solid rgba(201, 168, 76, 0.08);
  flex-shrink: 0;
}

.st-info {
  flex: 1;
  min-width: 0;
}

.st-nm {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.st-nm .ar {
  font-family: 'Amiri';
  font-size: 1.35rem;
  color: var(--gl);
}

.st-nm .en {
  font-size: 0.9rem;
  color: var(--x2);
  direction: ltr;
}

.st-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

.st-badge {
  font-family: 'JetBrains Mono';
  font-size: 0.68rem;
  padding: 0.12rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
}

.st-badge.cnt {
  background: rgba(45, 212, 191, 0.06);
  color: var(--t);
  border: 1px solid rgba(45, 212, 191, 0.07);
}

.st-badge.cat {
  background: rgba(168, 130, 250, 0.06);
  color: var(--pr);
  border: 1px solid rgba(168, 130, 250, 0.07);
}

.st-why {
  font-size: 0.85rem;
  color: var(--x);
  margin-top: 0.4rem;
  font-weight: 300;
  line-height: 1.7;
  padding: 0.5rem 0.7rem;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.06), rgba(45, 212, 191, 0.03));
  border-radius: 7px;
  border-inline-start: 3px solid var(--gd);
}

.st-aw {
  color: var(--x3);
  transition: transform 0.3s;
  font-size: 1rem;
  flex-shrink: 0;
}

.st-body {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--b);
}

.st-card.op .st-body {
  display: block;
  animation: fi .3s;
}

.st-occ {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.st-occ-h {
  font-size: 0.72rem;
  color: var(--g);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.st-oc {
  display: flex;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 10px;
  padding: 0.8rem;
  transition: 0.25s;
  position: relative;
  cursor: pointer;
}

.st-oc:hover {
  border-color: rgba(201, 168, 76, 0.25);
  background: rgba(201, 168, 76, 0.04);
  box-shadow: 0 2px 12px rgba(201, 168, 76, 0.06);
}

.st-oc::after {
  content: '▾';
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  color: var(--x3);
  font-size: 0.85rem;
  transition: transform 0.3s, color 0.3s;
  opacity: 0.6;
}

body.ar .st-oc::after,
[dir="rtl"] .st-oc::after {
  left: auto;
  right: 0.8rem;
}

.st-oc:hover::after {
  color: var(--g);
  opacity: 1;
}

.st-oc-num {
  font-family: 'JetBrains Mono';
  font-size: 0.72rem;
  color: var(--t);
  background: rgba(45, 212, 191, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  border: 1px solid rgba(45, 212, 191, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
  height: fit-content;
  direction: ltr;
}

.st-oc-info {
  flex: 1;
  min-width: 0;
}

.st-oc-surah {
  font-family: 'Amiri';
  font-size: 1rem;
  color: var(--gl);
  margin-bottom: 0.15rem;
}

.st-oc-surah .en-s {
  font-family: 'Literata';
  font-size: 0.82rem;
  color: var(--x2);
  margin-inline-start: 0.4rem;
}

body.ar .st-oc-surah .en-s {
  display: none;
}

.st-oc-angle {
  font-size: 0.85rem;
  color: var(--x);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.st-oc-detail {
  font-size: 0.8rem;
  color: var(--x2);
  font-weight: 300;
  line-height: 1.7;
}

.st-themes {
  margin-top: 0.8rem;
  padding: 0.7rem;
  background: rgba(168, 130, 250, 0.03);
  border: 1px solid rgba(168, 130, 250, 0.06);
  border-radius: 8px;
}

.st-themes-h {
  font-size: 0.72rem;
  color: var(--pr);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.st-themes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.st-themes-list span {
  font-size: 0.72rem;
  padding: 0.12rem 0.5rem;
  border-radius: 10px;
  background: rgba(168, 130, 250, 0.06);
  color: var(--pr);
  border: 1px solid rgba(168, 130, 250, 0.06);
}

/* ═══ CHARACTERS PAGE ═══ */
.ch-card {
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: 12px;
  margin-bottom: 0.7rem;
  overflow: hidden;
  transition: 0.3s;
}

.ch-card:hover {
  border-color: var(--gd);
  box-shadow: 0 4px 24px rgba(201, 168, 76, 0.06);
}

.ch-hd {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: 0.2s;
}

.ch-hd:hover {
  background: rgba(201, 168, 76, 0.03);
}

.ch-ico {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gg);
  border-radius: 12px;
  flex-shrink: 0;
}

.ch-info {
  flex: 1;
  min-width: 0;
}

.ch-nm {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--x);
  margin-bottom: 0.3rem;
}

.ch-nm .ar {
  font-family: 'Amiri';
  font-size: 1.15rem;
  color: var(--gl);
}

.ch-nm .en {
  font-family: 'Literata';
  font-size: 0.85rem;
  color: var(--x2);
  margin-inline-start: 0.6rem;
}

body.ar .ch-nm .en {
  display: none;
}

.ch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.3rem;
}

.ch-badge {
  font-size: 0.7rem;
  padding: 0.12rem 0.5rem;
  border-radius: 10px;
  font-weight: 500;
}

.ch-badge.cnt {
  background: rgba(45, 212, 191, 0.08);
  color: var(--t);
  border: 1px solid rgba(45, 212, 191, 0.1);
}

.ch-badge.cat {
  background: rgba(201, 168, 76, 0.06);
  color: var(--gl);
  border: 1px solid rgba(201, 168, 76, 0.08);
}

.ch-surahs {
  font-size: 0.75rem;
  color: var(--x3);
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-aw {
  font-size: 1.2rem;
  color: var(--x3);
  transition: 0.3s;
  flex-shrink: 0;
}

.ch-card.op .ch-aw {
  transform: rotate(180deg);
  color: var(--gl);
}

.ch-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ch-card.op .ch-body {
  max-height: 5000px;
}

.ch-traits-h {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--t);
  padding: 0.7rem 1.2rem 0.5rem;
  border-top: 1px solid var(--b);
}

.ch-traits {
  padding: 0 1.2rem 1rem;
}

.ch-trait {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}

.ch-trait:last-child {
  border-bottom: none;
}

.ch-trait-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--gd), var(--g));
  color: #060810;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.ch-trait-content {
  flex: 1;
  min-width: 0;
}

.ch-trait-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gl);
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

.ch-trait-detail {
  font-size: 0.82rem;
  color: var(--x2);
  line-height: 1.8;
  margin-bottom: 0.3rem;
}

.ch-trait-ref {
  font-size: 0.72rem;
  color: var(--t);
  opacity: 0.8;
  font-weight: 500;
}

.ch-ref-link {
  color: var(--gl);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
  font-weight: 600;
}

.ch-ref-link:hover {
  color: var(--gd);
  opacity: 1;
  text-decoration: underline;
}

body.light .ch-ref-link {
  color: var(--td);
}

body.light .ch-ref-link:hover {
  color: var(--gd);
}

/* ─── LIGHT THEME OVERRIDES FOR CHARACTERS ─── */
body.light .ch-card {
  background: #f8f6f0;
  border-color: #e5ddc5;
}

body.light .ch-card:hover {
  border-color: var(--gd);
  box-shadow: 0 4px 24px rgba(201, 168, 76, 0.12);
}

body.light .ch-hd:hover {
  background: rgba(201, 168, 76, 0.06);
}

body.light .ch-ico {
  background: rgba(201, 168, 76, 0.12);
}

body.light .ch-nm .ar {
  color: var(--gd);
}

body.light .ch-nm .en {
  color: #64748b;
}

body.light .ch-badge.cnt {
  background: rgba(26, 154, 137, 0.1);
  color: var(--td);
  border-color: rgba(26, 154, 137, 0.15);
}

body.light .ch-badge.cat {
  background: rgba(201, 168, 76, 0.1);
  color: var(--gd);
  border-color: rgba(201, 168, 76, 0.15);
}

body.light .ch-surahs {
  color: #64748b;
}

body.light .ch-traits-h {
  color: var(--td);
  border-top-color: #e5ddc5;
}

body.light .ch-trait {
  border-bottom-color: #e8e4d8;
}

body.light .ch-trait-title {
  color: var(--gd);
}

body.light .ch-trait-detail {
  color: #4a5568;
}

body.light .ch-trait-ref {
  color: var(--td);
}

body.light .ch-trait-num {
  color: #fff;
}

/* ═══ Site Footer / Disclaimer ═══ */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--bdr);
  background: rgba(201, 168, 76, 0.04);
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
}

.footer-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 10px;
  margin-bottom: 1rem;
  text-align: start;
}

.footer-ico {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.footer-disclaimer p {
  font-size: 0.85rem;
  line-height: 1.7;
  opacity: 0.8;
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--t);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 0.7;
}

.footer-sep {
  opacity: 0.3;
}

@media (max-width: 600px) {
  .footer-disclaimer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-sep {
    display: none;
  }
}

/* ═══ Scroll to Top Button ═══ */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--t), #b8960c);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
  pointer-events: none;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

body.ar .scroll-top-btn {
  right: auto;
  left: 2rem;
}

@media (max-width: 600px) {
  .scroll-top-btn {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  body.ar .scroll-top-btn {
    right: auto;
    left: 1.2rem;
  }
}