/* Crypterial Labs. One stylesheet, no dependencies, no web fonts. lattice.js draws the field on
   the front page; blog.js filters the post list. */

:root {
  --bg: #0c0e12;
  --text: #e8e9ec;
  --muted: #9aa2ad;
  --faint: #5b6270;
  --line: #242932;
  --accent: #e0b04a;
  --accent-ink: #1a1305;
  --dot: color-mix(in srgb, var(--text) 20%, transparent);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 58ch;
  --col: 1040px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --rise: 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6f2;
    --text: #17191d;
    --muted: #5d6470;
    --faint: #8a909b;
    --line: #dcd9d1;
    --accent: #a8791b;
    --accent-ink: #ffffff;
    --dot: color-mix(in srgb, var(--text) 22%, transparent);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;   /* a word that cannot fit a phone's line breaks instead of overflowing */
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--accent); }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink); padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; z-index: 10; }

/* Motion. Entry: things rise into place in reading order. Ambient: the active cell walks
   the lattice, the points shimmer, the dot field drifts. All of it is off under
   prefers-reduced-motion. */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes drift {
  from { background-position: 0 0; }
  to   { background-position: 22px 22px; }
}
@keyframes shimmer {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}
@keyframes walk {
  0.0%, 10.0% { transform: translate(0px, 0px); }
  16.7%, 26.7% { transform: translate(52px, -7px); }
  33.3%, 43.3% { transform: translate(70px, -53px); }
  50.0%, 60.0% { transform: translate(18px, -46px); }
  66.7%, 76.7% { transform: translate(-34px, -39px); }
  83.3%, 93.3% { transform: translate(-52px, 7px); }
  100.0%, 100.0% { transform: translate(0px, 0px); }
}

/* The live field drawn by lattice.js sits behind everything; when it runs, the static
   figure and the CSS dot field step aside but keep their space in the layout. */

.field { position: fixed; inset: 0; z-index: -1; pointer-events: none; animation: fade 1400ms ease-out both; }
html[data-field] .hero::before { display: none; }
html[data-field] .hero-figure .lattice { visibility: hidden; }

/* Header */

.site-header {
  position: relative;
  z-index: 9;   /* above the page's entrance-animated blocks, which stay stacking contexts; below the skip link */
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 1.4rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: fade 600ms ease-out both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-labs { font-weight: 400; color: var(--muted); }

.mark { width: 22px; height: 22px; fill: var(--text); }
.mark-accent { fill: var(--accent); }

/* Navigation: three words in the label face. The current page carries a point, the same
   point that marks the centre of the mark and the entries of the ledger. */
.site-nav { display: flex; align-items: center; }
.site-links { display: flex; align-items: baseline; gap: 1.6rem; }
.menu-button { display: none; }
.header-link {
  position: relative;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
  transition: color 150ms ease;
}
.header-link:hover { color: var(--text); }
.header-link[aria-current="page"] { color: var(--text); }
.header-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -0.85em;
  top: 0.55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
/* Phones: the links fold behind a three-line button and open as a panel under the header,
   the lines turning into a cross. Without scripts nojs.css lays the links out in a row instead. */
@media (max-width: 560px) {
  .menu-button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: -9px -12px -9px 0;   /* the lines end on the gutter edge, like the words did */
    padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .menu-button:hover, .site-nav.open .menu-button { color: var(--text); }
  .menu-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
  .menu-icon line { transform-box: fill-box; transform-origin: center; transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 160ms ease; }
  .site-nav.open .menu-icon line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-nav.open .menu-icon line:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
  .site-nav.open .menu-icon line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .site-links { display: none; }
  .site-nav.open .site-links {
    display: block;
    position: absolute; left: 0; right: 0; top: 100%;
    padding: 0.45rem 0 0.75rem;
    background: var(--bg);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  }
  .site-nav.open .header-link {
    display: block;
    padding: 0.7rem var(--gutter) 0.7rem calc(var(--gutter) + 1.1rem);
    font-size: 0.88rem;
    animation: rise 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .site-nav.open .header-link:nth-child(2) { animation-delay: 45ms; }
  .site-nav.open .header-link:nth-child(3) { animation-delay: 90ms; }
  .site-nav.open .header-link:nth-child(4) { animation-delay: 135ms; }
  .site-nav.open .header-link:nth-child(n + 5) { animation-delay: 180ms; }
  .site-nav.open .header-link[aria-current="page"]::before { left: var(--gutter); top: calc(0.7rem + 0.55em); }
}

/* The page is one screen: header, then hero and about centred in the remaining height, then footer. */

main { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; }
main:has(.listing, .post) { justify-content: flex-start; }

/* Hero */

.hero {
  position: relative;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 5rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -2rem 0 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 35% 45%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 85% at 35% 45%, #000 0%, transparent 72%);
  animation: fade 1200ms ease-out both, drift 90s linear infinite;
}
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; }
  .hero-figure { width: 100%; max-width: 420px; margin: 0 auto; }
}
/* Short viewports (landscape phones, small laptops): less vertical air. */
@media (max-height: 760px) {
  .hero { padding-top: 1.75rem; padding-bottom: 1.5rem; }
  .about { padding-bottom: 1.75rem; }
  .site-header { padding-top: 1rem; padding-bottom: 1rem; }
}
/* Large displays: the column and the type grow with the screen. */
@media (min-width: 1800px) {
  :root { --col: 1240px; }
  html { font-size: 19px; }
}
@media (min-width: 2400px) {
  :root { --col: 1480px; }
  html { font-size: 22px; }
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 16ch;
  text-wrap: balance;
  animation: rise var(--rise);
  animation-delay: 120ms;
}

