/* ==========================================================================
   God Alone - whysubmission.info
   Design system: deep green-black, luminous green accent, serif reading voice.
   ========================================================================== */

/* ---- Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-latin-600-italic.woff2') format('woff2');
}

/* ---- Tokens ---------------------------------------------------------------- */
:root {
  --bg: #070a08;
  --bg-raise: #0b0f0c;
  --surface: #0e1410;
  --surface-2: #131a15;
  --surface-3: #18211a;
  --border: #1e2921;
  --border-strong: #2c3b2f;
  --text: #e9ede9;
  --text-soft: #b9c2ba;
  --text-mute: #8a958c;
  --text-faint: #5d685f;
  --acc: #4ade80;
  --acc-bright: #86efac;
  --acc-deep: #22c55e;
  --acc-dark: #16a34a;
  --acc-ink: #052e12;
  --acc-glow: rgba(74, 222, 128, 0.14);
  --acc-tint: rgba(74, 222, 128, 0.06);
  --blue: #7cb8ff;
  --red: #f87171;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 6px 24px -6px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 16px 48px -12px rgba(0, 0, 0, 0.7);
  --font-ui: 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(0.97rem, 0.93rem + 0.2vw, 1.06rem);
  --step-1: clamp(1.15rem, 1.09rem + 0.3vw, 1.28rem);
  --step-2: clamp(1.38rem, 1.28rem + 0.5vw, 1.62rem);
  --step-3: clamp(1.66rem, 1.5rem + 0.8vw, 2.05rem);
  --step-4: clamp(2rem, 1.72rem + 1.4vw, 2.7rem);
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --container: 74rem;
  --article: 50rem;
  --header-h: 4rem;
}

/* ---- Reset & base ---------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html:focus-within {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 50% -10%, rgba(74, 222, 128, 0.05), transparent 65%),
    radial-gradient(900px 400px at 100% 100%, rgba(74, 222, 128, 0.025), transparent 60%);
  background-attachment: fixed;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img,
svg,
video {
  max-width: 100%;
  height: auto;
}
iframe {
  max-width: 100%;
}
main img {
  border-radius: var(--radius-s);
}
::selection {
  background: var(--acc-dark);
  color: #fff;
}
a {
  color: var(--acc);
  text-decoration-color: color-mix(in srgb, var(--acc) 35%, transparent);
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover {
  color: var(--acc-bright);
  text-decoration-color: var(--acc-bright);
}
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: 2px;
}
button {
  font: inherit;
  color: inherit;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Skip link & progress -------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  padding: 0.6rem 1rem;
  background: var(--acc);
  color: var(--acc-ink);
  font-weight: 600;
  border-radius: var(--radius-s);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--acc-ink);
}
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--acc-dark), var(--acc));
  z-index: 250;
  pointer-events: none;
}

/* ---- Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
  min-width: 0;
}
.brand img {
  height: 2.15rem;
  width: auto;
  border-radius: 0;
}
.brand-name {
  font-weight: 650;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand-name .brand-accent {
  color: var(--acc);
}
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-mute);
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.search-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-2);
}
.search-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
}
.search-btn kbd {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--text-faint);
}
.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  line-height: 0;
}
.nav-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: var(--text);
}

/* ---- Primary nav ------------------------------------------------------------ */
.primary-nav {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-raise) 80%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  position: sticky;
  top: var(--header-h);
  z-index: 190;
}
.nav-list {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 0.75rem;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-item {
  position: relative;
}
.nav-link,
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.72rem 1.05rem;
  background: none;
  border: 0;
  color: var(--text-soft);
  font-size: 0.925rem;
  font-weight: 520;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-s);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover,
.nav-trigger:hover,
.nav-item.open .nav-trigger {
  color: var(--acc);
  background: var(--acc-tint);
}
.nav-item.current > .nav-link,
.nav-item.current > .nav-trigger {
  color: var(--acc);
}
.nav-trigger .chev {
  width: 0.7rem;
  height: 0.7rem;
  stroke: currentColor;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.nav-item.open .nav-trigger .chev {
  transform: rotate(180deg);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translate(-50%, -0.35rem);
  min-width: 17rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-3);
  list-style: none;
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 210;
}
.nav-item.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.dropdown-menu a {
  display: block;
  padding: 0.55rem 0.8rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius-s);
  border-left: 2px solid transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: var(--acc-tint);
  color: var(--acc-bright);
  border-left-color: var(--acc);
}
.dropdown-menu a[aria-current='page'] {
  color: var(--acc);
  border-left-color: var(--acc);
}
.dropdown-menu .ext::after {
  content: ' ↗';
  color: var(--text-faint);
  font-size: 0.8em;
}

