/* Logg's one stylesheet: Logbook's fonts, colours, dark theme and type
   scale, on one quiet column. Logbook is the Astro site's design
   (src/styles/global.css). Its tokens and element styles are ported here;
   its layout is not. Public pages run no JavaScript, so there is no theme
   button: the theme is the system's. */

/* --- IBM Plex, from the site itself ---
   Only the faces Logbook uses: Serif 400, 400 italic and 600 for body
   text, Sans 400 and 600 for the interface, Mono 400 for dates and counts.
   Latin covers æ, ø, å and the umlauts; Latin Extended the rest of
   Europe's letters. The files are Fontsource 5.3.0's, under the SIL Open
   Font License 1.1 (fonts/OFL.txt). */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-serif-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-serif-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-serif-latin-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-serif-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-serif-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-serif-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Fallback faces ---
   Until IBM Plex arrives, text is set in a local font scaled to Plex's
   width and line height, so paragraphs don't re-wrap when it swaps in.
   size-adjust matches the width; the overrides are Plex's ascent and
   descent (1025 and 275 per 1000) divided by it. The numbers fit only the
   one local font each names: Georgia, Arial and Courier New, then Noto,
   Roboto and Droid for Android, and DejaVu for Linux. A face whose local
   font is missing is skipped. Each covers what Plex's Latin file covers,
   so a character Plex lacks still comes from the system's fonts. Headings
   are Plex Sans 600, so each sans fallback has its bold matched too. */
@font-face {
  font-family: 'Plex Serif Fallback';
  src: local('Georgia');
  size-adjust: 106.1%;
  ascent-override: 96.6%;
  descent-override: 25.9%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Serif Fallback Noto';
  src: local('Noto Serif'), local('NotoSerif-Regular');
  size-adjust: 98.3%;
  ascent-override: 104.2%;
  descent-override: 28%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Serif Fallback DejaVu';
  src: local('DejaVu Serif'), local('DejaVuSerif');
  size-adjust: 91.6%;
  ascent-override: 111.9%;
  descent-override: 30%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Sans Fallback';
  src: local('Arial');
  size-adjust: 100.6%;
  ascent-override: 101.9%;
  descent-override: 27.3%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Sans Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT');
  font-weight: 500 700;
  size-adjust: 97.3%;
  ascent-override: 105.3%;
  descent-override: 28.3%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Sans Fallback Roboto';
  src: local('Roboto'), local('Roboto-Regular');
  size-adjust: 101.4%;
  ascent-override: 101.1%;
  descent-override: 27.1%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Sans Fallback Roboto';
  src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto Medium'), local('Roboto-Medium');
  font-weight: 500 700;
  size-adjust: 103.6%;
  ascent-override: 98.9%;
  descent-override: 26.5%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Sans Fallback DejaVu';
  src: local('DejaVu Sans'), local('DejaVuSans');
  size-adjust: 88.7%;
  ascent-override: 115.5%;
  descent-override: 31%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Sans Fallback DejaVu';
  src: local('DejaVu Sans Bold'), local('DejaVuSans-Bold');
  font-weight: 500 700;
  size-adjust: 81.3%;
  ascent-override: 126%;
  descent-override: 33.8%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Mono Fallback';
  src: local('Courier New');
  size-adjust: 100%;
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Mono Fallback Droid';
  src: local('Droid Sans Mono'), local('DroidSansMono');
  size-adjust: 100%;
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plex Mono Fallback DejaVu';
  src: local('DejaVu Sans Mono'), local('DejaVuSansMono');
  size-adjust: 99.7%;
  ascent-override: 102.9%;
  descent-override: 27.6%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens --- */
:root {
  color-scheme: light dark;

  --font-body: 'IBM Plex Serif', 'Plex Serif Fallback', 'Plex Serif Fallback Noto', 'Plex Serif Fallback DejaVu', 'Charter', 'Bitstream Charter', Georgia, serif;
  --font-heading: 'IBM Plex Sans', 'Plex Sans Fallback', 'Plex Sans Fallback Roboto', 'Plex Sans Fallback DejaVu', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Plex Mono Fallback', 'Plex Mono Fallback Droid', 'Plex Mono Fallback DejaVu', 'JetBrains Mono', ui-monospace, monospace;

  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  /* The greys and rules lean towards the paper's warmth. */
  --color-text-secondary: #5e5a53;
  --color-text-tertiary: #6f6a61;
  --color-accent: #b02e2e;
  --color-accent-hover: #8f2424;
  --color-accent-soft: #f6e9e6;
  --color-on-accent: #fff;
  --color-border: #e6e3db;
  --color-rule: var(--color-border);
  --color-border-light: #efede7;
  --color-border-strong: #8a857b;
  --color-control-border: #d6d4cd;
  --color-tag-bg: #f2f1ec;
  --color-tag-text: #555;
  --color-chip-bg: #f4f2ec;
  --color-chip-border: #e3e0d8;
  --color-code-bg: #f3f2ed;
  --color-ok: #2f6b3a;
  --color-ok-soft: #e6f0e6;
  --color-wait: #8a5a00;
  --color-wait-soft: #f8eed8;

  /* The column's width: the spec's 42rem, where Logbook has 50rem. */
  --max-width: 42rem;
  /* The admin page's tables want more room than prose does. */
  --max-width-wide: calc(var(--max-width) * 1.5);

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04);
  /* What floats over the page, such as a field's suggestions. */
  --shadow-float: 0 4px 16px rgb(0 0 0 / 0.12);

  --transition: 0.15s ease;
}

/* Dark when the system is. */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #141413;
    --color-surface: #1c1c1a;
    --color-text: #d5d2cc;
    --color-text-secondary: #a39e94;
    --color-text-tertiary: #918b81;
    --color-accent: #e06c5f;
    --color-accent-hover: #ea8273;
    --color-accent-soft: #2e1d1a;
    /* White on the lighter dark-mode accent is 3.2:1; dark ink is 5.7:1. */
    --color-on-accent: #141413;
    --color-border: #2d2b27;
    /* The feed's rules, a step firmer than other borders on the dark page. */
    --color-rule: color-mix(in srgb, #2d2b27 88%, #d5d2cc);
    --color-border-light: #232321;
    --color-border-strong: #757471;
    --color-control-border: #4a4945;
    --color-tag-bg: #1f1f1d;
    --color-tag-text: #a19f97;
    --color-chip-bg: #252421;
    --color-chip-border: #35332e;
    --color-code-bg: #1c1c1a;
    --color-ok: #8fc79a;
    --color-ok-soft: #1a2a1d;
    --color-wait: #e3b55e;
    --color-wait-soft: #2c2415;
    --shadow-sm: none;
    --shadow-float: 0 4px 16px rgb(0 0 0 / 0.6);
  }
}

/* On the dark page, the map's greys turn over and darken: its land a
   step off the page, about the dark border's grey, and its streets darker
   lines in it, so it is no lighter slab than the page around it. */
@media (prefers-color-scheme: dark) {
  .map img {
    filter: invert(0.93) contrast(1.1) brightness(0.7);
  }
}

/* --- Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Room for the scrollbar on every page, scrolling or not, so the column
     and its navigation stay put from page to page; on both edges, so the
     column stays centred. */
  scrollbar-gutter: stable both-edges;
  /* The rubric's red, once, along the top of every page. */
  border-top: 3px solid var(--color-accent);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

/* --- The column ---
   The body is the page's one column: --max-width of text, with the
   gutters outside it. */
body {
  box-sizing: content-box;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-xl);
  /* A short page keeps its footer at the bottom of the screen. */
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 2 * var(--space-xl) - 3px);
}

body > main {
  flex: 1 0 auto;
}

/* --- Type --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--color-text);
  text-wrap: pretty;
  /* A long address, as in a repost's title, wraps instead of widening
     the page on a phone. */
  overflow-wrap: break-word;
}

h1 { font-size: 2.125rem; letter-spacing: -0.025em; line-height: 1.15; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }

p {
  margin-bottom: var(--space-md);
  text-wrap: pretty;
}

b, strong {
  font-weight: 600;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition), text-decoration-color var(--transition), background var(--transition), border-color var(--transition);
}

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

/* A link in running text is underlined: beside the text around it the
   accent is under 3:1, and in dark mode no red reaches both 3:1 against
   the text and 4.5:1 against the page (WCAG 1.4.1). Links with a class
   stay plain. */
:where(main :is(p, li, dd, td, figcaption, blockquote)) a:where(:not([class])),
.e-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

:where(main :is(p, li, dd, td, figcaption, blockquote)) a:where(:not([class])):hover,
.e-content a:hover {
  text-decoration-color: currentColor;
}

/* A post's body. */
.e-content {
  font-size: 1.125rem;
  line-height: 1.75;
  /* A long URL wraps instead of widening the page on a phone. */
  overflow-wrap: break-word;
}

.e-content p,
.e-content ul,
.e-content ol,
.e-content pre,
.e-content blockquote,
.e-content .table-scroll,
.e-content figure {
  margin-bottom: 1.25em;
}

.e-content > :first-child {
  margin-top: 0;
}

.e-content > :last-child {
  margin-bottom: 0;
}

/* A page that opens on a portrait, as About does, has it float right at
   13rem on a wide screen, so the text starts beside it and not below the
   fold. A phone keeps it at the column's width (#191). Only a page's
   body, which is main's own child, not a post's, where a photo that
   opens the text keeps its width. */
@media (min-width: 40rem) {
  main > .e-content > p:first-child:has(> img:only-child, > a:only-child > img) {
    float: right;
    width: 13rem;
    margin: 0 0 var(--space-md) var(--space-lg);
  }

  main > .e-content > p:first-child:has(> img:only-child, > a:only-child > img) img {
    display: block;
    width: 100%;
  }
}

/* A read, watch or listen's summary repeats its heading in a line, so it
   is set as the catalogue's, not as the review's. */
.work ~ .e-content > .p-summary {
  line-height: 1.5;
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-border-strong);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
}

/* It joins the catalogue entry above it. */
.h-entry > :is(.work, .status):has(+ .e-content > .p-summary:first-child) {
  margin-bottom: 0;
}

/* The space before the summary is inside the rule, so it runs on unbroken. */
.h-entry > .status:has(+ .e-content > .p-summary:first-child),
.h-entry > .work:has(+ .e-content > .p-summary:first-child) > .byline {
  margin-bottom: 0;
  padding-bottom: var(--space-xs);
}

.h-entry > .status:has(+ .e-content > .p-summary:first-child) {
  border-left: 2px solid var(--color-border-strong);
}

/* A post without a heading or photos, such as a note or a reply, is its
   words alone, set a size larger. */
.h-entry:not(:has(h1)) > .e-content {
  font-size: 1.25rem;
  line-height: 1.65;
}

/* A list's bullets hang near the column's edge, as in a book. */
.e-content :is(ul, ol) {
  padding-left: 1.1em;
}

.e-content li {
  padding-left: 0.15em;
  /* Long items read as separate points, not one wall. */
  margin-bottom: 0.5em;
}

/* A list inside a list item sits close to it. */
.e-content li > :is(ul, ol) {
  margin: var(--space-xs) 0 0;
}

.e-content h2,
.e-content h3,
.e-content h4 {
  margin: 2em 0 0.6em;
}

.e-content h2 { font-size: 1.375rem; }
.e-content h3 { font-size: 1.125rem; }
.e-content h4 { font-size: 1rem; }

/* A heading a link jumps to keeps a little room above it. */
.e-content :is(h1, h2, h3, h4, h5, h6)[id] {
  scroll-margin-top: var(--space-lg);
}

/* --- Table of contents ---
   An article's headings, above its text under a rule, in the dateline's
   quiet face; where the screen has room, beside the text (Wide screens). */
.toc {
  margin: var(--space-lg) 0;
  padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
  border-left: 2px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  line-height: 1.4;
}

.toc-title {
  margin: 0 0 var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  margin: var(--space-xs) 0 0;
}

.toc ol ol {
  padding-left: var(--space-md);
}

.toc a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.toc a:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dates and counts are set in Mono. */
time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* So is every count, Stats' bars and headline figures too, in figures of
   one width (#199). Mono has only a regular weight. */
.tag-count,
.tally,
.stats-year-count,
.stats-figure,
.places td:last-child,
.year-counts td:last-child {
  font-family: var(--font-mono);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* How long a recipe takes is words in a line of words, not a date. */
.recipe-facts time {
  font-family: inherit;
}

/* The line under a post with its date, set apart from the post by
   space alone. */
article > footer {
  margin-top: var(--space-lg);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* A post's kind, as the rubric the feed shows, before its date. */
.dateline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
}

/* A post's city line, in its footer: the city it was in, then the
   weather there at the time, an icon and the temperature, which link to
   Open-Meteo as the footer's other quiet links do. The icon is drawn in
   the text's colour, a little larger than the text, beside the
   temperature, which alone is underlined. */
.city-line .weather {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  vertical-align: bottom;
  white-space: nowrap;
}

.weather-icon {
  flex: none;
  width: 1.35em;
  height: 1.35em;
}

/* When the author marked an article as updated: a word and the day, a
   step quieter than when it was published. Mono sets its date, so a little
   room keeps the two apart. */
.dateline .updated {
  color: var(--color-text-tertiary);
}

.dateline .updated time {
  margin-left: 0.25em;
}

article > footer a {
  color: inherit;
}

article > footer a:hover {
  color: var(--color-text);
}

/* The footer's lines: the date, the post's tags, the people it tags and
   its copies elsewhere. */
article > footer p {
  margin-bottom: var(--space-xs);
}

article > footer p:last-child {
  margin-bottom: 0;
}

/* A post's tags, each a small label. */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  color: var(--color-text-secondary);
}

/* Its mark in the rubric's red. */
.tag-mark {
  color: var(--color-accent);
}

/* A tag links to its page, and says so when pointed at. */
a.tag {
  text-decoration: none;
}

a.tag:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* The index of every tag: each a chip with how many posts have it inside,
   the most used first; the whole chip is the link. */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
}

