@layer foundation, frame, reading, questions, narrow, printing;
@layer foundation {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background-color: #FBFAF7; color: #18191B; font-family: 'Figtree', sans-serif; font-weight: 400; font-size: 18px; line-height: 1.65; }
  h1, h2, h3, p, figure { margin: 0; }
  h1, h2, h3 { font-family: 'Newsreader', serif; }
  h1 { font-weight: 300; font-size: clamp(2.1rem, 3.8vw, 3.5rem); line-height: 1.16; letter-spacing: 0.025em; text-transform: uppercase; overflow-wrap: break-word; }
  h2 { font-size: clamp(1.9rem, 2.6vw, 2.55rem); font-weight: 400; line-height: 1.17; letter-spacing: 0; }
  h3 { font-size: 1.55rem; font-weight: 400; line-height: 1.25; }
  a { color: #18191B; text-decoration-thickness: 1px; text-underline-offset: 5px; }
  a:hover { text-decoration-thickness: 2px; }
  a, button, summary { touch-action: manipulation; }
  :focus-visible { outline: 2px solid #18191B; outline-offset: 5px; }
  img { display: block; max-width: 100%; }
  button, input { font: inherit; }
  button { color: #18191B; }
  button, summary { cursor: pointer; }
  ul, ol { padding-left: 1.3em; }
  a, button, summary { min-height: 44px; min-width: 44px; }
  .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 500; }
  .skip-link { position: fixed; left: -10000px; top: 12px; padding: 8px 16px; max-width: calc(100vw - 40px); background-color: #FBFAF7; z-index: 10; }
  .skip-link:focus-visible { left: 20px; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
}
@layer frame {
  .utility-strip { position: relative; display: flex; justify-content: center; align-items: center; padding: 10px 20px; min-height: 44px; width: 100%; font-size: 16px; line-height: 1.5; letter-spacing: 0; white-space: nowrap; background-color: #FBFAF7; color: #18191B; z-index: 2; }
  .corner-header { position: relative; min-height: 102px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; padding: 20px 28px 18px; column-gap: 20px; background-color: #FBFAF7; }
  .wordmark { display: block; font-family: 'Newsreader', serif; font-weight: 300; font-size: clamp(1.7rem, 2.6vw, 2.55rem); line-height: 1.08; text-decoration: none; text-align: center; padding-top: 3px; letter-spacing: 0; }
  .menu { position: relative; justify-self: start; z-index: 5; font-size: 16px; }
  .menu summary { list-style: none; display: flex; align-items: center; gap: 9px; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu-panel { position: absolute; left: 0; top: 53px; width: 306px; padding: 16px 22px; background-color: #FBFAF7; border: 1px solid #c3c1bb; }
  .menu:not([open]) .menu-panel { display: none; }
  .menu-panel a { display: flex; align-items: center; padding: 6px 0; }
  .corner-links { display: flex; justify-content: flex-end; gap: 24px; font-size: 16px; }
  .corner-links a { display: inline-flex; align-items: center; text-decoration: none; }
  .chapter-nav { display: flex; flex-wrap: wrap; column-gap: 27px; padding: 0 28px 12px; font-size: 16px; }
  .chapter-nav a { display: inline-flex; align-items: center; text-decoration: none; }
  a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
  .scene-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; background-color: #eae7df; }
  .home-stage { position: relative; min-height: 856px; min-height: calc(100svh - 44px); background-color: #FBFAF7; isolation: isolate; }
  .home-stage > .scene-photo { position: absolute; inset: 0; z-index: -2; object-position: 43% 50%; }
  .home-stage::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(251,250,247,0.94) 0%, rgba(251,250,247,0.72) 14%, rgba(251,250,247,0) 36%, rgba(251,250,247,0.06) 70%, rgba(251,250,247,0.2) 100%); }
  .home-stage > header > .utility-strip { position: absolute; top: -44px; }
  .home-stage { margin-top: 44px; }
  .home-header { background-color: transparent; min-height: 190px; grid-template-columns: 1fr 1fr; }
  .home-header .wordmark { position: absolute; top: 67px; width: calc(100% - 56px); left: 28px; font-size: clamp(2.75rem, 5.4vw, 5rem); font-weight: 300; }
  .home-header .corner-links { grid-column: 2; }
  .hero-caption { position: absolute; bottom: 32px; right: 32px; width: 448px; padding: 27px 28px 19px; background-color: rgba(255,255,255,0.9); color: #18191B; }
  .hero-caption h1 { font-size: clamp(1.65rem, 2.15vw, 2rem); line-height: 1.16; letter-spacing: 0.035em; }
  .hero-caption p { margin-top: 16px; font-size: 16px; line-height: 1.5; }
  .hero-caption .text-link { margin-top: 7px; }
  .home-reading { display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 330px); justify-content: space-between; gap: 90px; padding: 105px 7vw 120px; }
  .chapter-index { align-self: start; }
  .chapter-index h2 { margin-bottom: 28px; }
  .chapter-index a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 13px 0; border-bottom: 1px solid #c9c7c0; text-decoration: none; font-size: 17px; }
  .opening-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
  .opening-title { display: flex; flex-direction: column; justify-content: center; align-items: start; padding: 70px 8% 70px 28px; }
  .opening-title h1 { max-width: 11em; }
  .opening-title p { max-width: 34em; margin-top: 28px; font-size: 18px; }
  .opening-photo { aspect-ratio: 1 / 1; min-width: 0; }
  .site-footer { padding: 55px 28px 0; border-top: 1px solid #c9c7c0; background-color: #FBFAF7; }
  .footer-main { display: grid; grid-template-columns: 1.4fr 1fr; gap: 90px; padding-bottom: 70px; }
  .footer-name { font-family: 'Newsreader', serif; font-weight: 300; font-size: clamp(2.7rem, 6.1vw, 6.8rem); line-height: 0.98; letter-spacing: 0; max-width: 7.2em; margin-bottom: 30px; }
  .footer-purpose { max-width: 47ch; font-size: 17px; }
  .footer-main .text-link { margin-top: 15px; }
  .footer-links { align-self: start; display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; padding-top: 8px; }
  .footer-links a { display: flex; align-items: center; font-size: 16px; padding: 8px 0; }
  .footer-bottom { display: flex; align-items: center; gap: 32px; justify-content: space-between; padding: 17px 0; border-top: 1px solid #c9c7c0; font-size: 16px; }
  .footer-bottom a { display: flex; align-items: center; }
  .missing-page { min-height: 55vh; padding: 70px 28px 100px; max-width: 780px; }
  .missing-page p { margin-top: 30px; }
  .missing-page a { margin-top: 20px; }
}
@layer reading {
  .prose { max-width: 680px; }
  .prose .subtopic { margin-top: 32px; }
  .prose p { margin: 21px 0 0; }
  .prose a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; max-width: 100%; white-space: normal; }
  .reading-section + .reading-section { margin-top: 67px; }
  .reading-section h2 { max-width: 25ch; }
  .chapter-copy { margin: 100px auto 90px; padding: 0; }
  .margin-note { margin: 28px 0 30px 24px; padding: 2px 0 2px 25px; border-left: 1px solid #8b8a84; }
  .margin-note p { margin: 0; font-size: 17px; line-height: 1.65; }
  .source-notes { margin-top: 75px; padding-top: 40px; border-top: 1px solid #c9c7c0; }
  .source-notes h2 { font-size: 1.9rem; }
  .source-notes ul { list-style: none; padding: 14px 0 0; }
  .source-notes li { margin-top: 3px; }
  .source-notes a { font-size: 16px; }
  .checking-steps { margin: 30px 0 0; padding-left: 25px; }
  .checking-steps li { margin-top: 30px; padding-left: 10px; }
  .checking-steps p { margin-top: 10px; }
  .page-turn { border-top: 1px solid #c9c7c0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 15px 30px; padding: 28px; font-size: 16px; }
  .page-turn a { display: flex; align-items: center; }
}
@layer questions {
  .question-list { margin-top: 32px; }
  .question-list fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
  .question-list legend { font-size: 18px; font-weight: 500; padding: 0 0 20px; }
  .question-item { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 20px; align-items: start; padding: 20px 0; border-top: 1px solid #c9c7c0; font-size: 18px; cursor: pointer; }
  .question-item input { appearance: none; -webkit-appearance: none; width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; border: 1px solid #777873; background-color: #FBFAF7; border-radius: 0; display: grid; place-content: center; cursor: pointer; }
  .question-item input:checked { background-color: #18191B; border-color: #18191B; }
  .question-item input:checked::after { content: ''; display: block; width: 10px; height: 19px; border: solid #ffffff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-2px,-2px); }
  .question-item span { padding-top: 6px; }
  .check-actions { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 24px; }
  .check-actions button { padding: 9px 0; border: 0; background-color: #FBFAF7; text-decoration: underline; text-underline-offset: 5px; font-size: 16px; }
  .check-status { font-size: 16px; }
}
@layer narrow {
  @media (max-width: 1050px) {
    .home-reading { gap: 45px; padding: 80px 28px; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); }
    .corner-header { grid-template-columns: 1fr auto 1fr; gap: 12px; padding-inline: 24px; }
    .home-header { grid-template-columns: 1fr 1fr; }
    .corner-links { gap: 15px; }
    .footer-main { gap: 45px; }
    .opening-title { padding-right: 25px; }
    .opening-title h1 { font-size: 2.35rem; }
    .opening-title p { font-size: 17px; }
    .chapter-copy { margin: 75px auto; padding: 0 28px; max-width: 736px; }
  }
  @media (min-width: 761px) and (max-width: 900px) {
    .utility-strip { padding-inline: 15px; white-space: nowrap; font-size: 16px; }
    .corner-header:not(.home-header) { grid-template-columns: 1fr 1fr; padding-bottom: 70px; }
    .corner-header:not(.home-header) .wordmark { position: absolute; top: 74px; left: 24px; right: 24px; font-size: 34px; }
    .corner-header .corner-links { grid-column: 2; }
    .home-header .wordmark { top: 83px; }
  }
  @media (max-width: 760px) {
    .utility-strip { padding: 12px 20px; min-height: 96px; font-size: 16px; line-height: 1.5; white-space: normal; }
    .corner-header { min-height: 160px; padding: 14px 20px 20px; grid-template-columns: 1fr 1fr; }
    .corner-header .wordmark { position: absolute; top: 74px; left: 20px; width: calc(100% - 40px); font-size: clamp(1.8rem,7.8vw,2.6rem); }
    .corner-header .corner-links { grid-column: 2; }
    .home-header { min-height: 240px; }
    .home-header .wordmark { top: 78px; right: 20px; font-size: clamp(2.75rem,11.7vw,4.5rem); max-width: 7.2em; margin-inline: auto; }
    .home-stage { margin-top: 96px; min-height: max(680px, calc(100svh - 96px)); }
    .home-stage > header > .utility-strip { top: -96px; }
    .home-stage > .scene-photo { object-position: 38% 50%; }
    .home-stage::before { background: linear-gradient(180deg,rgba(251,250,247,0.94),rgba(251,250,247,0.64) 18%,rgba(251,250,247,0) 40%); }
    .hero-caption { bottom: 20px; left: 20px; right: 20px; width: auto; padding: 24px 24px 17px; }
    .hero-caption h1 { font-size: 1.65rem; line-height: 1.18; }
    .hero-caption p { margin-top: 14px; }
    .home-reading { display: flex; flex-direction: column; padding: 62px 20px 75px; gap: 55px; }
    .chapter-index { order: -1; width: 100%; }
    .chapter-index a { min-height: 66px; }
    .opening-split { display: flex; flex-direction: column; }
    .opening-title { min-height: 330px; padding: 48px 20px; }
    .opening-title h1 { font-size: clamp(2rem,9vw,3rem); max-width: 12em; }
    .opening-title p { font-size: 18px; margin-top: 23px; }
    .opening-photo { width: 100%; aspect-ratio: 1.12 / 1; }
    .chapter-nav { padding: 0 20px 18px; gap: 0 19px; font-size: 16px; }
    .chapter-copy { padding: 0 20px; margin: 62px auto; }
    .reading-section + .reading-section { margin-top: 52px; }
    .margin-note { margin-left: 12px; padding-left: 20px; }
    .footer-main { grid-template-columns: 1fr; gap: 36px; padding-bottom: 35px; }
    .site-footer { padding: 40px 20px 0; }
    .footer-name { font-size: clamp(2.55rem,10.9vw,4.5rem); margin-bottom: 24px; }
    .footer-purpose { font-size: 17px; }
    .footer-links { gap: 0 25px; }
    .footer-bottom { flex-wrap: wrap; gap: 4px 24px; align-items: center; }
    .footer-bottom p { flex-basis: 100%; }
    .page-turn { padding: 20px; }
    .page-turn a { flex-basis: 100%; }
    .menu-panel { width: min(306px,calc(100vw - 40px)); }
    .question-item { gap: 16px; }
    .missing-page { padding-inline: 20px; }
  }
}
@layer printing {
  @media print {
    body { background-color: #ffffff; color: #18191B; font-size: 12pt; }
    .corner-header, .chapter-nav, .site-footer, .page-turn, .opening-photo, .check-actions, .skip-link { display: none; }
    .opening-split { display: block; }
    .opening-title { display: block; padding: 25px 0; min-height: 0; }
    .utility-strip { padding: 0; min-height: 0; white-space: normal; }
    .chapter-copy { max-width: none; margin: 20px 0; padding: 0; }
    .question-item { break-inside: avoid; }
  }
}
