:root {
  --ink: #132b36;
  --muted: #5d7078;
  --navy: #092f40;
  --blue: #0f5b78;
  --blue-soft: #e8f4f7;
  --gold: #c28c2c;
  --gold-light: #f4d98f;
  --paper: #fffdf8;
  --line: #dce4e6;
  --shadow: 0 18px 50px rgba(13, 47, 60, .12);
  --script-size: 1.075rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #f4f7f7; color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #e2a834; outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .7rem 1rem; background: #fff; color: var(--navy); border-radius: 8px; }
.skip-link:focus { top: 1rem; }

.site-header { height: 92px; padding: 0 clamp(1rem, 4vw, 4rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); }
.brand { border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; gap: .72rem; cursor: pointer; text-align: left; padding: 0; }
.brand-mark { width: 66px; height: 66px; display: block; flex: 0 0 auto; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 0; }
.brand b { display: block; font-family: Georgia, serif; letter-spacing: .08em; font-size: 1rem; }
.brand small { display: block; color: #c7dadd; margin-top: .12rem; letter-spacing: .04em; }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.language-control { display: inline-flex; align-items: center; gap: .42rem; color: #fff; font-size: .9rem; font-weight: 700; }
.language-control select { min-height: 42px; padding: .42rem 1.8rem .42rem .65rem; border: 1px solid rgba(255,255,255,.5); border-radius: 9px; background: #fff; color: var(--navy); font: inherit; cursor: pointer; }
.language-control select:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.privacy-badge { font-size: .78rem; color: #d9e8ea; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: .38rem .65rem; }
.privacy-badge span { color: #7fd4ad; margin-right: .2rem; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; border-radius: 10px; cursor: pointer; }
.icon-button:hover { background: rgba(255,255,255,.15); }
.icon-button span { font-size: .7em; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

main { min-height: calc(100vh - 132px); }
.view { display: none; }
.view.is-active { display: block; animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } }

.welcome { min-height: calc(100vh - 132px); padding: clamp(2.7rem, 7vw, 6rem) clamp(1rem, 6vw, 6rem) 3rem; background:
  radial-gradient(circle at 10% 10%, rgba(194,140,44,.14), transparent 30%),
  radial-gradient(circle at 90% 15%, rgba(15,91,120,.12), transparent 34%),
  linear-gradient(180deg, #fffdf8, #eef4f4); }
.welcome-copy { max-width: 800px; margin: 0 auto 2.25rem; text-align: center; }
.eyebrow { margin: 0 0 .65rem; color: var(--gold); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; font-size: .76rem; }
h1 { font-family: Georgia, "Times New Roman", serif; color: var(--navy); font-size: clamp(2.55rem, 6vw, 5.2rem); line-height: .98; margin: 0; letter-spacing: -.035em; }
.welcome-lede { max-width: 690px; margin: 1.3rem auto 0; color: #52666e; line-height: 1.7; font-size: clamp(1rem, 2vw, 1.18rem); }
.path-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.path-card { overflow: hidden; padding: 0; border: 1px solid #d9e2e3; background: #fff; border-radius: 20px; box-shadow: var(--shadow); color: var(--ink); text-align: left; cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.path-card:hover { transform: translateY(-5px); box-shadow: 0 24px 60px rgba(13,47,60,.18); border-color: #b7c9cd; }
.path-card:active { transform: translateY(-1px); }
.path-art { display: block; background: var(--navy); aspect-ratio: 2.2 / 1; overflow: hidden; }
.path-art svg { width: 100%; height: 100%; display: block; }
.path-art img { width: 100%; height: 100%; object-fit: contain; display: block; background: #092f40; }
.path-body { padding: 1.3rem 1.5rem 1.45rem; display: grid; gap: .42rem; }
.path-label { width: fit-content; background: var(--blue-soft); color: var(--blue); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; padding: .32rem .56rem; border-radius: 6px; }
.depth-card .path-label { background: #eee8f7; color: #5b4181; }
.path-body strong { font-family: Georgia, serif; font-size: 1.35rem; color: var(--navy); }
.path-body > span:nth-child(3) { color: var(--muted); font-size: .93rem; }
.path-cta { margin-top: .65rem; color: var(--blue); font-weight: 800; display: flex; align-items: center; justify-content: space-between; }
.path-cta b { font-size: 1.3rem; }
.welcome-note { margin: 2rem 0 0; text-align: center; color: #6b7c81; font-size: .88rem; }
.welcome-note span { color: var(--gold); }
.welcome.basic-intro-only .welcome-copy,
.welcome.basic-intro-only .depth-card,
.welcome.basic-intro-only .welcome-note { display: none; }
.welcome.basic-intro-only { display: grid; place-items: center; }
.welcome.basic-intro-only { padding-block: clamp(1.5rem, 4vh, 3rem); }
.welcome.basic-intro-only .path-grid { width: min(100%, 900px); grid-template-columns: 1fr; }
.welcome.basic-intro-only .path-card { border-radius: 26px; }
.welcome.basic-intro-only .path-body { padding: clamp(1.5rem, 2.5vw, 2.25rem) clamp(1.6rem, 3.5vw, 3rem) clamp(1.7rem, 3vw, 2.5rem); gap: .65rem; }
.welcome.basic-intro-only .path-label { font-size: .9rem; padding: .42rem .72rem; }
.welcome.basic-intro-only .path-body strong { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.welcome.basic-intro-only .path-body > span:nth-child(3) { font-size: clamp(1rem, 1.8vw, 1.2rem); }
.welcome.basic-intro-only .path-cta { margin-top: .85rem; font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
.welcome.basic-intro-only .path-cta b { font-size: 1.65rem; }
.depth-introduction { display: none; }
.welcome.depth-intro-only { display: grid; place-items: center; padding-block: clamp(1.5rem, 4vh, 3rem); }
.welcome.depth-intro-only .welcome-copy,
.welcome.depth-intro-only .path-grid,
.welcome.depth-intro-only .welcome-note { display: none; }
.welcome.depth-intro-only .depth-introduction { display: block; width: min(100%, 1000px); border-radius: 24px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.depth-art { position: relative; }
.depth-art img { display: block; width: 100%; height: auto; }
.depth-copyright { position: absolute; right: .8rem; bottom: .7rem; padding: .22rem .46rem; border-radius: 4px; background: rgba(9,47,64,.78); color: #fff; font-size: clamp(.68rem, 1.2vw, .82rem); font-weight: 700; }
.depth-body { padding: clamp(1.2rem, 2.5vw, 2rem) clamp(1.2rem, 3vw, 2.5rem); }
.depth-body h2 { margin: .75rem 0 1rem; color: var(--navy); font: 700 clamp(1.55rem, 3vw, 2.25rem)/1.2 Georgia, serif; }
.depth-questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1.5rem; color: var(--navy); font: 700 clamp(1rem, 1.75vw, 1.18rem)/1.35 Georgia, serif; }
.depth-start { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 1.3rem; padding: .8rem 1rem; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-family: inherit; font-size: 1.1rem; font-weight: 700; line-height: 1.3; text-align: left; cursor: pointer; }
.depth-start:hover, .depth-start:focus-visible { background: var(--blue); }
@media (max-width: 680px) { .depth-questions { grid-template-columns: 1fr; } }

.viewer { padding: 1.35rem clamp(.8rem, 3vw, 3rem) 2.25rem; max-width: 1550px; margin: 0 auto; }
.lesson-topbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.back-link { border: 0; background: transparent; color: var(--blue); padding: .25rem 0; font-size: .88rem; cursor: pointer; font-weight: 700; }
.lesson-kicker { margin: .38rem 0 0; color: #6d7d82; text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 800; }
.sections-button { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem .8rem; border: 1px solid #cbd8da; background: #fff; color: var(--navy); border-radius: 9px; cursor: pointer; font-weight: 750; }
.sections-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.progress-wrap { margin-bottom: .9rem; }
.progress-meta { display: flex; justify-content: space-between; font-size: .72rem; color: #718084; margin-bottom: .38rem; }
.progress-track { height: 5px; background: #dce5e6; border-radius: 99px; overflow: hidden; }
.progress-track span { display: block; width: 14%; height: 100%; background: linear-gradient(90deg, var(--gold), #e6bd59); transition: width .3s ease; }

.lesson-shell { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(335px, .75fr); gap: 1rem; align-items: stretch; }
.lesson-shell.reference-page { grid-template-columns: minmax(0, 1fr); }
.visual-panel, .script-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(13,47,60,.07); }
.visual-panel { padding: clamp(1rem, 2vw, 1.5rem); display: flex; flex-direction: column; min-width: 0; }
.visual-heading { display: flex; align-items: center; gap: .85rem; margin-bottom: .9rem; }
.section-number { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--gold-light); display: grid; place-items: center; font-family: Georgia, serif; font-size: 1rem; flex: 0 0 auto; }
.visual-heading p { margin: 0 0 .15rem; font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--gold); }
.visual-heading h2 { font-family: Georgia, serif; font-size: clamp(1.45rem, 2.5vw, 2.15rem); color: var(--navy); margin: 0; line-height: 1.08; }
.visual-stage { flex: 1; min-height: 375px; overflow: hidden; border-radius: 12px; background: #0a3448; }
.visual-stage svg { display: block; width: 100%; height: 100%; min-height: 375px; }
.visual-stage img { display: block; width: 100%; height: auto; max-height: 620px; object-fit: contain; background: #fff; }
.visual-stage img + img { border-top: 1px solid var(--line); }
.reference-guide { background: #fff; color: #111; padding: clamp(.7rem, 2vw, 1.5rem); font-family: Arial, Helvetica, sans-serif; font-size: clamp(1rem, 1.35vw, 1.22rem); line-height: 1.38; }
.reference-guide h3 { margin: 0 0 .5rem; font-size: clamp(1.65rem, 2.5vw, 2.25rem); line-height: 1.15; }
.reference-guide p { margin: .35rem 0; }
.reference-guide strong { font-weight: 750; }
.reference-primary { padding-bottom: 1rem; }
.reference-additional { border: 4px solid #1c398d; border-radius: 18px; padding: clamp(.9rem, 2vw, 1.5rem); }
.reference-additional h3 { color: #d7382c; }
.judgment-art { position: relative; width: min(100%, 472.8px); margin-inline: auto; background: #fff; container-type: inline-size; }
.judgment-art svg { display: block; width: 100%; height: auto; min-height: 0; }
.judgment-svg-label { fill: #ae2031; font: bold 56px Georgia, 'Times New Roman', serif; }
.copyrighted-picture { position: relative; width: 100%; }
.picture-copyright { position: absolute; right: .65rem; bottom: .5rem; padding: .18rem .42rem; border-radius: .25rem; background: rgba(0,0,0,.58); color: #fff; font-size: clamp(.7rem, 1.25vw, .85rem); line-height: 1.2; text-shadow: 0 1px 2px #000; }
.picture-copyright.page-one-copyright { right: .4rem; bottom: .35rem; padding: .1rem .25rem; font-size: clamp(.52rem, .72vw, .64rem); }
.picture-copyright.page-five-copyright { left: .35rem; right: auto; bottom: .3rem; padding: .1rem .25rem; font-size: clamp(.55rem, .8vw, .68rem); }
.picture-cue { margin: .85rem 0 0; padding: .72rem .82rem; background: #f4f8f8; border-radius: 9px; color: #52666d; line-height: 1.45; font-size: .85rem; }
.picture-cue > span:first-child { color: var(--gold); }
.picture-cue #pictureCue { white-space: pre-line; }

.script-panel { padding: 1.25rem; display: flex; flex-direction: column; min-height: 0; }
.script-heading { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e3e9ea; padding-bottom: .8rem; margin-bottom: .85rem; color: var(--navy); font-weight: 800; }
.script-heading > span:first-child { display: inline-flex; gap: .45rem; align-items: center; }
.script-heading svg { width: 19px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linejoin: round; }
.time-chip { font-size: .72rem; color: #617379; background: #edf3f4; padding: .28rem .5rem; border-radius: 99px; }
.script-content { font-family: Georgia, serif; font-size: var(--script-size); line-height: 1.72; color: #283f48; overflow: auto; max-height: 310px; padding-right: .35rem; }
.script-content p { margin: 0 0 .85rem; }
.script-content p:last-child { margin-bottom: 0; }
.script-content strong { color: var(--navy); }
.script-content a { color: var(--blue); overflow-wrap: anywhere; text-decoration-thickness: .08em; text-underline-offset: .12em; }
.script-content.recap-script { max-height: none; overflow: visible; font-size: .96rem; line-height: 1.58; }
.script-content.atonement-script { font-size: 1rem; line-height: 1.55; }
body.large-script .script-content.atonement-script { font-size: 1.2rem; }
.script-content.contact-script { font-size: 1rem; line-height: 1.48; }
.script-content.contact-script p { margin-bottom: .65rem; }
body.large-script .script-content.contact-script { font-size: 1.2rem; }
.reference-box { margin-top: auto; padding: .8rem .9rem; border-left: 3px solid var(--gold); background: #fffaf0; }
.reference-box span { font-size: .66rem; text-transform: uppercase; letter-spacing: .11em; color: #927022; font-weight: 800; }
.reference-box p { margin: .25rem 0 0; font-family: Georgia, serif; color: #4c4331; line-height: 1.45; font-size: .9rem; }
.teaching-tip { margin-top: .7rem; display: flex; gap: .65rem; padding: .78rem .85rem; background: var(--blue-soft); border-radius: 9px; color: var(--blue); }
.teaching-tip > span { color: var(--gold); }
.teaching-tip strong { display: block; font-size: .73rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .16rem; }
.teaching-tip p { margin: 0; color: #476772; font-size: .82rem; line-height: 1.45; }

.section-drawer { display: none; position: absolute; z-index: 30; top: 0; right: 0; width: min(380px, 92vw); height: 100%; max-height: 680px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: -16px 22px 50px rgba(9,47,64,.2); padding: 1rem; }
.section-drawer.is-open { display: block; animation: slideIn .22s ease both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(15px); } }
.drawer-scrim { display: none; position: fixed; inset: 0; z-index: 20; border: 0; background: rgba(9,47,64,.35); }
.drawer-scrim.is-open { display: block; }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; padding: .2rem .25rem .8rem; border-bottom: 1px solid var(--line); }
.drawer-heading strong { font-family: Georgia, serif; color: var(--navy); font-size: 1.15rem; }
.drawer-heading button { border: 0; background: #edf3f4; width: 32px; height: 32px; border-radius: 8px; color: var(--navy); cursor: pointer; font-size: 1.4rem; }
#sectionNav { display: grid; gap: .35rem; padding-top: .7rem; }
.section-link { width: 100%; border: 0; background: transparent; text-align: left; display: grid; grid-template-columns: 31px 1fr; gap: .65rem; align-items: center; padding: .65rem; border-radius: 9px; color: #40565f; cursor: pointer; }
.section-link:hover { background: #f2f6f6; }
.section-link.is-current { background: var(--blue-soft); color: var(--navy); font-weight: 800; }
.section-link span:first-child { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #cbd6d8; display: grid; place-items: center; font-size: .68rem; }
.section-link.is-current span:first-child { color: #fff; background: var(--blue); border-color: var(--blue); }

.lesson-controls { display: grid; grid-template-columns: 160px 1fr 160px; align-items: center; gap: 1rem; margin-top: 1rem; }
.control-button { min-height: 46px; border-radius: 10px; padding: .72rem 1rem; cursor: pointer; font-weight: 800; }
.control-button.secondary { background: #fff; color: var(--navy); border: 1px solid #cbd7d9; }
.control-button.primary { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.control-button:disabled { opacity: .42; cursor: not-allowed; }
.dot-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .42rem; }
.dot-nav button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: #bac8cb; cursor: pointer; }
.dot-nav button.is-current { background: var(--gold); box-shadow: 0 0 0 4px #f7e8c1; }
.key-help { text-align: center; color: #839094; font-size: .7rem; margin: .7rem 0 0; }

footer { min-height: 54px; background: #e4ebeb; color: #68797e; padding: .8rem clamp(1rem, 4vw, 4rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .72rem; }
footer span:first-child { color: var(--blue); font-weight: 800; }

body.large-script { --script-size: 1.25rem; }
body.large-script .script-content { max-height: 345px; }

@media (max-width: 900px) {
  .lesson-shell { grid-template-columns: 1fr; }
  .visual-stage, .visual-stage svg { min-height: 330px; }
  .script-content { max-height: none; overflow: visible; }
  .section-drawer { position: fixed; top: 84px; right: .75rem; bottom: .75rem; height: auto; max-height: none; }
  .lesson-controls { grid-template-columns: 1fr 1fr; }
  .dot-nav { grid-column: 1 / -1; grid-row: 1; }
  .control-button.secondary { grid-column: 1; grid-row: 2; }
  .control-button.primary { grid-column: 2; grid-row: 2; }
}

@media (max-width: 680px) {
  .site-header { height: 76px; padding: 0 .8rem; }
  .language-control > span { display: none; }
  .language-control select { min-height: 40px; max-width: 112px; padding: .35rem .45rem; font-size: .84rem; }
  .brand-mark { width: 54px; height: 54px; }
  .brand b { font-size: .82rem; }
  .brand small { font-size: .68rem; }
  .privacy-badge, #fullscreenButton { display: none; }
  .welcome { min-height: calc(100vh - 118px); padding: 2.5rem .85rem 2rem; }
  .path-grid { grid-template-columns: 1fr; }
  .path-body { padding: 1rem 1.1rem 1.15rem; }
  .viewer { padding: 1rem .65rem 1.5rem; }
  .lesson-topbar { align-items: center; }
  .visual-panel, .script-panel { border-radius: 12px; }
  .visual-panel { padding: .85rem; }
  .visual-stage, .visual-stage svg { min-height: 270px; }
  .visual-heading { align-items: flex-start; }
  .section-number { width: 38px; height: 38px; }
  .visual-heading h2 { font-size: 1.35rem; }
  .picture-cue { font-size: .8rem; }
  .script-panel { padding: 1rem; }
  .lesson-controls { gap: .55rem; }
  .control-button { padding: .62rem .65rem; font-size: .86rem; }
  .key-help { display: none; }
  footer { justify-content: center; text-align: center; min-height: 50px; }
  footer span:not(:first-child) { display: none; }
}
@media (max-width: 420px) {
  .brand > span:last-child { display: none; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
