/* ==========================================================================
   Manhajiyyah al-Tarbiyyah al-Da'wiyyah — Web-PWA Stylesheet
   Sapphire-Midnight & Warm Amber-Gold Theme (Honoring Dar al-Khalduniyyah Cover)
   Modern CSS: color-scheme + light-dark(), native <dialog>, content-visibility
   ========================================================================== */

:root {
  color-scheme: light dark;

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }

  /* Dynamic Light/Dark Design Tokens */
  --bg-page: light-dark(#f6f4ee, #070e1d);
  --bg-surface: light-dark(#ffffff, #0e1930);
  --bg-surface-alt: light-dark(#eef3fa, #142444);
  --bg-surface-warm: light-dark(#fdf6e9, #1d1b18);
  --bg-glass: light-dark(rgba(255, 255, 255, 0.92), rgba(9, 18, 36, 0.92));

  --text-main: light-dark(#131d2e, #ecf1f9);
  --text-body: light-dark(#243247, #d6e0f0);
  --text-muted: light-dark(#56657c, #90a4c2);

  --brand-primary: light-dark(#164e8c, #4d97eb);
  --brand-deep: light-dark(#0c2d57, #1d5fa7);
  --brand-accent: light-dark(#c96a16, #f59e0b);
  --brand-accent-soft: light-dark(rgba(201, 106, 22, 0.12), rgba(245, 158, 11, 0.16));
  --brand-blue-soft: light-dark(rgba(22, 78, 140, 0.09), rgba(77, 151, 235, 0.15));

  --border-subtle: light-dark(rgba(15, 39, 75, 0.12), rgba(148, 179, 224, 0.16));
  --border-strong: light-dark(rgba(22, 78, 140, 0.28), rgba(77, 151, 235, 0.34));
  --shadow-sm: light-dark(0 2px 10px rgba(10, 25, 50, 0.06), 0 4px 16px rgba(0, 0, 0, 0.35));
  --shadow-md: light-dark(0 10px 28px rgba(10, 25, 50, 0.1), 0 12px 32px rgba(0, 0, 0, 0.5));

  --reader-font-size: 1.08rem;
  --arabic-font-size: 1.48rem;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --topbar-h: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Color-scheme toggle icon visibility (works without JS-only classes) */
.theme-icon-to-light { display: none; }
.theme-icon-to-dark { display: inline-flex; }

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-icon-to-light { display: inline-flex; }
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-icon-to-dark { display: none; }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-icon-to-light { display: inline-flex; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-icon-to-dark { display: none; }

/* Visually hidden helper for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--brand-accent);
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Buttons & Chips */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--brand-primary);
  background: var(--bg-surface-alt);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-primary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(22, 78, 140, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-primary), #2563eb);
  color: #ffffff;
  border-color: transparent;
}

.btn-amber {
  background: linear-gradient(135deg, #c96a16, #e88a25);
  color: #ffffff;
  border-color: transparent;
}

.btn-amber:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
  border-color: transparent;
}

.btn-icon {
  padding: 8px 11px;
  min-width: 38px;
  min-height: 38px;
}

.btn.active {
  background: var(--brand-blue-soft);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Primary Navigation Tabs */
.nav-tabs {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tabs-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-alt);
}

.tab-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(22, 78, 140, 0.25);
}

/* Main Container & Views */
.app-main {
  max-width: 1260px;
  margin: 0 auto;
  padding: 22px 18px 64px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* Hero Banner */
.hero-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, #0b1830 0%, #122c54 55%, #193b6e 100%);
  color: #f4f7fc;
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(245, 158, 11, 0.32);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 15%, rgba(245, 158, 11, 0.22), transparent 46%);
  pointer-events: none;
}

.hero-cover {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(245, 158, 11, 0.55);
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.hero-arabic {
  font-family: 'Amiri', serif;
  font-size: 2.15rem;
  font-weight: 700;
  color: #fbbf24;
  line-height: 1.35;
  margin: 0 0 4px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.25;
  text-wrap: balance;
}

.hero-desc {
  color: #d6e2f5;
  font-size: 0.96rem;
  margin: 0 0 16px;
  max-width: 68ch;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 13px;
  border-radius: 10px;
  font-size: 0.83rem;
  color: #f1f5f9;
}

.stat-pill strong {
  color: #fbbf24;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Dashboard Spotlight Row */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.spotlight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.spotlight-card.warm {
  background: var(--bg-surface-warm);
  border-color: rgba(232, 138, 37, 0.35);
}

.spotlight-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-accent);
  margin-bottom: 8px;
}

/* Chapters Grid */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.section-heading h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.chapter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
}

.chapter-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.chapter-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ch-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  color: var(--brand-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.ch-pages {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.ch-ar {
  font-family: 'Amiri', serif;
  font-size: 1.32rem;
  color: var(--brand-accent);
  direction: rtl;
  text-align: right;
  line-height: 1.4;
}

.ch-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.ch-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.ch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Reader Layout */
.reader-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.reader-sidebar {
  position: sticky;
  top: 120px;
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 4px 6px 10px;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.sidebar-item:hover {
  background: var(--bg-surface-alt);
}

.sidebar-item.active {
  background: var(--brand-blue-soft);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.sidebar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 12px;
}

.sidebar-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 7px 8px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.sidebar-tab-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
}

.sidebar-subtopics-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.subtopic-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 9px;
  border-radius: 10px;
  font-size: 0.81rem;
  color: var(--text-body);
  cursor: pointer;
  line-height: 1.38;
}

.subtopic-link:hover {
  background: var(--bg-surface-alt);
  border-color: var(--border-subtle);
  color: var(--brand-primary);
}

.subtopic-link.active {
  background: var(--brand-blue-soft);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 700;
}

.subtopic-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  margin-top: 1px;
}

.subtopic-link.active .subtopic-num {
  background: var(--brand-primary);
  color: #ffffff;
}

.subtopic-meta {
  display: block;
  margin-top: 3px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-accent);
}

/* Subtopic Focus Control Bar (Minimalkan Skrol Panjang) */
.subtopic-focus-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  overflow: hidden;
}

.focus-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.focus-bar-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-accent);
}

.focus-bar-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
}

