@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Manrope:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #eae3d6;
  --surface: #f3ecdf;
  --bg-dark: #171a20;
  --accent: #c7a06b;
  --text: #232019;
  --text-muted: #7a7267;
  --white: #ffffff;
  --radius: 8px;
  --layout-max: 1040px;
  --sparkle-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='380'%3E%3Cg fill='%23C7A06B'%3E%3Cpath opacity='0.38' transform='translate(24,34) scale(1.3)' d='M22.2631 10.7433V11.519C16.3389 11.519 11.5198 16.3389 11.5198 22.2631H10.7441C10.7441 16.3389 5.92426 11.519 0 11.519V10.7433C5.92426 10.7433 10.7441 5.92426 10.7441 0H11.5198C11.5198 5.92346 16.3389 10.7433 22.2631 10.7433Z'/%3E%3Cpath opacity='0.22' transform='translate(230,60) scale(0.8) rotate(15)' d='M22.2631 10.7433V11.519C16.3389 11.519 11.5198 16.3389 11.5198 22.2631H10.7441C10.7441 16.3389 5.92426 11.519 0 11.519V10.7433C5.92426 10.7433 10.7441 5.92426 10.7441 0H11.5198C11.5198 5.92346 16.3389 10.7433 22.2631 10.7433Z'/%3E%3Cpath opacity='0.3' transform='translate(110,190) scale(1.05) rotate(-10)' d='M22.2631 10.7433V11.519C16.3389 11.519 11.5198 16.3389 11.5198 22.2631H10.7441C10.7441 16.3389 5.92426 11.519 0 11.519V10.7433C5.92426 10.7433 10.7441 5.92426 10.7441 0H11.5198C11.5198 5.92346 16.3389 10.7433 22.2631 10.7433Z'/%3E%3Cpath opacity='0.4' transform='translate(305,280) scale(0.7) rotate(30)' d='M22.2631 10.7433V11.519C16.3389 11.519 11.5198 16.3389 11.5198 22.2631H10.7441C10.7441 16.3389 5.92426 11.519 0 11.519V10.7433C5.92426 10.7433 10.7441 5.92426 10.7441 0H11.5198C11.5198 5.92346 16.3389 10.7433 22.2631 10.7433Z'/%3E%3Cpath opacity='0.26' transform='translate(50,285) scale(0.95) rotate(45)' d='M22.2631 10.7433V11.519C16.3389 11.519 11.5198 16.3389 11.5198 22.2631H10.7441C10.7441 16.3389 5.92426 11.519 0 11.519V10.7433C5.92426 10.7433 10.7441 5.92426 10.7441 0H11.5198C11.5198 5.92346 16.3389 10.7433 22.2631 10.7433Z'/%3E%3Cpath opacity='0.32' transform='translate(190,10) scale(0.6) rotate(-20)' d='M22.2631 10.7433V11.519C16.3389 11.519 11.5198 16.3389 11.5198 22.2631H10.7441C10.7441 16.3389 5.92426 11.519 0 11.519V10.7433C5.92426 10.7433 10.7441 5.92426 10.7441 0H11.5198C11.5198 5.92346 16.3389 10.7433 22.2631 10.7433Z'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: var(--sparkle-tile);
  background-repeat: repeat;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  margin: 0;
}

a { color: inherit; }

.accent { color: var(--accent); }
.accent-num { color: var(--accent); font-weight: 600; }

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-dark);
  color: var(--white);
}

.header-inner {
  max-width: var(--layout-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 18px 20px;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--accent);
}
.logo-svg {
  height: 20px;
  width: auto;
}

.role-badge {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  padding-bottom: 2px;
}

.header-progress-fraction {
  margin-left: auto;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.header-progress-fraction span { color: rgba(255, 255, 255, 0.35); font-style: normal; }

.menu-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: "Manrope", sans-serif;
}
.menu-toggle:hover { border-color: var(--accent); color: var(--accent); }

.progress-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* ---- layout: rail (TOC + progress) + content, single shared column rhythm ---- */
.layout {
  max-width: var(--layout-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 56px;
  padding: 0 20px;
}

.rail {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: var(--bg-dark);
  color: var(--white);
  z-index: 30;
  transition: right 0.25s ease;
  overflow-y: auto;
  padding: 70px 28px 40px;
}
.rail.open { right: 0; }

.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: "Cormorant Garamond", serif;
  margin-bottom: 18px;
}
.rail-head-label { font-size: 19px; font-style: italic; }
.rail-head-pct { color: var(--accent); font-size: 15px; }

.rail-body { display: flex; gap: 16px; }
.rail-line {
  position: relative;
  width: 1px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  margin-top: 4px;
}
.rail-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  background: var(--accent);
  transition: height 0.3s ease;
}

