@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("/assets/fonts/AlteHaasGroteskRegular.woff") format("woff");
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("/assets/fonts/AlteHaasGroteskBold.woff") format("woff");
  font-weight: bold;
  font-display: swap;
}

/* Monochrome emoji text glyphs — only the subsets covering codepoints on the
   page are ever fetched. Emoji without a text glyph still fall back to the
   platform color font. */
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-0-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+1f1e6-1f1ff;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-1-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+200d,U+2620,U+26a7,U+fe0f,U+1f308,U+1f38c,U+1f3c1,U+1f3f3-1f3f4,U+1f6a9,U+e0062-e0063,U+e0065,U+e0067,U+e006c,U+e006e,U+e0073-e0074,U+e0077,U+e007f;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-2-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+23,U+2a,U+30-39,U+a9,U+ae,U+200d,U+203c,U+2049,U+20e3,U+2122,U+2139,U+2194-2199,U+21a9-21aa,U+23cf,U+23e9-23ef,U+23f8-23fa,U+24c2,U+25aa-25ab,U+25b6,U+25c0,U+25fb-25fe,U+2611,U+2622-2623,U+2626,U+262a,U+262e-262f,U+2638,U+2640,U+2642,U+2648-2653,U+2660,U+2663,U+2665-2666,U+2668,U+267b,U+267e-267f,U+2695,U+269b-269c,U+26a0,U+26a7,U+26aa-26ab,U+26ce,U+26d4,U+2705,U+2714,U+2716,U+271d,U+2721,U+2733-2734,U+2747,U+274c,U+274e,U+2753-2755,U+2757,U+2764,U+2795-2797,U+27a1,U+27b0,U+27bf,U+2934-2935,U+2b05-2b07,U+2b1b-2b1c,U+2b55,U+3030,U+303d,U+3297,U+3299,U+fe0f,U+1f170-1f171,U+1f17e-1f17f,U+1f18e,U+1f191-1f19a,U+1f201-1f202,U+1f21a,U+1f22f,U+1f232-1f23a,U+1f250-1f251,U+1f310,U+1f3a6,U+1f3b5-1f3b6,U+1f3bc,U+1f3e7,U+1f441,U+1f499-1f49c,U+1f49f-1f4a0,U+1f4ac-1f4ad,U+1f4b1-1f4b2,U+1f4b9,U+1f4db,U+1f4f2-1f4f6,U+1f500-1f507,U+1f515,U+1f518-1f524,U+1f52f-1f53d,U+1f549,U+1f54e,U+1f5a4,U+1f5e8,U+1f5ef,U+1f6ab,U+1f6ad-1f6b1,U+1f6b3,U+1f6b7-1f6bc,U+1f6be,U+1f6c2-1f6c5,U+1f6d0-1f6d1,U+1f6d7,U+1f6dc,U+1f7e0-1f7eb,U+1f7f0,U+1f90d-1f90e,U+1f9d1-1f9d2,U+1f9e1,U+1fa75-1fa77,U+1faaf;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-3-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+200d,U+231a-231b,U+2328,U+23f0-23f3,U+2602,U+260e,U+2692,U+2694,U+2696-2697,U+2699,U+26b0-26b1,U+26cf,U+26d1,U+26d3,U+2702,U+2709,U+270f,U+2712,U+fe0f,U+1f302,U+1f321,U+1f392-1f393,U+1f3a9,U+1f3bd,U+1f3ee,U+1f3f7,U+1f3fa,U+1f451-1f462,U+1f484,U+1f489,U+1f48a,U+1f48c-1f48e,U+1f4a1,U+1f4a3,U+1f4a5,U+1f4b0,U+1f4b3-1f4b8,U+1f4bb-1f4da,U+1f4dc-1f4f1,U+1f4ff,U+1f508-1f514,U+1f516-1f517,U+1f526-1f529,U+1f52c-1f52e,U+1f550-1f567,U+1f56f-1f570,U+1f576,U+1f587,U+1f58a-1f58d,U+1f5a5,U+1f5a8,U+1f5b1-1f5b2,U+1f5c2-1f5c4,U+1f5d1-1f5d3,U+1f5dc-1f5de,U+1f5e1,U+1f5f3,U+1f6aa,U+1f6ac,U+1f6bd,U+1f6bf,U+1f6c1,U+1f6cb,U+1f6cd-1f6cf,U+1f6d2,U+1f6e0-1f6e1,U+1f6f0,U+1f97b-1f97f,U+1f9af,U+1f9ba,U+1f9e2-1f9e6,U+1f9ea-1f9ec,U+1f9ee-1f9f4,U+1f9f7-1f9ff,U+1fa71-1fa74,U+1fa79-1fa7b,U+1fa86,U+1fa8e-1fa8f,U+1fa91-1fa93,U+1fa96,U+1fa99-1faa0,U+1faa2-1faa7,U+1faaa-1faae;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-4-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+265f,U+26bd-26be,U+26f3,U+26f8,U+fe0f,U+1f004,U+1f0cf,U+1f380-1f384,U+1f386-1f38b,U+1f38d-1f391,U+1f396-1f397,U+1f399-1f39b,U+1f39e-1f39f,U+1f3a3-1f3a5,U+1f3a7-1f3a9,U+1f3ab-1f3b4,U+1f3b7-1f3bb,U+1f3bd,U+1f3c0,U+1f3c5-1f3c6,U+1f3c8-1f3c9,U+1f3cf-1f3d3,U+1f3f8-1f3f9,U+1f47e,U+1f4e2,U+1f4f7-1f4fd,U+1f52b,U+1f579,U+1f58c-1f58d,U+1f5bc,U+1f6f7,U+1f6f9,U+1f6fc,U+1f93f,U+1f941,U+1f945,U+1f947-1f94f,U+1f9e7-1f9e9,U+1f9f5-1f9f6,U+1fa70-1fa71,U+1fa80-1fa81,U+1fa83-1fa85,U+1fa87-1fa8a,U+1fa94-1fa95,U+1fa97-1fa98,U+1faa1,U+1faa9,U+1fadf;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-5-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+2693,U+26e9-26ea,U+26f1-26f2,U+26f4-26f5,U+26fa,U+26fd,U+2708,U+fe0f,U+1f301,U+1f303,U+1f306-1f307,U+1f309,U+1f310,U+1f3a0-1f3a2,U+1f3aa,U+1f3cd-1f3ce,U+1f3d5,U+1f3d7-1f3db,U+1f3df-1f3e6,U+1f3e8-1f3ed,U+1f3ef-1f3f0,U+1f488,U+1f492,U+1f4ba,U+1f54b-1f54d,U+1f5fa-1f5ff,U+1f680-1f6a2,U+1f6a4-1f6a8,U+1f6b2,U+1f6d1,U+1f6d5-1f6d6,U+1f6dd-1f6df,U+1f6e2-1f6e5,U+1f6e9,U+1f6eb-1f6ec,U+1f6f3-1f6f6,U+1f6f8,U+1f6fa-1f6fb,U+1f9bc-1f9bd,U+1f9ed,U+1f9f3,U+1fa7c;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-6-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+200d,U+2615,U+fe0f,U+1f32d-1f330,U+1f336,U+1f33d,U+1f344-1f37f,U+1f382,U+1f52a,U+1f7e9,U+1f7eb,U+1f942-1f944,U+1f950-1f96f,U+1f99e,U+1f9aa,U+1f9c0-1f9cb,U+1fad0-1fadc;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-7-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+200d,U+2600-2601,U+2603-2604,U+2614,U+2618,U+26a1,U+26c4-26c5,U+26c8,U+26f0,U+2728,U+2744,U+2b1b,U+2b50,U+fe0f,U+1f300,U+1f304-1f305,U+1f308,U+1f30a-1f30f,U+1f311-1f321,U+1f324-1f32c,U+1f331-1f335,U+1f337-1f33c,U+1f33e-1f344,U+1f3d4,U+1f3d6,U+1f3dc-1f3de,U+1f3f5,U+1f400-1f43f,U+1f490,U+1f4a7,U+1f4ae,U+1f525,U+1f54a,U+1f573,U+1f577-1f578,U+1f648-1f64a,U+1f6d8,U+1f940,U+1f980-1f9ae,U+1f9ba,U+1fa90,U+1faa8,U+1fab0-1fabf,U+1facd-1facf,U+1fae7;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-8-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+200d,U+2640,U+2642,U+2695-2696,U+26f7,U+26f9,U+2708,U+2764,U+27a1,U+fe0f,U+1f33e,U+1f373,U+1f37c,U+1f384-1f385,U+1f393,U+1f3a4,U+1f3a8,U+1f3c2-1f3c4,U+1f3c7,U+1f3ca-1f3cc,U+1f3eb,U+1f3ed,U+1f3fb-1f3ff,U+1f430,U+1f466-1f469,U+1f46b-1f478,U+1f47c,U+1f481-1f483,U+1f486-1f487,U+1f48b,U+1f48f,U+1f491,U+1f4bb-1f4bc,U+1f527,U+1f52c,U+1f574-1f575,U+1f645-1f647,U+1f64b,U+1f64d-1f64e,U+1f680,U+1f692,U+1f6a3,U+1f6b4-1f6b6,U+1f6c0,U+1f6cc,U+1f91d,U+1f926,U+1f930-1f931,U+1f934-1f93a,U+1f93c-1f93e,U+1f977,U+1f9af-1f9b3,U+1f9b8-1f9b9,U+1f9bc-1f9bd,U+1f9cc-1f9cf,U+1f9d1-1f9df,U+1fa70,U+1fa82,U+1fac3-1fac5,U+1fac8,U+1faef-1faf8;
}
@font-face {
  font-family: "Noto Emoji";
  src: url("/assets/fonts/noto-emoji-9-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+200d,U+2194-2195,U+2603,U+261d,U+2620,U+2639-263a,U+2665,U+26a1,U+26c4,U+270a-270d,U+2728,U+2763-2764,U+2b50,U+fe0f,U+1f31a-1f31f,U+1f32b,U+1f389-1f38a,U+1f3fb-1f3ff,U+1f440-1f450,U+1f463-1f465,U+1f479-1f47b,U+1f47d-1f480,U+1f485,U+1f48b-1f48c,U+1f493-1f49f,U+1f4a2,U+1f4a4-1f4a6,U+1f4a8-1f4ab,U+1f4af,U+1f525,U+1f573,U+1f590,U+1f595-1f596,U+1f5a4,U+1f5e3,U+1f600-1f644,U+1f648-1f64a,U+1f64c,U+1f64f,U+1f90c-1f925,U+1f927-1f92f,U+1f932-1f933,U+1f970-1f976,U+1f978-1f97a,U+1f9a0,U+1f9b4-1f9b7,U+1f9bb,U+1f9be-1f9bf,U+1f9d0,U+1f9e0-1f9e1,U+1fa75-1fa79,U+1fac0-1fac2,U+1fac6,U+1fae0-1faea,U+1faef-1faf8;
}

:root {
  --hue: 30;

  --hue-yellow: max(0, cos(calc((var(--hue) - 95) * 1deg)));
  --hue-cyan: max(0, cos(calc((var(--hue) - 200) * 1deg)));
  --hue-wash: max(var(--hue-yellow), var(--hue-cyan));
  --hue-wash-2: calc(var(--hue-wash) * var(--hue-wash));
  --hue-wash-4: calc(var(--hue-wash-2) * var(--hue-wash-2));
  --ink-l: calc(0.54 - 0.15 * var(--hue-wash-4));
  --ink-c: calc(0.2577 - 0.09 * var(--hue-wash-4));
  --paper: oklch(0.984 calc(0.012 + 0.016 * var(--hue-wash-2)) var(--hue));
  --surface: #fff;

  --ink: oklch(var(--ink-l) var(--ink-c) var(--hue));
  --ink-contrast: #fff;
  --accent: var(--ink);
  --muted: var(--ink);
  --focus: #000;

  --font-body: "Alte Haas Grotesk", Helvetica, Arial, sans-serif,
    "Noto Emoji", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --font-mono: monospace;
  --size-base: 16px;
  --size-ui: 12px;
  --size-title: 20px;
  --size-display: 28px;
  /* A long title shrinks to fit one line, no smaller than the first size;
     one that still cannot fit wraps at the second. */
  --size-title-min: 18px;
  --size-title-wrap: 22px;
  /* Rail wordmark: the largest size that sets REMILIA CORPORATION on one
     line in the rail box, 211px once the scrollbar gutter is taken
     (20px runs to 237px, 18px to 213px). */
  --size-brand: 17px;
  --weight-body: normal;
  --weight-strong: bold;

  /* The text's line is this less a gutter each side: 574px, about 80
     characters of 16px text. Narrower frames set their own
     (blog/layout.css). */
  --measure: 624px;
  --gutter: 24px;
  --rail-gap: 12px;
  --rail: 240px;
  --toc-rail: 240px;
  --space-xs: 8px;
  --space-s: 16px;
  --space: 24px;
  --space-l: 32px;

  --dot-size: 2px;
  --dot-gap: 8px;
  --dot-ox: 3px;
  --dot-oy: 2px;
  --rose-size: 240px;
  --rose-gap: 48px;
  --rose-rot: 45deg;
  --rose-opacity: 0.85;
  --rose-contrast: 1;
  --rose-saturate: 1;
  --rose-brightness: 1;
  --rose-invert: 0;
  --rose-blend: normal;
  --rose-period: calc(var(--rose-size) + var(--rose-gap));

  --dither-cell: 2px;
  --dither-dark: oklch(
    0.16 calc(0.05 + 0.02 * (1 - var(--hue-wash-2))) var(--hue)
  );
  --dither-mid: oklch(0.88 calc(0.07 + 0.03 * var(--hue-wash-2)) var(--hue));
  --dither-light: oklch(0.995 0.004 var(--hue));
  --dither-hover: 0.7;
  --dither-filter: url(#dither-3);
  --dither-hover-filter: url(#dither-hover);

  --swatch-30: oklch(0.63 0.26 30);
  --swatch-95: oklch(0.72 0.16 95);
  --swatch-145: oklch(0.58 0.2 145);
  --swatch-255: oklch(0.5 0.22 255);
  --swatch-330: oklch(0.58 0.24 330);
  --wm-fill: #000;
}

html {
  color-scheme: light;
}
html:has(#theme-hue-30:checked),
html[data-hue="30"] {
  --hue: 30;
}
html:has(#theme-hue-95:checked),
html[data-hue="95"] {
  --hue: 95;
}
html:has(#theme-hue-145:checked),
html[data-hue="145"] {
  --hue: 145;
}
html:has(#theme-hue-255:checked),
html[data-hue="255"] {
  --hue: 255;
}
html:has(#theme-hue-330:checked),
html[data-hue="330"] {
  --hue: 330;
}
html:has(#theme-dots-none:checked),
html[data-dots="none"] {
  --dot-size: 0px;
  --dot-gap: 8px;
  --dot-ox: 0px;
  --dot-oy: 0px;
}
html:has(#theme-dots-small:checked),
html[data-dots="small"] {
  --dot-size: 1px;
  --dot-gap: 4px;
  --dot-ox: 0px;
  --dot-oy: 0px;
}
html:has(#theme-dots-large:checked),
html[data-dots="large"] {
  --dot-size: 2px;
  --dot-gap: 8px;
  --dot-ox: 3px;
  --dot-oy: 2px;
}
html:has(#theme-dots-none:checked) .wm::before,
html[data-dots="none"] .wm::before {
  content: none;
  display: none;
}

html:has(#theme-dark:checked),
html[data-scheme="dark"] {
  color-scheme: dark;
  --ink-l: calc(0.68 + 0.06 * var(--hue-wash-4));
  --ink-c: calc(0.11 - 0.03 * var(--hue-wash-4));
  --paper: oklch(0.15 calc(0.01 + 0.006 * var(--hue-wash-2)) var(--hue));
  --surface: oklch(0.19 calc(0.007 + 0.005 * var(--hue-wash-2)) var(--hue));
  --ink-contrast: oklch(0.13 0.008 var(--hue));
  --focus: #fff;
  --dither-filter: url(#dither-3-dark);
}
@media (prefers-color-scheme: dark) {
  html:not([data-scheme="light"]) {
    color-scheme: dark;
    --ink-l: calc(0.68 + 0.06 * var(--hue-wash-4));
    --ink-c: calc(0.11 - 0.03 * var(--hue-wash-4));
    --paper: oklch(0.15 calc(0.01 + 0.006 * var(--hue-wash-2)) var(--hue));
    --surface: oklch(0.19 calc(0.007 + 0.005 * var(--hue-wash-2)) var(--hue));
    --ink-contrast: oklch(0.13 0.008 var(--hue));
    --focus: #fff;
    --dither-filter: url(#dither-3-dark);
  }
}

body {
  position: relative;
}
.layout,
footer {
  position: relative;
  z-index: 1;
}
/* A dropdown can hang past the end of a short page; it stays above the footer. */
.layout {
  z-index: 2;
}
.wm {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  color: var(--ink);
  background: color-mix(in oklch, var(--ink) 10%, var(--paper));
}
.wm::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background-image: radial-gradient(
    circle at calc(var(--dot-size) / 2) calc(var(--dot-size) / 2),
    var(--paper) calc(var(--dot-size) / 2),
    transparent calc(var(--dot-size) / 2 + 0.4px)
  );
  background-size: var(--dot-gap) var(--dot-gap);
  background-repeat: repeat;
  background-position: calc(50% - var(--measure) / 2 + var(--dot-ox))
    var(--dot-oy);
  background-attachment: fixed;
}
.wm-field {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 300%;
  height: 300%;
  overflow: visible;
  transform: translate(-50%, -50%) rotate(var(--rose-rot));
  transform-origin: center;
  color: transparent;
  opacity: var(--rose-opacity);
  mix-blend-mode: var(--rose-blend);
  filter: invert(var(--rose-invert)) contrast(var(--rose-contrast))
    saturate(var(--rose-saturate)) brightness(var(--rose-brightness));
}
.wm-tile {
  fill: var(--wm-fill);
}
#wm-pat {
  width: var(--rose-period);
  height: var(--rose-period);
}
#wm-pat image {
  width: var(--rose-size);
  height: var(--rose-size);
}
html:has(#theme-dark:checked) .wm,
html[data-scheme="dark"] .wm {
  background: color-mix(in oklch, var(--paper) 88%, var(--ink));
}
@media (prefers-color-scheme: dark) {
  html:not([data-scheme="light"]) .wm {
    background: color-mix(in oklch, var(--paper) 88%, var(--ink));
  }
}

@media (prefers-contrast: more) {
  :root {
    --paper: #fff;
    --surface: #fff;
    --ink: oklch(0.4 calc(0.18 - 0.05 * var(--hue-wash-4)) var(--hue));
    --accent: var(--ink);
    --muted: var(--ink);
  }
  .wm-field {
    opacity: 1;
  }
  html:has(#theme-dark:checked),
  html[data-scheme="dark"] {
    --paper: #000;
    --surface: #111;
    --ink: oklch(0.82 calc(0.16 - 0.04 * var(--hue-wash-4)) var(--hue));
    --ink-contrast: #000;
    --accent: var(--ink);
    --muted: var(--ink);
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  html:not([data-scheme="light"]) {
    --paper: #000;
    --surface: #111;
    --ink: oklch(0.82 calc(0.16 - 0.04 * var(--hue-wash-4)) var(--hue));
    --ink-contrast: #000;
    --accent: var(--ink);
    --muted: var(--ink);
  }
}

/* blog/base — tokens, reset, page shell, shared primitives (.sec, .nav-rule, .disclosure) */

:root {
  /* Layout tokens owned by blog-core; the skin (colors, fonts, spacing
     scale, dither) is defined once in theme.css. */
  --grid: 4px;
  --leading: 1.3334;
  /* A length, not a ratio, so every line of post text is a whole number
     of grid steps. */
  --leading-prose: 24px;
  --leading-tight: 1.2;

  --card: 280px;
  --size-root: 16px;
  --track-caps: 0.03em;
  --border-w: 1px;
  --border: var(--border-w) solid var(--ink);
  --radius: 0;
  --mast-line: 16px;
  --mast-title: 24px;
  --toc-spy: 24vh;

  /* Room around the reading text: a post's prose box and a listing's
     cards. The text keeps the measure, so the column widens by whatever
     the room adds over the base gutter. The breakpoints in layout.css
     give it more where the viewport has space to spare. */
  --read-pad: var(--space-l);
  --read-pad-y: var(--space-l);
  --column: calc(var(--measure) + 2 * (var(--read-pad) - var(--gutter)));

  --mast-box: calc(
    3 * var(--border-w) + 4 * var(--space-xs) + var(--mast-line) +
      var(--mast-title)
  );
}
@property --hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 30;
}
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: var(--size-base);
  line-height: var(--leading);
  color: var(--ink);
  font-weight: var(--weight-body);
  font-variant-emoji: text;
}
html {
  font-size: var(--size-root);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
}
::selection {
  background: var(--ink);
  color: var(--ink-contrast);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
}
::-webkit-scrollbar {
  width: var(--grid);
  height: var(--grid);
}
::-webkit-scrollbar-thumb {
  background: var(--ink);
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}
body {
  background: var(--paper);
  min-height: 100%;
}
html {
  overflow-x: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
a {
  color: var(--accent);
  text-decoration: underline;
}
a:hover {
  background: var(--ink);
  color: var(--ink-contrast);
  text-decoration: none;
}
a:hover,
a:hover *,
a:hover::before,
a:hover::after {
  color: var(--ink-contrast);
  text-decoration: none;
}
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: var(--grid);
}
strong {
  font-weight: var(--weight-strong);
}
em,
i {
  font-style: italic;
}
.left-rail,
.right-rail,
.phone-tail {
  --size-base: var(--size-ui);
}
.layout {
  margin: 0;
}
.article-wrap {
  display: flex;
  flex-direction: column;
}
.article-body {
  order: 1;
  display: flex;
  flex-direction: column;
  gap: var(--rail-gap);
  row-gap: var(--rail-gap);
  width: var(--column);
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  overflow: visible;
  position: relative;
}
.article-body > .sec {
  margin: 0;
}
.sec {
  position: relative;
  overflow: visible;
  margin: 0;
  min-height: 0;
  padding: var(--space) var(--gutter);
  background: var(--surface);
  border: var(--border);
}
.article-rest > .sec:has(> .prose),
.article-rest > .post-card {
  padding: var(--read-pad-y) var(--read-pad);
}
.sec::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--surface);
  z-index: -1;
  pointer-events: none;
}
.rail-col {
  order: 2;
}
.disclosure {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.disclosure-label {
  display: block;
  cursor: pointer;
  font-weight: var(--weight-strong);
  padding: var(--space-xs) 0;
}
.disclosure-label:hover {
  background: var(--ink);
  color: var(--ink-contrast);
}
.disclosure-label::before {
  content: "\25B8 ";
}
.disclosure:checked ~ .disclosure-label::before {
  content: "\25BE ";
}
.nav-rule {
  border: 0;
  border-top: var(--border);
  height: 0;
  margin: var(--space-xs) 0;
}
.layout {
  display: flex;
  flex-direction: column;
  gap: var(--rail-gap);
  width: min(
    var(--column),
    round(
      down,
      calc(
        100% - 2 * var(--rail-gap) - env(safe-area-inset-left, 0px) -
          env(safe-area-inset-right, 0px)
      ),
      8px
    )
  );
  max-width: 100%;
  margin: max(var(--rail-gap), env(safe-area-inset-top, 0px)) auto 0;
  padding: 0;
}
.side-col,
.left-rail,
.right-rail {
  display: contents;
}
.left-stack {
  display: contents;
}
.left-rail .left-stack:not(:has(> *)) {
  display: none;
}
.article-wrap {
  order: 5;
}
.article-body > .sec {
  z-index: 1;
}
@media (forced-colors: active) {
  * {
    border-color: CanvasText;
  }
}

/* blog/chrome — site-head, footer, cite box, skip link */

.site-head {
  max-width: var(--column);
  margin: 0 auto;
  padding: var(--space) 0 var(--space-s);
}
.site-head .site-title {
  display: block;
  text-decoration: none;
  font-weight: var(--weight-strong);
  text-align: center;
  margin: 0 0 var(--space-xs);
}
.site-head nav a {
  text-decoration: none;
}
.site-head .site-title:hover,
.site-head a:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
.head-dials {
  display: none;
}
/* The phone head's menu and search button; wider heads spell the
   sections out and keep the search in the rail. */
.head-menu,
.head-search {
  display: none;
}
.head-menu > summary {
  border: var(--border);
  text-transform: uppercase;
}
.head-menu > summary .sel-label {
  font-weight: var(--weight-strong);
}
.head-menu .sel-menu {
  left: auto;
  right: calc(-1 * (var(--grid) + var(--border-w)));
  text-align: left;
}
.head-menu .sel-menu a,
.head-menu .sel-menu label {
  display: block;
  padding: var(--grid) var(--space-xs);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.head-menu .sel-menu a:hover,
.head-menu .sel-menu a:focus-visible,
.head-menu .sel-menu label:hover {
  background: var(--ink);
  color: var(--ink-contrast);
}
.head-menu .sel-menu a[aria-current] {
  font-weight: var(--weight-strong);
}
.head-dials label {
  cursor: pointer;
}
.left-rail .site-head {
  max-width: var(--rail);
  width: 100%;
  margin: 0;
  padding: var(--space-xs);
  text-align: center;
  border: var(--border);
  background: var(--surface);
  display: grid;
  /* Same rows as the article mast and the theme box — link row, rule,
     brand — packed to the top so the three rules line up in one row. */
  grid-template-rows: minmax(var(--mast-line), auto) var(--border-w) auto;
  align-content: start;
  row-gap: var(--space-xs);
}
.left-rail .site-head .site-title {
  text-align: inherit;
  margin: 0;
  font-size: var(--size-brand);
  line-height: var(--mast-title);
  text-transform: uppercase;
  white-space: nowrap;
  height: auto;
  min-height: var(--mast-title);
  overflow: visible;
}
.left-rail .site-head .nav-rule {
  margin: 0;
  height: 0;
  align-self: center;
}
.left-rail .site-head nav {
  display: block;
  flex-wrap: wrap;
  white-space: normal;
  text-align: center;
  margin: 0;
  line-height: var(--mast-line);
  height: auto;
  min-height: var(--mast-line);
}
.site-head nav a[aria-current] {
  background: var(--ink);
  color: var(--ink-contrast);
}
.left-rail .site-head {
  order: 1;
}
.left-rail .cite-box {
  order: 4;
}
.cite-box {
  display: block;
}
.cite-box button {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.cite-box button:hover,
.cite-box button:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
footer {
  max-width: var(--column);
  width: min(
    var(--column),
    calc(
      100% - 2 * var(--rail-gap) - env(safe-area-inset-left, 0px) -
        env(safe-area-inset-right, 0px)
    )
  );
  margin: var(--rail-gap) auto
    max(var(--space-l), env(safe-area-inset-bottom, 0px));
  padding: var(--space-xs);
  background: var(--surface);
  border: var(--border);
  position: relative;
  isolation: isolate;
  z-index: 1;
  /* Chrome, not prose: the UI size like the rail boxes. Set as the token
     because the universal rule sizes every element from it. */
  --size-base: var(--size-ui);
}
footer hr {
  display: none;
}
/* The head's feed and theme links, which phones show under the posts. */
.foot-feeds {
  display: none;
}
.foot-theme-btn {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: var(--mast-line);
  cursor: pointer;
}
.foot-theme-btn:hover,
.foot-theme-btn:focus-visible,
.foot-theme-btn[aria-expanded="true"] {
  background: var(--ink);
  color: var(--ink-contrast);
}
footer p {
  text-align: center;
}
/* The chrome boxes' line box, so the footer is --space-xs around one
   16px row like the rail boxes. The links set it too: the universal
   rule gives every element the body leading, which would reopen the
   line. */
footer p,
footer p a {
  line-height: var(--mast-line);
}
footer a {
  text-decoration: none;
}
footer a:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
.skip {
  position: absolute;
  left: var(--space-xs);
  top: -100px;
  z-index: 10000;
  padding: var(--space-xs);
  background: var(--surface);
  color: var(--ink);
}
.skip:focus {
  top: 8px;
}

/* blog/controls — the theme selector: hues, lattice, dark mode, invert, tooltips */

.theme-sel {
  max-width: var(--rail);
  width: 100%;
  margin: 0;
  padding: var(--space-xs);
  text-align: center;
  border: var(--border);
  background: var(--surface);
  display: grid;
  grid-template-rows: var(--mast-line) var(--border-w) var(--mast-title);
  align-content: start;
  row-gap: var(--space-xs);
}
.theme-label {
  margin: 0;
  height: var(--mast-line);
  line-height: var(--mast-line);
  font-weight: var(--weight-strong);
  text-transform: uppercase;
  overflow: hidden;
}
.theme-sel .nav-rule {
  margin: 0;
  height: 0;
  align-self: center;
}
.theme-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--grid);
  height: var(--mast-title);
  min-width: 0;
}
.theme-hues {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  height: var(--mast-title);
  flex: 0 0 auto;
}
/* The inputs are unseen and their labels take the clicks. An input still
   sits somewhere in the row (the dark-mode one lay on the center of the
   magenta swatch), so it takes no pointer events itself. */
.theme-hues input,
.theme-dots input,
.theme-dark {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.theme-hues label,
.theme-dots label,
.theme-mode {
  flex: none;
  width: var(--mast-line);
  height: var(--mast-line);
  border: var(--border);
  cursor: pointer;
  position: relative;
  background: var(--surface);
}
.theme-dots {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  height: var(--mast-title);
  flex: 0 0 auto;
}
.theme-hues label[for="theme-hue-30"] {
  background: var(--swatch-30);
}
.theme-hues label[for="theme-hue-95"] {
  background: var(--swatch-95);
}
.theme-hues label[for="theme-hue-145"] {
  background: var(--swatch-145);
}
.theme-hues label[for="theme-hue-255"] {
  background: var(--swatch-255);
}
.theme-hues label[for="theme-hue-330"] {
  background: var(--swatch-330);
}
.theme-hues input:checked + label,
.theme-dots input:checked + label {
  box-shadow:
    0 0 0 1px var(--surface),
    0 0 0 2px var(--ink);
}
.theme-hues input:focus-visible + label,
.theme-dots input:focus-visible + label,
.theme-dark:focus-visible + .theme-mode {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.theme-dot-none {
  background: var(--surface);
}
.theme-dot-none::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  height: var(--border-w);
  background: var(--ink);
  transform: translateY(-50%) rotate(-45deg);
}
.theme-dot-small {
  background-color: color-mix(in oklch, var(--ink) 10%, var(--paper));
  background-image: radial-gradient(
    circle at 0.5px 0.5px,
    var(--paper) 0.5px,
    transparent 0.51px
  );
  background-size: 4px 4px;
}
.theme-dot-large {
  background-color: color-mix(in oklch, var(--ink) 10%, var(--paper));
  background-image: radial-gradient(
    circle at 1px 1px,
    var(--paper) 1px,
    transparent 1.1px
  );
  background-size: 8px 8px;
}
.theme-div {
  flex: none;
  width: var(--border-w);
  height: var(--mast-line);
  background: var(--ink);
}
.theme-mode::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--ink);
}
html:has(#theme-dark:checked) .theme-mode,
html[data-scheme="dark"] .theme-mode {
  background: var(--ink);
}
html:has(#theme-dark:checked) .theme-mode::after,
html[data-scheme="dark"] .theme-mode::after {
  background: var(--ink-contrast);
}
.theme-controls [data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + var(--grid));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 0 var(--grid);
  background: var(--ink);
  color: var(--ink-contrast);
  line-height: var(--mast-line);
  white-space: nowrap;
  pointer-events: none;
  display: none;
}
.theme-controls [data-tip]:hover::before,
.theme-controls [data-tip]:focus-visible::before {
  display: block;
}
@supports (anchor-name: --x) {
  .theme-controls [data-tip]:hover {
    anchor-name: --tip;
  }
  .theme-controls [data-tip]::before {
    position: fixed;
    position-anchor: --tip;
    top: calc(anchor(bottom) + var(--grid));
    left: anchor(center);
    transform: translateX(-50%);
  }
}
@media (prefers-color-scheme: dark) {
  html:not([data-scheme="light"]) .theme-mode {
    background: var(--ink);
  }
  html:not([data-scheme="light"]) .theme-mode::after {
    background: var(--ink-contrast);
  }
}
.left-rail .site-head,
.left-rail .toc,
.left-rail .cite-box,
.right-rail .theme-sel,
.right-rail .post-nav,
.article-wrap {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}


/* blog/index — mastheads, bylines, tools rows, index cards, term lists, pagers */

.sec.mast {
  padding: var(--space-xs);
  --size-base: var(--size-ui);
}
/* base.css clamps .article-body > .sec to level 1, and the cards raise their
   own links to 2 — the mast has to outrank them so an open dropdown covers
   the card list instead of being painted through by it. */
.article-body > .sec.mast {
  z-index: 5;
}
.sec.mast > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--mast-line) var(--border-w) auto var(--border-w) var(
      --mast-line
    );
  row-gap: var(--space-xs);
  margin: 0;
  width: 100%;
}
.sec.mast .byline {
  margin: 0;
  height: var(--mast-line);
  line-height: var(--mast-line);
  overflow: visible;
  min-width: 0;
}
.sec.mast .nav-rule {
  margin: 0;
  height: 0;
  align-self: center;
}
.sec.mast h1 {
  margin: 0;
  height: auto;
  min-height: var(--mast-title);
  font-size: var(--size-title);
  line-height: var(--leading-tight);
  font-weight: var(--weight-strong);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  overflow: visible;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.mast-tools {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: var(--grid);
  margin: 0;
  height: var(--mast-line);
  line-height: var(--mast-line);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.mast-tools .mast-toc,
.mast-tools button {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.mast-tools .mast-read {
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.mast-tools > :first-child > .nav-sep:first-child {
  display: none;
}
/* The pager is a chrome row like the mast's tools: it sets at the UI size. */
.pager {
  --size-base: var(--size-ui);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  padding: var(--space-xs);
  text-transform: uppercase;
}
.pager[hidden] {
  display: none;
}
.pager .pager-prev {
  justify-self: start;
}
.pager .pager-at {
  justify-self: center;
  color: var(--muted);
}
.pager .pager-next {
  justify-self: end;
}
.pager a {
  font-weight: var(--weight-strong);
  text-decoration: none;
}
.pager a:hover {
  background: var(--ink);
  color: var(--ink-contrast);
}
.term-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.term-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xs);
  border-bottom: var(--border);
  padding: var(--grid) 0;
}
.term-list .term-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mast-tools .mast-toc:hover,
.mast-tools button:hover,
.mast-tools button:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
.sec > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
}
.sec > header .byline {
  width: 100%;
  margin: 0 0 var(--space-xs);
}
.sec > header h1 {
  width: 100%;
  font-size: var(--size-title);
  line-height: var(--leading-tight);
  font-weight: var(--weight-strong);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  margin: 0;
}
.byline,
.sec > header address {
  color: var(--muted);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  font-style: normal;
  white-space: nowrap;
}
.byline time,
.byline .byline-date {
  justify-self: start;
  text-align: left;
  font-style: normal;
  color: var(--muted);
  text-transform: uppercase;
  text-decoration: none;
}
.byline .byline-date:hover,
.byline .byline-date:hover time,
.byline .byline-date:focus-visible,
.byline .byline-date:focus-visible time,
.byline .author:hover,
.byline .author:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
  text-decoration: none;
}
.byline .permalink {
  display: none;
}
.byline .byline-cat {
  justify-self: center;
  text-align: center;
  font-weight: var(--weight-strong);
  color: var(--muted);
  text-transform: uppercase;
  text-decoration: none;
}
.byline .byline-cat:hover,
.byline .byline-cat:focus-visible,
.byline .byline-cat:hover *,
.byline .byline-cat:focus-visible * {
  background: var(--ink);
  color: var(--ink-contrast);
  text-decoration: none;
}
.byline .author,
.byline address {
  justify-self: end;
  text-align: right;
  font-style: normal;
  color: var(--muted);
  text-transform: none;
  text-decoration: none;
}
.sec > header > p:empty {
  display: none;
}
.byline-rule {
  border: 0;
  border-top: var(--border);
  height: 0;
  margin: 0 0 var(--space-xs);
}
.sec.mast > header .byline,
.sec.mast > header h1,
.sec.mast > header .nav-rule {
  margin: 0;
}
.sec.mast.index-mast {
  min-height: var(--mast-box);
}
.sec.mast.index-mast > header {
  grid-template-rows: var(--mast-line) var(--border-w) var(--mast-title);
  align-content: start;
  height: 100%;
}
/* A listing's masthead is one line that says what the page lists, set
   like the wordmark in the site head beside it. A long one wraps. */
.sec.mast.index-mast h1 {
  font-size: var(--size-brand);
  line-height: var(--mast-title);
  min-height: var(--mast-title);
  height: auto;
  text-align: center;
  text-wrap: balance;
}
.sec.list-empty {
  padding: var(--space-xs);
  margin: 0 0 var(--rail-gap);
  text-align: center;
  --size-base: var(--size-ui);
}
.sec.list-empty[hidden] {
  display: none;
}
.list-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}
.list-clear:hover,
.list-clear:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
  text-decoration: none;
}
.index-mast .mast-tools {
  display: flex;
  height: auto;
  align-items: center;
  gap: var(--space-xs);
  white-space: normal;
}
.index-mast .mast-tools-rule {
  display: block;
}
.post-card {
  position: relative;
  margin: 0 0 var(--rail-gap);
}
article.post-card > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* The meta row sizes to its body leading so descenders clear the rule. */
  grid-template-rows: auto var(--border-w) auto;
  row-gap: var(--grid);
  margin: 0 0 var(--space-xs);
  width: 100%;
}
.post-card > header .nav-rule {
  margin: 0;
  align-self: center;
}
/* The card's pointer target: an overlay link under the raised links, so
   hovering the title or image is distinguishable from hovering the card.
   Skipped by the keyboard and assistive tech; the title is the post link. */
.post-card .card-hit {
  position: absolute;
  inset: 0;
  background: none;
}
.post-card h2 a,
.post-card .card-thumb,
.post-card .card-meta .byline-date,
.post-card .card-meta .author,
.post-card .byline-cat,
.post-card .card-more {
  position: relative;
  z-index: 2;
}
/* The card's meta and foot rows are the post byline in miniature, so they
   set at the byline's UI size, not the body size of the excerpt. */
.post-card .card-meta,
.post-card p.card-foot {
  --size-base: var(--size-ui);
}
.post-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--grid);
  margin: 0;
  width: 100%;
  color: var(--muted);
  line-height: var(--leading);
}
.post-card .card-meta .author {
  text-align: right;
  text-decoration: none;
}
.post-card .card-meta time,
.post-card .card-meta .byline-date,
.post-card .card-meta .author {
  color: var(--muted);
}
.post-card .card-meta .byline-date {
  text-decoration: none;
}
.post-card .card-meta a.byline-date time {
  color: inherit;
}
.post-card .card-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-s);
  align-items: start;
}
.post-card:has(.card-thumb) .card-row {
  grid-template-columns: calc(40 * var(--grid)) minmax(0, 1fr);
}
.post-card .card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: var(--border);
  background: var(--dither-light);
  text-decoration: none;
}
.post-card h2 {
  margin: 0;
  width: 100%;
  font-size: var(--size-title);
  line-height: var(--leading-tight);
  font-weight: var(--weight-strong);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
}
.post-card h2 a {
  text-decoration: none;
  font: inherit;
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.post-card .card-ex {
  margin: 0;
  line-height: var(--leading-prose);
}
.post-card p.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--grid);
  /* Ruled off like the meta row: the rule sits one --grid from the text. */
  margin: var(--space-xs) 0 0;
  padding: var(--grid) 0 0;
  border-top: var(--border);
  width: 100%;
}
.post-card .card-foot .byline-cat {
  font-weight: var(--weight-strong);
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.post-card .card-more {
  margin: 0;
  text-align: right;
  text-decoration: none;
}
/* Keyboard focus inverts the card like a pointer does. :focus-within would
   also match the link a mouse click leaves focused, so the card would stay
   inverted after the pointer moves on. */
.post-card:hover,
.post-card:has(:focus-visible) {
  background: var(--ink);
  color: var(--ink-contrast);
}
.post-card:hover h2,
.post-card:hover .card-ex,
.post-card:hover .card-meta,
.post-card:hover .card-meta time,
.post-card:hover .card-meta .byline-date,
.post-card:hover .card-meta .author,
.post-card:hover .card-foot .byline-cat,
.post-card:hover .card-more,
.post-card:has(:focus-visible) h2,
.post-card:has(:focus-visible) .card-ex,
.post-card:has(:focus-visible) .card-meta,
.post-card:has(:focus-visible) .card-meta time,
.post-card:has(:focus-visible) .card-meta .byline-date,
.post-card:has(:focus-visible) .card-meta .author,
.post-card:has(:focus-visible) .card-foot .byline-cat,
.post-card:has(:focus-visible) .card-more {
  color: var(--ink-contrast);
}
.post-card:hover > header .nav-rule,
.post-card:hover .card-thumb,
.post-card:hover p.card-foot,
.post-card:has(:focus-visible) > header .nav-rule,
.post-card:has(:focus-visible) .card-thumb,
.post-card:has(:focus-visible) p.card-foot {
  border-color: var(--ink-contrast);
}
.post-card a:focus-visible {
  outline-color: var(--ink-contrast);
}
/* Inner links sit above the card overlay and invert again against the
   inverted card, as chrome links do against the page. */
.post-card h2 a:hover,
.post-card h2 a:focus-visible,
.post-card .card-meta a.byline-date:hover,
.post-card .card-meta a.byline-date:focus-visible,
.post-card .card-meta a.author:hover,
.post-card .card-meta a.author:focus-visible,
.post-card .card-foot a.byline-cat:hover,
.post-card .card-foot a.byline-cat:focus-visible,
.post-card .card-foot a.card-more:hover,
.post-card .card-foot a.card-more:focus-visible {
  background: var(--ink-contrast);
  color: var(--ink);
}
.post-card[hidden] {
  display: none;
}
.post-list {
  list-style: none;
}
.post-list li {
  margin: 0 0 var(--space);
}
.post-list h2 {
  display: inline;
  font-size: var(--size-base);
  font-weight: var(--weight-strong);
}
.post-list time {
  margin-left: var(--space-xs);
  color: var(--muted);
}
.post-list p {
  margin: var(--grid) 0 0;
  line-height: var(--leading-prose);
}
.interlink.card-open .link-card {
  display: block;
}

/* blog/nav — search, filters, post lists, ToC, link cards */

.post-nav {
  padding: var(--space);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--rail-gap);
}
.post-nav > .nav-box {
  display: none;
}
.post-nav > .disclosure:checked ~ .nav-box {
  display: block;
}
.nav-box {
  border: var(--border);
  background: var(--surface);
  padding: var(--space-xs);
  text-align: left;
  width: 100%;
  max-width: var(--rail);
  margin: 0 auto 0 0;
}
.nav-search {
  margin: 0;
}
.nav-label {
  flex: none;
  white-space: nowrap;
  text-align: left;
}
.nav-field {
  position: relative;
  min-width: 0;
  width: 100%;
  border: var(--border);
  background: var(--surface);
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--grid);
  padding: 0 var(--space-xs);
}
.sel {
  position: relative;
}
.nav-search-icon {
  flex: none;
  color: var(--ink);
  display: block;
}
.nav-field input {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: var(--grid) 0;
  text-align: left;
  outline: none;
}
.nav-field input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.sel > summary {
  display: flex;
  align-items: center;
  gap: var(--grid);
  list-style: none;
  cursor: pointer;
  padding: var(--grid) var(--grid) var(--grid) var(--space-xs);
  text-align: left;
  background: var(--surface);
  color: var(--ink);
}
.sel > summary:hover,
.sel > summary:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
.sel-label {
  flex: 1;
  min-width: 0;
  text-align: left;
  color: inherit;
}
/* The caret takes its summary's colour, so it inverts with the row. */
.sel-mark {
  flex: none;
  width: 12px;
  text-align: center;
  line-height: 1;
  color: inherit;
}
.sel-mark::before {
  content: "\25BE";
  color: inherit;
}
#post-cat[data-value]:not([data-value=""]) > summary {
  background: var(--ink);
  color: var(--ink-contrast);
}
#post-cat[data-value]:not([data-value=""]) .sel-mark::before {
  content: "\00D7";
}
#post-cat[data-value]:not([data-value=""]):hover > summary {
  background: var(--surface);
  color: var(--ink);
}
.sel > summary::-webkit-details-marker,
.sel > summary::marker {
  display: none;
  content: none;
}
.sel[open] {
  z-index: 21;
}
.sel-menu {
  position: absolute;
  /* Outset from the control's box so the menu reads as a layer around it. */
  left: calc(-1 * (var(--grid) + var(--border-w)));
  right: auto;
  top: calc(100% + var(--border-w));
  /* Size to the longest item, never narrower than the outset control. */
  width: max-content;
  min-width: calc(100% + 2 * (var(--grid) + var(--border-w)));
  max-width: var(--rail);
  z-index: 20;
  margin: 0;
  list-style: none;
  border: var(--border);
  background: var(--surface);
  text-align: left;
}
.sel-menu button {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  padding: var(--grid) var(--space-xs);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.sel-menu li + li {
  border-top: var(--border);
}
.sel-menu button:hover,
.sel-menu button:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
/* Keyboard focus inverts a dropdown row as hover does and adds the site's
   ring, drawn inside the inverted row in the contrast colour so it neither
   spills over the neighbouring rows nor vanishes against the menu. */
.sel > summary:focus-visible,
.sel-menu button:focus-visible,
.sel-year > details > summary:focus-visible {
  outline: 2px solid var(--ink-contrast);
  outline-offset: calc(-1 * var(--grid));
}
.sel-menu button[aria-current] {
  font-weight: var(--weight-strong);
}
/* An older year in the date menu: a row that expands in place, its months
   indented beneath it. */
.sel-year > details > summary {
  display: flex;
  align-items: center;
  gap: var(--grid);
  list-style: none;
  cursor: pointer;
  padding: var(--grid) var(--space-xs);
  white-space: nowrap;
  background: var(--surface);
  color: var(--ink);
}
.sel-year > details > summary::-webkit-details-marker,
.sel-year > details > summary::marker {
  display: none;
  content: none;
}
.sel-year > details > summary:hover,
.sel-year > details > summary:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
.sel-year > details:not([open]) .sel-mark::before {
  content: "\25B8";
}
.sel-sub {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--border);
}
.sel-sub button {
  padding-left: var(--space);
}
.nav-all {
  list-style: none;
  min-height: calc(4 * (2 * var(--leading-tight) + var(--grid)));
}
.nav-all li {
  margin: 0 0 var(--grid);
  line-height: var(--leading-tight);
  min-height: calc(2 * var(--leading-tight));
}
.nav-all li:last-child {
  margin: 0;
}
.nav-all li > a {
  display: block;
  min-width: 0;
  text-decoration: none;
  font-weight: var(--weight-strong);
  overflow-wrap: break-word;
  text-wrap: wrap;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.nav-all li a:hover {
  text-decoration: none;
}
.nav-all li a:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
.nav-all li a:hover .nav-meta,
.nav-all li a:hover .nav-meta time,
.nav-all li a:hover .nav-cat {
  color: var(--ink-contrast);
}
.nav-all li a[aria-current] {
  background: var(--ink);
  color: var(--ink-contrast);
}
.nav-all li a[aria-current] .nav-meta,
.nav-all li a[aria-current] .nav-meta time,
.nav-all li a[aria-current] .nav-cat {
  color: var(--ink-contrast);
}
.nav-meta {
  display: block;
  font-style: normal;
  color: var(--muted);
  text-align: left;
  width: 100%;
}
.nav-meta time,
.nav-meta .nav-cat {
  font-style: normal;
  color: var(--muted);
}
.nav-meta .nav-date {
  color: var(--muted);
  text-decoration: none;
}
.nav-meta .nav-date time {
  color: inherit;
}
.nav-meta .nav-date:hover,
.nav-meta .nav-date:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
.nav-cat {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  text-decoration: none;
  font-style: normal;
}
.nav-all > li.off-page {
  display: none;
}
.nav-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--grid);
  margin: var(--space-xs) 0 0;
  background: var(--surface);
}
.nav-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--grid);
  margin: 0;
}
.nav-pager button {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.nav-pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.nav-pager button:not(:disabled):hover,
.nav-pager button:focus-visible {
  background: var(--ink);
  color: var(--ink-contrast);
}
.nav-page {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--grid);
  margin: calc(-1 * var(--space-xs)) calc(-1 * var(--space-xs)) 0;
  /* No bottom padding: the rule's own margin is the gap beneath. */
  padding: var(--space-xs) var(--space-xs) 0;
  text-align: center;
  background: var(--surface);
}
.nav-page .nav-sep {
  margin: 0;
  flex: none;
}
.nav-page > a {
  flex: none;
  white-space: nowrap;
}
.nav-page .nav-label {
  flex: none;
  white-space: nowrap;
}
/* The search and the author control share one line: the control is as
   wide as its label, up to half the line, and the search takes the rest.
   Both are a text line tall (24px), the least a pointer should have. */