.lede {
  margin: 0;
  max-width: var(--measure);
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--muted);
  animation: rise var(--rise);
  animation-delay: 260ms;
}

/* Lattice figure */

.hero-figure { margin: 0; animation: fade 1000ms ease-out both; animation-delay: 300ms; }
.lattice { display: block; width: 100%; height: auto; overflow: visible; }
.lat-pts { fill: color-mix(in srgb, var(--text) 45%, transparent); }
.lat-pts circle { animation: shimmer 7s ease-in-out infinite; }
.lat-pts circle:nth-child(3n + 1) { animation-delay: -2.3s; }
.lat-pts circle:nth-child(3n + 2) { animation-delay: -4.6s; animation-duration: 9s; }
.lat-pts circle:nth-child(5n)     { animation-duration: 11s; }
.lat-active { animation: walk 36s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
.lat-cell { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 1; }
.lat-basis { stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; }
.lat-key { fill: var(--accent); }

/* About */

.about {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
  display: grid;
  grid-template-columns: minmax(120px, 0.24fr) minmax(0, 0.76fr);
  gap: 1rem 2.5rem;
  align-items: start;
  animation: rise var(--rise);
  animation-delay: 420ms;
}
.about > * { border-top: 1px solid var(--line); padding-top: 1.2rem; margin: 0; }
.about h2 { font-size: 1.28rem; line-height: 1.25; }
.about-lead {
  margin: 0 0 1rem;
  max-width: var(--measure);
  font-family: var(--serif);
  font-size: 1.42rem;
  line-height: 1.4;
  letter-spacing: -0.005em;
}
.about-body p:not(.about-lead) { margin: 0 0 1.6rem; max-width: var(--measure); color: var(--muted); font-size: 0.98rem; }

.facts {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.5rem;
}
.facts div { display: flex; flex-direction: column; gap: 0.15rem; }
.facts dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin: 0; font-family: var(--serif); font-size: 1.05rem; }

@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; gap: 0; padding-bottom: 2.5rem; }
  .about-body { border-top: 0; padding-top: 0.4rem; }
  .facts { gap: 0.8rem 1.8rem; }
}

/* Footer */

