/* =========================================================
   SAKINAH — design tokens
   Palette: aged parchment + manuscript teal + brass + rubric red
   Type: Frank Ruhl Libre (display) · Work Sans (body/ui)
         Amiri (Arabic) · IBM Plex Mono (labels/numerals)
   ========================================================= */

:root {
  --paper:       #F3E9D2;
  --paper-light: #FBF5E7;
  --ink:         #241F16;
  --ink-soft:    #5B5040;
  --teal:        #17423C;
  --teal-deep:   #0E2E29;
  --brass:       #A5793A;
  --brass-soft:  #C7A26B;
  --rubric:      #7C2E28;

  --serif:  'Frank Ruhl Libre', Georgia, 'Times New Roman', serif;
  --sans:   'Work Sans', -apple-system, Segoe UI, sans-serif;
  --arabic: 'Amiri', 'Traditional Arabic', serif;
  --mono:   'IBM Plex Mono', ui-monospace, monospace;

  --container: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--rubric);
  outline-offset: 3px;
}

/* ---------- corner ornaments (manuscript frame) ---------- */

.corner {
  position: fixed;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.55;
}
.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background: var(--brass);
}
.corner::before { width: 100%; height: 1.5px; }
.corner::after   { width: 1.5px; height: 100%; }

.corner--tl { top: 22px; left: 22px; }
.corner--tl::before { top: 0; left: 0; }
.corner--tl::after  { top: 0; left: 0; }

.corner--tr { top: 22px; right: 22px; }
.corner--tr::before { top: 0; right: 0; }
.corner--tr::after  { top: 0; right: 0; }

.corner--bl { bottom: 22px; left: 22px; }
.corner--bl::before { bottom: 0; left: 0; }
.corner--bl::after  { bottom: 0; left: 0; }

.corner--br { bottom: 22px; right: 22px; }
.corner--br::before { bottom: 0; right: 0; }
.corner--br::after  { bottom: 0; right: 0; }

@media (max-width: 560px) {
  .corner { display: none; }
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 64px;
  position: relative;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 40px;
}

.ayat {
  font-family: var(--arabic);
  font-size: clamp(22px, 4vw, 32px);
  color: var(--teal-deep);
  margin: 0 0 14px;
  max-width: 640px;
  line-height: 2;
}

.ayat-terj {
  font-family: var(--sans);
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 460px;
  margin: 0 0 48px;
}

.title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(64px, 14vw, 148px);
  letter-spacing: 0.04em;
  color: var(--teal);
  margin: 0;
  line-height: 0.95;
}

.subtitle {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(16px, 2.4vw, 21px);
  color: var(--ink);
  margin: 28px 0 0;
  max-width: 480px;
}

.meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--brass);
  margin: 22px 0 44px;
  text-transform: uppercase;
}

.cta-row {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary,
.btn-ghost {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 2px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--teal);
  color: var(--paper-light);
}
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn-primary svg { transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--brass-soft);
}
.btn-ghost:hover { border-color: var(--rubric); color: var(--rubric); }

/* decorative page-edge stack, signature element */
.book-mark {
  display: flex;
  gap: 3px;
  margin-top: 72px;
  align-items: flex-end;
  height: 20px;
}
.book-mark span {
  width: 5px;
  background: var(--brass-soft);
  opacity: 0.7;
}
.book-mark span:nth-child(1) { height: 10px; }
.book-mark span:nth-child(2) { height: 16px; }
.book-mark span:nth-child(3) { height: 20px; background: var(--rubric); opacity: 0.85; }
.book-mark span:nth-child(4) { height: 16px; }
.book-mark span:nth-child(5) { height: 10px; }

/* ---------- daftar isi ---------- */

.toc {
  max-width: var(--container);
  margin: 0 auto;
  padding: 96px 24px 64px;
  border-top: 1px solid var(--brass-soft);
}

.eyebrow--center { text-align: center; }