.nav-page {
  position: relative;
  flex-wrap: nowrap;
}
.nav-page .nav-search {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  display: flex;
}
.nav-page .nav-field {
  width: 100%;
  min-height: var(--space);
}
.nav-page details.nav-cat-sel {
  flex: 0 1 auto;
  display: block;
  width: auto;
  min-width: 0;
  max-width: 50%;
  padding: 0;
  border: var(--border);
  color: var(--ink);
  background: var(--surface);
  box-sizing: border-box;
}
.nav-page details.nav-cat-sel > summary {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: var(--space);
  padding: 0 var(--grid) 0 var(--space-xs);
  box-sizing: border-box;
}
.nav-page details.nav-cat-sel .sel-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* The author menu opens across the whole line, under it, so a long name
   has the box's width and the menu stays inside the rail. */
.nav-page details#post-author {
  position: static;
}
.nav-page details#post-author > .sel-menu {
  left: 0;
  right: 0;
  top: calc(100% + var(--grid));
  width: auto;
  min-width: 0;
  max-width: none;
}
.nav-page details#post-author .sel-menu button {
  white-space: normal;
  min-height: var(--space);
}
/* The section links are the left rail's box under the site head: bold
   caps that wrap to the rail's width, each a text line tall, the section
   shown inverted. */
