/* McMaster Pathophysiology Review
   Palette taken from the MPR figure library: slate-blue, rose and khaki boxes on white. */

@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 600; font-display: swap; src: url(../fonts/source-serif-4-latin-600-italic.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/source-serif-4-greek-400-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/source-serif-4-greek-400-italic.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/source-serif-4-greek-600-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/source-sans-3-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/source-sans-3-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/source-sans-3-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/source-sans-3-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/source-sans-3-greek-400-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/source-sans-3-greek-600-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/source-sans-3-greek-700-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }

:root {
  --ink: #1f2a37;
  --ink-soft: #4b5867;
  --navy: #24364f;          /* figure header slate, darkened */
  --blue: #9fb6d3;          /* figure box blue */
  --blue-tint: #e6edf6;
  --rose: #c21b33;          /* MPR logo red */
  --rose-box: #e9bcc4;      /* figure box pink */
  --rose-tint: #f8e9ec;
  --khaki: #e6dba8;         /* figure box khaki */
  --khaki-tint: #f6f1dc;
  --grey-tint: #eef0f2;
  --rule: #d5dbe3;
  --paper: #ffffff;
  --chrome: #f5f7fa;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --measure: 42rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, var(--navy) 45%, transparent); }
a:hover { color: var(--rose); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; font-family: var(--sans); }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------------------------------------------------------------- masthead */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: #fff; color: var(--ink);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}
.masthead-inner {
  max-width: 76rem; margin: 0 auto; padding: .6rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.mark { display: block; width: 3.6rem; height: auto; }
.wordmark-text { font: 700 .95rem/1.08 var(--sans); letter-spacing: -.005em; }
.topnav { display: flex; align-items: center; gap: .3rem; }
.topnav a, .topnav button {
  color: var(--ink); text-decoration: none; font: 600 .95rem/1 var(--sans);
  padding: .55rem .7rem; border-radius: 6px; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem;
}
.topnav a:hover, .topnav button:hover { background: var(--grey-tint); color: var(--ink); }
.topnav kbd {
  font: 600 .72rem/1 var(--sans); color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 4px; padding: .15rem .35rem;
}
@media (max-width: 560px) {
  .wordmark-text { display: none; }
  .topnav kbd { display: none; }
}

/* ---------------------------------------------------------------- hero (home) */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--chrome); border-bottom: 1px solid var(--rule); }
/* slow drifting colour fields taken from the figure palette */
.hero::before {
  content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 30%, rgba(159, 182, 211, .55), transparent 70%),
    radial-gradient(34% 40% at 78% 24%, rgba(233, 188, 196, .50), transparent 70%),
    radial-gradient(36% 38% at 64% 78%, rgba(230, 219, 168, .55), transparent 70%),
    radial-gradient(30% 34% at 18% 82%, rgba(233, 188, 196, .30), transparent 70%);
  filter: blur(10px);
}
.hero-inner { position: relative; max-width: 76rem; margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem); }
.hero h1 {
  font: 600 clamp(2.1rem, 5.2vw, 3.6rem)/1.06 var(--serif);
  letter-spacing: -.015em; margin: 0 0 1rem; max-width: 16ch; color: var(--navy);
}
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); max-width: 40rem; margin: 0 0 2.2rem; }