.tag-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

.tag-list a.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--color-chip-bg);
  border: 1px solid var(--color-chip-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.tag-list a.tag .tag-count {
  margin-left: 0.3em;
}

.tag-list a.tag:hover {
  border-color: var(--color-border-strong);
  text-decoration: none;
}

/* A series' status in its facts line: a small chip, in the colours of its
   state. */
.series-status {
  display: inline-block;
  padding: 0 0.45em;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.series-status.active {
  color: var(--color-ok);
  background: var(--color-ok-soft);
}

.series-status.paused {
  color: var(--color-wait);
  background: var(--color-wait-soft);
}

.series-status.finished,
.series-status.empty {
  color: var(--color-tag-text);
  background: var(--color-tag-bg);
}

/* Links to people and copies share the footer's colour, so they are
   underlined. The date links to the post itself, and a tag is marked. */
article > footer a:not(.u-url, .post-kind, .tag) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}

article > footer a:not(.u-url, .post-kind, .tag):hover {
  text-decoration-color: var(--color-accent);
}

/* --- A post, by its kind --- */
.h-entry h1 {
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}

:is(.work, .venue) > h1 {
  margin-bottom: var(--space-sm);
}

/* A work or venue's heading is the page's; its link is the place's
   page, in the heading's colour. */
.venue h1 {
  line-height: 1.3;
}

.venue h1 a {
  color: var(--color-text);
  text-decoration-line: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.14em;
  text-decoration-skip-ink: auto;
}

.venue h1 a:hover {
  color: var(--color-accent);
  text-decoration-color: currentColor;
}

/* What a response responds to, a link preview, a work's byline, a venue's
   address, and a read's progress and rating: one quiet line each. */
.responds-to,
.link-preview,
.byline,
.address,
.status,
.recipe-facts {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  overflow-wrap: break-word;
}

.h-entry > .responds-to,
.h-entry > .status,
.work > .byline,
.venue > .address {
  margin-bottom: var(--space-lg);
}

/* What a work or venue is, and a read's progress and rating, sit as
   one catalogue entry under its heading, marked by a rule. */
.work > .byline,
.venue > .address,
.h-entry > .status {
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-border-strong);
}

:is(.work:has(+ .status), .work:has(+ .e-content > .p-summary:first-child)) > .byline {
  margin-bottom: 0;
  padding-bottom: var(--space-xs);
}

/* What a like, repost, bookmark or reply responds to is marked by the
   accent, as a quote is, so the post's own words read as its. */
.h-entry > .responds-to {
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-accent);
}

/* A like or repost with no words of its own is the line itself, as large
   as a title. */
.h-entry:not(:has(.e-content)) > .responds-to {
  padding-left: 0;
  border-left: 0;
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-text-secondary);
}

/* Where Logg kept the page it responds to, the accent frames the line and
   what the page says together, as a reply's does (#195). */
.h-entry:not(:has(.e-content)) > .responds-to.cited {
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-accent);
}

/* Its date belongs to that one line, so it sits close under it. */
.h-entry:not(:has(.e-content)) > .responds-to {
  margin-bottom: 0;
}

.h-entry:not(:has(.e-content)) > footer {
  margin-top: var(--space-sm);
}

.h-entry:not(:has(.e-content)) > .responds-to a {
  color: var(--color-text);
  text-decoration-color: var(--color-accent);
  font-weight: 600;
  text-decoration-thickness: 1.5px;
  text-decoration-skip-ink: auto;
  text-underline-offset: 0.2em;
}

.h-entry:not(:has(.e-content)) > .responds-to a:hover {
  color: var(--color-accent);
}

/* A note's or a reply's link preview sits under its words, in a hairline
   frame rather than behind the accent, since the post doesn't respond to
   the page. */
.h-entry > .link-preview {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* The hairline all but vanishes on the dark page. */
@media (prefers-color-scheme: dark) {
  .h-entry > .link-preview {
    border-color: var(--color-border-strong);
  }
}

/* A page Logg kept the reply context or link preview of: the line that
   names it and who wrote it, then the start of what it says, and where
   and when it said it, each quieter than the last. */
.cited > p {
  margin: 0;
}

.responds-to.cited > .cited-text {
  margin-top: var(--space-xs);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--color-text-secondary);
}

.cited > .cited-about {
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--color-text-tertiary);
}

.cited-about > * + *::before {
  content: " · ";
}

/* Its author's face sits before their name, and is no part of the link's
   underline. */
.cited .face {
  margin-left: 0.125rem;
}

/* A face stays on the line of its name. */
.cited :is(.p-author, .cited-author) {
  white-space: nowrap;
}

/* The page's picture, such as a video's thumbnail, as Logg's own copy:
   beside what the page says, a third of the column wide. */
.cited:has(> .cited-picture, > picture > .cited-picture) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14rem;
  /* The lines keep their own heights, and a last row takes what a taller
     picture leaves over. */
  grid-template-rows: repeat(3, auto) 1fr;
  column-gap: var(--space-lg);
  align-items: start;
}

.cited:has(> .cited-picture, > picture > .cited-picture) > p {
  grid-column: 1;
}

:is(.cited, .cited > picture) > .cited-picture {
  grid-column: 2;
  grid-row: 1 / span 4;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

/* On a phone it heads what the page says, as wide as the column. */
@media (max-width: 40rem) {
  .cited:has(> .cited-picture, > picture > .cited-picture) {
    display: block;
  }

  :is(.cited, .cited > picture) > .cited-picture {
    display: block;
    margin-bottom: var(--space-sm);
  }
}

/* Under a like or repost with no words of its own, what the page says sits
   under the line, inside the accent's rule. */
.h-entry:not(:has(.e-content)) > .responds-to.cited > .cited-text {
  margin-top: var(--space-sm);
}

/* Their links are underlined, as links in running text are. */
.responds-to a,
.link-preview a,
.byline a,
.address a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}

.responds-to a:hover,
.link-preview a:hover,
.byline a:hover,
.address a:hover {
  text-decoration-color: var(--color-accent);
}

/* A byline's parts, a read's progress and rating, and what a recipe makes
   and how long it takes, are set apart by dots, outside any link. */
.byline > * + *::before,
.status > * + *::before,
.recipe-facts > * + *::before {
  content: " · ";
  color: var(--color-border-strong);
}

/* Photos share the column in a grid: one fills it, more sit side by
   side, cropped to squares so that the rows stay even. */
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.photos img {
  display: block;
  width: 100%;
  height: auto;
  /* Printed plates, with the page's square corners. */
  border-radius: var(--radius-sm);
  background: var(--color-code-bg);
  /* A dark photo keeps its edge on the dark page. */
  box-shadow: 0 0 0 1px var(--color-border);
}

/* On a post's page, each photo links to its full file. The link is the
   grid's cell, wrapped tight round its photo; it keeps a box, unlike a
   <picture>, since a link without one can't take the keyboard's focus. */
.photos > a {
  display: block;
  border-radius: var(--radius-sm);
}

.photos > a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* A lone photo's link shrinks to it, so the photo stays centred and the
   space either side of it links nowhere. */
.photos:not(:has(> :is(img, picture, a) + :is(img, picture, a))) > a {
  justify-self: center;
  max-width: 100%;
}

/* One photo keeps its shape, but a tall one stops short of the screen's
   height, so the words under it show. */
.photos:not(:has(> :is(img, picture, a) + :is(img, picture, a))) img {
  width: auto;
  justify-self: center;
  max-height: min(80vh, 44rem);
}

.photos:has(> :is(img, picture, a) + :is(img, picture, a)) img {
  aspect-ratio: 1;
  object-fit: cover;
}

/* A mention's author shows with their face, small and round, before their
   name. */
.face {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.3125rem;
  vertical-align: -0.3em;
  border-radius: 50%;
  background: var(--color-code-bg);
  box-shadow: 0 0 0 1px var(--color-border);
}

/* An author without a face has their initial in its place, a small seal
   in the rubric's red, so the names still line up. */
span.face {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-align: center;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  box-shadow: none;
}

/* A check-in's map: a quiet strip of the streets around the venue, in
   the page's greys, with a pin in the rubric's red at its centre, where
   the venue is. It links to the place on OpenStreetMap. */
.map {
  margin: 0 0 var(--space-lg);
}

/* Its edge is on the link, not the image, so the dark page's filter
   leaves it alone. */
.map > a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--color-border);
}

.map img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  background: var(--color-code-bg);
}

.map > a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.875rem;
  height: 0.875rem;
  margin: -0.4375rem 0 0 -0.4375rem;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-bg), 0 1px 4px 3px rgb(0 0 0 / 0.15);
}

.map figcaption {
  margin-top: var(--space-xs);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-align: right;
  color: var(--color-text-tertiary);
}

.map figcaption a {
  display: inline;
  color: inherit;
  text-decoration: none;
}

.map figcaption a:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
}

/* A trip's map is 3:2, as tracks are seldom as wide as a street's strip.
   It links nowhere, so its edge is on a frame around it, which the dark
   page's filter leaves alone. Its track is drawn into it in the accent,
   so the dark page turns it over as the map page's maps, and turns the
   hue back, which keeps the track red. */
.trip-map .map-frame {
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--color-border);
}

.trip-map img {
  aspect-ratio: 3 / 2;
}

@media (prefers-color-scheme: dark) {
  .trip-map img {
    filter: invert(0.93) hue-rotate(180deg) contrast(1.1) brightness(0.7) saturate(1.5);
  }
}

/* A trip's facts under its map, set as a recipe's are. */
.trip-facts {
  margin-bottom: var(--space-lg);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  overflow-wrap: break-word;
}

.trip-facts > * + *::before {
  content: " · ";
  color: var(--color-border-strong);
}

.trip-facts time {
  font-family: inherit;
}

/* A read, watch or listen shows its work's cover beside its heading, as
   a catalogue card does, and its review flows around it. */
:is(.h-entry, .h-entry > picture) > .cover {
  float: right;
  width: 7rem;
  height: auto;
  margin: 0 0 var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  background: var(--color-code-bg);
  box-shadow: 0 0 0 1px var(--color-border), var(--shadow-sm);
}

.h-entry:has(> .cover, > picture > .cover) {
  display: flow-root;
}

.h-entry > :is(.cover, picture) ~ footer,
.h-entry > :is(.cover, picture) ~ .responses {
  clear: both;
}

/* In a list, the cover is a small thumbnail at the entry's right. */
.h-feed > article:has(> .cover, > picture > .cover) {
  display: flow-root;
}

.h-feed > article > :is(.cover, picture) ~ footer {
  clear: none;
}

:is(.h-feed > article, .h-feed > article > picture) > .cover {
  width: 3rem;
  margin: 0.2rem 0 var(--space-xs) var(--space-md);
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--color-border);
}

/* On the dark page the page's own border is too faint to see round a
   cover, so a cover has a firmer one there, as it has in light (#189). */
@media (prefers-color-scheme: dark) {
  :is(.h-entry, .h-entry > picture, .h-feed > article, .h-feed > article > picture) > .cover {
    box-shadow: 0 0 0 1px var(--color-control-border);
  }
}

/* In a list, a trip's map is a small thumbnail at the entry's right, as a
   cover is, but in the column on every screen, as it is wider than the
   margin's covers. Its edge is on its frame, as the trip's page's map's
   is, so the dark page's filter leaves it alone, and its photos, if any,
   start under it. */
.h-feed > article:has(> .trip-thumb) {
  display: flow-root;
}

.h-feed > article > .trip-thumb {
  float: right;
  width: 6rem;
  margin: 0.2rem 0 var(--space-xs) var(--space-md);
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--color-border);
}

.h-feed > article > .trip-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}

.h-feed > article > .trip-thumb ~ .photos {
  clear: both;
}

@media (prefers-color-scheme: dark) {
  .h-feed > article > .trip-thumb img {
    filter: invert(0.93) hue-rotate(180deg) contrast(1.1) brightness(0.7) saturate(1.5);
  }
}

/* In a list, a post's photos are a preview under its words: one at the
   column's width, cut to 3:2, and several side by side, square, up to two
   rows of three. The post's page shows them whole. */
.h-feed > article > .photos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xs);
  margin: var(--space-sm) 0 0;
}

/* The first thing in the entry, under its kind. */
.h-feed > article > .post-kind:first-child + .photos {
  margin-top: 0;
}

.h-feed > article > .photos:not(:has(> :is(img, picture) + :is(img, picture))) {
  grid-template-columns: minmax(0, 1fr);
}

.h-feed > article > .photos:has(> :is(img, picture) + :is(img, picture)):not(:has(> :is(img, picture) + :is(img, picture) + :is(img, picture))) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.h-feed > article > .photos:not(:has(> :is(img, picture) + :is(img, picture))) img {
  width: 100%;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* A pair is a step lower than squares, so photos stay plates in the log
   and not posters. */
.h-feed > article > .photos:has(> :is(img, picture) + :is(img, picture)):not(:has(> :is(img, picture) + :is(img, picture) + :is(img, picture))) img {
  aspect-ratio: 4 / 3;
}

.h-feed > article > .photos > :nth-child(n + 7) {
  display: none;
}

/* A check-in's photos in a list, an entry that has no more to show than
   the place, are capped at 14rem and cropped, so a list of them stays
   short. The post's page and the photos' own list show them whole (#179).
   The cap names the photos' own selector to outrank the shapes above.
   The entry is found by its kind's link, at the entry's top (#212) or in
   its footer. */
.h-feed > article:has(> a.post-kind[href="/checkins/"], > footer > a.post-kind[href="/checkins/"]) > .photos img {
  max-height: 14rem;
  object-fit: cover;
}

/* The mentions the author approved, under the post: below a line, each
   kind under a small heading, likes and reposts as a line of names, and
   each reply or mention on its own card, with who wrote it and where,
   over what it says. */
.responses {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  /* Each kind's heading beside its names or replies. */
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-md) var(--space-lg);
  align-items: baseline;
}