.sec-box {
  padding: var(--space-xs);
  border: var(--border);
  background: var(--surface);
}
.sec-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 var(--grid);
  min-width: 0;
}
.sec-nav a {
  padding: 0 var(--grid);
  line-height: var(--space);
  font-weight: var(--weight-strong);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.sec-nav a:hover,
.sec-nav a:focus-visible,
.sec-nav a[aria-current] {
  background: var(--ink);
  color: var(--ink-contrast);
}
.sec-nav .nav-sep {
  display: none;
}

.nav-page .page-sel {
  display: inline-flex;
  flex: none;
  width: max-content;
  max-width: none;
  border: 0;
  background: transparent;
  vertical-align: baseline;
}
.nav-page .page-sel > summary {
  display: inline-flex;
  width: auto;
  flex: none;
  padding: 0;
  gap: 0;
  background: transparent;
  text-decoration: underline;
  color: var(--ink);
}
.nav-page .page-sel .sel-label {
  display: inline;
  flex: none;
  min-width: 0;
  width: auto;
}
.nav-page .page-sel:not([open]) > .sel-menu {
  display: none;
}
.nav-page .page-sel .sel-menu {
  left: 0;
  right: auto;
  min-width: 24px;
  width: max-content;
  text-align: left;
}
.left-rail .toc {
  order: 3;
}
.right-rail .post-nav {
  order: 6;
}
.post-nav:empty {
  display: none;
}
.right-rail .post-nav {
  padding: 0;
  align-items: stretch;
}
.post-nav > .disclosure-label {
  border: var(--border);
  background: var(--surface);
  padding: var(--space-xs);
  text-align: center;
  width: 100%;
}
.post-nav > .disclosure:checked ~ .nav-box {
  width: 100%;
  max-width: none;
}
.toc {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
}
.toc > .disclosure-label {
  margin: 0;
  text-align: center;
  border: var(--border);
  background: var(--surface);
  padding: var(--space-xs);
  width: 100%;
}
.toc > nav {
  display: none;
}
.toc > .disclosure:checked ~ nav {
  display: grid;
}
.toc-scrim {
  display: none;
}
.toc nav {
  grid-template-rows: var(--mast-line) var(--border-w) auto;
  row-gap: var(--space-xs);
  text-align: left;
}
.toc h2 {
  font-weight: var(--weight-strong);
  text-decoration: none;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  height: var(--mast-line);
  line-height: var(--mast-line);
  overflow: hidden;
}
.toc .nav-rule {
  margin: 0;
  height: 0;
  align-self: center;
}
.toc-notes {
  display: block;
  margin: 0;
  padding: 0;
  font-weight: var(--weight-body);
  text-align: right;
}
.toc-note {
  text-decoration: none;
  font-weight: var(--weight-strong);
}
.toc ol {
  list-style: none;
  counter-reset: toc-h2;
  margin: 0;
  text-align: left;
}
.toc li {
  margin: 0 0 var(--grid);
  line-height: var(--leading-tight);
  min-width: 0;
}
.toc li a {
  display: flex;
  align-items: baseline;
  gap: 0;
  min-width: 0;
  text-decoration: none;
}
.toc li a::before {
  flex: none;
  order: 1;
}
.toc li a::after {
  content: "";
  order: 2;
  flex: 1 1 auto;
  min-width: var(--space-xs);
  align-self: center;
  height: 0;
  margin: 0 var(--grid);
  border-bottom: var(--border-w) dotted currentColor;
}
/* The entries are set in capitals, like the box's title and the section
   links; the headings' own text is unchanged. */
.toc-label {
  order: 3;
  flex: 0 1 auto;
  text-align: right;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
}
.toc li a:hover,
.toc li a:hover::before,
.toc li a:hover .toc-label {
  text-decoration: none;
  background-color: var(--ink);
  color: var(--ink-contrast);
}
.toc li.toc-l2 {
  counter-increment: toc-h2;
  counter-reset: toc-h3;
}
.toc li.toc-l2 a::before {
  content: counter(toc-h2) ".\00A0";
}
.toc li.toc-l3 {
  counter-increment: toc-h3;
  padding-left: var(--space-s);
}
.toc li.toc-l3 a::before {
  content: counter(toc-h2) "." counter(toc-h3, lower-alpha) ".\00A0";
}
.toc li.toc-passed > a {
  font-weight: var(--weight-strong);
}
.toc li.toc-current > a,
.toc li.toc-current > a::before,
.toc li.toc-current > a .toc-label {
  background-color: var(--ink);
  color: var(--ink-contrast);
  font-weight: var(--weight-strong);
}
.interlink {
  position: relative;
}
.link-card {
  display: none;
  position: absolute;
  top: calc(100% + var(--grid));
  left: 0;
  z-index: 10;
  width: var(--card);
  max-width: min(var(--card), calc(100vw - 2 * var(--rail-gap)));
  background: var(--surface);
  color: var(--ink);
  border: var(--border);
  padding: calc(var(--space-xs) + var(--grid)) var(--space-xs) var(--space-xs);
  margin-top: calc(-1 * var(--grid));
  line-height: var(--leading);
  font-weight: var(--weight-body);
  text-align: left;
  text-decoration: none;
}
.link-card strong {
  display: block;
  margin: 0 0 var(--grid);
}
.link-card span {
  display: block;
  color: var(--muted);
}
.interlink:hover .link-card,
.interlink:hover .link-card * {
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}
.interlink:hover {
  background: var(--ink);
  color: var(--ink-contrast);
}
@media (hover: hover) and (pointer: fine) {
  .interlink:hover .link-card,
  .interlink:focus .link-card,
  .interlink:focus-visible .link-card {
    display: block;
  }
}
@supports (position-try-fallbacks: flip-inline) {
  .link-card {
    position-try-fallbacks: flip-inline;
  }
}

/* blog/prose — article typography: headings, lists, quotes, code, figures */

h1,
h2,
h3,
.prose h2 > .hlink,
.prose h3 > .hlink {
  font-weight: var(--weight-strong);
}
.prose {
  overflow-wrap: anywhere;
}
/* Every line of post text stands on the 4px grid: the universal rule's
   ratio (--leading) would put 16px text on a 21.33px line. Rules below
   and in later sheets that set their own leading still win. */
.prose,
.prose :where(*) {
  line-height: var(--leading-prose);
}
.prose a {
  -webkit-hyphens: manual;
  hyphens: manual;
}
.prose > * {
  max-width: 100%;
}
.prose p,
.prose li {
  position: relative;
}
.prose p {
  margin: 0 0 var(--space-s);
  line-height: var(--leading-prose);
  -webkit-hyphens: auto;
  hyphens: auto;
  text-wrap: pretty;
  hanging-punctuation: first allow-end;
  orphans: 3;
  widows: 3;
}
.prose li {
  -webkit-hyphens: auto;
  hyphens: auto;
  text-wrap: pretty;
  hanging-punctuation: first allow-end;
}
.prose h2,
.prose h3,
.prose h4 {
  /* More air above a heading than below, so it binds to its own text.
     Each level sets its own top margin below. */
  margin: 0 0 var(--space-xs);
  line-height: var(--leading-prose);
  text-wrap: balance;
  hanging-punctuation: first allow-end;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.sec > :first-child,
.sec > .prose > :first-child,
.sec > .prose > :is(.h2-sec, .h3-sec):first-child > :first-child {
  margin-top: 0;
}
.article-body > .sec > .prose > :last-child {
  margin-bottom: 0;
}
.prose h2 {
  margin-top: var(--space-l);
  font-size: var(--size-title);
  line-height: var(--space);
  font-weight: var(--weight-strong);
  text-align: left;
  text-decoration: underline;
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
}
.prose h3 {
  font-weight: var(--weight-strong);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  margin-top: var(--space);
}
.prose h4 {
  margin-top: var(--space-s);
  font-weight: var(--weight-body);
  text-decoration: underline;
  text-transform: none;
  font-style: normal;
}
.prose .h2-sec,
.prose .h3-sec {
  position: relative;
}
.prose ul {
  list-style: none;
  margin: 0 0 var(--space-s);
  padding-left: var(--space-s);
}
.prose ul > li {
  position: relative;
  margin: 0 0 var(--grid);
  line-height: var(--leading-prose);
}
.prose ul > li::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-s));
  top: 5px;
  width: var(--grid);
  height: var(--grid);
  background: var(--ink);
}
/* A term directory is a table of names and counts, not a bulleted list. */
.prose ul.term-list {
  padding-left: 0;
}
.prose ul.term-list > li::after {
  content: none;
}
.prose ul > li:has(ul, ol)::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-s) + 2px);
  top: calc(var(--leading-prose) / 2);
  height: calc(100% + var(--grid) - var(--leading-prose) / 2);
  border-left: var(--border-w) solid var(--ink);
  opacity: 0.6;
  pointer-events: none;
}
.prose ul ul {
  list-style: none;
  margin: var(--grid) 0 0;
  padding-left: var(--space-s);
}
.prose ol {
  margin: 0 0 var(--space-s);
  padding-left: var(--space);
}
.prose ol > li {
  margin: 0 0 var(--grid);
  line-height: var(--leading-prose);
}
.prose blockquote {
  padding: 0 0 0 var(--space-s);
  margin: 0 0 var(--space-s) var(--space-s);
  border-left: calc(var(--border-w) * 2) solid var(--ink);
  font-style: italic;
  hanging-punctuation: first allow-end;
}
.prose blockquote p {
  margin: 0;
}
.prose blockquote:has(.bq-by) {
  padding: 0;
  margin: 0 var(--space) var(--space-s);
  border-left: 0;
}
.prose blockquote .bq-by {
  display: block;
  text-align: right;
  font-style: normal;
}
.prose code {
  font-family: var(--font-mono);
  padding: 0 var(--grid);
}
.prose pre {
  padding: var(--space-xs);
  overflow-x: auto;
  margin: 0 0 var(--space-s);
}
.prose pre code {
  padding: 0;
}
.prose figure {
  margin: 0 0 var(--space-s);
  width: auto;
  max-width: 100%;
}
.prose > figure {
  display: inline-block;
  vertical-align: top;
  margin-inline: var(--space-s);
  max-width: calc(100% - 2 * var(--space-s));
}
.article-body > .sec > .prose > figure:last-child {
  margin-bottom: 0;
}
.article-body > .sec > .prose > figure:first-child {
  margin-top: 0;
}
.prose figure > a:first-of-type {
  display: block;
  border: var(--border);
  overflow: hidden;
  cursor: pointer;
  background: var(--dither-light);
  text-decoration: none;
}
.prose figure > a:first-of-type:hover,
.prose figure > a:first-of-type:focus-visible {
  background: var(--paper);
  color: inherit;
  text-decoration: none;
}
.prose figure img {
  display: block;
  max-width: 100%;
  height: auto;
}
.prose > figure img {
  width: auto;
}
/* An image from a Sanity asset reserves its box before it loads. Its
   srcset's sizes ("(min-width: 1100px) 560px, 100vw", figureHtml in
   pt.ts) set the width it shows at once loaded, capped by max-width, and its
   width and height attributes give the aspect ratio, so text below it never
   moves when it arrives. Keep these in step with that sizes string. */
