/* The $P=NP site: a preprint lying on a desk, marked up in red pen.
   Body text is Latin Modern (the LaTeX default), math is KaTeX, margin notes
   are Caveat. */

@font-face {
  font-family: "Latin Modern";
  src: url("/vendor/lm/LM-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Latin Modern";
  src: url("/vendor/lm/LM-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Latin Modern";
  src: url("/vendor/lm/LM-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Latin Modern";
  src: url("/vendor/lm/LM-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/vendor/caveat/caveat-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/vendor/caveat/caveat-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #151515;
  --paper: #fffef8;
  --desk: #e6e2d8;
  --desk-line: #d9d4c7;
  --bar: #111111;
  --pen: #d0202f;
  --muted: #666;
  --hl: rgba(255, 232, 64, 0.6);
  --hl-solid: #ffe24a;
  --serif: "Latin Modern", "Latin Modern Roman", "Computer Modern", Georgia, "Times New Roman", serif;
  --mono: "KaTeX_Typewriter", "Latin Modern Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --bar-height: 54px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.17rem;
  line-height: 1.5;
  /* Graph paper under the sheet. */
  background-color: var(--desk);
  background-image:
    linear-gradient(var(--desk-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--desk-line) 1px, transparent 1px);
  background-size: 26px 26px;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--pen);
  outline-offset: 2px;
}

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

.xiv {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--bar-height);
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 0 1.25rem;
  background: var(--bar);
  color: #fff;
  font-family: var(--sans);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.xiv-logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.xiv-logo .x {
  display: inline-block;
  font-size: 1.32em;
  font-style: italic;
  font-weight: 400;
  margin: 0 0.02em 0 0.01em;
  transform: translateY(0.06em);
  opacity: 0.82;
}

.xiv-nav {
  display: flex;
  gap: 1.4rem;
  margin-right: auto;
  font-size: 0.86rem;
}
.xiv-nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}
.xiv-nav a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.xiv-buy {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--hl-solid);
  text-decoration: none;
  padding: 0.48rem 0.95rem;
  border-radius: 3px;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.xiv-buy:hover {
  background: #fff;
}
.xiv-buy:active {
  transform: translateY(2px);
  box-shadow: none;
}
.xiv :focus-visible {
  outline-color: #fff;
}

.crumbs {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 1.25rem;
  background: #f4f1e8;
  border-bottom: 1px solid #cfc9ba;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #444;
}
.crumbs-status {
  text-align: right;
}

/* ------------------------------------------------------------------ the sheet */

.desk {
  padding: 2.4rem 1rem 5rem;
  /* Decorations near the sheet's edge must never make the page scroll sideways. */
  overflow-x: hidden;
  overflow-x: clip;
}

.sheet {
  position: relative;
  max-width: 1070px;
  margin: 0 auto;
  /* Wide outer margin on the right for the red-pen notes. */
  padding: 3.4rem 270px 4rem 118px;
  background: var(--paper);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    0 22px 60px -18px rgba(40, 30, 10, 0.45);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.side-stamp {
  position: absolute;
  left: 40px;
  top: 330px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: "Times New Roman", Times, serif;
  font-size: 1.32rem;
  letter-spacing: 0.01em;
  color: #8b8b8b;
  white-space: nowrap;
  user-select: none;
}

.coffee {
  position: absolute;
  top: 54px;
  right: 46px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  border: 7px solid rgba(124, 78, 26, 0.13);
  box-shadow:
    0 0 0 1px rgba(124, 78, 26, 0.08),
    inset 0 0 0 2px rgba(124, 78, 26, 0.06),
    inset 6px -4px 14px rgba(124, 78, 26, 0.05);
  transform: rotate(18deg) scaleY(0.97);
  pointer-events: none;
}
.coffee::after {
  content: "";
  position: absolute;
  inset: -12px 30px 60px -9px;
  border-radius: 50%;
  border-left: 3px solid rgba(124, 78, 26, 0.1);
  border-top: 2px solid rgba(124, 78, 26, 0.06);
}

.running-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.3rem;
  margin-bottom: 2.6rem;
  border-bottom: 0.6px solid var(--ink);
  font-size: 0.86rem;
  font-variant: small-caps;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------ title */

.title-block {
  text-align: center;
  hyphens: none;
}

.seal {
  width: 124px;
  height: 124px;
  color: var(--ink);
  fill: currentColor;
  font-family: var(--serif);
  transform: rotate(-7deg);
  margin-bottom: 0.9rem;
}

h1 {
  margin: 0 0 1.5rem;
  font-weight: 400;
  line-height: 1.12;
}
.t-main {
  display: block;
  font-size: clamp(2.5rem, 6.2vw, 3.9rem);
  letter-spacing: -0.012em;
}
.t-sub {
  display: block;
  margin-top: 0.5rem;
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
}

.authors,
.affils {
  list-style: none;
  margin: 0;
  padding: 0;
}
.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 2.2rem;
  font-size: 1.22rem;
}
.affils {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.4;
}
.affils sup,
.corr sup {
  font-style: normal;
  margin-right: 0.15em;
}
.corr {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  color: #333;
}
.date {
  margin: 1.1rem 0 0;
  font-size: 1.05rem;
}

/* ------------------------------------------------------------------ abstract */

.abstract {
  max-width: 33em;
  margin: 2.3rem auto 0;
  font-size: 0.95em;
}
.abstract h2 {
  margin: 0 0 0.5rem;
  font-size: 1em;
  text-align: center;
}
.abstract p {
  margin: 0;
}
.abstract .keywords {
  margin-top: 0.8rem;
  text-align: left;
  hyphens: none;
}

mark {
  background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 92%, transparent 92%);
  color: inherit;
  padding: 0 0.12em;
  margin: 0 -0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ------------------------------------------------------------------ coin box */

.coin {
  margin: 2.6rem 0 0.6rem;
  padding: 1.25rem 1.4rem 1.2rem;
  border: 2px solid var(--ink);
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
  text-align: left;
  hyphens: none;
}

.coin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1.1rem;
  margin-bottom: 0.95rem;
}
.coin-head h2 {
  margin: 0;
  line-height: 1;
}
.coin-head p {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
}
.ticker {
  font-family: var(--mono);
  font-size: 2.3rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: var(--hl);
  padding: 0.05em 0.18em;
}

.ca-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.8rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.ca-label {
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}
.ca {
  flex: 1 1 14rem;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}
.ca.pending {
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
  font-size: 1rem;
}
.ca-warning {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: #333;
}

.coin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 0.85rem;
  margin-top: 1.05rem;
}

