
:root {
  --navy: #2d628c;
  --navy-2: #00263f;
  --teal-deep: #013842;
  --ink: #0a1a28;
  --ink-soft: rgba(10, 26, 40, 0.74);
  --ink-faint: rgba(10, 26, 40, 0.48);
  --paper: #ffffff;
  --mist: #f5f1ea;
  --line: rgba(45, 98, 140, 0.16);
  --line-2: rgba(45, 98, 140, 0.34);
  --gold: #c99a4a;
  --terra: #b15c3e;
  --olive: #6f8665;
  --indigo: #405e86;


  --f-head: "Century Gothic", "Jost", "Questrial", system-ui, sans-serif;
  --f-mark: "Josefin Sans", "Century Gothic", "Jost", sans-serif;
  --f-body: "Century Gothic", "URW Gothic", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --t-state: 160ms;
  --t-reveal: 240ms;

  --pad: clamp(18px, 6vw, 110px);
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;

  background-image:
    radial-gradient(120% 70% at 100% -10%, rgba(201, 154, 74, 0.10) 0%, rgba(201, 154, 74, 0) 62%),
    radial-gradient(90% 60% at 0% 100%, rgba(45, 98, 140, 0.07) 0%, rgba(45, 98, 140, 0) 60%);
  background-attachment: fixed;
}

a { color: var(--navy); text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.doc-foot a, .doc-toc a { min-height: 44px; }
img { max-width: 100%; height: auto; display: block; }



.khatam-orb {
  position: absolute;


  top: 0;
  left: 46%;
  width: 54%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
@media (max-width: 1199px) { .khatam-orb { display: none; } }
@media (prefers-reduced-motion: reduce) { .khatam-orb { display: none; } }
@media (max-width: 1199px) { .khatam-orb { display: none; } }
@media (prefers-reduced-motion: reduce) { .khatam-orb { display: none; } }


.doc-head {
  position: sticky;
  top: 0;
  z-index: 40;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.85rem var(--pad) 0.9rem;
  background: rgba(245, 241, 234, 0.88);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
          backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--line);
}
.doc-head__mark img { width: clamp(160px, 20vw, 232px); }
.doc-head__back {
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-2);
  white-space: nowrap;
  position: relative;
  padding-bottom: 0.3rem;
}
.doc-head__back::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right var(--t-reveal) var(--ease);
}
.doc-head__back:hover::after { right: 0; }


.doc-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7.5rem) var(--pad) clamp(2.4rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.doc-hero__in > * { position: relative; z-index: 1; }
.doc-hero__in { max-width: 1440px; margin: 0 auto; }
.doc-eyebrow {
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;

  color: var(--navy);
  margin: 0 0 1.1rem;
}
.doc-title {
  font-family: var(--f-head);
  font-weight: 200;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy-2);
  margin: 0;
  max-width: 20ch;
}
.doc-lede {
  margin: clamp(1.4rem, 3vw, 2.2rem) 0 0;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.62;
  color: var(--navy);
  max-width: 56ch;
}
.doc-meta {
  margin: 2.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.6rem;
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.doc-meta b { color: var(--navy-2); font-weight: 600; }


.doc-body {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  padding: clamp(2.8rem, 6vw, 5rem) var(--pad) clamp(4rem, 9vw, 8rem);
  max-width: 1440px;
  margin: 0 auto;
}
.doc-toc { position: sticky; top: 6.5rem; align-self: start; }
.doc-toc__label {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.doc-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.doc-toc li { counter-increment: toc; margin-bottom: 0.55rem; }
.doc-toc a {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-soft);
  transition: color var(--t-reveal) var(--ease);
}
.doc-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  padding-top: 0.28rem;
  transition: color var(--t-reveal) var(--ease);
}
.doc-toc a:hover, .doc-toc a:hover::before,
.doc-toc a.is-here, .doc-toc a.is-here::before { color: var(--terra); }

.doc-prose { max-width: var(--measure); }
.doc-prose > section { padding-top: 0.5rem; margin-bottom: clamp(2.6rem, 5vw, 4rem); }
.doc-prose > section + section { border-top: 1px solid var(--line); padding-top: clamp(2.2rem, 4vw, 3.2rem); }

.doc-prose h2 {
  font-family: var(--f-head);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.22;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy-2);
  margin: 0 0 1.1rem;
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  align-items: baseline;
}

.doc-prose h2 .n {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.doc-prose h3 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 2rem 0 0.7rem;
}
.doc-prose p { margin: 0 0 1.15rem; }
.doc-prose p:last-child { margin-bottom: 0; }
.doc-prose ul, .doc-prose ol { margin: 0 0 1.3rem; padding-left: 0; list-style: none; }
.doc-prose li { position: relative; padding-left: 1.6rem; margin-bottom: 0.65rem; }
.doc-prose ul > li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.78em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.doc-prose ol { counter-reset: li; }
.doc-prose ol > li { counter-increment: li; }
.doc-prose ol > li::before {
  content: counter(li) ".";
  position: absolute;
  left: 0;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.doc-prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--navy) 40%, transparent);
  transition: color var(--t-state) var(--ease), text-decoration-color var(--t-state) var(--ease);
}
.doc-prose a:hover { color: var(--terra); text-decoration-color: var(--terra); }
.doc-prose strong { font-weight: 700; color: var(--navy-2); }


.doc-note {
  margin: 0 0 1.6rem;
  padding: 1.2rem 0 0;
  background: transparent;
  border-top: 1px solid var(--line-2);
  border-radius: 0;
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--ink-soft);
}
.doc-note--warn { border-top-color: var(--terra); }
.doc-note p:last-child { margin-bottom: 0; }
.doc-note__label {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  display: block;
  margin-bottom: 0.5rem;
}
.doc-note--warn .doc-note__label { color: var(--terra); }


.doc-defs { border-top: 1px solid var(--line); margin: 0 0 1.5rem; }
.doc-def {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) 1fr;
  gap: 0.4rem 1.8rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.doc-def dt {
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-2);
  padding-top: 0.25rem;
}
.doc-def dd { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--ink-soft); }


.doc-close {
  background: var(--navy-2);
  color: rgba(255, 255, 255, 0.85);
  padding: clamp(3rem, 7vw, 5.5rem) var(--pad);
}
.doc-close__in {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.doc-close h2 {
  font-family: var(--f-head);
  font-weight: 200;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.9rem;
}
.doc-close p { margin: 0 0 0.6rem; font-size: 0.95rem; line-height: 1.7; }
.doc-close a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.doc-close__brand img { width: clamp(180px, 18vw, 260px); margin-bottom: 1.4rem; }
.doc-close__strap {
  font-family: var(--f-head);
  font-size: 0.9rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.66);
  margin: 0;
}
.doc-close__label {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.8rem;
}


.doc-foot {
  padding: 1.8rem var(--pad) 2.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.doc-foot nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; }
.doc-foot a {
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.doc-foot a:hover { color: var(--terra); }

@media (max-width: 900px) {
  .doc-body { grid-template-columns: 1fr; }
  .doc-toc { position: static; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
  .doc-toc ol { columns: 2; column-gap: 2rem; }
  .doc-def { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .doc-toc ol { columns: 1; }
  .doc-prose h2 { grid-template-columns: 2.4rem 1fr; }
}