.prose > figure img[srcset][width][height] {
  width: 100vw;
}
@media (min-width: 1100px) {
  .prose > figure img[srcset][width][height] {
    width: 560px;
  }
}
.prose video {
  display: block;
  max-width: 100%;
  height: auto;
}
.gallery figure img {
  width: 100%;
}
.prose figure figcaption {
  display: table;
  margin: calc(-1 * var(--border-w)) 0 0 auto;
  text-align: right;
  padding: var(--grid) var(--space-xs);
  border: var(--border);
  background: var(--surface);
  font-style: italic;
  font-weight: var(--weight-strong);
  line-height: var(--leading-prose);
  max-width: 100%;
}
.prose figure figcaption a {
  text-decoration: none;
  color: inherit;
  font: inherit;
}
.prose figure:hover figcaption,
.prose figure:hover figcaption a,
.prose figure:has(a:focus-visible) figcaption,
.prose figure:has(a:focus-visible) figcaption a {
  background: var(--ink);
  color: var(--ink-contrast);
}
/* Every rule in a post body, at any depth: a heading-section wrapper
   must not drop an author's rule back to the browser's bevelled line. */
.prose hr {
  margin: 0 0 var(--space);
  border: 0;
  border-top: var(--border);
}
/* Under a heading the rule takes the heading's own gap above and the
   paragraph gap below, so heading, rule and text read as one unit. */
