/* =========================================================
   Buruj Quran — design system + home page
   Night (default) and Parchment (light) themes
   ========================================================= */

:root, .dark-scope {
  --bg: #070c17; --bg-alt: #0a111f; --surface: #0f1828; --surface-2: #152036; --surface-3: #1c2a44;
  --line: rgba(222, 190, 120, .17); --line-soft: rgba(255, 255, 255, .075);
  --text: #eef1f6; --muted: #a0acbf; --faint: #6a778e;
  --gold: #d9b66c; --gold-hi: #f4dfa6; --gold-lo: #9a7230; --gold-ink: #1a1305;
  --em: #34c3a0; --em-lo: #0e6f59; --rose: #e58f7f; --sky: #7fb4ff;
  --glass: rgba(11, 18, 32, .68);
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, .8);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80' fill='none' stroke='%23d9b66c' stroke-width='.7'%3E%3Cpath d='M40 8 72 40 40 72 8 40Z'/%3E%3Cpath d='M17.4 17.4H62.6V62.6H17.4Z'/%3E%3Cpath d='M0 0l17.4 17.4M80 0 62.6 17.4M0 80l17.4-17.4M80 80 62.6 62.6M40 0v8M40 72v8M0 40h8M72 40h8'/%3E%3C/svg%3E");
  --pattern-o: .1;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5eedd; --bg-alt: #efe6d0; --surface: #fffaf0; --surface-2: #faf1dd; --surface-3: #f1e5c9;
  --line: rgba(128, 92, 28, .24); --line-soft: rgba(50, 36, 10, .1);
  --text: #1a2230; --muted: #59616f; --faint: #8b8f96;
  --gold: #9c7226; --gold-hi: #b98a36; --gold-lo: #7a5718; --gold-ink: #fffaf0;
  --em: #0f7a5f; --em-lo: #0b5946; --rose: #b8523f; --sky: #2c62b8;
  --glass: rgba(255, 250, 240, .78);
  --shadow: 0 30px 60px -34px rgba(80, 56, 10, .45);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80' fill='none' stroke='%239c7226' stroke-width='.7'%3E%3Cpath d='M40 8 72 40 40 72 8 40Z'/%3E%3Cpath d='M17.4 17.4H62.6V62.6H17.4Z'/%3E%3Cpath d='M0 0l17.4 17.4M80 0 62.6 17.4M0 80l17.4-17.4M80 80 62.6 62.6M40 0v8M40 72v8M0 40h8M72 40h8'/%3E%3C/svg%3E");
  --pattern-o: .16;
  color-scheme: light;
}
:root {
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --quran: 'Amiri Quran', 'Amiri', 'Scheherazade New', serif;
  --kufi: 'Reem Kufi', 'Amiri', sans-serif;
  --urdu: 'Noto Nastaliq Urdu', 'Amiri', serif;
  --r-sm: 10px; --r: 18px; --r-lg: 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .4s, color .4s;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }
