:root {
  color-scheme: light;
  --night: #0b1029;
  --night-soft: #17203f;
  --paper: #f7f4ea;
  --paper-deep: #eee8d9;
  --white: #fffdf7;
  --ink: #151a31;
  --muted: #5d6478;
  --cyan: #77e6da;
  --cyan-deep: #167f7b;
  --sun: #ffd96b;
  --coral: #ff8d78;
  --violet: #a99cff;
  --line: #d9d3c5;
  --max: 1180px;
  --reading: 760px;
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--paper); line-height: 1.65; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:focus-visible, button:focus-visible { outline: 4px solid var(--sun); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3, p { text-wrap: pretty; }

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--sun);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.content-header {
  color: var(--white);
  background: var(--night);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  width: min(calc(100% - 48px), var(--max));
  min-height: 84px;
  margin: 0 auto;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.wordmark { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-weight: 950; letter-spacing: .12em; }
.wordmark span { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 13px; color: var(--night); background: var(--cyan); box-shadow: 0 5px 0 #278d89; }
.header-inner nav { display: flex; justify-content: center; gap: clamp(16px, 2.5vw, 30px); color: #c5cce2; font-size: 14px; font-weight: 750; }
.header-inner nav a { text-decoration: none; }
.header-inner nav a:hover { color: var(--white); }

.article-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 84% 30%, rgba(119,230,218,.13), transparent 31%),
    radial-gradient(circle at 12% 84%, rgba(169,156,255,.12), transparent 28%),
    var(--night);
}
.hero-inner { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 72px 0 78px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; color: #aeb7d4; font-size: 13px; }
.breadcrumbs a { color: var(--cyan); }
.eyebrow { margin: 0 0 15px; color: var(--cyan); font-size: 12px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.article-hero h1 { max-width: 900px; margin: 0; overflow-wrap: normal; hyphens: none; font-size: clamp(43px, 6vw, 76px); line-height: 1.01; letter-spacing: -.055em; }
.article-deck { max-width: 780px; margin: 25px 0 0; color: #c8cfe2; font-size: clamp(18px, 2vw, 22px); line-height: 1.58; }
.article-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 31px; }
.meta-pill { padding: 7px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #d1d7e8; font-size: 12px; font-weight: 750; }
.meta-pill.status { border-color: rgba(119,230,218,.45); color: var(--cyan); }
.meta-pill.warning { border-color: rgba(255,217,107,.42); color: var(--sun); }

.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, var(--reading));
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  justify-content: center;
  gap: 70px;
  padding: 64px 0 100px;
}
.toc { position: sticky; top: 22px; align-self: start; padding: 21px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,253,247,.65); }
.toc b { display: block; margin-bottom: 12px; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.toc a { display: block; padding: 7px 0; color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.35; }
.toc a:hover { color: var(--cyan-deep); }
.toc .toc-help { margin-top: 12px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--cyan-deep); font-weight: 800; }

.article-body { min-width: 0; font-size: 18px; }
.article-body > :first-child { margin-top: 0; }
.article-body h2 { margin: 68px 0 20px; scroll-margin-top: 25px; font-size: clamp(31px, 4vw, 43px); line-height: 1.08; letter-spacing: -.045em; }
.article-body h3 { margin: 36px 0 13px; font-size: 23px; line-height: 1.2; letter-spacing: -.02em; }
.article-body p { margin: 0 0 21px; }
.article-body ul, .article-body ol { margin: 0 0 25px; padding-left: 1.25em; }
.article-body li { margin: 9px 0; padding-left: .25em; }
.article-body strong { color: #0e1328; }
.citation { color: var(--cyan-deep); font-size: .72em; font-weight: 900; text-decoration: none; vertical-align: super; }

.answer-card, .callout, .action-card {
  margin: 0 0 30px;
  padding: 27px 29px;
  border-radius: 22px;
}
.answer-card { border: 1px solid #b9d7d1; background: #e9f5f1; }
.answer-card b:first-child, .callout b:first-child { display: block; margin-bottom: 8px; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.answer-card p:last-child, .callout p:last-child { margin-bottom: 0; }
.callout { border: 1px solid #e3c875; background: #fff4c9; }
.callout.kind { border-color: #d9c9f7; background: #f0eafd; }
.callout.danger { border-color: #efaa9f; background: #ffe3dc; }
.source-note { padding: 18px 21px; border-left: 5px solid var(--cyan-deep); background: var(--white); color: var(--muted); font-size: 15px; }

.choice-grid, .fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 28px 0; }
.choice-card, .fact-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.choice-card { display: block; text-decoration: none; }
.choice-card:hover { border-color: var(--cyan-deep); transform: translateY(-2px); }
.choice-card small, .fact-card small { display: block; margin-bottom: 8px; color: var(--cyan-deep); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.choice-card b, .fact-card b { display: block; font-size: 19px; line-height: 1.25; }
.choice-card span, .fact-card p { display: block; margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

.step-list { margin: 28px 0; padding: 0 !important; list-style: none; counter-reset: steps; }
.step-list li { position: relative; min-height: 58px; margin: 0 !important; padding: 0 0 25px 72px !important; counter-increment: steps; }
.step-list li::before { position: absolute; top: 0; left: 0; display: grid; width: 48px; height: 48px; place-items: center; content: counter(steps); border-radius: 15px; color: var(--night); background: var(--sun); font-weight: 950; }
.step-list li:not(:last-child)::after { position: absolute; top: 51px; bottom: 3px; left: 23px; width: 2px; content: ""; background: var(--line); }
.step-list b { display: block; margin-bottom: 4px; }

.quote-script { margin: 25px 0; padding: 24px; border-left: 6px solid var(--coral); border-radius: 0 18px 18px 0; background: var(--white); font-size: 20px; font-weight: 760; }

.letter-template { margin: 28px 0; padding: 29px; border: 1px dashed #8e8778; border-radius: 20px; background: var(--white); }
.letter-template small { display: block; margin-bottom: 14px; color: var(--cyan-deep); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.letter-template p { margin-bottom: 14px; }
.letter-template p:last-child { margin-bottom: 0; }

.comparison-table { width: 100%; margin: 28px 0; overflow: hidden; border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; border-radius: 18px; background: var(--white); font-size: 16px; }
.comparison-table th, .comparison-table td { padding: 17px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison-table th { color: #0d554f; background: #e5f3ef; font-size: 13px; letter-spacing: .04em; }
.comparison-table tr:last-child td { border-bottom: 0; }
.comparison-table td:first-child { width: 28%; font-weight: 850; }

.checklist { padding-left: 0 !important; list-style: none; }
.checklist li { position: relative; padding-left: 34px !important; }
.checklist li::before { position: absolute; top: .1em; left: 0; display: grid; width: 22px; height: 22px; place-items: center; content: "✓"; border-radius: 7px; color: var(--night); background: var(--cyan); font-size: 13px; font-weight: 950; }

.emergency-card, .helpline-card {
  margin: 0 0 30px;
  padding: 28px 30px;
  border-radius: 22px;
}
.emergency-card { color: #37130e; border: 2px solid #d85c48; background: #ffe3dc; }
.emergency-card small, .helpline-card small { display: block; font-size: 12px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.emergency-card h2 { margin: 7px 0 10px; font-size: clamp(32px, 5vw, 50px); }
.emergency-card h2 a { white-space: nowrap; }
.emergency-card p { margin: 0; }
.helpline-card { color: #112542; border: 1px solid #91c6d4; background: #e6f4f7; }
.helpline-card > a { display: block; width: fit-content; margin: 8px 0 0; color: #0b5768; font-size: clamp(30px, 6vw, 48px); font-weight: 950; line-height: 1.1; }
.helpline-card > span { display: block; margin-top: 8px; font-weight: 800; }
.helpline-card p { margin: 15px 0 0; }

.print-button {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid #0c6965;
  border-radius: 12px;
  color: #0c5755;
  background: #def2ee;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}
.print-button:hover { background: #c8ebe5; }
.inline-print { width: auto; min-width: 190px; margin: 0; }
.print-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.print-heading small { color: var(--cyan-deep); font-size: 11px; font-weight: 950; letter-spacing: .13em; }
.print-heading h2 { margin: 5px 0 0; }
.print-intro, .print-lead { color: var(--muted); }
.print-sheet { padding: 30px; border: 2px solid #beb7a8; border-radius: 22px; background: var(--white); }
.print-sheet > :first-child { margin-top: 0; }
.worksheet-block { margin: 20px 0; padding-top: 17px; border-top: 1px solid var(--line); break-inside: avoid; }
.worksheet-block h3 { margin: 0 0 12px; font-size: 19px; }
.compact-block p { margin-bottom: 0; }
.write-lines { margin-bottom: 10px !important; }
.write-lines > span { display: block; height: 25px; border-bottom: 1px solid #8e8778; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.short-line { display: inline-block; width: min(160px, 45%); height: 1.2em; border-bottom: 1px solid #8e8778; vertical-align: baseline; }
.paper-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 5px 0 15px; font-size: 15px; }
.paper-checks span { white-space: nowrap; }
.numbered-lines { margin: 0 !important; }
.numbered-lines li { min-height: 34px; }
.numbered-lines span { display: block; height: 27px; border-bottom: 1px solid #8e8778; }
.paper-note { margin: 18px 0 0; padding: 16px 18px; border-left: 5px solid var(--sun); background: #fff7db; font-size: 15px; }
.teacher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 20px 0; }
.teacher-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #faf8f1; break-inside: avoid; }
.teacher-grid h3 { margin: 0 0 10px; font-size: 18px; }
.teacher-grid ul { margin: 0; font-size: 15px; }
.no-list { padding-left: 0 !important; list-style: none; }
.no-list li { position: relative; padding-left: 30px !important; }
.no-list li::before { position: absolute; left: 0; content: "×"; color: #a83d2e; font-size: 22px; font-weight: 950; line-height: 1; }
.school-contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; font-size: 14px; }
.school-contact p { margin: 0; }
.school-contact span { display: block; height: 28px; border-bottom: 1px solid #8e8778; }

.sources { margin-top: 36px; padding: 0; list-style: none; counter-reset: sources; }
.sources li { margin: 0 0 15px; padding: 21px 21px 21px 58px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); counter-increment: sources; }
.sources li::before { float: left; width: 32px; margin-left: -42px; content: counter(sources); color: var(--cyan-deep); font-weight: 950; }
.sources a { color: #104e5c; font-weight: 800; }
.sources small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }

.review-box { margin-top: 50px; padding: 25px; border: 1px dashed #a7a08e; border-radius: 18px; color: var(--muted); font-size: 14px; }
.review-box dl { display: grid; grid-template-columns: 170px 1fr; gap: 7px 16px; margin: 0; }
.review-box dt { font-weight: 850; }
.review-box dd { margin: 0; }

.source-library { width: min(calc(100% - 48px), 960px); margin: 0 auto; padding: 64px 0 100px; }
.source-library > p { max-width: 760px; color: var(--muted); font-size: 18px; }
.source-card { margin: 22px 0; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.source-type { display: inline-block; margin-bottom: 12px; padding: 5px 9px; border-radius: 999px; color: #095f5a; background: #dff3ef; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.source-card h2, .source-card h3 { margin: 0; font-size: 25px; line-height: 1.2; }
.source-card > p { margin: 12px 0; color: var(--muted); }
.source-card dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 15px; margin: 18px 0; font-size: 15px; }
.source-card dt { font-weight: 850; }
.source-card dd { margin: 0; }
.source-card > a { color: var(--cyan-deep); font-weight: 850; }
.hash-value { display: block; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; font-size: 13px; line-height: 1.55; }
.source-catalog-entry { margin-bottom: 48px; }
.source-type-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 30px 0; }
.source-type-nav a { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); text-decoration: none; }
.source-type-nav a:hover { border-color: var(--cyan-deep); }
.source-type-nav b { line-height: 1.3; }
.source-type-nav span { display: grid; min-width: 32px; height: 32px; place-items: center; border-radius: 10px; color: var(--night); background: var(--cyan); font-weight: 950; }
.source-group { margin-top: 72px; scroll-margin-top: 24px; }
.source-group-heading { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.source-group-heading .eyebrow { color: var(--cyan-deep); }
.source-group-heading h2 { margin: 0; font-size: clamp(32px, 4vw, 44px); line-height: 1.08; letter-spacing: -.035em; }
.source-group-heading p:last-child { max-width: 760px; margin: 12px 0 0; color: var(--muted); }
.source-record { scroll-margin-top: 24px; }

.content-footer { color: #b9c1d9; background: var(--night); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; width: min(calc(100% - 48px), var(--max)); margin: 0 auto; gap: 24px 55px; padding: 43px 0 50px; }
.footer-inner b { color: var(--white); letter-spacing: .11em; }
.footer-inner p { margin: 0; }
.footer-inner nav { grid-column: 2; display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.footer-inner nav a { color: var(--cyan); }
.footer-inner small { grid-column: 2; max-width: 760px; color: #7f89a7; }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr; }
  .header-inner nav { display: none; }
  .article-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; }
  .toc a { display: inline-block; margin-right: 15px; }
  .toc .toc-help { display: block; }
}

@media (max-width: 620px) {
  .header-inner, .hero-inner, .article-layout, .source-library, .footer-inner { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { min-height: 74px; }
  .wordmark span { width: 35px; height: 35px; }
  .wordmark b { font-size: 14px; }
  .hero-inner { padding: 51px 0 58px; }
  .article-hero h1 { font-size: clamp(32px, 9.5vw, 44px); }
  .article-deck { font-size: 18px; }
  .article-layout { padding: 35px 0 72px; }
  .article-body { font-size: 17px; }
  .article-body h2 { margin-top: 52px; }
  .answer-card, .callout { padding: 22px 20px; }
  .choice-grid, .fact-grid { grid-template-columns: 1fr; }
  .source-type-nav { grid-template-columns: 1fr; }
  .review-box dl, .source-card dl { grid-template-columns: 1fr; gap: 2px; }
  .review-box dd, .source-card dd { margin-bottom: 9px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner nav, .footer-inner small { grid-column: 1; }
  .comparison-table { display: block; overflow: visible; border: 0; background: transparent; }
  .comparison-table thead { position: absolute; display: block; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .comparison-table thead tr, .comparison-table thead th { display: block; width: 1px; min-width: 0; max-width: 1px; height: 1px; padding: 0; overflow: hidden; border: 0; }
  .comparison-table tbody { display: grid; gap: 14px; }
  .comparison-table tr { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--white); }
  .comparison-table td { display: grid; grid-template-columns: 105px minmax(0, 1fr); width: 100% !important; min-width: 0; gap: 13px; padding: 14px 15px; }
  .comparison-table td:last-child { border-bottom: 0; }
  .comparison-table td::before { content: attr(data-label); color: var(--cyan-deep); font-size: 10px; font-weight: 900; letter-spacing: .08em; line-height: 1.35; text-transform: uppercase; }
  .print-sheet { padding: 20px 16px; }
  .print-heading, .teacher-grid, .field-grid, .school-contact { grid-template-columns: 1fr; }
  .print-heading { display: grid; }
  .inline-print { width: 100%; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  .content-header, .toc, .content-footer, .choice-grid, .print-button, .skip-link { display: none !important; }
  .article-hero { color: #000; background: #fff; }
  .article-deck, .breadcrumbs { color: #333; }
  .hero-inner { display: none; }
  .hero-inner, .article-layout { width: 100%; padding: 0; }
  .article-layout { display: block; }
  .article-body { max-width: none; font-size: 10.5pt; line-height: 1.35; }
  .print-sheet { padding: 0; border: 0; border-radius: 0; }
  .print-heading { margin-bottom: 8px; }
  .print-heading h2 { font-size: 22pt; }
  .print-intro, .print-lead { margin-bottom: 10px; }
  .worksheet-block { margin: 10px 0; padding-top: 9px; }
  .worksheet-block h3 { margin-bottom: 5px; font-size: 12pt; }
  .write-lines { margin-bottom: 4px !important; }
  .write-lines > span { height: 16px; }
  .numbered-lines li { min-height: 24px; }
  .numbered-lines span { height: 18px; }
  .paper-checks { margin-bottom: 6px; gap: 4px 12px; font-size: 9.5pt; }
  .paper-note { margin-top: 8px; padding: 8px 10px; font-size: 9pt; }
  .teacher-grid { margin: 10px 0; gap: 10px; }
  .teacher-grid article { padding: 9px; }
  .teacher-grid h3 { font-size: 11pt; }
  .teacher-grid ul { font-size: 9pt; }
  .school-contact { margin-top: 10px; }
  .print-layout .article-body > :not(.print-sheet) { display: none !important; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: ""; }
}

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