:root {
  --pi-paper: #ECEAE3;
  --pi-ink: #191919;
  --pi-red: #C8102E;
  --pi-slate: #2F4858;
  --pi-rule: #b7b4aa;
  --pi-spread: min(1280px, calc(100vw - 80px));
  --pi-reading: min(760px, var(--pi-spread));
  --pi-margin: calc((var(--pi-spread) - var(--pi-reading)) / 2);
  color-scheme: light;
  font-family: "Libre Franklin", Arial, sans-serif;
  color: var(--pi-ink);
  background: var(--pi-paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 18px; line-height: 1.8; }
a { color: var(--pi-ink); text-underline-offset: .23em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--pi-red); text-decoration-thickness: 3px; }
a:focus-visible { outline: 3px solid var(--pi-red); outline-offset: 5px; }
::selection { background: var(--pi-red); color: var(--pi-paper); }
.ph { flex-shrink: 0; }
.pi-skip { position: absolute; top: -100px; left: 20px; z-index: 10; padding: 8px 16px; background: var(--pi-paper); }
.pi-skip:focus { top: 10px; }
.pi-spread { width: var(--pi-spread); margin-inline: auto; }

/* A deep ledger: the name owns its 260px, the three routes own complete rows. */
.pi-ledger { display: grid; grid-template-columns: 260px minmax(0, 1fr); border-top: 3px solid var(--pi-ink); border-bottom: 3px solid var(--pi-ink); margin-top: 24px; }
.pi-wordmark { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 14px 26px 14px 0; font: 400 43px/1.03 "Saira Stencil One", sans-serif; letter-spacing: -.025em; text-decoration: none; }
.pi-wordmark:hover { color: var(--pi-red); }
.pi-ledger-pages { border-left: 1px solid var(--pi-ink); }
.pi-ledger-entry { display: grid; grid-template-columns: 30px 257px minmax(0, 1fr) 22px; align-items: center; gap: 12px; padding: 10px 20px; text-decoration: none; font-size: 18px; line-height: 1.4; transition: background-color 160ms ease, color 160ms ease; }
.pi-ledger-entry + .pi-ledger-entry { border-top: 1px solid var(--pi-ink); }
.pi-ledger-entry:hover { background: var(--pi-red); color: var(--pi-paper); }
.pi-ledger-entry[aria-current="page"] { background: var(--pi-slate); color: var(--pi-paper); }
.pi-ledger-entry:focus-visible { outline-offset: -5px; }
.pi-ledger-entry b { font-weight: 600; }
.pi-ledger-entry .ph { font-size: 25px; }
.pi-ledger-purpose { font-size: 18px; }
.pi-ledger-arrow { font-size: 23px; line-height: 1; }