.ar { font-family: var(--quran); direction: rtl; line-height: 2.1; font-feature-settings: "liga", "calt"; }
.kufi { font-family: var(--kufi); direction: rtl; }
.urdu { font-family: var(--urdu); direction: rtl; line-height: 2.3; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.i { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: .74rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .7; }
.display { font-family: var(--serif); font-weight: 500; line-height: 1; letter-spacing: -.012em; }
.display em { font-style: italic; color: var(--gold); font-weight: 500; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.04; letter-spacing: -.01em; }
.h2 em { font-style: italic; color: var(--gold); }
.h3 { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; line-height: 1.15; }
.lead { color: var(--muted); font-size: 1.06rem; max-width: 60ch; }

.section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.section.alt { background: var(--bg-alt); }
.section.patterned::before {
  content: ""; position: absolute; inset: 0; background: var(--pattern) 0 0/80px; opacity: var(--pattern-o);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0, #000 0, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0, #000 0, transparent 75%); pointer-events: none;
}
.section > .wrap { position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head .h2 { margin-top: 14px; max-width: 18ch; }
.section-head .lead { margin-top: 16px; }

/* Ornamental divider */
.orn { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); opacity: .8; }
.orn::before, .orn::after { content: ""; height: 1px; width: min(120px, 18vw); background: linear-gradient(90deg, transparent, currentColor); }
.orn::after { transform: scaleX(-1); }
.orn svg { width: 22px; height: 22px; }

/* ---------- Buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px;
  border-radius: 999px; font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  color: #1a1305; background: linear-gradient(135deg, #f4dfa6, #d9b66c 45%, #b98c3c);
  box-shadow: 0 10px 30px -10px rgba(217, 182, 108, .65), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-gold:hover { box-shadow: 0 16px 40px -10px rgba(217, 182, 108, .8), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-ghost { border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-em { background: var(--em-lo); color: #eafff8; }
.btn-sm { height: 38px; padding: 0 16px; font-size: .86rem; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-soft); color: var(--muted); transition: .2s;
}
.icon-btn:hover, .icon-btn.is-on { color: var(--gold); border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: .86rem; font-weight: 500; color: var(--muted); transition: .2s; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line); }
.chip.is-on { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.tag.em { background: color-mix(in srgb, var(--em) 16%, transparent); color: var(--em); }
.tag.live { background: color-mix(in srgb, var(--rose) 18%, transparent); color: var(--rose); }
.tag.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.kbd { font: 600 .7rem var(--sans); padding: 3px 7px; border: 1px solid var(--line-soft); border-radius: 6px; color: var(--faint); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gold); font-size: .94rem; }
.link-arrow .i { transition: transform .25s var(--ease); }
.link-arrow:hover .i { transform: translateX(4px); }

.card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.card:hover { border-color: var(--line); }
.card.lift:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h); transition: background .35s, border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; color: var(--text); }
.nav.is-stuck, body:not(.has-hero) .nav { background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); border-bottom-color: var(--line-soft); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { flex: none; width: 38px; height: 38px; color: var(--gold); }
.brand-mark .spin { transform-origin: 20px 20px; transition: transform 1.2s var(--ease); }
.brand:hover .spin { transform: rotate(90deg); }
.brand-name { font-family: var(--serif); font-size: 1.62rem; font-weight: 600; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
.brand-ar { font-family: var(--kufi); font-size: .92rem; color: var(--gold); margin-inline-start: 2px; opacity: .9; }
.nav-links { display: flex; gap: 4px; margin-inline: auto; }
.nav-links a { padding: 9px 15px; border-radius: 999px; font-size: .93rem; font-weight: 500; color: var(--muted); transition: .2s; position: relative; }
.nav-links a:hover { color: var(--text); background: var(--line-soft); }
.nav-links a.is-active { color: var(--gold); }
.nav-links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; background: var(--gold); transform: translateX(-50%) rotate(45deg); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 14px; border-radius: 999px; border: 1px solid var(--line-soft); color: var(--muted); font-size: .88rem; min-width: 190px; transition: .2s; background: color-mix(in srgb, var(--surface) 50%, transparent); }
.nav-search:hover { border-color: var(--gold); color: var(--text); }
.nav-search span { margin-inline-end: auto; }
.nav-burger { display: none; }

.drawer { position: fixed; inset: 0; z-index: 80; background: var(--bg); padding: 24px; display: flex; flex-direction: column; gap: 8px; transform: translateX(100%); transition: transform .45s var(--ease); }
.drawer.open { transform: none; }
.drawer a { font-family: var(--serif); font-size: 2rem; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.drawer .drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* ---------- Command palette ---------- */
.cmd { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding-top: 12vh; background: rgba(3, 6, 12, .66); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.cmd.open { opacity: 1; pointer-events: auto; }
.cmd-box { width: min(640px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; transform: translateY(-14px) scale(.98); transition: transform .3s var(--ease); }
.cmd.open .cmd-box { transform: none; }
.cmd-input { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.cmd-input input { flex: 1; background: none; border: 0; outline: 0; font-size: 1.05rem; }
.cmd-list { max-height: 380px; overflow: auto; padding: 8px; }
.cmd-label { padding: 10px 12px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.cmd-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; }
.cmd-item:hover, .cmd-item.is-sel { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.cmd-item .num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: .8rem; font-weight: 700; color: var(--gold); }
.cmd-item small { color: var(--muted); display: block; font-size: .8rem; }
.cmd-item .ar { margin-inline-start: auto; font-size: 1.2rem; line-height: 1.4; color: var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(680px, 100vh, 1040px); min-height: clamp(680px, 100svh, 1040px); display: flex; flex-direction: column; background: #050912; color: var(--text); overflow: hidden; isolation: isolate; }
.hero-sky { position: absolute; inset: 0; z-index: -3; background:
  radial-gradient(ellipse 60% 55% at 76% 40%, rgba(30, 86, 92, .5), transparent 70%),
  radial-gradient(ellipse 50% 60% at 12% 10%, rgba(54, 44, 110, .45), transparent 70%),
  radial-gradient(ellipse 90% 60% at 50% 110%, rgba(150, 110, 40, .28), transparent 65%),
  linear-gradient(180deg, #04070e, #070d1a 55%, #0a1322); }
#stars { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.hero-pattern { position: absolute; inset: 0; z-index: -1; background: var(--pattern) 0 0/80px; opacity: .07; -webkit-mask-image: linear-gradient(180deg, transparent 30%, #000); mask-image: linear-gradient(180deg, transparent 30%, #000); }
.hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 24px; padding-top: calc(var(--nav-h) + 24px); padding-bottom: 28px; }
.hero h1 { font-size: clamp(3.1rem, 6.6vw, 6.1rem); margin: 22px 0 22px; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero .lead { font-size: 1.12rem; max-width: 54ch; }
.fade-up { opacity: 0; transform: translateY(18px); animation: fadeUp .9s var(--ease) forwards; animation-delay: var(--d, .3s); }

.search { margin-top: 30px; max-width: 620px; }
.search-box { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 8px 0 22px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(222, 190, 120, .28); backdrop-filter: blur(14px); transition: .3s; }
.search-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(217, 182, 108, .14), 0 20px 50px -20px rgba(217, 182, 108, .5); }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 1.02rem; }
.search-box input::placeholder { color: var(--faint); }
.search-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: .84rem; color: var(--faint); }
.search-meta .chip { height: 32px; font-size: .8rem; background: rgba(255, 255, 255, .04); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-stats { display: flex; gap: clamp(18px, 3vw, 44px); margin-top: 40px; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--serif); font-size: 2.3rem; font-weight: 500; line-height: 1; color: var(--gold-hi); }
.stat span { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 600; }

.hero-art { position: relative; display: grid; place-items: center; perspective: 1200px; }
.rosette-wrap { position: relative; width: min(100%, 620px); aspect-ratio: 1; transform-style: preserve-3d; transition: transform .5s var(--ease); will-change: transform; }
.rosette-glow { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle, rgba(217, 182, 108, .3), rgba(52, 195, 160, .1) 45%, transparent 68%); filter: blur(30px); animation: breathe 7s ease-in-out infinite; }
.rosette { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rosette .ring { transform-box: fill-box; transform-origin: center; animation: spin var(--t, 120s) linear infinite; }
.rosette .ring.rev { animation-direction: reverse; }
.rosette path, .rosette circle.draw { fill: none; stroke: url(#rg); stroke-width: 1.1; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 3.2s var(--ease) forwards; animation-delay: var(--dd, 0s); }
.rosette .thin { stroke-width: .6; opacity: .6; }
.rosette .em { stroke: #34c3a0; opacity: .5; }
.rosette .dot { fill: #f4dfa6; opacity: 0; animation: fadeIn 1s forwards 2.2s; }
.rosette-core { position: absolute; inset: 31%; border-radius: 50%; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 35%, #14213a, #070c17 75%); border: 1px solid rgba(222, 190, 120, .45); box-shadow: 0 0 0 8px rgba(7, 12, 23, .7), 0 0 0 9px rgba(222, 190, 120, .25), 0 0 80px rgba(217, 182, 108, .35), inset 0 0 40px rgba(217, 182, 108, .12); transform: translateZ(50px); opacity: 0; animation: coreIn 1.4s var(--ease) forwards 1.2s; }
/* The gold only paints inside the box, and the marks above the letters rise past a 1.25 line, so the box is padded upward to hold them. */
.rosette-core .iqra { font-family: 'Amiri', var(--quran); font-weight: 700; font-size: clamp(3rem, 6.2vw, 5.4rem); line-height: 1.25; padding: .42em .08em 0; margin-top: -.42em; direction: rtl; background: linear-gradient(180deg, #fff3cf, #d9b66c 55%, #9a7230); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(217, 182, 108, .45)); }
.rosette-core small { display: block; font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: -4px; }
.rosette-core small b { color: var(--gold); font-weight: 700; }
.orbit-note { position: absolute; padding: 10px 14px; border-radius: 14px; background: rgba(11, 18, 32, .78); border: 1px solid rgba(222, 190, 120, .22); backdrop-filter: blur(10px); font-size: .8rem; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); transform: translateZ(90px); animation: float 7s ease-in-out infinite; }
.orbit-note b { display: block; font-size: .86rem; }
.orbit-note span { color: var(--muted); font-size: .74rem; }
.orbit-note .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(217, 182, 108, .14); color: var(--gold); }
.orbit-note.n1 { top: 9%; left: -2%; }
.orbit-note.n2 { bottom: 12%; right: -3%; animation-delay: -3s; }
.orbit-note.n3 { bottom: 3%; left: 8%; animation-delay: -5s; }
.wave { display: flex; align-items: center; gap: 2px; height: 20px; }
.wave i { width: 2.5px; border-radius: 2px; background: var(--gold); animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--k) * -.13s); height: 30%; }

/* Prayer ribbon */
.ribbon { margin-bottom: 26px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 14px 22px; border-radius: 22px; background: rgba(11, 18, 32, .6); border: 1px solid rgba(222, 190, 120, .18); backdrop-filter: blur(16px); }
.ribbon-date b { display: block; font-family: var(--serif); font-size: 1.18rem; font-weight: 600; }
.ribbon-date span { font-size: .76rem; color: var(--muted); }
.prayers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.prayer { text-align: center; padding: 8px 6px; border-radius: 14px; position: relative; }
.prayer span { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.prayer b { font-size: .98rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.prayer.next { background: linear-gradient(135deg, rgba(217, 182, 108, .2), rgba(217, 182, 108, .06)); box-shadow: inset 0 0 0 1px rgba(217, 182, 108, .4); }
.prayer.next span { color: var(--gold); }
.prayer.done b { color: var(--faint); }
.ribbon-next { text-align: right; font-size: .78rem; color: var(--muted); }
.ribbon-next b { display: block; font-size: 1.1rem; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.scroll-cue { position: absolute; left: 50%; bottom: 8px; width: 1px; height: 18px; background: linear-gradient(var(--gold), transparent); opacity: .6; }

/* ---------- Dashboard strip ---------- */
.dash { margin-top: -1px; padding: 56px 0 0; }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.dash-head h2 { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; }
.dash-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr; gap: 16px; }
.dash-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; min-height: 178px; position: relative; overflow: hidden; }
.dash-card .lbl { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.dash-card .big { font-family: var(--serif); font-size: 2.5rem; line-height: 1; font-weight: 500; }
.dash-card .big small { font-size: 1rem; color: var(--muted); font-family: var(--sans); }
.dash-continue { flex-direction: row; align-items: center; gap: 22px; background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 13%, var(--surface)), var(--surface) 60%); }
.dash-continue h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.dash-continue .ar { font-size: 1.5rem; color: var(--gold); line-height: 1.5; }
.ring-prog { width: 104px; height: 104px; flex: none; position: relative; display: grid; place-items: center; }
.ring-prog svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-prog circle { fill: none; stroke-width: 7; }
.ring-prog .bg { stroke: var(--line-soft); }
.ring-prog .fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 289; transition: stroke-dashoffset 1.6s var(--ease) .3s; }
.in .ring-prog .fg { stroke-dashoffset: var(--off); }
.ring-prog b { font-size: 1.3rem; font-weight: 700; }
.week { display: flex; gap: 6px; margin-top: auto; }
.week i { flex: 1; height: 30px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font: 700 .64rem var(--sans); color: var(--faint); font-style: normal; }
.week i.on { background: linear-gradient(180deg, var(--gold), var(--gold-lo)); color: #1a1305; }
.week i.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: auto; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--em-lo), var(--em)); transition: width 1.6s var(--ease) .3s; }
.in .bar i { width: var(--w); }
.bar.gold i { background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }

/* ---------- Ayah of the day ---------- */
.aotd { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 28px; align-items: stretch; }
.arch { position: relative; padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px) 40px; text-align: center; border-radius: 300px 300px var(--r-lg) var(--r-lg) / 220px 220px var(--r-lg) var(--r-lg); background: radial-gradient(ellipse 80% 50% at 50% 0, color-mix(in srgb, var(--gold) 18%, transparent), transparent 70%), var(--surface); border: 1px solid var(--line); overflow: hidden; }
.arch::before { content: ""; position: absolute; inset: 10px; border-radius: inherit; border: 1px solid var(--line); opacity: .6; pointer-events: none; }
.arch::after { content: ""; position: absolute; inset: 0; background: var(--pattern) center/64px; opacity: calc(var(--pattern-o) * .7); -webkit-mask-image: linear-gradient(180deg, #000, transparent 45%); mask-image: linear-gradient(180deg, #000, transparent 45%); pointer-events: none; }
.arch > * { position: relative; z-index: 1; }
.arch .star8 { width: 46px; height: 46px; margin: 0 auto 18px; color: var(--gold); animation: spin 40s linear infinite; }
.arch .ar { font-size: clamp(1.7rem, 3.3vw, 2.7rem); margin: 22px 0 18px; }
.arch blockquote { margin: 0 auto; max-width: 46ch; font-family: var(--serif); font-size: 1.36rem; font-style: italic; line-height: 1.4; color: var(--text); }
.arch cite { display: block; margin-top: 14px; font-style: normal; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.arch .actions { display: flex; justify-content: center; gap: 8px; margin-top: 26px; flex-wrap: wrap; }

.feel { padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.feel h3 { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; line-height: 1.1; }
.feel-out { flex: 1; display: grid; align-content: center; padding: 20px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-soft); min-height: 190px; }
.feel-out .ar { font-size: 1.45rem; line-height: 2; }
.feel-out p { color: var(--muted); font-size: .95rem; margin-top: 8px; }
.feel-out a { display: inline-block; margin-top: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.swap { animation: swap .5s var(--ease); }

/* ---------- Atlas ---------- */
.atlas { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px); align-items: center; margin-bottom: 56px; }
.atlas-viz { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; margin-inline: auto; }
.atlas-viz svg { width: 100%; height: 100%; overflow: visible; }
.atlas-viz .bar-s { stroke-linecap: round; stroke-width: 4.2; cursor: pointer; transition: opacity .2s, stroke-width .2s; transform-origin: 280px 280px; }
.atlas-viz .bar-s.mec { stroke: var(--gold); }
.atlas-viz .bar-s.med { stroke: var(--em); }
.atlas-viz.hovering .bar-s { opacity: .28; }
.atlas-viz.hovering .bar-s.is-hot { opacity: 1; stroke-width: 6.5; }
.atlas-viz .guide { fill: none; stroke: var(--line); stroke-dasharray: 2 6; }
.atlas-core { position: absolute; inset: 29%; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 10px; }
.atlas-core .ar { font-size: clamp(1.5rem, 3vw, 2.3rem); color: var(--gold); line-height: 1.5; }
.atlas-core b { display: block; font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.1; }
.atlas-core span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 26px; font-size: .86rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 8px; vertical-align: middle; }
.atlas-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.fact { padding: 18px; border-radius: var(--r); border: 1px solid var(--line-soft); background: var(--surface); }
.fact b { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 500; color: var(--gold); line-height: 1; }
.fact span { font-size: .78rem; color: var(--muted); }

.index-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); }
.tabs button { height: 36px; padding: 0 18px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--muted); transition: .2s; white-space: nowrap; }
.tabs button.is-on { background: var(--gold); color: var(--gold-ink); }
.filter { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-soft); background: var(--surface); color: var(--muted); margin-inline-start: auto; min-width: 240px; }
.filter input { background: none; border: 0; outline: 0; flex: 1; min-width: 0; }
.surah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.surah-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; position: relative; overflow: hidden; }
.surah-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 55%, color-mix(in srgb, var(--gold) 12%, transparent)); opacity: 0; transition: opacity .3s; }
.surah-card:hover::after { opacity: 1; }
.surah-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.rub { width: 42px; height: 42px; flex: none; display: grid; place-items: center; position: relative; font-size: .82rem; font-weight: 700; color: var(--gold); }
.rub::before, .rub::after { content: ""; position: absolute; inset: 5px; border: 1.2px solid var(--gold); border-radius: 5px; opacity: .6; transition: transform .5s var(--ease), opacity .3s; }
.rub::after { transform: rotate(45deg); }
.surah-card:hover .rub::before { transform: rotate(45deg); opacity: 1; }
.surah-card:hover .rub::after { transform: rotate(90deg); opacity: 1; }
.surah-card .meta { min-width: 0; flex: 1; position: relative; z-index: 1; }
.surah-card .meta b { display: block; font-weight: 600; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.surah-card .meta span { font-size: .79rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.surah-card .side { text-align: right; position: relative; z-index: 1; }
.surah-card .side .ar { font-size: 1.25rem; line-height: 1.5; display: block; color: var(--text); }
.surah-card .side small { font-size: .7rem; color: var(--faint); letter-spacing: .06em; }
.surah-card .dotk { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-inline-end: 5px; background: var(--gold); }
.surah-card .dotk.med { background: var(--em); }
.grid-more { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- Topics ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.topic { padding: 22px; display: flex; flex-direction: column; gap: 10px; min-height: 172px; position: relative; overflow: hidden; }
.topic .tico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 13%, transparent); color: var(--gold); font-size: 1.2rem; transition: .35s var(--ease); }
.topic:hover .tico { background: var(--gold); color: var(--gold-ink); transform: rotate(-8deg) scale(1.06); }
.topic h3 { font-family: var(--serif); font-size: 1.42rem; font-weight: 600; line-height: 1.1; }
.topic .t-ar { font-family: var(--kufi); color: var(--gold); font-size: .95rem; direction: rtl; text-align: left; }
.topic p { font-size: .84rem; color: var(--muted); margin-top: auto; }
.topic.wide { grid-column: span 2; background: linear-gradient(135deg, color-mix(in srgb, var(--em) 14%, var(--surface)), var(--surface) 65%); }
.topic.wide q { font-family: var(--serif); font-size: 1.5rem; font-style: italic; line-height: 1.25; quotes: "“" "”"; }
.marquee { overflow: hidden; margin-top: 34px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.b { padding: 26px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; min-height: 250px; }
.b h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.b p { color: var(--muted); font-size: .93rem; max-width: 46ch; }
.b .demo { margin-top: auto; padding-top: 18px; }
.b-6 { grid-column: span 6; } .b-4 { grid-column: span 4; } .b-8 { grid-column: span 8; } .b-3 { grid-column: span 3; } .b-5 { grid-column: span 5; } .b-7 { grid-column: span 7; }
.wbw { display: flex; flex-direction: row-reverse; justify-content: center; gap: 8px; flex-wrap: wrap; }
.wbw .w { padding: 10px 14px 12px; border-radius: 14px; text-align: center; border: 1px solid transparent; cursor: default; transition: .25s var(--ease); }
.wbw .w .ar { display: block; font-size: 1.9rem; line-height: 2.3; }
.wbw .w small { display: block; font-size: .76rem; color: var(--muted); }
.wbw .w em { display: block; font-size: .68rem; color: var(--faint); font-style: italic; }
.wbw .w:hover, .wbw .w.is-on { background: color-mix(in srgb, var(--gold) 12%, transparent); border-color: var(--line); transform: translateY(-4px); }
.wbw .w:hover .ar, .wbw .w.is-on .ar { color: var(--gold); }
.player-mini { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.player-mini .pp { width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: #1a1305; display: grid; place-items: center; flex: none; }
.bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 38px; }
.bars i { flex: 1; border-radius: 3px; background: var(--line); height: var(--h); min-width: 2px; }
.bars i.p { background: var(--gold); }
.heat { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); }
.heat i.l1 { background: color-mix(in srgb, var(--em) 28%, var(--surface-2)); }
.heat i.l2 { background: color-mix(in srgb, var(--em) 58%, var(--surface-2)); }
.heat i.l3 { background: var(--em); }
.cmp { display: grid; gap: 8px; }
.cmp div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; border-inline-start: 2px solid var(--gold); }
.cmp div small { display: block; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 2px; }
.cmp div.urdu { border-inline-start: 0; border-inline-end: 2px solid var(--em); font-size: 1rem; }
.mushaf-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; perspective: 900px; margin-inline: auto; width: min(100%, 300px); }
.mushaf-mini .pg { aspect-ratio: .72; border-radius: 4px 10px 10px 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 10%, var(--surface-2)), var(--surface-2) 18%); border: 1px solid var(--line); padding: 12px 10px; display: grid; gap: 6px; align-content: center; transform-origin: left center; transition: transform .8s var(--ease); }
.mushaf-mini .pg:first-child { border-radius: 10px 4px 4px 10px; transform-origin: right center; background: linear-gradient(270deg, color-mix(in srgb, var(--gold) 10%, var(--surface-2)), var(--surface-2) 18%); }
.b:hover .mushaf-mini .pg { transform: rotateY(-14deg); }
.b:hover .mushaf-mini .pg:first-child { transform: rotateY(14deg); }
.mushaf-mini .pg i { height: 3px; border-radius: 2px; background: var(--line); }
.mushaf-mini .pg i:nth-child(3n) { width: 82%; justify-self: center; }
.lines i { display: block; height: 9px; border-radius: 5px; background: var(--surface-2); margin-bottom: 9px; }
.lines i:nth-child(3n) { width: 82%; } .lines i:nth-child(4n) { width: 64%; }
.note-demo { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line); font-size: .9rem; }
.note-demo mark { background: color-mix(in srgb, var(--gold) 30%, transparent); color: inherit; padding: 1px 3px; border-radius: 4px; }
.note-demo small { display: block; margin-top: 8px; color: var(--faint); font-size: .76rem; }