.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 0.5em 1.05em 0.55em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background 0.12s ease;
}
.btn:hover {
  background: #fff3c4;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}
.btn.primary {
  color: #fff;
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--pen);
}
.btn.primary:hover {
  background: #2b2b2b;
  box-shadow: 2px 2px 0 var(--pen);
}
.btn.primary:active {
  box-shadow: 0 0 0 var(--pen);
}
.btn.small {
  font-size: 0.92rem;
  padding: 0.3em 0.8em 0.36em;
  box-shadow: 2px 2px 0 var(--ink);
}
.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn[aria-disabled="true"] {
  pointer-events: none;
}

.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 1.1rem 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #333;
}
.badges li::before {
  display: inline-block;
  width: 1.25em;
  font-weight: 700;
}
.badges .ok::before {
  content: "\2713";
  color: #1a7f37;
}
.badges .no::before {
  content: "\2717";
  color: var(--pen);
}

/* ------------------------------------------------------------------ body text */

section {
  position: relative;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.5rem;
  line-height: 1.25;
  text-align: left;
  hyphens: none;
}
h3 {
  margin: 1.9rem 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.25;
  text-align: left;
  hyphens: none;
}
.secno {
  display: inline-block;
  margin-right: 0.85em;
}

p {
  margin: 0 0 0.85rem;
}

.tt,
code {
  font-family: var(--mono);
  font-size: 0.94em;
}
.nobr {
  white-space: nowrap;
}
.sc {
  font-variant: small-caps;
  letter-spacing: 0.03em;
}

