@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f3efe4;
  --sheet: #fcfaf3;
  --ink: #292c25;
  --green: #284b3f;
  --muted: #595e50;
  --rule: #aaa995;
  --apricot: #edc6aa;
  --moss: #d4dcc7;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--green); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
button, input, textarea { font: inherit; }
button { min-height: 48px; cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
button, textarea { border: 1px solid var(--green); border-radius: 8px; }
p { margin: .8rem 0 1.1rem; }
ul { margin: .7rem 0 1.3rem; padding-left: 1.4rem; }
li { margin: .5rem 0; }
h1, h2 { line-height: 1.15; letter-spacing: -.035em; font-weight: 650; }
h1 { font-size: 3.25rem; margin: .7rem 0 1.2rem; max-width: 18ch; }
h2 { font-size: 1.7rem; margin: 0 0 1.1rem; max-width: 32ch; }

#skip {
  position: absolute;
  left: 1rem;
  top: -8rem;
  padding: .8rem 1.2rem;
  min-height: 48px;
  background: var(--sheet);
  z-index: 10;
}
#skip:focus { top: 1rem; }
#notebook {
  width: min(1240px, calc(100% - 96px));
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 76px;
  align-items: start;
}
#index {
  position: sticky;
  top: 32px;
  padding: 0 22px 0 0;
  border-right: 1px solid var(--rule);
  font-size: 16px;
}
#index header > a {
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  line-height: 1.35;
}
#index header span {
  display: block;
  flex: 0 0 33px;
  height: 33px;
  border: 9px solid var(--green);
  border-radius: 50%;
  box-shadow: 5px 4px 0 var(--apricot);
}
#index header p { line-height: 1.55; margin: 1.2rem 0 2rem; color: var(--muted); }
#index ul { list-style: none; margin: 0 0 2.1rem; padding: 0; }
#index li { margin: .2rem 0; }
#index nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 7px 20px 20px 7px;
  text-decoration: none;
  line-height: 1.4;
}
#index nav a:hover { background: #e5e8da; }
#index a[aria-current="page"] { background: var(--green); color: var(--sheet); }
#index > p { font-family: var(--mono); font-size: 16px; margin-bottom: .3rem; }
#index > a { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 0; }

main { min-width: 0; padding-top: 0; }
main:focus { outline: none; }
article { max-width: 860px; }
article > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  column-gap: 40px;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.7rem;
}
article > header > p, article > header > h1 { grid-column: 1; }
article > header > p:first-child {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--green);
  margin: 0 0 2.2rem;
  line-height: 1.55;
}
article > header > p:nth-child(2) { margin: 0; font-size: 18px; color: var(--muted); }
article > header > p:last-of-type { font-size: 21px; line-height: 1.6; margin-bottom: 0; }
article > header:not(:has(figure)) { display: block; }
article > header:not(:has(figure)) > p { max-width: 62ch; }
article > section, article > aside { max-width: 66ch; margin: 0 0 2.7rem; }
article > section > nav { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
article > section > nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 0; }

figure {
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
  margin: 24px 0 0;
  position: relative;
}
figure::before, figure::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 14px -10px 58px 10px;
  background: var(--apricot);
  border-radius: 3px 60px 8px 18px;
  transform: rotate(4deg);
}
figure::after { background: var(--moss); transform: rotate(-5deg); inset: 9px 3px 55px -8px; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 48px 8px 8px 8px;
  background: linear-gradient(145deg, #d4dcc7 0 40%, #eee3d1 40% 71%, #edc6aa 71%);
  color: var(--ink);
  box-shadow: 0 5px 20px #292c2512;
  font-size: 16px;
  line-height: 1.55;
}
figcaption { margin: .8rem 0 0; font-family: var(--mono); font-size: 16px; line-height: 1.5; }
figure[data-paper="1"] img, figure[data-paper="2"] img { aspect-ratio: 3 / 2; }
figure[data-paper="0"] img { aspect-ratio: 4 / 5; }

#recap {
  padding: 28px 32px;
  background: var(--moss);
  border-left: 5px solid var(--green);
  border-radius: 2px 36px 4px 4px;
}
#recap h2 { font-family: var(--mono); font-size: 24px; letter-spacing: -.02em; line-height: 1.4; }
#recap p:last-child { margin-bottom: 0; }
#urgent { background: #f4dcc9; padding: 28px 32px; border-left: 5px solid #7d3427; border-radius: 2px 36px 4px 4px; }
#urgent h2 { color: #653222; }
#urgent p:last-child { font-weight: 650; margin-bottom: 0; }
#source-note { padding-top: 1.6rem; border-top: 1px solid var(--rule); }
#source-note h2 { font-family: var(--mono); font-size: 24px; letter-spacing: 0; }
#source-note p, #source-note a { font-size: 16px; }
article > footer { padding: 8px 0 30px; }
article > footer a { display: inline-flex; align-items: center; min-height: 52px; padding: 10px 20px; background: var(--green); color: var(--sheet); border-radius: 26px; line-height: 1.4; }