.rail-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.rail-item {
  padding: 7px 0;
  font-size: 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: default;
  color: rgba(255, 255, 255, 0.38);
}
.rail-num {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  width: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.3);
}
.rail-item.done { color: rgba(255, 255, 255, 0.75); }
.rail-item.done .rail-num { color: var(--accent); }
.rail-item.current {
  color: var(--white);
  font-weight: 600;
}
.rail-item.current .rail-num { color: var(--accent); font-size: 17px; }

/* ---- content column ---- */
.content {
  flex: 1;
  min-width: 0;
  padding: 56px 0 80px;
}

.chapter { max-width: 640px; }

.chapter-marker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.chapter-numeral {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 64px;
  line-height: 1;
  color: var(--text);
  opacity: 0.85;
}
.chapter-flourish {
  width: 64px;
  height: 1px;
  background: var(--accent);
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.title {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 26px;
  color: var(--text);
}

.body { color: var(--text); }
.body p { margin: 0 0 16px; }
.body p:last-child { margin-bottom: 0; }
.body strong { font-weight: 700; }
.bullet-list { margin: 0 0 16px; padding-left: 0; list-style: none; }
.bullet-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
}
.bullet-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---- emphasis chapters: role branch / quiz / final cta ---- */
.chapter-plate {
  background: var(--bg-dark);
  color: var(--white);
  border-radius: 20px;
  padding: 44px 44px 48px;
  max-width: 100%;
}
.chapter-plate .chapter-numeral { color: var(--white); opacity: 0.9; }
.chapter-plate .eyebrow { color: rgba(255, 255, 255, 0.45); }
.chapter-plate .title { color: var(--white); }
.chapter-plate .body { color: rgba(255, 255, 255, 0.82); }
.chapter-plate .bullet-list li::before { color: var(--accent); }

/* ---- faq: hairline list, no boxes ---- */
.faq-list { display: flex; flex-direction: column; }
.faq-item {
  border-top: 1px solid rgba(35, 32, 25, 0.14);
  padding: 4px 0;
}
.faq-item:last-child { border-bottom: 1px solid rgba(35, 32, 25, 0.14); }
.faq-item summary {
  cursor: pointer;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 20px;
  padding: 16px 0;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  font-family: "Manrope", sans-serif;
  font-style: normal;
  color: var(--accent);
  margin-right: 12px;
  font-weight: 700;
}
.faq-item[open] summary::before { content: "–"; }
.faq-answer { padding: 0 0 18px 28px; color: var(--text-muted); font-size: 15px; }

/* ---- quiz: lives inside the dark chapter-plate ---- */
.quiz-list { display: flex; flex-direction: column; }
.quiz-block {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.quiz-block:first-child { border-top: none; padding-top: 4px; }
.quiz-question { font-size: 17px; margin-bottom: 14px; }
.quiz-num { color: var(--accent); font-family: "Cormorant Garamond", serif; font-style: italic; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.quiz-option:hover:not(:disabled) { border-color: var(--accent); }
.quiz-option:disabled { cursor: default; opacity: 0.9; }
.quiz-option.correct { background: rgba(120, 170, 110, 0.22); border-color: #78aa6e; }
.quiz-option.incorrect { background: rgba(190, 90, 80, 0.22); border-color: #be5a50; }
.quiz-hint { color: rgba(255, 255, 255, 0.5); font-size: 13px; margin-top: 4px; }
.chapter:not(.chapter-plate) + .nav-buttons { }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: "Manrope", sans-serif;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--text); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline { background: transparent; color: var(--text); border-color: rgba(35, 32, 25, 0.25); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-outline:disabled { opacity: 0.3; cursor: not-allowed; }

.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.nav-buttons {
  max-width: 640px;
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}
.nav-buttons #prevBtn { margin-right: auto; }

@media (min-width: 860px) {
  .menu-toggle, .header-progress-fraction { display: none; }
  .progress-track--header { display: none; }
  .rail {
    position: sticky;
    top: 90px;
    right: auto;
    width: 240px;
    flex-shrink: 0;
    height: auto;
    max-height: calc(100vh - 130px);
    background: transparent;
    color: var(--text);
    overflow: visible;
    padding: 56px 0 0;
  }
  .rail-head-label { color: var(--text); }
  .rail-head-pct { color: var(--accent); }
  .rail-line { background: rgba(35, 32, 25, 0.14); }
  .rail-item { color: var(--text-muted); }
  .rail-item.done { color: var(--text); }
  .rail-item.current { color: var(--text); }
  .rail-num { color: rgba(35, 32, 25, 0.28); }
}

@media (max-width: 600px) {
  .layout { gap: 0; padding: 0 18px; }
  .content { padding: 34px 0 60px; }
  .chapter-numeral { font-size: 48px; }
  .title { font-size: 30px; }
  .chapter-plate { padding: 30px 24px 34px; border-radius: 14px; }
  .role-badge { display: none; }
}