/* ---- Breadcrumbs ------------------------------------------------------------ */
.breadcrumbs {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
  font-size: 0.85rem;
  color: var(--text-mute);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.breadcrumbs li + li::before {
  content: '/';
  color: var(--text-faint);
}
.breadcrumbs a {
  color: var(--text-mute);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--acc);
}
.breadcrumbs [aria-current='page'] {
  color: var(--text-soft);
}

/* ---- Layout ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--article);
  margin: 1.5rem auto 3rem;
  padding: 0 1.25rem;
  flex: 1;
}
.container.wide {
  max-width: var(--container);
}
.page-content {
  max-width: 100%;
}
.content-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.main-content {
  flex: 1;
  min-width: 0;
}
.sidebar {
  width: 19rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: calc(var(--header-h) + 3.4rem);
}
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: var(--article);
  margin: 1.1rem auto 0;
  padding: 0 1.25rem;
  font-size: 0.82rem;
  color: var(--text-mute);
}
.article-meta .chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  background: var(--acc-tint);
  border: 1px solid color-mix(in srgb, var(--acc) 25%, transparent);
  color: var(--acc);
  border-radius: 999px;
  font-weight: 570;
  letter-spacing: 0.01em;
}

/* ---- Content boxes ---------------------------------------------------------- */
.verse-box,
.intro-box,
.video-box,
.content-box {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-raise) 100%);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
  border-radius: var(--radius-l);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}
.content-box h1 {
  font-family: var(--font-serif);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  padding-bottom: 1.1rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.content-box h1::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 5.5rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--acc), transparent);
}
.verse-box h2,
.intro-box h2,
.video-box h2 {
  font-size: var(--step-1);
  font-weight: 640;
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
}
.content-box h2 {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: 600;
  margin: 2.2rem 0 0.9rem;
  line-height: 1.3;
}
.content-box h3 {
  font-size: var(--step-1);
  font-weight: 620;
  margin: 1.7rem 0 0.7rem;
  color: var(--acc-bright);
}
.content-box p,
.content-box li {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1rem;
}
.content-box li {
  margin-bottom: 0.35rem;
}
.content-box ul,
.content-box ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.content-box p:last-child {
  margin-bottom: 0;
}
.intro-box p {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Quran verse callouts (site convention: <p><em>[n:n] ...</em></p>) */
.content-box p em,
.intro-box p em {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--acc-bright);
  text-align: center;
  margin: 1.2rem auto;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, var(--acc-tint), rgba(74, 222, 128, 0.02));
  border: 1px solid color-mix(in srgb, var(--acc) 18%, transparent);
  border-left: 3px solid var(--acc);
  border-radius: var(--radius-s);
  line-height: 1.8;
}
.content-box p em em,
.content-box p em i {
  display: inline;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
}
.bible {
  color: var(--blue);
  font-style: italic;
}
.hadith {
  color: var(--red);
  font-style: italic;
}
.content-box strong {
  color: #fff;
  font-weight: 640;
}

/* ---- Verse of the day -------------------------------------------------------- */
.verse-box {
  border-color: color-mix(in srgb, var(--acc) 25%, var(--border));
  position: relative;
  overflow: hidden;
}
.verse-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 140px at 15% 0%, var(--acc-glow), transparent 70%);
  pointer-events: none;
}
.verse-text {
  font-family: var(--font-serif);
  font-size: var(--step-1);
  font-style: italic;
  text-align: center;
  line-height: 1.75;
  color: var(--text);
}
.verse-reference {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-style: normal;
  color: var(--acc);
  font-weight: 620;
}
.verse-context-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-style: normal;
}