#worksheet { padding: 30px 32px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px 36px 4px 4px; }
#worksheet fieldset { border: 0; margin: 1.5rem 0; padding: 0; min-width: 0; }
#worksheet legend { font-family: var(--mono); font-size: 16px; padding: 0; margin-bottom: .5rem; }
#worksheet fieldset label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 54px;
  padding: 14px 8px;
  border-bottom: 1px solid #d7d7c8;
  cursor: pointer;
}
#worksheet input { width: 44px; height: 44px; margin: 0; flex: 0 0 44px; accent-color: var(--green); }
#worksheet label:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 2px; }
#worksheet input:focus-visible { outline: none; }
#note-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.1rem 0 1.7rem; }
#note-actions button { padding: 10px 18px; background: var(--green); color: var(--sheet); line-height: 1.5; }
#note-actions button:last-child { background: var(--sheet); color: var(--green); }
#worksheet > label { display: block; margin: 0 0 .6rem; }
#question-note { width: 100%; min-width: 0; resize: vertical; padding: 16px; background: #fffef9; color: var(--ink); line-height: 1.6; font-size: 18px; }
#note-status { font-size: 16px; color: var(--muted); }

#colophon { grid-column: 2; max-width: 66ch; padding: 24px 0 38px; border-top: 1px solid var(--rule); font-size: 16px; }
#colophon p { max-width: 64ch; }
#colophon nav { display: flex; flex-wrap: wrap; column-gap: 24px; row-gap: 5px; }
#colophon a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 0; line-height: 1.5; }

@media (max-width: 1180px) {
  #notebook { width: calc(100% - 64px); column-gap: 42px; grid-template-columns: 198px minmax(0, 1fr); }
  article > header { grid-template-columns: minmax(0, 1fr) 190px; column-gap: 26px; }
  h1 { font-size: 2.7rem; }
}
@media (max-width: 920px) {
  article > header { grid-template-columns: minmax(0, 1fr); }
  figure { grid-column: 1; grid-row: auto; width: min(100%, 320px); margin-top: 2rem; }
  figure[data-paper="0"] img { aspect-ratio: 4 / 3; object-fit: cover; }
  #notebook { column-gap: 30px; grid-template-columns: 178px minmax(0, 1fr); }
  #index { padding-right: 15px; }
}
@media (max-width: 740px) {
  #notebook { display: block; width: calc(100% - 40px); margin-top: 24px; }
  #index { position: static; border: 0; padding: 0 0 22px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
  #index header { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; }
  #index header > a { max-width: 235px; }
  #index header p { margin: .7rem 0 1rem; }
  #index ul { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; margin: 10px 0 0; }
  #index > p, #index > a { display: none; }
  #index nav a { min-height: 48px; padding: 9px 10px; }
  article > header > p:first-child { margin-bottom: 1.4rem; }
  article > header { margin-bottom: 2rem; padding-bottom: 2rem; }
  h1 { font-size: 2.55rem; max-width: 20ch; }
  h2 { font-size: 1.6rem; }
  article > header > p:last-of-type { font-size: 20px; }
  figure { width: min(100%, 390px); }
  figure[data-paper="0"] img { aspect-ratio: 4 / 3; }
  #recap, #urgent, #worksheet { padding: 24px; }
  #colophon { padding-bottom: 26px; }
}
@media (max-width: 440px) {
  #notebook { width: calc(100% - 36px); }
  #index header > a { max-width: 245px; }
  #index header p { margin: .5rem 0; }
  h1 { font-size: 2.35rem; }
  #recap, #urgent, #worksheet { padding: 21px 20px; }
  #worksheet fieldset label { padding-left: 0; padding-right: 0; }
  #note-actions { flex-direction: column; align-items: stretch; }
  #note-actions button { width: 100%; }
  #colophon nav { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: white; font-size: 16px; }
  #notebook { display: block; width: auto; margin: 0; }
  #index, #skip, figure, #note-actions, article > footer, #colophon nav { display: none; }
  article, article > section, article > aside, #colophon { max-width: none; }
  article > header { display: block; }
  h1 { font-size: 30px; max-width: none; }
  h2 { font-size: 22px; }
  #recap, #urgent, #worksheet { break-inside: avoid; border-radius: 0; }
  #question-note { min-height: 260px; border-color: #777; }
  a { color: var(--ink); }
}