.toc-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 4vw, 34px);
  text-align: center;
  color: var(--teal);
  margin: 0 0 56px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-row { border-top: 1px solid rgba(165, 121, 58, 0.35); }
.toc-row:last-child { border-bottom: 1px solid rgba(165, 121, 58, 0.35); }

.toc-row a {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 8px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease, padding-left 0.2s ease;
}

.toc-row a:hover {
  background: rgba(165, 121, 58, 0.08);
  padding-left: 18px;
}

.toc-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--brass);
  min-width: 32px;
}

.toc-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.toc-name {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--teal-deep);
}

.toc-desc {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-soft);
}

.toc-arrow {
  font-family: var(--mono);
  color: var(--rubric);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toc-row a:hover .toc-arrow {
  opacity: 1;
  transform: translateX(0);
}

.toc-extra {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-extra-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 8px;
  text-decoration: none;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-top: 1px dashed rgba(165, 121, 58, 0.4);
  transition: color 0.2s ease;
}
.toc-extra-item:last-child { border-bottom: 1px dashed rgba(165, 121, 58, 0.4); }
.toc-extra-item:hover { color: var(--rubric); }

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  padding: 40px 24px 56px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .hero { padding: 80px 20px 48px; }
  .toc { padding: 64px 20px 48px; }
  .toc-row a { gap: 14px; }
  .toc-desc { display: none; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* =========================================================
   Content pages (Bagian 1–7)
   ========================================================= */

.page-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 233, 210, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(165, 121, 58, 0.35);
}
.page-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.page-nav__brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.page-nav__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  white-space: nowrap;
  text-align: center;
  flex: 1;
}
.page-nav__toc {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.page-nav__toc:hover { color: var(--rubric); }

@media (max-width: 480px) {
  .page-nav__inner { padding: 12px 14px; gap: 8px; }
  .page-nav__brand { font-size: 14px; }
  .page-nav__meta { font-size: 9.5px; letter-spacing: 0.06em; }
  .page-nav__toc { font-size: 11.5px; }
}

.content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
}
.section-header__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--brass-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
}
.section-header__num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brass);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.section-header__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 42px);
  color: var(--teal-deep);
  margin: 0;
  line-height: 1.1;
}

.block-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 16px;
}

.tujuan-list {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tujuan-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
}
.tujuan-list li::before {
  content: "◆";
  color: var(--brass);
  font-size: 9px;
  margin-top: 7px;
}

.materi h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  color: var(--teal);
  margin: 40px 0 14px;
}
.materi h3:first-child { margin-top: 0; }
.materi p { margin: 0 0 16px; font-size: 15.5px; }
.materi ul { margin: 0 0 16px; padding-left: 20px; }
.materi li { margin-bottom: 8px; font-size: 15px; }

.dalil-box {
  background: var(--teal);
  color: var(--paper-light);
  border-radius: 2px;
  padding: 32px 28px;
  margin: 24px 0;
}
.dalil-box__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-soft);
  margin: 0 0 16px;
}
.dalil-box__ar {
  font-family: var(--arabic);
  font-size: clamp(20px, 3vw, 26px);
  line-height: 2;
  margin: 0 0 14px;
  text-align: right;
}
.dalil-box__terj {
  font-style: italic;
  font-size: 14px;
  color: var(--paper);
  margin: 0 0 8px;
  line-height: 1.7;
}
.dalil-box__sumber {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass-soft);
}

.kasus-box {
  border-left: 3px solid var(--rubric);
  background: rgba(124, 46, 40, 0.05);
  padding: 24px 28px;
  margin: 32px 0;
}
.kasus-box__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rubric);
  margin: 0 0 12px;
}
.kasus-box p { margin: 0 0 14px; font-size: 15px; }
.kasus-box ol { margin: 0; padding-left: 20px; }
.kasus-box li { margin-bottom: 8px; font-size: 14.5px; }

