/* Visual treatment adapted from the ABP portal; original HTML and research
   material are preserved. Newsreader is bundled under the SIL OFL. */
@font-face {
  font-family: Newsreader;
  src: url("fonts/Newsreader-Roman.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url("fonts/Newsreader-Italic.ttf") format("truetype");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #faf8f3;
  --ink: #292923;
  --muted: #6c6a61;
  --accent: #943f34;
  --accent-dark: #713026;
  --rule: #dfdbd0;
  --tint: #f1eee6;
  --rose: #f4e9e3;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Newsreader, Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 20px/1.65 var(--serif);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-dark); }
a:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
::selection { background: #e9cfc4; color: var(--ink); }
.shell { max-width: 1240px; margin: auto; padding: 0 48px; }
.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 10;
  padding: .6rem 1rem; background: var(--paper); font: 15px var(--sans);
}
.skip-link:focus { top: 1rem; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; min-height: 112px; border-bottom: 1px solid var(--rule);
}
.site-title { margin: 0; font: 450 29px/1.1 var(--serif); letter-spacing: -.04em; }
.brand {
  color: var(--ink); font: 450 29px/1.1 var(--serif); letter-spacing: -.04em;
  text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--accent); }
.brand em, .brand-dot { color: var(--accent); }
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 6px 30px; font: 13px/1.5 var(--sans);
}
.site-nav a {
  padding: 8px 0; color: var(--muted); text-decoration: none;
  white-space: nowrap; border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }
.site-nav a[aria-current] { border-bottom-color: var(--accent); }
.site-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 16px 40px; padding: 26px 0 32px; border-top: 1px solid var(--rule);
  color: var(--muted); font: 11px/1.6 var(--sans);
}
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-left: auto; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
main { padding: 53px 0 75px; min-height: 60vh; }
h1, h2, h3 { margin: 0; font-weight: 450; line-height: 1.1; }
h1 { font-size: clamp(40px, 5vw, 64px); letter-spacing: -.04em; margin-bottom: 30px; }
h2 { font-size: 36px; letter-spacing: -.025em; margin-bottom: 21px; }
h3 { font-size: 25px; letter-spacing: -.015em; margin: 27px 0 12px; }
p { margin: 0 0 1rem; }
strong { font-weight: 600; }
.prose, main:has(> .collection) { max-width: 780px; margin: 0 auto; min-width: 0; }
.intro { max-width: 730px; color: var(--muted); font-size: 22px; line-height: 1.55; }
.prose > h1 { padding-bottom: 36px; border-bottom: 1px solid var(--rule); }
.theory { padding: 14px 0 5px; }
.theory > p:first-child strong { color: var(--accent); font-weight: 500; }
.math-display {
  max-width: 100%; min-width: 0; overflow: auto hidden;
  padding: 2px; margin: 12px 0; font-size: inherit;
}
.math-display mjx-container[display="true"] {
  width: max-content; min-width: 100%; margin: .25em 0 !important; padding: 0;
}
mjx-container svg { max-width: none; }
.research-problems { padding-left: 22px; }
.research-problems li + li { margin-top: 14px; }
.section { margin-top: 45px; }
.section-title { font-size: 32px; }
.theory .section-title { margin-top: 48px; }
.topic-section {
  margin-top: 40px; padding: 0 0 37px;
  border-bottom: 1px solid var(--rule); scroll-margin-top: 30px;
}
.topic-section + .topic-section { margin-top: 37px; }
.topic-section h2 { font-size: 31px; margin-bottom: 21px; }
.topic-section > :last-child { margin-bottom: 0; }
.topic-note { margin-top: 28px; padding: 25px 29px; background: var(--tint); }
.topic-note h3 { margin-top: 0; }
.topic-note .resource-links { margin-bottom: 0; }
.topic-sources { list-style: none; padding: 0; margin: 0; }
.topic-sources li + li { margin-top: 6px; }
.section:has(.team) {
  display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 30px;
  padding: 32px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.section:has(.team) .section-title {
  padding-top: 5px; font: 11px/1.6 var(--sans); letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}
.team {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 30px;
  list-style: none; margin: 0; padding: 0;
}
.team a { color: var(--ink); text-decoration: none; }
.team a:hover { color: var(--accent); text-decoration: underline; }
.section-callout { padding: 33px 37px; background: var(--tint); }
.section-callout h2 { font-size: 29px; margin-bottom: 12px; }
.section-callout p { color: var(--muted); font-size: 18px; }
.section-callout > :last-child { margin-bottom: 0; }
.collection { margin-top: 43px; }
.entry {
  max-width: 900px; padding: 35px 0 38px;
  border-top: 1px solid var(--rule); scroll-margin-top: 30px;
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry h2 { font-size: 32px; max-width: 800px; }
.entry h2 a { color: inherit; text-decoration: none; }
.entry h2 a:hover { color: var(--accent); }
.entry-number {
  display: flex; align-items: center; gap: 10px; color: var(--accent);
  font: 11px/1.6 var(--sans); text-transform: uppercase;
  letter-spacing: .13em; margin-bottom: 15px;
}
.entry-number::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.metadata {
  display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 16px;
  font: 12px/1.6 var(--sans); margin: 22px 0;
}
.metadata dt { color: var(--muted); }
.metadata dd { margin: 0; min-width: 0; }
.resource-links {
  display: flex; flex-wrap: wrap; gap: 12px 21px; list-style: none;
  padding: 0; margin: 23px 0; font: 12px/1.6 var(--sans);
}
.resource-links a { display: inline-block; text-decoration: none; padding: 3px 0; border-bottom: 1px solid var(--rule); }
.resource-links a:hover { border-bottom-color: var(--accent); }
.checksum { color: var(--muted); font: 10px/1.7 var(--sans); margin-top: 22px; overflow-wrap: anywhere; }
.checksum code { display: block; margin-top: 4px; font-size: 11px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .9em; }
.related { margin: 25px 0 0; padding: 20px 24px; background: var(--tint); border-left: 2px solid var(--accent); font-size: 18px; }
.related-label { display: block; color: var(--muted); font: 10px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.resource-box { min-width: 0; break-inside: avoid; }
.resource-box + .resource-box { margin-top: 16px; }
.resource-box h3 { margin: 0 0 14px; font-size: inherit; line-height: inherit; }
.resource-box .resource-links { margin: 0; font: inherit; }
.resource-box a {
  display: inline; padding: 0; border-bottom: 0;
  text-decoration: underline solid currentColor 1px; text-underline-offset: .2em;
}
.resource-box > :last-child { margin-bottom: 0; }
.back-link { display: inline-block; margin-bottom: 28px; font: 12px/1.6 var(--sans); text-decoration: none; }
main:has(> .prompt) { max-width: 900px; margin: auto; }
main:has(> .prompt) h1 { font-size: clamp(32px, 4vw, 42px); margin-bottom: 22px; }
main:has(> .prompt) .intro { font-size: 19px; }
.prompt {
  margin: 28px 0 0; padding: 25px; background: var(--tint); border: 1px solid var(--rule);
  white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4;
  font: 13px/1.75 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.prompt code { font: inherit; }
/* Copyable BibTeX citation, matching the resource boxes. */
.citation-section { margin-top: 36px; }
.citation-section > h2 { margin: 0 0 18px; font-size: clamp(28px, 3vw, 32px); }
.citation-box { margin-top: 0; }
.citation-header { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 12px; }
.citation-actions { display: flex; align-items: center; gap: 10px; }
.citation-status { color: var(--muted); font: 12px/1.5 var(--sans); }
.citation-copy {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; padding: 10px; border: 1px solid var(--rule); border-radius: 4px;
  background: transparent; color: var(--accent); cursor: pointer;
}
.citation-copy:hover { background: var(--rose); color: var(--accent-dark); }
.citation-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.citation-copy .copied-icon, .citation-copy[data-copied="true"] .copy-icon { display: none; }
.citation-copy[data-copied="true"] .copied-icon { display: block; }
.citation-code {
  max-width: 100%; margin: 0; overflow-x: auto; white-space: pre;
  font: 13px/1.75 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.citation-code code { font: inherit; }
@media print { .citation-actions { display: none; } .citation-code { white-space: pre-wrap; overflow-wrap: anywhere; } }
@media (max-width: 1050px) {
  .shell { padding: 0 34px; }
  .site-header { gap: 24px; }
  .site-nav { gap: 6px 20px; }
}
@media (max-width: 760px) {
  .shell { padding: 0 24px; }
  .site-header { min-height: 94px; gap: 18px; }
  .brand { font-size: 25px; }
  .site-title { font-size: 25px; }
  .site-nav { gap: 4px 16px; font-size: 12px; }
  main { padding: 43px 0 55px; }
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
}
@media (max-width: 640px) {
  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { margin-left: 0; }
  .site-header { flex-direction: column; align-items: flex-start; padding: 27px 0 19px; gap: 17px; }
  .site-nav { justify-content: flex-start; gap: 3px 20px; }
  .site-nav a { padding: 5px 0; }
  main { padding-top: 34px; }
  h1 { font-size: 40px; }
  .prose > h1 { padding-bottom: 27px; }
  .section:has(.team) { grid-template-columns: 1fr; gap: 9px; }
  .section:has(.team) .section-title { margin-bottom: 8px; }
  .team { gap: 12px 20px; font-size: 19px; }
  .section-callout { padding: 25px 23px; }
  .topic-section h2, .entry h2 { font-size: 28px; }
  .metadata { grid-template-columns: 1fr; gap: 2px; }
  .metadata dd { margin-bottom: 10px; }
  .prompt { padding: 18px; font-size: 12px; }
  .related { padding: 19px 20px; }
}
@media (max-width: 360px) {
  .shell { padding: 0 18px; }
  .site-nav { gap: 3px 16px; }
  .team { grid-template-columns: 1fr; }
}
@media print {
  body { background: white; color: black; font-size: 12pt; }
  .site-nav, .skip-link, .back-link { display: none; }
  .shell { max-width: none; padding: 0; }
  .site-header { min-height: 0; padding: 0 0 12px; }
  main { padding-top: 20px; }
  .prose, main:has(> .collection), main:has(> .prompt) { max-width: none; }
  a { color: inherit; }
  .prompt, .related, .theory > .math-display, .section-callout { background: white; }
  .topic-section, .entry, .section { break-inside: avoid; }
}