.responses h2,
.respond h2,
.release h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.responses p,
.responses li,
.release li {
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.responses > p {
  margin-bottom: 0;
  font-family: var(--font-heading);
  color: var(--color-text-secondary);
}

/* Likes and reposts are a list of names, in the text's colour, those
   with a page quietly underlined. */
.responses > p a {
  color: var(--color-text);
  text-decoration: none;
}

/* In a row of likes the faces are what the row shows, at the row's line
   height; a reply's byline keeps them smaller. */
.responses > p .face {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: -0.4em;
}

.responses > p span.face {
  font-size: 0.75rem;
  line-height: 1.5rem;
}

.responses > p a .p-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}

.responses > p a:hover {
  color: var(--color-accent);
}

.responses > p a:hover .p-name {
  text-decoration-color: currentColor;
}

.responses ol {
  display: grid;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

/* A reply or mention is marked as quoted, as what a post responds to
   is. */
.responses li {
  margin-bottom: 0;
  padding: 0 0 0 var(--space-md);
  border-left: 2px solid var(--color-border-strong);
}

.responses .byline {
  margin-bottom: 0;
  font-size: 0.8125rem;
}

.responses li .byline:not(:last-child) {
  margin-bottom: var(--space-xs);
}

.responses .byline .p-author {
  font-weight: 600;
  color: var(--color-text);
}

.responses .byline a {
  text-decoration: none;
}

.responses .byline a:hover .p-name,
.responses .byline a:not(.p-author):hover {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
}

/* Where a reply came from is the quietest part of it. */
.responses .byline a:not(.p-author) {
  color: var(--color-text-tertiary);
}

.responses .byline a:not(.p-author):hover {
  color: var(--color-accent);
}

.responses .p-content,
.responses li > .p-name,
.responses > :last-child {
  margin-bottom: 0;
}

.responses li > .p-name {
  font-weight: 600;
}

/* Under the post and its responses, below a line as they are, the form
   that sends a response written elsewhere: the field as wide as the
   column leaves beside its button, as the search page's, and over it
   what became of the last one sent. A refused one says why as the admin
   page says why it refused an edit (.refused). */
.respond {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.respond h2 {
  margin-bottom: var(--space-sm);
}

/* The form is folded under its heading, which is the summary, and opens
   when a notice shows (#197). Closed, the heading has no gap under it. */
.respond summary {
  cursor: pointer;
}

.respond summary h2 {
  display: inline;
  margin: 0;
}

.respond[open] summary {
  margin-bottom: var(--space-sm);
}

.respond > p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* A response taken has the shape of a refusal (.refused), in the page's
   quiet colours. */
.respond .notice {
  padding: 0.75rem var(--space-md);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-code-bg);
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

form.respond-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: var(--space-sm);
}

form.respond-form label {
  grid-column: 1 / -1;
}

form.respond-form input {
  max-width: none;
  margin-bottom: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
}

/* The Send and Search buttons are outlined in the accent and fill on
   hover, so the form's one button is not the loudest thing on the page
   (#182). The accent stays whole in kind labels, ratings and end marks. */
form.respond-form button,
form.search button {
  color: var(--color-accent);
  background: transparent;
}

form.respond-form button:hover,
form.search button:hover {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

ul, ol {
  padding-left: 1.4em;
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-xs);
  padding-left: 0.2em;
}

li::marker {
  color: var(--color-text-tertiary);
}

blockquote {
  margin: 0 0 var(--space-md);
  padding: 0.1em 0 0.1em 1.1em;
  border-left: 2px solid var(--color-accent);
  color: var(--color-text);
}

blockquote p:last-child {
  margin-bottom: 0;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* A photo with sizes comes in a <picture>, which offers them as WebPs.
   It takes no box of its own, so its <img> lays out as if it stood
   alone; the rules for photos, covers and pictures name both. Its
   <source> takes none either, or it would fill a cell of the photos'
   grid. */
picture {
  display: contents;
}

picture > source {
  display: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border-light);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
}

pre {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  padding: var(--space-md) 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  line-height: 1.65;
  tab-size: 4;
}

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

/* Highlighted code: a fenced block that names its language carries
   chroma's class for each token's type. Four kinds of token take the
   site's own colours, so the dark theme follows from the tokens; the rest
   keep the text's colour. */
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs,
.chroma .cp, .chroma .cpf {
  color: var(--color-text-secondary);
  font-style: italic;
}

.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp,
.chroma .kr, .chroma .kt, .chroma .nt {
  color: var(--color-accent);
}

.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl,
.chroma .sd, .chroma .s2, .chroma .se, .chroma .sh, .chroma .si,
.chroma .sx, .chroma .sr, .chroma .s1, .chroma .ss {
  color: var(--color-ok);
}

.chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi,
.chroma .il, .chroma .mo, .chroma .nv, .chroma .nb {
  color: var(--color-wait);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* A table spans the column, its rows with it (#176). One that can be wider
   than a phone, such as a post's, sits in a .table-scroll, which scrolls
   sideways instead of the page: a table can't scroll itself without
   giving up its width, as display: block's rows shrink to their cells. */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

.table-scroll > table {
  margin-bottom: 0;
}

th, td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

/* A year's page sets its months over its kinds, their columns in line. */
.year-counts th:first-child,
.year-counts td:first-child {
  width: 9rem;
}

th {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* --- Series ---
   A post in a series: its place among the series' posts, and the posts
   either side of it, after its content and above its tags, once for each
   series it is in. */
.series {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.series + .series {
  margin-top: var(--space-lg);
}

.series-position {
  margin: 0;
}

.series-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  margin: var(--space-sm) 0 0;
}

/* The next post sits at the right, even when the previous one is missing. */
.series-steps [rel="next"] {
  margin-left: auto;
}

/* --- Previous and next ---
   Below a post, the posts of its kind published before and after it: the
   older at the left, the newer at the right, side by side at every width,
   each its kind in the dateline's small capitals over its title. */
.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-heading);
}

.steps a {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  color: var(--color-text);
  text-decoration: none;
}

.steps [rel="next"] {
  grid-column: 2;
  text-align: right;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.steps [rel="prev"] .step-label::before {
  content: "‹ ";
}

.steps [rel="next"] .step-label::after {
  content: " ›";
}

/* A long title is cut after two lines, so the two links stay one row
   at every width. */
.step-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.9375rem;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.steps a:hover .step-title {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Posts nearby ---
   Under a post with a place, the posts near it, nearest first, laid out
   as its responses are: the heading beside a list, each line its kind,
   its title and how far it is. */
.nearby {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-md) var(--space-lg);
  align-items: baseline;
  font-family: var(--font-heading);
}

.nearby h2 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.nearby ol {
  display: grid;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.nearby li {
  margin: 0;
  padding: 0;
  overflow-wrap: break-word;
}

.nearby-kind {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
}

.nearby a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}

.nearby a:hover {
  text-decoration-color: var(--color-accent);
}

.nearby-distance {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* On a phone the heading sits above the list, which takes the width. */
@media (max-width: 40rem) {
  .nearby {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-sm);
  }
}

/* What a series is and how far along, on the index and above a series'
   posts, in the quiet face of a post's dateline. */
.series-about,
.series-facts,
.venue-facts,
.series-more,
.list-index,
.list-more,
.release-day {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.series-about,
.list-index {
  margin: 0 0 var(--space-xs);
}

.series-description {
  margin: 0 0 var(--space-xs);
}

/* A series' page draws the list's rule under how far along it is, not
   under its name, a venue's page under where the venue is, and the list
   of every post under its row of years. */
.h-feed > h1:has(+ .series-description),
.h-feed > h1:has(+ .venue-facts),
.h-feed > h1:has(+ .years) {
  margin-bottom: var(--space-sm);
  padding-bottom: 0;
  border-bottom: 0;
}

.h-feed > .series-facts,
.h-feed > .venue-facts {
  margin: 0 0 var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

/* A series with trips has one map of all their tracks and their totals
   under how far along it is, set as a trip's map and facts are, and the
   list's rule under the totals. */
.h-feed > .series-facts:has(+ .series-map),
.h-feed > .series-facts:has(+ .series-totals) {
  margin-bottom: var(--space-md);
  padding-bottom: 0;
  border-bottom: 0;
}

.h-feed > .series-totals {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.series-more,
.list-more {
  margin: var(--space-lg) 0 0;
}

/* The index: each series under the last, its name over what it is. */
.series-lede {
  color: var(--color-text-secondary);
}

.series-list {
  display: grid;
  gap: var(--space-lg);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
}

.series-list > li {
  margin: 0;
  padding: var(--space-lg) 0 0;
  border-top: 1px solid var(--color-rule);
}

/* A series' name is set as a list's titles are: in the text's colour,
   the accent on hover, and not underlined, as it is no link in running
   text. So is a release's version. */
.series-list h2,
.release h2 {
  margin: 0 0 var(--space-xs);
}

.series-list h2 a,
.release h2 a {
  color: var(--color-text);
  text-decoration: none;
}

.series-list h2 a:hover,
.release h2 a:hover {
  color: var(--color-accent);
}

/* A series page's posts are numbered in their footers, oldest first:
   #3 · 20 September 2026. */
.series-no {
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.series-no::after {
  content: "\00A0\00B7";
}

.series-list .series-facts {
  margin: 0 0 var(--space-xs);
}

/* --- The home page's pinned block ---
   The pinned posts and the featured series above the list, one a line,
   under a rubric set as a post's kind is. Its only other red is a review's
   rating, as in the list. The header's rule
   above it is the block's only rule; space sets it off from the list. On
   wide screens the rubric hangs in the margin, as the kinds do. */
.pinned {
  position: relative;
  margin: 0 0 var(--space-xl);
}

.pinned h2 {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.pinned ul {
  display: grid;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A line that wraps holds together, closer than the gap to the next. */
.pinned li {
  margin: 0;
  padding: 0;
  line-height: 1.45;
}

.pinned a {
  color: var(--color-text);
  text-decoration: none;
}

.pinned a:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
}

.pinned-about {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
  /* Its kind and month wrap as one, never apart. */
  white-space: nowrap;
}

/* --- The changelog ---
   Each release under a rule, as the index sets each series: its version
   over its day in the series' quiet face, then its notes, then its changes
   under small headings, as a post's responses are headed. */
.release {
  margin: var(--space-lg) 0 0;
  padding: var(--space-lg) 0 0;
  border-top: 1px solid var(--color-rule);
}

.release-day {
  margin: 0 0 var(--space-md);
}

.release h3 {
  margin: var(--space-md) 0 var(--space-sm);
}

/* --- Lists ---
   The home page and each kind's list: one post under another, with its
   title or the start of its content, over a line with its kind and date. */
.h-feed > h1 {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.h-feed > article {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-rule);
}

.h-feed > article:first-of-type {
  padding-top: 0;
}

.h-feed > article:last-of-type:not(:has(~ .pagination)) {
  border-bottom: 0;
}

.h-feed > article h2 {
  margin-bottom: var(--space-xs);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

/* A line a post was given, such as "Finished reading …", is not a title
   the author wrote: it is set as a log's small lead-in, and the entry sits
   compact, so the author's own words lead the feed. */
.h-feed > article h2:not(.p-name) {
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.5;
  /* Fills the first line, and keeps a rating off a line of its own. */
  text-wrap: pretty;
}

/* A step quieter where the author's own words follow, but darker than the
   date; alone, it is the entry. */
.h-feed > article h2:not(.p-name):has(+ .p-summary) a {
  color: color-mix(in srgb, var(--color-text) 78%, var(--color-bg));
}

/* In a list of one kind, every entry has such a line, so it is the
   list's own heading, at the body's size. */
.h-feed.one-kind > article h2:not(.p-name) {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.h-feed.one-kind > article h2:not(.p-name) a {
  color: var(--color-text);
}

.h-feed:not(.one-kind) > article:has(> h2:not(.p-name)) {
  padding-block: var(--space-md);
}

.h-feed:not(.one-kind) > article:first-of-type:has(> h2:not(.p-name)) {
  padding-top: 0;
}

/* What the author wrote under it, such as a review, in their own voice. */
.h-feed > article > h2:not(.p-name) + .p-summary {
  font-size: 1.0625rem;
  color: var(--color-text);
}

/* A post with no title is the author's words alone, a size larger, whether
   a year mark leads the entry or not. */
.h-feed > article:not(:has(> h2)) > .p-summary {
  font-size: 1.1875rem;
  line-height: 1.6;
}

.h-feed > article h2 a {
  color: var(--color-text);
}

.h-feed > article h2 a:hover {
  color: var(--color-accent);
}

/* A like, repost, bookmark or reply is headed by what it responds to
   (#201): the verb, and who wrote a page without a title, a step quieter
   than the page's title, then its site in small mono. A bookmark's own
   title has the site on a line under it. */
.h-feed > article h2 .lead-verb,
.h-feed > article h2 .lead-by {
  font-weight: 400;
  color: var(--color-text-secondary);
}

.h-feed > article .lead-site {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.h-feed > article > p.lead-site {
  margin: 0 0 0.375rem;
}

/* A repost or a reply quotes the start of the page under it, two lines at
   most, then who wrote it and where, under a grey rule: quieter than the
   accent's rule on the post's own page. */
.h-feed > article > .lead-cite {
  margin: 0.25rem 0 0.5rem;
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-border-strong);
}

.lead-cite > p {
  margin: 0;
}

.lead-cite > .lead-cite-text {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-cite > .lead-cite-about {
  margin-top: 0.125rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text-tertiary);
}

.lead-cite-about > * + *::before {
  content: " · ";
}

.h-feed > article > .lead-cite + .p-summary {
  margin-top: 0.25rem;
}

.h-feed .p-summary {
  font-size: 1.0625rem;
  line-height: 1.65;
  margin-bottom: 0;
  overflow-wrap: break-word;
}

/* Where a read's summary leads its content, the status line doesn't say
   again what the summary says: "Finished", and the rating where the
   summary ends on it. Parsers still read them. */
.h-entry > .status:has(+ .e-content > .p-summary:first-child) > :is(.p-progress, .p-read-status) {
  display: none;
}

.h-entry > .status:has(+ .e-content > .p-summary:first-child) > :is(.p-progress, .p-read-status) + *::before {
  content: none;
}

.h-entry > .status:has(+ .e-content > .p-summary:first-child):not(:has(> span:has(> .p-rating))) {
  display: none;
}

/* Where a read's summary ends on its rating, its status line doesn't say it
   again; parsers still read p-rating. */
.h-entry > .status:has(+ .e-content > .p-summary .rating) > span:has(> .p-rating) {
  display: none;
}

.h-entry > .status:has(+ .e-content > .p-summary .rating):not(:has(> :not(span:has(> .p-rating)))) {
  display: none;
}

/* A rating is the author's grade, marked in the rubric's red. */
.rating {
  color: var(--color-accent);
  letter-spacing: 0.04em;
}

/* A lead-in's last words stay on one line with its rating. */
.kept {
  white-space: nowrap;
}

/* An article's title leads the feed, a step above the short posts. */
.h-feed > article:has(> .post-kind[href$="/articles/"]) > h2.p-name {
  margin-bottom: var(--space-sm);
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* Over the author's own words, the line a post was given steps back to
   the regular weight. */
.h-feed:not(.one-kind) > article h2:not(.p-name) {
  font-weight: 400;
}

.h-feed > article h2:not(.p-name):has(+ .p-summary) {
  margin-bottom: 0.375rem;
}

/* The whole entry opens its post: its date's link covers it, under the
   title's and the kind's own links. */
.h-feed > article {
  position: relative;
}

.h-feed > article > footer .u-url::after {
  content: "";
  position: absolute;
  inset: 0;
}

.h-feed > article > h2 a,
.h-feed > article > .post-kind,
.h-feed > article > footer .weather {
  position: relative;
  z-index: 1;
}

.h-feed > article:hover > footer .u-url {
  color: var(--color-accent);
}

/* Focused, the date's link outlines the whole entry it opens. */
.h-feed > article > footer .u-url:focus-visible {
  outline: none;
}

.h-feed > article > footer .u-url:focus-visible::after {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* A post with a title shows the start of its content under it, quieter. */
.h-feed > article h2.p-name + .p-summary {
  font-size: 1.0625rem;
}

/* An article's excerpt is the start of a longer text: quieter, and cut
   after three lines. A named bookmark's note is the author's own words
   whole, as under any other lead-in. */
.h-feed > article:has(> .post-kind[href$="/articles/"]) > h2.p-name + .p-summary {
  color: color-mix(in srgb, var(--color-text) 78%, var(--color-bg));
}

.h-feed > article > footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-top: 0;
  border-top: 0;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* A month heads its first entry on the home page and in the list of every
   post, set as a list's year is. On narrow screens it is a small line above the
   post: the entry's padding leaves the space above, so the heading takes
   the same space above itself. */
.h-feed > .month {
  margin: 0 0 var(--space-sm);
  padding-top: var(--space-lg);
  font: 400 0.8125rem/1.5 var(--font-heading);
  color: var(--color-text-secondary);
}

.h-feed > .month:first-of-type {
  padding-top: 0;
}

.h-feed > .month + article {
  padding-top: 0;
}

/* Where a year of the list of every post begins with its month, the
   year's line stands first and the month's under it: the heading leaves a line above itself,
   and the year, which the entry holds, moves up into it. */
.h-feed > .month:has(+ article > .year-mark) {
  padding-top: calc(var(--space-lg) + 1.21875rem);
}

.h-feed > .month:first-of-type:has(+ article > .year-mark) {
  padding-top: 1.21875rem;
}

.h-feed > .month + article > .year-mark {
  position: absolute;
  top: calc(-2 * 1.21875rem - var(--space-sm));
  margin: 0;
}

/* Where a list's year begins, its first post opens with the year and what
   the year holds. On narrow screens it sits above the post. */
.year-mark {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text-tertiary);
}

.year-mark .year {
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
}

.year-mark .tally::before {
  content: "· ";
}

/* A year's mark and a month's heading link their pages, in their own
   quiet colour until pointed at. */
.h-feed > .month a {
  color: inherit;
}

.year-mark a.year:hover,
.h-feed > .month a:hover {
  color: var(--color-accent-hover);
}

/* A post's kind, as a rubric in the accent, as old books marked their
   labels in red, linking to its list. */
.post-kind {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.h-feed > article > .post-kind,
.h-entry .dateline .post-kind {
  color: var(--color-accent);
}

/* A feed entry opens with its kind, on a line of its own (#212), so a
   reader knows what an entry is before reading it. Where the margin has
   room, it hangs there instead (Wide screens). */
.h-feed > article > .post-kind {
  display: block;
  width: fit-content;
  margin-bottom: 0.25rem;
}

/* In a list of one kind, every post's kind is the list's own, which its
   heading already names. */
.h-feed.one-kind .post-kind {
  display: none;
}

.h-feed > article > .post-kind:hover,
.h-entry .dateline .post-kind:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Newer posts on the left, older on the right, and where the page is
   between them, wherever a link is missing. */
.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-md);
  margin-top: 0;
  padding-top: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
}

.pagination [rel="prev"] {
  grid-column: 1;
  justify-self: start;
}

.pagination span {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* On the first page, the count starts the line, as a ledger's does. */
.pagination:not(:has([rel="prev"])) span {
  grid-column: 1;
  justify-self: start;
}

.pagination [rel="next"] {
  grid-column: 3;
  justify-self: end;
}

.pagination a {
  /* A target a thumb can hit. */
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  font-weight: 600;
  color: var(--color-accent);
}

.pagination a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- The site's header and footer ---
   Ported from the archive's stylesheet, its .site-header, .site-nav and
   .site-footer rules, without the sticky header, the avatar and the
   theme button, and in the column: the site's name over its tagline,
   beside the main navigation, which wraps under them when the column is
   too narrow for both; and under the page, the licence, the feed, the
   author's profiles and the kinds' lists, small and quiet. Their lists
   of links flow in lines, like words. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-lg);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-xl);
  /* A ledger's double rule. */
  border-bottom: 3px double color-mix(in srgb, var(--color-border-strong) 50%, var(--color-bg));
  font-family: var(--font-heading);
}

/* The home page's heading: the name, looking as it does on every page. */
.site-header h1 {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
}

/* The author's photo beside the name and tagline, the same on every
   page. */
.site-id {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.site-avatar {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--color-border);
}

.site-name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

.site-name:hover {
  color: var(--color-accent);
}

.site-tagline {
  margin-bottom: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.site-header ul,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.site-header li,
.site-footer li {
  margin-bottom: 0;
  padding-left: 0;
}

.site-header ul {
  column-gap: var(--space-lg);
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  /* A target a thumb can hit. */
  min-height: 44px;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.site-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--color-text-tertiary);
}

.site-footer p {
  margin-bottom: var(--space-xs);
}

.site-footer ul {
  column-gap: var(--space-lg);
  /* Lines tall enough for a thumb's target, 24px. */
  line-height: 2;
}

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

.site-header nav a:hover,
.site-footer a:hover {
  color: var(--color-text);
}

/* The licence is a link in running text, so it is underlined. */
.site-footer p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}

.site-footer p a:hover {
  text-decoration-color: var(--color-accent);
}

/* The footer's links, under a hairline of their own. */
.site-footer nav {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.site-footer nav a {
  color: var(--color-text-secondary);
}

/* The footer's links in groups, each under a label in the accent, as a
   rubric is: the label in a column of its own, its links flowing in a
   line beside it, a hairline between groups. On a phone the label sits
   over its links. */
.footer-groups {
  display: grid;
  gap: var(--space-sm);
}

.footer-group {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0 var(--space-md);
}

.footer-group .footer-label {
  margin: 0;
  color: var(--color-accent);
}

.footer-group ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 2;
}

.footer-group + .footer-group {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

/* The link to the list the page is on: in the text's colour, and
   underlined, since in dark mode the two greys are too close to tell
   apart by colour alone. */
.site-header a[aria-current="page"],
.site-footer a[aria-current="page"] {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

/* Under a post's responses or its form, the footer follows a little
   closer. */
body:has(.responses) .site-footer,
body:has(.respond) .site-footer {
  margin-top: var(--space-xl);
}

/* --- The footer's webrings ---
   The footer's last part, under its groups and their hairline: a
   line of rings, each ← Name →, that reads like the footer's other
   links, then a row of badges. A ring's name is as long as it is, so the
   line flows like words rather than in the kind lists' columns. */
.site-footer .webrings ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-lg);
}

/* An arrow is one character; room on either side makes it a target a
   thumb can hit. */
.webrings a[aria-label] {
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

/* Badges are pixel art in fixed colours, the same in light and dark:
   never rounded, smoothed or recoloured, never drawn larger than they
   are, and smaller only to fit a narrow column. Ones 30 and 31 pixels
   tall line up on their middles. */
.site-footer .webring-badges {
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
  line-height: 0;
}

.webring-badges li {
  min-width: 0;
}

.site-footer .webring-badges a {
  display: block;
}

.webring-badges img {
  display: block;
  border-radius: 0;
  image-rendering: pixelated;
}

/* On a phone the footer's other links each fill a cell of a row of
   three; a ring's arrows and name stay together on one line. */
@media (max-width: 640px) {
  .site-footer .webrings a {
    width: auto;
  }

  .site-footer .webrings a[aria-label] {
    justify-content: center;
    min-width: 24px;
  }
}

/* --- Pages with a message: not found and gone --- */
main > h1:first-child {
  margin-bottom: var(--space-md);
}

/* --- Forms ---
   The admin page's: a label over each field, fields as wide as the
   column, and buttons in the accent. Browsers set fields and buttons in
   faces and colours of their own, so they are given the site's. */
label {
  display: block;
  margin-bottom: var(--space-xs);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

textarea {
  display: block;
  width: 100%;
  margin-bottom: var(--space-lg);
  padding: 0.75rem var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  resize: vertical;
  tab-size: 2;
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* A one-line field, such as the host the mentions page blocks. */
input {
  display: block;
  width: 100%;
  max-width: 24rem;
  margin-bottom: var(--space-md);
  padding: 0 0.75rem;
  min-height: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea:hover,
input:hover {
  border-color: var(--color-border-strong);
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

::placeholder {
  color: var(--color-text-tertiary);
  opacity: 1;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-on-accent);
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

button:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* --- The admin page ---
   Wider than the public column, for its tables, with its navigation, to
   the posts and the mentions, over every page. */
body:has(> nav.admin) {
  max-width: var(--max-width-wide);
}

/* The edit form keeps the column prose has, under the same header. */
body:has(> nav.admin):not(:has(.posts, .mentions, .followers, .visits)) main {
  max-width: var(--max-width);
}

nav.admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

/* The admin heads its navigation with its own name. */
nav.admin::before {
  content: "Logg";
  margin-right: var(--space-md);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

nav.admin a {
  padding: var(--space-xs) 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--color-text-secondary);
}

nav.admin a:hover {
  color: var(--color-text);
  background: var(--color-chip-bg);
}

/* The current tab is marked as the public navigation marks its page. */
nav.admin a[aria-current] {
  color: var(--color-text);
  background: none;
  text-decoration: underline 2px var(--color-accent);
  text-underline-offset: 0.45em;
}

body:has(> nav.admin) main > h1 {
  margin-bottom: var(--space-sm);
  font-size: 1.75rem;
}

body:has(> nav.admin) main > h2 {
  margin: var(--space-2xl) 0 var(--space-sm);
}

body:has(> nav.admin) main > p:not(.refused) {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

body:has(> nav.admin) main > p + form {
  margin-top: var(--space-lg);
}

/* Its tables sit on a card, set in the interface's face. */
.posts,
.mentions,
.series-table,
.pages-table,
.people-table,
.visits {
  font-family: var(--font-heading);
  margin: var(--space-lg) 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.posts th,
.mentions th,
.series-table th,
.pages-table th,
.people-table th,
.visits th {
  background: var(--color-chip-bg);
}

.posts tbody tr:last-child td,
.mentions tbody tr:last-child td,
.series-table tbody tr:last-child td,
.pages-table tbody tr:last-child td,
.people-table tbody tr:last-child td,
.visits tbody tr:last-child td {
  border-bottom: 0;
}

.posts tbody tr:hover,
.mentions tbody tr:hover,
.series-table tbody tr:hover,
.pages-table tbody tr:hover,
.people-table tbody tr:hover,
.visits tbody tr:hover,
.posts tbody tr:focus-within,
.mentions tbody tr:focus-within,
.series-table tbody tr:focus-within,
.pages-table tbody tr:focus-within,
.people-table tbody tr:focus-within {
  background: var(--color-chip-bg);
}

.posts td:first-child a,
.series-table td:first-child a,
.pages-table td:first-child a,
.people-table td:first-child a,
.visits td:first-child a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}

.posts td:first-child a:hover {
  color: var(--color-accent);
}

/* Each post's kind in the rubric's red, as the public lists show it. */
.posts td:nth-child(2) {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* The kind links to the list of its posts, underlined on hover alone. */
.posts td:nth-child(2) a {
  color: inherit;
  text-decoration: none;
}

.posts td:nth-child(2) a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Its list of posts keeps each one's kind and date on one line. */
.posts td + td {
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.posts td:last-child a {
  color: inherit;
  text-decoration: none;
}

.posts td:last-child a:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Its list of mentions: what each says, then its post, when it came and
   its buttons, small, which sit side by side. */
.mentions td {
  vertical-align: top;
  font-size: 0.875rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.mentions td + td {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.mentions td a {
  color: var(--color-text);
  text-decoration: none;
}

.mentions td a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.mentions td:first-child > a:first-child {
  font-weight: 600;
}

/* A host is never split. */
.mentions td:first-child > a:last-of-type {
  white-space: nowrap;
}

/* Its author and source are links too, underlined quietly. */
.mentions td:first-child a,
.mentions td:nth-child(2) a,
.posts td:last-child a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-control-border);
}

.mentions td + td a {
  color: var(--color-text-secondary);
}

/* Every column after the first is as wide as what it holds, leaving the
   post or the mention the room. */
.posts :is(th, td) + :is(th, td),
.mentions :is(th, td) + :is(th, td) {
  width: 1%;
  white-space: nowrap;
}

.posts :is(th, td) + :is(th, td),
.mentions :is(th, td) + :is(th, td) {
  padding-left: var(--space-md);
}

/* On a phone, the columns don't fit beside each other, so each post is
   its line over its kind, its date and, among the deleted posts, its
   Undelete button, and the list is as wide as the screen. */
@media (max-width: 40rem) {
  .posts,
  .posts tbody {
    display: block;
  }

  .posts thead {
    display: none;
  }

  .posts tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }

  .posts tbody tr:last-child {
    border-bottom: 0;
  }

  .posts td,
  .posts td + td {
    width: auto;
    padding: 0;
    border-bottom: 0;
  }

  .posts td:first-child {
    flex-basis: 100%;
  }

  .posts td:nth-child(4) {
    margin-left: auto;
  }
}

.mentions td:nth-child(2) a {
  font-family: var(--font-mono);
}

/* Why a dropped mention was dropped, under what it says. */
.mentions .why {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* The drop's date stays on one line in the narrow first column. */
.mentions .why time {
  white-space: nowrap;
}

.mentions form,
.blocked form {
  display: inline;
}

/* A mention's status and Delete share a line, with Block under them.
   Delete and Block each only open, below them, what they do and the
   button that does it. */
.mentions details {
  display: inline-block;
  vertical-align: middle;
}

.mentions details.block,
.mentions details[open] {
  display: block;
  margin-top: 4px;
}

.mentions details form {
  display: block;
  max-width: 22rem;
  margin-top: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.mentions details p {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  white-space: normal;
}

.mentions summary {
  list-style: none;
  cursor: pointer;
}

.mentions td:last-child > * {
  margin: 0 var(--space-xs) var(--space-xs) 0;
}

.mentions td:last-child :is(button, summary) {
  white-space: nowrap;
}

/* Their buttons are quiet, outlined in the page's colours; approving is
   the one filled in the accent. */
.mentions button,
.mentions details.delete > summary,
.blocked button {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  margin: 0;
  padding: 0 0.6rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border-color: var(--color-control-border);
}

.mentions button:hover,
.mentions details.delete > summary:hover,
.blocked button:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

/* Blocking a host is a quiet text button under the others. */
.mentions details.block > summary {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--color-control-border);
  text-underline-offset: 3px;
}

/* Deleting is marked in the accent, as in the editor, on an outlined
   summary that looks like the buttons beside it. */
.mentions details.delete > summary {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-accent);
  border: 1px solid var(--color-control-border);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

/* Approving, and the buttons that delete once they are opened, are filled
   in the accent. */
.mentions details button,
.mentions form[action$="/approve"] button {
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.mentions details button:hover,
.mentions form[action$="/approve"] button:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* A mention's status, as a badge over its buttons, and a series' status
   on the series page. */
.state {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  margin: 0 var(--space-xs) 0 0;
  vertical-align: middle;
  padding: 0 0.55em;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.state.approved,
.state.active {
  color: var(--color-ok);
  background: var(--color-ok-soft);
}

.state.waiting,
.state.paused {
  color: var(--color-wait);
  background: var(--color-wait-soft);
}

.state.finished,
.state.empty,
.state.dropped {
  color: var(--color-tag-text);
  background: var(--color-tag-bg);
}

/* A series' badge keeps to one line, a narrow screen wrapping its title. */
.series-table .state {
  white-space: nowrap;
}

/* The followers of the fediverse account: each one's handle, then its
   name, its server and the day it followed, small, and Remove, which
   only opens what it does and the button that does it, as a mention's
   Delete. */
.followers td {
  vertical-align: top;
  font-size: 0.875rem;
  line-height: 1.55;
}

.followers td + td {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* Every column but the name is as wide as what it holds, on one line. */
.followers :is(th, td):not(:nth-child(2)) {
  width: 1%;
  white-space: nowrap;
}

.followers td:nth-child(2) {
  overflow-wrap: anywhere;
}

.followers summary {
  list-style: none;
  cursor: pointer;
}

.followers summary::-webkit-details-marker {
  display: none;
}

.followers summary,
.followers button {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  margin: 0;
  padding: 0 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-sm);
}

.followers summary:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.followers details form {
  width: 20rem;
  max-width: 100%;
  margin-top: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  white-space: normal;
}

.followers details p {
  margin: 0 0 var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.followers button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.followers button:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* On a phone each follower is its handle over its name, its server, its
   day and Remove, and the list is as wide as the screen. */
@media (max-width: 40rem) {
  .followers,
  .followers tbody {
    display: block;
  }

  .followers thead {
    display: none;
  }

  .followers tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }

  .followers tbody tr:last-child {
    border-bottom: 0;
  }

  .followers td,
  .followers :is(th, td):not(:nth-child(2)) {
    width: auto;
    padding: 0;
    border-bottom: 0;
  }

  .followers td:first-child {
    flex-basis: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .followers td:last-child {
    margin-left: auto;
  }

  .followers td:last-child:has([open]) {
    flex-basis: 100%;
  }
}

.blocked {
  list-style: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.blocked li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.blocked button {
  margin: 0;
}

/* The field and its button side by side. */
form.block {
  display: grid;
  grid-template-columns: minmax(0, 24rem) auto;
  justify-content: start;
  align-items: end;
  column-gap: var(--space-sm);
  margin-top: var(--space-lg);
}

form.block label {
  grid-column: 1 / -1;
}

form.block input {
  margin-bottom: 0;
}

/* The list of posts' filter: its two choices and its button in a row
   over the table. On a phone the choices share a row, the button under
   them. */
form.filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

form.filter div {
  flex: 1 1 8rem;
  max-width: 14rem;
}

form.filter select {
  margin-bottom: 0;
}

/* The search page's form: the field as wide as the column leaves beside
   its button, and under it what the search found, or what it finds posts
   by, in the quiet face of a post's dateline. */
form.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

form.search label {
  grid-column: 1 / -1;
}

form.search input {
  max-width: none;
  margin-bottom: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.search-found,
.search-hint {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* A list that has no posts says so as the search page's hint does, with
   room above and below, since the page under it is empty (#190). */
p.empty {
  margin: var(--space-xl) 0;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* The edit form: the content leads, the properties follow, smaller. */
#content {
  height: 16rem;
}

#properties {
  height: 12rem;
}

@supports (field-sizing: content) {
  #content,
  #properties {
    height: auto;
    field-sizing: content;
    min-height: 8lh;
    max-height: 30lh;
  }

  #properties {
    min-height: 6lh;
  }
}

/* The visitors page: a day's totals as figures in a row, its tables in
   two columns where there is room, and every count lined up on the
   right. */
.visit-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  font-family: var(--font-heading);
}

.visit-totals div {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.visit-totals dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.visit-totals dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.visit-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  align-items: start;
  column-gap: var(--space-lg);
}

.visit-tables .visits {
  margin-bottom: 0;
}

.visits caption {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
}

.visits td + td,
.visits th + th {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A feed's reader is a name, not a count. */
.visits.visit-feeds td:nth-child(2),
.visits.visit-feeds th:nth-child(2) {
  text-align: left;
}

.visits td:first-child {
  overflow-wrap: anywhere;
}

/* A day's, a month's and a year's page lead up to the period they are
   in, between the ones either side. */
.pagination [rel="up"] {
  grid-column: 2;
}

/* The tables of counts to download, as a line of links under the
   page's own tables. */
.visit-downloads h2 {
  margin: var(--space-2xl) 0 var(--space-sm);
}

.visit-downloads p {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.visit-downloads ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* The months and years with pages, a year a line. */
.visit-periods ul {
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

.visit-periods li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  padding: var(--space-xs) 0;
}

.visit-periods li > a:first-child {
  min-width: 3rem;
  font-weight: 600;
}

/* On a phone, the cells keep less room around them, and the tables of
   days and feeds, too wide for the column, scroll sideways as the site's
   tables do, each row on one line. */
@media (max-width: 30rem) {
  .visits :is(th, td) {
    padding-inline: var(--space-sm);
  }

  .visits.visit-days,
  .visits.visit-feeds {
    display: block;
    overflow-x: auto;
  }

  .visits.visit-days :is(th, td),
  .visits.visit-feeds :is(th, td) {
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

/* Why an edit was refused. */
.refused {
  padding: 0.75rem var(--space-md);
  border: 1px solid var(--color-accent);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

/* A refusal with several problems lists them, and keeps the room a
   paragraph's would from the form under it. */
div.refused {
  margin-bottom: var(--space-lg);
}

.refused ul {
  margin: var(--space-xs) 0 0;
}

.refused p,
.refused li {
  margin-bottom: 0;
}

/* A line under a field that says what it is for, in the quiet type of the
   field's label. */
.hint {
  margin: calc(-1 * var(--space-sm)) 0 var(--space-lg);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
}

/* A choice of one among a few, such as a series' subject, as wide as a
   one-line field. */
select {
  display: block;
  width: 100%;
  max-width: 24rem;
  margin-bottom: var(--space-md);
  padding: 0 0.75rem;
  min-height: 2.5rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

/* The series a post's form offers it to: a box to tick beside each,
   under a heading set as a field's label. An image for a page's content
   is uploaded below the page's form, set apart from it the same way. */
form.series-of,
form.image {
  margin-top: var(--space-2xl);
}

fieldset {
  margin: 0 0 var(--space-md);
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: var(--space-sm);
  padding: 0;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

label.choice {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-text);
}

/* A tick's hint sits just under it; the hint's pull up is for fields. */
label.choice + .hint {
  margin-top: 0;
}

label.choice input {
  display: inline-block;
  width: auto;
  min-height: 0;
  margin: 0;
  box-shadow: none;
  accent-color: var(--color-accent);
}

/* The new post form's kinds, a tab each, marked as the admin's own
   navigation marks its page. */
nav.kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

nav.kinds a {
  padding: var(--space-sm) 0;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
}

nav.kinds a:hover {
  color: var(--color-text);
}

nav.kinds a[aria-current] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* A field the kind needs says so beside its label, quieter. */
.required {
  font-weight: 400;
  color: var(--color-text-tertiary);
}

/* Each photo slot: the file and its alt text side by side, stacked on a
   phone. A page's image has one of its own. */
.photos .photo,
form.image .photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-sm);
}

.photos input,
form.image input {
  max-width: none;
  margin-bottom: var(--space-sm);
}

.photos input[type="file"],
form.image input[type="file"] {
  padding: 0.45rem 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
}

.photos .hint,
form.image .hint {
  margin-top: 0;
}

@media (max-width: 40rem) {
  .photos .photo,
  form.image .photo {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .photos .photo input[type="text"],
  form.image .photo input[type="text"] {
    margin-bottom: var(--space-md);
  }
}

/* A field with suggestions under it, which the admin page's script shows
   as the author types (ADR 0006), over whatever follows the field. */
.suggest {
  position: relative;
  max-width: 24rem;
}

.suggestions {
  position: absolute;
  z-index: 1;
  top: calc(2.5rem + var(--space-xs));
  left: 0;
  right: 0;
  margin: 0;
  padding: var(--space-xs) 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
}

.suggestions li {
  margin: 0;
  padding: 0.4rem 0.75rem;
  color: var(--color-text);
  cursor: pointer;
}

.suggestions li:hover {
  background: var(--color-chip-bg);
}

.suggestions li[aria-selected="true"] {
  background: var(--color-accent-soft);
}

/* A work's suggestions are a line each, as wide as they need up to the
   column, cut short with an ellipsis past it. */
.suggest.lookup .suggestions {
  right: auto;
  min-width: 100%;
  max-width: min(40rem, calc(100vw - 2 * var(--space-md)));
}

/* On a phone, as wide as the field. */
@media (max-width: 40rem) {
  .suggest.lookup .suggestions {
    right: 0;
    max-width: none;
  }
}

.suggest.lookup .suggestions li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Why a lookup found nothing, which the script says when it does. */
.lookup-status:empty {
  display: none;
}

/* Who sees the post: its visibility and whether it is a draft, side by
   side. */
.audience {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-sm) var(--space-xl);
  margin-bottom: var(--space-md);
}

.audience select {
  width: auto;
  min-width: 10rem;
  margin-bottom: 0;
}

.audience label.choice {
  margin: 0 0 0.6rem;
}

/* The fields a post seldom needs, folded away until they hold
   something. */
details.more {
  margin: var(--space-md) 0 var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

details.more summary {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}

details.more[open] summary {
  margin-bottom: var(--space-md);
}

/* Deleting is set apart from saving, well below it, and asks first: its
   summary, outlined rather than filled, only opens a box that says what
   deleting does, and the button that deletes sits under that sentence, so
   a double click can't reach it. */
main > details.delete {
  margin-top: var(--space-2xl);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

main > details.delete > summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  list-style: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.mentions summary::-webkit-details-marker,
main > details.delete > summary::-webkit-details-marker {
  display: none;
}

main > details.delete > summary:hover {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

/* Open, it is a box, and its summary is quiet: it now only closes it. */
main > details.delete[open] {
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

main > details.delete[open] > summary {
  color: var(--color-text-secondary);
  border-color: var(--color-control-border);
}

main > details.delete[open] > summary:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

main > details.delete form p {
  margin: var(--space-md) 0;
}

/* --- A post preview ---
   A post as its page would show it, over the form that holds it, in the
   public page's own styles: framed by a dashed line, under a label that
   says it isn't saved, with the address it gets under it. Preview sits
   beside Create or Save, outlined, as the step before them. */
.post-preview {
  margin: var(--space-lg) 0 var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
}

.post-preview > h2 {
  margin-bottom: var(--space-md);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.post-preview > h2 span {
  margin-left: var(--space-xs);
  font-weight: 400;
  color: var(--color-wait);
}

/* The photos chosen on the new post form, which it can't show or keep,
   the nicks a post's text names that no one has, and what reading a
   person's site found. */
.post-preview-photos,
.unknown-people,
p.read {
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  border-left: 4px solid var(--color-wait);
  border-radius: var(--radius-md);
  background: var(--color-wait-soft);
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

.post-preview-address {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.post-preview-address span {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

button[name="preview"],
button[name="read"] {
  margin-left: var(--space-sm);
  color: var(--color-accent);
  background: transparent;
}

button[name="preview"]:hover,
button[name="read"]:hover {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

/* Where a post's page hangs its kind and an article's section marks in
   the gutter, the frame makes room for them on its left, and where the
   screen has room it reaches into the gutter by as much, so the post
   keeps its page's width. */
@media (min-width: 64rem) {
  .post-preview {
    padding-left: 6.5rem;
  }
}

/* Where the right gutter has room for it, an article's table of contents
   stands there beside the text and stays in view while the article
   scrolls. A float as wide as its negative margin takes no room from the
   text beside it. The admin page's preview keeps it above the text, in
   its frame. */
@media (min-width: 80rem) {
  main > .h-entry > .toc {
    float: right;
    position: sticky;
    top: var(--space-xl);
    width: 14rem;
    margin: 0 calc(-14rem - var(--space-xl)) 0 0;
    max-height: calc(100vh - 2 * var(--space-xl));
    overflow-y: auto;
    box-sizing: border-box;
  }
}

@media (min-width: 80rem) {
  .post-preview {
    margin-left: calc(-6.5rem - 1px);
    margin-right: calc(-1 * var(--space-lg) - 1px);
  }
}

@media (max-width: 40rem) {
  .post-preview {
    padding: var(--space-sm) var(--space-md);
  }
}

/* --- Focus and motion --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* --- Wide screens ---
   Where the gutter has room, a feed entry's kind hangs in it, beside the
   entry, as a manuscript's rubric stands in the margin. */
@media (min-width: 64rem) {
  /* A work's cover hangs in the right margin, level with its lead-in, as
     the kind hangs in the left one. */
  :is(.h-feed > article, .h-feed > article > picture) > .cover {
    position: absolute;
    left: calc(100% + var(--space-lg));
    top: calc(var(--space-lg) + 0.2rem);
    /* Big enough to tell one book or album from another (#189): a book or
       poster at 2:3, an album's sleeve square and whole. */
    width: 3.5rem;
    height: auto;
    max-height: 5.25rem;
    object-fit: contain;
    margin: 0;
  }

  /* An entry with its cover in the margin is at least as tall as the
     cover, so covers of two entries in a row don't overlap: the cover's
     top, 1.7rem under the entry's, its 5.25rem, and a little air. */
  .h-feed > article:has(> .cover, > picture > .cover) {
    min-height: 7.5rem;
  }

  :is(.h-feed:not(.one-kind) > article:has(> h2:not(.p-name)), .h-feed:not(.one-kind) > article:has(> h2:not(.p-name)) > picture) > .cover {
    top: calc(var(--space-md) + 0.2rem);
  }

  :is(.h-feed > article:first-of-type, .h-feed > article:first-of-type > picture) > .cover,
  :is(.h-feed:not(.one-kind) > article:first-of-type:has(> h2:not(.p-name)), .h-feed:not(.one-kind) > article:first-of-type:has(> h2:not(.p-name)) > picture) > .cover {
    top: 0.2rem;
  }

  .h-feed > article > .post-kind {
    position: absolute;
    right: calc(100% + var(--space-lg));
    /* On the baseline of the entry's first line, measured: a note's
       text, a title, or a lead-in. */
    top: calc(var(--space-lg) + 0.5625rem);
    /* The margin gives it no width, so "Check-in" would break at its hyphen. */
    white-space: nowrap;
    text-align: right;
  }

  .h-feed:not(.one-kind) > article:has(> h2:not(.p-name)) > .post-kind {
    top: calc(var(--space-md) + 0.31rem);
  }

  /* A list's year hangs in the margin on the rule above its post, so it
     sits level with that rule and above the post's kind. A list's first
     post has the list's heading above it, whose rule sits a space above the
     post, so its year hangs on that rule. */
  .h-feed > article > .year-mark {
    position: absolute;
    right: calc(100% + var(--space-lg));
    top: -0.5625rem;
    margin: 0;
    text-align: right;
    white-space: nowrap;
  }

  .h-feed > article:first-of-type > .year-mark {
    top: calc(-1 * var(--space-lg) - 0.5625rem);
  }

  /* A month hangs there too, on the rule above its first post, as a
     list's year does: the heading takes no room, and its post keeps its
     own space under the rule. */
  .h-feed > .month,
  .h-feed > .month:has(+ article > .year-mark),
  .h-feed > .month:first-of-type:has(+ article > .year-mark) {
    position: relative;
    height: 0;
    margin: 0;
    padding: 0;
  }

  .h-feed > .month > :is(a, span) {
    position: absolute;
    right: calc(100% + var(--space-lg));
    top: -0.5625rem;
    white-space: nowrap;
    text-align: right;
  }

  .h-feed > .month + article {
    padding-top: var(--space-lg);
  }

  .h-feed > .month + article:first-of-type {
    padding-top: 0;
  }

  .h-feed > .month:first-of-type > :is(a, span) {
    top: calc(-1 * var(--space-lg) - 0.5625rem);
  }

  /* Where a year begins with its month, the year stands just above the
     rule and the month just below it. The heading takes as much room
     under the rule as the month stands lower there, so the post's kind
     is as far under the month as under one that hangs on the rule. */
  .h-feed > .month:has(+ article > .year-mark),
  .h-feed > .month:first-of-type:has(+ article > .year-mark) {
    height: 0.6875rem;
  }

  .h-feed > .month:has(+ article > .year-mark) > :is(a, span) {
    top: 0.125rem;
  }

  .h-feed > .month + article > .year-mark {
    top: calc(-0.6875rem - 1.21875rem - 0.125rem);
  }

  .h-feed > .month:first-of-type:has(+ article > .year-mark) > :is(a, span) {
    top: calc(-1 * var(--space-lg) + 0.125rem);
  }

  .h-feed > .month + article:first-of-type > .year-mark {
    top: calc(-1 * var(--space-lg) - 0.6875rem - 1.21875rem - 0.125rem);
  }

  /* The pinned block's rubric hangs there too, level with its first
     line, as a post's kind does. */
  .pinned h2 {
    position: absolute;
    right: calc(100% + var(--space-lg));
    top: 0.3rem;
    margin: 0;
    white-space: nowrap;
    text-align: right;
  }

  /* A post's responses hang their headings there too, so names and
     replies start at the column's edge. */
  .responses,
  .nearby {
    grid-template-columns: 0 minmax(0, 1fr);
    column-gap: 0;
  }

  .responses h2,
  .nearby h2 {
    justify-self: unsafe end;
    margin-right: var(--space-lg);
    white-space: nowrap;
    font-size: 0.75rem;
  }

  /* An entry of the same kind as the one above it hangs a ditto mark in
     place of its kind, so the margin marks where the kind changes. The
     word comes back on hover, and stays for screen readers. */
  .h-feed:not(.one-kind) > article.same-kind > .post-kind {
    color: transparent;
  }

  .h-feed:not(.one-kind) > article.same-kind > .post-kind::after {
    content: "\201D";
    position: absolute;
    top: 0.1em;
    right: 0;
    font: 1.375rem/1 var(--font-body);
    color: color-mix(in srgb, var(--color-accent) 60%, var(--color-bg));
  }

  .h-feed:not(.one-kind) > article.same-kind:is(:hover, :focus-within) > .post-kind {
    color: var(--color-accent);
  }

  .h-feed:not(.one-kind) > article.same-kind:is(:hover, :focus-within) > .post-kind::after {
    content: none;
  }

  /* A run of one kind sits together, with no rule between its entries,
     as the ditto marks say (#192). Its kind and cover move up with its
     words, by what its space above lost. */
  .h-feed:not(.one-kind) > article:has(+ article.same-kind) {
    border-bottom-color: transparent;
    padding-bottom: var(--space-sm);
  }

  .h-feed:not(.one-kind) > article.h-entry.same-kind {
    padding-top: var(--space-sm);
  }

  .h-feed:not(.one-kind) > article.same-kind > .post-kind,
  :is(.h-feed:not(.one-kind) > article.same-kind, .h-feed:not(.one-kind) > article.same-kind > picture) > .cover {
    translate: 0 calc(var(--space-sm) - var(--space-lg));
  }

  .h-feed:not(.one-kind) > article.same-kind:has(> h2:not(.p-name)) > .post-kind,
  :is(.h-feed:not(.one-kind) > article.same-kind:has(> h2:not(.p-name)), .h-feed:not(.one-kind) > article.same-kind:has(> h2:not(.p-name)) > picture) > .cover {
    translate: 0 calc(var(--space-sm) - var(--space-md));
  }

  /* An article's section heads hang a quiet section mark there. */
  .h-entry:has(> h1.p-name) > .e-content > h2 {
    position: relative;
  }

  .h-entry:has(> h1.p-name) > .e-content > h2::before {
    content: "§";
    position: absolute;
    right: calc(100% + var(--space-lg));
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    color: color-mix(in srgb, var(--color-accent) 65%, var(--color-bg));
  }

  /* A post's own page hangs its kind in the margin beside the date's
     footer, where the post begins, as every other page and the feed do,
     so it never moves down the margin with the post's length. */
  .h-entry:has(> footer > .dateline) {
    position: relative;
  }

  .h-entry > footer > .dateline .post-kind {
    position: absolute;
    right: calc(100% + var(--space-lg));
    white-space: nowrap;
  }

  /* On the first line's baseline, measured; level with a photo's top. */
  .h-entry > footer > .dateline .post-kind {
    top: 0;
  }

  .h-entry:has(> .e-content:first-child) > footer > .dateline .post-kind {
    top: 0.6875rem;
  }

  .h-entry:has(> .responds-to:first-child) > footer > .dateline .post-kind {
    top: 0.1875rem;
  }

  /* A like or repost with no words of its own sets its line larger. */
  .h-entry:not(:has(.e-content)):has(> .responds-to:first-child) > footer > .dateline .post-kind {
    top: 0.625rem;
  }

  /* A title's larger line, its baseline 19px below the footer's;
     a venue's title, a link, sits 3px lower. */
  .h-entry:has(h1.p-name) > footer > .dateline .post-kind {
    top: 1.1875rem;
  }

  .h-entry:has(h1.p-name > a) > footer > .dateline .post-kind {
    top: 1.375rem;
  }

  .h-feed > article:has(> h2.p-name) > .post-kind {
    top: calc(var(--space-lg) + 0.5rem);
  }

  .h-feed > article:first-of-type:has(> h2.p-name) > .post-kind {
    top: 0.5rem;
  }

  /* An article's larger title sits 3px lower. */
  .h-feed > article:has(> .post-kind[href$="/articles/"]):has(> h2.p-name) > .post-kind {
    top: calc(var(--space-lg) + 0.6875rem);
  }

  .h-feed > article:first-of-type:has(> .post-kind[href$="/articles/"]):has(> h2.p-name) > .post-kind {
    top: 0.6875rem;
  }

  /* An entry of photos alone hangs its kind beside the photos' top. */
  .h-feed > article:has(> .post-kind:first-child + .photos) > .post-kind {
    top: var(--space-lg);
  }

  .h-feed > article:first-of-type:has(> .post-kind:first-child + .photos) > .post-kind {
    top: 0;
  }

  .h-feed > article:first-of-type > .post-kind {
    top: 0.5625rem;
  }

  .h-feed:not(.one-kind) > article:first-of-type:has(> h2:not(.p-name)) > .post-kind {
    top: 0.31rem;
  }
}

/* --- Phones --- */
@media (max-width: 640px) {
  body {
    padding: var(--space-md);
    min-height: calc(100svh - 2 * var(--space-md) - 3px);
  }

  h1 {
    font-size: 1.75rem;
  }

  .e-content {
    font-size: 1.125rem;
  }

  .h-feed > article:has(> .post-kind[href$="/articles/"]) > h2.p-name {
    font-size: 1.3125rem;
  }

  :is(.h-entry, .h-entry > picture) > .cover {
    width: 5rem;
    margin-left: var(--space-md);
  }

  /* On a phone the strip would be a sliver: it shows less of the width,
     at 2:1. */
  .map img {
    aspect-ratio: 2 / 1;
    object-fit: cover;
  }

  /* The nav's tall targets leave room enough above the rule. */
  .site-header {
    padding-bottom: 0.125rem;
    margin-bottom: var(--space-lg);
  }

  /* The main navigation spans the column on one line, its first and last
     words flush with the column's edges, so none of it wraps on a phone. */
  .site-header > nav {
    flex: 1 0 100%;
  }

  .site-header ul {
    justify-content: space-between;
    column-gap: 0;
    margin-inline: -0.25rem;
  }

  /* A thumb's target, as on wider screens. */
  .site-header nav a {
    min-height: 2.75rem;
    padding-inline: 0.25rem;
  }

  .responses {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-xs);
  }

  .responses > :not(h2, :last-child) {
    margin-bottom: var(--space-md);
  }

  /* A target a thumb can hit, in the groups' lines. */
  .site-footer nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
  }

  .footer-group {
    grid-template-columns: 1fr;
  }

  .footer-group .footer-label {
    line-height: 1.8;
  }

  .footer-group + .footer-group {
    padding-top: 0;
    border-top: 0;
  }

  .footer-groups {
    gap: var(--space-xs);
  }


  form.block {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* --- On this day ---
   The days either side of a day's list, and today, under its name: the
   day before at the start of the line, the day after at its end. */
.days {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-rule);
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

.days a {
  color: var(--color-text-secondary);
}

.days a:hover {
  color: var(--color-text);
}

.days a[aria-current="page"] {
  color: var(--color-text-tertiary);
  text-decoration: none;
}

/* --- The years of the list of every post ---
   The years that have a date page, newest first, in a row under the
   list's name, set as the days of a day's list are. */
.years {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin: 0 0 var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

.years a {
  color: var(--color-text-secondary);
}

.years a:hover {
  color: var(--color-text);
}

/* --- Stats ---
   The page of stats: a headline of every post, a switch between two
   views, and charts made of tables, each number in the page as text. */
.stats-headline {
  display: grid;
  gap: var(--space-xs);
  margin: 0 0 var(--space-lg);
  padding: 0;
  list-style: none;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
}

.stats-figure {
  color: var(--color-text);
}

.stats-headline li:first-child .stats-figure {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

/* Every chart from the calendar on is in the page twice over: each number
   without check-ins (.no-checkins) and with them (.with-checkins). The
   view without them shows, unless the switch is ticked. A browser without
   :has() drops the rules that name it, and keeps that view. */
.with-checkins {
  display: none;
}

main:has(#with:checked) .with-checkins {
  display: revert;
}

main:has(#with:checked) .no-checkins {
  display: none;
}

/* The switch, as a chip that stays in reach while the charts scroll by
   under it. */
label.choice.stats-switch {
  position: sticky;
  top: var(--space-sm);
  z-index: 1;
  display: inline-flex;
  margin: 0 0 var(--space-md);
  padding: var(--space-xs) var(--space-md) var(--space-xs) 0.75rem;
  min-height: 2.75rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--color-surface);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

label.choice.stats-switch input {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}

main:has(#with:checked) label.stats-switch {
  border-color: var(--color-accent);
}

main:has(.stats-switch) h2 {
  margin: var(--space-xl) 0 var(--space-sm);
}

/* A count that is nothing is quieter than one that is something. */
.zero {
  color: var(--color-text-tertiary);
}

/* A bar chart: a row for each thing it counts, its name, its count and a
   bar as long as its share of the longest. With check-ins on, a bar's
   check-ins are a lighter shade of it. */
table.stats-chart {
  margin: 0;
}

.stats-chart th,
.stats-chart td {
  padding: 0.3rem 0;
  border-bottom-color: var(--color-border-light);
}

.stats-chart th[scope="row"] {
  width: 1%;
  padding-right: var(--space-md);
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text);
}

.stats-chart th[scope="row"] a {
  color: inherit;
}

.stats-chart th[scope="row"] a:hover {
  color: var(--color-accent);
}

.stats-count {
  display: inline-block;
  width: 3.5rem;
  margin-right: var(--space-sm);
  text-align: right;
  vertical-align: middle;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* The kinds page draws its bars with the same table and adds a column of
   the day of each kind's latest post, in figures at the right. A kind with
   no posts is grey, in the quiet colour of a count of nothing (#177). */
.kinds-chart td:not(.stats-latest) {
  width: 100%;
}

.stats-chart .stats-latest {
  padding-left: var(--space-md);
  text-align: right;
  white-space: nowrap;
}

.stats-chart td.stats-latest {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.stats-chart tr.zero th[scope="row"],
.stats-chart tr.zero td {
  color: var(--color-text-tertiary);
}

.stats-bar {
  --bar-posts: color-mix(in srgb, var(--color-accent) 55%, var(--color-bg));
  --bar-checkins: color-mix(in srgb, var(--color-accent) 22%, var(--color-bg));
  display: inline-block;
  vertical-align: middle;
  width: calc((100% - 4rem) * var(--without));
  height: 0.75rem;
  background: var(--bar-posts);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: width 0.3s ease;
}

main:has(#with:checked) .stats-bar {
  width: calc((100% - 4rem) * var(--with));
  background: linear-gradient(to right, var(--bar-posts) calc(var(--posts) * 100%), var(--bar-checkins) 0);
}

/* The calendar: a year to a table, its weeks the columns and the days of
   the week the rows, each day a square in one of five shades, which mix
   the accent into the page so they hold in light and dark alike. */
details.stats-year {
  margin-bottom: var(--space-sm);
}

details.stats-year summary {
  cursor: pointer;
}

details.stats-year summary h3 {
  display: inline;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.stats-year-count {
  margin-left: var(--space-xs);
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

table.stats-calendar {
  --heat-0: var(--color-border-light);
  --heat-1: color-mix(in srgb, var(--color-accent) 25%, var(--color-bg));
  --heat-2: color-mix(in srgb, var(--color-accent) 50%, var(--color-bg));
  --heat-3: color-mix(in srgb, var(--color-accent) 75%, var(--color-bg));
  --heat-4: var(--color-accent);
  /* A square is as big as a year's 54 weeks leave it room for in the
     column, at most 0.6rem, so a phone shows the whole year. */
  --cell: clamp(4px, calc((100vw - 4.5rem) / 54 - 1px), 0.6rem);
  width: auto;
  margin: var(--space-sm) 0 var(--space-md);
  border-collapse: separate;
  border-spacing: 1px;
  font-size: 0.625rem;
  line-height: 1;
}

/* On the dark page the border-light grey is all but the page's own colour,
   and a day with one post all but an empty day's: an empty day takes the
   border's step, a day with one post a step redder. */
@media (prefers-color-scheme: dark) {
  table.stats-calendar {
    --heat-0: var(--color-border);
    --heat-1: color-mix(in srgb, var(--color-accent) 40%, var(--color-bg));
  }
}

.stats-calendar th,
.stats-calendar td {
  padding: 0;
  border: 0;
}

.stats-calendar th {
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.stats-calendar thead th {
  padding-bottom: 0.2rem;
}

.stats-calendar tbody th {
  padding-right: 0.3rem;
}

/* Mon, Wed and Fri, as calendars label them; the others are there for a
   screen reader. */
.stats-calendar tbody tr:nth-child(even) th {
  color: transparent;
}

.stats-calendar td {
  width: var(--cell);
  min-width: var(--cell);
  height: var(--cell);
  border-radius: 2px;
}

@media (min-width: 40rem) {
  table.stats-calendar {
    border-spacing: 2px;
  }
}

.stats-calendar td.n0 { background: var(--heat-0); }
.stats-calendar td.n1 { background: var(--heat-1); }
.stats-calendar td.n2 { background: var(--heat-2); }
.stats-calendar td.n3 { background: var(--heat-3); }
.stats-calendar td.n4 { background: var(--heat-4); }
main:has(#with:checked) .stats-calendar td.c0 { background: var(--heat-0); }
main:has(#with:checked) .stats-calendar td.c1 { background: var(--heat-1); }
main:has(#with:checked) .stats-calendar td.c2 { background: var(--heat-2); }
main:has(#with:checked) .stats-calendar td.c3 { background: var(--heat-3); }
main:has(#with:checked) .stats-calendar td.c4 { background: var(--heat-4); }

/* Months by years: a column to a year, its total at the foot. */
.stats-months th,
.stats-months td {
  padding: 0.25rem 0.45rem;
  text-align: right;
  border-bottom-color: var(--color-border-light);
}

.stats-months td {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.stats-months tbody th,
.stats-months tfoot th {
  padding-left: 0;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text);
}

/* The months' heading sits over them, now the column is wider than it. */
.stats-months thead th:first-child {
  padding-left: 0;
  text-align: left;
}

.stats-months tfoot :is(th, td) {
  border-top: 1px solid var(--color-border-strong);
  border-bottom: 0;
  font-weight: 600;
  color: var(--color-text);
}

.stats-tags {
  margin-top: var(--space-sm);
}

.stats-more {
  margin-top: var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.875rem;
}

/* The nicks no one has, one a line, without bullets. */
.unknown-people {
  list-style: none;
}

.unknown-people li {
  margin: 0;
}

.unknown-people li + li {
  margin-top: var(--space-xs);
}

/* A person's photo beside the field that holds its address. */
.person-photo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.person-photo input {
  margin-bottom: 0;
}

.person-photo .face {
  flex: none;
  width: 3rem;
  height: 3rem;
  margin: 0;
}

/* A person's handles on Bluesky and Mastodon, side by side where there is
   room. */
.handles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  column-gap: var(--space-md);
}

.handles legend,
.handles .hint {
  grid-column: 1 / -1;
}

/* --- The map page ---
   Every place with check-ins: the maps Logg made, each a dot at every
   place on a base map in the page's greys, then the places by country.
   The dots are in the image, so the dark page turns the map over as it
   does a check-in's, and turns the hue back, which keeps the dots red,
   about the dark page's accent. */
.map-intro {
  font-family: var(--font-heading);
  color: var(--color-text-secondary);
}

.overview-map {
  margin: var(--space-lg) 0 0;
}

.overview-map img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--color-border);
  background: var(--color-code-bg);
}

.overview-map figcaption,
.map-credits {
  margin-top: var(--space-xs);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

.map-credits {
  margin-bottom: var(--space-xl);
  text-align: right;
}

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

.map-credits a:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
}

@media (prefers-color-scheme: dark) {
  .overview-map img {
    filter: invert(0.93) hue-rotate(180deg) contrast(1.1) brightness(0.7) saturate(1.5);
  }
}

/* The places: a table a country, as wide as the column and never wider,
   long names wrapping, the count of check-ins at the right in figures of
   one width. */
table.places {
  table-layout: fixed;
}

.places th:nth-child(2) {
  width: 32%;
}

.places th:last-child {
  width: 6.5rem;
}

.places td {
  overflow-wrap: anywhere;
}

/* A place's name is in the text colour with a faint underline, not the
   accent: some 400 of them in a column of red are too loud (#182). The
   accent returns on hover. */
.places td a {
  color: var(--color-text);
  text-decoration-color: var(--color-control-border);
}

.places td a:hover {
  color: var(--color-accent);
  text-decoration-color: currentColor;
}

@media (max-width: 30rem) {
  .places th,
  .places td {
    padding-inline: var(--space-xs);
  }

  .places th:last-child {
    width: 4.5rem;
  }
}

.places th:last-child,
.places td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* A country's places after its first 25 are folded into a <details> of
   their own, with the same table, so a long list doesn't push the page to
   some 20,000 px (#183). */
details.more-places {
  margin-bottom: var(--space-lg);
}

details.more-places summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

details.more-places summary:hover {
  color: var(--color-text);
}

details.more-places[open] summary {
  margin-bottom: var(--space-xs);
}

/* --- The plate ---
   An engraved map of the place the author is in (#159), drawn as the
   band under the header on every page (#262; see the header's rules
   before the home page's). The page's head sets the map's files as
   custom properties, so the stylesheet names none itself, and a page
   whose head sets none has no band. */

/* The map's credits, in the footer of every page with the plate. */
.site-footer .map-credit {
  font-size: 0.75rem;
}

/* The admin page's current place: the plate the pages show, over the
   place's name and how its plate stands. */
.current-place {
  margin: var(--space-lg) 0;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.current-place img {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  margin-bottom: var(--space-sm);
}

.current-place p {
  margin-bottom: var(--space-sm);
}

.current-place strong {
  color: var(--color-text);
}

.current-place ~ form + form {
  margin-top: var(--space-xl);
}

/* --- The admin page's login ---
   Its forms stay hidden until the login's script shows them, whatever
   else lays a form out. The button that logs out sits at the end of the
   navigation, quiet, as the buttons in a table's rows are. */
.passkey[hidden],
.passkey [hidden] {
  display: none;
}

.passkey button {
  margin-top: var(--space-md);
}

nav.admin form {
  margin: 0 0 0 auto;
}

nav.admin button,
.passkeys button {
  min-height: 1.75rem;
  margin: 0;
  padding: 0 0.6rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border-color: var(--color-control-border);
}

nav.admin button:hover,
.passkeys button:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.passkeys form {
  margin: 0;
}

/* --- The header and the band ---
   Every page has the home page's header (#262): the name in spaced
   capitals over the plate's centre as coordinates and the place's name,
   and the navigation in mono, with the plate as a band across the page
   under it. Both are the home page's 52rem on every page, so they stand
   in the same place from one page to the next, and a page's own column
   stays 42rem under them. These rules come after the phone's, whose
   sizes they set on every screen. */

/* The name in spaced capitals over the plate's centre as coordinates and
   the place's name, in mono as the navigation is. */
.site-avatar {
  width: 2.5rem;
  height: 2.5rem;
}

.site-name {
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.site-tagline .coord {
  color: var(--color-accent);
}

.site-header nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The band closes the header in the double rule's place. A page whose
   head sets no plate has no band, and keeps the rule. */
body:has(> .plate-strip) .site-header {
  margin-bottom: 0;
  padding-bottom: var(--space-sm);
  border-bottom: 0 solid var(--color-border-strong);
}

/* The band, engraved at this size; a plate engraved before the band was
   has the strip stretched over it. Either way one file. */
.plate-strip {
  height: 5.5rem;
  margin-bottom: var(--space-sm);
  background: var(--plate-band, var(--plate-strip)) center / cover no-repeat;
  border-block: 1px solid var(--color-border-strong);
}

/* Off the home page, whose body is 52rem, the header and the band reach
   past the 42rem column by half the difference on each side, and by
   less where the screen has less: on a phone both are the column's
   width. 100vw counts a classic scrollbar, which leaves them at most
   half of one off centre between about 45rem and 55rem. */
body:not(.home) > :is(.site-header, .plate-strip) {
  margin-inline: calc((min(var(--max-width), 100vw - 2 * var(--space-lg)) - min(52rem, 100vw - 2 * var(--space-lg))) / 2);
}

body:not(.home) > .plate-strip {
  margin-bottom: var(--space-xl);
}

@media (max-width: 44rem) {
  body:not(.home) > .plate-strip {
    margin-bottom: var(--space-lg);
  }
}

/* --- The home page ---
   A field atlas (#209): 52rem wide, where every other page keeps the
   column's 42rem, set in Sans and Mono, with Serif for an article's
   title and excerpt alone. Under the header the plate's strip runs
   across the page; then the last check-in on a line, the latest
   check-ins and this day in earlier years as two tables side by side,
   and the stream, each entry beside a rail of its date, time, kind, city
   and weather. Below 44rem the strip is a band, each table one line, and
   the rail a line above its entry, so the stream starts on the first
   screen. These rules come last in the stylesheet, so where one is as
   specific as a list's, it wins. */
body.home {
  max-width: 52rem;
  font-family: var(--font-heading);
}

/* A rubric heads each of the page's parts, set as a post's kind is. */
.rubric {
  margin: 0 0 var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.rubric a {
  color: inherit;
}

/* The last check-in: where, when and the weather there. */
.atlas-latest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.75em;
  margin: 0 0 var(--space-xl);
  font: 0.75rem / 1.6 var(--font-mono);
  color: var(--color-text-secondary);
}

.atlas-latest .th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.atlas-latest > a {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.atlas-latest .weather {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  color: inherit;
}

/* The two tables: the check-ins wider, this day beside them. A table
   alone takes the page's width. */
.atlas-tables {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.atlas-table {
  min-width: 0;
}

.atlas-table:only-child {
  grid-column: 1 / -1;
}

.atlas-table .rubric {
  margin-bottom: var(--space-xs);
}

.atlas-table table {
  width: 100%;
  border-collapse: collapse;
  font: 0.75rem / 1.5 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.atlas-table th {
  padding: 0.25rem 0.75rem 0.25rem 0;
  border-bottom: 1px solid var(--color-border-strong);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.atlas-table th abbr {
  text-decoration: none;
}

.atlas-table td {
  padding: 0.3rem 0.75rem 0.3rem 0;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: baseline;
  color: var(--color-text-secondary);
}

.atlas-table :is(th, td):last-child {
  padding-right: 0;
}

.atlas-table :is(.c-date, .c-time, .c-wx, .c-town) {
  white-space: nowrap;
}

.atlas-table .c-date {
  color: var(--color-text);
}

/* A day or a year the row above has too shows once. */
.atlas-table .c-date .same {
  opacity: 0;
}

.atlas-table .c-wx {
  text-align: right;
}

.atlas-table .c-wx a {
  color: inherit;
  text-decoration: none;
}

.atlas-table .c-venue {
  width: 100%;
}

.atlas-table .c-venue a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
}

.atlas-table .c-venue a:hover {
  color: var(--color-accent);
}

.atlas-table .c-note {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
}

.atlas-table .c-photo {
  color: var(--color-accent);
}

.atlas-table .more {
  margin: var(--space-md) 0 0;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.atlas-table .more-fact {
  margin-left: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

/* A table's line for a phone, which shows it in the table's place. */
.t-sum {
  display: none;
}

/* The pinned posts and the featured series, on a line of their own
   between the tables and the stream, under the same rubric. */
body.home .pinned {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-lg);
}

body.home .pinned h2 {
  position: static;
  margin: 0;
}

body.home .pinned ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-lg);
  font-size: 0.9375rem;
}

/* The stream, under its heading's rule. A page with nothing above the
   stream, such as a later one, keeps it clear of the strip. */
.stream-h {
  margin: 0 0 var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border-strong);
}

body.home:has(> .plate-strip) .h-card[hidden] + :is(.pinned, .h-feed) {
  margin-top: var(--space-lg);
}

/* An entry is a grid: the rail's column, then the entry's words, and a
   third column where it has a cover or a trip's map. The rail is the
   entry's footer, moved to the first column, so the markup keeps its
   order. Its space above and below is no more specific than a list's,
   so the first entry stands under the heading as a list's does. */
.stream > article {
  padding-block: var(--space-md);
}

.h-feed.stream > article.h-entry {
  /* Over the flow root of a list's entry with a cover. */
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  column-gap: var(--space-lg);
}

.h-feed.stream > article > * {
  grid-column: 2;
}

.h-feed.stream > article > footer {
  grid-column: 1;
  grid-row: 1 / span 6;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  font: 0.75rem / 1.6 var(--font-mono);
}

/* The kind stands in the rail's second line, under the date, which
   leaves it the line. A grid's item takes a z-index without a position,
   so it stays over the link that covers the entry. */
.h-feed.stream > article > .post-kind {
  grid-column: 1;
  grid-row: 1 / span 6;
  align-self: start;
  position: static;
  z-index: 1;
  margin: 1.2rem 0 0;
  font: 400 0.75rem / 1.6 var(--font-mono);
  white-space: nowrap;
}

.h-feed.stream > article > footer .u-url {
  margin-bottom: 1.2rem;
}

.stream .r-date {
  display: inline-block;
  min-width: 3.75rem;
  color: var(--color-text);
}

/* A day the entry above has too shows once. */
.stream > article .r-date.same {
  opacity: 0;
}

/* The city over the weather; the dot between them is dropped. */
.h-feed.stream > article > footer .city-line {
  display: flex;
  flex-direction: column;
  font-size: 0;
  color: var(--color-text-tertiary);
}

.h-feed.stream > article > footer .city-line > * {
  font-size: 0.6875rem;
}

/* A note is a dispatch in Sans, at one size whatever leads it; only an
   article is set in Serif. */
.h-feed.stream > article > .p-summary {
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.55;
}

.h-feed.stream > article .lead-cite-text {
  font-family: var(--font-heading);
}

.h-feed.stream > article:has(> .post-kind[href$="/articles/"]) > :is(h2.p-name, .p-summary) {
  font-family: var(--font-body);
}

.h-feed.stream > article > .photos {
  margin-top: var(--space-sm);
}

/* A cover, or a trip's map, in a column of its own at the entry's
   right. The cover's <picture> has no box, so the image is the grid's
   item. */
.h-feed.stream > article.h-entry:has(.cover) {
  grid-template-columns: 8.5rem minmax(0, 1fr) 4.5rem;
}

.h-feed.stream > article.h-entry:has(> .trip-thumb) {
  grid-template-columns: 8.5rem minmax(0, 1fr) 6rem;
}

.h-feed.stream > article .cover,
.h-feed.stream > article > .trip-thumb {
  position: static;
  float: none;
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  grid-column: 3;
  grid-row: 1 / span 6;
  align-self: start;
}

/* A run of logged works: their covers in a grid, beside the rail's
   place, each over its kind, the work's name and its rating, and the
   day. The reviews are on the posts' pages. */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  gap: var(--space-lg) var(--space-md);
  padding: var(--space-md) 0 var(--space-md) calc(8.5rem + var(--space-lg));
  border-bottom: 1px solid var(--color-rule);
}

.cover-grid > article.h-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cover-grid > article.h-entry .cover {
  order: -1;
  float: none;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center bottom;
  margin: 0 0 var(--space-sm);
  background: none;
  box-shadow: none;
}

.cover-grid .post-kind {
  position: static;
  z-index: 1;
  align-self: flex-start;
  font: 400 0.6875rem / 1.6 var(--font-mono);
  color: var(--color-accent);
}

.cover-grid h2 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

.cover-grid h2 a {
  position: relative;
  z-index: 1;
  color: var(--color-text);
}

.cover-grid .rating {
  white-space: nowrap;
}

.cover-grid .p-summary {
  display: none;
}

.cover-grid footer {
  margin-top: 0.125rem;
  font: 0.6875rem / 1.6 var(--font-mono);
  color: var(--color-text-secondary);
}

.cover-grid footer a {
  color: inherit;
}

/* The date's link covers the cover and its lines, as an entry's does. */
.cover-grid footer .u-url::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cover-grid > article:hover footer .u-url {
  color: var(--color-accent);
}

.cover-grid .r-time,
.cover-grid .city-line {
  display: none;
}

@media (max-width: 44rem) {
  /* The strip is a short band of the column's own strip, which fits it. */
  .plate-strip {
    height: 2rem;
    margin-bottom: var(--space-xs);
    background-image: var(--plate-strip);
  }

  .atlas-latest {
    margin-bottom: var(--space-sm);
  }

  /* Each table is one line: its rubric, which links the full list, then
     its summary, cut at the column's edge. */
  .atlas-tables {
    display: block;
    margin-bottom: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
  }

  .atlas-table {
    display: flex;
    align-items: baseline;
    gap: 0.75em;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-border-light);
  }

  .atlas-table :is(table, .more) {
    display: none;
  }

  .atlas-table .rubric {
    flex: none;
    margin: 0;
    font-family: var(--font-mono);
    font-weight: 400;
  }

  .atlas-table .rubric a::after {
    content: " ›";
  }

  .t-sum {
    display: block;
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font: 0.75rem / 1.6 var(--font-mono);
    color: var(--color-text-secondary);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .t-sum a {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    color: var(--color-text);
    text-decoration: none;
  }

  /* The pinned block follows the tables' lines, under the same rule: its
     rubric, then each pinned post or series on a line of its own, whole,
     since nothing else leads to one. */
  .atlas-tables:has(+ .pinned) {
    margin-bottom: 0;
  }

  body.home .pinned {
    flex-wrap: nowrap;
    gap: 0.75em;
    margin-bottom: var(--space-lg);
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-border-light);
  }

  body.home .pinned h2 {
    flex: none;
    font-family: var(--font-mono);
    font-weight: 400;
  }

  body.home .pinned ul {
    display: grid;
    flex: 1;
    gap: 0.125rem;
    min-width: 0;
    font-size: 0.8125rem;
  }

  /* The stream's heading is left to screen readers: the entries start
     under the lines above. */
  .stream-h {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* The rail is one line above its entry: the date and time, the kind,
     then the city and the weather. The footer has no box, so its parts
     are the grid's items beside the kind. */
  .h-feed.stream > article.h-entry {
    grid-template-columns: auto auto minmax(0, 1fr);
    column-gap: 0.75em;
    align-items: baseline;
  }

  .h-feed.stream > article > * {
    grid-column: 1 / -1;
  }

  .h-feed.stream > article > footer {
    display: contents;
  }

  .h-feed.stream > article > footer .u-url {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0.25rem;
    font: 0.75rem / 1.6 var(--font-mono);
  }

  .h-feed.stream > article > .post-kind {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 0.25rem;
  }

  .h-feed.stream > article > footer .city-line {
    grid-column: 3;
    grid-row: 1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    /* In rem: the line's own font size is none. */
    gap: 0 0.5rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-mono);
  }

  .stream .r-date {
    min-width: 0;
  }

  .stream > article .r-date.same {
    opacity: 1;
  }

  /* The cover keeps a narrower column at the entry's right, under the
     rail's line. */
  .h-feed.stream > article.h-entry:has(.cover) {
    grid-template-columns: auto auto minmax(0, 1fr) 3.5rem;
  }

  .h-feed.stream > article.h-entry:has(> .trip-thumb) {
    grid-template-columns: auto auto minmax(0, 1fr) 5rem;
  }

  .h-feed.stream > article:has(.cover, > .trip-thumb) > :not(.post-kind, .cover, .trip-thumb) {
    grid-column: 1 / 4;
  }

  .h-feed.stream > article .cover,
  .h-feed.stream > article > .trip-thumb {
    grid-column: 4;
    grid-row: 2 / span 5;
  }

  .cover-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-left: 0;
  }
}

@media print {
  .plate-strip {
    display: none;
  }
}
