/* =====================================================================
   Jacobs Geometry — HTML edition
   Light / dark, print friendly, no external dependencies.
   ===================================================================== */

:root {
  color-scheme: light;
  --paper: #fbf9f4;
  --paper-2: #f3efe4;
  --surface: #ffffff;
  --surface-2: #faf7ef;
  --ink: #211e19;
  --ink-2: #4a4439;
  --muted: #797262;
  --line: #e4ddcc;
  --line-strong: #cfc5ad;
  --accent: #9c3d24;
  --accent-ink: #7f2d16;
  --accent-soft: #f6e7e0;
  --teal: #1e5c54;
  --slate: #3d5a73;
  --shadow: 0 1px 2px rgba(50, 38, 18, .05), 0 14px 30px -18px rgba(50, 38, 18, .35);
  --radius: 12px;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 48rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #171512;
    --paper-2: #201d18;
    --surface: #1f1c17;
    --surface-2: #241f19;
    --ink: #ece6d8;
    --ink-2: #c8c0af;
    --muted: #9d9482;
    --line: #35302a;
    --line-strong: #4b443a;
    --accent: #e0805f;
    --accent-ink: #f0a085;
    --accent-soft: #35241d;
    --teal: #78c3b7;
    --slate: #9db8ce;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 34px -20px rgba(0, 0, 0, .8);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171512;
  --paper-2: #201d18;
  --surface: #1f1c17;
  --surface-2: #241f19;
  --ink: #ece6d8;
  --ink-2: #c8c0af;
  --muted: #9d9482;
  --line: #35302a;
  --line-strong: #4b443a;
  --accent: #e0805f;
  --accent-ink: #f0a085;
  --accent-soft: #35241d;
  --teal: #78c3b7;
  --slate: #9db8ce;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 34px -20px rgba(0, 0, 0, .8);
}

/* ---------------------------------------------------------------- base */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

a { color: var(--accent-ink); text-underline-offset: 2px; text-decoration-thickness: .06em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  padding: .6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 1rem; top: .7rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.35rem;
}

/* ------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(8px)) {
  .topbar {
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
  }
}

.topbar-in {
  max-width: 80rem;
  margin: 0 auto;
  padding: .5rem 1.15rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.15rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 660;
  font-size: .95rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.brand-mark { display: inline-flex; width: 1.25rem; height: 1.25rem; color: var(--accent); }
.brand-mark svg { width: 100%; height: 100%; }
.brand em { font-style: normal; font-weight: 450; color: var(--muted); }

.topnav {
  display: flex;
  gap: .1rem;
  margin-left: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }

.topnav a {
  font-family: var(--font-sans);
  font-size: .815rem;
  font-weight: 520;
  color: var(--ink-2);
  text-decoration: none;
  padding: .35rem .62rem;
  border-radius: 999px;
  white-space: nowrap;
}
.topnav a:hover { background: var(--paper-2); color: var(--ink); }
.topnav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
}

.tools { margin-left: auto; display: flex; gap: .15rem; }

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
}
.iconbtn:hover { background: var(--paper-2); color: var(--ink); }
.iconbtn svg { width: 1.15rem; height: 1.15rem; }

.icon-sun { display: block; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

/* ------------------------------------------------------------ page bar */

.page { padding: 1.6rem 0 3.5rem; }

.page-book { --measure: 46.5rem; }
.page-guide { --measure: 54rem; }

.pagebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  margin-bottom: .4rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .38rem;
  font-family: var(--font-sans);
  font-size: .755rem;
  color: var(--muted);
  min-width: 0;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs .sep { opacity: .45; }
.crumb-here { color: var(--ink-2); font-weight: 550; }