.prose :is(h2, h3, h4) + hr {
  margin-bottom: var(--space-s);
}
.prose :is(h2, h3) {
  position: relative;
  overflow: visible;
}
.prose :is(h2, h3) > .hlink {
  position: relative;
  display: block;
  /* The universal rule would set the link at the body size and leading
     inside a larger heading. */
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-decoration: inherit;
}
.prose :is(h2, h3):hover > .hlink,
.prose :is(h2, h3):hover > .hlink::before,
.prose :is(h2, h3) > .hlink:focus-visible,
.prose :is(h2, h3) > .hlink:focus-visible::before {
  background: var(--ink);
  color: var(--ink-contrast);
  text-decoration: none;
}
.prose :is(h2, h3) > .hlink::before {
  position: absolute;
  right: 100%;
  top: 0;
  white-space: pre;
  pointer-events: none;
}
.prose h2 > .hlink::before,
.prose h3 > .hlink::before {
  content: none;
}
.prose h2:hover > .hlink::before,
.prose h2 > .hlink:hover::before,
.prose h2 > .hlink:focus-visible::before {
  content: "## ";
}
.prose h3:hover > .hlink::before,
.prose h3 > .hlink:hover::before,
.prose h3 > .hlink:focus-visible::before {
  content: "### ";
}
.prose :is(h2, h3, h4)[id] {
  scroll-margin-top: var(--toc-spy);
}
.prose h2:hover,
.prose h2:hover > .hlink,
.prose h2:has(> .hlink:focus-visible),
.prose h2:has(> .hlink:focus-visible) > .hlink,
.prose h3:hover,
.prose h3:hover > .hlink,
.prose h3:has(> .hlink:focus-visible),
.prose h3:has(> .hlink:focus-visible) > .hlink,
.prose h4:hover {
  text-decoration: none;
}
.prose a.outlink {
  text-decoration-style: dotted;
}

/* blog/media — .ht image treatment, galleries, lightbox.
   An image shows as a halftone at rest; pointing at it or tabbing to it
   shows the picture as it was made. On touch, its link opens the picture.
   A note's picture (.fn-img) is drawn the same way, in the margin, in the
   list of notes, and in a note open under its mark. */

