:root {
  --ink: #17201d;
  --muted: #5b6662;
  --paper: #f4f0e7;
  --cream: #fffdf8;
  --forest: #183c33;
  --forest-deep: #102b25;
  --sage: #8ea798;
  --sage-pale: #dfe7e1;
  --gold: #bd8f3c;
  --gold-pale: #ead8ae;
  --clay: #9b5540;
  --rose-pale: #f2dfd8;
  --line: rgba(23, 32, 29, .16);
  --shadow: 0 24px 70px rgba(20, 35, 30, .11);
  --page: min(1180px, calc(100% - 36px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(189, 143, 60, .68);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--cream);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 231, .96);
  backdrop-filter: blur(15px);
}
.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand-logo { display: block; width: auto; height: 58px; flex: 0 0 auto; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 19px Georgia, serif; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: 8px; }
.nav-link, .nav-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.nav-link { padding: 0 12px; background: transparent; color: var(--muted); }
.nav-anchor { text-decoration: none; }
.nav-link:hover { color: var(--forest); }
.nav-action { padding: 0 17px; background: var(--forest); color: white; }
.nav-action:hover { background: var(--forest-deep); }

#exam-app { min-height: 70vh; }
.page-wrap { width: var(--page); margin-inline: auto; }
.eyebrow { margin: 0 0 15px; color: var(--clay); font-size: 10px; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow.light { color: var(--gold-pale); }
.display-title { margin: 0; font: 500 clamp(47px, 7.4vw, 92px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.display-title em { color: var(--forest); font-weight: 400; }
.lede { max-width: 745px; margin: 28px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.72; }

.hero { position: relative; overflow: hidden; padding: clamp(70px, 9vw, 120px) 0 78px; }
.hero::after { position: absolute; z-index: -1; top: -270px; right: -270px; width: 680px; height: 680px; border: 1px solid rgba(24, 60, 51, .13); border-radius: 50%; content: ""; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); align-items: end; gap: clamp(42px, 7vw, 100px); }
.hero-actions, .action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.button-primary, .button-secondary, .button-text {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.button-primary { padding: 0 24px; border: 1px solid var(--forest); background: var(--forest); color: white; }
.button-primary:hover:not(:disabled) { background: var(--forest-deep); transform: translateY(-1px); }
.button-primary:disabled { cursor: not-allowed; opacity: .42; }
.button-secondary { padding: 0 22px; border: 1px solid var(--line); background: rgba(255, 253, 248, .58); color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: var(--forest); background: var(--cream); }
.button-secondary:disabled { cursor: not-allowed; opacity: .42; }
.button-text { min-height: 38px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--gold); background: none; color: inherit; }
.facts-card { padding: 32px; border-top: 3px solid var(--gold); background: var(--forest); color: white; box-shadow: var(--shadow); }
.facts-card h2 { margin: 0 0 22px; font: 500 30px Georgia, serif; }
.fact-list { display: grid; gap: 17px; margin: 0; }
.fact-list div { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: baseline; }
.fact-list dt { color: var(--gold-pale); font: 600 25px Georgia, serif; }
.fact-list dd { margin: 0; color: rgba(255,255,255,.82); font-size: 13px; }

.purpose-band { padding: 50px 0; background: var(--forest); color: white; }
.purpose-band blockquote { max-width: 930px; margin: 0; font: 400 clamp(26px, 4vw, 44px)/1.3 Georgia, serif; }
.purpose-band cite { display: block; margin-top: 18px; color: var(--gold-pale); font: 800 11px Arial, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.section-block { padding: 76px 0 90px; }
.section-heading { max-width: 790px; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font: 500 clamp(38px, 5vw, 60px)/1.03 Georgia, serif; letter-spacing: -.03em; }
.section-heading p { max-width: 720px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }
.foundation-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.foundation-card { min-height: 202px; padding: 24px; border: 1px solid var(--line); background: rgba(255, 253, 248, .62); }
.foundation-number { color: var(--gold); font: 600 13px Georgia, serif; }
.foundation-card h3 { margin: 39px 0 8px; font: 600 23px/1.12 Georgia, serif; }
.foundation-card p { margin: 0; color: var(--muted); font-size: 13px; }

.exam-page { padding: 48px 0 84px; }
.exam-topline { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(24, 60, 51, .12); }
.progress-fill { height: 100%; border-radius: inherit; background: var(--gold); transition: width .3s ease; }
.question-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: start; margin-top: 32px; }
.question-card { padding: clamp(25px, 5vw, 54px); border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow); }
.question-card h1 { margin: 0 0 22px; font: 500 clamp(30px, 4vw, 47px)/1.14 Georgia, serif; letter-spacing: -.025em; }
.reference-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.scripture-link { display: inline-flex; padding: 7px 10px; border: 1px solid rgba(24,60,51,.2); border-radius: 99px; color: var(--forest); font-size: 11px; font-weight: 800; text-decoration: none; }
.scripture-link:hover { border-color: var(--gold); background: #fff; }
.option-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.option-button {
  display: grid;
  width: 100%;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.option-button:hover:not(:disabled), .option-button.selected { border-color: var(--forest); background: var(--sage-pale); }
.option-button:disabled { cursor: default; opacity: 1; }
.option-button.correct { border-color: #44755f; background: #dfede5; }
.option-button.incorrect { border-color: var(--clay); background: var(--rose-pale); }
.option-letter { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--forest); font-size: 11px; font-weight: 900; }
.question-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; }
.feedback { margin-top: 24px; padding: 24px; border-left: 4px solid #44755f; background: #edf5f0; }
.feedback.wrong { border-left-color: var(--clay); background: #f7e9e4; }
.feedback h2 { margin: 0 0 9px; font: 600 25px Georgia, serif; }
.feedback p { margin: 0; color: var(--muted); }
.side-panel { position: sticky; top: 115px; padding: 27px; background: var(--forest); color: white; }
.side-panel h2 { margin: 0 0 15px; font: 500 28px/1.1 Georgia, serif; }
.side-panel p, .side-panel li { color: rgba(255,255,255,.78); font-size: 13px; }
.side-panel ol { margin: 20px 0 0; padding-left: 20px; }
.side-panel li + li { margin-top: 9px; }
.side-panel .button-text { margin-top: 20px; color: var(--gold-pale); }

.results-hero { padding: clamp(55px, 8vw, 95px) 0; background: var(--forest); color: white; }
.results-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(40px, 8vw, 100px); align-items: center; }
.score-ring { display: grid; width: 235px; height: 235px; place-items: center; border: 2px solid var(--gold); border-radius: 50%; text-align: center; }
.score-ring strong { display: block; color: var(--gold-pale); font: 500 62px/1 Georgia, serif; }
.score-ring span { display: block; margin-top: 8px; color: rgba(255,255,255,.72); font-size: 12px; }
.results-copy h1 { margin: 0; font: 500 clamp(45px, 7vw, 80px)/1 Georgia, serif; }
.results-copy > p:not(.eyebrow) { max-width: 650px; color: rgba(255,255,255,.78); font-size: 18px; }
.results-copy .button-secondary { border-color: rgba(255,255,255,.3); background: transparent; color: white; }
.results-copy .button-primary { border-color: var(--gold); background: var(--gold); color: var(--forest-deep); }
.results-body { padding: 70px 0 95px; }
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 65px; }
.score-card { padding: 20px; border: 1px solid var(--line); background: var(--cream); }
.score-card h3 { min-height: 40px; margin: 0 0 19px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.score-card strong { color: var(--forest); font: 600 29px Georgia, serif; }
.review-list { display: grid; gap: 9px; }
.review-item { border: 1px solid var(--line); background: var(--cream); }
.review-item summary { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; cursor: pointer; list-style: none; }
.review-item summary::-webkit-details-marker { display: none; }
.review-number { color: var(--gold); font: 600 12px Georgia, serif; }
.review-status { padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.review-status.correct { background: #dfede5; color: #275842; }
.review-status.incorrect { background: var(--rose-pale); color: #783c2b; }
.review-content { padding: 4px 74px 24px; color: var(--muted); }
.review-content strong { color: var(--ink); }

.study-hero { padding: clamp(58px, 8vw, 100px) 0; background: var(--forest); color: white; }
.study-hero h1 { margin: 0; font: 500 clamp(48px, 7vw, 82px)/1 Georgia, serif; }
.study-hero > .page-wrap > p:not(.eyebrow) { max-width: 760px; color: rgba(255,255,255,.78); font-size: 18px; }
.study-hero .button-primary { border-color: var(--gold); background: var(--gold); color: var(--forest-deep); }
.study-hero .button-secondary { border-color: rgba(255,255,255,.3); background: transparent; color: white; }
.studies { display: grid; gap: 12px; padding: 65px 0 95px; }
.study-card { border: 1px solid var(--line); background: var(--cream); }
.study-card summary { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 22px 25px; cursor: pointer; list-style: none; }
.study-card summary::-webkit-details-marker { display: none; }
.study-number { color: var(--gold); font: 600 14px Georgia, serif; }
.study-card h2 { margin: 0; font: 600 clamp(22px, 3vw, 31px)/1.15 Georgia, serif; }
.study-open { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.study-card[open] .study-open::before { content: "Close "; }
.study-card[open] .study-open { font-size: 0; }
.study-card[open] .study-open::before { font-size: 10px; }
.study-content { padding: 0 25px 30px 89px; }
.study-thesis { max-width: 830px; color: var(--forest); font: 500 21px/1.55 Georgia, serif; }
.reasoning-list { max-width: 830px; padding-left: 22px; }
.reasoning-list li + li { margin-top: 11px; }
.distinction { max-width: 830px; padding: 17px 20px; border-left: 3px solid var(--gold); background: #f5ead0; }
.study-content .reference-row { margin-top: 22px; margin-bottom: 0; }

.site-footer { padding: 35px 18px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.site-footer p { margin: 4px 0; font-size: 12px; }
.site-footer a { color: var(--forest); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .facts-card { max-width: 650px; }
  .foundation-grid, .score-grid { grid-template-columns: repeat(2, 1fr); }
  .question-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
}

@media (max-width: 700px) {
  .site-header { min-height: 72px; padding: 9px 14px; }
  .brand-logo { height: 48px; }
  .brand strong { max-width: 140px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .brand small { display: none; }
  nav { gap: 2px; }
  .nav-link { display: none; }
  .nav-action { min-height: 40px; padding: 0 12px; font-size: 10px; }
  .display-title { font-size: clamp(46px, 15vw, 70px); }
  .foundation-grid, .score-grid { grid-template-columns: 1fr; }
  .foundation-card { min-height: 160px; }
  .results-grid { grid-template-columns: 1fr; }
  .score-ring { width: 190px; height: 190px; }
  .score-ring strong { font-size: 50px; }
  .question-card { padding: 26px 20px; }
  .question-controls > * { flex: 1; }
  .review-item summary { grid-template-columns: 34px 1fr; }
  .review-status { grid-column: 2; justify-self: start; }
  .review-content { padding: 2px 20px 22px 54px; }
  .study-card summary { grid-template-columns: 34px 1fr; padding: 19px 17px; }
  .study-open { grid-column: 2; }
  .study-content { padding: 0 18px 25px 51px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  @page { margin: .65in; }
  body { background: white; color: black; }
  .site-header, .site-footer, .question-controls, .action-row, .side-panel { display: none !important; }
  #exam-app { min-height: 0; }
  .results-hero, .study-hero, .purpose-band { background: white !important; color: black !important; }
  .results-copy > p:not(.eyebrow), .study-hero > .page-wrap > p:not(.eyebrow) { color: #333; }
  .score-ring { border-color: black; }
  .score-ring strong { color: black; }
  .results-body, .studies { padding: 20px 0; }
  .review-item, .study-card, .score-card { break-inside: avoid; }
  .review-item:not([open]) > .review-content, .study-card:not([open]) > .study-content { display: block; }
  a { color: black; text-decoration: none; }
}
