:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --muted: #4a4a4a;
  --blue: #0066ff;
  --blue-hover: #0055d6;
  --paper: #ffffff;
  --line: #dfe3e9;
  --wash: #f4f7fc;
  --success: #22c55e;
  --error: #ef4444;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 120px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 16px/1.6 var(--sans); }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: var(--blue); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
p, h1, h2, h3, ul, figure { margin: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
h1 { font-size: 2.25rem; line-height: 1.12; letter-spacing: -.04em; font-weight: 700; max-width: 24ch; }
h2 { font-size: clamp(1.5rem, 2.3vw, 1.875rem); line-height: 1.25; letter-spacing: -.025em; font-weight: 700; }
h3 { font-size: 1.125rem; line-height: 1.3; }
p { text-wrap: pretty; }
ul { padding-left: 1.3rem; }
li { padding-left: .1rem; }
img { display: block; height: auto; max-width: 100%; }
[hidden] { display: none !important; }

/* Shared spacing and layout utilities. */
.u__frame { width: min(100% - 64px, 1280px); margin-inline: auto; }
.u__stack > * + * { margin-top: 20px; }
.u__prose { min-width: 0; max-width: 72ch; }
.u__section { margin-top: clamp(4rem, 8vw, 8rem); }
.u__muted { color: var(--muted); }
.u__mono { font-family: var(--mono); }
.u__caps { font-size: 1rem; line-height: 1.4; font-weight: 500; letter-spacing: .075em; text-transform: uppercase; }
.u__sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.handbook__skip { position: fixed; z-index: 10; top: 8px; left: 16px; display: flex; align-items: center; min-height: 48px; padding: 8px 16px; color: var(--paper); background: var(--ink); border-radius: 8px; transform: translateY(-160%); }
.handbook__skip:focus { transform: translateY(0); }
.masthead { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead__inner { display: flex; justify-content: space-between; align-items: center; min-height: 88px; gap: 24px; }
.masthead__identity { display: flex; gap: 12px; align-items: center; min-width: 44px; min-height: 56px; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.3; }
.masthead__mark { display: flex; align-items: center; justify-content: center; width: 44px; height: 48px; color: var(--blue); }
.masthead__sub { display: block; font-weight: 400; color: var(--muted); }
.masthead__action { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 52px; padding: 12px 20px; color: var(--paper); background: var(--blue); border-radius: 8px; text-decoration: none; font-weight: 600; transition: background-color 160ms, transform 180ms cubic-bezier(.2, .9, .3, 1.15); }
.masthead__action:hover { color: var(--paper); background: var(--blue-hover); text-decoration: none; transform: scale(1.03); }
.masthead__action:focus-visible { outline-color: var(--ink); }
.handbook__layout { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: clamp(32px, 4.5vw, 64px); padding-top: 64px; }
.handbook__main { min-width: 0; }
.anchor-rail { align-self: start; position: sticky; top: 120px; min-width: 0; }
.anchor-rail__home { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 8px; font-weight: 500; text-decoration: none; line-height: 1.3; border-bottom: 1px solid var(--line); padding-block: 8px 16px; }
.anchor-rail__label { padding-top: 24px; padding-bottom: 12px; color: var(--muted); }
.anchor-rail__list { display: grid; gap: 4px; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.anchor-rail__list li { padding: 0; }
.anchor-rail__link { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; font-size: 16px; line-height: 1.35; color: var(--muted); text-decoration: none; }
.anchor-rail__link:hover, .anchor-rail__link:focus-visible { color: var(--blue); background: var(--wash); }
.front-matter { padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.front-matter__copy { max-width: 72ch; }
.front-matter__kicker { color: var(--blue); font-weight: 500; line-height: 1.4; }
.front-matter__lead { max-width: 65ch; color: var(--muted); }
.front-matter--hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-bottom: 56px; }
.front-matter--hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); max-width: 15ch; line-height: 1.03; }
.front-matter--hero .front-matter__copy > * + * { margin-top: 24px; }
.front-matter__figure { min-width: 0; }
.front-matter__image { width: 100%; }
.front-matter__caption { font-family: var(--serif); font-size: 1.125rem; line-height: 1.45; padding: 16px 0 0 24px; border-left: 2px solid var(--blue); }
.front-matter__signals { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 0; list-style: none; }
.front-matter__signals li { display: flex; align-items: center; gap: 8px; padding: 0; color: var(--muted); }
.front-matter__signals li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.briefing__section { display: grid; grid-template-columns: minmax(0, 1fr) 176px; column-gap: 48px; align-items: start; scroll-margin-top: 24px; }
.briefing__copy { font-size: 16px; line-height: 1.6; }
.briefing__copy h2 { margin-bottom: 8px; }
.briefing__section--alert .briefing__copy { border-top: 3px solid var(--error); padding-top: 24px; }
.briefing__list > * + * { margin-top: 12px; }
.briefing__link { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 48px; width: fit-content; max-width: 100%; padding: 8px 0; font-weight: 500; text-decoration: none; }
.briefing__link:hover { text-decoration: underline; }
.definition__note { margin-top: 8px; padding-left: 20px; border-left: 1px solid var(--line); color: var(--muted); }
.definition__label { display: block; font-size: 16px; line-height: 1.4; }
.definition__term { margin-top: 12px; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; color: var(--ink); }
.definition__text { margin-top: 12px; font-family: var(--serif); font-size: 16px; line-height: 1.6; }
.contents__list { border-top: 1px solid var(--line); }
.contents__link { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 4px 24px; min-height: 96px; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding-left 160ms; }
.contents__name { grid-column: 1; font-size: 1.25rem; line-height: 1.3; font-weight: 600; color: var(--ink); }
.contents__deck { grid-column: 1; color: var(--muted); font-size: 16px; line-height: 1.5; }
.contents__arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--blue); font-size: 1.5rem; }
.contents__link:hover { padding-left: 8px; background: var(--wash); }
.contents__link:hover .contents__name { color: var(--blue); }
.briefing__figure { display: flex; align-items: center; gap: 40px; max-width: 72ch; padding-top: 48px; }
.briefing__image { width: 192px; flex-shrink: 0; }
.briefing__figure figcaption { font-family: var(--serif); font-size: 1.125rem; }
.recap { padding: 32px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; background: var(--wash); }
.recap__inner { max-width: 65ch; }
.recap__inner > .u__caps { display: block; color: var(--muted); }
.recap__next { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 56px; margin-top: 24px; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; text-decoration: none; }
.recap__next:hover { text-decoration: underline; }
.source__link { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 48px; max-width: 100%; padding: 8px 0; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.source__link:hover { text-decoration: underline; }
.source__link span { flex-shrink: 0; }
.evidence-drawer { margin-top: 32px; padding-bottom: 16px; }
.evidence-drawer__trigger { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 56px; padding: 16px 0; list-style: none; border-block: 1px solid var(--line); color: var(--blue); font-size: 16px; font-weight: 500; }
.evidence-drawer__trigger::-webkit-details-marker { display: none; }
.evidence-drawer__trigger span { font-size: 1.5rem; line-height: 1; }
.evidence-drawer__panel { max-width: 72ch; padding: 32px 0; background: var(--paper); }
.evidence-drawer__header { display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--muted); }
.evidence-drawer__link { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 20px; color: var(--blue); text-decoration: none; font-weight: 500; padding-block: 12px; }
.evidence-drawer__link:hover { text-decoration: underline; }
.evidence-drawer__close { display: inline-flex; justify-content: space-between; align-items: center; min-width: 92px; min-height: 48px; gap: 16px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.evidence-drawer__close span { font-size: 24px; line-height: 1; }
.evidence-drawer--enhanced[open] .evidence-drawer__panel { position: fixed; z-index: 12; top: 0; bottom: 0; right: 0; width: min(100%, 520px); max-width: none; padding: 32px; overflow-y: auto; border-left: 1px solid var(--line); box-shadow: 0 2px 8px rgb(0 0 0 / 8%); }
.evidence-drawer__backdrop { position: fixed; z-index: 11; inset: 0; background: rgb(26 26 26 / 30%); border: 0; }
.handbook--drawer-open { overflow: hidden; }
.footer { margin-top: clamp(4rem, 8vw, 8rem); border-top: 1px solid var(--line); padding-block: 40px; }
.footer__inner { display: flex; justify-content: space-between; align-items: start; gap: 48px; }
.footer__purpose { max-width: 60ch; font-size: 16px; line-height: 1.6; color: var(--muted); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.footer__link { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 44px; min-height: 48px; padding-block: 8px; color: var(--blue); font-size: 16px; text-decoration: none; }
.footer__link:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .handbook__layout { grid-template-columns: 152px minmax(0, 1fr); gap: 32px; }
  .briefing__section { grid-template-columns: minmax(0, 1fr) 152px; gap: 32px; }
  .front-matter--hero { grid-template-columns: minmax(0, 1fr); }
  .front-matter--hero h1 { max-width: 19ch; }
  .front-matter__figure { display: flex; align-items: center; gap: 24px; }
  .front-matter__image { width: min(55%, 320px); }
}

@media (max-width: 800px) {
  html { scroll-padding-top: 104px; }
  .u__frame { width: calc(100% - 40px); }
  .masthead__inner { min-height: 76px; }
  .handbook__layout { display: block; padding-top: 24px; }
  .anchor-rail { position: static; margin-bottom: 40px; }
  .anchor-rail__home { justify-content: flex-start; gap: 24px; border-bottom: 0; padding: 8px 0; }
  .anchor-rail__label { padding-top: 12px; padding-bottom: 8px; }
  .anchor-rail__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; border-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
  .anchor-rail__link { min-height: 48px; padding: 8px 0; }
  .front-matter { padding-bottom: 32px; }
  .front-matter--hero { gap: 32px; }
  .front-matter--hero h1 { font-size: clamp(2.5rem, 7.7vw, 3.5rem); }
  .briefing__section { grid-template-columns: minmax(0, 1fr) 140px; gap: 24px; }
  .definition__note { padding-left: 16px; }
  .footer__inner { display: block; }
  .footer__nav { margin-top: 24px; }
}

@media (max-width: 600px) {
  .masthead__action { position: fixed; left: 20px; right: 20px; bottom: 16px; min-height: 56px; box-shadow: 0 2px 8px rgb(0 0 0 / 8%); }
  .masthead__action:hover { transform: none; }
  .anchor-rail { margin-bottom: 32px; }
  .anchor-rail__list { column-gap: 16px; }
  .anchor-rail__link { font-size: 16px; }
  .front-matter--hero h1 { font-size: 2.5rem; line-height: 1.07; }
  .front-matter__figure { display: block; }
  .front-matter__image { width: 100%; max-width: 400px; }
  .front-matter__caption { margin-top: 8px; }
  .front-matter__signals { gap: 8px 16px; }
  .briefing__section { display: flex; flex-direction: column; gap: 24px; }
  .definition__note { margin-top: 0; width: 100%; padding: 16px 20px; border-left: 2px solid var(--line); background: var(--wash); }
  .definition__term { margin-top: 8px; }
  .definition__text { margin-top: 8px; }
  .briefing__figure { gap: 20px; }
  .briefing__image { width: 144px; }
  .recap { padding: 24px; }
  .contents__link { gap: 8px 16px; }
  .evidence-drawer--enhanced[open] .evidence-drawer__panel { padding: 24px; }
  .footer { padding-bottom: 104px; }
}

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

@media print {
  .masthead, .anchor-rail, .footer, .evidence-drawer, .handbook__skip { display: none; }
  .u__frame { width: 100%; }
  .handbook__layout { display: block; padding-top: 0; }
  .briefing__section { display: block; margin-top: 32px; break-inside: avoid; }
  .definition__note { margin-top: 16px; }
  .front-matter { padding-bottom: 24px; }
  .recap { margin-top: 32px; }
  a { color: var(--ink); }
}