/* ---- Video ------------------------------------------------------------------- */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
main video {
  width: 100%;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: #000;
}
/* Build-generated wrappers: concrete width so shrink-to-fit flex parents cannot collapse them. */
.video-embed {
  width: 640px;
  max-width: 100%;
  margin: 1.25rem auto;
}
/* Flex children of featured boxes must clamp to the box, never overflow it. */
.featured-box > div {
  min-width: 0;
  max-width: 100%;
}
.doc-frame {
  width: 100%;
  height: min(78vh, 60rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: #fff;
}

/* ---- Hero (home) -------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem clamp(1.5rem, 4vw, 2.5rem);
  max-width: 54rem;
  margin: 0 auto;
}
.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 1.1rem;
}
.hero .kicker::before,
.hero .kicker::after {
  content: '';
  width: 2rem;
  height: 1px;
  background: color-mix(in srgb, var(--acc) 45%, transparent);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
.hero h1 .glow {
  color: var(--acc);
  text-shadow: 0 0 40px rgba(74, 222, 128, 0.35);
}
.hero .sub {
  font-size: var(--step-1);
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 40rem;
  margin: 0 auto 1.8rem;
}
.hero-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  font-weight: 620;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--acc);
  color: var(--acc-ink);
}
.btn-primary:hover {
  background: var(--acc-bright);
  color: var(--acc-ink);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(74, 222, 128, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  color: var(--acc);
  border-color: var(--acc-dark);
  background: var(--acc-tint);
  transform: translateY(-1px);
}

/* Start-here cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.9rem;
  margin: 1.4rem 0;
}
.start-card {
  display: block;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.start-card:hover {
  transform: translateY(-3px);
  border-color: var(--acc-dark);
  box-shadow: 0 10px 30px -12px rgba(74, 222, 128, 0.25);
}
.start-card .card-num {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--acc);
  letter-spacing: 0.1em;
}
.start-card h3 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 630;
  margin: 0.35rem 0 0.3rem;
}
.start-card p {
  color: var(--text-mute);
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0;
}

/* ---- Sidebar widgets ----------------------------------------------------------- */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1.2rem 1.25rem;
}
.widget h3 {
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--acc);
  margin-bottom: 0.85rem;
}
.widget-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.widget-list a {
  display: block;
  padding: 0.5rem 0.6rem;
  margin: 0 -0.6rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
  text-decoration: none;
  border-radius: var(--radius-s);
  transition: background 0.12s ease, color 0.12s ease, padding-left 0.12s ease;
}
.widget-list a:hover {
  background: var(--acc-tint);
  color: var(--acc-bright);
  padding-left: 0.85rem;
}
.widget .note {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 0.2rem;
}
.random-btn {
  width: 100%;
  margin-top: 0.4rem;
}

/* ---- Legacy component restyles -------------------------------------------------- */
.page-title {
  font-family: var(--font-serif);
  text-align: center;
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 1.5rem 0 0.4rem;
}
.page-subtitle {
  text-align: center;
  color: var(--text-mute);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}
.featured-box {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--acc) 30%, var(--border));
  border-radius: var(--radius-l);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), var(--shadow-2);
}
.featured-link {
  display: inline-block;
  background: var(--acc-tint);
  border: 1px solid var(--acc-dark);
  border-radius: 999px;
  padding: 0.65rem 1.9rem;
  color: var(--acc);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 640;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.featured-link:hover {
  background: var(--acc);
  color: var(--acc-ink);
  transform: translateY(-1px);
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.topic-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.75rem 1rem;
  line-height: 1.45;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}
.topic-link:hover {
  background: var(--surface-2);
  border-color: var(--acc-dark);
  color: var(--acc-bright);
  transform: translateY(-1px);
}
.planned-link {
  display: block;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text-faint);
  font-size: 0.92rem;
  padding: 0.75rem 1rem;
  line-height: 1.45;
  cursor: default;
}
.planned-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  vertical-align: 0.1em;
}
p .planned-link,
li .planned-link {
  display: inline;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: var(--text-mute);
  font-style: italic;
}