/* ---------- Learn ---------- */
.paths { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.path { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.path-art { height: 150px; position: relative; display: grid; place-items: center; background: linear-gradient(140deg, var(--c1), var(--c2)); overflow: hidden; }
.path-art::before { content: ""; position: absolute; inset: 0; background: var(--pattern) center/56px; opacity: .35; mix-blend-mode: overlay; }
.path-art .kufi { position: relative; font-size: 3.2rem; color: rgba(255, 255, 255, .95); text-shadow: 0 6px 24px rgba(0, 0, 0, .35); transition: transform .5s var(--ease); line-height: 1.3; }
.path:hover .path-art .kufi { transform: scale(1.1); }
.path-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.path-body h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; line-height: 1.12; }
.path-body p { font-size: .86rem; color: var(--muted); }
.path-meta { display: flex; gap: 14px; font-size: .78rem; color: var(--faint); margin-top: auto; padding-top: 8px; }
.plan-banner { margin-top: 18px; padding: 26px 30px; display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; background: linear-gradient(110deg, color-mix(in srgb, var(--gold) 14%, var(--surface)), var(--surface) 70%); }
.plan-steps { display: flex; gap: 6px; margin-top: 14px; }
.plan-steps i { flex: 1; height: 6px; border-radius: 4px; background: var(--surface-3); }
.plan-steps i.on { background: var(--gold); }

/* ---------- Community preview ---------- */
.comm { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.boards { display: grid; gap: 8px; margin: 28px 0; }
.board-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--surface); transition: .25s var(--ease); }
.board-row:hover { border-color: var(--gold); transform: translateX(6px); }
.board-row .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 13%, transparent); color: var(--gold); flex: none; }
.board-row b { font-weight: 600; font-size: .95rem; display: block; }
.board-row small { color: var(--muted); font-size: .8rem; }
.board-row .n { margin-inline-start: auto; font-size: .8rem; color: var(--faint); white-space: nowrap; }
.post-stack { position: relative; display: grid; gap: 16px; }
.post { padding: 22px; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .84rem; color: #fff; flex: none; background: linear-gradient(135deg, var(--a1, #1c7a66), var(--a2, #0e4f6f)); }
.av.sm { width: 30px; height: 30px; font-size: .68rem; }
.post-head b { font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.post-head small { color: var(--faint); font-size: .8rem; display: block; }
.badge-v { color: var(--em); width: 15px; height: 15px; }
.post p { font-size: .96rem; color: var(--text); }
.pin-ayah { margin: 14px 0; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); position: relative; }
.pin-ayah small { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 6px; }
.pin-ayah .ar { font-size: 1.45rem; margin: 6px 0 2px; }
.pin-ayah p { font-size: .88rem; color: var(--muted); font-style: italic; }
.post-actions { display: flex; gap: 6px; margin-top: 14px; color: var(--muted); font-size: .86rem; flex-wrap: wrap; }
.post-actions button, .post-actions a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; transition: .2s; }
.post-actions button:hover, .post-actions a:hover { background: var(--line-soft); color: var(--text); }
.post-actions button.is-on { color: var(--rose); }
.post-actions button.is-on .i { fill: currentColor; }
.post-actions .sp { margin-inline-start: auto; }
.live-card { padding: 18px 20px; display: flex; align-items: center; gap: 16px; background: linear-gradient(120deg, color-mix(in srgb, var(--rose) 14%, var(--surface)), var(--surface) 60%); }
.avs { display: flex; }
.avs .av { margin-inline-start: -9px; box-shadow: 0 0 0 2px var(--surface); }
.avs .av:first-child { margin: 0; }

