/* Warm blush palette. Main color stays #FDCDCD.
   paper top #FFF1EE, paper bottom #FFE4DE
   band #FDCDCD, wash #F8D9D4, surface #F6D5CF
   ink #3B2424 — 11.9:1 on the page, 10.1:1 on the band
   link #A33D52 — 5.2:1 on the page bottom, 4.7:1 on the wash
   link hover #8A3045 — 6.7:1 on the page, 6.1:1 on the wash, 5.7:1 on the band
   muted #7A4550 — 6.2:1 on the page, 5.3:1 on the band
   #B5485A is the same rose, but it falls under 4.5:1 once the page is this pink.
   hair #EBB9BC — hairlines between rows; decoration only, never the one carrier of meaning
   soft #5A343A — titles of issues not written yet; 8.8:1 on the page bottom, 8.0:1 on the wash

   Dark (prefers-color-scheme: dark): a deep wine page, and #FDCDCD stays as the accent
   for the active nav, link hover, heading marks, selection, and skip link.
   paper top #2B171C, paper bottom #211014
   band #471F28, wash #3B2127, surface #331E23
   ink #F8E0DD — 13.4:1 on the page, 11.2:1 on the band, 11.7:1 on the wash
   link #EB8EA1 — 7.2:1 on the page, 6.0:1 on the band, 6.2:1 on the wash; also the focus ring
   link hover #FDCDCD — 11.9:1 on the page, 9.9:1 on the band, 10.3:1 on the wash
   muted #CEA1AA — 7.5:1 on the page, 6.2:1 on the band, 6.5:1 on the wash
   text on #FDCDCD (selection, skip link) #211014 — 12.9:1
   hair #5C2F3A; soft #E3C0C4 — 10.1:1 on the page, 8.8:1 on the wash
   plate #F3D8D2 — the sheet of paper an illustration sits on. Illustrations have a white ground
   and are multiplied onto what is behind them: the page itself in light mode, this sheet in dark.
*/
:root {
  --pink: #FDCDCD;
  --pink-deep: #F0A8A8;
  --paper: #FFF1EE;
  --paper-bottom: #FFE4DE;
  --wash: #F8D9D4;
  --surface: #F6D5CF;
  --ink: #3B2424;
  --muted: #7A4550;
  --link: #A33D52;
  --link-hover: #8A3045;
  --mark: #D07080;
  --rule: #D07080;
  --band: var(--pink);
  --on-pink: var(--ink);
  --shade: rgba(122, 69, 80, 0.3);
  --hair: #EBB9BC;
  --soft: #5A343A;
  --plate: transparent;
  --plate-pad: 0;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #2B171C;
    --paper-bottom: #211014;
    --band: #471F28;
    --wash: #3B2127;
    --surface: #331E23;
    --ink: #F8E0DD;
    --muted: #CEA1AA;
    --link: #EB8EA1;
    --link-hover: #FDCDCD;
    --mark: #FDCDCD;
    --rule: #A2495B;
    --on-pink: #211014;
    --shade: rgba(0, 0, 0, 0.45);
    --hair: #5C2F3A;
    --soft: #E3C0C4;
    --plate: #F3D8D2;
    --plate-pad: 0.5rem;
  }
}

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

html {
  scroll-behavior: auto;
  background: var(--paper-bottom);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(to bottom, var(--paper), var(--paper-bottom));
  background-attachment: fixed;
  color: var(--ink);
  /* Latin first, then the Chinese serif. Noto Serif SC (Source Han Serif) goes ahead of STSong and
     SimSun: those two have a single weight, so every heading would be a smeared, synthesized bold,
     and they do not close up the gap between two punctuation marks in a row. */
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", "STSong", "SimSun", serif;
  font-size: 1.125rem;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}

/* The English pages. The line height above is set for Chinese; Latin text wants less.
   Where none of the Latin serifs in the stack is installed, Latin text falls to the Chinese font,
   whose quotation marks and apostrophe are full width unless the proportional forms are asked for.
   Chinese set on an English page keeps its own punctuation. */
html:lang(en) body {
  line-height: 1.7;
  font-variant-east-asian: proportional-width;
}

