@font-face {
  font-family: "Fraunces";
  src: url("/resources/type/fraunces-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/resources/type/nunito-sans-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf8f8;
  --white: #ffffff;
  --ink: #30272e;
  --quiet: #655660;
  --mulberry: #963d70;
  --mulberry-deep: #742650;
  --rose-paper: #f1e1e9;
  --rose-edge: #d5bac9;
  --pink-sheet: #f7edf2;
  --focus: #482f8a;
  --display: "Fraunces", Georgia, serif;
  --reading: "Nunito Sans", "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--reading);
  font-size: 18px;
  line-height: 1.65;
}
button, summary, a { -webkit-tap-highlight-color: transparent; }
a {
  color: var(--mulberry-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  font-size: inherit;
}
a:hover { text-decoration-thickness: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}
button { font: inherit; cursor: pointer; }
summary {
  cursor: pointer;
  min-height: 48px;
  padding: 0.6rem 1rem;
  font-size: 18px;
}
summary::marker { color: var(--mulberry-deep); }
img { max-width: 100%; display: block; height: auto; font: 18px/1.6 var(--reading); }
figure { margin: 0; }
p { margin: 0 0 1.1rem; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  font-optical-sizing: auto;
  text-wrap: balance;
}
h1 { margin: 0 0 1.5rem; font-size: clamp(2.7rem, 7.5vw, 5.1rem); line-height: 1.1; letter-spacing: -0.035em; }
h2 { margin: 0 0 1.2rem; font-size: clamp(1.8rem, 4.2vw, 2.65rem); line-height: 1.2; letter-spacing: -0.018em; }
h3 { margin: 0 0 1rem; font-size: 1.55rem; line-height: 1.35; }
ul { padding-left: 1.4rem; }
li { margin-bottom: 0.75rem; font-size: 18px; }
[hidden] { display: none !important; }

.skip-reading {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1.2rem;
  border-radius: 0 0 20px 20px;
  background: var(--white);
  transform: translateY(-160%);
}
.skip-reading:focus { transform: translateY(0); }

.notebook-masthead {
  width: min(100% - 2rem, 1264px);
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.notebook-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 1 auto;
  line-height: 1.2;
  font-size: 24px;
  font-family: var(--display);
  font-weight: 400;
  text-decoration: none;
}
.notebook-name span { font: 16px/1.5 var(--reading); color: var(--quiet); }
.notebook-navigation { flex: 0 1 55%; min-width: 0; }
.question-menu > summary {
  border-radius: 26px;
  background: var(--rose-paper);
  color: var(--mulberry-deep);
  font-weight: 700;
  font-size: 16px;
  padding: 0.65rem 0.85rem;
}
.menu-fold {
  margin-top: 1rem;
  padding: 0.55rem;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 30px #69334d14;
}
.menu-chapter > summary { font-weight: 750; padding: 0.7rem; }
.menu-chapter ul { margin: 0; padding: 0 0.65rem 0.65rem; list-style: none; }
.menu-chapter li { margin: 0; }
.menu-chapter a {
  width: 100%;
  padding: 0.7rem 0.4rem;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  border-radius: 16px;
}
.menu-chapter a:hover, .menu-chapter [aria-current="page"] { background: var(--pink-sheet); text-decoration: underline; }

.home-notebook, .answer-notebook { width: min(100% - 2rem, 1264px); margin: 0 auto; }
.opening-spread { padding: 1.5rem 0 2rem; }
.guide-marker { color: var(--mulberry-deep); font-size: 18px; font-weight: 750; margin-bottom: 1rem; }
.opening-intro { font-size: 20px; max-width: 47ch; }
.opening-words { margin-bottom: 2rem; }
.pill-link, .light-pill, .notebook-link, .next-question { gap: 0.5rem; }
.pill-link, .light-pill {
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 750;
  text-decoration: none;
  line-height: 1.4;
}
.pill-link { color: var(--white); background: var(--mulberry); }
.pill-link:hover { background: var(--mulberry-deep); }
.opening-picture {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--rose-paper);
  border-radius: 28px;
  max-width: 520px;
}
.opening-picture img { width: 100%; height: 100%; object-fit: cover; }
.home-answer {
  padding: 1.8rem;
  background: var(--white);
  border-radius: 24px;
  margin: 0 0 3.5rem;
}
.home-answer p, .field-copy p { max-width: 64ch; }
.source-hop {
  background: var(--rose-paper);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 16px;
  line-height: 1.5;
  margin: 0.2rem 0.5rem 0.2rem 0;
}
.question-index { scroll-margin-top: 1rem; padding-bottom: 3.5rem; }
.index-intro p { max-width: 54ch; }
.question-group { margin-top: 2.25rem; }
.question-group h3 { color: var(--quiet); font-family: var(--reading); font-size: 18px; font-weight: 750; }
.question-group ul { list-style: none; padding: 0; margin: 0; }
.question-group li { margin: 0; border-bottom: 2px solid var(--rose-paper); }
.question-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.1rem 0.3rem;
  min-height: 64px;
  width: 100%;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 650;
  text-decoration: none;
}
.question-row::after { content: "↗"; flex: 0 0 1.25rem; font-size: 24px; }
.question-row:hover { background: var(--rose-paper); border-radius: 16px; }
.mulberry-field { background: var(--mulberry); color: var(--white); padding: 2rem 1.5rem; border-radius: 28px; margin-bottom: 2rem; }
.mulberry-field h2 { font-size: clamp(2rem, 4.2vw, 3.7rem); }
.light-pill { color: var(--mulberry-deep); background: var(--white); margin: 0.5rem 0.5rem 0.5rem 0; }
.mulberry-field .source-hop { background: var(--white); color: var(--mulberry-deep); }
.picture-break { margin: 2.25rem 0 3rem; border-radius: 24px; overflow: hidden; background: var(--rose-paper); }
.picture-break img { aspect-ratio: 2; object-fit: cover; width: 100%; }
.picture-break figcaption { padding: 1rem 1.5rem; font-size: 16px; }
.home-notebook > .answer-depth { max-width: 740px; margin: 3.5rem auto; }

