/* Shared presentation: shell, document/collection forms, prose, components.
 * Cover artwork and fitted typography live in covers.css.
 * Values preserve the frozen pre-refactor appearance, including its responsive
 * and language-specific differences. This is hand-maintained CSS, not generated.
 */

@font-face {
  font-family: "Vollkorn";
  src: url("/fonts/vollkorn/vollkorn-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans/noto-sans-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("/fonts/literata/literata-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("/fonts/literata/literata-latin-variable-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  /* Locked logo colors are independent of the reading palette. */
  --mw-logo-red: #C73E1D;
  --mw-logo-green: #006B3C;
  --mw-border-red: var(--mw-logo-red);
  --mw-border-neutral: #666666;
  --mw-border-green: var(--mw-logo-green);
  --mw-cover-border-gradient: linear-gradient(
    90deg,
    var(--mw-border-red) 0 42%,
    var(--mw-border-neutral) 50%,
    var(--mw-border-green) 58% 100%
  );
  --reader-canvas: #F1EFE9;
  --reader-surface: #FBFAF7;
  --reader-raised: #F5F2EA;
  --reader-text: #363430;
  --reader-heading: #1D1C1A;
  --reader-muted: #504E48;
  --reader-link: #174E82;
  --reader-visited: #604078;
  --reader-monk: #922B14;
  --reader-rule: #D6D2C8;
  --reader-control-border: #77736A;
  --reader-focus: #174E82;
  --action-background: #2B2926;
  --action-color: #FBFAF7;
  --action-border: var(--reader-control-border);
  --action-hover-background: var(--reader-heading);
  --action-hover-color: var(--reader-surface);
  --action-focus: var(--reader-focus);
  --reader-font: "Literata", Georgia, "Times New Roman", serif;
  --reader-ui-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --reader-measure: 64ch;
  --reader-shell: 48rem;
  --reader-landing-shell: min(740px, 66ch);
  --reader-gutter: clamp(1rem, 4.5vw, 1.5rem);
  --page-gap: clamp(1rem, 3vw, 1.5rem);
  --panel-padding: clamp(1rem, 3vw, 1.5rem);
}

html {
  background: var(--reader-canvas);
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  --shell-width: var(--reader-shell);
  display: block;
  margin: 0;
  padding: 0;
  background: var(--reader-canvas);
  color: var(--reader-text);
  font-family: var(--reader-ui-font);
  font-size: 1.18em;
  line-height: 1.55;
}

.shell--collection {
  --shell-width: var(--reader-landing-shell);
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 0.18em;
}

p {
  margin: 0 0 1em;
}

/* The cover compositor supplies its own heading typography. */
h1 {
  font-family: "Vollkorn", serif;
  font-style: normal;
  font-weight: 700;
  font-synthesis: none;
}

.page-frame {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--shell-width);
  margin-inline: auto;
}

.page-frame > :is(main, nav.pagination) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

::selection {
  background: var(--reader-link);
  color: var(--reader-surface);
}

.page-content {
  --page-content-padding-start: clamp(1.25rem, 3vw, 2.5rem);
  box-sizing: border-box;
  width: 100%;
  max-width: var(--reader-shell);
  min-width: 0;
  margin-inline: auto;
  padding:
    var(--page-content-padding-start)
    max(var(--reader-gutter), env(safe-area-inset-right))
    clamp(1.5rem, 4vw, 3rem)
    max(var(--reader-gutter), env(safe-area-inset-left));
  border: 0;
  background: var(--reader-surface);
  color: var(--reader-text);
  font-size: 1rem;
}

.shell--collection .page-content {
  padding: var(--page-gap) 0 0;
  background: transparent;
  font-size: inherit;
}

.document,
.prose {
  max-width: var(--reader-measure);
  margin-inline: auto;
  color: var(--reader-text);
  font-family: var(--reader-font);
  font-size: clamp(1.125rem, 1.04rem + 0.35vw, 1.25rem);
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-optical-sizing: auto;
  line-height: 1.68;
  text-align: left;
  word-spacing: normal;
  letter-spacing: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.prose p,
.prose li {
  font-size: 1em;
  line-height: inherit;
}

.prose p {
  margin: 0 0 1.05em;
}

.prose :is(ul, ol) {
  margin-block: 0 1.2em;
  padding-inline-start: 1.4em;
}

.prose li + li {
  margin-block-start: 0.35em;
}

:where(.document, .prose) :is(strong, b) {
  font-weight: 650;
  letter-spacing: normal;
}

.prose p strong {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.prose em,
.prose i {
  font-style: italic;
}

.prose > :last-child,
.document > :last-child,
.collection > :last-child,
.panel > :last-child {
  margin-block-end: 0;
}

:where(.document, .prose, .panel) :is(h1, h2, h3) {
  display: block;
  color: var(--reader-heading);
  border: 0;
  font-family: var(--reader-font);
  font-style: normal;
  font-weight: 650;
  font-synthesis: none;
  font-optical-sizing: auto;
  text-wrap: balance;
}

:where(.document, .prose) h1 {
  margin: 0.2em 0 0.9em;
  padding: 0;
  font-size: clamp(2rem, 1.55rem + 2.2vw, 3rem);
  line-height: 1.15;
  text-align: center;
}

:where(.document, .prose, .panel) h2 {
  margin: 1.7em 0 0.65em;
  font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.75rem);
  line-height: 1.22;
  text-align: left;
}

.home-page__contents > h2 {
  margin-block-start: 0;
}

:where(.document, .prose, .panel) h3 {
  margin: 1.55em 0 0.55em;
  font-size: clamp(1.25rem, 1.16rem + 0.4vw, 1.4rem);
  line-height: 1.28;
  text-align: left;
}

.page-header {
  margin-block-end: clamp(1.4rem, 4vw, 2.25rem);
}

@media (max-width: 600px) {
  body {
    font-size: 1em;
  }

}

.term {
  font-size: 1em;
  font-variant-caps: normal;
  white-space: normal;
  font-weight: 550;
}

:where(.document, .prose, .panel, .site-footer, .error-page__choices) a {
  color: var(--reader-link);
  text-decoration-line: underline;
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.16em;
}

:where(.document, .prose, .panel, .site-footer, .error-page__choices) a:visited {
  color: var(--reader-visited);
}

:where(.document, .prose, .panel, .site-footer, .error-page__choices) a:focus-visible,
nav.pagination a:focus-visible,
.action:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid var(--reader-focus);
  outline-offset: 0.2rem;
}

@media (hover: hover) {
  :where(.document, .prose, .panel, .site-footer, .error-page__choices) a:hover {
    text-decoration-thickness: 0.12em;
  }
}

/**********
  Reader Navigation
**********/

nav.pagination a,
nav.pagination span {
  margin: 0 0.2em;
  text-decoration: none;
}

nav.pagination .prev > i {
  margin-inline-end: 0.25em;
}

nav.pagination .next > i {
  margin-inline-start: 0.25em;
}

nav.pagination {
  display: grid;
  grid-template-areas: "prev context next";
  grid-template-columns: minmax(4.5rem, 1fr) auto minmax(4.5rem, 1fr);
  align-items: stretch;
  box-sizing: border-box;
  width: min(100%, var(--reader-shell));
  min-height: 52px;
  margin-inline: auto;
  padding: 0.25rem var(--reader-gutter);
  border: 0;
  border-inline: 0;
  border-block: 1px solid var(--reader-rule);
  background: var(--reader-surface);
  color: var(--reader-heading);
  font-family: var(--reader-ui-font);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.shell--collection .page-frame > nav.pagination {
  border-inline: 1px solid var(--reader-rule);
}

.page-frame > nav.pagination:first-of-type {
  border-block-start: 0;
}

nav.pagination > .prev {
  grid-area: prev;
  justify-self: start;
}

nav.pagination > .next {
  grid-area: next;
  justify-self: end;
}

.pagination__context {
  grid-area: context;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
}

nav.pagination > :is(a, .prev, .next),
.pagination__context > :is(a, span) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 0.45rem 0.55rem;
  color: var(--reader-link);
  text-decoration: none;
}

nav.pagination .disabled {
  color: var(--reader-muted);
  opacity: 1;
}

/**********
  Collection Composition, Panels, and Actions
**********/

.book-page {
  padding-block-end: var(--page-gap);
}

.home-page__cover {
  margin-block-end: var(--page-gap);
}

.book-page__cover {
  padding-block: 0 var(--page-gap);
}

.panel {
  box-sizing: border-box;
  padding: var(--panel-padding);
  border: 1px solid var(--reader-rule);
  background: var(--reader-surface);
}

.panel :is(p, li):last-child {
  margin-block-end: 0;
  padding-block-end: 0;
}

/* The historical ruled book notice, restored independently of retired notices. */
.book-about {
  margin: 1.65em 0;
  color: var(--reader-text);
  font-family: var(--reader-font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.book-about__inner.prose {
  max-width: none;
  margin-inline: 0;
  font-size: inherit;
  line-height: inherit;
}

.book-about .book-about__title {
  padding-block: 0 0.5rem;
  margin: 0 0 0.625rem;
  border-block-end: 1px solid var(--reader-rule);
  color: var(--reader-heading);
  font-family: var(--reader-font);
  font-size: clamp(1.25rem, 1.16rem + 0.4vw, 1.4rem);
  font-weight: 450;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.book-about__inner > p {
  margin: 0;
  font-size: inherit;
}

.action-row {
  margin-block: 0 var(--page-gap);
}

/**********
  Notes, Quotations, and Status
**********/

.prose blockquote {
  position: relative;
  margin: 1.65em 0;
  padding: 1.1em 1.15em;
  border: 0;
  border-inline-start: 3px solid var(--reader-control-border);
  background: var(--reader-raised);
  color: var(--reader-text);
  font-family: inherit;
  font-size: 1em;
  font-style: normal;
  line-height: inherit;
}

.prose blockquote::before {
  content: none;
}

.prose blockquote p {
  margin-block: 0 0.8em;
}

.prose blockquote p:last-child {
  margin-block-end: 0;
}

/* Cover profiles supply --action-* values; shared actions own these mechanics. */
.action {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  width: 100%;
  min-height: 48px;
  padding: 0.75em 1.25em;
  border: 2px solid var(--action-border);
  border-block-start-width: 0;
  background: var(--action-background);
  box-shadow: none;
  color: var(--action-color);
  font-family: var(--reader-ui-font);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-decoration: none;
}

.action:visited {
  color: var(--action-color);
}

.action__label {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

a.action:hover {
  background: var(--action-hover-background);
  color: var(--action-hover-color);
}

.action--compact {
  gap: 0.45em;
  padding: 0.7rem 0.9em;
  line-height: 1.25;
}

.prose hr {
  width: 3rem;
  margin: clamp(2rem, 7vw, 3.5rem) auto;
  border: 0;
  border-block-start: 1px solid var(--reader-rule);
}

/**********
  Saga Links
**********/

.saga-book-number {
  color: var(--reader-muted);
  opacity: 1;
  font-family: var(--reader-ui-font);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.saga-heading ~ h3 {
  margin-block-end: 0.45rem;
}

.saga-book-row {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  align-items: center;
  box-sizing: border-box;
  min-height: 48px;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.35rem;
  border-block-start: 1px solid var(--reader-rule);
  color: var(--reader-link);
  font-family: var(--reader-ui-font);
  font-size: 1rem;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
}

.saga-book-row:visited {
  color: var(--reader-visited);
}

.saga-book-row--title-only {
  grid-template-columns: minmax(0, 1fr);
}

.saga-book-title {
  font-size: 1rem;
  line-height: 1.4;
}

.saga-book-number {
  align-self: start;
  text-transform: uppercase;
  word-spacing: normal;
  text-decoration: none;
}

.saga-book-awesome {
  margin-right: 0.4em;
  text-decoration: none;
}

.saga-book-title-text {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 300px) {
  .saga-book-row {
    gap: 0.09em;
  }

  .saga-book-number {
    align-self: auto;
  }
}

/**********
  Tables
**********/

.table-scroll {
  box-sizing: border-box;
  max-width: 100%;
  margin: 1.5rem 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--reader-rule);
  background: var(--reader-surface);
}

.table-scroll table {
  width: max-content;
  min-width: 100%;
  margin: 0;
  border-collapse: collapse;
  color: var(--reader-text);
  font-family: var(--reader-ui-font);
  font-size: 1rem;
  line-height: 1.45;
}

.table-scroll th,
.table-scroll td {
  min-width: 4.25rem;
  padding: 0.65rem 0.6rem;
  border: 0;
  border-block-end: 1px solid var(--reader-rule);
  text-align: left;
  vertical-align: top;
}

.table-scroll th {
  background: var(--reader-raised);
  color: var(--reader-heading);
  font-weight: 700;
}

.table-scroll th:empty {
  display: table-cell;
}

.table-scroll :is(th, td):last-child {
  text-align: right;
}

.table-scroll tbody tr:last-child td {
  border-block-end: 0;
}

@media (hover: hover) {
  .table-scroll tbody tr:hover {
    background: var(--reader-raised);
  }
}

/**********
  Non-cover Media
**********/

.prose img,
.panel img {
  max-width: 100%;
  height: auto;
}

/* The author portrait uses the shared image frame. */
.cover {
  display: block;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: min(100%, var(--cover-max-width));
  max-height: var(--cover-max-height);
  margin: 0 auto 0.85em;
  border: 2px solid #ccc;
}

.cover.avatar {
  --cover-max-width: 240px;
  --cover-max-height: 240px;
}

@media (max-width: 600px) {
  .cover {
    --cover-max-width: 100%;
    --cover-max-height: 70vh;
    margin-bottom: 0.75em;
  }
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--reader-rule);
  background: var(--reader-raised);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  line-height: 1.5;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-wrap: normal;
}

/**********
  Footer and Error Page
**********/

.site-footer {
  --site-footer-inline-space: max(
    var(--reader-gutter),
    env(safe-area-inset-left),
    env(safe-area-inset-right)
  );
  background: var(--reader-canvas);
  color: var(--reader-muted);
  font-family: var(--reader-ui-font);
}

.site-footer-inner {
  box-sizing: border-box;
  width: min(100%, var(--shell-width));
  max-width: var(--shell-width);
  margin-inline: auto;
  padding-inline: 0;
}

.site-community-links {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  position: static;
  width: 100%;
  max-width: none;
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding: 0.5rem var(--site-footer-inline-space);
  border-block-end: 1px solid var(--reader-rule);
}

.site-community-links::after {
  content: none;
}

.community-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  white-space: nowrap;
  min-height: 44px;
  padding-inline: 0.25rem;
  color: var(--reader-link);
  font-size: 1.125rem;
  line-height: 1.4;
  opacity: 1;
  text-decoration: none;
}

.community-link > span {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.community-link > i {
  font-size: 1.15em;
}

.attribs {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--reader-measure);
  margin: 0 auto;
  padding: 0.8rem var(--site-footer-inline-space) 1.2rem;
}

.attribs p {
  margin: 0 0 0.75rem;
  color: var(--reader-muted);
  opacity: 1;
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: left;
  word-spacing: normal;
  letter-spacing: normal;
}

.attribs p:last-child {
  margin-bottom: 0;
}

.inspiration-games {
  white-space: nowrap;
}

.shell--collection .site-footer :is(.site-community-links, .attribs) {
  padding-block: 0.5em;
}

.shell--collection .attribs p:last-child {
  margin-bottom: 0.75rem;
}

body.error-page .page-content {
  display: grid;
  align-items: center;
  min-height: 68vh;
  padding-block: clamp(1.25rem, 4vw, 2.5rem);
}

.error-page__content {
  container-type: inline-size;
  width: 100%;
  max-width: 42rem;
  border: 1px solid var(--reader-rule);
  background: var(--reader-surface);
  box-shadow: 0 0.35rem 1rem rgb(0 0 0 / 0.08);
}

.error-page__brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: clamp(7rem, 23vw, 10rem);
  padding: clamp(1.5rem, 6vw, 2.75rem) clamp(1rem, 5vw, 2rem);
  overflow: hidden;
  border-block-end: 2px solid transparent;
  background:
    linear-gradient(#171712, #171712) padding-box,
    var(--mw-cover-border-gradient) border-box;
  color: #FFF3DC;
  text-decoration: none;
  isolation: isolate;
}

.error-page__brand::before,
.error-page__brand::after {
  position: absolute;
  z-index: -1;
  width: 55%;
  height: 180%;
  border-radius: 50%;
  content: "";
  filter: blur(2.25rem);
  opacity: 0.24;
}

.error-page__brand::before {
  top: -80%;
  left: -20%;
  background: var(--mw-logo-red);
}

.error-page__brand::after {
  right: -20%;
  bottom: -80%;
  background: var(--mw-logo-green);
}

.error-page__brand:visited {
  color: #FFF3DC;
}

.error-page__brand:focus-visible {
  outline-color: #FFF3DC;
  outline-offset: -5px;
}

@media (hover: hover) {
  .error-page__brand:hover .error-page__brand-title {
    transform: scale(1.015);
  }
}

.error-page__brand-title {
  color: inherit;
  font-family: "Noto Sans", system-ui, sans-serif;
  font-size: clamp(0.95rem, 6.2cqi, 2.45rem);
  font-weight: 700;
  font-synthesis: none;
  letter-spacing: 0.035em;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 0.05em 0.12em rgb(0 0 0 / 0.3);
  text-transform: uppercase;
  text-wrap: balance;
  transition: transform 160ms ease-out;
  white-space: nowrap;
}

.error-page__body {
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.error-page__code {
  color: var(--reader-monk);
}

.error-page__content h1 {
  margin-block-start: 0;
  margin-block-end: clamp(1.25rem, 4vw, 1.75rem);
  font-size: clamp(1.8rem, 1.35rem + 2vw, 2.6rem);
}

.error-page__message {
  text-align: center;
}

.error-page__message p {
  margin-block-end: 0.55em;
}

.error-page__content h1 span {
  white-space: nowrap;
}

.error-page__content h1 span::before {
  content: " · ";
}

.error-page__choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-block-start: clamp(1.5rem, 5vw, 2rem);
  font-family: var(--reader-ui-font);
  font-size: 1rem;
}

.error-page__choices a {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--action-border);
  background: var(--action-background);
  color: var(--action-color);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.error-page__choices a:visited {
  color: var(--action-color);
}

.retired-page__status {
  margin-block: 1.5rem 0;
  color: var(--reader-muted);
  font-family: var(--reader-ui-font);
  font-size: 0.8rem;
  text-align: center;
}

.error-page__choices a span {
  margin-inline-start: 0.45em;
}

@media (hover: hover) {
  .error-page__choices a:hover {
    background: var(--action-hover-background);
    color: var(--action-hover-color);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --mw-border-red: rgb(199 62 29 / 75%);
    --mw-border-neutral: rgb(102 102 102 / 75%);
    --mw-border-green: rgb(0 107 60 / 75%);
    --reader-canvas: #10110F;
    --reader-surface: #181A17;
    --reader-raised: #20221F;
    --reader-text: #D8D5CC;
    --reader-heading: #F1EEE6;
    --reader-muted: #B7B3AA;
    --reader-link: #8EC5FF;
    --reader-visited: #BFA1D8;
    /* The error-page code uses this red accent. */
    --reader-monk: #FF453A;
    --reader-rule: #3A3D37;
    --reader-control-border: #6A6E66;
    --reader-focus: #8EC5FF;
    --action-background: #D8D5CC;
    --action-color: #181A17;
  }

  .site-footer {
    color: var(--reader-text);
  }

  .cover {
    border-color: #777;
    box-shadow: 0 0 0.35em rgba(0, 0, 0, 0.55);
    filter: brightness(1.25);
  }

}

@media (max-width: 48rem) {
  .page-content {
    max-width: none;
  }
}

@media (max-width: 712px) {
  .shell--collection .page-frame > nav.pagination,
  .shell--collection .action,
  .shell--collection .panel {
    border-inline: 0;
  }
}

@media (max-width: 720px) {
  .attribs {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .site-community-links {
    padding-block: 0.65rem;
  }

  .community-link {
    padding-inline: 0.45rem;
    font-size: 0.9rem;
  }
}

@media (min-width: 22rem) and (max-width: 30rem) {
  .site-community-links {
    justify-content: space-between;
    gap: 0;
  }

  .community-link {
    gap: 0.3em;
    padding-inline: 0.125rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 35rem) {
  .error-page__choices {
    grid-template-columns: minmax(0, 1fr);
  }

  .error-page__content h1 span {
    display: block;
    margin-block-start: 0.25em;
    white-space: normal;
  }

  .error-page__content h1 span::before {
    content: none;
  }
}

@media (max-width: 22rem) {
  nav.pagination {
    grid-template-areas:
      "context context"
      "prev next";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  nav.pagination > .prev,
  nav.pagination > .next {
    width: 100%;
  }

  .pagination__context {
    border-block-end: 1px solid var(--reader-rule);
  }

}

@media (forced-colors: active) {
  .document,
  .prose,
  .panel,
  .page-content,
  nav.pagination,
  .site-footer,
  .table-scroll {
    forced-color-adjust: auto;
    background: Canvas;
    color: CanvasText;
  }

  :where(.document, .prose, .panel, .site-footer) a,
  nav.pagination a {
    color: LinkText;
  }

  :where(a, [tabindex]):focus-visible {
    outline-color: Highlight;
  }
}

@media print {
  :root {
    --reader-canvas: #fff;
    --reader-surface: #fff;
    --reader-raised: #fff;
    --reader-text: #000;
    --reader-heading: #000;
    --reader-muted: #222;
    --reader-link: #000;
    --reader-visited: #000;
    --reader-monk: #000;
    --reader-rule: #777;
    --reader-control-border: #777;
    --reader-focus: #000;
    --action-background: #fff;
    --action-color: #000;
  }

  html {
    overflow-y: auto;
    background: #fff;
  }

  nav,
  nav.pagination,
  .site-footer {
    display: none;
  }

  body,
  .document,
  .page-content,
  .prose,
  .panel,
  .table-scroll {
    border-color: #777;
    background: white;
    color: black;
  }

  .page-content,
  .document,
  .prose {
    max-width: none;
  }

  body,
  .document,
  .prose {
    font-size: 11pt;
    line-height: 1.55;
  }

  .cover {
    border-color: #ddd;
  }

  .table-scroll {
    overflow: visible;
  }

  .table-scroll table {
    width: 100%;
  }
}
