/* Type, colour and spacing utilities for the care workbook. */
:root {
  color-scheme: light;
  --ink: #233d33;
  --muted: #506154;
  --green: #28523d;
  --paper: #fffef8;
  --canvas: #f2f0e5;
  --sage: #e8eedb;
  --gold: #f0e3ae;
  --rule: #c7ceba;
}
* { box-sizing: border-box; }
html { scroll-padding-bottom: 10rem; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  padding-bottom: 7.5rem;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
h1 { font-size: clamp(2.5rem, 4.4vw, 4.25rem); line-height: 1.09; letter-spacing: -.045em; font-weight: 650; max-width: 19ch; }
h2, .c-subheading { font-size: clamp(1.45rem, 2.2vw, 1.85rem); line-height: 1.25; letter-spacing: -.025em; font-weight: 650; }
h3 { font-size: 1.2rem; line-height: 1.35; }
p { max-width: 66ch; }
a { color: var(--green); text-underline-offset: .22em; text-decoration-thickness: .08em; }
button, input { font: inherit; }
button, summary, label { -webkit-tap-highlight-color: #d1dfbd; }
button { color: var(--ink); cursor: pointer; }
button, a, input, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #815000; outline-offset: 4px; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
.u-shell { width: min(1216px, calc(100% - 64px)); margin-inline: auto; }
.u-flow > * + * { margin-top: 1rem; }
.u-flow-lg > * + * { margin-top: 3rem; }
.u-muted { color: var(--muted); }
.u-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; line-height: 1.5; font-weight: 400; }
.u-grid { display: grid; }
.u-gap-xl { gap: 3rem; }
.u-measure { max-width: 66ch; }
.u-bg-paper { background: var(--paper); }
.c-skip { position: fixed; top: 8px; left: 16px; padding: 12px 18px; background: var(--gold); transform: translateY(-150%); z-index: 20; }
.c-skip:focus { transform: translateY(0); }
.c-header { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.c-home { display: inline-flex; align-items: center; gap: 14px; min-height: 56px; text-decoration: none; font-weight: 650; font-size: 22px; line-height: 1.2; }
.c-home-sub { display: block; font-size: 16px; font-weight: 400; margin-top: 6px; }
.c-mark { width: 38px; height: 45px; background: var(--sage); border: 2px solid var(--green); border-radius: 7px 14px 7px 7px; position: relative; flex: 0 0 38px; }
.c-mark::after { content: ""; position: absolute; width: 14px; height: 8px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); left: 9px; top: 13px; }
.c-print, .c-drawer button { min-height: 48px; padding: 10px 18px; border: 1px solid var(--rule); background: var(--paper); border-radius: 12px; font-size: 16px; }
.c-paper { background: var(--paper); border-radius: 24px; padding: clamp(24px, 5vw, 72px); box-shadow: 0 7px 0 #e4e7d7; }
.c-hero { border-bottom: 2px solid var(--rule); padding-bottom: 40px; }
.c-hero-home { grid-template-columns: 1.2fr 1fr; align-items: start; padding-bottom: 56px; }
.c-kicker { color: var(--muted); margin-bottom: 24px; }
.c-intro { font-size: 20px; line-height: 1.55; max-width: 48ch; margin-top: 24px; }
.c-primary { display: inline-flex; align-items: center; min-height: 52px; border-radius: 12px; background: var(--green); color: #fffef8; padding: 12px 22px; margin-top: 28px; text-decoration: none; font-weight: 600; font-size: 18px; }
.c-primary:hover { background: #1d402e; }
.c-ready { background: var(--sage); border-radius: 18px; padding: 28px; margin-top: 4px; }
.c-ready h2 { font-size: 26px; max-width: 16ch; }
.c-ready .c-checklist { border-block: none; margin-top: 20px; }
.c-ready .c-check { padding-block: 16px; }
.c-ready > p:last-child { font-size: 16px; line-height: 1.5; }
.c-body { padding-top: 44px; max-width: 790px; margin-inline: auto; }
.c-answer { max-width: 66ch; }
.c-answer :is(h2, h3) { margin-bottom: 20px; }
.c-checklist { border-block: 2px solid var(--rule); }
.c-check { min-height: 72px; display: flex; align-items: flex-start; gap: 18px; padding: 24px 4px; cursor: pointer; font-size: 18px; line-height: 1.55; }
.c-check + .c-check { border-top: 1px solid var(--rule); }
.c-check input { width: 44px; height: 44px; flex: 0 0 44px; margin: 1px 0 0; accent-color: var(--green); cursor: pointer; }
.c-check strong { display: block; font-weight: 650; }
.c-check-copy { display: block; color: var(--muted); margin-top: 4px; }
.c-check:has(input:checked) { background: #f1f5e8; }
.c-ready .c-check:has(input:checked) { background: #dce7c8; }
.c-note { border-radius: 16px; background: var(--gold); padding: 28px 32px; }
.c-note :is(h2, h3) { font-size: 24px; }
.c-text-link { display: inline-flex; align-items: center; min-height: 48px; padding-block: 10px; font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
.c-illustration { border-radius: 18px; overflow: hidden; background: #f0eddf; }
.c-illustration img { width: 100%; display: block; aspect-ratio: 3 / 2; color: var(--muted); font-size: 16px; }
.c-illustration figcaption { font-size: 16px; padding: 16px 24px; background: var(--sage); }
.c-source { border-top: 2px solid var(--rule); padding-top: 12px; }
.c-source summary { font-size: 18px; font-weight: 600; color: var(--green); min-height: 56px; padding: 12px 2px; cursor: pointer; }
.c-source summary:hover { text-decoration: underline; text-underline-offset: .25em; }
.c-source-content { background: var(--sage); padding: 24px; border-radius: 14px; margin-top: 16px; }
.c-source-links { list-style: none; padding: 0; }
.c-source-links li + li { margin-top: 6px; }
.c-source-links a { width: 100%; }
.c-terms > div { padding-block: 20px; border-bottom: 1px solid var(--rule); }
.c-terms dt { font-size: 20px; font-weight: 650; }
.c-terms dd { margin-top: 8px; }
.c-board-links a { display: flex; max-width: fit-content; }
.c-footer { padding: 36px 12px 24px; color: var(--muted); font-size: 16px; }
.c-footer p { max-width: 76ch; }
.c-footer a { font-size: 16px; margin-top: 12px; }
.c-dock { position: fixed; bottom: 16px; left: 24px; right: 24px; z-index: 5; pointer-events: none; }
.c-dock-inner { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: min(860px, 100%); margin-inline: auto; padding: 7px; border: 2px solid #b2bfa1; background: #fafbf1; border-radius: 18px; box-shadow: 0 6px 26px #233d3320; pointer-events: auto; }
.c-dock a { min-height: 52px; font-size: 16px; line-height: 1.3; font-weight: 600; text-decoration: none; text-align: center; display: flex; align-items: center; justify-content: center; padding: 10px 6px; border-radius: 11px; }
.c-dock a:hover { background: #e8eedb; }
.c-dock a[aria-current="page"] { color: #fffef8; background: var(--green); }
.c-drawer { inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: 100dvh; width: min(590px, 100%); max-width: 100%; padding: 32px; border: none; background: var(--paper); color: var(--ink); box-shadow: -12px 0 50px #233d3320; overflow-y: auto; }
.c-drawer::backdrop { background: #233d3366; }
.c-drawer:not([open]) { display: none; }
.c-drawer-top { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 2px solid var(--rule); }
.c-drawer h2 { font-size: 26px; }
.c-drawer .c-source-content { margin: 0; padding: 0; background: transparent; }
body:has(.c-drawer[open]) { overflow: hidden; }
@media (min-width: 1000px) {
  .c-paper:has(.c-hero-home) .c-body { max-width: 760px; margin-left: 100px; margin-right: 0; }
}
@media (max-width: 760px) {
  body { font-size: 17px; padding-bottom: 10rem; }
  .u-shell { width: calc(100% - 28px); }
  .c-header { min-height: 100px; gap: 16px; padding-inline: 8px; }
  .c-home { font-size: 20px; gap: 10px; }
  .c-home-sub { font-size: 16px; }
  .c-mark { display: none; }
  .c-print { padding: 10px 12px; max-width: 118px; line-height: 1.3; }
  .c-paper { border-radius: 18px; padding: 28px 22px 32px; }
  .c-hero { padding-bottom: 28px; }
  .c-hero-home { display: block; }
  .c-hero-home h1 { max-width: 15ch; }
  .c-intro { font-size: 18px; margin-top: 20px; }
  .c-kicker { margin-bottom: 20px; }
  .c-ready { margin-top: 32px; padding: 24px 20px; }
  .c-ready h2 { max-width: none; font-size: 25px; }
  .c-body { padding-top: 32px; }
  .u-flow-lg > * + * { margin-top: 36px; }
  .c-check { font-size: 17px; gap: 14px; padding-block: 20px; }
  .c-note { padding: 24px 20px; }
  .c-text-link { font-size: 17px; }
  .c-source-content { padding: 20px; }
  .c-footer { padding: 32px 8px 20px; }
  .c-dock { left: 10px; right: 10px; bottom: 10px; }
  .c-dock-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 5px; border-radius: 16px; }
  .c-dock a { min-height: 46px; padding: 8px 4px; }
  .c-drawer { padding: 24px; }
  .c-drawer-top { gap: 12px; }
  .c-drawer-top button { max-width: 170px; }
}
@media (prefers-reduced-motion: no-preference) {
  .c-dock a, .c-primary { transition: background-color 140ms ease; }
  .c-drawer[open] { animation: drawer-enter 160ms ease-out; }
  @keyframes drawer-enter { from { transform: translateX(24px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
}
@media print {
  @page { margin: 18mm; }
  body { background: white; color: black; font-size: 12pt; padding: 0; }
  .u-shell { width: 100%; }
  .c-header { min-height: 0; padding: 0 0 20pt; }
  .c-print, .c-dock, .c-drawer, .c-skip, .c-illustration { display: none !important; }
  .c-paper { padding: 0; border-radius: 0; box-shadow: none; background: white; }
  .c-hero-home { display: block; }
  h1 { font-size: 28pt; max-width: 100%; }
  h2, .c-subheading { font-size: 17pt; break-after: avoid; }
  .c-body, .c-paper:has(.c-hero-home) .c-body { max-width: 100%; margin: 0; }
  .c-ready { break-inside: avoid; margin-top: 20pt; }
  .c-note { background: #f4f2e8; padding: 14pt; break-inside: avoid; }
  .c-check { break-inside: avoid; }
  .c-source-content { display: block !important; background: white; }
  .c-primary { background: white; color: black; padding-inline: 0; }
  a { color: black; }
  .c-footer { padding-inline: 0; }
}