.focus-bar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.focus-select {
  flex: 1 1 220px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-alt);
  color: var(--text-heading);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
}

.focus-nav-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager-center-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 10px;
}

/* Reader Toolbar */
.reader-toolbar {
  position: sticky;
  top: 63px;
  z-index: 25;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.mode-switch {
  display: inline-flex;
  background: var(--bg-surface-alt);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.mode-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
}

.jump-input {
  width: 96px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.83rem;
}

/* Chapter Banner Inside Reader */
.chapter-header-card {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-primary));
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.chapter-header-card .ch-ar-lg {
  font-family: 'Amiri', serif;
  font-size: 1.9rem;
  color: #fde68a;
  margin: 0 0 4px;
  direction: rtl;
  text-align: right;
}

.chapter-header-card h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.48rem;
  margin: 0 0 6px;
  line-height: 1.25;
}

.chapter-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: #dbeafe;
  align-items: center;
}

/* Page Reading Cards */
.page-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  scroll-margin-top: 138px;
}

/* Modern Web Guidance: defer-rendering-heavy-content (strictly below the fold) */
.page-card-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 440px;
}

.page-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-surface-alt);
  border-bottom: 1px solid var(--border-subtle);
}

.page-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.page-body {
  padding: 20px 24px;
}

.page-body.bilingual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.malay-col {
  font-size: var(--reader-font-size);
  color: var(--text-body);
  line-height: 1.82;
}

.malay-col h2, .malay-col h3, .malay-col h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--brand-primary);
  margin: 1.2em 0 0.55em;
  line-height: 1.35;
}

.malay-col h2:first-child, .malay-col h3:first-child, .malay-col h4:first-child {
  margin-top: 0;
}