/* Tabs (years / categories) */
.year-tabs,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.year-tab,
.category-tab {
  padding: 0.55rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.year-tab:hover,
.category-tab:hover {
  border-color: var(--acc-dark);
  color: var(--acc);
}
.year-tab.active,
.category-tab.active {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--acc-ink);
}
.year-content,
.category-content {
  display: none;
}
.year-content.active,
.category-content.active {
  display: block;
  animation: fadeUp 0.28s ease both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.topic-placeholder {
  color: var(--text-faint);
  font-size: 0.88rem;
  font-style: italic;
  padding: 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s);
}

/* Magazine archive */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.9rem;
  margin-top: 1.5rem;
}
.magazine-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1rem;
  text-align: center;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.magazine-item:hover {
  transform: translateY(-3px);
  border-color: var(--acc-dark);
  box-shadow: 0 8px 24px -10px rgba(74, 222, 128, 0.3);
}
.magazine-title {
  color: var(--acc);
  font-size: 0.95rem;
  font-weight: 640;
  margin-bottom: 0.2rem;
}
.magazine-date {
  color: var(--text-mute);
  font-size: 0.75rem;
  margin-bottom: 0.7rem;
}
.magazine-link {
  display: inline-block;
  padding: 0.42rem 1rem;
  background: var(--acc-tint);
  border: 1px solid var(--acc-dark);
  color: var(--acc);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 620;
  font-size: 0.82rem;
  transition: background 0.14s ease, color 0.14s ease;
}
.magazine-link:hover {
  background: var(--acc);
  color: var(--acc-ink);
}

/* Tables */
.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-s);
}
.discovery-table,
.inheritance-table,
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-family: var(--font-ui);
}
.discovery-table {
  text-align: center;
}
.discovery-table th,
.inheritance-table th,
.comparison-table th {
  background: var(--surface-3);
  color: var(--acc);
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-strong);
  font-weight: 640;
  text-align: inherit;
}
.inheritance-table th,
.comparison-table th {
  text-align: left;
}
.discovery-table td,
.inheritance-table td,
.comparison-table td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  color: var(--text-soft);
  line-height: 1.6;
  vertical-align: top;
}
.discovery-table tr:nth-child(even) td,
.inheritance-table tr:nth-child(even) td,
.comparison-table tr:nth-child(even) td {
  background: var(--bg-raise);
}
.discovery-table tr:nth-child(odd) td,
.inheritance-table tr:nth-child(odd) td,
.comparison-table tr:nth-child(odd) td {
  background: var(--surface);
}
.discovery-table tr:last-child td {
  background: var(--surface-2);
  font-weight: 640;
  color: var(--text);
}
.inheritance-table .total-row td {
  background: var(--acc-tint);
  color: var(--acc);
  font-weight: 640;
  border-top: 2px solid var(--acc-dark);
}
.comparison-table td:first-child {
  color: var(--acc);
  font-style: italic;
  width: 22%;
}

/* Math & callout blocks */
.math-box,
.math-block {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-left: 3px solid var(--acc);
  border-radius: var(--radius-s);
  padding: 1.1rem 1.4rem;
  margin: 1.4rem 0;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.9;
  overflow-x: auto;
}
.math-box .label {
  color: var(--text-mute);
  font-size: 0.8rem;
}
.math-result,
.result-highlight,
.math-block .result {
  color: var(--acc);
  font-weight: 650;
}
.math-result {
  text-align: center;
  margin: 0.75rem 0;
}
.foundational-box {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-left: 3px solid var(--acc);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-s);
  line-height: 1.9;
}
.claim-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.claim-block .claim-title {
  color: var(--red);
  font-weight: 640;
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}
.part-header {
  text-align: center;
  color: var(--acc);
  font-size: 1.1rem;
  font-weight: 640;
  margin: 2.4rem 0 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--acc) 35%, transparent);
  padding-bottom: 0.5rem;
}
.section-label {
  color: var(--acc);
  font-weight: 640;
  margin: 1.75rem 0 0.5rem;
  font-size: 1.02rem;
}
.indent {
  margin-left: 2rem;
}

/* Lists with numbered items */
.miracle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.miracle-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.55;
}
.miracle-num {
  color: var(--acc);
  font-weight: 650;
  min-width: 1.7rem;
  text-align: right;
  flex-shrink: 0;
  font-size: 0.85rem;
  padding-top: 0.08rem;
}
.conduct-section h3 {
  color: var(--acc);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.75rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}
