:root {
  --page: #f6f7f4;
  --white: #ffffff;
  --ink: #171918;
  --muted: #404541;
  --sky: #529fc3;
  --grey: #e4e8e5;
  --rule: #858b86;
  --spot: #dfb951;
  --gap: 1.5rem;
  font-size: 100%;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-padding-block: 1.5rem 8rem; }
body {
  margin: 0;
  padding-bottom: calc(7rem + env(safe-area-inset-bottom));
  background: var(--page);
  color: var(--ink);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
}
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .14em; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3, figure, dl, dd, ul { margin: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.13; font-weight: 700; text-wrap: balance; }
h1 { max-width: 22ch; font-size: clamp(2.6rem, 5.2vw, 4.75rem); letter-spacing: -.035em; }
h2 { max-width: 32ch; font-size: clamp(1.8rem, 2.8vw, 2.5rem); letter-spacing: -.025em; }
h3 { font-size: 1.6rem; letter-spacing: -.015em; }
input { width: 100%; min-width: 0; min-height: 52px; padding: .7rem .9rem; border: 2px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--white); }
input::placeholder { color: var(--muted); opacity: 1; }
button { min-height: 48px; border: 2px solid var(--ink); border-radius: 0; padding: .6rem 1.1rem; color: var(--ink); background: var(--white); font-weight: 700; }
button:hover { background: var(--grey); }