/* Links drawn the way LaTeX's hyperref draws them: thin coloured boxes. */
a.cite,
a.ref,
a.url {
  text-decoration: none;
  padding: 0 0.14em;
  outline-offset: 0;
}
a.cite {
  outline: 1px solid #1fd11f;
}
a.ref {
  outline: 1px solid #ff3b3b;
}
a.url {
  outline: 1px solid #1cc7d0;
}
a.cite:hover,
a.ref:hover,
a.url:hover {
  background: var(--hl);
}
sup.fn {
  line-height: 0;
  margin-left: 0.1em;
}

/* Margin notes in red pen. */
.note {
  float: right;
  clear: right;
  width: 206px;
  margin: -1.6em -240px 0.4em 0;
  font-family: var(--hand);
  font-style: normal;
  font-weight: 400;
  font-size: 1.62rem;
  line-height: 1.02;
  color: var(--pen);
  text-align: left;
  hyphens: none;
  transform: rotate(-3deg);
  transform-origin: left center;
}
.note.tilt {
  transform: rotate(2.5deg);
}
.after-note {
  margin: 0;
  height: 0;
}

.circled {
  position: relative;
  white-space: nowrap;
}
.circled::after {
  content: "";
  position: absolute;
  inset: -0.22em -0.55em -0.3em -0.5em;
  border: 2px solid var(--pen);
  border-radius: 52% 46% 55% 48% / 58% 50% 52% 46%;
  transform: rotate(-2deg);
  pointer-events: none;
}

/* Theorems, definitions, proofs. */
.env {
  margin: 1rem 0;
}
.env-head {
  font-weight: 700;
  font-style: normal;
  margin-right: 0.35em;
}
.env.thm {
  font-style: italic;
}
.env.thm.main {
  margin-top: 1.5rem;
  font-size: 1.12em;
}
.env.thm .katex {
  font-style: normal;
}
.proof {
  margin: 0.5rem 0 1.2rem;
}
.proof-head {
  font-style: italic;
  margin-right: 0.35em;
}
.qed {
  float: right;
  width: 0.62em;
  height: 0.62em;
  margin: 0.45em 0 0 1em;
  border: 1.2px solid var(--ink);
}
.proof::after {
  content: "";
  display: block;
  clear: left;
}

.katex {
  font-size: 1.04em;
}
.katex-display {
  margin: 1rem 0;
  padding: 0.15rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

/* ------------------------------------------------------------------ figures and tables */

figure {
  margin: 1.9rem 0;
  text-align: center;
  hyphens: none;
}
figcaption {
  margin-top: 0.75rem;
  font-size: 0.93em;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}
figure svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink);
  fill: currentColor;
  font-family: var(--serif);
}
.fig-euler {
  max-width: 560px;
  margin: 0 auto;
}
.pen-svg {
  font-family: var(--hand);
}

figure.table figcaption {
  margin: 0 0 0.6rem;
}
.table-scroll {
  overflow-x: auto;
}
table {
  margin: 0 auto;
  border-collapse: collapse;
  border-top: 1.6px solid var(--ink);
  border-bottom: 1.6px solid var(--ink);
  font-size: 0.96em;
  text-align: left;
}
th,
td {
  padding: 0.3rem 0.85rem;
  vertical-align: baseline;
}
th {
  font-weight: 400;
  border-bottom: 0.8px solid var(--ink);
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  white-space: nowrap;
}
tbody tr:first-child td {
  padding-top: 0.45rem;
}
tbody tr:last-child td {
  padding-bottom: 0.45rem;
}
.narrow {
  display: none;
}
table.compare {
  width: 100%;
}
table.compare th,
table.compare td {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  white-space: nowrap;
}
tr.ours td {
  font-weight: 700;
  border-top: 0.8px solid var(--ink);
  background: var(--hl);
}
/* The typewriter face has no bold; keep it from being smeared into one. */
tr.ours td.tt {
  font-weight: 400;
}
table.kv td:first-child {
  padding-right: 2.2rem;
}
.up {
  color: #1a7f37;
}
.down {
  color: var(--pen);
}