/* ---------- Library shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; align-items: end; padding: 0 12px 22px; position: relative; perspective: 1400px; }
.shelf::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: 0; height: 16px; border-radius: 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 45%, var(--surface-2)), color-mix(in srgb, var(--gold-lo) 60%, #000)); box-shadow: 0 24px 34px -12px rgba(0, 0, 0, .6); }
.book { position: relative; aspect-ratio: .68; border-radius: 4px 10px 10px 4px; padding: 18px 14px 16px 22px; display: flex; flex-direction: column; color: #f7efd9; background: linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: -8px 12px 26px -10px rgba(0, 0, 0, .7), inset 5px 0 0 rgba(0, 0, 0, .22), inset 7px 0 0 rgba(255, 255, 255, .1); transform-origin: left bottom; transition: transform .6s var(--ease), box-shadow .6s; overflow: hidden; cursor: pointer; }
.book::before { content: ""; position: absolute; inset: 9px 9px 9px 17px; border: 1px solid rgba(244, 223, 166, .5); border-radius: 3px 7px 7px 3px; }
.book::after { content: ""; position: absolute; inset: 0; background: var(--pattern) center/42px; opacity: .14; }
.book:hover { transform: translateY(-14px) rotateY(-16deg) rotateZ(-1deg); box-shadow: 10px 26px 40px -14px rgba(0, 0, 0, .8), inset 5px 0 0 rgba(0, 0, 0, .22); }
.book > * { position: relative; z-index: 1; }
.book .b-ar { font-family: var(--kufi); font-size: clamp(1rem, 1.6vw, 1.45rem); direction: rtl; color: #f4dfa6; text-align: center; margin-top: 12%; line-height: 1.5; }
.book .b-en { font-family: var(--serif); font-size: clamp(.86rem, 1.15vw, 1.08rem); font-weight: 600; text-align: center; line-height: 1.15; margin-top: 8px; }
.book .b-au { margin-top: auto; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; text-align: center; opacity: .8; }
.book .b-star { width: 22px; height: 22px; margin: 8px auto 0; color: #f4dfa6; opacity: .85; }
.lib-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 34px; flex-wrap: wrap; }

/* ---------- Toolkit ---------- */
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool { padding: 22px; display: flex; flex-direction: column; gap: 8px; min-height: 190px; }
.tool .tico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--em) 14%, transparent); color: var(--em); }
.tool h3 { font-weight: 700; font-size: 1.02rem; margin-top: 6px; }
.tool p { font-size: .85rem; color: var(--muted); }
.tool.tall { grid-row: span 2; align-items: center; text-align: center; justify-content: center; gap: 14px; }
.qibla { width: 170px; height: 170px; border-radius: 50%; border: 1px solid var(--line); position: relative; display: grid; place-items: center; background: radial-gradient(circle, var(--surface-2), var(--surface)); }
.qibla::before { content: "N"; position: absolute; top: 8px; font-size: .68rem; font-weight: 700; color: var(--faint); }
.qibla .needle { width: 4px; height: 122px; border-radius: 4px; background: linear-gradient(180deg, var(--gold) 50%, var(--surface-3) 50%); animation: needle 6s ease-in-out infinite; }
.qibla .kaaba { position: absolute; width: 20px; height: 20px; background: #0b0f18; border: 1px solid var(--gold); border-radius: 3px; box-shadow: inset 0 5px 0 -3px var(--gold); }
.tasbih { display: grid; place-items: center; gap: 10px; }
.tasbih button { width: 124px; height: 124px; border-radius: 50%; border: 1px solid var(--line); background: radial-gradient(circle at 35% 30%, var(--surface-3), var(--surface)); display: grid; place-items: center; font-family: var(--serif); font-size: 3rem; color: var(--gold); transition: transform .12s; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .7); }
.tasbih button:active { transform: scale(.94); }
.tasbih .ar { font-size: 1.3rem; color: var(--text); line-height: 1.6; }