.article-body > .sec:has(.ht) {
  overflow: visible;
}
.post-card .card-thumb .ht,
.post-card .card-thumb .ht-map {
  height: 100%;
}
.post-card .card-thumb .ht img {
  height: 100%;
  object-fit: cover;
}
.dither-fx {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ht {
  display: block;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--dither-light);
  width: 100%;
}
.ht::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dither-mid);
  mix-blend-mode: color;
  opacity: var(--ht-tint, 1);
  pointer-events: none;
  z-index: 2;
}
.ht-map {
  display: block;
  position: relative;
  overflow: hidden;
  filter: var(--ht-map, var(--dither-filter, url(#dither-3)));
}
.ht img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: var(--ht-img, grayscale(1));
}
.ht-ink {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--ht-ink-op, 1);
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4' shape-rendering='crispEdges'%3E%3Crect width='1' height='1' fill='%23000'/%3E%3Crect x='1' width='1' height='1' fill='%23888'/%3E%3Crect x='2' width='1' height='1' fill='%23222'/%3E%3Crect x='3' width='1' height='1' fill='%23aaa'/%3E%3Crect y='1' width='1' height='1' fill='%23ccc'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23444'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%23eee'/%3E%3Crect x='3' y='1' width='1' height='1' fill='%23666'/%3E%3Crect y='2' width='1' height='1' fill='%23333'/%3E%3Crect x='1' y='2' width='1' height='1' fill='%23bbb'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23111'/%3E%3Crect x='3' y='2' width='1' height='1' fill='%23999'/%3E%3Crect y='3' width='1' height='1' fill='%23fff'/%3E%3Crect x='1' y='3' width='1' height='1' fill='%23777'/%3E%3Crect x='2' y='3' width='1' height='1' fill='%23ddd'/%3E%3Crect x='3' y='3' width='1' height='1' fill='%23555'/%3E%3C/svg%3E");
  background-size: var(--dither-cell) var(--dither-cell);
  mix-blend-mode: overlay;
}
.prose figure > a:hover .ht-map,
.prose figure > a:focus-visible .ht-map,
.gallery figure > a:hover .ht-map,
.gallery figure > a:focus-visible .ht-map,
.post-card:hover .card-thumb .ht-map,
.post-card:has(:focus-visible) .card-thumb .ht-map,
.fn-img:hover .ht-map,
.fn-img:focus-visible .ht-map {
  filter: var(--ht-map-h, none);
}
.prose figure > a:hover .ht::after,
.prose figure > a:focus-visible .ht::after,
.gallery figure > a:hover .ht::after,
.gallery figure > a:focus-visible .ht::after,
.post-card:hover .card-thumb .ht::after,
.post-card:has(:focus-visible) .card-thumb .ht::after,
.fn-img:hover .ht::after,
.fn-img:focus-visible .ht::after {
  opacity: var(--ht-tint-h, 0);
}
.prose figure > a:hover .ht img,
.prose figure > a:focus-visible .ht img,
.gallery figure > a:hover .ht img,
.gallery figure > a:focus-visible .ht img,
.post-card:hover .card-thumb .ht img,
.post-card:has(:focus-visible) .card-thumb .ht img,
.fn-img:hover .ht img,
.fn-img:focus-visible .ht img {
  filter: var(--ht-img-h, none);
}
.prose figure > a:hover .ht-ink,
.prose figure > a:focus-visible .ht-ink,
.gallery figure > a:hover .ht-ink,
.gallery figure > a:focus-visible .ht-ink,
.post-card:hover .card-thumb .ht-ink,
.post-card:has(:focus-visible) .card-thumb .ht-ink,
.fn-img:hover .ht-ink,
.fn-img:focus-visible .ht-ink {
  opacity: var(--ht-ink-op-h, 0);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
  margin: 0 0 var(--space);
}
.gallery figure {
  margin: 0;
}
.gallery figure > a {
  display: block;
  border: var(--border);
  overflow: hidden;
  cursor: zoom-in;
  isolation: isolate;
  background: var(--ink);
  text-decoration: none;
}
.gallery img {
  width: 100%;
  height: auto;
  display: block;
}
.gallery a:hover,
.gallery a:focus-visible {
  background: var(--paper);
  color: inherit;
  text-decoration: none;
}
.gallery figcaption {
  display: table;
  margin: calc(-1 * var(--border-w)) 0 0 auto;
  text-align: right;
  padding: var(--grid) var(--space-xs);
  border: var(--border);
  background: var(--surface);
  font-style: italic;
  font-weight: var(--weight-strong);
  max-width: 100%;
}
dialog.lightbox {
  border: var(--border);
  background: var(--paper);
  padding: var(--space-xs);
  max-width: 90%;
}
dialog.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  border: var(--border);
}
dialog.lightbox button {
  border: var(--border);
  background: var(--paper);
  color: var(--ink);
  padding: var(--grid) var(--space-xs);
  margin-top: var(--space-xs);
  cursor: pointer;
}
dialog.lightbox button:hover {
  background: var(--ink);
  color: var(--ink-contrast);
}
dialog.lightbox::backdrop {
  background: color-mix(in srgb, var(--paper) 85%, transparent);
}
.link-card .ht {
  margin: 0 0 var(--space-xs);
}
.link-card .ht img {
  border: 0;
  margin: 0;
}

/* blog/notes — footnotes, sidenotes, adjacent-post nav */

.fn {
  scroll-margin-top: 50vh;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
/* A note opens as a positioned box inside its line. Under text-wrap: pretty
   that box changes where the line breaks, so the mark moved out from under
   the pointer and the click missed it. Text that holds a mark wraps plainly. */
.prose :is(p, li, h2, h3, h4):has(.fn) {
  text-wrap: wrap;
}
/* The number hugs the word before it, so its highlight covers the number
   alone. */
.fn-ref {
  position: relative;
  font-weight: var(--weight-strong);
  cursor: pointer;
  text-decoration: none;
}
.fn-ref sup,
.fn-xref sup,
.fn-sep {
  font-size: smaller;
  line-height: 0;
}
/* The comma between two marks that stand side by side. */
.fn-sep {
  font-weight: var(--weight-strong);
  user-select: none;
}
/* On a phone the number is about 7px wide. An unseen area the size of a
   text line (24px square) around it takes the tap. Each number sits above
   every such area, so two marks side by side keep their own taps. */
@media (pointer: coarse), (max-width: 639px) {
  .fn-ref::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, var(--space));
    height: var(--space);
    transform: translate(-50%, -50%);
  }
  .fn-ref sup {
    position: relative;
    z-index: 1;
  }
}
.fn-note {
  display: none;
  font-style: italic;
  /* A note is set smaller than the post: 12px on a 16px line. */
  --size-base: var(--size-ui);
  line-height: var(--leading);
  border: var(--border);
  padding: var(--grid);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  user-select: none;
}
/* A note stands inside the post's text; its lines keep the note's
   leading, not the post's (prose.css). */
.fn-note :where(*) {
  line-height: var(--leading);
}
.fn-note strong {
  flex: none;
  margin: 0;
  font-style: normal;
  font-weight: var(--weight-strong);
}
.fn-note .sn-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
/* A note's picture is a link to it, drawn as the body's are (blog/media.css). */
.fn-note .fn-img,
.fn-end .fn-img {
  display: block;
  max-width: 100%;
  cursor: pointer;
  text-decoration: none;
}
/* A mark inside a note is a link; the link's underline would show as a
   dash under the raised number, so it has none. */
.fn-note .fn-xref,
.fn-end .fn-xref {
  position: relative;
  z-index: 1;
  font-weight: var(--weight-strong);
  text-decoration: none;
  user-select: none;
}
.fn-hit {
  position: absolute;
  inset: 0;
}
.fn-hit:hover {
  background: transparent;
}
.fn-xref:hover {
  background: var(--ink);
  color: var(--ink-contrast);
}
.fn-par {
  display: block;
}
.fn-par + .fn-par {
  margin-top: var(--space-xs);
}
/* The quote's rule takes the text's color, so it inverts with the note.
   A thin rule under the note's number, the text close beside it: the
   page script measures how far the note's text stands from its number
   (--fn-lead), and the quote reaches back that far. */
.fn-q {
  display: block;
  margin: var(--space-xs) 0 var(--space-xs) calc(-1 * var(--fn-lead, 0px));
  padding-left: var(--grid);
  border-left: var(--border-w) solid currentColor;
}
/* A quote's attribution stands on its own line, set right and upright,
   as in the post's own block quotes; a long one wraps short of the
   rule. */
.fn-q .bq-by {
  display: block;
  padding-left: var(--space);
  text-align: right;
  font-style: normal;
}
/* The return mark at the end of a note in the list: the note links back
   up to its mark. */
.fn-back {
  margin-left: var(--grid);
  font-style: normal;
  white-space: nowrap;
}
/* A rule, then the NOTES heading, over the list of notes. */
.fn-endnotes > hr {
  margin: 0 0 var(--space-xs);
  border: 0;
  border-top: var(--border);
}
.prose .fn-endnotes-head {
  margin: 0 0 var(--space-xs);
  font-weight: var(--weight-strong);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  text-align: center;
}
.fn-q:first-child {
  margin-top: 0;
}
/* A quote that opens the note stands beside its number, not under it. */
.sn-text > .fn-q:first-child,
.fn-q-top {
  margin-left: 0;
}
.fn-q:last-child {
  margin-bottom: 0;
}
/* The list of notes keeps the body's rhythm: a paragraph gap above it, a
   small step between notes and inside each box, and numbers in one column
   so every note's text starts on the same edge. */
.fn-endnotes {
  margin-top: var(--space);
}
.fn-end {
  display: flex;
  gap: var(--space-xs);
  scroll-margin-top: 50vh;
  font-variant-numeric: tabular-nums;
  position: relative;
  font-style: italic;
  line-height: var(--leading-prose);
  border: var(--border);
  padding: var(--space-xs);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
/* The endnote is one back-link (.fn-hit) to its reference: pointing at it
   or tabbing to it inverts the whole note. The universal rule gives every
   element its own ink, so each descendant has to flip, not just the box. */
.fn-end:hover,
.fn-end:has(> .fn-hit:focus-visible) {
  background: var(--ink);
}
.fn-end:hover *,
.fn-end:has(> .fn-hit:focus-visible) * {
  color: var(--ink-contrast);
}
/* Links inside the note sit above the back-link, so they open their own
   target, and invert again against the inverted note. A note's picture
   keeps its own look (media.css): a fill behind it would show through a
   transparent one. */
.fn-end .sn-text a {
  position: relative;
  z-index: 1;
}
.fn-end .sn-text a:not(.fn-img):hover,
.fn-end .sn-text a:not(.fn-img):focus-visible,
.fn-end .sn-text a:not(.fn-img):hover * {
  background: var(--ink-contrast);
  color: var(--ink);
}
.fn-end + .fn-end {
  margin-top: var(--space-xs);
}
.fn-end strong {
  flex: none;
  margin: 0;
  min-width: 3ch;
  text-align: right;
  font-style: normal;
  font-weight: var(--weight-strong);
}
.fn-end .sn-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}
.fn-ref:hover,
.fn-ref:hover sup,
.fn:focus-within .fn-ref,
.fn:focus-within .fn-ref sup {
  background: var(--ink);
  color: var(--ink-contrast);
  text-decoration: none;
}
.notes {
  margin: var(--space) 0;
}
.note {
  position: relative;
  border: var(--border);
  padding: var(--space-xs);
  margin: 0 0 var(--space-xs);
  line-height: var(--leading);
  background: var(--surface);
}
.note strong {
  margin-right: var(--grid);
}
.note::before {
  content: "";
  position: absolute;
  right: 100%;
  top: var(--grid);
  width: calc(var(--space-xs) + var(--space));
  height: 0;
  border-top: var(--border-w) solid var(--ink);
  background: none;
  z-index: -2;
  pointer-events: none;
}

.post-meta {
  color: var(--muted);
  margin: 0;
  padding: var(--space-xs);
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.post-meta i {
  overflow-wrap: anywhere;
  hyphens: none;
}
.post-adj {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xs);
}
.post-prev,
.post-next {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 48%;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.post-prev {
  text-align: left;
}
.post-next {
  text-align: right;
  margin-left: auto;
}
.post-adj-k {
  display: block;
  font-weight: var(--weight-strong);
}
.post-adj-t {
  display: block;
}
.disclosure:focus-visible + label,
.fn-ref:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* blog/sidenotes — notes in the margin, with flowchart lines

   With both rails, every note stands in the margin, in reference order,
   under the right rail's boxes. The layout script (SIDENOTES_JS in
   packages/renderer/src/nav.ts) puts a note at its mark's line, or under
   the note above when that place is taken. A note the next one would
   block is cut short (data-long, the height of .sn-text); pointing at it
   or its mark, tabbing to the mark, or a click opens it in full (data-on)
   over the notes below, which stay where they are. A note may run past
   the rail's width, toward the window's edge, up to a cap. The script
   also sets the lane each line turns in.

   The blog's pages and the Studio's page editor share this sheet and that
   script. */