.malay-col p {
  margin: 0 0 1em;
}

.malay-col ul, .malay-col ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.malay-col li {
  margin-bottom: 0.45em;
}

.malay-col blockquote {
  margin: 1.1em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--brand-accent);
  background: var(--bg-surface-warm);
  border-radius: 0 12px 12px 0;
}

.malay-col .ar-inline-block {
  font-family: 'Amiri', serif;
  font-size: calc(var(--reader-font-size) * 1.35);
  direction: rtl;
  text-align: right;
  line-height: 2;
  color: var(--text-main);
  font-style: normal;
  display: block;
  margin-bottom: 6px;
}

.malay-col .poetry-pair {
  background: var(--bg-surface-alt);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0;
  border-right: 4px solid var(--brand-primary);
}

.malay-col .poetry-ar {
  font-family: 'Amiri', serif;
  font-size: calc(var(--reader-font-size) * 1.32);
  font-weight: 700;
  direction: rtl;
  text-align: center;
  color: var(--text-main);
  line-height: 1.9;
}

.malay-col .poetry-ms {
  font-style: italic;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.94em;
  margin-top: 4px;
}

.malay-col table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}

.malay-col th, .malay-col td {
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  text-align: left;
}

.malay-col th {
  background: var(--bg-surface-alt);
  font-weight: 700;
}

.mermaid-fallback-box {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
}

.mermaid-fallback-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.mermaid-flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mermaid-step-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 600;
}

/* Arabic Column */
.arabic-col {
  font-family: 'Amiri', serif;
  font-size: var(--arabic-font-size);
  direction: rtl;
  text-align: right;
  line-height: 2.15;
  color: var(--text-main);
  padding: 16px 20px;
  background: var(--bg-surface-warm);
  border-radius: 12px;
  border: 1px solid rgba(232, 138, 37, 0.25);
}

.arabic-col-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-accent);
  direction: ltr;
  text-align: left;
  margin-bottom: 10px;
}

.arabic-col p {
  margin: 0 0 0.85em;
}

.arabic-col h3, .arabic-col h4 {
  color: var(--brand-primary);
  margin: 0.8em 0 0.5em;
  font-size: 1.12em;
}

/* Inline Footnote Reference Pill & Box */
.fn-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72em;
  font-weight: 700;
  vertical-align: super;
  padding: 1px 6px;
  margin: 0 2px;
  border-radius: 999px;
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  border: 1px solid rgba(232, 138, 37, 0.35);
  cursor: pointer;
}

.fn-box {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-surface-alt);
  border-radius: 10px;
  border-left: 3px solid var(--brand-primary);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.fn-box-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.fn-item {
  margin-bottom: 5px;
  line-height: 1.55;
}

.fn-item:last-child {
  margin-bottom: 0;
}

/* Chapter Bottom Prev/Next Navigation */
.chapter-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Quotes & Search Views */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
}

.search-input-lg {
  flex: 1;
  min-width: 240px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.96rem;
  font-family: inherit;
}

.search-input-lg:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px var(--brand-accent-soft);
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.chip.active, .chip:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.quote-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-theme {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.quote-ar {
  font-family: 'Amiri', serif;
  font-size: 1.32rem;
  direction: rtl;
  text-align: right;
  color: var(--brand-primary);
  line-height: 1.85;
}

.quote-ms {
  font-size: 0.96rem;
  color: var(--text-body);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.quote-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.search-result-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

mark {
  background: rgba(245, 158, 11, 0.35);
  color: inherit;
  padding: 0 3px;
  border-radius: 4px;
}

/* Native <dialog> Styling (Modern Web Guidance compliant!) */
dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-main);
  max-width: min(680px, 92vw);
  max-height: 85dvh;
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(5, 12, 26, 0.68);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-alt);
}

.dialog-head h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.12rem;
  margin: 0;
  color: var(--brand-primary);
}