html:lang(en) :lang(zh) {
  font-variant-east-asian: normal;
}

::selection {
  background: var(--pink);
  color: var(--on-pink);
}

:focus {
  outline: none;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--pink);
  color: var(--on-pink);
  padding: 0.35rem 0.7rem;
  z-index: 2;
}

.skip:focus {
  transform: none;
}

.site-header,
.site-footer {
  background: var(--band);
}

.site-header ::selection {
  background: var(--pink-deep);
  color: var(--on-pink);
}

.header-inner,
.wrap {
  width: min(42rem, 100%);
  margin-inline: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.site-header a {
  color: var(--ink);
  text-decoration: none;
}

.site-header a:hover,
.site-header a[aria-current="page"] {
  color: var(--link-hover);
}

.site-header a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.site-name {
  font-weight: 600;
  white-space: nowrap;
}

/* The mark beside the name: the flower with the pig at its heart. It is favicon.svg. */
.site-mark {
  width: 1.45em;
  height: 1.45em;
  margin-right: 0.45em;
  vertical-align: -0.33em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
}

/* The link to this page in the other language: last in the nav, set off by a hairline. */
nav .lang {
  align-self: center;
  padding-left: 1.15rem;
  border-left: 1px solid var(--rule);
  /* A short line box, so the hairline is about as tall as the letters. */
  line-height: 1.15;
}

/* On a narrow screen the nav is a row of its own under the name, and the language link
   goes up beside the name instead, so it never ends up alone on a third row. */
@media (max-width: 36rem) {
  .header-inner {
    position: relative;
  }

  nav .lang {
    position: absolute;
    top: 1.05rem;
    right: 1.5rem;
    padding-left: 0;
    border-left: 0;
    line-height: inherit;
  }

  /* The five English labels are wider than the Chinese ones. Set a little smaller and closer,
     they stay on one row at phone widths instead of leaving the last one alone on a second. */
  html:lang(en) nav {
    gap: 0.4rem 0.75rem;
    font-size: 0.95rem;
  }
}

main.wrap {
  flex: 1;
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
}

h2 {
  margin: 2.6rem 0 0.85rem;
  font-size: 1.28rem;
}

h3 {
  margin: 1.9rem 0 0.55rem;
  font-size: 1.12rem;
}

h1::after,
h2::after {
  content: "";
  display: block;
  width: 2.15rem;
  height: 2px;
  margin-top: 0.4rem;
  background: var(--mark);
}

.deck {
  margin: 0 0 2.2rem;
  color: var(--muted);
  text-wrap: pretty;
}

.page-head time {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.prose p,
.project p {
  margin: 0 0 1.35em;
  text-wrap: pretty;
}

/* Chinese body text is set flush on both sides, like a printed page. Only Chinese: Latin text
   without hyphenation would open up rivers of space. */
.prose:lang(zh) p,
.prose:lang(zh) li {
  text-align: justify;
  /* pretty pulls words down to save a lone last character; with justify the shortened lines
     get stretched, and on a phone the gaps show. Plain wrapping keeps every line full. */
  text-wrap: wrap;
}

/* Side notes (Markdown footnotes, see js/render.js). The number in the text is a label for a
   hidden checkbox: on a narrow screen tapping it opens the note under the line; on a wide one
   the note sits in the right margin beside the line it belongs to, and the checkbox does nothing. */
.sidenote-toggle {
  display: none;
}

.sidenote-ref {
  cursor: pointer;
  color: var(--link);
  font-size: 0.68em;
  line-height: 0;
  vertical-align: super;
  padding: 0 0.12em;
  font-variant-numeric: lining-nums;
}

.sidenote {
  display: none;
  margin: 0.6em 0 0.8em;
  padding: 0.55em 0.8em;
  border-left: 2px solid var(--rule);
  background: var(--wash);
  color: var(--soft);
  font-size: 0.85em;
  line-height: 1.7;
  text-align: left;
  text-indent: 0;
}

.sidenote-toggle:checked + .sidenote {
  display: block;
}

.sidenote-no {
  color: var(--mark);
  font-size: 0.85em;
  margin-right: 0.45em;
  font-variant-numeric: lining-nums;
}

.sidenote .katex {
  font-size: 1em;
}

@media (min-width: 74rem) {
  .sidenote-ref {
    cursor: default;
  }

  .sidenote,
  .sidenote-toggle:checked + .sidenote {
    display: block;
    float: right;
    clear: right;
    width: 13rem;
    margin: 0.2em -15.5rem 0.8em 0;
    padding: 0 0 0 0.75em;
    background: none;
    border-left: 1px solid var(--hair);
    font-size: 0.8em;
    line-height: 1.65;
  }
}

.prose ul,
.prose ol {
  margin: 0 0 1.35em;
  padding-left: 1.25em;
}

.prose li::marker {
  color: var(--link);
}

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

.prose blockquote {
  margin: 1.4em 0;
  padding: 0.15em 0 0.15em 1rem;
  border-left: 3px solid var(--mark);
  color: var(--muted);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 1.8rem 0;
}

.prose a,
.project a,
.back a,
.site-footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.prose :not(pre) > code {
  background: var(--wash);
  color: var(--ink);
  padding: 0.05em 0.32em;
  font-size: 0.88em;
}

/* A long identifier in running text (a commit hash, say) breaks rather than widen the page.
   Not in table cells: a table scrolls instead. */
.prose p > code,
.prose li > code {
  overflow-wrap: anywhere;
}

.prose pre {
  margin: 0 0 1.45em;
  padding: 1rem 1.05rem;
  overflow-x: auto;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.65;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

code,
pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.prose .katex {
  color: var(--ink);
}

/* Display math. A wide formula scrolls sideways, and phones and macOS hide the scrollbar,
   so the edges carry a cue: the shadows stay at the box edges while wash-colored covers
   scroll with the formula. A shadow shows only where there is more to scroll to. */
.prose .math-display {
  margin: 1.35em 0;
  padding: 0.55em 0.75em 0.7em;
  overflow-x: auto;
  overflow-y: hidden;
  background:
    linear-gradient(var(--wash), var(--wash)) left / 1.25em 100% no-repeat local,
    linear-gradient(var(--wash), var(--wash)) right / 1.25em 100% no-repeat local,
    linear-gradient(to right, var(--shade), transparent) left / 0.8em 100% no-repeat scroll,
    linear-gradient(to left, var(--shade), transparent) right / 0.8em 100% no-repeat scroll,
    var(--wash);
}

/* site.js makes only the formulas that overflow focusable, so they can be scrolled with the keyboard. */
.prose .math-display:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.prose .math-display .katex-display {
  margin: 0;
}

/* Tables, figures and folded asides in a post. site.js puts each table in a .table-scroll box. */
.table-scroll {
  margin: 0 0 1.45em;
  overflow-x: auto;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.prose table,
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.prose th,
.prose td,
.ledger th,
.ledger td {
  padding: 0.5rem 1.1rem 0.5rem 0;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  vertical-align: baseline;
}

.prose th:last-child,
.prose td:last-child,
.ledger th:last-child,
.ledger td:last-child {
  padding-right: 0;
}

.prose thead th,
.ledger thead th {
  border-bottom-color: var(--rule);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  white-space: nowrap;
}

.prose th[align="right"],
.prose td[align="right"] {
  text-align: right;
}

.prose th[align="center"],
.prose td[align="center"] {
  text-align: center;
}

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

.prose figure {
  margin: 1.7em 0;
}

.prose figure img,
.prose figure svg {
  display: block;
  margin-inline: auto;
}

figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.prose details {
  margin: 0 0 1.35em;
  padding: 0.55rem 0.95rem;
  background: var(--wash);
}

.prose summary {
  color: var(--link);
  cursor: pointer;
}

.prose details[open] > summary {
  margin-bottom: 0.6rem;
}

.prose details > :last-child {
  margin-bottom: 0;
}

.index {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.index li + li {
  margin-top: 0.85rem;
}

.index a {
  display: block;
  margin-inline: -0.65rem;
  padding: 0.45rem 0.65rem;
  color: inherit;
  text-decoration: none;
}

.index a:hover,
.index a:focus-visible {
  background: var(--wash);
}

.index-meta {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.index-tag::before {
  content: " · ";
}

.index-title {
  display: block;
  color: var(--link);
  font-size: 1.2rem;
  line-height: 1.45;
}

.index a:hover .index-title,
.index a:focus-visible .index-title {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.index-summary {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  text-wrap: pretty;
}

/* The small line above a title. Latin reads as small capitals: capitals set small and spaced
   out, rather than font-variant-caps, which the CJK serif fonts in the stack can only fake. */
.kicker {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kicker a {
  color: inherit;
  text-decoration: none;
}

.kicker a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* An illustration. The drawings have a white ground that fades out at the edges, so in light
   mode they are multiplied straight onto the page and have no box. In dark mode --plate turns
   the figure into a sheet of pale paper and the drawing is multiplied onto that. */
.plate {
  margin: 0;
  padding: var(--plate-pad);
  background: var(--plate);
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

/* Home page. */
.hero {
  display: grid;
  align-items: center;
  gap: 1.75rem 2rem;
  margin-bottom: 3.25rem;
}

.hero h1 {
  font-size: 2.2rem;
  line-height: 1.35;
}

.hero .deck {
  margin-bottom: 0;
  /* A short paragraph in a narrow column: even lines, so the last one is not two characters. */
  text-wrap: balance;
}

.hero .plate {
  width: min(15rem, 72%);
  margin-inline: auto;
}

.cards {
  display: grid;
  gap: 1.5rem 2.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  margin-inline: -0.65rem;
  padding: 0.65rem 0.65rem 0.8rem;
  color: inherit;
  text-decoration: none;
}

.card:hover,
.card:focus-visible {
  background: var(--wash);
}

.card .plate {
  margin-bottom: 0.9rem;
}

.card h2 {
  margin: 0;
  color: var(--link);
  font-size: 1.45rem;
}

.card h2::after {
  content: none;
}

.card:hover h2,
.card:focus-visible h2 {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.card-blurb {
  margin: 0.3rem 0 0;
  line-height: 1.7;
  text-wrap: pretty;
}

.card-latest {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

.card-lead {
  margin-right: 0.6em;
  padding: 0 0.4em;
  background: var(--wash);
  color: var(--ink);
  font-size: 0.9rem;
}

.card:hover .card-lead,
.card:focus-visible .card-lead {
  background: var(--band);
}

.card-more {
  margin: 0.55rem 0 0;
  color: var(--link);
  font-size: 0.98rem;
}

@media (min-width: 40rem) {
  .hero {
    grid-template-columns: 1fr 15rem;
  }

  .hero .plate {
    width: auto;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* Series pages. */
.series-plate {
  width: min(30rem, 100%);
  margin: 0 auto 2.4rem;
}

.series-plate + h2,
.toc + h2 {
  margin-top: 2.2rem;
}

/* The numbered contents of a series. */
.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.toc-item {
  border-bottom: 1px solid var(--hair);
}

.toc-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: baseline;
  column-gap: 0.4rem;
  margin-inline: -0.65rem;
  padding: 0.8rem 0.65rem;
  color: inherit;
  text-decoration: none;
}

a.toc-row:hover,
a.toc-row:focus-visible {
  background: var(--wash);
}

.toc-no {
  color: var(--link);
  font-variant-numeric: tabular-nums;
}

.toc-title {
  display: block;
  color: var(--soft);
  font-size: 1.15rem;
  line-height: 1.5;
}

a.toc-row .toc-title {
  color: var(--link);
}

a.toc-row:hover .toc-title,
a.toc-row:focus-visible .toc-title {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.toc-title.is-untitled {
  color: var(--muted);
}

.toc-note {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.toc-status {
  padding-left: 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fine {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.lede {
  margin: 1.2rem 0 0;
  text-wrap: pretty;
}

/* The roofline sketch. Two drawings of the same thing: a narrow one with shorter labels for
   phones, a wide one from 34rem up. Colors come from the page, so both modes work. */
.roof {
  margin: 0 0 0.6rem;
}

.roof svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  fill: currentColor;
}

.roof-wide {
  display: none !important;
}

@media (min-width: 34rem) {
  .roof-wide {
    display: block !important;
  }

  .roof-narrow {
    display: none !important;
  }
}

.roof-under {
  fill: var(--wash);
}

.roof-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roof-axis {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roof-drop {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 1 5;
  stroke-linecap: round;
}

.roof-gap {
  fill: none;
  stroke: var(--link);
  stroke-width: 1.6;
  stroke-dasharray: 4 4;
}

.roof-dot {
  fill: var(--link);
}

.roof-ridge {
  fill: var(--paper);
  stroke: currentColor;
  stroke-width: 2;
}

.roof-quiet {
  fill: var(--muted);
}

.roof-accent {
  fill: var(--link);
}

/* Flow diagrams inside a post (boxes and arrows, hand-written inline SVG). They are drawn
   360 wide with 11-unit text, the same scale as .roof-narrow, so one drawing serves phones
   and is capped on wide screens instead of blown up. Colors come from the page. */
.prose .flow svg {
  width: 100%;
  max-width: 28rem;
  height: auto;
  overflow: visible;
  fill: currentColor;
}

.flow-box {
  fill: var(--wash);
  stroke: var(--muted);
  stroke-width: 0.8;
}

/* Runs only in some layers: dashed, no fill. */
.flow-opt {
  fill: none;
  stroke: var(--muted);
  stroke-width: 0.9;
  stroke-dasharray: 4 3;
}

/* Communication: a pointed box in the link color. */
.flow-comm {
  fill: var(--paper);
  stroke: var(--link);
  stroke-width: 1.3;
}

/* A cache. */
.flow-store {
  fill: var(--surface);
  stroke: var(--muted);
  stroke-width: 0.8;
}

.flow-store-rim {
  fill: none;
  stroke: var(--muted);
  stroke-width: 0.8;
}

.flow-edge {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linejoin: round;
}

.flow-edge-opt {
  stroke: var(--muted);
  stroke-dasharray: 3 3;
}

.flow-head {
  fill: currentColor;
}

.flow-head-opt,
.flow-quiet {
  fill: var(--muted);
}

/* The ledger on the roofline page. */
.ledger th[scope="row"] {
  font-weight: 400;
}

.ledger th[scope="row"] a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.ledger-rig {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.ledger td {
  white-space: nowrap;
}

.ledger .ledger-empty {
  color: var(--muted);
  white-space: normal;
}

.ledger-bar {
  display: block;
  width: 4.5rem;
  height: 3px;
  margin-top: 0.3rem;
  background: var(--hair);
}

.ledger-bar span {
  display: block;
  height: 100%;
  background: var(--link);
}

/* The issue before and the issue after, at the end of a series post. */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin-top: 3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hair);
}

.post-nav a {
  display: block;
  text-decoration: none;
}

.post-next {
  grid-column: 2;
  text-align: right;
}

.post-nav-lead {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.post-nav-title {
  display: block;
  line-height: 1.5;
}

.post-nav a:hover .post-nav-title {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.post-nav + .back {
  margin-top: 1.6rem;
}

.lost {
  width: min(15rem, 70%);
  margin: 0 0 1.6rem;
}

.project + .project {
  margin-top: 2.25rem;
}

.project h2 {
  margin: 0;
  font-size: 1.22rem;
}

.project h2::after {
  content: none;
}

.meta {
  margin: 0.28rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.back {
  margin: 2.75rem 0 0;
}

.site-footer {
  color: var(--ink);
  font-size: 0.98rem;
}

.site-footer .wrap {
  padding-top: 1.05rem;
  padding-bottom: 1.15rem;
}

.site-footer a {
  color: var(--link-hover);
}

.site-footer p {
  margin: 0;
}

button,
.button {
  font: inherit;
  color: var(--on-pink);
  background: var(--pink);
  border: 0;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

button:hover,
.button:hover,
button:focus-visible,
.button:focus-visible {
  background: var(--pink-deep);
  color: var(--on-pink);
}

.math-fallback {
  color: var(--link);
}

@media (max-width: 640px) {
  .header-inner,
  .wrap {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  main.wrap {
    padding-top: 2.4rem;
  }

  h1 {
    font-size: 1.55rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  nav {
    gap: 1rem;
  }
}