/* The chain: drawn in the style of the MPR flowcharts */
.chain {
  list-style: none; margin: 0 0 2.4rem; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.2rem;
  font-family: var(--sans); max-width: 62rem;
}
.node { position: relative; border: 1.5px solid var(--ink); background: #fff; border-radius: 12px; }
.node-name { border-radius: 10.5px 10.5px 0 0; }
.node-name {
  display: block; padding: .5rem .8rem; font-weight: 700; font-size: 1.02rem; line-height: 1.2;
  border-bottom: 1.5px solid var(--ink);
}
.node-q { display: block; padding: .55rem .8rem .65rem; font-size: .95rem; line-height: 1.35; color: var(--ink-soft); }
.node-0 .node-name { background: var(--khaki); }
.node-1 .node-name { background: var(--rose-box); }
.node-2 .node-name { background: var(--blue); }
.node-3 .node-name { background: var(--grey-tint); }
.node:not(:last-child)::after {           /* connector line */
  content: ""; position: absolute; top: 1.15rem; left: 100%;
  width: 2.2rem; height: 1.5px; background: var(--ink);
}
.node:not(:last-child)::before {          /* arrowhead */
  content: ""; position: absolute; top: calc(1.15rem - 5px); left: calc(100% + 2.2rem - 8px);
  border: 5.5px solid transparent; border-left: 8px solid var(--ink); border-right: 0;
}
@media (max-width: 760px) {
  .chain { grid-template-columns: 1fr; gap: 1.4rem; max-width: 22rem; }
  .node:not(:last-child)::after { top: 100%; left: 1.4rem; width: 1.5px; height: 1.4rem; }
  .node:not(:last-child)::before { top: calc(100% + 1.4rem - 8px); left: calc(1.4rem - 5px); border: 5.5px solid transparent; border-top: 8px solid var(--ink); border-bottom: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: drift 28s ease-in-out infinite alternate; }
  @keyframes drift {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    33%  { transform: translate3d(4%, -3%, 0) rotate(6deg) scale(1.05); }
    66%  { transform: translate3d(-3%, 3%, 0) rotate(-4deg) scale(1.02); }
    100% { transform: translate3d(2%, 2%, 0) rotate(3deg) scale(1.06); }
  }
  /* the chain draws itself once: box, then connector, then the next box */
  .home .node { animation: node-in .45s cubic-bezier(.2,.7,.2,1) both; }
  .home .node::after { transform-origin: left center; animation: line-in .3s ease-out both; }
  .home .node::before { animation: fade-in .15s linear both; }
  .home .node-0 { animation-delay: .1s; }  .home .node-0::after { animation-delay: .45s; } .home .node-0::before { animation-delay: .7s; }
  .home .node-1 { animation-delay: .75s; } .home .node-1::after { animation-delay: 1.1s; } .home .node-1::before { animation-delay: 1.35s; }
  .home .node-2 { animation-delay: 1.4s; } .home .node-2::after { animation-delay: 1.75s; } .home .node-2::before { animation-delay: 2s; }
  .home .node-3 { animation-delay: 2.05s; }
  @keyframes node-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes line-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  @media (max-width: 760px) {
    .home .node::after { transform-origin: center top; animation-name: line-in-v; }
    @keyframes line-in-v { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  }

  /* responses to the reader */
  .node { transition: transform .2s ease, box-shadow .2s ease; }
  .node:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31, 42, 55, .10); }
  .hero-search { transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease; }
  .hero-search:hover { box-shadow: 0 6px 18px rgba(31, 42, 55, .10); transform: translateY(-1px); }
  .hero-search svg { transition: transform .2s ease; }
  .hero-search:hover svg { transform: scale(1.12) rotate(-8deg); }
  .spec li a, .cat-list li a { transition: padding-left .18s ease, background-color .18s ease, color .18s ease; }
  .spec li a:hover, .cat-list li a:hover { padding-left: 1.1rem; }
  .spec ul, .cat-list { transition: border-color .2s ease; }
  .spec:hover ul { border-left-color: var(--rose-box); }
  .az-list a { transition: color .15s ease, transform .15s ease; }
  .az-list a:hover { transform: translateX(3px); }
  .topnav a, .topnav button, .crumbs a, .related a, .search-results li a { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
  .related a { transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease; }
  .related a:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(31, 42, 55, .10); }
  .toc a { transition: color .2s ease, border-color .2s ease; }
  .prose figure img { transition: box-shadow .2s ease, border-color .2s ease; }
  .prose figure img:hover { border-color: var(--blue); box-shadow: 0 8px 24px rgba(31, 42, 55, .12); }
  .masthead { transition: box-shadow .25s ease; }
  .masthead.scrolled { box-shadow: 0 2px 14px rgba(31, 42, 55, .08); }
  .wordmark .mark { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
  .wordmark:hover .mark { transform: translateX(2px) scale(1.04); }

  /* dialogs open from where they are */
  .search:not([hidden]) { animation: fade-in .18s ease-out; }
  .search:not([hidden]) .search-panel { animation: panel-in .22s cubic-bezier(.2,.8,.2,1); }
  @keyframes panel-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
  .search-results li { animation: fade-in .2s ease-out both; }
  .search-results li:nth-child(2) { animation-delay: .03s; } .search-results li:nth-child(3) { animation-delay: .06s; }
  .search-results li:nth-child(4) { animation-delay: .09s; } .search-results li:nth-child(n+5) { animation-delay: .12s; }
  .lightbox:not([hidden]) { animation: fade-in .2s ease-out; }
  .lightbox:not([hidden]) img { animation: zoom-in .28s cubic-bezier(.2,.8,.2,1); }
  @keyframes zoom-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
  html { scroll-behavior: smooth; }
  :target { animation: target-flash 1.6s ease-out; }
  @keyframes target-flash { 0%, 30% { background-color: var(--khaki-tint); } 100% { background-color: transparent; } }
}

.hero-search {
  display: flex; align-items: center; gap: .7rem; width: 100%; max-width: 36rem;
  padding: .95rem 1.1rem; background: #fff; color: var(--ink-soft);
  border: 1.5px solid var(--ink); border-radius: 12px;
  font: 400 1.08rem/1.2 var(--sans); cursor: text; text-align: left;
}
.hero-search:hover { border-color: var(--rose); color: var(--ink); }

/* ---------------------------------------------------------------- topic index */
.topics-inner { max-width: 76rem; margin: 0 auto; padding: 3.2rem var(--gutter) 4rem; font-family: var(--sans); }
.topics-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 2rem; margin-bottom: 1.8rem; border-bottom: 1.5px solid var(--ink); padding-bottom: .7rem; }
.topics-head h2, .az h2 { font: 600 1.6rem/1.2 var(--serif); margin: 0; color: var(--navy); }
.topics-head p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.spec-grid { columns: 3 17rem; column-gap: 2.6rem; }
.spec { break-inside: avoid; margin: 0 0 2rem; }
.spec h3 { margin: 0 0 .45rem; font: 700 1.05rem/1.3 var(--sans); display: flex; align-items: baseline; gap: .5rem; }
.spec h3 a { color: var(--ink); text-decoration: none; }
.spec h3 a:hover { color: var(--rose); }
.count { font-weight: 600; font-size: .82rem; color: var(--ink-soft); background: var(--grey-tint); padding: .05rem .45rem; border-radius: 99px; }
.spec ul, .cat-list { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--blue); }
.spec li a, .cat-list li a { display: block; padding: .28rem 0 .28rem .85rem; text-decoration: none; color: var(--navy); font-size: 1.02rem; line-height: 1.3; }
.spec li a:hover, .cat-list li a:hover { color: var(--rose); background: var(--rose-tint); }
.az { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.az h2 { margin-bottom: 1rem; }
.az-list { columns: 3 15rem; column-gap: 2.6rem; margin: 0; padding: 0; list-style: none; font-family: var(--sans); }
.az-list li { break-inside: avoid; }
.az-list a { display: block; padding: .2rem 0; text-decoration: none; }

/* ---------------------------------------------------------------- simple pages */
.simple { max-width: 76rem; margin: 0 auto; padding: 2.4rem var(--gutter) 4rem; }
.simple h1 { font: 600 clamp(2rem, 4.5vw, 2.8rem)/1.1 var(--serif); color: var(--navy); margin: .2rem 0 1.4rem; }
.cat-list { max-width: 32rem; font-family: var(--sans); }
.about .prose { max-width: var(--measure); }
.team-list { margin: 0; columns: 2 15rem; column-gap: 2.5rem; font-family: var(--sans); }
.team-list div { break-inside: avoid; padding: .45rem 0; border-top: 1px solid var(--rule); }
.team-list dt { font-weight: 700; font-size: .95rem; }
.team-list dd { margin: 0; color: var(--ink-soft); }
.team h2 { font-size: 1.3rem; }
.team h3 { font: 700 1rem/1.3 var(--sans); margin: 1.1rem 0 .1rem; color: var(--ink); }
.team .cols { columns: 2 14rem; column-gap: 2.5rem; }
.team .cols > * { break-inside: avoid; }
.team p { margin: 0; font-family: var(--sans); }

/* ---------------------------------------------------------------- article */
.article-head { max-width: 76rem; margin: 0 auto; padding: 2.2rem var(--gutter) 1.6rem; }
.crumbs { margin: 0 0 .6rem; font: 600 .92rem/1.4 var(--sans); display: flex; flex-wrap: wrap; gap: .3rem .5rem; }
.crumbs a { text-decoration: none; color: var(--rose); background: var(--rose-tint); padding: .15rem .55rem; border-radius: 99px; }
.crumbs a:hover { background: var(--rose-box); color: var(--ink); }
.article-head h1 {
  font: 600 clamp(2.1rem, 5vw, 3.3rem)/1.08 var(--serif); letter-spacing: -.012em;
  color: var(--navy); margin: 0 0 1.2rem; max-width: 22ch;
}
.credits { margin: 0; display: grid; gap: .25rem; font: 400 .98rem/1.4 var(--sans); max-width: 52rem; }
.credits div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .8rem; }
.credits dt { color: var(--ink-soft); }
.credits dd { margin: 0; }
.dates { margin: .8rem 0 0; font: 400 .9rem/1.4 var(--sans); color: var(--ink-soft); }
@media (max-width: 520px) { .credits div { grid-template-columns: 1fr; gap: 0; } .credits div + div { margin-top: .35rem; } }