.answer-opening { padding: 0.5rem 0 1rem; max-width: 1030px; }
.back-to-hub { font-size: 16px; margin-bottom: 1.4rem; }
.answer-opening h1 { max-width: 22ch; }
.answer-pages { max-width: 880px; margin: 0 auto; }
.answer-pages > .answer-depth { max-width: 720px; margin: 2.5rem auto 3rem; }
.answer-pages > .answer-depth p { max-width: 66ch; }
.answer-in-brief { border-radius: 24px; background: var(--rose-paper); padding: 1.6rem; margin: 1.75rem 0 2.5rem; }
.answer-in-brief > p:last-child { margin-bottom: 0; font-size: 21px; line-height: 1.55; max-width: 62ch; }
.answer-label { font-size: 16px; font-weight: 800; color: var(--mulberry-deep); margin-bottom: 0.55rem; }
.answer-in-brief:nth-of-type(even) { background: var(--mulberry); color: var(--white); }
.answer-in-brief:nth-of-type(even) .answer-label { color: var(--white); }
.history-notes { margin: 1.5rem 0; padding-left: 1.5rem; border-left: 8px solid var(--rose-paper); }
.history-notes dt { font-size: 20px; font-weight: 800; margin-top: 1.5rem; }
.history-notes dd { margin: 0.35rem 0 1rem; }
.question-prompts { padding-left: 1.35rem; margin: 1.3rem 0; }
.question-prompts li { padding-left: 0.35rem; margin-bottom: 1rem; }
.question-prompts li::marker { color: var(--mulberry); }
.route-pair { display: grid; gap: 1.5rem; }
.route-pair > div { padding: 1.5rem; border-radius: 22px; background: var(--white); }
.route-pair h3 { font-family: var(--reading); font-size: 20px; font-weight: 800; }
.care-comparison { border-radius: 28px; background: var(--white); padding: 1.5rem; margin: 3rem 0; }
.comparison-heading p { max-width: 58ch; }
.comparison-switch { display: flex; gap: 0.65rem; flex-wrap: wrap; margin: 1.5rem 0 0.75rem; }
.comparison-switch button {
  border: 2px solid var(--mulberry);
  color: var(--mulberry-deep);
  background: var(--white);
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  min-height: 48px;
  min-width: 44px;
  font-size: 18px;
  font-weight: 750;
}
.comparison-switch [aria-pressed="true"] { background: var(--mulberry); color: var(--white); }
.comparison-status { margin: 0.75rem 0 1rem; font-size: 16px; color: var(--quiet); }
.comparison-sheets { display: grid; gap: 1.2rem; }
.setting-sheet { border-radius: 20px; padding: 1.5rem; background: var(--pink-sheet); }
.setting-sheet h3 { font-size: 1.5rem; }
.setting-sheet ul { margin-bottom: 0; }
.quote-sheet { background: var(--white); border-radius: 24px; padding: 1.8rem; margin: 2.5rem 0; }
.quote-sheet dl { margin-bottom: 0; }
.quote-sheet dt { font-size: 20px; font-weight: 850; color: var(--mulberry-deep); }
.quote-sheet dd { margin: 0.5rem 0 1.75rem; font-size: 18px; }
.quote-sheet dd:last-child { margin-bottom: 0; }
.urgent-note { padding: 1.8rem; background: var(--rose-paper); border-radius: 24px; margin: 2.5rem 0; }
.page-footnotes { padding: 2rem 0; border-top: 3px solid var(--rose-edge); margin: 2.5rem auto 0; max-width: 880px; }
.page-footnotes h2 { font-family: var(--reading); font-size: 20px; font-weight: 800; }
.page-footnotes ul { padding: 0; list-style: none; margin: 0; }
.page-footnotes li { display: flex; gap: 0.75rem; align-items: baseline; margin: 0.2rem 0; }
.footnote-letter { flex: 0 0 1rem; font-size: 16px; color: var(--quiet); }
.page-footnotes a { font-size: 16px; padding: 0.6rem 0; line-height: 1.5; }
.keep-reading { margin: 2.25rem auto 3.5rem; max-width: 880px; padding: 1.6rem; border-radius: 24px; background: var(--white); }
.next-question { font-family: var(--display); font-size: 26px; line-height: 1.35; }
.notebook-footer { background: var(--rose-paper); color: var(--ink); padding: 2.5rem max(1rem, calc((100vw - 1264px) / 2)); margin-top: 4rem; font-size: 16px; }
.notebook-footer p { font-size: 16px; max-width: 65ch; }
.notebook-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.notebook-footer a { font-size: 16px; padding: 0.55rem 0; }