.video-block {
  border: 1.5px dashed var(--brass-soft);
  border-radius: 2px;
  padding: 28px;
  margin: 32px 0;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.video-block__thumb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  flex-shrink: 0;
}
.video-block__text { flex: 1; min-width: 200px; }
.video-block__title {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--teal-deep);
  margin: 0 0 6px;
}
.video-block__note { font-size: 13px; color: var(--ink-soft); margin: 0; }
.video-block__qr {
  width: 64px;
  height: 64px;
  border: 1px solid var(--brass-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-soft);
  text-align: center;
  flex-shrink: 0;
  line-height: 1.3;
}

.rangkuman {
  background: var(--paper-light);
  border: 1px solid rgba(165, 121, 58, 0.3);
  padding: 28px;
  margin: 40px 0;
}
.rangkuman__list { margin: 0; padding-left: 20px; }
.rangkuman__list li { margin-bottom: 10px; font-size: 14.5px; }

/* ---------- quiz ---------- */

.quiz { margin-top: 16px; display: flex; flex-direction: column; gap: 28px; }
.quiz-question { border-top: 1px solid rgba(165, 121, 58, 0.35); padding-top: 24px; }
.quiz-question__text {
  font-family: var(--serif);
  font-size: 16.5px;
  color: var(--ink);
  margin: 0 0 16px;
}
.quiz-options { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex;
  width: 100%;
  text-align: left;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
  padding: 12px 14px;
  background: var(--paper-light);
  border: 1px solid rgba(165, 121, 58, 0.4);
  border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.quiz-option::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid var(--brass-soft);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.quiz-option:hover { background: rgba(165, 121, 58, 0.08); }
.quiz-option.is-selected { border-color: var(--teal); }
.quiz-option.is-selected::before { border-color: var(--teal); background: var(--teal); }
.quiz-option.is-correct { border-color: #3E6B4A; background: rgba(62, 107, 74, 0.1); }
.quiz-option.is-correct::before { border-color: #3E6B4A; background: #3E6B4A; }
.quiz-option.is-wrong { border-color: var(--rubric); background: rgba(124, 46, 40, 0.08); }
.quiz-option.is-wrong::before { border-color: var(--rubric); background: var(--rubric); }

.quiz-check {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  background: var(--teal);
  color: var(--paper-light);
  border: none;
  padding: 10px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.quiz-check:hover { background: var(--teal-deep); }

.quiz-explanation {
  display: none;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--paper);
  border-left: 3px solid var(--brass);
  font-size: 13.5px;
  color: var(--ink-soft);
}
.quiz-explanation.is-visible { display: block; }

/* ---------- footer nav ---------- */

.page-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 64px auto 0;
  max-width: var(--container);
  padding: 32px 24px 56px;
  border-top: 1px solid var(--brass-soft);
  flex-wrap: wrap;
}
.page-footer-nav a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-footer-nav a:hover { color: var(--rubric); }
.page-footer-nav .is-disabled { color: var(--ink-soft); opacity: 0.4; pointer-events: none; }
.page-footer-nav__center { font-family: var(--mono); font-size: 12px; color: var(--brass); }

@media (max-width: 640px) {
  .content { padding: 40px 20px 24px; }
  .section-header { gap: 14px; }
  .video-block { padding: 20px; }
}

/* =========================================================
   Flipbook reader (buku.html)
   ========================================================= */

.reader-body { overflow-x: hidden; }

.reader {
  min-height: calc(100svh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 12px 16px;
  gap: 14px;
}

.reader__loading {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  max-width: 420px;
}

.reader__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
}

.flipbook {
  width: 100%;
  max-width: 760px;
  box-shadow: 0 18px 44px rgba(36, 31, 22, 0.22);
}

.reader__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  background: rgba(251, 245, 231, 0.88);
  backdrop-filter: blur(2px);
  border: 1px solid var(--brass-soft);
  color: var(--teal);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(36, 31, 22, 0.15);
  transition: background 0.2s ease, color 0.2s ease;
}
.reader__arrow:hover { background: var(--teal); color: var(--paper-light); }
.reader__arrow--prev { left: 2px; }
.reader__arrow--next { right: 2px; }

.reader__bagian {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  margin-bottom: -6px;
}

.reader__counter {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0.06em;
}

@media (max-width: 640px) {
  .reader { padding: 10px 4px 10px; gap: 6px; }
  .reader__arrow { width: 30px; height: 30px; font-size: 12px; }
  .reader__arrow--prev { left: 0; }
  .reader__arrow--next { right: 0; }
}

/* ---------- leaf (single flipbook page) ---------- */

.page {
  background: var(--paper-light);
  overflow: hidden;
}

.leaf {
  height: 100%;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.leaf-runner {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 18px;
  display: block;
}
.leaf-runner--on-dark { color: var(--brass-soft); }

.leaf-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 10px;
}
.leaf-label--on-dark { color: var(--brass-soft); }
.leaf-label--rubric { color: var(--rubric); }

.leaf-heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--teal-deep);
  margin: 0 0 14px;
  line-height: 1.25;
}
.leaf-heading--center { text-align: center; }

