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

@font-face {
  font-family: "Inter Desk";
  src: url("inter-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --action: #4502ff;
  --trim: #ffda14;
  --paper: #ffffff;
  --ink: #111827;
  --positive: #16a34a;
  --caution: #d97706;
  --urgent: #dc2626;
  color-scheme: light;
  font-family: "Inter Desk", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 20px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; border-top: 10px solid var(--action); }
main, header, footer, section, div, aside { min-width: 0; }
[hidden] { display: none !important; }
a { color: var(--action); text-underline-offset: 0.18em; overflow-wrap: anywhere; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 5px;
  box-shadow: 0 0 0 9px var(--trim);
}
button, input { font: inherit; }
button, summary { cursor: pointer; }
p { max-width: 66ch; margin: 0 0 1em; line-height: 1.65; }
h1, h2, h3 { margin: 0; line-height: 1.18; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-family: "Fraunces Desk", Georgia, serif; font-weight: 400; font-size: clamp(2.25rem, 5.1vw, 3.9rem); font-optical-sizing: auto; letter-spacing: -0.035em; }
h2 { font-size: 1.45rem; letter-spacing: -0.035em; font-weight: 720; }
h3 { font-size: 1rem; font-weight: 720; }
svg { display: block; max-width: 100%; }
.skip-to-reading { position: fixed; top: -120px; left: 20px; min-height: 48px; padding: 12px 20px; color: var(--paper); background: var(--ink); z-index: 10; }
.skip-to-reading:focus { top: 16px; }
.desk-masthead { max-width: 1180px; margin: auto; padding: 24px 30px; display: flex; align-items: center; gap: 28px; border-bottom: 3px solid var(--ink); }
.desk-name { display: flex; align-items: center; gap: 14px; min-height: 64px; color: var(--ink); font-size: 0.9rem; font-weight: 720; line-height: 1.25; text-decoration: none; padding: 2px 0; }
.desk-mark { background: var(--action); color: var(--paper); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); width: 50px; height: 50px; display: grid; place-items: center; font-family: monospace; font-size: 1.5rem; }
.guide-identity { font-size: 0.8rem; line-height: 1.5; padding-left: 24px; border-left: 3px solid var(--action); max-width: 20ch; }
.directory-jump { margin-left: auto; padding: 12px 16px; border: 2px solid var(--ink); background: var(--trim); color: var(--ink); font-size: 0.9rem; font-weight: 640; line-height: 1.5; min-height: 52px; display: flex; align-items: center; gap: 24px; text-decoration: none; }
main { max-width: 1180px; margin: auto; padding: 46px 30px 68px; }
.reading-introduction { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 46px; align-items: start; }
.introduction-copy { max-width: 770px; }
.desk-label { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.8rem; line-height: 1.55; margin: 0 0 20px; color: var(--ink); }
.reader-lead { margin-top: 24px; font-size: 1.05rem; line-height: 1.6; max-width: 57ch; }
.desk-trim { background: var(--trim); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 14px; margin: 14px 8px 0 0; }
.care-diagram { background: var(--paper); margin: 0; border: 2px solid var(--action); padding: 20px 12px; }
.care-diagram-art { width: 100%; height: auto; }
.care-diagram figcaption { margin-top: 20px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.8rem; line-height: 1.55; text-align: left; }
.open-care-sheet, .print-checklist { display: inline-flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 58px; padding: 14px 22px; border: 3px solid var(--ink); border-radius: 12px; background: var(--action); color: var(--paper); box-shadow: 5px 5px 0 var(--ink); font-size: 0.9rem; line-height: 1.45; font-weight: 650; text-decoration: none; max-width: 100%; }
.open-care-sheet:hover, .print-checklist:hover { outline: 3px solid var(--trim); outline-offset: 4px; }
.open-care-sheet:active, .print-checklist:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.dated-reading { margin-top: 35px; padding: 16px 0 18px; border-bottom: 3px solid var(--ink); display: flex; flex-wrap: wrap; gap: 8px 24px; }
.check-date { font-size: 0.8rem; line-height: 1.6; margin: 0; }
.reading-panel { max-width: 800px; margin-top: 36px; padding: 30px 36px 14px; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); position: relative; }
.reading-panel::before { content: ""; width: 50px; height: 8px; background: var(--action); position: absolute; top: -8px; left: 28px; border: 2px solid var(--ink); }
.reader-check { margin-bottom: 34px; padding-bottom: 32px; border-bottom: 2px solid var(--ink); }
.reader-check:last-child { border-bottom: 0; margin-bottom: 0; }
.reader-check h2 { margin-bottom: 16px; max-width: 34ch; }
.reader-check p { font-size: 1rem; line-height: 1.65; }
.source-drawer { margin-top: 22px; border: 2px solid var(--action); color: var(--ink); }
.source-drawer summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px; font-size: 0.8rem; font-weight: 650; line-height: 1.6; min-height: 54px; list-style: none; }
.source-drawer summary::-webkit-details-marker { display: none; }
.source-drawer summary:hover { background: var(--trim); }
.drawer-cross { font-family: monospace; font-size: 1.05rem; line-height: 1; }
.source-drawer[open] .drawer-cross { transform: rotate(45deg); }
.source-notes { border-top: 2px solid var(--action); padding: 16px; }
.source-notes .source-date, .source-notes .source-record { font-size: 0.8rem; line-height: 1.65; }
.source-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.8rem; line-height: 1.55; padding: 13px 4px; min-height: 48px; border-bottom: 1px solid var(--action); }
.source-link:last-child { border-bottom: 0; }
.source-record { margin-top: 12px; padding-left: 12px; border-left: 4px solid var(--caution); }
.source-record:last-child { margin-bottom: 0; }
.next-desk { max-width: 800px; border-left: 8px solid var(--action); padding: 8px 0 0 22px; margin-top: 40px; }
.next-desk p { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.8rem; line-height: 1.5; margin-bottom: 4px; }
.next-desk a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 0; font-size: 1rem; line-height: 1.5; font-weight: 640; }
.directory-footer { background: var(--action); color: var(--paper); border-top: 8px solid var(--ink); padding: 42px max(30px, calc((100vw - 1120px) / 2)) 0; }
.directory-heading .desk-label { color: var(--paper); margin-bottom: 14px; }
.directory-heading h2 { font-family: "Fraunces Desk", Georgia, serif; font-weight: 400; font-size: 2.5rem; margin-bottom: 26px; }
.desk-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-bottom: 40px; }
.directory-section { padding: 20px 16px 12px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.directory-section h3 { min-height: 52px; padding-bottom: 14px; border-bottom: 3px solid var(--trim); line-height: 1.5; }
.directory-doors { margin-top: 10px; }
.directory-doors a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 12px 2px; font-size: 0.85rem; font-weight: 550; line-height: 1.5; }
.directory-doors a[aria-current="page"] { color: var(--ink); text-decoration-thickness: 3px; background: var(--trim); padding-left: 8px; padding-right: 8px; }
.directory-doors a:hover { color: var(--ink); }
.guide-footer-line { background: var(--trim); color: var(--ink); border-top: 3px solid var(--ink); max-width: none; margin: 0; padding: 22px 0; font-size: 0.85rem; line-height: 1.65; box-shadow: 0 0 0 100vmax var(--trim); clip-path: inset(0 -100vmax); }
.paper-tools { max-width: 800px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 28px; }
.print-fallback { font-size: 0.8rem; line-height: 1.6; max-width: 30ch; margin: 0; }
.paper-desk .reading-panel { background: var(--paper); }
.care-check { display: flex; gap: 14px; align-items: center; min-height: 64px; padding: 12px 14px; border: 2px solid var(--ink); background: var(--paper); font-size: 0.85rem; font-weight: 600; line-height: 1.5; cursor: pointer; }
.care-check input { appearance: none; width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 0; margin: 0; flex-shrink: 0; position: relative; background: var(--paper); }
.care-check input:checked { border-color: var(--positive); }
.care-check input:checked::after { content: ""; width: 18px; height: 10px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg); position: absolute; left: 9px; top: 10px; }
.care-check:has(input:checked) { border-color: var(--positive); }
.answer-space { margin: 16px 0 0; height: 25px; border-bottom: 2px solid var(--ink); }
.urgent-care { border: 3px solid var(--urgent); padding: 24px 20px; margin-top: 0; }
.urgent-care h2 { color: var(--ink); border-left: 7px solid var(--urgent); padding-left: 14px; }
.urgent-care p:nth-of-type(2) { background: var(--ink); color: var(--paper); border-left: 7px solid var(--urgent); padding: 16px; font-weight: 650; }
.missing-desk .reader-lead { margin-bottom: 20px; }