@media (min-width: 700px) {
  .notebook-masthead, .home-notebook, .answer-notebook { width: min(100% - 4rem, 1264px); }
  .notebook-masthead { align-items: flex-start; padding: 1.6rem 0; }
  .notebook-navigation { flex: 0 0 310px; position: relative; z-index: 5; }
  .question-menu > summary { font-size: 18px; padding-inline: 1.2rem; }
  .menu-fold { position: absolute; width: 100%; left: 0; top: 100%; }
  .opening-spread { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; align-items: center; padding: 2.5rem 0 3.5rem; }
  .opening-words { margin-bottom: 0; }
  .opening-picture { align-self: stretch; max-width: none; aspect-ratio: auto; min-height: 420px; }
  .opening-picture img { min-height: 420px; }
  .home-answer { padding: 2.5rem; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 2.5rem; }
  .question-index { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 2.5rem; padding-block: 1.5rem 4rem; }
  .question-group:first-child { margin-top: 0; }
  .mulberry-field { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 2.5rem; padding: 3rem; }
  .answer-opening { padding-block: 1rem 2.25rem; }
  .answer-in-brief { padding: 2rem 2.5rem; }
  .care-comparison { padding: 2.5rem; }
  .comparison-sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-sheets:has(.setting-sheet[hidden]) { grid-template-columns: 1fr; }
  .quote-sheet { padding: 2.5rem; }
  .quote-sheet dl { display: grid; grid-template-columns: 0.5fr 1.5fr; gap: 1.5rem 2rem; }
  .quote-sheet dd { margin: 0; }
  .urgent-note { padding: 2.5rem; }
}

@media (min-width: 1100px) {
  .opening-spread { grid-template-columns: 1.25fr 0.9fr; gap: 4rem; }
  .opening-words h1 { max-width: 15ch; }
  .opening-picture { min-height: 490px; }
  .route-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answer-pages > .answer-depth:has(.route-pair) { max-width: none; }
  .notebook-footer { display: grid; grid-template-columns: 1fr 0.8fr; gap: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body { background: white; color: black; }
  .notebook-navigation, .skip-reading, .keep-reading, .comparison-switch, .comparison-status { display: none; }
  .setting-sheet[hidden] { display: block !important; }
  .answer-pages, .answer-depth { max-width: none; }
  .answer-in-brief, .mulberry-field, .urgent-note, .setting-sheet { background: white !important; color: black !important; border: 2px solid #aaa; }
  .answer-label, .mulberry-field .source-hop { color: black !important; }
  .picture-break, .opening-picture { display: none; }
  h1, h2, h3 { break-after: avoid; }
  a { color: black; }
}