.leaf-text {
  font-size: 12.5px;
  line-height: 1.65;
  margin: 0 0 12px;
  color: var(--ink);
}
.leaf-text--small { font-size: 11.5px; color: var(--ink-soft); }
.leaf-text--bold { font-weight: 600; }
.leaf-text--center { text-align: center; }

.leaf-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.6;
}
.leaf-list li { margin-bottom: 8px; }
.leaf-list--ol { padding-left: 18px; }

/* opener leaf */
.leaf--opener {
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}
.leaf-opener__icon { color: var(--brass); margin-bottom: 14px; }
.leaf-opener__title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 32px;
  line-height: 1.05;
  color: var(--teal);
  margin: 0 0 28px;
}
.leaf-tujuan {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11.5px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.leaf-tujuan li { padding-left: 14px; position: relative; }
.leaf-tujuan li::before {
  content: "\25C6";
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--brass);
  font-size: 7px;
}

/* dalil leaf */
.leaf--dalil {
  background: var(--teal);
  color: var(--paper-light);
  justify-content: center;
}
.leaf--dalil .leaf-ar {
  font-family: var(--arabic);
  font-size: 17px;
  line-height: 2;
  text-align: right;
  margin: 0 0 16px;
}
.leaf--dalil .leaf-terj {
  font-style: italic;
  font-size: 12px;
  line-height: 1.7;
  color: var(--paper);
  margin: 0 0 14px;
}
.leaf--dalil .leaf-sumber {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--brass-soft);
}

/* kasus leaf */
.leaf--kasus { border-left: 4px solid var(--rubric); }

/* video leaf */
.leaf--center {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.leaf-video__icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  text-decoration: none;
}
.leaf-video__embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* rasio 16:9 */
  margin: 8px 0 6px;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}
.leaf-video__embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.leaf-qr {
  margin-top: 20px;
  width: 56px; height: 56px;
  border: 1px solid var(--brass-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 8px; line-height: 1.3;
  color: var(--ink-soft); text-align: center;
}

/* rangkuman leaf */
.leaf--rangkuman { background: var(--paper); }

/* soal leaf */
.leaf--soal { justify-content: flex-start; }
.quiz-question__text--leaf { font-size: 14px; margin-bottom: 12px; }
.quiz-options--leaf { gap: 6px; margin-bottom: 12px; }
.quiz-options--leaf .quiz-option { font-size: 11.5px; padding: 8px 10px; }
.quiz-options--leaf .quiz-option::before { width: 11px; height: 11px; }
.leaf--soal .quiz-check { font-size: 11.5px; padding: 8px 16px; }
.leaf--soal .quiz-explanation { font-size: 11px; padding: 10px 12px; }

.leaf-next-link {
  margin-top: 20px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--teal);
  text-decoration: none;
}
.leaf-next-link:hover { color: var(--rubric); }