/* No mount, overlay or crop fragments: the frieze is the entire first beat. */
.pi-opening { padding-top: 32px; }
.pi-frieze { margin: 0 0 32px; }
.pi-frieze img { width: 100%; height: 190px; display: block; object-fit: cover; object-position: 50% 52%; }
.pi-frieze figcaption { font-size: 18px; line-height: 1.5; margin-top: 9px; }
h1, h2, h3 { font-family: "Saira Stencil One", sans-serif; font-weight: 400; }
h1 { margin: 0; font-size: clamp(48px, 5.25vw, 76px); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.pi-opening h1 { display: flex; flex-direction: column; align-items: flex-start; }
.pi-locative { font-size: 36px; line-height: 1.2; letter-spacing: -.015em; }
.pi-subject { color: var(--pi-red); font-size: clamp(76px, 7.5vw, 108px); line-height: 1.05; margin-block: 2px 4px; }
.pi-predicate { font-size: clamp(44px, 4.45vw, 64px); line-height: 1.1; }
.pi-scope { position: relative; margin-top: 25px; padding: 20px 0 30px; }
.pi-scope::before, .pi-scope::after { content: ""; position: absolute; height: 1px; background: var(--pi-red); }
.pi-scope::before { top: 0; left: 0; right: 52px; }
.pi-scope::after { top: 6px; left: 52px; right: 0; }
.pi-scope p { display: flex; align-items: baseline; gap: 15px; margin: 0; font-size: 20px; line-height: 1.6; }
.pi-scope .ph { color: var(--pi-red); font-size: 21px; }

/* The manifest stays one open, four-row table, with ample room to read across. */
.pi-manifest { width: 100%; border-collapse: collapse; text-align: left; font-size: 18px; line-height: 1.6; }
.pi-manifest caption { text-align: left; font: 400 37px/1.2 "Saira Stencil One", sans-serif; padding: 21px 0 20px; border-top: 2px solid var(--pi-ink); }
.pi-manifest thead th { font-weight: 600; padding: 0 18px 14px 0; font-size: 18px; }
.pi-manifest tbody { border-top: 2px solid var(--pi-red); border-bottom: 2px solid var(--pi-red); }
.pi-manifest td, .pi-manifest tbody th { padding: 19px 22px 19px 0; border-bottom: 1px solid var(--pi-rule); vertical-align: top; }
.pi-manifest tbody tr:last-child > * { border-bottom: 0; }
.pi-manifest tbody th { width: 31%; font-weight: 600; }
.pi-manifest td:last-child { width: 24%; padding-right: 0; }
.pi-manifest-no { color: var(--pi-red); display: inline-block; width: 48px; font: 400 31px/1.1 "Saira Stencil One", sans-serif; vertical-align: -.06em; }
.pi-manifest a { text-decoration-color: var(--pi-red); }
.pi-manifest tbody tr:hover { background: #e2dfd6; }
.pi-row-only { padding-top: 32px; }
.pi-row-only .pi-manifest td, .pi-row-only .pi-manifest th { padding-block: 18px; }

/* A single reading account; boundary headings and photographs leave its margins. */
.pi-narrative { width: var(--pi-reading); margin: 84px auto 0; }
.pi-narrative h1 { font-size: clamp(43px, 4.7vw, 68px); margin-bottom: 34px; }
.pi-narrative p { margin: 0 0 25px; }
.pi-narrative > p:first-of-type { font-size: 22px; line-height: 1.65; }
h2 { position: relative; font-size: 39px; line-height: 1.18; margin: 70px 0 27px; padding-top: 24px; text-wrap: balance; letter-spacing: -.02em; }
.pi-narrative h2::before, .pi-narrative h2::after { content: ""; position: absolute; height: 1px; background: var(--pi-red); }
.pi-narrative h2::before { top: 0; left: calc(-1 * var(--pi-margin)); width: calc(100% + var(--pi-margin) - 60px); }
.pi-narrative h2::after { top: 7px; left: calc(-1 * var(--pi-margin) + 60px); width: calc(100% + var(--pi-margin) - 60px); }
.pi-narrative > h2:first-child { margin-top: 0; }
.pi-narrative li { margin-bottom: 17px; padding-left: 5px; }
.pi-narrative ul { padding-left: 23px; }
.pi-narrative li::marker { color: var(--pi-red); }
.pi-narrative .pi-checklist { padding-left: 0; list-style: none; }
.pi-checklist li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--pi-rule); }
.pi-checklist .ph { color: var(--pi-red); font-size: 25px; line-height: 1.35; }
.pi-crossing { position: relative; width: var(--pi-spread); margin: 50px calc(-1 * var(--pi-margin)) 29px; }
.pi-crossing-number { position: absolute; top: calc(100% + 24px); left: 0; display: block; font: 400 clamp(85px, 10.55vw, 152px)/.9 "Saira Stencil One", sans-serif; letter-spacing: -.05em; color: var(--pi-red); }
.pi-crossing h3 { background: var(--pi-slate); color: var(--pi-paper); font-size: 36px; line-height: 1.25; margin: 0; padding: 22px max(30px, var(--pi-margin)); }
.pi-page-photo { width: var(--pi-spread); margin: 32px calc(-1 * var(--pi-margin)) 42px; }
.pi-page-photo img { display: block; width: 100%; height: 240px; object-fit: cover; }
.pi-page-photo figcaption { position: relative; max-width: 760px; margin: 13px auto 0; font-size: 18px; line-height: 1.6; }
.pi-page-photo figcaption::before { content: ""; position: absolute; width: clamp(0px, calc(var(--pi-margin) - 28px), 120px); height: 1px; right: calc(100% + 28px); top: .8em; background: var(--pi-red); }