.pdfchip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex: none;
  padding: .28rem .62rem .28rem .3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-2);
  text-decoration: none;
}
.pdfchip:hover { border-color: var(--accent); color: var(--accent-ink); }
.pagechips { display: flex; flex-wrap: wrap; gap: .35rem; flex: none; }
.chip-guide .pdfchip-icon { background: var(--teal); }
.chip-guide:hover { border-color: var(--teal); color: var(--teal); }
:root .chip-guide .pdfchip-icon { background: var(--teal); color: #fff; }
.chip-answers .pdfchip-icon { background: var(--slate); }
.chip-answers:hover { border-color: var(--slate); color: var(--slate); }
:root .chip-answers .pdfchip-icon { background: var(--slate); color: var(--paper); }
.chip-teacher .pdfchip-icon { background: var(--ink-2); }
.chip-teacher:hover { border-color: var(--ink-2); color: var(--ink-2); }
:root .chip-teacher .pdfchip-icon { background: var(--ink-2); color: var(--paper); }
.pdfchip-icon {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: .58rem;
  letter-spacing: .06em;
  padding: .19rem .38rem .16rem;
}
:root[data-theme="dark"] .pdfchip-icon { color: #1b1512; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pdfchip-icon { color: #1b1512; }
}

/* ----------------------------------------------------------------- toc */

.toc {
  margin: 1.4rem 0 2.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: .7rem .95rem;
  font-family: var(--font-sans);
  font-size: .875rem;
  box-shadow: var(--shadow);
}
.toc > summary {
  cursor: pointer;
  list-style: none;
  font-size: .74rem;
  font-weight: 680;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: .5rem;
}
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::before {
  content: "▸";
  color: var(--accent);
  transition: transform .15s ease;
  display: inline-block;
}
.toc[open] > summary::before { transform: rotate(90deg); }
.toc-count { font-weight: 450; letter-spacing: 0; text-transform: none; opacity: .8; }
.toc ul {
  list-style: none;
  margin: .75rem 0 .15rem;
  padding: 0;
  columns: 1;
}
.toc li { margin: .12rem 0; line-height: 1.35; }
.toc a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: .1rem 0; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc .toc-l3 { padding-left: .95rem; font-size: .93em; opacity: .9; }

@media (min-width: 60rem) {
  .toc ul { columns: 2; column-gap: 2rem; }
  .toc li { break-inside: avoid; }
}

/* --------------------------------------------------------------- prose */

.prose { font-size: 1.035rem; }

.prose-sans {
  font-family: var(--font-sans);
  font-size: .97rem;
  line-height: 1.62;
}
.prose-sans h1,
.prose-sans h2,
.prose-sans h3,
.prose-sans h4 { font-family: var(--font-sans); }

.prose > :first-child { margin-top: 0; }

.prose h1 {
  font-size: clamp(1.85rem, 4.4vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -.022em;
  font-weight: 700;
  margin: .1em 0 .75em;
  text-wrap: balance;
}

.prose h2 {
  font-size: clamp(1.22rem, 2.3vw, 1.45rem);
  line-height: 1.28;
  letter-spacing: -.012em;
  margin: 2.5em 0 .65em;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  text-wrap: balance;
}

.prose h3 {
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 1.9em 0 .45em;
  font-family: var(--font-sans);
  letter-spacing: -.008em;
}

.prose h4 {
  font-size: .95rem;
  margin: 1.5em 0 .35em;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
}

.prose p { margin: 0 0 1.02em; }
.prose ul,
.prose ol { margin: 0 0 1.1em; padding-left: 1.35em; }
.prose li { margin: .28em 0; }
.prose li > ul,
.prose li > ol { margin: .3em 0 .4em; }
.prose li:has(> p:only-child) { margin: .18em 0; }

.prose strong { font-weight: 680; }
.prose em { font-style: italic; }

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.2rem 0;
}

.prose blockquote {
  margin: 1.4rem 0;
  padding: .1rem 0 .1rem 1.1rem;
  border-left: 3px solid var(--line-strong);
  color: var(--ink-2);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .06em .32em;
}

.prose pre {
  margin: 1.3rem 0;
  padding: .9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .84rem;
  line-height: 1.5;
}
.prose pre code { background: none; border: 0; padding: 0; }

/* figures */

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.7rem auto 1rem;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 30, 12, .12), 0 0 0 1px rgba(40, 30, 12, .05);
}

.prose .figcaption {
  margin: -.55rem auto 1.7rem;
  max-width: 40rem;
  text-align: center;
  font-size: .87em;
  line-height: 1.45;
  color: var(--muted);
}
.prose .figcaption em { font-style: italic; }

/* tables */

.tablewrap {
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: .87rem;
  line-height: 1.45;
  margin: 0;
}
.prose .tablewrap > table { min-width: 100%; }
.prose th,
.prose td {
  padding: .5rem .7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.prose thead th {
  background: var(--surface-2);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: color-mix(in srgb, var(--paper-2) 55%, transparent); }

/* math */

.prose math { font-size: 1.03em; }
.prose math[display="block"] {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: .45rem auto;
  padding: .15rem 0;
}

/* page markers */

.prose .page-ref {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 2rem 0 .85rem;
  font-family: var(--font-sans);
  font-size: .66rem;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .62;
}
.page-ref::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.page-ref a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--line-strong);
}
.page-ref a:hover { color: var(--accent); }

/* links inside book text */

.prose a { word-break: break-word; }