/* Code listing: the proof checker. */
.listing {
  text-align: left;
}
.listing-body {
  margin: 0;
  min-height: 3.2em;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: #f7f4ea;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.listing-body .ok {
  color: #1a7f37;
}
.listing-body .warn {
  color: #9a6700;
}
.listing-body .result {
  font-weight: 700;
}
.listing-actions {
  margin-top: 0.8rem;
  text-align: center;
}

/* Algorithm. */
.algorithm {
  text-align: left;
  border-top: 1.6px solid var(--ink);
  border-bottom: 1.6px solid var(--ink);
}
.algorithm figcaption {
  margin: 0;
  padding: 0.3rem 0;
  border-bottom: 0.8px solid var(--ink);
  text-align: left;
  font-size: 1em;
}
.alg-body {
  padding: 0.5rem 0 0.55rem;
}
.alg-io {
  margin: 0;
}
.alg-body ol {
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: line;
}
.alg-body li {
  position: relative;
  counter-increment: line;
  padding-left: 2.2em;
}
.alg-body li::before {
  content: counter(line) ":";
  position: absolute;
  left: 0;
  width: 1.6em;
  text-align: right;
  font-size: 0.85em;
  line-height: 1.77;
}
.alg-body li.in {
  padding-left: 3.9em;
}
.alg-comment {
  color: var(--muted);
  font-style: italic;
}
.alg-comment::before {
  content: "\25B7\00A0";
  font-style: normal;
  font-size: 0.8em;
}
.ca-inline {
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ profit oracle */

.oracle {
  margin: 1.2rem 0 1.6rem;
  padding: 1.05rem 1.2rem 0.85rem;
  border: 1.5px solid var(--ink);
  background: #fff;
  text-align: left;
  hyphens: none;
}
.oracle-inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1.1rem;
}
.oracle label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-variant: small-caps;
  letter-spacing: 0.04em;
}
.oracle input,
.oracle select {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 0.42rem 0.55rem;
  height: 2.5rem;
}
.oracle select {
  font-family: var(--serif);
  font-size: 1.05rem;
  padding-right: 0.3rem;
}
.money {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-variant: normal;
  padding-left: 0.55rem;
}
.money input {
  border: 0;
  width: 8.5rem;
  height: calc(2.5rem - 3px);
  padding-left: 0.3rem;
  background: transparent;
}
.oracle-out {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ink);
}
.oracle-out dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 1.4rem;
  margin: 0 0 0.7rem;
}
.oracle-out dt {
  color: #333;
}
.oracle-out dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.95em;
}
.oracle-verdict {
  margin: 0;
  font-size: 1.3rem;
}
.oracle-verdict b {
  background: var(--hl);
  padding: 0 0.2em;
}
.oracle-why {
  margin: 0.25rem 0 0;
  font-style: italic;
  color: #333;
}
.oracle-error {
  margin: 0;
  color: var(--pen);
}
.oracle-fine {
  margin: 0.8rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.chart-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  border: 1.5px solid var(--ink);
  background: #f7f4ea;
}
.chart-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------------------------------------------------ peer review */

.reviews {
  position: relative;
}
.review {
  margin: 1.1rem 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 3px solid var(--ink);
  text-align: left;
  hyphens: none;
}
.review header {
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}
.review p {
  margin: 0;
}
.decision {
  margin-top: 1.3rem;
}

.stamp {
  position: absolute;
  right: -252px;
  top: 2.4rem;
  padding: 0.5rem 0.8rem 0.45rem;
  border: 4px double var(--pen);
  border-radius: 6px;
  color: var(--pen);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  transform: rotate(-11deg);
  opacity: 0.78;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}

.qa {
  text-align: left;
  hyphens: none;
}

/* ------------------------------------------------------------------ back matter */

.refs {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ref;
  font-size: 0.95em;
  text-align: left;
  hyphens: none;
}
.refs li {
  position: relative;
  counter-increment: ref;
  padding-left: 2.3em;
  margin-bottom: 0.4rem;
}
.refs li::before {
  content: "[" counter(ref) "]";
  position: absolute;
  left: 0;
}
.refs li:target,
.footnotes p:target {
  background: var(--hl);
}

