@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f8f5ec;
  --ink: #302e24;
  --quiet: #655e4c;
  --ochre: #d5aa37;
  --marker: #e9ca69;
  --rule: #dcd5c2;
  --book: "Source Serif 4", Georgia, "Times New Roman", serif;
  --heading: "Barlow Condensed", "Arial Narrow", "Liberation Sans Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.125rem/1.65 var(--book); }
h1, h2, h3, h4 { font-family: var(--heading); font-weight: 600; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(3.4rem, 5.2vw, 5.2rem); margin: 0 0 1.5rem; letter-spacing: -.015em; }
h2 { font-size: clamp(2.4rem, 3.5vw, 3.6rem); margin: 0; }
h3, h4 { font-size: 1.8rem; margin: 2.15rem 0 .75rem; }
p { margin: 0 0 1.2rem; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: .075em; }
a:hover { text-decoration-thickness: .16em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 2px solid var(--ink); border-radius: 0; min-height: 48px; padding: .65rem 1rem; cursor: pointer; background: var(--paper); }
button:hover { background: #eee5cd; }
button:disabled { cursor: default; color: #6a624e; border-color: #8b7d5b; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { font-weight: 600; padding: 0 0 1rem; }
label { cursor: pointer; }
input[type="checkbox"] { accent-color: var(--ink); width: 44px; height: 44px; flex: 0 0 44px; margin: 0; cursor: pointer; }
textarea { width: 100%; border: 2px solid var(--ink); padding: 1rem; background: var(--paper); line-height: 1.55; border-radius: 0; resize: vertical; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
figcaption { font-size: 1rem; line-height: 1.5; color: var(--quiet); }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: #eed582; }

.skip { position: absolute; z-index: 20; left: 1rem; top: -7rem; background: var(--ink); color: var(--paper); padding: .8rem 1rem; min-height: 48px; }
.skip:focus { top: 1rem; }

.masthead { max-width: 1360px; margin: auto; padding: 1.45rem 2.8rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; border-bottom: 2px solid var(--ink); }
.masthead__home { display: flex; align-items: center; gap: .85rem; text-decoration: none; font-size: 1.35rem; line-height: 1.25; min-height: 48px; }
.masthead__place { display: block; font-size: 1rem; margin-top: .3rem; color: var(--quiet); }
.masthead__flower { flex: 0 0 44px; overflow: visible; transform: rotate(-9deg); }
.masthead__flower path { fill: var(--marker); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.masthead__flower circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.masthead__question { display: inline-flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 1.4rem; font-size: 1rem; }

.notebook { display: grid; grid-template-columns: 182px minmax(0, 1fr); grid-template-areas: "rail arrival" "rail chapters"; gap: 0 3.25rem; max-width: 1360px; margin: auto; padding: 3.6rem 2.8rem 5rem; }
.arrival { grid-area: arrival; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 30%); align-items: center; gap: 1.7rem; padding-bottom: 4.5rem; }
.arrival__words { min-width: 0; }
.arrival__prelude { font-size: 1rem; margin-bottom: 1.1rem; color: var(--quiet); }
.arrival__mark { position: relative; background: linear-gradient(177deg, transparent 0 71%, var(--marker) 72% 89%, transparent 90%); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 .04em; }
.arrival__framing { font-weight: 600; }
.arrival__jump { display: inline-flex; align-items: center; gap: 1.5rem; min-height: 48px; padding: .55rem 0; font-size: 1.05rem; font-weight: 600; }
.arrival__picture { position: relative; padding: 1.5rem 0 0; align-self: center; }
.arrival__crop { aspect-ratio: 1; background: #ece2c9; border-radius: 49% 51% 47% 53% / 52% 48% 52% 48%; overflow: hidden; transform: rotate(3deg); }
.arrival__crop img { width: 100%; height: 100%; object-fit: cover; transform: rotate(-3deg) scale(1.06); font-size: 1rem; line-height: 1.4; color: var(--quiet); }
.arrival__picture figcaption { margin: 1.25rem .5rem 0; max-width: 20ch; font-style: italic; }
.arrival__loop { position: absolute; width: 90px; height: 32px; border: 2px solid var(--quiet); border-right-color: transparent; border-radius: 50%; bottom: -28px; right: 20px; transform: rotate(-18deg); pointer-events: none; }
.arrival__loop::after { content: ""; position: absolute; width: 11px; height: 11px; border-right: 2px solid var(--quiet); border-bottom: 2px solid var(--quiet); right: 2px; bottom: -2px; transform: rotate(18deg); }

.contents { grid-area: rail; position: sticky; top: 1.75rem; align-self: start; padding-top: .2rem; }
.contents__title { font: 600 1.5rem/1.2 var(--heading); margin-bottom: 1rem; }
.contents__links { display: grid; }
.contents__links a { position: relative; display: flex; align-items: center; min-height: 48px; padding: .6rem .4rem .6rem 1.15rem; border-bottom: 1px solid var(--rule); font-size: 1rem; line-height: 1.4; text-decoration: none; }
.contents__links a::before { content: ""; position: absolute; left: 0; width: 5px; height: 5px; background: var(--quiet); border-radius: 50%; }
.contents__links a:hover, .contents__links a[aria-current="location"] { background: #efe7ce; }
.contents__note { font-size: 1rem; font-style: italic; line-height: 1.5; color: var(--quiet); margin-top: 1.3rem; max-width: 16ch; }

.chapters { grid-area: chapters; min-width: 0; }
.chapter { padding: 3.4rem 0 3.7rem; border-top: 2px solid var(--ink); }
.chapter__heading { margin-bottom: 2rem; max-width: 45rem; }
.chapter__heading h3 { font-size: clamp(2.4rem, 3.5vw, 3.6rem); margin: 0; }
.chapter__cue { margin: 0 0 .7rem; font-style: italic; font-size: 1rem; color: var(--quiet); }
.chapter__body { max-width: 67ch; }
.chapter__body > :last-child { margin-bottom: 0; }
.chapter__body > :is(h3, h4):first-child { margin-top: 0; }
.chapter--opening { padding-top: 2.5rem; }
.chapter--note { padding: 2.7rem 2.4rem 3rem; background: #f0e5c2; border-top: 0; margin: .4rem 0 2rem; position: relative; }
.chapter--note::before { content: ""; position: absolute; top: -.3rem; left: 2.3rem; width: 106px; height: 11px; background: var(--ochre); transform: rotate(-2deg); }
.chapter--note + .chapter { border-top: 0; padding-top: 2rem; }
.chapter__margin { border-left: 4px solid var(--ochre); padding: .3rem 0 .3rem 1.2rem; font-style: italic; margin-top: 1.8rem; }

.question-sheet { background: var(--marker); border: 2px solid var(--ink); padding: 2.6rem 2.4rem; margin: 1rem 0 3.5rem; }
.question-sheet__heading { margin-bottom: 1.4rem; max-width: 39rem; }
.question-sheet .chapter__cue { color: #4f4329; }
.question-sheet > p { max-width: 64ch; }
.question-sheet__choices { margin-top: 1.8rem; }
.question-sheet__choice { display: flex; align-items: flex-start; gap: 1rem; min-height: 68px; padding: 1rem 0; border-top: 1px solid #a98a3f; }
.question-sheet__choice span { min-width: 0; }
.question-sheet__choice:has(input:checked) span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.question-sheet__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.3rem 0 1rem; }
.question-sheet__copy { background: var(--ink); color: var(--paper); }
.question-sheet__copy:hover { background: #504a35; }
.question-sheet__copy:disabled { background: #e9cf86; color: #51472e; }
.question-sheet__status { font-size: 1rem; line-height: 1.5; margin-top: 1.4rem; margin-bottom: 0; }
.question-sheet__result { margin-top: 1.5rem; }
.question-sheet__result label { display: block; margin-bottom: .6rem; }
.question-sheet__result p { font-size: 1rem; margin: .6rem 0 0; }

.chapter--reading { padding-bottom: 0; }
.reading-group { margin: 2.25rem 0; }
.reading-group h3 { margin-bottom: .65rem; }
.reading-group__link { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 48px; padding: .65rem .1rem; font-size: 1rem; line-height: 1.5; border-bottom: 1px solid var(--rule); text-decoration: none; }
.reading-group__link span { flex: 0 0 auto; }
.reading-group__link:hover { background: #f0e8d1; text-decoration: underline; }
.colophon { max-width: 1360px; margin: 0 auto; padding: 2.2rem 2.8rem 2.5rem; border-top: 2px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, auto); gap: 2rem 4rem; font-size: 1rem; }
.colophon > p { max-width: 53ch; margin: .5rem 0 0; }
.colophon__links { display: grid; }
.colophon__links a { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; min-height: 48px; padding: .6rem 0; text-decoration: none; }
.colophon__links a:hover { text-decoration: underline; }
.lost-page { max-width: 56rem; min-height: 58vh; padding: 5rem 2.5rem; margin: auto; }
.lost-page h1 { max-width: 15ch; }
.lost-page p { max-width: 61ch; }

@media (min-width: 1500px) { .notebook, .masthead, .colophon { max-width: 1420px; } }
@media (max-width: 1150px) {
  .notebook { padding: 3rem 2rem 4rem; grid-template-columns: 160px minmax(0, 1fr); gap: 0 2.2rem; }
  .arrival { grid-template-columns: minmax(0, 1fr); }
  .arrival__picture { max-width: 260px; display: grid; grid-template-columns: 150px 1fr; gap: 1.3rem; padding-top: 0; align-items: center; }
  .arrival__picture figcaption { margin: 0; }
  .arrival__loop { display: none; }
  h1 { font-size: 4.5rem; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 1rem; }
  body { font-size: 1.0625rem; line-height: 1.65; }
  .masthead { padding: 1.1rem 1.25rem; gap: 1rem; }
  .masthead__home { font-size: 1.25rem; gap: .7rem; }
  .masthead__place { max-width: 25ch; font-size: 1rem; line-height: 1.3; }
  .masthead__question { display: none; }
  .notebook { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "arrival" "rail" "chapters"; padding: 2rem 1.25rem 3rem; }
  .arrival { display: block; padding-bottom: 2.4rem; }
  h1 { font-size: clamp(3.1rem, 12.7vw, 4.5rem); line-height: 1.04; margin-bottom: 1.4rem; }
  .arrival__prelude { margin-bottom: 1.2rem; }
  .arrival__framing { font-size: 1.0625rem; }
  .arrival__picture { max-width: none; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 1.5rem; align-items: center; margin-top: 2rem; }
  .arrival__picture figcaption { max-width: 16ch; margin: 0; }
  .contents { position: static; padding: 1.2rem 0 1.6rem; border-top: 2px solid var(--ink); }
  .contents__links { grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .contents__links a { min-height: 48px; padding-right: .15rem; }
  .contents__note { max-width: none; margin: 1rem 0 0; }
  .chapter { padding: 2.5rem 0 2.8rem; }
  h2 { font-size: 2.65rem; }
  .chapter__heading h3 { font-size: 2.65rem; }
  h3, h4 { font-size: 1.85rem; margin-top: 1.9rem; }
  .chapter__heading { margin-bottom: 1.5rem; }
  .chapter--note { margin: 0 -0.1rem 1.3rem; padding: 2rem 1.2rem 2.25rem; }
  .chapter--note::before { left: 1.2rem; }
  .chapter--note + .chapter { padding-top: 1.5rem; }
  .question-sheet { padding: 2rem 1.1rem; margin: .5rem 0 2.5rem; }
  .question-sheet__actions { display: grid; }
  .question-sheet__choice { gap: .8rem; padding: 1rem 0; }
  .reading-group__link { gap: .9rem; }
  .colophon { display: block; padding: 1.6rem 1.25rem 2rem; }
  .colophon__links { margin-top: 1.25rem; }
  .lost-page { padding: 3rem 1.25rem; }
  .chapter--reading { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: white; color: black; font-size: 12pt; }
  .masthead, .contents, .skip, .arrival__jump, .question-sheet__actions, .colophon__links, .question-sheet__result { display: none !important; }
  .notebook { display: block; padding: 0; max-width: none; }
  .arrival { display: block; padding-bottom: 1.5rem; }
  .arrival__picture { display: none; }
  .chapter, .question-sheet { padding: 1rem 0; margin: 0; background: transparent; border-top: 1px solid black; }
  .question-sheet { border: 0; }
  h1 { font-size: 32pt; }
  h2 { font-size: 24pt; break-after: avoid; }
  h3, h4 { font-size: 18pt; break-after: avoid; }
  .chapter__heading h3 { font-size: 24pt; }
  p, .question-sheet__choice { orphans: 3; widows: 3; }
  .colophon { display: block; padding: 1rem 0; }
}