/* The final qualifications spread back out: one open-ended pair, no callout box. */
.pi-end { position: relative; padding-top: 30px; margin-top: 84px; margin-bottom: 72px; }
.pi-end::before, .pi-end::after { content: ""; position: absolute; height: 2px; background: var(--pi-red); }
.pi-end::before { top: 0; left: 0; right: 80px; }
.pi-end::after { top: 9px; left: 80px; right: 0; }
.pi-end h2 { margin: 0 0 23px; padding-top: 0; font-size: 38px; }
.pi-end p { margin: 0 0 19px; line-height: 1.8; }
.pi-footer { border-top: 3px solid var(--pi-ink); padding-top: 25px; padding-bottom: 36px; }
.pi-footer-links { display: flex; flex-wrap: wrap; gap: 12px 38px; padding-bottom: 28px; }
.pi-footer-links a { font-weight: 600; }
.pi-footer p { margin: 0 0 12px; }
.pi-copyright { font-size: 18px; }
.pi-error { padding-top: 60px; padding-bottom: 60px; }
.pi-error p { max-width: 760px; }
@media (min-width: 1000px) {
  .pi-ledger-entry:hover .pi-ledger-arrow { transform: translate(3px, -3px); }
  .pi-ledger-arrow { transition: transform 160ms ease; }
}
@media (max-width: 1150px) {
  .pi-ledger-entry { grid-template-columns: 26px minmax(0, 1fr) 22px; column-gap: 12px; padding-block: 8px; }
  .pi-ledger-purpose { grid-column: 2; font-size: 18px; margin-top: 0; }
  .pi-ledger-arrow { grid-row: 1 / 3; grid-column: 3; }
  .pi-crossing-number { position: static; font-size: 80px; padding-bottom: 16px; }
  .pi-crossing h3 { padding-inline: max(26px, var(--pi-margin)); }
}
@media (max-width: 680px) {
  :root { --pi-spread: calc(100vw - 40px); }
  body { line-height: 1.8; }
  .pi-ledger { display: block; margin-top: 16px; }
  .pi-wordmark { flex-direction: row; justify-content: flex-start; gap: .25em; font-size: 29px; line-height: 1.1; padding: 11px 0; }
  .pi-ledger-pages { border-left: 0; border-top: 1px solid var(--pi-ink); }
  .pi-ledger-entry { padding: 8px 2px; grid-template-columns: 24px minmax(0, 1fr) 18px; gap: 1px 10px; line-height: 1.3; }
  .pi-ledger-entry .ph { font-size: 22px; }
  .pi-ledger-purpose { font-size: 18px; }
  .pi-opening { padding-top: 32px; }
  .pi-frieze img { height: 120px; object-position: 54% 52%; }
  .pi-frieze figcaption { font-size: 18px; }
  h1 { font-size: 42px; line-height: 1.09; text-wrap: initial; }
  .pi-locative { font-size: 29px; line-height: 1.15; }
  .pi-subject { font-size: clamp(38px, 11.28vw, 62px); line-height: 1.1; margin-block: 4px 6px; letter-spacing: -.035em; }
  .pi-predicate { font-size: 35px; line-height: 1.1; max-width: 350px; }
  .pi-scope { margin-top: 24px; padding: 21px 0 32px; }
  .pi-scope p { align-items: flex-start; gap: 11px; font-size: 18px; line-height: 1.65; margin-bottom: 9px; }
  .pi-scope .ph { font-size: 21px; line-height: 1.5; }
  .pi-manifest caption { font-size: 31px; padding-block: 20px; }
  .pi-manifest thead { display: none; }
  .pi-manifest tr { display: block; padding: 20px 0; border-bottom: 1px solid var(--pi-rule); }
  .pi-manifest tr:last-child { border-bottom: 0; }
  .pi-manifest td, .pi-manifest tbody th { display: block; width: 100%; padding: 0; border-bottom: 0; }
  .pi-manifest td { padding-left: 48px; margin-top: 8px; }
  .pi-manifest td:last-child { width: 100%; }
  .pi-row-only { padding-top: 24px; }
  .pi-row-only .pi-manifest td, .pi-row-only .pi-manifest th { padding-block: 0; }
  .pi-narrative { margin-top: 52px; }
  .pi-narrative h1 { font-size: 43px; }
  .pi-narrative > p:first-of-type { font-size: 21px; }
  h2 { font-size: 32px; margin-top: 48px; }
  .pi-narrative h2::before { width: calc(100% - 30px); }
  .pi-narrative h2::after { left: 30px; width: calc(100% - 30px); }
  .pi-crossing { margin-top: 36px; }
  .pi-crossing-number { font-size: 76px; padding-bottom: 14px; }
  .pi-crossing h3 { padding: 20px; font-size: 29px; }
  .pi-page-photo { margin-block: 28px 32px; }
  .pi-page-photo img { height: 145px; }
  .pi-page-photo figcaption { font-size: 18px; }
  .pi-page-photo figcaption::before { display: none; }
  .pi-end { margin-top: 55px; margin-bottom: 48px; }
  .pi-end::before { right: 32px; }
  .pi-end::after { left: 32px; }
  .pi-end h2 { font-size: 31px; }
  .pi-footer-links { gap: 12px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