@property --fn-drop {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}
@property --fn-lane {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}
@media (min-width: 1100px) {
  .fn-note {
    display: flex;
    gap: var(--space-xs);
    align-items: flex-start;
    position: absolute;
    left: 100%;
    top: 0;
    width: var(--rail);
    max-width: none;
    margin: 0;
    /* Tight at the sides, so a note takes in more of the margin. */
    padding: var(--space-xs) var(--fn-side);
    gap: var(--fn-side);
    /* No layer of its own: the box (::after) and the text stand over
       every line (::before), so no line shows across a box. */
    z-index: auto;
    border-color: transparent;
    background: none;
    pointer-events: auto;
    user-select: text;
    cursor: text;
    --size-base: var(--size-ui);
    --fn-side: calc(1.5 * var(--grid));
    /* The line's weight; the open note's line is heavier. */
    --fn-w: var(--border-w);
    /* How long a note takes to open or close. */
  }
  /* The box: border and ground, over every line and under the note's own
     text. Lines sit at 1, boxes at 2, text at 3; the open note's box and
     text at 4 and 5, over the notes it stands on, and the note opened
     last at 6 and 7, over another open note. */
  .fn-note::after {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--border-w));
    border: var(--border);
    background: var(--surface);
    z-index: 2;
    pointer-events: none;
  }
  .fn-note > * {
    position: relative;
    z-index: 3;
  }
  /* Cut the height only: an italic letter at the end of a full line leans
     past the box's edge, and clipping the width shaved it. */
  .fn-note .sn-text {
    overflow: visible clip;
  }
  /* The ellipsis stands on the last line it keeps, over that line's end,
     so no half-hidden letter shows beside it. */
  .fn-note[data-long] .sn-text::after {
    content: "\2026";
    position: absolute;
    right: 0;
    bottom: 0;
    padding-left: var(--grid);
    background: var(--surface);
    font-style: normal;
    font-weight: var(--weight-strong);
    line-height: var(--mast-line);
  }
  /* The line from the mark to the note, drawn like a flowchart: out from
     the column at the mark's line, down its lane (--fn-lane, from the
     column's edge) by --fn-drop, into the note. A note at its mark's line
     has no drop, and the three strips are one straight line. The line
     starts on the column's border and ends on the note's, one border's
     width into each, so it reads as coming from under the window with no
     gap at either end. */
  .fn-note::before {
    --lane: calc(var(--fn-lane) + var(--border-w));
    content: "";
    display: block;
    position: absolute;
    z-index: 1;
    right: 100%;
    margin-right: calc(-1 * var(--border-w));
    top: calc(
      var(--space-xs) + var(--size-ui) * var(--leading) / 2 - var(--fn-drop)
    );
    width: calc(var(--fn-reach, var(--rail-gap)) + 2 * var(--border-w));
    height: calc(var(--fn-drop) + var(--fn-w));
    background:
      linear-gradient(var(--ink), var(--ink)) 0 0 /
        calc(var(--lane) + var(--fn-w)) var(--fn-w) no-repeat,
      linear-gradient(var(--ink), var(--ink)) var(--lane) 0 / var(--fn-w) 100%
        no-repeat,
      linear-gradient(var(--ink), var(--ink)) 100% 100% /
        calc(100% - var(--lane)) var(--fn-w) no-repeat;
    pointer-events: none;
  }
  /* A note nested in another stands under it, and its line runs on the
     right: out of the parent's right side at the reference's line, down
     its lane (--fn-lane, from the notes' right edge), into this note's
     right side. */
  .fn-note.fn-sub::before {
    right: auto;
    left: 100%;
    margin-right: 0;
    margin-left: calc(-1 * var(--border-w));
    width: calc(var(--fn-lane) + var(--border-w) + var(--fn-w));
    background:
      linear-gradient(var(--ink), var(--ink)) 0 0 / 100% var(--fn-w) no-repeat,
      linear-gradient(var(--ink), var(--ink)) 100% 0 / var(--fn-w) 100%
        no-repeat,
      linear-gradient(var(--ink), var(--ink)) 0 100% / 100% var(--fn-w)
        no-repeat;
  }
  /* The open note inverts with its mark and stands over the notes below
  it, which stay where they are; its line stands out: heavier, with the
  other lines faint. Its last line keeps clear of the border. */
  .fn-note[data-on] {
    padding-bottom: calc(var(--space-xs) + var(--grid));
    --fn-w: calc(2 * var(--border-w));
  }
  /* An open note takes every hit inside its box, so the pointer on its
     padding or its foot stays on it and never reaches the note under it. */
  .fn-note[data-on]::after {
    z-index: 4;
    background: var(--ink);
    pointer-events: auto;
  }
  .fn-note[data-on] > * {
    z-index: 5;
  }
  .fn-note[data-on][data-top]::after {
    z-index: 6;
  }
  .fn-note[data-on][data-top] > * {
    z-index: 7;
  }
  .fn-note[data-dim]::before {
    opacity: 0.3;
  }
  .fn[data-on] .fn-ref,
  .fn[data-on] .fn-ref sup {
    background: var(--ink);
    color: var(--ink-contrast);
  }
  .fn-note[data-on] {
    color: var(--ink-contrast);
  }
  .fn-note[data-on] * {
    color: var(--ink-contrast);
  }
  .fn-note[data-on] .sn-text::after {
    content: none;
  }
  /* Not a note's picture: a fill would show through a transparent one. */
  .fn-note[data-on] a:not(.fn-img):hover,
  .fn-note[data-on] a:not(.fn-img):hover * {
    background: var(--ink-contrast);
    color: var(--ink);
  }
}
/* Opening and closing a note glides: the script moves the notes and
   their lines with the Web Animations API, never CSS transitions, and
   not at all under reduced motion. */

/* blog/layout — breakpoint composition: how the shell and components arrange at each width */

/* Where a phone puts the author control and theme box, after the posts
   (page.ts PHONE_TAIL); wider screens keep them in the rails. */
.phone-tail {
  display: none;
}