.conduct-section h3.red {
  color: var(--red);
}
.conduct-list {
  list-style: none;
  padding: 0;
}
.conduct-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.55;
}
.conduct-list li:last-child {
  border-bottom: none;
}
.item-num {
  color: var(--acc);
  font-weight: 650;
  min-width: 2.2rem;
  text-align: right;
  flex-shrink: 0;
  font-size: 0.85rem;
  padding-top: 0.08rem;
}
.item-num.red {
  color: var(--red);
}
.item-text {
  flex: 1;
}
.item-text .ref {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-left: 0.3rem;
}

/* Names grid (God's attributes) */
.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.6rem;
  margin: 1.5rem 0;
}
.name-card {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.14s ease;
}
.name-card:hover {
  border-color: var(--acc-dark);
}
.name-arabic {
  color: var(--acc);
  font-weight: 640;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.name-english {
  color: var(--text-soft);
  font-size: 0.88rem;
  text-align: right;
  flex-grow: 1;
}
.name-verse {
  color: var(--text-faint);
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-left: 0.4rem;
}
.letter-heading {
  color: var(--acc);
  font-size: 1rem;
  font-weight: 640;
  margin: 1.5rem 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
.name-total {
  text-align: center;
  color: var(--acc);
  font-weight: 640;
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
}

/* Pillar links */
.pillar-link {
  display: block;
  background: var(--surface);
  padding: 1.15rem 1.4rem;
  margin: 0.7rem 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--acc-dark);
  border-radius: var(--radius-s);
  text-decoration: none;
  color: var(--text);
  font-weight: 620;
  font-size: 1.02rem;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.pillar-link:hover {
  background: var(--surface-2);
  border-left-color: var(--acc);
  color: var(--acc-bright);
  transform: translateX(4px);
}

/* Prev / next navigation */
.navigation-arrow {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.next-page,
.prev-page,
.parent-page-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  text-decoration: none;
  border-radius: var(--radius-m);
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.next-page:hover,
.prev-page:hover,
.parent-page-button:hover {
  border-color: var(--acc-dark);
  color: var(--acc);
  background: var(--acc-tint);
  transform: translateY(-2px);
}
.next-page .nav-text,
.prev-page .nav-text {
  font-size: 0.78rem;
  color: var(--text-mute);
}
.next-page .nav-page,
.prev-page .nav-page {
  font-size: 0.98rem;
  font-weight: 650;
}
.arrow-icon {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.next-page:hover .arrow-icon {
  transform: translateX(4px);
}
.prev-page .arrow-icon {
  transform: rotate(180deg);
}
.prev-page:hover .arrow-icon {
  transform: rotate(180deg) translateX(4px);
}
.parent-page-button .arrow-icon {
  width: 1.3rem;
  height: 1.3rem;
}

/* Zakat calculator */
.calculate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  background: var(--acc);
  color: var(--acc-ink);
  border: 0;
  border-radius: 999px;
  font-weight: 640;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.calculate-btn:hover {
  background: var(--acc-bright);
  transform: translateY(-1px);
}
main input[type='number'],
main input[type='date'],
main input[type='text'],
main select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg-raise);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s ease;
}
main input:focus,
main select:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-glow);
}

/* ---- Related topics ---------------------------------------------------------- */
.related {
  max-width: var(--article);
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
}
.related h2 {
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  margin-bottom: 0.9rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.7rem;
}
.related-card {
  display: block;
  padding: 0.85rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.related-card:hover {
  border-color: var(--acc-dark);
  transform: translateY(-2px);
}
.related-card .rel-section {
  display: block;
  font-size: 0.7rem;
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--acc);
  margin-bottom: 0.25rem;
}
.related-card .rel-title {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ---- Search dialog ------------------------------------------------------------ */
.search-dialog {
  width: min(40rem, calc(100vw - 2rem));
  margin: 12vh auto auto;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-3), 0 0 0 100vmax rgba(2, 5, 3, 0.7);
  color: var(--text);
  overflow: hidden;
}
.search-dialog::backdrop {
  background: transparent;
}
.search-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.search-head svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: var(--text-mute);
  flex-shrink: 0;
}
#search-input {
  flex: 1;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-family: var(--font-ui);
}
#search-input:focus {
  outline: none;
}
#search-input::placeholder {
  color: var(--text-faint);
}
.search-close {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-mute);
  font-size: 0.7rem;
  font-weight: 650;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}