/* ------------------------------------------------------------- pager */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin: 3.4rem 0 .5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.pager-link:hover {
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
}
.pager-dir {
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.pager-title { font-size: .92rem; line-height: 1.35; }
.pager-next { text-align: right; align-items: flex-end; grid-column: 2; }

/* ------------------------------------------------------------ footer */

.sitefoot {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 2rem 0 2.6rem;
  font-family: var(--font-sans);
  font-size: .82rem;
  color: var(--ink-2);
}
.sitefoot p { margin: .2rem 0; }
.sitefoot .muted { color: var(--muted); }
.sitefoot a { color: var(--muted); text-decoration: none; }
.sitefoot a:hover { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------- home */

.page-home { padding: 0 0 3rem; }

.hero {
  padding: 4.2rem 1.35rem 2.6rem;
  max-width: 60rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.eyebrow em { font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 500; }

.hero h1 {
  font-size: clamp(2.2rem, 6.2vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 700;
  margin: 0 0 .6rem;
  max-width: 18ch;
  text-wrap: balance;
}

.h1-sub {
  display: block;
  margin-top: .35rem;
  font-size: .42em;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.015em;
  color: var(--ink-2);
  line-height: 1.2;
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 58ch;
  margin: 0 0 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  padding: .62rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .88rem;
  font-weight: 560;
  text-decoration: none;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { color: #fff; background: var(--accent-ink); border-color: var(--accent-ink); }
:root[data-theme="dark"] .btn-primary { color: #1c1512; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { color: #1c1512; }
}
.btn-note { font-size: .72rem; font-weight: 500; opacity: .7; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.4rem;
  font-family: var(--font-sans);
  font-size: .78rem;
  color: var(--muted);
  margin: 0;
}
.stats strong { color: var(--ink-2); font-weight: 650; }

.home-wrap { max-width: 68rem; }

.home-section { padding: 3.2rem 0 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .2rem 1.5rem;
  margin-bottom: 1.3rem;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  letter-spacing: -.02em;
}
.section-note {
  margin: 0;
  font-family: var(--font-sans);
  font-size: .82rem;
  color: var(--muted);
  max-width: 44ch;
}
.section-foot {
  margin: 1.2rem 0 0;
  font-family: var(--font-sans);
  font-size: .82rem;
}
.text-link { text-decoration: none; font-weight: 550; }
.text-link::after { content: " →"; }

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: .65rem;
}

.chapter-card {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.chapter-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.card-main {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  flex: 1;
  padding: .8rem .85rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.card-main:hover { color: var(--ink); }

.card-num {
  flex: none;
  min-width: 2.1rem;
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--accent);
  padding-top: .15rem;
}
.card-body { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.card-title { font-size: .95rem; font-weight: 540; line-height: 1.32; }
.card-meta {
  font-family: var(--font-sans);
  font-size: .72rem;
  color: var(--muted);
}

.card-pdf {
  flex: none;
  align-self: center;
  margin-right: .55rem;
  padding: .28rem .45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
}
.card-pdf:hover { color: #fff; background: var(--accent); border-color: var(--accent); }

.card-extra { align-self: center; margin-right: .6rem; }
.mini-link {
  font-family: var(--font-sans);
  font-size: .68rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--line-strong);
  white-space: nowrap;
}
.mini-link:hover { color: var(--accent); }

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: .65rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.link-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  color: var(--ink);
}
.link-card-title { font-size: 1rem; font-weight: 600; }
.link-card-note { font-size: .82rem; line-height: 1.5; color: var(--muted); }
.link-card-kind {
  margin-top: .25rem;
  font-family: var(--font-sans);
  font-size: .64rem;
  font-weight: 680;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* -------------------------------------------------------- folder index */

.dirlist {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  font-family: var(--font-sans);
}
.dirlist li + li { border-top: 1px solid var(--line); }
.dirrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .72rem .95rem;
  text-decoration: none;
  color: var(--ink);
  font-size: .9rem;
}
.dirrow:hover { background: var(--paper-2); color: var(--ink); }
.row-icon { color: var(--accent); font-size: .7rem; width: .9rem; flex: none; }
.row-title { flex: 1; min-width: 0; }
.row-kind {
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------- search */

.search-head { padding: 2.6rem 0 1.6rem; }
.search-head h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  letter-spacing: -.025em;
  margin: 0 0 .5rem;
}
.searchform { margin: 1.5rem 0 .7rem; }
.searchform input {
  width: 100%;
  padding: .85rem 1rem;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.searchform input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-status {
  font-family: var(--font-sans);
  font-size: .8rem;
  color: var(--muted);
  margin: .4rem 0 1.6rem;
}
.results { list-style: none; padding: 0; margin: 0 0 3rem; }
.result {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.result a { text-decoration: none; }
.result-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 3px;
}
.result-meta {
  display: block;
  margin: .18rem 0 .4rem;
  font-family: var(--font-sans);
  font-size: .7rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.result-snippet { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--ink-2); }
.result-snippet mark {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 3px;
  padding: 0 .1em;
}
.noscript, .nonotes {
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- misc */

.lede a { color: var(--accent-ink); }

@media (max-width: 46rem) {
  .topbar-in { gap: .4rem; }
  .topnav { gap: 0; flex: 1 1 auto; flex-wrap: wrap; overflow: visible; }
  .topnav a { padding: .3rem .46rem; font-size: .78rem; }
  .brand { font-size: .88rem; }
}

@media (max-width: 40rem) {
  body { font-size: 16px; }
  .topbar-in { padding: .45rem .8rem; }
  .brand-text em { display: none; }
  .topnav { margin-left: 0; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; text-align: left; align-items: flex-start; }
  .hero { padding-top: 2.8rem; }
  .pagebar { flex-wrap: wrap; }
  .prose h2 { margin-top: 2.1em; }
}

@media (max-width: 30rem) {
  .brand-text { display: none; }
}

/* -------------------------------------------------------------- print */

/* Printing is handled by print.css, which every page loads with
   media="print". Keeping it separate means the screen stylesheet stays
   focused and the print rules can be edited on their own. */