@media (min-width: 824px) {
  .mast-tools,
  .mast-tools-rule {
    display: none;
  }
  .sec.mast > header {
    grid-template-rows: var(--mast-line) var(--border-w) auto;
  }
  /* The article title leads at display size once the mast has the
     measure to itself; the listing's status line keeps its own size.
     One grid step of leading keeps each line a whole pixel, so the
     site-head, sized from the mast's offsetHeight, stays level with it. */
  .sec.mast h1 {
    font-size: var(--size-display);
    line-height: calc(var(--size-display) + var(--grid));
  }
  /* A title is set on one line: the bake classes each long title by its
     width in whole ems, and the size comes down from display until that
     width fits the mast. The smallest one-line size is still a title, above
     the body size. A title that cannot fit at that size wraps at a larger,
     comfortable one: two readable lines beat two lines at the smallest size.
     The second max() term is the wrap size when the one-line size falls
     below the floor, and nothing otherwise. Leading follows the size, to a
     whole pixel, so the site-head stays level with the mast. */
  .sec.mast > header {
    container-type: inline-size;
  }
  .sec.mast h1[class^="title-fit-"] {
    --title-one: calc(100cqi / var(--title-em));
    --title-size: max(
      min(var(--title-one), var(--size-display)),
      clamp(
        0px,
        (var(--size-title-min) - var(--title-one)) * 1000,
        var(--size-title-wrap)
      )
    );
    font-size: var(--title-size);
    line-height: calc(var(--title-size) + var(--grid));
    line-height: round(
      up,
      calc(var(--title-size) + var(--grid)),
      var(--border-w)
    );
  }
  .title-fit-20 {
    --title-em: 20;
  }
  .title-fit-21 {
    --title-em: 21;
  }
  .title-fit-22 {
    --title-em: 22;
  }
  .title-fit-23 {
    --title-em: 23;
  }
  .title-fit-24 {
    --title-em: 24;
  }
  .title-fit-25 {
    --title-em: 25;
  }
  .title-fit-26 {
    --title-em: 26;
  }
  .title-fit-27 {
    --title-em: 27;
  }
  .title-fit-28 {
    --title-em: 28;
  }
  .title-fit-29 {
    --title-em: 29;
  }
  .title-fit-30 {
    --title-em: 30;
  }
  .title-fit-31 {
    --title-em: 31;
  }
  .title-fit-32 {
    --title-em: 32;
  }
  .title-fit-33 {
    --title-em: 33;
  }
  .title-fit-34 {
    --title-em: 34;
  }
  .title-fit-35 {
    --title-em: 35;
  }
  .title-fit-36 {
    --title-em: 36;
  }
  .title-fit-37 {
    --title-em: 37;
  }
  .title-fit-38 {
    --title-em: 38;
  }
  .title-fit-39 {
    --title-em: 39;
  }
  .title-fit-40 {
    --title-em: 40;
  }
  .title-fit-41 {
    --title-em: 41;
  }
  /* The theme box heads the right rail: one row of swatches, no heading. */
  .right-rail > .theme-sel {
    position: relative;
    padding: var(--space-xs);
    border: var(--border);
    background: var(--surface);
    display: block;
  }
  .right-rail > .theme-sel .theme-label,
  .right-rail > .theme-sel > .disclosure,
  .right-rail > .theme-sel .nav-rule {
    display: none;
  }
  .right-rail > .theme-sel .theme-controls {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: var(--mast-line);
    padding: 0;
    border: 0;
    gap: var(--grid);
  }
  .right-rail > .theme-sel .theme-hues,
  .right-rail > .theme-sel .theme-dots {
    height: var(--mast-line);
  }
  /* Every masthead is at least as tall as the site head beside it. */
  .sec.mast {
    min-height: var(--mast-box);
  }
  /* A mast with one line and nothing else (a listing, the 404 page)
     centers it. */
  .sec.mast:has(> header > h1:only-child) {
    display: grid;
    align-content: center;
  }
  .sec.mast > header:has(> h1:only-child) {
    grid-template-rows: auto;
  }
  /* The site head sits beside the mast from here up. Row 1 and the rule
     stay packed to the top, level with the mast's; the brand row takes
     the rest of the box, centred against the title. */
  .left-rail .site-head {
    align-items: stretch;
    grid-template-rows: minmax(var(--mast-line), auto) var(--border-w) minmax(
        var(--mast-title),
        1fr
      );
  }
  .left-rail .site-head .site-title {
    height: auto;
    min-height: var(--mast-title);
    overflow: visible;
    align-self: center;
  }
}
@media (max-width: 823px) {
  .layout {
    position: relative;
  }
  .sec.mast > header {
    grid-template-rows: auto var(--border-w) auto var(--border-w) auto;
  }
  .sec.mast .byline,
  .sec.mast .mast-tools {
    height: auto;
    overflow: visible;
    white-space: normal;
  }
  .byline,
  .sec > header address {
    white-space: normal;
  }
  .mast-tools {
    flex-wrap: wrap;
    row-gap: var(--grid);
  }
  .sec.mast.index-mast > header {
    grid-template-rows: var(--mast-line) var(--border-w) auto;
  }
  /* The head menu holds the sections here, so a listing's mast keeps
     only its heading, for screen readers. */
  .sec.mast.index-mast.list-mast {
    position: absolute;
    width: var(--border-w);
    height: var(--border-w);
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  /* The site head is one row: the wordmark, and a menu holding the
     sections and the head's links. */
  .site-head nav,
  .site-head > .nav-rule,
  .left-rail .site-head nav,
  .left-rail .site-head .nav-rule {
    display: none;
  }
  .site-head,
  .left-rail .site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs);
    max-width: none;
  }
  .site-head .site-title,
  .left-rail .site-head .site-title {
    min-width: 0;
    text-align: left;
  }
  .head-menu {
    display: block;
    flex: none;
  }
  /* The search button sits beside the menu; it shows the search field
     under the head. */
  .head-search {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    align-self: stretch;
    margin-left: auto;
    padding: 0 var(--space-xs);
    border: var(--border);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
  }
  .head-search:hover,
  .head-search:focus-visible,
  .head-search[aria-expanded="true"] {
    background: var(--ink);
    color: var(--ink-contrast);
  }
  /* The icon and its path take the button's colour, so it inverts with
     the button (the universal rule would give the path the ink). */
  .head-search .nav-search-icon,
  .head-search .nav-search-icon path {
    color: inherit;
  }
  .layout:not(:has(#post-filter)) .head-search {
    display: none;
  }
  /* The head's feed and theme links sit in the foot, under the posts. */
  .foot-feeds {
    display: block;
  }
  body:not(:has(#theme-pop)) .foot-theme {
    display: none;
  }
  .theme-hues label,
  .theme-dots label,
  .theme-mode {
    width: var(--space);
    height: var(--space);
  }
  .head-dials {
    display: inline;
  }
  .layout:not(:has(#theme-pop)) .head-theme {
    display: none;
  }
  .layout:not(:has(#toc-toggle)) .mast-toc {
    display: none;
  }
  .left-rail .site-head {
    order: 1;
    position: relative;
    z-index: 9;
  }
  .article-wrap {
    order: 3;
  }
  /* The contents box is an overlay here; its own place is an empty point
     between the head and the post, where it sits in the page, so its
     toggle's tab stop is where the post's Contents link is. It takes back
     the column gap it would add. */
  .left-rail .toc {
    order: 2;
    margin-bottom: calc(-1 * var(--rail-gap));
  }
  .cite-box {
    display: none;
  }
  .theme-sel {
    display: contents;
  }
  /* The head menu holds the sections here. */
  .sec-box {
    display: none;
  }
  /* The theme box's and search box's disclosures belong to the wider
     rails: here the foot's Theme button and the head's search button stand
     in for them, so they leave the tab order and the accessibility tree. */
  .theme-label,
  .post-nav > .disclosure-label,
  .theme-sel > .disclosure,
  .post-nav > .disclosure {
    display: none;
  }
  /* The search field shows under the head once the head's search button
     opens it, and stays while it holds a query. On a listing the cards
     answer the search. On a post the matching posts list under the field
     once there is something in it. The author control goes under the
     posts. The search box's own boxes step aside so its parts take their
     places in the page's column. */
  .right-rail .post-nav,
  .post-nav > .nav-box,
  .post-nav > .disclosure:checked ~ .nav-box,
  .post-nav .nav-page {
    display: contents;
  }
  .post-nav .nav-search {
    display: none;
    order: 2;
  }
  .layout:has(.head-search[aria-expanded="true"]) .post-nav .nav-search,
  .post-nav .nav-search:has(#post-filter:not(:placeholder-shown)) {
    display: flex;
  }
  .post-nav .nav-field {
    min-height: var(--space);
  }
  .post-nav .nav-all,
  .post-nav .nav-foot {
    order: 2;
  }
  .post-nav .nav-page details.nav-cat-sel {
    order: 5;
    max-width: none;
  }
  /* nav.js moves the author control and theme box here, after the posts,
     so the tab order follows the screen. */
  .phone-tail {
    display: contents;
  }
  .phone-tail > .nav-page {
    order: 5;
    margin: 0;
    padding: 0;
    background: transparent;
  }
  .phone-tail > .nav-page:empty {
    display: none;
  }
  .phone-tail details.nav-cat-sel {
    flex: 1 1 auto;
    max-width: none;
  }
  .post-nav .nav-rule,
  .post-nav .nav-all,
  .post-nav .nav-foot {
    display: none;
  }
  .layout:not(.is-index)
    .post-nav:has(#post-filter:not(:placeholder-shown))
    .nav-all {
    display: block;
    margin-top: var(--space-xs);
  }
  .layout:not(.is-index)
    .post-nav:has(#post-filter:not(:placeholder-shown))
    .nav-foot {
    display: flex;
  }
  .theme-sel .nav-rule {
    display: none;
  }
  .theme-controls {
    display: none;
    /* Under the posts, beside the foot's Theme link that opens it. */
    order: 6;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: auto;
    width: 100%;
    padding: var(--space-xs);
    border: var(--border);
    background: var(--surface);
    gap: var(--grid);
  }
  .theme-hues,
  .theme-dots {
    height: auto;
  }
  #theme-pop:checked ~ .theme-controls {
    display: flex;
  }
  .toc {
    position: relative;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .toc > .disclosure-label {
    display: none;
  }
  .toc > nav {
    display: none;
  }
  .toc > .disclosure:checked ~ nav {
    display: grid;
    position: fixed;
    left: 50%;
    top: var(--space-l);
    transform: translateX(-50%);
    z-index: 32;
    width: min(var(--card), calc(100vw - 2 * var(--rail-gap)));
    max-height: min(70vh, calc(100dvh - 2 * var(--space-l)));
    overflow: auto;
    scrollbar-gutter: stable;
    margin: 0;
    padding: var(--space-xs);
    border: var(--border);
    background: var(--surface);
  }
  .toc h2 {
    display: block;
  }
  .toc .nav-rule:first-of-type {
    display: block;
  }
  .toc ol {
    border-top: 0;
    padding-top: 0;
  }
  .toc-scrim {
    display: none;
  }
  .toc > .disclosure:checked ~ .toc-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 31;
  }
}
/* On a phone the column is the screen's width, so the text keeps the
   base gutter at its sides. Beside one rail the column already fills the
   viewport, so it keeps that gutter too; from 1100px both rails stand
   beside it. The full measure (theme.css) and the widest room around the
   text need 1280px: below that, with one rail or both, the column keeps
   the measure it had at 63ch, 560px. */
@media (max-width: 823px) {
  :root {
    --read-pad: var(--gutter);
  }
}
@media (min-width: 824px) and (max-width: 1279px) {
  :root {
    --measure: 560px;
  }
}
@media (min-width: 824px) and (max-width: 1099px) {
  :root {
    --read-pad: var(--gutter);
  }
}
@media (min-width: 1280px) {
  :root {
    --read-pad: calc(3 * var(--space));
  }
}
/* Beside one column the rails fold into one sticky stack, each box built
   the same (label, rule, controls) and a gap apart: the site head level
   with the sections box, the theme box level with the first card, then
   the filter box on a listing, or the citation and post list on a post. */
@media (min-width: 824px) and (max-width: 1099px) {
  .layout {
    display: grid;
    grid-template-columns: var(--rail) var(--column);
    justify-content: center;
    align-items: start;
    column-gap: var(--rail-gap);
    row-gap: var(--rail-gap);
    width: max-content;
    max-width: none;
    margin: var(--rail-gap) auto 0;
    position: relative;
  }
  .side-col {
    display: flex;
    flex-direction: column;
    gap: var(--rail-gap);
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: var(--rail-gap);
    align-self: start;
    width: var(--rail);
    max-width: var(--rail);
    max-height: calc(100dvh - 2 * var(--rail-gap));
    overflow: auto;
    /* No scrollbar gutter: a reserved gutter made the gap between this
       stack and the column wider than the column's other side. */
    scrollbar-width: none;
    z-index: 5;
  }
  .left-rail,
  .right-rail {
    display: contents;
  }
  /* One stack, the left rail's boxes then the right's: the head, the
     sections, the read info, the contents, the theme, then the search box
     (search and author, then the posts). */
  .left-rail > .sec-box {
    order: 2;
  }
  .left-rail > .cite-box {
    order: 3;
  }
  .right-rail > .theme-sel {
    order: 5;
  }
  .right-rail > .post-nav {
    order: 6;
  }
  .article-wrap {
    grid-column: 2;
    grid-row: 1;
    width: var(--column);
    max-width: var(--column);
    margin: 0;
  }
  .article-body {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .cite-box {
    display: block;
    text-align: center;
  }
  .cite-box .nav-box {
    display: grid;
    grid-template-rows: auto var(--border-w) auto;
    row-gap: var(--space-xs);
    padding: var(--space-xs);
    max-width: none;
    margin: 0;
    text-align: center;
    background: var(--surface);
  }
  .cite-box .nav-rule {
    margin: 0;
    height: 0;
    align-self: center;
  }
  .post-nav {
    display: flex;
    padding: 0;
    align-items: stretch;
  }
  .post-nav > .disclosure-label {
    display: none;
  }
  .post-nav > .nav-box {
    display: block;
    max-width: none;
    margin: 0;
  }
  .toc {
    border: var(--border);
    padding: var(--space-xs);
    background: var(--surface);
  }
  .toc > .disclosure-label {
    display: none;
  }
  .toc > nav {
    display: grid;
  }
  .left-stack {
    display: flex;
    flex-direction: column;
    gap: var(--rail-gap);
    order: 4;
  }
  .left-rail .site-head {
    order: 1;
  }
}
@media (min-width: 1100px) {
  .layout {
    display: grid;
    grid-template-columns: var(--rail) var(--column) var(--rail);
    grid-template-rows: auto 1fr;
    justify-content: center;
    column-gap: var(--rail-gap);
    row-gap: var(--rail-gap);
    width: max-content;
    max-width: none;
    margin: var(--rail-gap) auto 0;
    position: relative;
  }
  .side-col {
    display: contents;
  }
  .left-rail {
    display: flex;
    flex-direction: column;
    gap: var(--rail-gap);
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: start;
    position: sticky;
    top: var(--rail-gap);
    width: var(--rail);
    max-width: var(--rail);
    max-height: calc(100dvh - 2 * var(--rail-gap));
    overflow: auto;
    /* No scrollbar gutter: a reserved gutter made the gap between the
       rail and the column wider than the gap on the column's right. */
    scrollbar-width: none;
    margin: 0;
    padding: 0;
    pointer-events: auto;
    text-align: center;
    z-index: 5;
  }
  /* The right rail's boxes stack from the top: the theme, then the search
     box. Margin notes start under them. */
  .right-rail {
    display: flex;
    flex-direction: column;
    align-self: start;
    grid-column: 3;
    grid-row: 1 / -1;
    gap: var(--rail-gap);
    position: static;
    width: var(--rail);
    max-width: var(--rail);
    margin: 0;
    padding: 0;
    pointer-events: auto;
    align-items: stretch;
    text-align: center;
    z-index: 5;
  }
  .left-stack {
    display: flex;
    flex-direction: column;
    gap: var(--rail-gap);
    min-width: 0;
    order: 4;
  }
  /* Left: the head, the sections, a post's read info, its contents.
     Right: the theme, then the search box. */
  .left-rail > .sec-box {
    order: 2;
  }
  .left-rail > .cite-box {
    order: 3;
  }
  .right-rail > .theme-sel {
    order: 1;
  }
  .right-rail > .post-nav {
    order: 2;
  }
  .left-rail .site-head,
  .left-rail .toc,
  .left-rail .cite-box,
  .left-rail .left-stack,
  .right-rail .theme-sel,
  .right-rail .post-nav {
    pointer-events: auto;
    width: 100%;
    max-width: var(--rail);
    min-width: 0;
    overflow-wrap: break-word;
    text-wrap: wrap;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  .left-rail .toc {
    max-width: var(--toc-rail);
    margin-left: auto;
  }
  .article-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    grid-column: 2;
    grid-row: 1 / -1;
    width: var(--column);
    max-width: var(--column);
    margin: 0;
  }
  .article-body {
    display: contents;
    width: auto;
    max-width: none;
    margin: 0;
  }
  .sec.mast {
    grid-row: 1;
    align-self: stretch;
    height: auto;
    display: grid;
  }
  .article-rest {
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: var(--rail-gap);
  }
  .article-rest > .post-card,
  .article-rest > .list-empty {
    margin-bottom: 0;
  }
  .right-rail .post-nav {
    display: flex;
    padding: 0;
    align-items: stretch;
  }
  .cite-box {
    display: grid;
    text-align: center;
  }
  /* The read info: a line, a rule, and the copy links. */
  .cite-box .nav-box {
    display: grid;
    grid-template-rows: var(--mast-line) var(--border-w) minmax(
        var(--mast-line),
        auto
      );
    row-gap: var(--space-xs);
    padding: var(--space-xs);
    max-width: none;
    margin: 0;
    text-align: center;
    background: var(--surface);
  }
  .cite-box .nav-rule {
    margin: 0;
    height: 0;
    align-self: center;
  }
  .cite-box .cite-url {
    margin: 0;
    height: var(--mast-line);
    line-height: var(--mast-line);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .cite-box .cite-copy {
    margin: 0;
    height: auto;
    min-height: var(--mast-line);
    line-height: var(--mast-line);
    align-self: center;
  }
  .post-nav > .disclosure-label {
    display: none;
  }
  .post-nav > .nav-box {
    display: block;
    max-width: none;
    margin: 0;
  }
  .left-rail .site-head nav {
    height: auto;
    min-height: var(--mast-line);
    white-space: normal;
    flex-wrap: wrap;
  }
  .sec.mast > header {
    align-content: start;
    height: 100%;
  }
  .sec.mast h1 {
    height: auto;
    overflow: visible;
  }
}
@media (max-width: 823px) {
  .toc-label {
    text-wrap: pretty;
  }
}
@media (min-width: 824px) {
  .toc {
    border: var(--border);
    padding: var(--space-xs);
    background: var(--surface);
  }
  .toc > .disclosure-label {
    display: none;
  }
  .toc > nav {
    display: grid;
  }
}
/* Beside one column or none, a tap on a mark floats its note right under
   it, and the page does not move; a tap in the note goes down to it in the
   notes list, and a tap anywhere else or Escape closes it (the page
   script sets data-float). A pointer that can hover opens it on hover, and
   the keyboard on focus, until Escape (data-hush). A note nested in
   another has no box of its own here: its mark links to the list. */
@media (max-width: 1099px) {
  .fn {
    position: relative;
  }
  .fn .fn-note:not(.fn-sub) {
    gap: var(--grid);
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    width: calc(var(--measure) * 0.75);
    /* On a phone, no wider than the text: the page's gutter on both sides. */
    max-width: min(
      calc(var(--measure) * 0.75),
      calc(100vw - 2 * var(--space-s))
    );
    margin: 0;
    padding: calc(var(--space-xs) + var(--grid)) var(--space-xs) var(--space-xs);
    z-index: 30;
    pointer-events: auto;
    cursor: pointer;
  }
  .fn[data-float] .fn-note:not(.fn-sub),
  .fn:not([data-hush]):has(:focus-visible) .fn-note:not(.fn-sub) {
    display: flex;
  }
}
/* A hit area on the mark's line, so the pointer can cross to the note,
   which opens right under it. The page script sets how far it runs to
   each edge of the column; a fixed width past the column made the page
   scroll sideways on a phone. */
@media (hover: hover) {
  @media (max-width: 1099px) {
    .fn:hover::before {
      content: "";
      position: absolute;
      top: calc(-1 * var(--grid));
      bottom: calc(-1 * var(--space-s));
      left: calc(-1 * var(--fn-hit-l, var(--space-s)));
      right: calc(-1 * var(--fn-hit-r, var(--space-s)));
    }
    .fn:hover .fn-note:not(.fn-sub) {
      display: flex;
    }
  }
}
/* With both rails the notes stand over the right rail (blog/sidenotes.css),
   so only the rail's own boxes take the pointer. */
@media (min-width: 1100px) {
  .right-rail,
  .right-rail .post-nav {
    pointer-events: none;
  }
  .right-rail .theme-sel,
  .right-rail .post-nav .nav-box,
  .right-rail .post-nav .disclosure-label {
    pointer-events: auto;
  }
}
@media (min-width: 824px) and (max-width: 1099px) {
  footer {
    margin-left: calc(
      50% - (var(--rail) + var(--rail-gap) + var(--column)) / 2 + var(--rail) +
        var(--rail-gap)
    );
    margin-right: auto;
  }
}
/* A phone card keeps the thumbnail beside the excerpt, but narrower, so
   the excerpt is not set in a column of a dozen characters. */
@media (max-width: 639px) {
  .post-card:has(.card-thumb) .card-row {
    grid-template-columns: calc(24 * var(--grid)) minmax(0, 1fr);
  }
}
/* On a phone the article has no window: no border around the text and no
   patterned ground behind it, so the text takes the full width inside a
   16px gutter. The head, the masthead, listing cards and the footer keep
   their boxes, on the plain surface. */
@media (max-width: 639px) {
  .wm {
    display: none;
  }
  body {
    background: var(--surface);
  }
  .layout,
  footer {
    width: min(
      var(--column),
      calc(
        100% - 2 * var(--space-s) - env(safe-area-inset-left, 0px) -
          env(safe-area-inset-right, 0px)
      )
    );
  }
  .article-rest > .sec:has(> .prose),
  .article-rest > .post-meta {
    border: 0;
    padding: var(--space-s) 0;
  }
  /* Endnote numbers start at the box's edge, so the space left of a
     number matches the space right of the text. Ten notes or more keep a
     number column, so every note's text starts on one edge. */
  .fn-end strong {
    min-width: 0;
    text-align: left;
  }
  .fn-endnotes:has(> .fn-end:nth-child(10)) .fn-end strong {
    min-width: 3ch;
  }
}
@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* blog/print — print normalization (absolute colors, no dither) */

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .post-nav,
  .toc,
  .wm,
  .theme-sel,
  .left-rail,
  .right-rail {
    display: none;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-weight: var(--weight-body);
  }
  .fn-note {
    display: block;
    position: static;
    width: auto;
    margin: var(--space-xs) 0;
  }
  .dither-fx,
  .ht-ink {
    display: none;
  }
  .ht,
  .ht-map,
  .ht img {
    filter: none;
    mix-blend-mode: normal;
    background: transparent;
  }
}