.site-footer {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  animation: fade 900ms ease-out both;
  animation-delay: 600ms;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* The blog list is a ledger: one line down the left with a point per post, the year where
   it changes, the date, then the title and summary. The points echo the mark. */

.listing, .post {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) var(--gutter) 3rem;
}
.listing-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
  animation: rise var(--rise);
  animation-delay: 120ms;
}
.listing-head h1, .post-head h1 {
  max-width: none;
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.listing-head .crumbs { flex-basis: 100%; margin: 0; }
.crumbs { margin: 0 0 1rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.hash { color: var(--faint); font-weight: 400; margin-right: 0.05em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ledger { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid;
  grid-template-columns: 4.5rem 1.25rem 4.5rem minmax(0, 1fr);
  gap: 0 1rem;
  align-items: start;
}
.entry-year, .entry-date, .entry-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.entry-year { padding-top: 1.72rem; color: var(--text); }
.entry-line { position: relative; align-self: stretch; border-left: 1px solid var(--line); margin-left: 0.6rem; }
.entry:first-child .entry-line { margin-top: 2.2rem; }
.entry:first-child .entry-line::before { top: -3.5px; }
.entry-line::before {
  content: "";
  position: absolute;
  left: -4px; top: 2rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 200ms ease, transform 200ms ease;
}
.entry:first-child .entry-line::before { background: var(--accent); animation: breathe 3.2s ease-out infinite; }
.entry:hover .entry-line::before { background: var(--accent); transform: scale(1.35); }
@keyframes breathe {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* Entrance: each line segment draws downward and its point lands, one entry after another. */
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes land { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }
.entry-line { transform-origin: top; animation: draw 500ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(220ms + var(--i, 0) * 90ms); }
.entry-line::before { animation: land 400ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(560ms + var(--i, 0) * 90ms); }
.entry:first-child .entry-line::before { animation: land 400ms cubic-bezier(0.2, 0.7, 0.2, 1) both, breathe 3.2s ease-out 1s infinite; animation-delay: 560ms, 1s; }
.entry-year, .entry-date, .entry-body { animation: rise var(--rise); animation-delay: calc(360ms + var(--i, 0) * 90ms); }
.entry:nth-child(1) { --i: 0; } .entry:nth-child(2) { --i: 1; } .entry:nth-child(3) { --i: 2; } .entry:nth-child(4) { --i: 3; }
.entry:nth-child(5) { --i: 4; } .entry:nth-child(6) { --i: 5; } .entry:nth-child(7) { --i: 6; } .entry:nth-child(8) { --i: 7; }
.entry:nth-child(n + 9) { --i: 8; }
.entry-date { padding-top: 1.72rem; white-space: nowrap; }
.entry-body { padding: 1.25rem 0 1.5rem; }
.entry-title { font-size: 1.5rem; line-height: 1.2; margin: 0 0 0.45rem; letter-spacing: -0.01em; }
.entry-title a { text-decoration: none; }
.entry:hover .entry-title a { color: var(--accent); }
.entry-summary { margin: 0 0 0.55rem; max-width: 60ch; color: var(--muted); font-size: 0.98rem; }
.entry-meta { margin: 0; }
.entry-meta .sep { color: var(--faint); }
@media (max-width: 640px) {
  .entry { grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0 0.8rem; }
  .entry-year { grid-column: 1 / -1; padding: 0.4rem 0 0; }
  .entry-year:empty { display: none; }
  .entry-line { margin-left: 0.3rem; grid-row: span 2; }   /* down the date row and the body row */
  .entry-date { grid-column: 2; padding: 1.4rem 0 0; }
  .entry-body { grid-column: 2; padding-top: 0.3rem; }
  .entry-title { font-size: 1.3rem; }
}

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
.tags a, .post-meta .tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
}
.tags a::before { content: "#"; color: var(--faint); }
.tags a:hover, .post-meta .tag:hover { color: var(--accent); }
.tags-all { margin-top: 0.9rem; }
.tag-count { margin-left: 0.3em; color: var(--faint); }

/* The live filter, hidden until blog.js runs. Sits on the title row on wide screens. */
.filter { position: relative; flex: 0 1 26rem; min-width: 14rem; margin-bottom: 0.3rem; }
.filter-input {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0;
  outline: none;
}
.filter-input:focus { border-bottom-color: var(--accent); }
.filter-input::placeholder { color: var(--faint); }
.filter-count { position: absolute; left: 0; top: 100%; margin: 0.35rem 0 0; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.empty { border-top: 1px solid var(--line); padding-top: 1.2rem; color: var(--muted); }

/* A post. A hairline of gold across the top of the viewport fills as the reader scrolls (no
   script: a scroll-driven animation where the browser has it), and every section starts with a
   point, like the entries in the ledger. */
.progress { position: fixed; top: 0; left: 0; width: 100%; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); z-index: 5; pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.prose h2 { position: relative; }
.prose h2::before { content: ""; position: absolute; left: -1.25rem; top: 0.5em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@media (max-width: 860px) { .prose h2::before { display: none; } }

.post-head { max-width: 60rem; animation: rise var(--rise); animation-delay: 120ms; margin-bottom: 2rem; }
.post-head h1 { margin-bottom: 0.9rem; }
.post-head .lede { max-width: 62ch; font-size: 1.08rem; margin-bottom: 1.1rem; }
.post-meta { margin: 0; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); line-height: 1.9; }
.post-meta .sep { color: var(--faint); margin: 0 0.25em; }
.post-meta .post-author { color: var(--text); }
.post-meta .tag { margin-right: 0.2em; }

.toc { margin: 0 0 2.2rem; padding-top: 1rem; border-top: 1px solid var(--line); max-width: 44ch; font-size: 0.92rem; }
.toc::before { content: "Contents"; display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.toc ol { margin: 0; padding-left: 1.4rem; }
.toc li { margin: 0.25rem 0; padding-left: 0.2rem; }
.toc li::marker { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--text); }

.prose { max-width: 66ch; animation: rise var(--rise); animation-delay: 260ms; }
.prose a, .prose code { overflow-wrap: anywhere; }   /* long paths and URLs break rather than run off a phone */
.prose > * { margin: 0 0 1.25rem; }
.prose h2 { font-size: 1.6rem; line-height: 1.2; margin-top: 2.6rem; }
.prose h3 { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.8rem; }
.prose p, .prose li { line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { font-weight: 600; }
.prose a { text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: color-mix(in srgb, var(--text) 8%, transparent); padding: 0.1em 0.35em; border-radius: 3px; }
.prose pre {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow-x: auto;
  background: color-mix(in srgb, var(--text) 4%, var(--bg)) !important;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 0.5rem 0.8rem 0.5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 400; color: var(--muted); }
.prose td[align="right"], .prose th[align="right"] { text-align: right; font-variant-numeric: tabular-nums; }
/* On a phone a wide table scrolls sideways inside its own box instead of pushing past the edge;
   a soft shadow at an edge says there is more that way and disappears once you get there. */
@media (max-width: 640px) {
  .prose table {
    display: block; width: max-content; max-width: 100%; overflow-x: auto; font-size: 0.86rem;
    background:
      linear-gradient(to right, var(--bg) 40%, transparent) 0 0 / 48px 100% no-repeat local,
      linear-gradient(to left, var(--bg) 40%, transparent) 100% 0 / 48px 100% no-repeat local,
      linear-gradient(to right, color-mix(in srgb, var(--text) 16%, transparent), transparent) 0 0 / 16px 100% no-repeat scroll,
      linear-gradient(to left, color-mix(in srgb, var(--text) 16%, transparent), transparent) 100% 0 / 16px 100% no-repeat scroll;
  }
  .prose th, .prose td { padding: 0.45rem 0.9rem 0.45rem 0; }
  .prose td { white-space: nowrap; }
}
.prose blockquote { margin: 0 0 1.25rem; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.prose p > img { margin: 0.4rem 0; }
.prose figure { margin: 2rem 0; }
.prose figure.wide { margin-left: calc(-1 * clamp(0px, (100vw - 66ch) / 2 - var(--gutter), 8rem)); width: calc(100% + clamp(0px, (100vw - 66ch) / 2 - var(--gutter), 8rem)); }
.prose figcaption { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--muted); margin-top: 0.7rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.prose .footnote-definition { font-size: 0.9rem; color: var(--muted); }

.post-foot { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.post-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.post-nav a { text-decoration: none; font-family: var(--serif); font-size: 1.05rem; color: var(--text); max-width: 45%; }
.post-nav a span { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.post-nav a:hover { color: var(--accent); }
.post-nav .older { margin-left: auto; text-align: right; }

/* Contact: the front page's hero, with the address as the centrepiece and the field behind. */
.contact { padding-top: clamp(2.5rem, 8vh, 6rem); }
.contact .lede { margin-bottom: 1.6rem; }
.contact-email { margin: 0 0 2rem; font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.01em; animation: rise var(--rise); animation-delay: 340ms; }
.contact-email a { text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
.contact-email a:hover { color: var(--accent); }
.channels { margin: 0; max-width: 52ch; animation: rise var(--rise); animation-delay: 420ms; }
.channels div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.channels dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.channels dd { margin: 0; font-size: 0.98rem; white-space: nowrap; }
@media (max-width: 480px) { .channels div { grid-template-columns: 1fr; gap: 0.15rem; } }

/* Inside the editor's preview frame the page is only to be looked at. */
html.preview a, html.preview button, html.preview input { pointer-events: none; }
html.preview .hero-figure .lattice { visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
