/* Nusuk Journey. Brand colors come from the four doors of the Nusuk challenge
   (set per site in Admin > Settings and injected as --door-* on :root). */
:root {
  --door-prophet: #00603A; --door-quran: #33506E; --door-makkah: #A98458; --door-madinah: #6E4F1E;
  --primary: var(--door-prophet);
  --primary-dark: #004A2D;
  --navy: var(--door-quran);
  --sand: var(--door-makkah);
  --brown: var(--door-madinah);
  --gold: #C9A46A;
  --gold-soft: #F3E7D3;
  --bg: #FBF8F2;
  --surface: #FFFFFF;
  --tint: #F3EEE4;
  --ink: #1C2621;
  --ink-2: #4A554F;
  --muted: #6B746F;
  --line: #E4DDD0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(28, 38, 33, .06), 0 8px 24px rgba(28, 38, 33, .07);
  --shadow-lg: 0 2px 6px rgba(28, 38, 33, .08), 0 24px 48px rgba(28, 38, 33, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Bengali", "Hind Siliguri", "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Amiri", "Scheherazade New", "Noto Naskh Arabic", "Geeza Pro", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--bg); }
.lang-bn body, body.lang-bn { line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.container.narrow { width: min(760px, 100% - 2.5rem); }
.center { text-align: center; }
.muted { color: var(--muted); }
.ic { width: 1.25em; height: 1.25em; flex: none; }
.ic-sm { width: 1.05em; height: 1.05em; }
.h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
.h3 { font-size: 1.3rem; }
.lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); color: var(--ink-2); max-width: 46rem; }
.lead-sm { color: var(--ink-2); max-width: 40rem; margin-inline: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--sand); margin-bottom: .75rem; }
.eyebrow a { color: inherit; }
.eyebrow-light { color: var(--gold); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .7rem 1.25rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; line-height: 1.2; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(0, 96, 58, .25); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--primary); border-color: rgba(0, 96, 58, .25); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-gold { background: var(--gold); color: #1e1608; }
.btn-gold:hover { background: #d8b47a; color: #1e1608; }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.btn-sm { min-height: 40px; padding: .45rem 1rem; font-size: .92rem; }
.btn-lg { min-height: 56px; padding: .85rem 1.6rem; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn.is-disabled { background: #e9e4da; color: var(--muted); box-shadow: none; border-color: transparent; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; padding: .25rem; }
.pill { display: inline-flex; gap: .35rem; align-items: center; font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; }
.pill-gold { background: var(--gold-soft); color: var(--brown); }

/* ---------- header ---------- */
.announce { background: var(--navy); color: #fff; font-size: .95rem; padding: .55rem 0; text-align: center; }
.announce a { color: var(--gold); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 242, .92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; }
.brand-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 30px; height: 30px; }
.brand-mark i { border-radius: 4px; }
.brand-mark i:nth-child(1) { background: var(--door-prophet); border-radius: 8px 4px 4px 4px; }
.brand-mark i:nth-child(2) { background: var(--door-quran); border-radius: 4px 8px 4px 4px; }
.brand-mark i:nth-child(3) { background: var(--door-makkah); }
.brand-mark i:nth-child(4) { background: var(--door-madinah); }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; align-items: center; }
.main-nav a, .sub-toggle { display: inline-flex; align-items: center; gap: .25rem; padding: .55rem .75rem; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .97rem; background: none; border: 0; font-family: inherit; cursor: pointer; }
.main-nav a:hover, .sub-toggle:hover { background: var(--tint); color: var(--ink); }
.main-nav a[aria-current="page"], .sub-toggle[data-active] { color: var(--primary); background: rgba(0, 96, 58, .08); }
.has-sub { position: relative; }
.sub { list-style: none; margin: 0; padding: .5rem; position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: none; }
.has-sub.open .sub { display: block; }
.sub a { display: flex; width: 100%; }
.nav-extra { display: flex; align-items: center; gap: .5rem; }
.nav-extra .btn { color: #fff; }
.lang-switch { font-weight: 700 !important; }
.menu-btn { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn .ic { width: 24px; height: 24px; }
@media (max-width: 980px) {
  .menu-btn { display: inline-flex; }
  .main-nav { position: fixed; inset: 68px 0 auto 0; max-height: calc(100dvh - 68px); overflow: auto; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; gap: .75rem; display: none; }
  .main-nav.open { display: flex; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav a, .sub-toggle { padding: .8rem .9rem; font-size: 1.05rem; width: 100%; }
  .sub { position: static; box-shadow: none; border: 0; padding: 0 0 0 .75rem; display: block; min-width: 0; background: transparent; }
  .sub-toggle { display: none; }
  .nav-extra { justify-content: space-between; border-top: 1px solid var(--line); padding-top: .75rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; min-height: min(88vh, 760px); display: flex; align-items: flex-end; overflow: hidden; background: #0d1a14; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 14, .35) 0%, rgba(8, 20, 14, .55) 45%, rgba(8, 20, 14, .92) 100%); }
.hero-inner { position: relative; z-index: 1; padding: 7rem 0 3.5rem; }
.hero h1 { font-size: clamp(2.2rem, 1.3rem + 4.2vw, 4.4rem); max-width: 14ch; font-weight: 800; }
.hero .lead { color: rgba(255, 255, 255, .88); }
.hero-badges { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .95rem; color: rgba(255, 255, 255, .85); }
.hero-badges li { display: inline-flex; gap: .4rem; align-items: center; }
.hero-badges .ic { color: var(--gold); }
.stats-band { background: var(--primary); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.6rem 0; text-align: center; }
.stats strong { display: block; font-size: clamp(1.5rem, 1rem + 2vw, 2.3rem); font-weight: 800; line-height: 1.1; }
.stats span { font-size: .9rem; opacity: .85; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }

.page-hero { padding: 4rem 0 3rem; background: linear-gradient(180deg, var(--tint), var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.3rem); font-weight: 800; }
.page-hero--img { position: relative; color: #fff; background: #0d1a14 var(--hero-img) center/cover no-repeat; border: 0; padding: 5.5rem 0 3.5rem; }
.page-hero--img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 14, .55), rgba(8, 20, 14, .88)); }
.page-hero--img .container { position: relative; }
.page-hero--img .lead { color: rgba(255, 255, 255, .88); }
.page-hero--img .eyebrow { color: var(--gold); }
.page-hero--img .app-meta span { background: rgba(255, 255, 255, .12); color: #fff; }
.hero-app { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 1.5rem; }
@media (max-width: 560px) { .hero-app { flex-direction: column; } }
.updated { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: 2.25rem; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.two-col--rev > :first-child { order: 2; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } .two-col--rev > :first-child { order: 0; } }

/* app icons (placeholders until replaced in Admin > Images) */
.app-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 16px; color: #fff; flex: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); object-fit: cover; }
.app-icon .ic { width: 32px; height: 32px; }
.app-icon--keys { background: linear-gradient(135deg, var(--door-prophet), #0a8a57); }
.app-icon--quiz { background: linear-gradient(135deg, var(--door-quran), #4d74a0); }
.app-icon-lg { width: 84px; height: 84px; border-radius: 22px; }
.app-icon-lg .ic { width: 44px; height: 44px; }
.app-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0; font-size: .85rem; }
.app-meta span { display: inline-flex; gap: .3rem; align-items: center; background: var(--tint); color: var(--ink-2); padding: .25rem .65rem; border-radius: 999px; }
.app-meta a { color: inherit; }

/* two parts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.part { background: var(--surface); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow); border-top: 6px solid var(--primary); }
.part--quiz { border-top-color: var(--navy); }
.part-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.part-head h3 { font-size: 1.7rem; margin: 0; }
.part-label { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sand); font-weight: 800; }
.part-name { font-weight: 700; color: var(--ink-2); margin-bottom: .5rem; }
.ticks { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.ticks li { display: flex; gap: .55rem; align-items: flex-start; }
.ticks .ic { color: var(--primary); margin-top: .3em; }
.ticks-lg li { background: var(--surface); padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* max keys band */
.max-band { background: linear-gradient(135deg, var(--navy), #22384f); color: #fff; }
.max-band p { color: rgba(255, 255, 255, .85); }
.max-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .max-grid { grid-template-columns: 1fr; gap: 2rem; } }
.big-num { font-size: clamp(3.5rem, 2rem + 7vw, 6.5rem); font-weight: 900; line-height: 1; color: var(--gold) !important; margin-bottom: .5rem; letter-spacing: -.03em; }
.cycle { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.cycle li { display: flex; gap: 1rem; align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); border-radius: var(--radius); padding: 1rem 1.25rem; }
.cycle li > span { display: inline-flex; width: 48px; height: 48px; border-radius: 14px; background: var(--gold); color: #1e1608; align-items: center; justify-content: center; flex: none; }
.cycle h3 { margin: 0; font-size: 1.1rem; }
.cycle p { margin: 0; font-size: .95rem; }

/* showcase */
.showcase { display: grid; gap: 2rem; }
.show { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; background: var(--surface); border-radius: 24px; padding: clamp(1.25rem, 3vw, 2.5rem); box-shadow: var(--shadow); }
.show--quiz .show-phones { order: 2; }
.show-phones { display: flex; gap: 1rem; justify-content: center; }
.show-phones .phone { width: 46%; max-width: 230px; }
.show-phones .phone:nth-child(2) { transform: translateY(2rem); }
.show-text h3 { font-size: 1.6rem; margin: 0; }
@media (max-width: 860px) { .show { grid-template-columns: 1fr; } .show--quiz .show-phones { order: 0; } }
.phone { margin: 0; border-radius: 28px; padding: 8px; background: #121815; box-shadow: var(--shadow-lg); }
.phone img { border-radius: 21px; width: 100%; }
.phones-pair { display: flex; justify-content: center; }
.phones-pair .phone { max-width: 300px; }
@media (max-width: 860px) { .phones-pair .phone { max-width: 260px; } }

/* doors */
.doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 860px) { .doors { grid-template-columns: repeat(2, 1fr); } }
.door { background: var(--surface); border-radius: var(--radius); padding: 1.5rem 1.1rem; text-align: center; box-shadow: var(--shadow); }
.door h3 { font-size: 1.05rem; margin-top: 1rem; }
.door p { font-size: .93rem; color: var(--ink-2); margin: 0; }
.door-shape { display: block; margin: 0 auto; width: 74px; height: 104px; position: relative; }
.door-shape::after { content: ""; position: absolute; left: 50%; top: 22%; bottom: 0; width: 1px; background: rgba(255, 255, 255, .5); }
.door-shape--prophet { background: var(--door-prophet); clip-path: polygon(50% 0, 64% 12%, 82% 12%, 82% 30%, 100% 46%, 82% 62%, 82% 100%, 18% 100%, 18% 62%, 0 46%, 18% 30%, 18% 12%, 36% 12%); }
.door-shape--quran { background: var(--door-quran); border-radius: 50% 50% 4px 4px / 34% 34% 4px 4px; }
.door-shape--makkah { background: var(--door-makkah); border-radius: 40px 40px 4px 4px; }
.door-shape--madinah { background: var(--door-madinah); border-radius: 37px 37px 4px 4px / 37px 37px 4px 4px; }
.door--prophet { border-bottom: 4px solid var(--door-prophet); }
.door--quran { border-bottom: 4px solid var(--door-quran); }
.door--makkah { border-bottom: 4px solid var(--door-makkah); }
.door--madinah { border-bottom: 4px solid var(--door-madinah); }

/* features */
.features { margin-top: 2rem; }
.feature, .limit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.feature h3, .limit h3 { font-size: 1.12rem; margin: .9rem 0 .4rem; }
.feature p, .limit p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.feature-ic { display: inline-flex; width: 46px; height: 46px; border-radius: 13px; align-items: center; justify-content: center; background: rgba(0, 96, 58, .09); color: var(--primary); }
.features .feature:nth-child(4n+2) .feature-ic { background: rgba(51, 80, 110, .1); color: var(--navy); }
.features .feature:nth-child(4n+3) .feature-ic { background: rgba(169, 132, 88, .15); color: var(--brown); }
.features .feature:nth-child(4n+4) .feature-ic { background: rgba(110, 79, 30, .12); color: var(--brown); }
.feature-link { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.feature-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.limits .limit { border-top: 5px solid var(--sand); }

/* steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 1.25rem 0; display: grid; gap: .85rem; }
.steps li { counter-increment: s; position: relative; padding: 1rem 1.1rem 1rem 3.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.steps li::before { content: counter(s); position: absolute; left: 1rem; top: 1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.steps li h3 { font-size: 1.05rem; margin: .15rem 0 .25rem; }
.steps li p { margin: 0; color: var(--ink-2); }
.steps li h3 + p { font-size: .98rem; }
.steps-sm li { padding: .7rem .9rem .7rem 3.2rem; }
.steps-sm li::before { width: 1.7rem; height: 1.7rem; left: .8rem; top: .7rem; font-size: .85rem; }

/* buttons list */
.buttons-list { display: grid; gap: .6rem; margin: 1rem 0 1.5rem; }
.buttons-list > div { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid #cfc8bb; border-radius: var(--radius-sm); padding: .85rem 1rem; }
.buttons-list dt { font-weight: 750; }
.buttons-list dd { margin: .2rem 0 0; color: var(--ink-2); font-size: .97rem; }
.buttons-list .is-start { border-left-color: #1f7d43; }
.buttons-list .is-stop { border-left-color: #b3261e; }

/* callouts */
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; }
.callout h3 { display: flex; gap: .5rem; align-items: center; font-size: 1.15rem; }
.callout-ios { border-left: 5px solid var(--navy); }
.callout-bot { border-left: 5px solid var(--primary); }
.callout-bot .app-icon { width: 48px; height: 48px; margin-bottom: .75rem; }
.callout-bot .app-icon .ic { width: 26px; height: 26px; }
.prompt-box { background: #142019; color: #e8f0eb; border-radius: var(--radius); padding: 1.5rem; }
.prompt-box h3 { color: var(--gold); }
.prompt-box pre { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; line-height: 1.6; background: rgba(255, 255, 255, .05); padding: 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; }
.kb-band { background: linear-gradient(180deg, var(--bg), var(--tint)); }

/* link cards */
.link-cards { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.link-cards a { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-weight: 650; }
.link-cards a:hover { border-color: var(--primary); color: var(--primary); }
.link-cards .go { margin-left: auto; color: var(--sand); }
.link-more { display: inline-flex; gap: .35rem; align-items: center; margin-top: 1rem; font-weight: 650; }

/* faq */
.faq { display: grid; gap: .65rem; margin: 1rem 0 2rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq-item summary { cursor: pointer; padding: 1rem 3rem 1rem 1.15rem; font-weight: 700; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 1.15rem; top: .8rem; font-size: 1.4rem; color: var(--primary); font-weight: 400; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-a { padding: 0 1.15rem 1rem; color: var(--ink-2); }
.faq-a p { margin: 0; }

/* featured code */
.featured, .next-code { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); text-align: center; }
.featured { border: 2px solid var(--gold); background: linear-gradient(180deg, #fffdf8, #fbf3e4); position: relative; }
.featured-title { font-size: 1.2rem; margin: .75rem 0 .25rem; }
.featured-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.4rem); font-weight: 800; letter-spacing: .04em; margin: .25rem 0 .5rem; color: var(--ink); word-break: break-all; }
.code-pre { color: var(--sand); }
.featured-text { color: var(--ink-2); font-size: .96rem; max-width: 34rem; margin-inline: auto; }
.featured .btn-row, .next-code .btn-row { justify-content: center; margin-top: .75rem; }
.next-label { font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; margin: 0; }
.next-meta { color: var(--muted); font-size: .9rem; min-height: 1.4em; }
.helped { margin: 1rem 0 0; color: var(--ink-2); font-size: .92rem; display: inline-flex; gap: .35rem; align-items: center; }

.hadith { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.hadith p { margin: 0; font-size: 1.08rem; font-style: italic; color: var(--brown); }
.hadith cite { font-size: .88rem; color: var(--ink-2); font-style: normal; }
.hadith-sm { max-width: 40rem; }

/* codes page */
.codes-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 960px) { .codes-layout { grid-template-columns: 1fr; } }
.section-codes { padding-top: 2rem; }
.code-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.code-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; text-align: center; }
.code-stats strong { display: block; font-size: 1.35rem; color: var(--primary); }
.code-stats span { font-size: .82rem; color: var(--muted); }
.codes-top { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .codes-top { grid-template-columns: 1fr; } }
.codes-top .featured-code { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 1.9rem); }
.howto { margin: 1.25rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .25rem 1rem; }
.howto > summary { cursor: pointer; font-weight: 700; padding: .7rem 0; color: var(--primary); }
.howto .steps li { background: var(--bg); }
.code-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .65rem; }
.code-item { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .65rem .65rem .9rem; transition: background .3s, border-color .3s; }
.code-item.flash { background: #eaf6ef; border-color: var(--primary); }
.code-item .cinfo { flex: 1; min-width: 0; }
.code-item code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: 1.05rem; display: block; }
.code-item code b { color: var(--sand); font-weight: 800; }
.code-item small { color: var(--muted); font-size: .8rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-item .btn { min-height: 40px; padding: .4rem .75rem; font-size: .88rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--primary); cursor: pointer; flex: none; }
.icon-btn:hover { border-color: var(--primary); }
.code-list--history .code-item { opacity: .85; }
.code-list--history .code-item.reported { opacity: .5; }
.problem { position: relative; }
.problem-menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: .35rem; z-index: 5; min-width: 220px; }
.problem-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .6rem .7rem; border-radius: 8px; font: inherit; font-size: .92rem; cursor: pointer; }
.problem-menu button:hover { background: var(--tint); }
.history { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px dashed var(--line); }
.history-head { display: flex; justify-content: space-between; align-items: baseline; }
.codes-msg { text-align: center; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 80; max-width: calc(100% - 2rem); text-align: center; font-size: .95rem; }
.toast .ic { color: var(--gold); vertical-align: -3px; }
.share-box { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border-top: 5px solid var(--sand); }
.form { display: grid; gap: .5rem; }
.form label { font-weight: 700; margin-top: .5rem; }
.form input, .form textarea, .form select { width: 100%; font: inherit; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); }
.form input:focus, .form textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0, 96, 58, .15); }
.form .btn { justify-self: start; margin-top: .5rem; }
.hint { font-size: .86rem; color: var(--muted); margin: 0; display: flex; gap: .35rem; align-items: center; }
.form-msg { font-weight: 650; color: var(--primary); margin: 0; min-height: 1.2em; }
.form-msg.err { color: #b3261e; }
.bulk { margin-top: 1rem; }
.how-keys { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .how-keys { grid-template-columns: 1fr; } }
.mock { background: #fff; border-radius: 26px; padding: 1.5rem; box-shadow: var(--shadow-lg); max-width: 340px; margin: 0 auto; width: 100%; border: 8px solid #121815; }
.mock-top { display: flex; gap: .5rem; align-items: center; font-weight: 700; color: var(--ink-2); }
.mock-top strong { margin-left: auto; background: var(--tint); padding: .2rem .7rem; border-radius: 999px; color: var(--ink); }
.mock-label { margin: 1.25rem 0 .4rem; font-size: .9rem; color: var(--muted); }
.mock-input { border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .9rem; font-family: ui-monospace, Menlo, monospace; color: var(--muted); }
.mock-btn { margin-top: .75rem; background: #111; color: #fff; text-align: center; border-radius: 999px; padding: .7rem; font-weight: 700; }
.mock-ok { margin-top: 1rem; background: #eaf6ef; color: var(--primary); border-radius: 12px; padding: .7rem; text-align: center; font-weight: 700; display: flex; gap: .4rem; justify-content: center; align-items: center; }

/* teaser + photo band */
.codes-teaser { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .codes-teaser { grid-template-columns: 1fr; } }
.photo-band { position: relative; color: #fff; background: #0d1a14 var(--photo) center/cover no-repeat; padding: clamp(3.5rem, 2rem + 5vw, 6rem) 0; }
.photo-band::before { content: ""; position: absolute; inset: 0; background: rgba(8, 20, 14, .78); }
.photo-band .container { position: relative; }
.how { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 860px) { .how { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .how { grid-template-columns: 1fr; } }
.how li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: 1.4rem; backdrop-filter: blur(4px); }
.how h3 { margin: .9rem 0 .35rem; font-size: 1.15rem; }
.how p { margin: 0; color: rgba(255, 255, 255, .85); font-size: .97rem; }
.how-ic { display: inline-flex; width: 46px; height: 46px; border-radius: 13px; background: var(--gold); color: #1e1608; align-items: center; justify-content: center; }

/* download */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 760px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-card { background: var(--surface); border-radius: 24px; padding: 2rem; box-shadow: var(--shadow); text-align: center; border-top: 6px solid var(--primary); }
.dl-card--quiz { border-top-color: var(--navy); }
.dl-card .app-icon { margin: 0 auto 1rem; }
.dl-card .app-meta { justify-content: center; margin-bottom: 1.25rem; }
.ios-note { margin-top: 1.5rem; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts > div { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); border-bottom: 4px solid var(--sand); }
.facts strong { display: block; font-size: 1.6rem; color: var(--primary); line-height: 1.2; }
.facts span { color: var(--ink-2); font-size: .92rem; }

.prose h2 { font-size: 1.45rem; margin-top: 2rem; }
.prose p { color: var(--ink-2); }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.post-card time { font-size: .85rem; color: var(--sand); font-weight: 700; }
.post-card h3, .post-card h2 { margin: .35rem 0 .5rem; font-size: 1.15rem; }
.post-card h3 a, .post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.post-card--row { margin-bottom: 1rem; }

/* dua */
.dua { background: radial-gradient(ellipse at top, #0b7a4c 0%, var(--primary) 45%, #003d25 100%); color: #fff; text-align: center; padding: clamp(3.5rem, 2rem + 5vw, 5.5rem) 0; }
.dua-inner { max-width: 760px; }
.dua-icon { display: inline-flex; width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, .12); align-items: center; justify-content: center; color: var(--gold); margin-bottom: 1rem; }
.dua-icon .ic { width: 28px; height: 28px; }
.dua h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
.dua-text { font-size: 1.12rem; color: rgba(255, 255, 255, .9); }
.dua-ar { font-family: var(--font-ar); font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem); line-height: 1.9; color: var(--gold); margin: 1.5rem 0 .5rem; }
.dua-tr { font-size: .95rem; color: rgba(255, 255, 255, .78); font-style: italic; }

/* footer */
.site-footer { background: #101a15; color: rgba(255, 255, 255, .78); padding: 3.5rem 0 2rem; font-size: .96rem; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.site-footer h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin: 0 0 .9rem; }
.site-footer ul { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .45rem; }
.site-footer ul.inline { display: flex; gap: 1rem; }
.site-footer [aria-current] { color: var(--gold); font-weight: 700; }
.footer-brand p { margin-top: 1rem; }
.footer-dua { color: var(--gold); display: flex; gap: .4rem; align-items: center; }
.social { display: flex; gap: 1rem; flex-wrap: wrap; }
.social a { border: 1px solid rgba(255, 255, 255, .2); padding: .35rem .85rem; border-radius: 999px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2rem; padding-top: 1.5rem; font-size: .86rem; color: rgba(255, 255, 255, .6); }
.dev-credit { color: rgba(255, 255, 255, .85); font-size: .95rem; }
.dev-credit strong, .dev-credit a { color: var(--gold); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.main-nav .btn-primary, .main-nav .btn-primary:hover { background: var(--primary); color: #fff; padding: .45rem 1rem; border-radius: 999px; width: auto; }
.main-nav .btn-primary:hover { background: var(--primary-dark); }
.page-hero--codes { padding: 2.5rem 0 1.5rem; }
.updated .ic { margin-right: .1rem; }
@media (max-width: 640px) {
  .page-hero--codes { padding: 1.75rem 0 1rem; }
  .page-hero--codes h1 { font-size: 1.85rem; }
  .page-hero--codes .lead { font-size: 1rem; }
  .page-hero--codes .hadith { margin: 1rem 0 0; padding: .6rem .9rem; }
  .page-hero--codes .hadith p { font-size: .95rem; }
  .code-stats { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .code-stats > div { padding: .55rem; }
  .code-stats strong { font-size: 1.1rem; }
  .featured, .next-code { padding: 1.1rem; }
  .featured .btn-row, .next-code .btn-row { flex-wrap: nowrap; }
  .featured-text { font-size: .9rem; }
}
