:root {
  color-scheme: light;
  --cream: #f8f5ed;
  --white: #fffefa;
  --ink: #202e25;
  --green: #234637;
  --sage: #e8eee4;
  --muted: #4a594e;
  --clay: #874320;
  --rule: #c9cfc1;
  --control: #79897d;
  --display: Georgia, serif;
  --body: system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.55 var(--body); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: var(--clay); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 4px; }
button, select, textarea { font: 1rem/1.4 var(--body); color: inherit; }
button { cursor: pointer; }
button:disabled, fieldset:disabled button { cursor: default; opacity: .58; }
.wrap { width: min(100% - 2rem, 74rem); margin-inline: auto; }
.masthead, footer { background: var(--white); }
.masthead { border-bottom: 1px solid var(--rule); }
.mast-row, .footer-row { display: flex; align-items: center; gap: .4rem 1.5rem; justify-content: space-between; flex-wrap: wrap; }
.mast-row { padding-block: .6rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: .5rem; font: bold 26px/1 var(--display); text-decoration: none; }
.brand span { color: var(--clay); margin-left: -.47rem; }
nav { display: flex; gap: 0 1rem; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; text-decoration: none; }
nav a[aria-current], nav a:hover { text-decoration: underline; }
.skip { position: absolute; z-index: 1; background: var(--white); padding: .6rem; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; text-wrap: balance; margin: 0 0 .65rem; }
h1 { font-size: clamp(2.25rem, 6vw, 4.1rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.65rem); letter-spacing: -.035em; }
h3 { font-size: 1.42rem; }
p { margin: 0 0 .85rem; }
.kicker { color: var(--clay); font-size: .875rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.intro { font-size: 1.125rem; line-height: 1.6; max-width: 60ch; color: var(--muted); }
.hero { display: grid; align-items: center; gap: 1.25rem 2.5rem; padding-block: 2rem; }
.hero h1 { font-size: clamp(2.65rem, 8vw, 5rem); }
.featured { display: grid; align-items: end; margin: 0; background: var(--sage); border: 1px solid var(--rule); overflow: hidden; border-radius: 10px; }
.featured img { width: min(54%, 14rem); margin: .85rem auto -2rem; transform: rotate(-5deg); border: 1px solid var(--rule); box-shadow: 0 4px 16px #23463726; }
.featured figcaption { z-index: 0; display: flex; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; padding: .65rem .85rem; background: var(--green); color: var(--white); font-size: .875rem; }
.section { border-top: 1px solid var(--rule); padding-block: 1.7rem 2.1rem; }
.sample-grid, .tool-grid, .list-grid, .list-work { display: grid; gap: 1rem; align-items: start; }
.sample, .tool-grid article, .list-grid article { background: var(--white); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem; }
.sample { display: grid; gap: .85rem; }
.sample img { width: 7.5rem; border: 1px solid var(--rule); }
.tool-grid article { background: var(--sage); }
.downloads { display: flex; align-items: center; gap: .35rem .9rem; flex-wrap: wrap; margin-block: .65rem .25rem; font-size: 16px; }
.downloads > a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; }
.button, .quiet {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .6rem .9rem; border: 1px solid var(--green);
  border-radius: 5px; text-align: center; font: 650 1rem/1.35 var(--body);
  text-decoration: none;
}
.button { background: var(--green); color: var(--white); }
.button:hover { background: #163629; color: var(--white); }
.quiet { background: var(--white); color: var(--green); }
.quiet:hover:not(:disabled) { background: var(--sage); }
.teacher-links { flex-basis: 100%; color: var(--muted); font-size: .875rem; }
.teacher-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .3rem; }
.page-intro { padding-block: 1.65rem 1.2rem; }
.page-intro > a { display: inline-block; margin-bottom: .7rem; }
.workbench { display: grid; gap: 1rem; margin-bottom: 2rem; align-items: start; }
form, .output { min-width: 0; border: 1px solid var(--rule); border-radius: 8px; padding: clamp(.85rem, 2.5vw, 1.5rem); }
form { background: var(--sage); }
.output { background: var(--white); }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
label, legend { display: block; font-size: 16px; font-weight: 700; }
textarea, select { display: block; width: 100%; margin: .3rem 0 .65rem; border: 1px solid var(--control); border-radius: 5px; background: var(--white); padding: .55rem .65rem; }
select { min-height: 44px; }
textarea { resize: none; min-height: 6rem; }
textarea[aria-invalid] { border: 2px solid var(--clay); }
.help { font-size: .875rem; color: var(--muted); margin-bottom: .85rem; }
form > .help { margin: .65rem 0 0; }
.error { color: #7f241e; font-size: 1rem; font-weight: 600; }
.choices { margin: .5rem 0 .65rem; }
.choices label { display: flex; align-items: center; min-height: 44px; gap: .5rem; font-weight: 500; }
.choices input { width: 19px; height: 19px; accent-color: var(--green); }
.build { width: 100%; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr)); gap: 0 .65rem; }
.paper { width: 100%; max-width: 37rem; margin-inline: auto; border: 1px solid var(--rule); box-shadow: 0 5px 15px #23463712; }
.output > .paper { margin-top: .9rem; }
.page-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
#page-number, #status { font-size: .875rem; color: var(--muted); }
details { margin-top: .65rem; }
summary { cursor: pointer; font-size: 16px; padding-block: .55rem; }
.prose { max-width: 65ch; font-size: 18px; line-height: 1.7; }
.prose h3 { margin-top: 1.1rem; }
dt { font-weight: 700; }
dd { margin: 0 0 .5rem; }
.word-bank { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: .4rem; }
.word-bank li { padding: .25rem .65rem; background: var(--sage); border: 1px solid var(--rule); border-radius: 4px; }
footer { border-top: 1px solid var(--rule); padding-block: 1rem; }
.footer-row p { margin: 0; font-size: .875rem; }
#print-sheets { display: none; }

@media (max-width: 27rem) {
  .page-controls { display: grid; grid-template-columns: 1fr 1fr; }
  #page-number { grid-row: 2; grid-column: 1 / -1; }
}
@media (min-width: 42rem) {
  .sample { grid-template-columns: auto 1fr; }
  .tool-grid, .list-work { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workbench { grid-template-columns: minmax(18rem, 2fr) minmax(0, 3fr); }
}
@media (min-width: 58rem) {
  .hero { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); padding-block: 2.25rem; }
  .sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@page chalk-letter { size: letter portrait; margin: 0; }
@page chalk-a4 { size: A4 portrait; margin: 0; }
@media print {
  body:has(#print-sheets .print-sheet) { background: white; }
  body:has(#print-sheets .print-sheet) > :not(main),
  main:has(#print-sheets .print-sheet) > :not(#print-sheets) { display: none; }
  main:has(#print-sheets .print-sheet) { width: 100%; margin: 0; }
  #print-sheets:has(.print-sheet) { display: block; }
  #print-sheets[data-paper="letter"] { page: chalk-letter; }
  #print-sheets[data-paper="a4"] { page: chalk-a4; }
  .print-sheet + .print-sheet { break-before: page; }
  .print-sheet svg { width: 100%; }
}