.footnotes {
  margin-top: 2.2rem;
  padding-top: 0.6rem;
  font-size: 0.92rem;
  text-align: left;
  hyphens: none;
}
.footnotes::before {
  content: "";
  display: block;
  width: 30%;
  border-top: 0.6px solid var(--ink);
  margin-bottom: 0.6rem;
}
.footnotes p {
  margin: 0;
}

.disclaimer {
  margin-top: 2.4rem;
  padding-top: 1rem;
  border-top: 0.6px solid var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
  color: #222;
  text-align: left;
  hyphens: none;
}
.page-no {
  margin: 2.2rem 0 0;
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink);
}

/* ------------------------------------------------------------------ smaller screens */

/* No room for a margin: notes drop into the text column. */
@media (max-width: 1120px) {
  .sheet {
    max-width: 800px;
    padding: 3.2rem 4.2rem 3.6rem 5.6rem;
  }
  .side-stamp {
    left: 26px;
  }
  .note {
    float: none;
    display: block;
    width: auto;
    margin: 0.45rem 0 0.2rem 1.2rem;
    font-size: 1.45rem;
    transform: rotate(-1.5deg);
  }
  .note.tilt {
    transform: rotate(1.2deg);
  }
  .after-note {
    height: auto;
    margin: 0 0 0.85rem;
  }
  .stamp {
    right: -1.2rem;
    top: auto;
    bottom: -1.4rem;
    font-size: 0.86rem;
  }
  .decision {
    padding-right: 11rem;
  }
  .coffee {
    right: 22px;
    top: 40px;
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 860px) {
  .xiv-nav {
    display: none;
  }
  .crumbs-status {
    display: none;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 1.08rem;
  }
  .desk {
    padding: 0.8rem 0 3rem;
  }
  .sheet {
    padding: 1.6rem 1.15rem 2.6rem;
    text-align: left;
    hyphens: manual;
    -webkit-hyphens: manual;
  }
  /* The vertical stamp becomes a line of small print at the top. */
  .side-stamp {
    position: static;
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 0.82rem;
    text-align: center;
    margin-bottom: 0.9rem;
    white-space: normal;
  }
  .running-head {
    margin-bottom: 1.8rem;
  }
  .coffee {
    width: 104px;
    height: 104px;
    top: 74px;
    right: 14px;
    border-width: 5px;
  }
  .seal {
    width: 104px;
    height: 104px;
  }
  .authors {
    gap: 0.1rem 1.3rem;
    font-size: 1.1rem;
  }
  .coin {
    padding: 1rem 0.95rem;
    box-shadow: 4px 4px 0 var(--ink);
  }
  .ticker {
    font-size: 1.95rem;
  }
  h2 {
    font-size: 1.36rem;
  }
  th,
  td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .wide {
    display: none;
  }
  .narrow {
    display: inline;
  }
  table.compare {
    font-size: 0.86em;
  }
  table.compare th,
  table.compare td {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
  }
  table.compare th {
    white-space: normal;
    vertical-align: bottom;
    line-height: 1.15;
  }
  /* Figures run the full width of the sheet so their labels stay readable. */
  #fig-2 svg {
    width: calc(100% + 1.6rem);
    max-width: none;
    margin: 0 -0.8rem;
  }
  /* The equation number sits after the equation instead of floating over it. */
  /* Sized from the screen width so the widest equation fits without scrolling. */
  .katex-display > .katex {
    font-size: min(0.86em, 3.65vw);
  }
  .katex-display > .katex > .katex-html > .katex-tag {
    position: static;
    display: inline-block;
    margin-left: 0.8em;
  }
  .oracle-inputs > * {
    flex: 1 1 100%;
  }
  .money input {
    width: 100%;
  }
  .decision {
    padding-right: 0;
    padding-bottom: 4.6rem;
  }
  .stamp {
    right: 0.4rem;
    bottom: -0.4rem;
  }
  .katex {
    font-size: 1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .xiv-buy {
    transition: none;
  }
}

@media print {
  .xiv,
  .crumbs,
  .coffee {
    display: none;
  }
  body {
    background: #fff;
  }
  .desk {
    padding: 0;
  }
  .sheet {
    box-shadow: none;
  }
}