.u-shell { width: min(100% - 5rem, 78rem); margin-inline: auto; }
.u-stack { display: flex; flex-direction: column; gap: var(--gap); }
.u-grid { display: grid; gap: var(--gap); min-width: 0; }
.u-grid > * { min-width: 0; }
.u-pad { padding: clamp(1.5rem, 4.7vw, 4rem); }
.u-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.u-index { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.u-tap { display: inline-flex; align-items: center; min-height: 48px; min-width: 44px; }

.skip-link { position: fixed; z-index: 20; top: .5rem; left: 1rem; transform: translateY(-180%); padding: .7rem 1rem; background: var(--white); border: 2px solid var(--ink); }
.skip-link:focus { transform: translateY(0); }
.site-header.u-shell {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem max(2.5rem, calc((100% - 70rem) / 2));
  background: var(--sky);
}
.guide-name { position: relative; flex-direction: column; align-items: flex-start; padding-block: .25rem; font-size: 1.7rem; line-height: 1.1; text-decoration: none; font-weight: 700; }
.guide-name::before { content: ""; position: absolute; left: -.8rem; top: .45rem; width: 6px; height: 6px; background: var(--spot); }
.guide-name-label { margin-top: .4rem; font-size: 1rem; font-weight: 400; }
.header-caption { max-width: 26ch; font-size: 1rem; line-height: 1.4; }
.chapter { --gap: 4.5rem; }
.chapter-header { --gap: 1.5rem; position: relative; isolation: isolate; padding-block: 3.5rem 4rem; background: var(--sky); border-top: 2px solid var(--ink); }
.eyebrow { font-size: 1.125rem; font-weight: 400; letter-spacing: normal; text-transform: none; }
.chapter-lead { max-width: 57ch; font-size: 1.35rem; line-height: 1.5; }
.chapter-geometry { display: none; }
.home-heading { min-height: 32rem; padding-right: 34%; }
.home-heading h1 { max-width: 11ch; font-size: clamp(3.2rem, 7.5vw, 6.5rem); line-height: 1.02; }
.home-heading .chapter-lead { max-width: 39ch; }
.abstract-scene { position: absolute; z-index: -1; inset: 0 0 0 69%; overflow: hidden; pointer-events: none; }
.abstract-scene::before { content: "1"; position: absolute; right: 1rem; bottom: -1.8rem; font-size: clamp(22rem, 42vw, 36rem); font-weight: 400; line-height: 1; letter-spacing: -.1em; }
.arc-shape, .square-shape, .step-shape, .dot-shape { display: none; }
.chapter-body { --gap: 4.5rem; width: min(100% - 8rem, 66rem); margin-inline: auto; }
.chapter-section { --gap: 1.25rem; }
.chapter-section > p { max-width: 66ch; }
.chapter-section:first-child > p:first-of-type::first-letter { float: left; margin: .1rem .65rem 0 0; font-size: 4.9rem; font-weight: 700; line-height: .9; }
.comparison { --gap: 1.25rem; counter-reset: part; }
.comparison-part { --gap: .9rem; counter-increment: part; position: relative; padding: 1.3rem 0 0; border-top: 2px solid var(--ink); }
.comparison-part::before { content: counter(part); display: block; font-size: 4.75rem; font-weight: 400; line-height: 1; }
.comparison-part p { max-width: 60ch; }
figcaption { max-width: 70ch; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.6; color: var(--muted); }
.question-list { --gap: .85rem; max-width: 66ch; padding-left: 1.4rem; }
.question-list li { padding-left: .4rem; }
.question-list li::marker { color: var(--ink); }
.chapter-list { --gap: 3rem; padding-block: 2.5rem; border-block: 2px solid var(--ink); }
.chapter-list section { --gap: 1.25rem; }
.chapter-link { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; padding: 1rem .25rem; border-bottom: 1px solid var(--rule); font-weight: 700; line-height: 1.4; text-decoration: underline; }
.chapter-link:hover { background: var(--grey); }
.chapter-link span[aria-hidden] { flex: none; font-size: 1.4rem; }
.chapter-notes { --gap: 1rem; padding: 2.5rem; background: var(--grey); }
.chapter-notes h2 { font-size: 1.75rem; }
.source-list { padding: 0; list-style: none; }
.source-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .25rem; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.5; }
.source-link span[aria-hidden] { flex: none; }
.source-list li + li { border-top: 1px solid var(--rule); }
.reading-link { display: flex; justify-content: space-between; gap: 1.5rem; padding: 2rem 2.5rem; background: var(--sky); font-size: 1.4rem; line-height: 1.4; font-weight: 700; text-decoration: underline; }
.reading-link:hover { background: var(--grey); }
.next-label { display: block; margin-bottom: .5rem; font-size: 1rem; font-weight: 400; text-decoration: none; }
.reading-link > span[aria-hidden] { align-self: center; flex: none; font-size: 2rem; }
.site-footer { --gap: .75rem; padding-block: 4rem 1rem; font-size: 1rem; }
.site-footer p { max-width: 70ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-links a { padding: .5rem .25rem; }
.reading-dock { position: fixed; z-index: 10; bottom: 0; inset-inline: 0; border-top: 2px solid var(--ink); padding: .5rem 1rem calc(.5rem + env(safe-area-inset-bottom)); background: var(--page); }
.dock-inner { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; max-width: 46rem; margin-inline: auto; }
.dock-link { flex-direction: column; justify-content: center; gap: .15rem; min-height: 66px; padding: .35rem .2rem; font-size: 1rem; line-height: 1.2; font-weight: 400; text-decoration: none; }
.dock-link + .dock-link { border-left: 1px solid var(--rule); }
.dock-shape { height: 1.6rem; font-size: 1.4rem; line-height: 1.15; }
.dock-link:hover, .dock-link.is-active { background: var(--grey); font-weight: 700; }
.dock-link.is-active { text-decoration: underline; text-underline-offset: .25em; }
.dock-link:focus-visible { outline-offset: -4px; }
.notes-index { --gap: .75rem; max-width: 46rem; }
.filter-panel { --gap: .75rem; padding: 1.5rem; background: var(--grey); }
.filter-panel label { font-weight: 700; }
.filter-row { grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; }
#filter-status { font-size: 1rem; }
.term-list { row-gap: 1.5rem; }
.term-entry { --gap: .65rem; padding: 1.5rem 0; border-top: 2px solid var(--ink); }
.term-entry dt { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.term-entry dd { max-width: 62ch; }
.no-match { padding: 1rem 0; border-block: 2px solid var(--ink); }

@media (max-width: 900px) {
  .u-shell { width: calc(100% - 3rem); }
  .site-header.u-shell { padding-inline: 3rem; }
  .chapter-body { width: calc(100% - 3rem); }
  .home-heading { padding-right: 30%; }
  .home-heading h1 { font-size: clamp(3.2rem, 7vw, 5rem); }
  .abstract-scene { left: 73%; }
  .abstract-scene::before { right: .5rem; font-size: 24rem; }
}

@media (max-width: 600px) {
  body { font-size: 1.0625rem; line-height: 1.65; }
  .u-shell { width: calc(100% - 2rem); }
  .u-pad { padding: 1.5rem; }
  .u-compare, .u-index { grid-template-columns: 1fr; }
  .u-compare { gap: 1.75rem; }
  .site-header.u-shell { gap: 1rem; padding: 1.25rem 2.5rem; }
  .guide-name { font-size: 1.4rem; }
  .guide-name-label { font-size: .9375rem; }
  .header-caption { max-width: 11ch; font-size: .9375rem; text-align: right; }
  .chapter { --gap: 2.75rem; }
  .chapter-header { --gap: 1.25rem; padding-block: 2rem 2.5rem; }
  h1 { font-size: clamp(2.4rem, 10vw, 3.25rem); letter-spacing: -.03em; }
  h2 { font-size: 1.85rem; }
  .chapter-lead { font-size: 1.1875rem; }
  .eyebrow { font-size: 1rem; }
  .home-heading { min-height: 0; padding-bottom: 12rem; }
  .home-heading h1 { max-width: 10ch; font-size: clamp(2.6rem, 11.5vw, 4rem); }
  .abstract-scene { inset: auto 0 0; height: 10rem; }
  .abstract-scene::before { right: 1.5rem; bottom: -1.25rem; font-size: 12rem; }
  .chapter-body { --gap: 3rem; width: calc(100% - 1rem); }
  .chapter-section:first-child > p:first-of-type::first-letter { font-size: 4.2rem; }
  .comparison-part { padding: 1rem 0 0; }
  .comparison-part::before { font-size: 4rem; }
  .chapter-list { --gap: 2.5rem; padding-block: 2rem; }
  .chapter-link { min-height: 68px; }
  .chapter-notes { padding: 1.5rem; }
  .reading-link { padding: 1.5rem; font-size: 1.25rem; }
  .reading-dock { padding-inline: .5rem; }
  .site-footer { padding-top: 3rem; }
  .filter-panel { padding: 1.25rem; }
  .filter-row { grid-template-columns: minmax(0, 1fr); }
  .filter-row button { justify-content: center; }
  .term-entry { padding: 1.25rem 0; }
}

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

@media print {
  body { padding: 0; background: white; color: #000; font-size: 12pt; }
  .reading-dock, .skip-link, .abstract-scene, .chapter-geometry, .filter-panel, .reading-link { display: none; }
  .site-header.u-shell { padding: 1rem 0; background: white; }
  .u-shell, .chapter-body { width: 100%; }
  .chapter-header, .home-heading { min-height: 0; padding: 1rem 0; background: white; border: 0; }
  .chapter-header h1 { max-width: none; font-size: 28pt; }
  .u-compare, .u-index { grid-template-columns: 1fr; }
  .term-entry[hidden] { display: block !important; }
  .comparison-part, .term-entry, .chapter-notes { break-inside: avoid; background: white; color: #000; }
  a { color: #000; }
  .site-footer { padding-top: 1rem; }
}