/* ---------- CTA + footer ---------- */
.cta { position: relative; padding: clamp(48px, 7vw, 92px) clamp(24px, 6vw, 80px); border-radius: var(--r-lg); overflow: hidden; text-align: center; background: radial-gradient(ellipse 70% 90% at 50% 0, rgba(217, 182, 108, .22), transparent 70%), linear-gradient(160deg, #0d1728, #070c17); border: 1px solid rgba(222, 190, 120, .25); color: var(--text); }
.cta::before { content: ""; position: absolute; inset: 0; background: var(--pattern) center/72px; opacity: .1; }
.cta > * { position: relative; }
.cta .ar { font-size: clamp(1.7rem, 3.4vw, 2.6rem); color: var(--gold-hi); }
.cta .h2 { margin: 12px auto 16px; max-width: 20ch; }
.cta .lead { margin-inline: auto; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.pledges { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 30px; font-size: .86rem; color: var(--muted); }
.pledges span { display: inline-flex; align-items: center; gap: 8px; }
.pledges .i { color: var(--em); }

.footer { border-top: 1px solid var(--line-soft); padding: 64px 0 30px; background: var(--bg-alt); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
.footer p { color: var(--muted); font-size: .9rem; margin-top: 16px; max-width: 36ch; }
.footer h4 { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer li { margin-bottom: 10px; }
.footer li a { color: var(--muted); font-size: .92rem; transition: .2s; }
.footer li a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: .82rem; color: var(--faint); }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes rise { to { transform: none; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: .9; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .8; } }
@keyframes coreIn { from { opacity: 0; transform: translateZ(50px) scale(.8); } to { opacity: 1; transform: translateZ(50px) scale(1); } }
@keyframes float { 50% { translate: 0 -12px; } }
@keyframes wave { 50% { height: 100%; } }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } }
@keyframes needle { 0%, 100% { transform: rotate(calc(var(--q, 268deg) - 5deg)); } 35% { transform: rotate(calc(var(--q, 268deg) + 4deg)); } 70% { transform: rotate(calc(var(--q, 268deg) - 2deg)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links, .nav-search span, .nav-search .kbd, .nav-actions .btn-ghost { display: none; }
  .nav-search { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .nav-burger { display: inline-grid; }
  .nav-actions { margin-inline-start: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { position: absolute; right: -24%; top: 6%; width: 86%; opacity: .32; pointer-events: none; z-index: -1; }
  .orbit-note, .rosette-core small { display: none; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-continue { grid-column: span 2; }
  .aotd, .atlas, .comm { grid-template-columns: 1fr; }
  .topic-grid, .tools { grid-template-columns: repeat(2, 1fr); }
  .paths { grid-template-columns: repeat(2, 1fr); }
  .b-4, .b-5, .b-7, .b-8, .b-3 { grid-column: span 6; }
  .shelf { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ribbon { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .ribbon-next { text-align: center; }
}
@media (max-width: 640px) {
  .wrap { width: min(1240px, 100% - 32px); }
  .nav-actions .btn-gold { display: none; }
  /* Phones: the Arabic name sits on a small line under the English, so "Buruj Quran" stays on one line beside the mark. */
  .brand { flex: none; display: grid; grid-template-columns: 30px auto; column-gap: 10px; row-gap: 3px; align-items: center; }
  .brand-mark { grid-row: span 2; width: 30px; height: 30px; }
  .brand-name { font-size: 1.45rem; }
  .brand-ar { grid-column: 2; margin-inline-start: 0; font-size: .74rem; line-height: 1.3; }
  .prayers { grid-template-columns: repeat(3, 1fr); }
  .dash-grid, .topic-grid, .tools, .paths { grid-template-columns: 1fr; }
  .atlas-facts { gap: 8px; }
  .fact { padding: 12px 10px; }
  .fact b { font-size: 1.5rem; }
  .fact span { font-size: .7rem; }
  .dash-continue, .topic.wide { grid-column: auto; }
  .b-6, .b-4, .b-5, .b-7, .b-8, .b-3 { grid-column: span 12; }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .plan-banner { grid-template-columns: 1fr; }
  .filter { margin-inline-start: 0; width: 100%; }
  .hero-stats { gap: 20px; }
  .stat b { font-size: 1.8rem; }
}

/* ---------- Additions for the real build ---------- */
[hidden] { display: none !important; }
.notice { padding: 14px 18px; border-radius: 14px; border: 1px dashed var(--line); color: var(--muted); font-size: .88rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.notice .i { color: var(--gold); margin-top: 3px; }
.i.flip { transform: scaleX(-1); }
.feel-note { font-size: .78rem; color: var(--faint); }
.feel-out .tag { margin-bottom: 8px; text-transform: none; letter-spacing: .02em; font-size: .74rem; }
.feel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.pager { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-soft); display: grid; place-items: center; color: var(--muted); transition: .2s; }
.pager button:hover { color: var(--gold); border-color: var(--gold); }
.feel-more { margin-top: 10px; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.feel-more:hover { color: var(--gold); }
.feel-ctx { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); font-size: .86rem; }
.feel-ctx p { margin: 0 0 8px; color: var(--muted); }
.feel-ctx p:last-child { margin: 0; }
.feel-ctx b { color: var(--gold); margin-inline-end: 6px; }
.feel-ctx .here { color: var(--text); }
.chip.side-caution:not(.is-on) { border-color: color-mix(in srgb, var(--rose) 40%, transparent); }
.chip.side-gratitude:not(.is-on) { border-color: color-mix(in srgb, var(--em) 40%, transparent); }
.paths.three { grid-template-columns: repeat(3, 1fr); }
.ribbon-next a { display: block; font-size: .74rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.ribbon-next a:hover { color: var(--gold); }
.topic .tico.kufi { font-family: var(--kufi); font-size: 1.35rem; line-height: 1; }
.wbw .w small.urdu { font-size: .82rem; line-height: 2.1; }
@media (max-width: 350px) { .brand { grid-template-columns: auto; } .brand .brand-mark { display: none; } .brand .brand-ar { grid-column: 1; } }
@media (max-width: 1100px) { .paths.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .paths.three { grid-template-columns: 1fr; } }