.search-close:hover {
  color: var(--text);
  border-color: var(--text-mute);
}
.search-results {
  max-height: min(55vh, 26rem);
  overflow-y: auto;
  padding: 0.5rem;
  list-style: none;
  overscroll-behavior: contain;
}
.search-result {
  border-radius: var(--radius-s);
}
.search-result a {
  display: block;
  padding: 0.7rem 0.85rem;
  text-decoration: none;
  border-radius: var(--radius-s);
  border-left: 2px solid transparent;
}
.search-result.active a,
.search-result a:hover {
  background: var(--acc-tint);
  border-left-color: var(--acc);
}
.search-result .res-top {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.search-result .res-title {
  color: var(--text);
  font-weight: 620;
  font-size: 0.95rem;
}
.search-result .res-section {
  font-size: 0.7rem;
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acc);
}
.search-result .res-snippet {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-mute);
  font-size: 0.84rem;
  line-height: 1.55;
}
.search-result mark {
  background: none;
  color: var(--acc-bright);
  font-weight: 650;
}
.search-empty,
.search-hint {
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.search-foot {
  display: flex;
  gap: 1.1rem;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-faint);
}
.search-foot kbd {
  font-family: var(--font-ui);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 0.35rem;
  margin-right: 0.3rem;
  color: var(--text-mute);
}

/* ---- Footer -------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raise);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.75rem 1.25rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.25rem;
}
.footer-brand p {
  color: var(--text-mute);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-top: 0.8rem;
  max-width: 22rem;
}
.footer-brand .brand {
  margin-right: 0;
}
.footer-col h3 {
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  margin-bottom: 0.9rem;
}
.footer-col ul {
  list-style: none;
}
.footer-col a {
  display: inline-block;
  padding: 0.28rem 0;
  color: var(--text-mute);
  font-size: 0.88rem;
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--acc);
}
.footer-verse {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-mute);
  font-size: 0.95rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--border);
}
.footer-verse .ref {
  color: var(--acc);
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 620;
  margin-left: 0.5rem;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ---- Responsive ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .content-wrapper {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: static;
  }
}
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }
  .search-btn .search-label,
  .search-btn kbd {
    display: none;
  }
  .search-btn {
    padding: 0.55rem;
  }
  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    top: var(--header-h);
    background: var(--bg);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    border-bottom: 0;
    z-index: 195;
  }
  .primary-nav.open {
    transform: translateX(0);
  }
  .nav-list {
    flex-direction: column;
    padding: 1rem 1.25rem 3rem;
    gap: 0.15rem;
  }
  .nav-item {
    border-bottom: 1px solid var(--border);
  }
  .nav-link,
  .nav-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 0.95rem 0.5rem;
    font-size: 1rem;
  }
  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: hidden;
    display: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 0.75rem 0.75rem;
    min-width: 0;
  }
  .nav-item.open .dropdown-menu {
    display: block;
    visibility: visible;
    transform: none;
  }
  .content-box p,
  .content-box li {
    font-size: 1rem;
    line-height: 1.8;
  }
  .indent {
    margin-left: 1rem;
  }
  .navigation-arrow {
    flex-direction: column;
    align-items: stretch;
  }
  .next-page,
  .prev-page,
  .parent-page-button {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .search-dialog {
    margin-top: 6vh;
  }
}

/* ---- Print ----------------------------------------------------------------------- */
@media print {
  .site-header,
  .primary-nav,
  .search-dialog,
  .read-progress,
  .navigation-arrow,
  .related,
  .site-footer,
  .sidebar,
  .breadcrumbs,
  .article-meta {
    display: none !important;
  }
  body {
    background: #fff;
    color: #111;
  }
  .content-box {
    border: 0;
    box-shadow: none;
    background: #fff;
  }
  .content-box p,
  .content-box li {
    color: #111;
  }
  a {
    color: #14532d;
  }
}