.article-grid {
  width: min(76rem - 2 * var(--gutter), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 2rem 0 3rem;
  display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; align-items: start;
  border-top: 1px solid var(--rule);
}
.article-grid > .prose:only-child { grid-column: 2; }
.toc { position: sticky; top: 5rem; max-height: calc(100vh - 6.5rem); overflow: auto; font-family: var(--sans); padding-right: .5rem; }
.toc-title { margin: 0 0 .5rem; font-weight: 700; font-size: .95rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--rule); }
.toc a { display: block; text-decoration: none; color: var(--ink-soft); font-size: .92rem; line-height: 1.3; padding: .28rem 0 .28rem .8rem; margin-left: -1.5px; border-left: 1.5px solid transparent; }
.toc .toc-h3 a { padding-left: 1.6rem; font-size: .86rem; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--rose); border-left-color: var(--rose); font-weight: 600; }
@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .article-grid > .prose:only-child { grid-column: 1; }
  .toc { position: static; max-height: none; border: 1px solid var(--rule); background: var(--chrome); padding: .9rem 1rem; margin-bottom: 2rem; }
  .toc ol { columns: 2 12rem; column-gap: 1.5rem; }
  .toc .toc-h3 { display: none; }
}

/* ---------------------------------------------------------------- prose */
.prose { max-width: var(--measure); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose > h2:first-child { border-top: 0; padding-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose li > ul, .prose li > ol { margin: .25em 0 .4em; }
.prose li::marker { color: var(--ink-soft); }
.prose strong { font-weight: 600; }
.prose .u { text-decoration: underline; text-underline-offset: .15em; }
.prose h2 {
  font: 600 1.65rem/1.2 var(--serif); color: var(--navy);
  margin: 2.6rem 0 .9rem; padding-top: .9rem; border-top: 1.5px solid var(--ink);
}
.prose h3 { font: 700 1.2rem/1.3 var(--sans); margin: 2rem 0 .6rem; color: var(--ink); }
.prose h4 { font: 700 1.03rem/1.35 var(--sans); margin: 1.5rem 0 .4rem; color: var(--ink); }
.prose h5 { font: 600 1rem/1.35 var(--sans); margin: 1.2rem 0 .3rem; color: var(--ink-soft); }
.prose sup, .prose sub { font-size: .72em; line-height: 0; }

/* the reference lines that open most sections */
.prose .refs {
  font: 400 .86rem/1.45 var(--sans); color: var(--ink-soft);
  background: var(--khaki-tint); border-left: 3px solid var(--khaki);
  padding: .5rem .8rem; margin: 0 0 1.1rem;
}
.prose ul.refs, .prose ol.refs { padding-left: 1.9rem; }
.prose .refs a { color: var(--ink-soft); }
.prose .refs a:hover { color: var(--rose); }
.prose .refs strong { font-weight: 400; }

.prose .callout, .prose .sidebox {
  background: var(--blue-tint); border-left: 3px solid var(--blue);
  padding: .9rem 1.1rem .3rem; margin: 1.4rem 0; font-size: 1.02rem;
}
.prose .callout h4, .prose .sidebox > strong { display: block; margin: 0 0 .4rem; font: 700 1rem/1.3 var(--sans); }
.prose .sidebox { padding-bottom: .9rem; }
.prose .sidebox p { margin: 0; }
.prose .box { border: 1.5px solid var(--ink); padding: 0 1rem .4rem; margin: 1.4rem 0; }
.prose .box-title { margin: 0 -1rem 1rem; background: var(--navy); color: #fff; padding: .45rem 1rem; font: 700 .98rem/1.3 var(--sans); }
.prose .box-title strong { font-weight: 700; }

/* figures break out of the measure on wide screens */
.prose figure { margin: 2rem 0; }
@media (min-width: 1180px) { .prose figure { margin-right: -6rem; } }
.prose figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule); background: #fff; cursor: zoom-in;
}
.prose figure.tall { margin-right: 0; }
.prose figure.tall img { max-width: min(100%, 36rem); margin: 0 auto; }
.prose figcaption { font: 400 .9rem/1.4 var(--sans); color: var(--ink-soft); margin-top: .5rem; }
.prose img.equation { display: inline-block; vertical-align: middle; border: 0; width: auto; height: 3rem; cursor: default; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; -webkit-overflow-scrolling: touch; }
@media (min-width: 1180px) { .table-wrap { margin-right: -6rem; } }
.prose table { border-collapse: collapse; width: 100%; font: 400 .95rem/1.45 var(--sans); min-width: 32rem; }
.prose td, .prose th { border: 1px solid var(--rule); padding: .55rem .7rem; vertical-align: top; text-align: left; }
.prose tr:first-child > td, .prose th, .prose thead td { background: var(--blue-tint); }
.prose tr:first-child > td strong, .prose thead td strong { font-weight: 700; }
.prose td.shade { background: var(--grey-tint); }
.prose td > :last-child, .prose th > :last-child { margin-bottom: 0; }
.prose td p { margin: 0 0 .4em; }
.prose td ul { padding-left: 1.1em; margin: 0; }
.prose td li { margin: .15em 0; }

/* related */
.related { width: min(76rem - 2 * var(--gutter), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 2rem 0 3.5rem; border-top: 1px solid var(--rule); font-family: var(--sans); }
.related-title { font: 600 1.25rem/1.3 var(--serif); margin: 0 0 .8rem; color: var(--navy); }
.related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.related a { display: block; padding: .45rem .8rem; border: 1.5px solid var(--ink); text-decoration: none; color: var(--ink); background: #fff; }
.related a:hover { background: var(--blue-tint); color: var(--ink); }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--chrome); border-top: 1px solid var(--rule); font: 400 .95rem/1.55 var(--sans); color: var(--ink-soft); }
.footer-inner { max-width: 76rem; margin: 0 auto; padding: 2.4rem var(--gutter) 3rem; display: grid; gap: .4rem; }
.footer p { margin: 0; max-width: 46rem; }
.footer-name { font-weight: 700; color: var(--ink); }
.footer-links { display: flex; gap: 1.2rem; margin-top: .6rem !important; }

/* ---------------------------------------------------------------- search dialog */
.search { position: fixed; inset: 0; z-index: 50; background: rgba(31, 42, 55, .45); display: grid; justify-items: center; align-items: start; padding: 8vh 1rem 1rem; }
.search[hidden] { display: none; }
.search-panel { width: 100%; max-width: 44rem; background: #fff; border: 1.5px solid var(--ink); box-shadow: 0 18px 50px rgba(31,42,55,.28); font-family: var(--sans); max-height: 80vh; display: flex; flex-direction: column; }
.search-bar { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); color: var(--ink-soft); }
.search-bar input { flex: 1; border: 0; font: 400 1.15rem/1.3 var(--sans); color: var(--ink); background: none; padding: .3rem 0; min-width: 0; }
.search-bar input:focus { outline: none; }
.search-close { border: 0; background: var(--grey-tint); font: 600 .85rem/1 var(--sans); padding: .45rem .7rem; border-radius: 3px; cursor: pointer; color: var(--ink); }
.search-results { list-style: none; margin: 0; padding: .4rem 0; overflow: auto; }
.search-results li a { display: block; padding: .7rem 1.1rem; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.search-results li a:hover, .search-results li a[aria-selected="true"] { background: var(--blue-tint); border-left-color: var(--navy); }
.sr-title { display: block; font-weight: 700; font-size: 1.05rem; }
.sr-meta { display: block; font-size: .85rem; color: var(--rose); margin-top: .1rem; }
.sr-snip { display: block; font-size: .92rem; color: var(--ink-soft); margin-top: .25rem; line-height: 1.4; }
.sr-snip mark { background: var(--khaki); color: var(--ink); padding: 0 .1em; }
.search-empty { padding: 1rem 1.1rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------- lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(255,255,255,.97); display: grid; place-items: center; padding: 3.2rem 1rem 1rem; cursor: zoom-out; overflow: auto; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(100%, 1600px); max-height: calc(100vh - 4.5rem); width: auto; height: auto; }
.lightbox.zoomed { place-items: start center; }
.lightbox.zoomed img { max-height: none; max-width: none; width: min(2200px, 200vw); }
.lightbox-close { position: fixed; top: .8rem; right: .8rem; font: 600 .95rem/1 var(--sans); background: var(--navy); color: #fff; border: 0; padding: .6rem .9rem; border-radius: 3px; cursor: pointer; }

/* ---------------------------------------------------------------- print */
@media print {
  .masthead, .footer, .toc, .related, .search, .lightbox, .crumbs { display: none !important; }
  body { font-size: 11pt; }
  .article-grid { display: block; border: 0; padding: 0; }
  .prose { max-width: none; }
  .prose figure, .table-wrap { margin-right: 0; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