.dialog-body {
  padding: 20px;
  overflow-y: auto;
  line-height: 1.75;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  opacity: 0;
  visibility: hidden;
  background: #0c2d57;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 90;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Back-to-top FAB */
.fab-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 35;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fab-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .reader-layout {
    grid-template-columns: 1fr;
  }
  .reader-sidebar {
    position: static;
    max-height: none;
    display: none;
  }
  .reader-sidebar.mobile-open {
    display: block;
    margin-bottom: 14px;
  }
  .page-body.bilingual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px;
  }
  .hero-cover {
    max-width: 175px;
    margin: 0 auto;
  }
  .hero-stats, .hero-actions {
    justify-content: center;
  }
  .page-body {
    padding: 16px;
  }
  .brand-sub {
    display: none;
  }
}


/* ==========================================================================
   Infografik Aliran, Ringkasan 14 Bahagian & Modul Gagasan PBI (UF / KN / PBI)
   ========================================================================== */

.info-module {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.info-mod-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.info-num {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.96rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(232, 138, 37, 0.35);
}

.info-mod-head h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0 0 2px;
  color: var(--text-main);
}

.info-ar {
  font-family: 'Amiri', serif;
  font-size: 1.24rem;
  color: var(--brand-primary);
  line-height: 1.4;
}

.info-ref {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  color: var(--brand-primary);
  white-space: nowrap;
}

.info-intro {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.info-grid {
  display: grid;
  gap: 12px;
}

.info-grid.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.info-grid.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.info-grid.grid-4, .info-grid.flow-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.info-grid.grid-5 { grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); }

.info-item {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 15px;
  position: relative;
}

.info-item-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--brand-accent);
  margin-bottom: 4px;
}

.info-item-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 5px;
  line-height: 1.3;
}

.info-item-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.55;
}

.info-callout {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-surface-warm);
  border: 1px solid rgba(232, 138, 37, 0.32);
  font-size: 0.88rem;
  color: var(--text-body);
}

/* Ringkasan 14 Bahagian Cards */
.ringkasan-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.ringkasan-sub-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.subtopic-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-alt);
  color: var(--text-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.subtopic-pill-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Gagasan PBI Architecture */
.pbi-stage {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.pbi-stage-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--brand-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pbi-bridge-arrow {
  text-align: center;
  margin: 10px 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--brand-primary);
}

.pbi-hero-bridge {
  background: linear-gradient(135deg, #0b1830 0%, #15376a 100%);
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  border: 1.5px solid rgba(245, 158, 11, 0.45);
}

.pbi-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.pbi-pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.pbi-pillar-card.code-UF { border-top-color: #10b981; }
.pbi-pillar-card.code-KN { border-top-color: #f59e0b; }
.pbi-pillar-card.code-PBI { border-top-color: #3b82f6; }

.pbi-point-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-surface-alt);
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.pbi-point-item:last-child { margin-bottom: 0; }

.pbi-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.pbi-matrix-table th, .pbi-matrix-table td {
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.pbi-matrix-table th {
  background: var(--bg-surface-alt);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--brand-primary);
}

.pbi-matrix-table tr[data-pbi-jump] {
  cursor: pointer;
}

.pbi-matrix-table tr[data-pbi-jump]:hover {
  background: var(--brand-blue-soft);
}

@media print {
  .topbar, .nav-tabs, .fab-top, .toast { display: none !important; }
  body { background: #ffffff; color: #000000; }
  .info-module { break-inside: avoid; box-shadow: none; }
}


/* Enhanced Arabic Manuscript Typography Blocks */
.arabic-col .ar-quote-block {
  margin: 0.7em 0;
  padding: 10px 14px;
  border-right: 3.5px solid var(--brand-accent);
  background: var(--bg-surface);
  border-radius: 10px 0 0 10px;
}

.arabic-col .ar-bullet-p {
  padding-right: 10px;
}

.arabic-col .ar-fn-heading {
  font-size: 0.86em;
  font-weight: 700;
  color: var(--brand-accent);
  margin: 1.1em 0 0.35em;
  padding-top: 0.7em;
  border-top: 1px dashed var(--border-strong);
}

.arabic-col .ar-fn-line {
  font-size: 0.82em;
  line-height: 1.85;
  color: var(--text-muted);
  margin: 0 0 0.35em;
}

/* ==========================================================================
   Unified Eye-Catching Chapter Opener Crest (Malay & Arabic RTL)
   ========================================================================== */
.ch-opener-crest {
  position: relative;
  text-align: center;
  padding: 20px 18px 18px;
  margin: 0 0 22px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--brand-blue-soft), var(--bg-surface-alt));
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.ch-opener-crest::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(217, 155, 38, 0.16), transparent 68%);
  pointer-events: none;
}

.ch-crest-medallion {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin: 4px auto 12px;
}

.ch-crest-medallion::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 9px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--brand-primary), #1e4d8c);
  border: 2px solid var(--brand-accent);
  box-shadow: 0 6px 16px rgba(12, 45, 87, 0.28), 0 0 0 4px rgba(217, 155, 38, 0.14);
}