/* ---------- glossary leaf ---------- */

.leaf-glossary {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.leaf-glossary dt {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--teal-deep);
  margin-top: 14px;
}
.leaf-glossary dt:first-child { margin-top: 0; }
.leaf-glossary dd {
  margin: 3px 0 0;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(165, 121, 58, 0.3);
}

/* =========================================================
   Site chrome: header, drawer, help modal, bottom-nav
   Palet khusus komponen ini sesuai referensi: hijau tua + emas + krem
   Font khusus komponen ini: Poppins (UI) + Playfair Display (judul)
   ========================================================= */

:root {
  --nav-green: #16594A;
  --nav-green-deep: #0F4038;
  --nav-gold: #C99A3D;
  --nav-cream: #FBF7EE;
  --nav-ui: 'Poppins', var(--sans);
  --nav-display: 'Playfair Display', var(--serif);
}

/* ---------- site header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-green);
  box-shadow: 0 2px 10px rgba(15, 64, 56, 0.25);
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-header__brand {
  font-family: var(--nav-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.03em;
  color: var(--nav-gold);
  text-decoration: none;
}
.site-header__icon-btn {
  background: transparent;
  border: none;
  color: var(--nav-cream);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.site-header__icon-btn:hover { background: rgba(251, 247, 238, 0.14); }

/* ---------- drawer ---------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 26, 0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 82vw);
  background: var(--nav-cream);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(15, 30, 26, 0.2);
}
.drawer.is-open { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(22, 89, 74, 0.15);
}
.drawer__title {
  font-family: var(--nav-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--nav-green);
}
.drawer__close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--nav-green);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.drawer__close:hover { background: rgba(22, 89, 74, 0.08); }

.drawer__cover-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  font-family: var(--nav-ui);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--nav-green);
  text-decoration: none;
  border-bottom: 1px solid rgba(22, 89, 74, 0.15);
}
.drawer__cover-link:hover { background: rgba(201, 154, 61, 0.1); }

.drawer__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.drawer__list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-family: var(--nav-ui);
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
}
.drawer__list a:hover { background: rgba(201, 154, 61, 0.12); }
.drawer__num {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--nav-gold);
  font-weight: 600;
  min-width: 20px;
}

.drawer__extra {
  margin-top: auto;
  border-top: 1px solid rgba(22, 89, 74, 0.15);
  display: flex;
  flex-direction: column;
}
.drawer__extra a {
  padding: 14px 18px;
  font-family: var(--nav-ui);
  font-weight: 500;
  font-size: 13px;
  color: var(--nav-green);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.drawer__extra a:hover { background: rgba(201, 154, 61, 0.1); }

/* ---------- help modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 26, 0.55);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.help-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(420px, 88vw);
  max-height: 80vh;
  overflow-y: auto;
  background: var(--nav-cream);
  border-radius: 6px;
  z-index: 301;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 24px 60px rgba(15, 30, 26, 0.35);
}
.help-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.help-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(22, 89, 74, 0.15);
}
.help-modal__title {
  font-family: var(--nav-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--nav-green);
}

.help-modal__list {
  list-style: none;
  margin: 0;
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--nav-ui);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}
.help-modal__list strong { color: var(--nav-green); }

/* ---------- bottom nav (mobile only) ---------- */

.bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: var(--nav-green);
    box-shadow: 0 -2px 10px rgba(15, 64, 56, 0.25);
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--nav-cream);
    font-family: var(--nav-ui);
    font-size: 9.5px;
    font-weight: 500;
    padding: 6px 2px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
  }
  .bottom-nav__item:hover { color: var(--nav-gold); }
  .bottom-nav__item.is-disabled { opacity: 0.4; pointer-events: none; }

  body { padding-bottom: 62px; }
  .reader { min-height: calc(100svh - 60px - 62px); }
}