:root {
  color-scheme: light;
  --ink: #153833;
  --deep: #123f39;
  --water: #d9eae4;
  --paper: #fcf9f0;
  --ochre: #f3c977;
  --gutter: clamp(20px, 3.2vw, 48px);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Trebuchet MS', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--sans); }
p, h1, h2, h3, figure { margin: 0; }
p + p { margin-top: .65em; }
h1, h2, h3 { font-family: var(--serif); font-weight: normal; }
a { color: inherit; text-underline-offset: .19em; text-decoration-thickness: .085em; }
a:hover { text-decoration-thickness: .16em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #996105; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
.kit-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35em 1.4em; padding: .85em var(--gutter); background: var(--deep); color: white; font: 16px/1.45 var(--sans); }
.kit-nav a { padding: .22em 0; }
.kit-nav a:first-child { margin-right: auto; font-weight: bold; text-decoration: none; }
.home-book { --paper: #f6f7f2; }
main.home { max-width: 1850px; margin: auto; }
.cover { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: stretch; background: var(--water); }
.cover-title { display: flex; justify-content: center; flex-direction: column; gap: 1.25em; padding: clamp(32px, 5vw, 95px) var(--gutter); }
.cover h1 { font-size: clamp(46px, 6.5vw, 112px); letter-spacing: -.048em; line-height: .95; }
.cover h1 span { display: block; }
.cover p { max-width: 36ch; }
.cover .cover-art { width: 100%; min-height: 100%; object-fit: cover; object-position: center; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .85em 1.25em; }
.primary, .story-controls button { display: inline-block; background: var(--deep); color: white; font: inherit; padding: .75em 1.15em; border: 0; text-decoration: none; cursor: pointer; }
.primary:hover, .story-controls button:hover { background: #25594d; }
.chapter, .printing, .keep { padding: clamp(38px, 6vw, 90px) var(--gutter); }
.chapter { display: grid; grid-template-columns: minmax(0,.76fr) minmax(0,1.24fr); align-items: center; gap: clamp(26px,5vw,84px); }
.chapter h2, .printing h2, .keep h2 { font-size: clamp(38px, 5vw, 78px); line-height: .99; letter-spacing: -.047em; }
.chapter h2 { max-width: 10ch; margin-bottom: .26em; }
.chapter figure { margin: 0; }
.chapter figure img { width: 100%; }
.chapter figcaption, .source-line { font-size: 15px; }
.chapter figcaption { margin-top: .45em; }
.resource { margin-top: 1.25em; }
.resource h3 { font-size: clamp(24px,2.1vw,34px); letter-spacing: -.035em; line-height: 1.1; margin-bottom: .23em; }
.resource p { max-width: 54ch; }
.file-links { display: flex; flex-wrap: wrap; gap: .25em 1.15em; margin-top: .45em; }
.printing { background: var(--water); display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: clamp(24px,5vw,80px); align-items: center; }
.print-instructions h2 { margin-bottom: .32em; }
.setup-proof { width: min(100%, 375px); justify-self: center; }
.setup-proof img { width: 100%; }
.setup-proof figcaption { margin-top: .45em; font-size: 15px; }
.printing h2 { max-width: 11ch; }
.printing p, .details-body { max-width: 65ch; }
.printing details { margin-top: .85em; }
summary { cursor: pointer; text-decoration: underline; text-underline-offset: .18em; padding: .25em 0; }
.details-body { margin-top: .55em; }
.keep { background: var(--deep); color: #f7f8f4; display: grid; grid-template-columns: minmax(0,1.13fr) minmax(0,.87fr); gap: clamp(20px,4vw,65px); align-items: center; }
.keep img { width: 100%; }
.keep h2 { margin-bottom: .35em; }
.keep .primary { background: var(--ochre); color: var(--ink); margin: 1em 0; }
.keep .source-line { margin-top: .5em; }
.story-book { background: #d0dfd7; }
.story-main { padding: 14px 16px 20px; max-width: 1550px; margin: auto; }
.story-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45em 1em; padding: .6em var(--gutter); background: var(--paper); }
.story-controls[hidden], .story-frame[hidden] { display: none; }
.story-controls button { padding: .55em .85em; }
.story-controls button:disabled { background: #d1dad5; color: #455953; cursor: default; }
.story-frame { display: grid; grid-template-columns: minmax(0,1.22fr) minmax(0,.78fr); grid-template-rows: 1fr auto; background: var(--paper); margin-bottom: 1.2em; }
.story-frame img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; }
.frame-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 3.2vw, 64px); }
.frame-copy h2 { font-size: clamp(30px, 4.2vw, 74px); letter-spacing: -.045em; line-height: 1.02; margin: 0 0 .45em; }
.frame-copy p { font: clamp(18px, 1.5vw, 25px)/1.46 var(--serif); max-width: 37ch; }
.frame-footer, .terms-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px 18px; background: var(--deep); color: white; font: 14px/1.3 var(--sans); }
.terms-main { background: #e3eae6; padding: 14px var(--gutter); }
.terms-page { width: min(100%, 770px); margin: 0 auto 20px; padding: clamp(20px,3vw,44px); background: white; overflow-wrap: anywhere; }
.terms-page h1, .terms-page h2 { font-size: clamp(29px,3.1vw,44px); line-height: 1.08; margin: 0 0 .45em; letter-spacing: -.035em; }
.terms-page h3 { font-size: 22px; line-height: 1.15; margin: .85em 0 .35em; }
.terms-page blockquote { margin: .65em 0 .65em 1.35em; }
.terms-footer { margin-top: 1.5em; }
@media (max-width: 800px) {
  .cover, .chapter, .printing, .keep, .story-frame { grid-template-columns: 1fr; }
  .cover { display: flex; flex-direction: column; }
  .cover-title { gap: .65em; padding: 22px var(--gutter) 26px; }
  .cover h1 { font-size: clamp(47px, 10vw, 76px); }
  .cover h1 span { display: inline; }
  .cover .cover-art { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
  .chapter figure { order: 2; }
  .chapter h2, .printing h2 { max-width: none; }
  .keep img { order: 2; }
  .story-main { padding: 8px; }
  .story-frame { margin-bottom: .8em; }
  .story-frame img { height: auto; aspect-ratio: 3/2; }
  .frame-copy { padding: 20px; }
  .frame-copy h2 { font-size: 33px; }
  .frame-copy p { max-width: none; }
  .story-controls { gap: .35em .6em; font-size: 15px; }
  .kit-nav { gap: .25em 1em; font-size: 15px; }
  .frame-footer { font-size: 12px; }
}
@media screen and (max-width: 600px) {
  .kit-nav a:first-child { width: 100%; }
  .cover h1 span { display: block; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  .home-book .reveal-once { animation: settle-in .4s ease-out both; }
  @keyframes settle-in { from { opacity: .4; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
}
@media (min-width: 801px) {
  .story-frame { min-height: min(58vw, 690px); }
}
@media print {
  @page { size: letter; margin: 0; }
  @page story { size: 12in 6.75in; margin: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .kit-nav, .story-controls { display: none !important; }
  html, body, .story-main, .terms-main { margin: 0; padding: 0; max-width: none; background: white; }
  .story-book { page: story; }
  .story-frame, .story-frame[hidden] { display: grid !important; page: story; width: 12in; height: 6.75in; min-height: 0; grid-template-columns: 7.15in 4.85in; grid-template-rows: 6.37in .38in; margin: 0; break-after: page; break-inside: avoid; }
  .story-frame:last-child, .terms-page:last-child { break-after: auto; }
  .story-frame img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; background: var(--water); }
  .frame-copy { padding: .29in; }
  .frame-copy h2 { font-size: 32pt; }
  .frame-copy p { font: 16pt/1.36 var(--serif); max-width: none; }
  .frame-footer, .terms-footer { display: flex; font-size: 8pt; padding: .06in .23in; }
  .terms-page { height: 11in; width: 8.5in; max-width: none; margin: 0; padding: .65in .7in .5in; display: flex; flex-direction: column; break-after: page; break-inside: avoid; font: 11.1pt/1.35 Arial, sans-serif; color: #182b28; }
  .terms-body { flex: 1; min-height: 0; }
  .terms-page h1, .terms-page h2 { font: 25pt/1.06 Georgia, serif; margin-bottom: .2in; }
  .terms-page h3 { font: 15pt/1.1 Georgia, serif; }
  .terms-footer { margin-top: .15in; }
  .frame-footer a { color: white; text-decoration: none; }
}