.ch-crest-num {
  position: relative;
  z-index: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff7e0;
  line-height: 1;
}

.ch-opener-crest.is-arabic .ch-crest-num {
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.ch-crest-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 4px;
}

.ch-opener-crest.is-arabic .ch-crest-eyebrow {
  font-family: 'Amiri', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 6px;
}

.ch-crest-title {
  margin: 0 !important;
  font-family: 'Outfit', sans-serif;
  font-size: 1.32rem !important;
  font-weight: 800 !important;
  color: var(--text-heading) !important;
  line-height: 1.3 !important;
  border: none !important;
  padding: 0 !important;
}

.ch-opener-crest.is-arabic .ch-crest-title {
  font-family: 'Amiri', serif !important;
  font-size: calc(var(--arabic-font-size) * 1.3) !important;
  font-weight: 700 !important;
  line-height: 1.65 !important;
  color: var(--text-heading) !important;
}

.ch-crest-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px auto 0;
  max-width: 210px;
  color: var(--brand-accent);
  font-size: 0.78rem;
  line-height: 1;
}

.ch-crest-divider::before,
.ch-crest-divider::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
}

/* Hero Cover Clickable Trigger & Epigraph */
.hero-cover-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.hero-cover-btn:hover .hero-cover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.hero-cover-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fde68a;
  background: rgba(217, 155, 38, 0.16);
  border: 1px solid rgba(245, 193, 92, 0.38);
}

.hero-epigraph {
  margin: -2px 0 8px;
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.01em;
}

/* Cover Philosophy & Epigraph Dialog Layout */
.phil-covers-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.phil-cover-card {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.phil-cover-card img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 6px;
}

.phil-cover-cap {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.phil-epigraph-box {
  text-align: center;
  padding: 16px 18px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand-blue-soft), var(--bg-surface-alt));
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--brand-accent);
}

.phil-epigraph-ar {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin: 0 0 4px;
  line-height: 1.6;
}

.phil-epigraph-ms {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-body);
  margin: 0 0 12px;
}

.phil-triad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  text-align: left;
}

.phil-triad-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.8rem;
  line-height: 1.48;
  color: var(--text-body);
}

.phil-triad-ar {
  font-family: 'Amiri', serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 2px;
}

.phil-symbol-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
}

.phil-symbol-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  line-height: 1.5;
}

.phil-swatch {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {
  .phil-triad { grid-template-columns: 1fr; }
  .phil-covers-row { grid-template-columns: 1fr; }
}

/* Subtle App Footer Credit */
.app-footer {
  margin-top: 40px;
  padding: 20px 18px 28px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  text-align: center;
}

.app-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-epigraph {
  font-family: 'Amiri', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-accent);
}

.footer-credit {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-credit strong {
  color: var(--brand-primary);
  font-weight: 700;
}

.footer-sep {
  opacity: 0.5;
}