@media (max-width: 1000px) {
  .reading-introduction { grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; }
  .desk-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-panel { max-width: 100%; }
}

@media (max-width: 720px) {
  body { border-top-width: 8px; }
  .desk-masthead { margin: 0 20px; padding: 20px 0; gap: 16px; flex-wrap: wrap; }
  .guide-identity { order: 3; max-width: none; width: 100%; border-left: 0; border-top: 2px solid var(--ink); padding: 12px 0 0; }
  .directory-jump { padding: 11px 12px; gap: 10px; font-size: 0.8rem; }
  main { padding: 32px 20px 48px; }
  .reading-introduction { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  h1 { font-size: 2.3rem; }
  .reader-lead { font-size: 1rem; margin-top: 20px; }
  .desk-trim { margin: 0 8px 0 0; max-width: 396px; padding: 10px; }
  .care-diagram { padding: 12px; }
  .care-diagram-art { max-height: 90px; }
  .care-diagram figcaption { margin-top: 10px; }
  .dated-reading { margin-top: 30px; }
  .reading-panel { margin-right: 8px; padding: 26px 20px 10px; }
  .reader-check h2 { font-size: 1.3rem; }
  .reader-check p { font-size: 0.95rem; }
  .reader-check { margin-bottom: 28px; padding-bottom: 26px; }
  .source-notes { padding: 12px; }
  .next-desk { padding-left: 16px; }
  .directory-footer { padding: 32px 20px 0; }
  .desk-directory { gap: 18px; }
  .directory-section { padding: 16px 12px 10px; }
  .urgent-care { padding: 18px 14px; }
  .urgent-care h2 { padding-left: 10px; }
  .urgent-care p:nth-of-type(2) { padding: 12px; }
}

@media (max-width: 450px) {
  .desk-directory { grid-template-columns: minmax(0, 1fr); }
  .directory-section h3 { min-height: 0; }
  .directory-doors a { min-height: 56px; font-size: 0.9rem; }
  .care-check { align-items: flex-start; padding: 12px; }
  .care-check input { margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .open-care-sheet:active, .print-checklist:active { transform: none; }
}

@page { size: auto; margin: 16mm; }
@media print {
  :root { font-size: 18px; background: var(--paper); }
  body { border: 0; background: var(--paper); color: var(--ink); }
  .desk-masthead, .directory-footer, .desk-trim, .paper-tools, .next-desk, .skip-to-reading, .source-drawer, .open-care-sheet { display: none !important; }
  main { padding: 0; margin: 0; max-width: none; }
  .reading-introduction { display: block; }
  h1 { font-size: 2rem; }
  .reader-lead { font-size: 1rem; margin-top: 16px; }
  .desk-label { margin-bottom: 10px; }
  .dated-reading { margin-top: 16px; padding: 8px 0 12px; }
  .reading-panel { border: 0; box-shadow: none; padding: 0; margin: 20px 0 0; max-width: none; }
  .reading-panel::before { display: none; }
  .reader-check { break-inside: avoid; padding-bottom: 16px; margin-bottom: 18px; }
  .reader-check h2 { font-size: 1.2rem; margin-bottom: 10px; }
  .reader-check p { font-size: 1rem; line-height: 1.5; margin-bottom: 10px; }
  .care-check { font-size: 1rem; min-height: 50px; padding: 10px; border-color: var(--ink); }
  .care-check input, .care-check:has(input:checked) { border-color: var(--ink); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .answer-space { height: 32px; margin-top: 12px; }
}
