/* ==========================================================================
   Strands — publications rebuilt from the Community Archive
   One white reading surface. Literata carries every word a writer wrote;
   the system sans carries every control. Colour belongs to the publication
   (--pub, set inline per row, page, or post) and to nothing else.
   ========================================================================== */

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

  /* Paper and ink. Warm-neutral, never cream. */
  --paper: #ffffff;
  --paper-2: #f7f6f3;
  --paper-3: #efede8;
  --line: #e7e4de;
  --line-2: #d6d2ca;
  --ink: #1d1b18;
  --ink-2: #45413b;
  --ink-3: #6d6860;
  --ink-4: #8f8a81;

  /* Publication accent. Inline styles override this per publication. */
  --pub: #5b5248;

  /* Editions: different hue and different shape. */
  --ed-gemini: #34618f;
  --ed-fable: #a4492a;

  /* Riff kinds */
  --tag-extends: #2f6b4f;
  --tag-counterpoint: #a6362f;
  --tag-experiment: #8a5a0c;
  --tag-lineage: #3a5a92;
  --tag-question: #674a9c;

  /* Author status */
  --st-unendorsed: #8f8a81;
  --st-annotated: #3a5a92;
  --st-endorsed: #2f6b4f;

  --danger: #a6362f;
  --focus: #2459c9;

  /* Type */
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --fs-micro: 0.6875rem;  /* 11 */
  --fs-xs: 0.75rem;       /* 12 */
  --fs-sm: 0.8125rem;     /* 13 */
  --fs-ui: 0.875rem;      /* 14 */
  --fs-body: 1rem;        /* 16 */
  --fs-prose: 1.1875rem;  /* 19 */

  /* Space */
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 680px;

  /* Shape and depth */
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;
  --shadow-1: 0 1px 2px rgb(29 27 24 / 0.06);
  --shadow-2: 0 2px 6px rgb(29 27 24 / 0.06), 0 10px 28px rgb(29 27 24 / 0.10);
  --shadow-3: 0 6px 16px rgb(29 27 24 / 0.10), 0 24px 64px rgb(29 27 24 / 0.18);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Measured by app.js (observeChrome). Fallbacks keep first paint sane. */
  --header-h: 57px;
  --toolbar-h: 0px;
  --sticky-top: calc(var(--header-h) + var(--toolbar-h) + 24px);

  /* Layering: one ladder, nothing improvised */
  --z-sticky: 10;
  --z-toolbar: 30;
  --z-header: 40;
  --z-backdrop: 60;
  --z-drawer: 70;
  --z-popover: 80;
}

/* Derived accent tokens. Declared wherever --pub is set inline, because a
   custom property resolves where it is declared, not where it is used. */
:root, [style*="--pub"] {
  --pub-ink: color-mix(in oklab, var(--pub), #000 20%);
  --pub-wash: color-mix(in oklab, var(--pub) 7%, var(--paper));
  --pub-tint: color-mix(in oklab, var(--pub) 13%, var(--paper));
  --pub-line: color-mix(in oklab, var(--pub) 30%, var(--paper));
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--line-2) transparent;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--pub-ink);
}

main { flex: 1 0 auto; outline: none; }

h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
strong, b { font-weight: 600; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: var(--r-sm); }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line-2);
}
a:hover { text-decoration-color: currentColor; }

::selection { background: color-mix(in oklab, var(--pub) 22%, var(--paper)); color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Thin, quiet scrollbars wherever we create a scroll container */
.rail, .home__side, .notes-page__side, .reader__toc, .graph__scroll, .tabs__inner, .export-preview, .dialog {
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.truncate {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-ui);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.boot-state {
  max-width: var(--measure);
  margin: 96px auto;
  padding-inline: var(--gutter);
  color: var(--ink-3);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   Site header and footer
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
}

.site-header__inner {
  max-width: 1280px;
  margin-inline: auto;
  padding: 0 var(--gutter);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.wordmark__mark { width: 26px; height: 26px; }
.wordmark__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 36;
}

.site-nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.site-nav__link {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--r);
  color: var(--ink-3);
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 120ms, background-color 120ms;
}
.site-nav__link:hover { color: var(--ink); background: var(--paper-2); }
.site-nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -9px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.site-footer__inner {
  max-width: var(--measure);
  margin-inline: auto;
  padding: 32px var(--gutter) 48px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.site-footer a { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Page shells
   -------------------------------------------------------------------------- */
.page {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding: 40px var(--gutter) 0;
}
.page--narrow { max-width: calc(720px + var(--gutter) * 2); }

.page-head { padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.page-head__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.page-head__lede {
  margin-top: 12px;
  max-width: 60ch;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.section-lede {
  margin: 8px 0 24px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.empty {
  padding: 48px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--ink-3);
  font-size: var(--fs-ui);
  line-height: 1.6;
}
.empty p { max-width: 48ch; margin-inline: auto; }
.empty p + p { margin-top: 6px; }
.empty__title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Controls: buttons, links, chips, segments
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 120ms, border-color 120ms, color 120ms, box-shadow 120ms;
}
.btn--sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-sm); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: #000; }
.btn--quiet { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn--quiet:hover { border-color: var(--ink-4); background: var(--paper-2); }
.btn__count {
  min-width: 1.6em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--ink-2);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--ink-3);
  transition: background-color 120ms, color 120ms;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.icon-btn--sm { width: 28px; height: 28px; }
.icon-btn--sm svg { width: 15px; height: 15px; }

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  border-radius: var(--r-sm);
  color: var(--pub-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.text-btn:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.text-btn--muted { color: var(--ink-3); font-weight: 500; }
.text-btn--muted:hover { color: var(--ink); }

.text-link {
  color: var(--ink-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.text-link:hover { color: var(--ink); text-decoration: underline; }

.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-3);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.ext-link:hover { color: var(--ink); text-decoration: underline; }
.ext-link .icon { width: 1em; height: 1em; }
.ext-link--strong { color: var(--pub-ink); font-weight: 600; }

/* Chips: filter toggles. They wrap; they never clip. */
.chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  max-width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.chip:hover { border-color: var(--ink-4); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip__count {
  color: var(--ink-4);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip__count { color: rgb(255 255 255 / 0.68); }
.chip--sm { min-height: 28px; padding: 0 10px; gap: 5px; font-size: var(--fs-xs); }
.chip--sm .chip__count { font-size: var(--fs-micro); }

.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
}

/* Segmented control */
.seg {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  max-width: 100%;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.seg__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 140ms, color 140ms, box-shadow 140ms;
}
.seg__btn:hover { color: var(--ink); }
.seg__btn[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgb(29 27 24 / 0.10), 0 0 0 1px var(--line);
}
.seg__btn .icon { width: 15px; height: 15px; }
.seg__short { display: none; }


/* Form fields */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field-label {
  display: block;
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.field-label__opt { margin-left: 4px; color: var(--ink-4); font-weight: 400; }

.input, .select, .textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-ui);
  transition: border-color 120ms, box-shadow 120ms;
}
.input, .select { height: 38px; padding: 0 10px; }
.textarea {
  display: block;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
  min-height: 84px;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-4); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus) 18%, transparent);
}
.select {
  appearance: none;
  padding-right: 30px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%236d6860' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}
.input-wrap { position: relative; display: block; flex: 1 1 auto; min-width: 0; }
.input-wrap > .icon {
  position: absolute;
  left: 10px; top: 50%;
  translate: 0 -50%;
  width: 16px; height: 16px;
  color: var(--ink-4);
  pointer-events: none;
}
.input--icon { padding-left: 32px; }
.input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* --------------------------------------------------------------------------
   Identity: avatars, publication logos, subscribe
   -------------------------------------------------------------------------- */
.avatar {
  --size: 32px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in oklab, var(--pub) 82%, #000);
  color: #fff;
  font-family: var(--serif);
  font-weight: 600;
  font-size: calc(var(--size) * 0.44);
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgb(29 27 24 / 0.08);
}
.avatar--xs { --size: 20px; }
.avatar--sm { --size: 32px; }
.avatar--md { --size: 40px; }
.avatar__initial { grid-area: 1 / 1; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.pub-logo {
  --size: 32px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: calc(var(--size) * 0.22);
  background: var(--pub-ink);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: calc(var(--size) * 0.4);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variation-settings: "opsz" 24;
}
.pub-logo { position: relative; overflow: hidden; }
.pub-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pub-logo--xs { --size: 20px; font-size: 9px; letter-spacing: 0; }
.pub-logo--sm { --size: 32px; }
.pub-logo--md { --size: 48px; }
.pub-logo--lg { --size: 72px; box-shadow: var(--shadow-1); }

.sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--r);
  border: 1px solid var(--pub-ink);
  background: var(--pub-ink);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 140ms, color 140ms, border-color 140ms;
}
.sub-btn:hover { background: color-mix(in oklab, var(--pub-ink), #000 14%); }
.sub-btn__on, .sub-btn__off { display: inline-flex; align-items: center; gap: 5px; }
.sub-btn__on .icon { width: 15px; height: 15px; stroke-width: 2; }
.sub-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink-2); border-color: var(--line-2); }
.sub-btn[aria-pressed="true"]:hover { border-color: var(--ink-4); color: var(--ink); background: var(--paper-2); }
.sub-btn[aria-pressed="true"] .sub-btn__off,
.sub-btn[aria-pressed="false"] .sub-btn__on { display: none; }
.sub-btn--compact { min-height: 30px; padding: 0 12px; font-size: var(--fs-xs); }
.sub-btn--pub { min-height: 40px; padding: 0 20px; font-size: var(--fs-ui); }
.sub-btn--pub.sub-btn--compact { min-height: 32px; padding: 0 14px; font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   Small labels: kinds, tags, editions, status
   -------------------------------------------------------------------------- */
.kind-badge {
  --k: var(--ink-3);
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--k) 10%, var(--paper));
  color: color-mix(in oklab, var(--k), #000 8%);
  font-size: var(--fs-micro);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kind-badge[data-kind="log"] { --k: var(--tag-experiment); }
.kind-badge[data-kind="anthology"] { --k: var(--tag-lineage); }
.kind-badge[data-kind="done"] { --k: var(--tag-extends); }
.kind-badge[data-kind="seed"] {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink-3);
}

.tag {
  --t: var(--ink-3);
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  max-width: 100%;
  padding: 3px 8px 3px 7px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--t) 10%, var(--paper));
  color: var(--t);
  font-size: var(--fs-micro);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tag[data-tag="Extends"], .tag-dot[data-tag="Extends"] { --t: var(--tag-extends); }
.tag[data-tag="Counterpoint"], .tag-dot[data-tag="Counterpoint"] { --t: var(--tag-counterpoint); }
.tag[data-tag="Lived Experiment"], .tag-dot[data-tag="Lived Experiment"] { --t: var(--tag-experiment); }
.tag[data-tag="Lineage"], .tag-dot[data-tag="Lineage"] { --t: var(--tag-lineage); }
.tag[data-tag="Question"], .tag-dot[data-tag="Question"] { --t: var(--tag-question); }

.tag-dot {
  --t: var(--ink-3);
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--t);
}
.chip[aria-pressed="true"] .tag-dot { box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.9); }

/* Gemini is a circle; Fable is a diamond. Colour is never the only cue. */
.edition-mark {
  display: inline-block;
  flex: none;
  width: 8px; height: 8px;
  margin-right: 1px;
  border-radius: 50%;
  background: var(--ed-gemini);
  vertical-align: 0.05em;
}
.edition-mark[data-edition="fable"] { border-radius: 1px; background: var(--ed-fable); transform: rotate(45deg) scale(0.88); }

.status-dot {
  display: inline-block;
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--st-unendorsed);
}
.status-dot[data-status="unendorsed"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--st-unendorsed); }
.status-dot[data-status="annotated"] { background: var(--st-annotated); }
.status-dot[data-status="endorsed"] { background: var(--st-endorsed); }

.status-pill {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 7px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 120ms, background-color 120ms;
}
.status-pill:hover { border-color: var(--ink-4); background: var(--paper-2); }
.status-pill[data-status="annotated"] { color: var(--st-annotated); border-color: color-mix(in oklab, var(--st-annotated) 35%, var(--paper)); background: color-mix(in oklab, var(--st-annotated) 6%, var(--paper)); }
.status-pill[data-status="endorsed"] { color: var(--st-endorsed); border-color: color-mix(in oklab, var(--st-endorsed) 35%, var(--paper)); background: color-mix(in oklab, var(--st-endorsed) 6%, var(--paper)); }

/* Meta rows: every item keeps its words together, the row wraps */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  min-width: 0;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  line-height: 1.4;
}
.meta-row > * {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}
.meta-row .icon { width: 13px; height: 13px; }
.meta-row .ext-link { margin-inline-start: auto; }
.meta-row--tight { gap: 4px 12px; margin-top: 10px; }

.mention {
  color: var(--pub-ink);
  font-weight: 500;
  text-decoration: none;
}
a.mention:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Strand art: the post's cover is drawn from its own source tweets
   -------------------------------------------------------------------------- */
.strand-art { width: 100%; height: 100%; }
.sa-bg { fill: var(--pub-wash); }
.sa-lane { stroke: var(--pub-line); stroke-width: 0.75; stroke-dasharray: 2 4; opacity: 0.8; }
.sa-thread { stroke: var(--pub); stroke-width: 1.4; stroke-linecap: round; opacity: 0.75; }
.sa-strand { fill: none; stroke: var(--pub); stroke-width: 1; opacity: 0.35; }
.sa-node { fill: var(--pub-ink); stroke: var(--paper); stroke-width: 1; }
.sa-node--out { fill: var(--paper); stroke: var(--ink-4); stroke-width: 1; }
.strand-art--cover .sa-thread { stroke-width: 1.8; }
.strand-art--cover .sa-strand { stroke-width: 1.3; }

/* --------------------------------------------------------------------------
   HOME
   -------------------------------------------------------------------------- */
.home { display: grid; gap: 56px; grid-template-columns: minmax(0, 1fr); }
.home__main { min-width: 0; }

.pub-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 8px;
  font-size: var(--fs-xs);
}
.pub-line__pub {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 0 1 auto;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.pub-line__pub:hover .truncate { text-decoration: underline; text-underline-offset: 0.2em; }
.pub-line__author { flex: 0 1 auto; color: var(--ink-3); }
.pub-line__author::before { content: "·"; margin-right: 8px; color: var(--ink-4); }

/* Stretched link: the whole row or lead is one target */
.stretch { color: inherit; text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.stretch:focus-visible { outline: none; }
.stretch:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--r); }

.lead {
  position: relative;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.lead__cover {
  display: block;
  aspect-ratio: 680 / 300;
  margin-bottom: 20px;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(29 27 24 / 0.05);
}
.lead__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead:hover .lead__title a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.12em; text-decoration-color: var(--line-2); }
.lead__sub {
  margin: 10px 0 14px;
  max-width: 62ch;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.feed { counter-reset: none; }
.post-row { border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-row__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 28px;
  align-items: start;
  padding: 26px 0;
}
.post-row__text { min-width: 0; }
.post-row__title {
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.012em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.post-row:hover .post-row__title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.14em; text-decoration-color: var(--line-2); }
.post-row__sub {
  margin-top: 5px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.45;
  text-wrap: pretty;
}
.post-row__excerpt {
  margin: 8px 0 12px;
  color: var(--ink-3);
  font-size: var(--fs-ui);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-row__sub + .meta-row, .post-row__excerpt + .meta-row { margin-top: 10px; }
.post-row__thumb {
  aspect-ratio: 200 / 140;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(29 27 24 / 0.05);
}

/* Sidebar blocks (home and notes) */
.side-block + .side-block { margin-top: 32px; }
.side-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.side-block__title {
  font-size: var(--fs-ui);
  font-weight: 650;
  color: var(--ink);
}
.side-block__about {
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.pub-list { display: flex; flex-direction: column; }
.pub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  min-width: 0;
}
.pub-item + .pub-item { border-top: 1px solid var(--paper-3); }
.pub-item__link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
}
.pub-item__text { display: flex; flex-direction: column; min-width: 0; }
.pub-item__name { font-family: var(--serif); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.pub-item__handle { color: var(--ink-3); font-size: var(--fs-xs); }
.pub-item__link:hover .pub-item__name { text-decoration: underline; text-underline-offset: 0.2em; }

.mini-notes { display: flex; flex-direction: column; }
.mini-note + .mini-note { border-top: 1px solid var(--paper-3); }
.mini-note__link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 0;
  text-decoration: none;
}
.mini-note__head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink-3);
  font-size: var(--fs-xs);
}
.mini-note__head strong { color: var(--ink); }
.mini-note__text {
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.mini-note__link:hover .mini-note__text { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; }

/* --------------------------------------------------------------------------
   PUBLICATIONS DIRECTORY
   -------------------------------------------------------------------------- */
.dir-list { display: flex; flex-direction: column; }
.dir-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.dir-row__main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
}
.dir-row__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dir-row__name {
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.dir-row__main:hover .dir-row__name { text-decoration: underline; text-underline-offset: 0.16em; text-decoration-color: var(--line-2); }
.dir-row__tagline { color: var(--ink-2); font-family: var(--serif); font-size: 1rem; line-height: 1.45; }
.dir-row__meta { margin-top: 4px; color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.5; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   PUBLICATION PAGE
   -------------------------------------------------------------------------- */
.pub-hero {
  background: var(--pub-wash);
  border-bottom: 1px solid var(--line);
}
.pub-hero__inner {
  max-width: calc(720px + var(--gutter) * 2);
  margin-inline: auto;
  padding: 56px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pub-hero__name {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(2.125rem, 1.6rem + 2.2vw, 3.25rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.pub-hero__tagline {
  margin-top: 12px;
  max-width: 46ch;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.45;
  text-wrap: balance;
}
.pub-hero__by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.pub-hero__by strong { color: var(--ink); }
.pub-hero__by a { color: var(--ink-2); }
.pub-hero__bio {
  margin-top: 14px;
  max-width: 54ch;
  color: var(--ink-3);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.pub-hero__actions { margin-top: 24px; }

.tabs { border-bottom: 1px solid var(--line); background: var(--paper); }
.tabs__inner {
  max-width: calc(720px + var(--gutter) * 2);
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs__inner::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  padding: 15px 12px 14px;
  color: var(--ink-3);
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--pub-ink);
}
.tab:focus-visible { outline-offset: -4px; }
.tab__count {
  display: inline-block;
  min-width: 1.5em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: var(--fs-micro);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.pub__body { padding-top: 16px; }

/* Seeds */
.seed-list { display: flex; flex-direction: column; }
.seed { padding: 28px 0; border-bottom: 1px solid var(--line); }
.seed:first-child { padding-top: 8px; }
.seed__title {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.tweet-mini-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.tweet-mini {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
}
.tweet-mini__text { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }

/* Notes & riffs tab */
.note-section + .note-section { margin-top: 40px; }
.note-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* Archive signal */
.signal { padding-top: 16px; }
.signal__lede {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.signal__lede strong { font-weight: 700; color: var(--pub-ink); }
.signal__note, .signal__stats {
  margin-top: 14px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}
.signal__stats { color: var(--ink-3); font-size: 1rem; }
.signal__compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-top: 32px;
}
.signal__col {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
}
.signal__col--graph { background: var(--pub-wash); border-color: var(--pub-line); }
.signal__col-title { font-size: var(--fs-ui); font-weight: 650; }
.signal__col-sub { margin-top: 3px; color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.45; }
.signal-list { display: flex; flex-direction: column; margin-top: 12px; }
.signal-item { padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.signal__col--graph .signal-item { border-top-color: var(--pub-line); }
.signal-item__text { color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.signal-item__title { font-family: var(--serif); font-size: 1.0625rem; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
.signal-item__title a { text-decoration-color: var(--pub-line); }
.signal-item__title a:hover { color: var(--pub-ink); }
.signal__why {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.6;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   NOTES
   -------------------------------------------------------------------------- */
.notes-page { display: grid; gap: 56px; grid-template-columns: minmax(0, 1fr); }
.notes-page__main { min-width: 0; max-width: var(--measure); }
.notes-page .page-head { border-bottom: 0; padding-bottom: 0; }
.notes-page .filter-strip { border-bottom: 1px solid var(--line); }

.note-stream { display: flex; flex-direction: column; }
.note {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.note__avatar { display: block; align-self: start; border-radius: 50%; }
.note__body { min-width: 0; }
.note__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.note__who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  min-width: 0;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.note__name { color: var(--ink); font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
a.note__name:hover { text-decoration: underline; }
.note__handle { color: var(--ink-3); overflow-wrap: anywhere; }
.note__dot { color: var(--ink-4); }
.note__text {
  margin-top: 6px;
  color: var(--ink);
  font-size: 0.9875rem;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.note__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-top: 10px;
  color: var(--ink-3);
  font-size: var(--fs-xs);
}
.note__foot > span { display: inline-flex; align-items: center; gap: 4px; }
.note__foot .icon { width: 13px; height: 13px; }
.note__anchor {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper-2);
  text-decoration: none;
  transition: border-color 120ms, background-color 120ms;
}
.note__anchor:hover { border-color: var(--line-2); background: var(--paper-3); }
.note__anchor-label { grid-column: 1; color: var(--ink-3); font-size: var(--fs-micro); font-weight: 600; }
.note__anchor-title { grid-column: 1; margin-top: 2px; font-family: var(--serif); font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.note__anchor-act { grid-column: 1; margin-top: 1px; color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.4; }
.note__anchor-icon { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: 16px; height: 16px; color: var(--ink-3); transition: translate 160ms var(--ease-out); }
.note__anchor:hover .note__anchor-icon { translate: 3px 0; color: var(--ink); }

.quote-card {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  min-width: 0;
}
.quote-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink-3);
  font-size: var(--fs-xs);
}
.quote-card__head strong { color: var(--ink); flex: 0 1 auto; }
.quote-card__head > .num { margin-left: auto; flex: none; }
.quote-card__handle { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-card__text {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: var(--fs-ui);
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.quote-card--sm { padding: 10px 12px; }
.quote-card--sm .quote-card__text { font-size: var(--fs-sm); }

.pair-list { display: flex; flex-direction: column; }
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  font-size: var(--fs-xs);
}
.pair + .pair { border-top: 1px solid var(--paper-3); }
.pair__who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pair__who a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.pair__who a:hover { color: var(--ink); text-decoration: underline; }
.pair__arrow { width: 14px; height: 14px; color: var(--ink-4); }
.pair__count {
  min-width: 1.8em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-weight: 600;
  text-align: center;
}

/* --------------------------------------------------------------------------
   READER: masthead, utility toolbar, grid
   -------------------------------------------------------------------------- */
.reader { position: relative; }

.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead__inner {
  max-width: 1360px;
  margin-inline: auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.masthead__pub {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.masthead__pub:hover .truncate { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--line-2); }

/* In a post the site header scrolls away with the page. The toolbar is the only thing that sticks,
   and it leaves while the reader scrolls down (js/views/post.js sets data-scroll). */
body[data-view="piece"] { --header-h: 0px; --sticky-top: calc(var(--toolbar-h) + 24px); }
body[data-view="piece"] .site-header { position: static; }

.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: 2px;
  pointer-events: none;
}
.read-progress::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--pub-ink);
  transform-origin: left;
  transform: scaleX(var(--read, 0));
}

.utility {
  container: utility / inline-size;
  position: relative;
  z-index: var(--z-toolbar);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: transform 260ms var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .utility { transition: none; }
}
.utility__pub {
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 15rem;
  margin-inline-end: 6px;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}
.reader[data-scrolled] .utility__pub { display: inline-flex; }
.utility__pub:hover { color: var(--ink); }
.utility__pub:hover .truncate { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--line-2); }
.utility__inner {
  max-width: 1360px;
  margin-inline: auto;
  padding: 10px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.utility__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.utility__group--end { margin-inline-start: auto; }

/* Narrow toolbars swap to short labels before anything wraps */
@container utility (max-width: 1100px) {
  .seg__btn:has(.seg__short) .seg__long { display: none; }
  .seg__btn .seg__short { display: inline; }
}

.reader__grid {
  max-width: 1360px;
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main";
  column-gap: 48px;
}
.reader__toc { grid-area: toc; display: none; }
.reader__article { grid-area: main; min-width: 0; width: 100%; max-width: var(--measure); margin-inline: auto; padding-top: 40px; }
.rail { min-width: 0; }

/* TOC */
.toc__title {
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  font-weight: 650;
}
.toc__list { display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.toc__list li { counter-increment: toc; }
.toc__link {
  display: grid;
  grid-template-columns: 1.4em minmax(0, 1fr);
  gap: 4px;
  width: 100%;
  padding: 6px 8px 6px 6px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: 1.4;
  text-align: left;
  transition: color 120ms, background-color 120ms;
}
.toc__link::before {
  content: counter(toc);
  color: var(--ink-4);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}
.toc__list li:last-child .toc__link[data-act="conclusion"]::before { content: "—"; }
.toc__link:hover { color: var(--ink); }
.toc__link[aria-current="true"] { color: var(--ink); font-weight: 600; }
.toc__link[aria-current="true"]::before { color: var(--pub-ink); font-weight: 650; }
.toc__left {
  margin-top: 14px;
  padding: 10px 8px 0 6px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: var(--fs-xs);
}
.toc__left:empty { display: none; }

/* --------------------------------------------------------------------------
   READER: post head, curator note, prose
   -------------------------------------------------------------------------- */
.post-head { padding-bottom: 24px; }
.post-head__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.45rem + 2.3vw, 2.875rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.024em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-variation-settings: "opsz" 60;
}
.post-head__sub {
  margin-top: 12px;
  color: var(--ink-3);
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}
.byline > a { border-radius: 50%; flex: none; }
.byline__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 200px; }
.byline__name { font-size: var(--fs-ui); font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.byline__name:hover { text-decoration: underline; }
.byline__meta { color: var(--ink-3); font-size: var(--fs-xs); }
.post-head__prov {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: 1.55;
  text-wrap: pretty;
}
.post-head__prov strong { color: var(--ink-2); }

.curator {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: var(--fs-ui);
  line-height: 1.6;
}
.curator strong { color: var(--ink); }
.curator__scope { margin-top: 10px; }
.curator__scope summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-sm);
}
.curator__scope summary::-webkit-details-marker { display: none; }
.curator__scope summary::before {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 160ms var(--ease-out);
}
.curator__scope[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }
.curator__scope summary:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.curator__scope p { margin-top: 8px; color: var(--ink-2); }

/* Standalone provenance disclosure at the end of the essay */
.prose .curator__scope {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper-2);
  font-family: var(--sans);
}
.prose .curator__scope summary { display: flex; font-size: var(--fs-ui); }
.prose .curator__scope p {
  margin-top: 10px;
  max-width: 68ch;
  color: var(--ink-2);
  font-size: var(--fs-ui);
  line-height: 1.6;
}
.author-note + .prose { margin-top: 8px; }

.author-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid color-mix(in oklab, var(--st-annotated) 28%, var(--paper));
  border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--st-annotated) 5%, var(--paper));
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
}
.author-note strong { color: var(--ink); font-family: var(--sans); font-size: var(--fs-ui); }

.surface { background: var(--paper); }
.prose {
  padding-top: 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-prose);
  line-height: 1.7;
  font-optical-sizing: auto;
  hanging-punctuation: first;
}
.prose p { margin-top: 1.05em; text-wrap: pretty; overflow-wrap: break-word; }
.prose .act > p:first-of-type { margin-top: 0.7em; }

.act {
  padding-top: 56px;
  scroll-margin-top: calc(var(--toolbar-h) + 16px);
}
.act:first-child { padding-top: 32px; }
.act-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.act-title {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.6875rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.016em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.act-title__num { color: var(--pub-ink); font-weight: 600; font-variant-numeric: lining-nums; }
.act--conclusion { margin-top: 24px; border-top: 1px solid var(--line); }

/* A note that other writers answered this section. Quiet text, in the margin where there is one. */
.act-riffs {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  min-height: 28px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 120ms;
}
.act-riffs:hover { color: var(--pub-ink); text-decoration: underline; text-underline-offset: 0.2em; }
.act-riffs .icon { width: 13px; height: 13px; }

/* Citations. In the essay a source is a superscript numeral: present, and silent until wanted.
   In the collage and verbatim views, where the tweets are the content, it is a labelled chip. */
.cites { white-space: nowrap; }
.cite {
  /* Raised by offset, not by vertical-align, so it has a real box for its hover and active
     fills and still adds nothing to the height of the line. */
  position: relative;
  top: -0.62em;
  display: inline-block;
  margin-left: 0.1em;
  padding: 0 0.22em;
  border-radius: 3px;
  color: var(--pub-ink);
  font-family: var(--sans);
  font-size: 0.64em;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  vertical-align: baseline;
  transition: background-color 120ms, color 120ms;
}
.cite + .cite { margin-left: 0.22em; }
.cite:hover { background: var(--pub-tint); }
.cite.is-active, .cite[aria-expanded="true"] { background: var(--pub-ink); color: #fff; }
@media (pointer: coarse) {
  .cite::after { content: ""; position: absolute; inset: -0.9em -0.45em; } /* a finger-sized target */
}
.cite--embed, .cite--verbatim {
  position: static;
  margin: 0;
  padding: 2px 6px;
  background: var(--pub-wash);
  font-size: var(--fs-micro);
  font-weight: 650;
  line-height: 1.5;
  vertical-align: baseline;
}
.cite--embed::before, .cite--verbatim::before { content: "["; }
.cite--embed::after, .cite--verbatim::after { content: "]"; }

/* X-ray: which words of the essay are in the source tweets.
   The author's own words keep full ink on a tint of the publication colour. What the editor
   wrote recedes to grey. One hue, two weights: it marks a source, it does not grade anyone. */
.btn--toggle[aria-pressed="true"] { background: var(--pub-ink); border-color: var(--pub-ink); color: #fff; }
.btn--toggle[aria-pressed="true"]:hover { background: var(--pub-ink); border-color: var(--pub-ink); }

.reader[data-xray] .act > p { color: var(--ink-3); }
.lift {
  border-radius: 2px;
  background: color-mix(in oklab, var(--pub) 6%, var(--paper));
  color: var(--ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  cursor: pointer;
  transition: background-color 120ms;
}
.lift:hover { background: color-mix(in oklab, var(--pub) 14%, var(--paper)); }

.xray-sum { margin-top: 20px; font-family: var(--sans); }
.xray-sum__bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--pub-ink) calc(var(--share, 0) * 100%), var(--paper-3) 0);
}
.xray-sum__line { margin-top: 10px; color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.5; text-wrap: pretty; }
.xray-sum__line strong { color: var(--ink); font-weight: 650; }
/* A paragraph its cited tweets do not support (anthology/stages/verify.py). Shown only with X-ray on. */
.ungrounded { box-shadow: inset 3px 0 0 #b3261e; padding-left: 12px; margin-left: -15px; }
.ungrounded__tag { font-size: var(--fs-ui); color: #b3261e; font-weight: 600; white-space: nowrap; }
.compare-head .xray-sum { margin-top: 14px; }

/* Upvote, ask, comment: on seeds and at the end of essays. Quiet until used. */
.engage { position: relative; z-index: 1; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--sans); }
.engage__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  font-weight: 550;
  transition: color 120ms, border-color 120ms, background-color 120ms;
}
.engage__btn:hover { color: var(--ink); border-color: var(--line-2); }
.engage__btn[aria-pressed="true"] { color: var(--pub-ink); border-color: var(--pub-line); background: var(--pub-wash); }
.engage__btn .icon { width: 13px; height: 13px; }
.engage__n { font-variant-numeric: tabular-nums; }
.srow__engage { margin-top: 8px; }
.seedread__engage { margin-top: 14px; }
.post-end__engage { margin-top: 28px; }

.comments { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--sans); }
.comments__title { font-size: var(--fs-ui); font-weight: 650; }
.comments__n { margin-left: 4px; color: var(--ink-3); font-weight: 500; }
.comments__list { display: flex; flex-direction: column; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment__head { color: var(--ink-3); font-size: var(--fs-xs); }
.comment__head strong { color: var(--ink); font-size: var(--fs-sm); margin-right: 6px; }
.comment__text { margin-top: 4px; color: var(--ink); font-size: var(--fs-ui); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.comments__form { margin-top: 14px; }
.comments__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.comments__as { color: var(--ink-3); font-size: var(--fs-xs); }
.comments__as button { margin-left: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.comments__as button:hover { color: var(--ink); }
.comments__as[data-problem] { color: var(--danger); }

.fidelity-note {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--paper-2);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.bridge {
  color: var(--ink-2);
  font-style: italic;
}
.bridge__lead {
  font-family: var(--sans);
  font-style: normal;
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--ink-3);
  margin-right: 0.3em;
}

.embed-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.tweet-embed {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  font-family: var(--sans);
  box-shadow: var(--shadow-1);
  scroll-margin-top: calc(var(--sticky-top));
  min-width: 0;
}
.tweet-embed__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tweet-embed__who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; font-size: var(--fs-sm); line-height: 1.3; }
.tweet-embed__who strong { color: var(--ink); }
.tweet-embed__who span { color: var(--ink-3); font-size: var(--fs-xs); }
.tweet-embed__text {
  margin-top: 10px;
  color: var(--ink);
  font-size: 0.96875rem;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.prose .tweet-embed__text { margin-top: 10px; }
.tweet-embed--compact { box-shadow: none; }
.tweet-embed--compact .tweet-embed__text { font-size: var(--fs-ui); }

.verbatim { display: flex; flex-direction: column; margin-top: 16px; }
.verbatim__item {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.verbatim__item:first-child { border-top: 0; }
.verbatim__item .cite { justify-self: start; margin-top: 0.3em; }
.verbatim__text { margin: 0; font-size: 1.0625rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.prose .verbatim__text { margin: 0; }
.verbatim__meta { display: block; margin-top: 6px; color: var(--ink-3); font-family: var(--sans); font-size: var(--fs-xs); }

/* Strand graph */
.graph { margin-top: 24px; font-family: var(--sans); }
.graph__caption { color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.55; text-wrap: pretty; }
.graph__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 12px;
  color: var(--ink-3);
  font-size: var(--fs-xs);
}
.graph__legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 24px; height: 10px; flex: none; overflow: visible; }
.legend-dot { fill: var(--pub-ink); }
.graph__scroll {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--pub-wash);
  overscroll-behavior-x: contain;
}
.graph__svg { width: 100%; min-width: 600px; height: auto; overflow: visible; }
.g-year { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 3; }
.g-year-label { fill: var(--ink-3); font-size: 10px; font-variant-numeric: tabular-nums; }
.g-lane { stroke: var(--pub-line); stroke-width: 1; }
.g-lane--out { stroke: var(--line-2); stroke-dasharray: 3 3; }
.g-lane-label { fill: var(--ink); font-size: 11px; font-weight: 650; }
.g-lane-sub { fill: var(--ink-3); font-size: 9.5px; }
.g-thread { stroke: var(--pub-ink); stroke-width: 1.6; stroke-linecap: round; opacity: 0.7; fill: none; }
.g-strand { stroke: var(--pub); stroke-width: 1.2; fill: none; opacity: 0.45; stroke-dasharray: 3 2.5; }
.g-node { cursor: pointer; outline: none; }
.g-node circle {
  fill: var(--pub-ink);
  stroke: var(--paper);
  stroke-width: 1.5;
  transition: fill 120ms;
}
.g-node text {
  fill: #fff;
  font-size: 8.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.g-node--out circle { fill: var(--paper); stroke: var(--ink-4); stroke-dasharray: 2 1.5; }
.g-node--out text { fill: var(--ink-3); }
.g-node:hover circle { fill: color-mix(in oklab, var(--pub-ink), #000 18%); }
.g-node--out:hover circle { fill: var(--paper-3); }
.g-node.is-selected circle { stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: none; }
.g-node:focus-visible circle { stroke: var(--focus); stroke-width: 3; stroke-dasharray: none; }
.graph-inspect { margin-top: 16px; }
.graph-inspect__where { margin-bottom: 10px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }

/* Post end */
.post-end { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.post-end__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--pub-wash);
  border: 1px solid var(--pub-line);
}
.post-end__sub-text { flex: 1 1 220px; min-width: 0; }
.post-end__sub-title { font-family: var(--serif); font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; }
.post-end__sub-tag { margin-top: 2px; color: var(--ink-2); font-family: var(--serif); font-size: 0.9375rem; line-height: 1.45; }
.post-end__more-title { margin-top: 40px; padding-bottom: 4px; font-size: var(--fs-ui); font-weight: 650; }
.feed--compact .post-row__inner { grid-template-columns: minmax(0, 1fr) 120px; gap: 20px; padding: 18px 0; }
.feed--compact .post-row__title { font-size: 1.125rem; }
.feed--compact .post-row__sub { font-size: 0.9375rem; }
.feed--compact .post-row__excerpt { display: none; }

/* --------------------------------------------------------------------------
   READER: margin riffs rail
   -------------------------------------------------------------------------- */
.rail {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: var(--measure);
  justify-self: center;
}
.rail__inner { display: flex; flex-direction: column; min-width: 0; }
.rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rail__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--r-sm);
}
.rail__count {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rail__title:focus { outline: none; } /* focused by script when the drawer opens, for screen readers */
.rail__head-actions { display: flex; align-items: center; gap: 4px; flex: none; }

/* The pills wrap onto as many rows as they need. Nothing is ever hidden. */
.rail__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.rail__empty {
  margin-top: 16px;
  padding: 20px 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: 1.5;
  text-align: center;
}
.rail__empty .text-btn { margin-top: 8px; }

.riff-list { display: flex; flex-direction: column; }
.riff {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.riff:last-child { border-bottom: 0; }
.riff--local {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--pub-line);
  border-radius: var(--r);
  background: var(--pub-wash);
}
.riff--local + .riff { margin-top: 0; }
.riff__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.riff__author { flex: 1 1 auto; font-size: var(--fs-sm); font-weight: 650; }
.riff__author a { text-decoration: none; }
.riff__author a:hover { text-decoration: underline; }
.riff__summary {
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: pretty;
}
.riff__text {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.riff__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  margin-top: 10px;
  color: var(--ink-3);
  font-size: var(--fs-xs);
}
.riff__foot .text-btn { padding: 2px 0; font-size: var(--fs-xs); }
.riff__foot .text-btn .icon, .riff__foot .ext-link .icon { width: 13px; height: 13px; }

/* Composer */
.composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--paper-2);
}
.composer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.composer__search { display: flex; flex-direction: column; gap: 6px; }
.composer__search-row { display: flex; gap: 8px; min-width: 0; }
.composer__search-row .select { flex: 0 0 auto; width: auto; max-width: 46%; }
.composer__attached { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.composer__attached .quote-card { margin-top: 0; width: 100%; }
.composer__error { color: var(--danger); font-size: var(--fs-sm); font-weight: 600; }
.composer__error:empty { display: none; }
.composer__actions { display: flex; justify-content: flex-end; gap: 8px; }
.composer__fine { color: var(--ink-3); font-size: var(--fs-micro); text-align: right; margin-top: -4px; }

.hits { margin-top: 4px; }
.hits__count, .hits__empty { color: var(--ink-3); font-size: var(--fs-xs); padding: 2px 0 6px; }
.hits__list {
  display: flex;
  flex-direction: column;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
}
.hits__list li + li { border-top: 1px solid var(--line); }
.hit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  transition: background-color 120ms;
}
.hit:hover { background: var(--pub-wash); }
.hit:focus-visible { outline-offset: -2px; }
.hit__head { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-3); font-size: var(--fs-xs); }
.hit__head strong { color: var(--ink); }
.hit__head .num { margin-left: auto; }
.hit__text { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.45; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   SPLIT COMPARE
   -------------------------------------------------------------------------- */
.reader[data-mode="split"] .reader__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
.reader__article--split { container: split / inline-size; max-width: 1200px; }

.compare-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.compare-intro__text { flex: 1 1 420px; min-width: 0; }
.compare-intro__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.375rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.compare-intro__text p {
  margin-top: 10px;
  max-width: 64ch;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.compare__col { min-width: 0; padding-top: 28px; }
.compare__col + .compare__col { margin-top: 48px; border-top: 1px solid var(--line-2); }

/* Side by side whenever the article itself has room for two readable columns */
@container split (min-width: 760px) {
  .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare__col:first-child { padding-right: 28px; }
  .compare__col + .compare__col {
    margin-top: 0;
    border-top: 0;
    padding-left: 28px;
    box-shadow: inset 1px 0 0 var(--line-2);
  }
}

.compare-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.compare-head__edition {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 9px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--ed-gemini) 9%, var(--paper));
  color: var(--ed-gemini);
  font-size: var(--fs-xs);
  font-weight: 650;
}
.compare__col[data-edition="fable"] .compare-head__edition { background: color-mix(in oklab, var(--ed-fable) 9%, var(--paper)); color: var(--ed-fable); }
.compare-head__title {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.018em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.compare-head__sub {
  margin-top: 8px;
  color: var(--ink-3);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.45;
  text-wrap: pretty;
}
.compare-head__facts {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-size: var(--fs-xs);
  line-height: 1.45;
}
.compare-head__facts > div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 10px; }
.compare-head__facts dt { color: var(--ink-3); font-weight: 600; }
.compare-head__facts dd { color: var(--ink-2); overflow-wrap: anywhere; }

.prose--compare { font-size: 1.0625rem; line-height: 1.68; }
.prose--compare .act { padding-top: 32px; }
.prose--compare .act-title { font-size: 1.25rem; }
.prose--compare .graph__svg { min-width: 560px; }

/* Drawer rail (split mode, every width) */
.rail--drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  width: min(420px, 100vw);
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-3);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 380ms var(--ease-out), visibility 0s linear 380ms;
}
.rail--drawer.is-open {
  transform: none;
  visibility: visible;
  transition: transform 380ms var(--ease-out), visibility 0s;
}
.rail--drawer .rail__inner { padding: 0 20px 32px; }
.rail--drawer .rail__head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 18px 0 12px;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
.rail--drawer .rail__filters { margin-top: 12px; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  background: rgb(29 27 24 / 0.32);
  animation: fade-in 220ms var(--ease-out);
}

/* --------------------------------------------------------------------------
   Provenance popover
   -------------------------------------------------------------------------- */
.popover {
  position: fixed;
  top: 0; left: 0;
  z-index: var(--z-popover);
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-3);
  font-family: var(--sans);
  animation: pop-in 200ms var(--ease-out);
}
.popover:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.popover__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.popover__who { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); line-height: 1.3; }
.popover__who span { color: var(--ink-3); font-size: var(--fs-xs); }
.popover__num {
  flex: none;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 650;
}
.popover__text {
  margin-top: 12px;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.popover__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
}
.popover__placement { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-3); }
.popover__placement > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Dialogs (export, author hand-off)
   -------------------------------------------------------------------------- */
.dialog {
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-3);
  overflow: auto;
}
.dialog--wide { width: min(820px, calc(100vw - 24px)); }
.dialog--narrow { width: min(380px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgb(29 27 24 / 0.4); }
.dialog[open] { animation: dialog-in 240ms var(--ease-out); }
.dialog[open]::backdrop { animation: fade-in 240ms var(--ease-out); }

.dialog__inner { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px 20px; }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog__head > div { min-width: 0; }
.dialog__title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.016em;
}
.dialog__sub { margin-top: 4px; color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.5; overflow-wrap: anywhere; }
.dialog__head .icon-btn { margin: -4px -8px 0 0; }
.dialog__controls { display: flex; flex-wrap: wrap; gap: 10px; }
.dialog__note { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.55; }
.dialog__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}
.dialog__status { margin-right: auto; color: var(--tag-extends); font-size: var(--fs-sm); font-weight: 600; }

.export-preview {
  display: block;
  width: 100%;
  height: clamp(220px, 46vh, 420px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.78125rem;
  line-height: 1.6;
  white-space: pre-wrap;
  resize: vertical;
  tab-size: 2;
}
.export-preview:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus) 18%, transparent); }

.claim-options { display: flex; flex-direction: column; gap: 8px; }
.claim-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color 120ms, background-color 120ms;
}
.claim-option:hover { border-color: var(--line-2); background: var(--paper-2); }
.claim-option:has(input:checked) { border-color: var(--ink); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--ink); }
.claim-option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.claim-option input {
  margin: 2px 0 0;
  width: 16px; height: 16px;
  accent-color: var(--ink);
}
.claim-option input:focus-visible { outline: none; }
.claim-option__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.claim-option__title { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-ui); font-weight: 650; }
.claim-option__desc { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.45; }
#claimForm .field-label { margin-top: 4px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 639px) {
  .site-header__inner { height: 48px; gap: 8px; }
  .wordmark { min-width: 36px; min-height: 40px; }
  .wordmark__name { font-size: 1.125rem; }
  .site-nav {
    align-self: stretch;
    align-items: stretch;
    justify-content: safe flex-end;
    gap: clamp(3px, 1.6vw, 10px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav__link {
    --nav-pad: clamp(4px, 1.5vw, 9px);
    display: inline-flex;
    flex: none;
    align-items: center;
    padding: 0 var(--nav-pad);
    font-size: var(--fs-sm);
  }
  .site-nav__link:focus-visible { outline-offset: -3px; }
  .site-nav__link[aria-current="page"]::after { inset-inline: var(--nav-pad); bottom: 0; }
}

/* Phones */
@media (max-width: 600px) {
  /* Five links do not fit beside the wordmark on a phone. The console is a desk tool, and the
     wordmark already goes home. */
  .site-nav__link[href="/console"], .site-nav__link[data-nav="home"] { display: none; }

  .page { padding-top: 24px; }
  .page-head__title, .lead__title, .lead__sub, .post-row__sub { overflow-wrap: anywhere; }
  .site-footer { margin-top: 56px; }
  .site-footer__inner { padding-block: 24px 32px; }

  .filter-strip { gap: 6px; padding-block: 14px; }
  .chip { min-height: 36px; white-space: normal; text-align: start; overflow-wrap: anywhere; }

  .lead { padding-bottom: 24px; }
  .lead__cover { margin-bottom: 14px; }
  .post-row__inner { grid-template-columns: minmax(0, 1fr) clamp(64px, 20vw, 84px); gap: 12px; padding: 16px 0; }
  .post-row__thumb { aspect-ratio: 1; }
  .post-row__title { font-size: 1.125rem; }
  .post-row__sub { font-size: 0.9375rem; }
  .post-row__excerpt { display: none; }
  .feed--compact .post-row__inner { grid-template-columns: minmax(0, 1fr) 72px; }

  .dir-row { flex-wrap: wrap; gap: 12px; }
  .dir-row .sub-btn { margin-left: 64px; }

  .tabs__inner { justify-content: flex-start; }
  .pub-hero__inner { padding-top: 40px; }

  .utility__inner { padding-block: 8px; }
  .utility__group, .utility__group--end { width: 100%; margin-inline-start: 0; }
  .utility__group .seg { width: 100%; padding: 1px; }
  .utility__group .seg__btn { flex: 1 1 0; min-width: 0; min-height: 36px; padding: 0 4px; }
  .utility__group--end { gap: 6px; }
  .utility__group--end .btn { flex: 1 1 auto; min-height: 36px; padding-inline: 8px; }

  .reader__article { padding-top: 28px; }
  .prose { font-size: 1.125rem; line-height: 1.66; }
  .cites { white-space: normal; }
  .verbatim__item { grid-template-columns: minmax(0, 1fr); gap: 6px; }

  .composer__grid { grid-template-columns: minmax(0, 1fr); }
  .composer__search-row { flex-direction: column; }
  .composer__search-row .select { max-width: none; width: 100%; }

  .note { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .note__avatar .avatar { --size: 32px; }

  .popover { max-height: min(70dvh, 520px); padding: 12px; overscroll-behavior: contain; }
  .popover__head .icon-btn { width: 36px; height: 36px; }
  .popover__placement > span { white-space: normal; overflow-wrap: anywhere; }

  .dialog { max-height: calc(100dvh - 24px); overscroll-behavior: contain; }
  .dialog__inner { gap: 12px; padding: 16px; }
  .dialog__controls .seg { width: 100%; padding: 1px; }
  .dialog__controls .seg__btn { flex: 1 1 0; min-width: 0; min-height: 36px; padding-inline: 6px; white-space: normal; }
  .dialog__actions .btn { flex: 1 1 auto; }
  .dialog__status { flex-basis: 100%; }
  .export-preview { height: clamp(138px, 32dvh, 280px); padding: 10px 12px; }
  .input, .textarea { font-size: var(--fs-body); }
}
/* The mark stands in for the name where the links need the room. */
@media (max-width: 409px) {
  .wordmark__name { display: none; }
  .site-nav:has([data-nav="event"]:not([hidden])) { flex: 1 1 auto; justify-content: space-between; }
  .utility__group--end .btn > .icon { display: none; }
}
@media (max-width: 339px) {
  .site-nav { gap: 2px; }
  .site-nav__link { --nav-pad: 4px; }
}
@media (hover: none) {
  .pub-line { pointer-events: none; }
  .pub-line a { pointer-events: auto; }
}

/* Tablet: sidebars flow below as static blocks, two up where they fit */
@media (min-width: 640px) and (max-width: 1023px) {
  .home__side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 40px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
  }
  .home__side .side-block + .side-block { margin-top: 0; }
  .home__side .side-block:first-child { grid-column: 1 / -1; max-width: 62ch; }
}
@media (max-width: 1023px) {
  .home, .notes-page { gap: 40px; }
  .notes-page__main { max-width: none; }
  .notes-page__side { max-width: var(--measure); }
}

/* Desktop: two-column shells, sticky toolbar and sticky sidebars */
@media (min-width: 1024px) {
  .home { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
  .notes-page { grid-template-columns: minmax(0, var(--measure)) 320px; justify-content: space-between; gap: 64px; align-items: start; }

  .home__side, .notes-page__side {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    z-index: var(--z-sticky);
    max-height: calc(100dvh - var(--header-h) - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 6px 24px 4px;
    margin: -4px -6px 0 -4px;
  }

  .utility { position: sticky; top: var(--header-h); }
  :root[data-scroll="down"] .reader .utility:not(:focus-within) { transform: translateY(-102%); }

  .reader__grid { align-items: start; }

  .post-row__inner { grid-template-columns: minmax(0, 1fr) 168px; }
}

/* Wide desktop: the essay sits in the middle of the page. Contents hang in the left margin,
   and the right margin is left empty for the notes that other writers answered a section. */
@media (min-width: 1280px) {
  .reader__grid {
    grid-template-columns: 200px minmax(0, var(--measure)) 200px;
    grid-template-areas: "toc main .";
    justify-content: center;
    column-gap: 64px;
  }
  .reader__toc {
    display: block;
    position: sticky;
    top: 40px;
    z-index: var(--z-sticky);
    align-self: start;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    margin-top: 40px;
    padding: 4px 4px 20px 0;
    transition: top 260ms var(--ease-out);
  }
  :root[data-scroll="up"] .reader__toc { top: var(--sticky-top); }
  .reader__article { justify-self: stretch; }
  .reader[data-mode="single"] .act-riffs { position: absolute; left: calc(100% + 32px); top: 0.35em; }
}

/* Split mode never shows the contents column or an inline rail */
.reader[data-mode="split"] .reader__toc { display: none; }
@media (min-width: 1024px) {
  .reader[data-mode="split"] .reader__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "main";
  }
  .reader[data-mode="split"] .reader__article { justify-self: center; }
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); filter: blur(2px); }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 200ms;
  animation-timing-function: var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* --------------------------------------------------------------------------
   Print: the essay, its citations, nothing else
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .masthead, .utility, .reader__toc, .rail, .post-end, .popover, .drawer-backdrop, .act-riffs { display: none !important; }
  .reader__grid { display: block; padding: 0; }
  .reader__article { max-width: none; padding-top: 0; }
  .prose { font-size: 11.5pt; }
  .cite { background: none; color: inherit; }
}

/* ==========================================================================
   Seeds: the list (shelves, form, search) and the page for one seed.
   Same world as the rest: Literata for the writer's words, sans for controls,
   colour only from the publication. Both screens hold the essay's measure.
   ========================================================================== */
.page--seeds { max-width: calc(1208px + var(--gutter) * 2); }

.seedlib__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.seedlib__main { min-width: 0; }
.seedlib--loading { max-width: var(--measure); margin-inline: auto; }

/* Index: shelves and forms as plain text in the left margin */
.idx + .idx { margin-top: 28px; }
.idx__title { margin-bottom: 6px; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 650; }
.idx__list { display: flex; flex-direction: column; gap: 2px; }
.idx__btn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 6px 0;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: 1.4;
  text-align: left;
  transition: color 120ms;
}
.idx__btn:hover:not(:disabled) { color: var(--ink); }
.idx__btn[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.idx__btn:disabled { opacity: 0.45; }
.idx__n { color: var(--ink-4); font-size: var(--fs-xs); font-weight: 500; }
.idx__btn[aria-pressed="true"] .idx__n { color: var(--pub-ink); font-weight: 650; }
.idx__list li:has(.idx__btn--aside) { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* Search and sort, sticky above the results */
.seedbar {
  position: sticky;
  top: var(--header-h);
  z-index: var(--z-sticky);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  background: color-mix(in oklab, var(--paper) 96%, transparent);
}
@supports (backdrop-filter: blur(1px)) {
  .seedbar { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
.seedbar__search {
  position: relative;
  display: flex;
  flex: 1 1 220px;
  align-items: center;
  min-width: 0;
}
.seedbar__search > .icon { position: absolute; left: 12px; color: var(--ink-4); pointer-events: none; }
.seedbar__input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-body);
  transition: border-color 120ms, box-shadow 120ms;
}
.seedbar__input::placeholder { color: var(--ink-3); }
.seedbar__input:hover { border-color: var(--ink-4); }
.seedbar__input:focus-visible { outline: none; border-color: var(--pub-ink); box-shadow: 0 0 0 3px var(--pub-tint); }
.seedbar__input::-webkit-search-cancel-button { cursor: pointer; }
kbd, .seedbar__kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  line-height: 1;
}
.seedbar__kbd { position: absolute; right: 10px; pointer-events: none; }
.seedbar__input:focus ~ .seedbar__kbd, .seedbar__input:not(:placeholder-shown) ~ .seedbar__kbd { display: none; }
.seedbar__sort { flex: none; }
.seedbar__sort .select { width: auto; height: 42px; padding-left: 12px; color: var(--ink-2); font-size: var(--fs-sm); }

/* Recurring ideas: one line of search shortcuts that scrolls sideways when it runs long */
.seedterms {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-inline: -4px;
  padding: 0 36px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  white-space: nowrap;
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}
.seedterms::-webkit-scrollbar { display: none; }
.seedterms > * { flex: none; }
.seedterms__term { padding: 5px 0; color: var(--ink-2); }
.seedterms__term:hover { color: var(--pub-ink); text-decoration: underline; text-underline-offset: 0.2em; }

/* How many seeds, and the filters in force */
.seedstatus {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-height: 26px;
  margin-top: 10px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.seedstatus__active { display: flex; flex-wrap: wrap; gap: 6px; }
.token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 6px 0 10px;
  border-radius: 999px;
  background: var(--pub-wash);
  color: var(--pub-ink);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.token .icon { width: 14px; height: 14px; opacity: 0.7; }
.token:hover { background: var(--pub-tint); }
.token:hover .icon { opacity: 1; }
.seedstatus .text-btn { font-size: var(--fs-xs); }

/* Shelves */
.sgroup { margin-top: 64px; }
.seedstatus + .sgroup { margin-top: 28px; }
.sgroup__head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sgroup__title {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.sgroup__blurb { margin-top: 6px; color: var(--ink-3); font-family: var(--serif); font-size: 1.0625rem; line-height: 1.45; text-wrap: pretty; }

/* Rows: headline, thesis, one line of facts with the buttons at its end */
.srow-list { display: flex; flex-direction: column; }
.srow {
  position: relative;
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--line);
}
.srow__head {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.srow__link { color: var(--ink); text-decoration: none; }
.srow__link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.srow:hover .srow__link { color: var(--pub-ink); }
.srow__link:focus-visible { outline: none; }
.srow:has(.srow__link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--r-sm); }
.srow__thesis {
  margin-top: 6px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.5;
  /* A thesis is one sentence and it is the row's content. The median runs to 289 characters, about
     four lines here, so five lines shows nine in ten of them whole. */
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}
.srow__hit {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--ink-3);
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.srow__hit a { margin-right: 6px; color: var(--pub-ink); font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600; }
.srow__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.srow__meta { flex: 1 1 auto; min-width: 0; color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.45; }
.srow__meta a { position: relative; z-index: 1; color: var(--pub-ink); font-weight: 600; text-decoration: none; }
.srow__meta a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.srow__foot .srow__engage { flex: none; margin: 0; }
mark { background: color-mix(in oklab, var(--pub) 20%, var(--paper)); color: inherit; border-radius: 2px; padding: 0 1px; }

/* Loading ghosts */
.srow--ghost { display: flex; flex-direction: column; gap: 10px; }
.ghost { display: block; height: 12px; width: 92%; border-radius: 4px; background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2)); background-size: 200% 100%; animation: ghost 1.4s ease-in-out infinite; }
.ghost--head { height: 18px; width: 38%; }
.ghost--short { width: 54%; }
@keyframes ghost { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.empty--seeds { margin-top: 24px; }

/* --------------------------------------------------------------------------
   One seed: the essay's column, with connected seeds in the margin
   -------------------------------------------------------------------------- */
.seedpage { display: grid; grid-template-columns: minmax(0, var(--measure)); justify-content: center; padding: 0 var(--gutter); }
.seedread { min-width: 0; padding-top: 32px; }
.seedafter { min-width: 0; }

.crumbs { margin-bottom: 28px; }
.crumbs ol { display: flex; align-items: center; font-size: var(--fs-sm); }
.crumbs li { display: inline-flex; flex: none; align-items: center; min-width: 0; }
.crumbs li:last-child { flex: 0 1 auto; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line-2); }
.crumbs a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); text-decoration: none; }
.crumbs li:last-child a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.seedread__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.45rem + 2.3vw, 2.875rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.024em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-variation-settings: "opsz" 60;
}
.seedread__thesis {
  margin-top: 12px;
  color: var(--ink-3);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.seedread__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 24px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
.seedread__facts { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.45; }
.seedread__bar .seedread__engage { margin: 0; }
.seedread__note { margin-top: 14px; color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.5; }
.seedread__note a { color: var(--pub-ink); font-weight: 600; }

/* The thread, set as an essay. Tweet numbers hang in the margin; likes trail the text. */
.thread { margin-top: 32px; }
.thread + .thread { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.thread__title { margin-bottom: 16px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 650; }
.thread__title .num { color: var(--ink-3); font-weight: 400; }
.thread > .qt { margin: 0 0 20px; }
.tw-list { display: flex; flex-direction: column; }
.tw {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 8px;
  align-items: baseline;
  padding: 10px 0;
  border-radius: var(--r-sm);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.tw__n {
  color: var(--ink-4);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-align: right;
  text-decoration: none;
}
.tw__n:hover { color: var(--pub-ink); text-decoration: underline; }
.tw__body { min-width: 0; }
.tw__text {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.66;
  font-optical-sizing: auto;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.tw__text + .tw__text { margin-top: 0.4em; }
.tw--newday { margin-top: 20px; }
.tw__date { grid-column: 2; margin-bottom: 4px; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; }
.tw__meta {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-left: 0.6em;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  white-space: nowrap;
}
.tw__meta > * { display: inline-flex; align-items: center; gap: 3px; }
.tw__meta .icon { width: 12px; height: 12px; }
.tw__meta a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; }
.tw__meta a:hover { color: var(--pub-ink); }
.qt + .tw__text .tw__meta { margin-left: 0; }
.is-target { animation: seed-target 2.2s var(--ease-out); }
@keyframes seed-target { 0%, 30% { background: var(--pub-tint); } 100% { background: transparent; } }

/* A quoted or parent tweet: set off by a hairline, in the sans, so it never reads as the writer's line */
.qt {
  margin: 12px 0 4px;
  padding: 2px 0 2px 16px;
  border-left: 1px solid var(--line-2);
  font-family: var(--sans);
}
.qt__who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--ink-3); font-size: var(--fs-xs); }
.qt__who > span:first-of-type:not(.qt__label), .qt__who > span:nth-child(2) { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.qt__who a { color: var(--pub-ink); font-weight: 600; text-decoration: none; }
.qt__label { color: var(--ink-3); font-weight: 500; }
.qt__text { margin-top: 4px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.qt__entry { margin-top: 6px; color: var(--ink-3); font-size: var(--fs-xs); }
.qt__entry a { color: var(--pub-ink); font-weight: 600; }
.qt--missing { color: var(--ink-3); font-size: var(--fs-sm); font-style: italic; }

/* Riffs */
.seed-riffs { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.seed-riffs__title { font-size: var(--fs-ui); font-weight: 650; }
.seed-riffs__title .num { margin-left: 4px; color: var(--ink-3); font-weight: 500; }
.seed-riffs__sub { margin-top: 2px; color: var(--ink-3); font-size: var(--fs-xs); }
.priff-list { display: flex; flex-direction: column; }
.priff { padding: 16px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); border-radius: var(--r-sm); }
.priff:last-child { padding-bottom: 0; border-bottom: 0; }
.priff__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--fs-sm); }
.priff__who { display: inline-flex; flex-wrap: wrap; gap: 0 6px; color: var(--ink-3); }
.priff__who strong { color: var(--ink); }
.priff__rel { color: var(--ink-3); font-size: var(--fs-xs); }
.priff__rel a { color: var(--pub-ink); font-weight: 600; text-decoration: none; }
.priff__rel a:hover { text-decoration: underline; }
.priff__text { margin-top: 0.5em; color: var(--ink); font-family: var(--serif); font-size: 1.0625rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.priff__head + .priff__text { margin-top: 8px; }
.priff__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; color: var(--ink-3); font-size: var(--fs-xs); }
.priff__foot > * { display: inline-flex; align-items: center; gap: 4px; }
.priff__foot .icon { width: 13px; height: 13px; }
.seedafter > .comments { margin-top: 48px; }

/* Connected seeds: plain titles with their years, like the contents beside an essay */
.seedrail { min-width: 0; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.rail-block + .rail-block { margin-top: 24px; }
.rail-block { scroll-margin-top: calc(var(--header-h) + 16px); border-radius: var(--r-sm); }
.rail-h { margin-bottom: 4px; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 650; }
.rail-list { display: flex; flex-direction: column; }
.rail-link { display: block; padding: 6px 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.4; text-decoration: none; text-wrap: pretty; transition: color 120ms; }
a.rail-link:hover { color: var(--pub-ink); }
.rail-link[aria-current] { color: var(--ink); font-weight: 600; }
.rail-link__yr { display: block; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 400; }
.rail-list--seq { counter-reset: seq; }
.rail-list--seq li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr); gap: 4px; align-items: baseline; counter-increment: seq; }
.rail-list--seq li::before { content: counter(seq); color: var(--ink-4); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.rail-list--seq li:has([aria-current])::before { color: var(--pub-ink); font-weight: 650; }

/* Previous and next */
.seedpager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.seedpager__link { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r); color: inherit; text-decoration: none; transition: background-color 120ms; }
.seedpager__link--prev { margin-left: -14px; }
.seedpager__link--next { margin-right: -14px; text-align: right; align-items: flex-end; }
.seedpager__link:hover { background: var(--paper-2); }
.seedpager__dir { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; }
.seedpager__dir .icon { width: 14px; height: 14px; }
.icon--flip { transform: scaleX(-1); }
.seedpager__head { color: var(--ink); font-family: var(--serif); font-size: 1.0625rem; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.seedpager__link:hover .seedpager__head { color: var(--pub-ink); }

/* Seeds: responsive structure */
@media (max-width: 1023px) {
  /* The index becomes two lines that scroll sideways: shelves as pills, forms as plain words. */
  .seedlib__grid { max-width: var(--measure); margin-inline: auto; }
  .idx + .idx { margin-top: 4px; }
  .idx__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .idx__list {
    flex-direction: row;
    gap: 6px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .idx__list::-webkit-scrollbar { display: none; }
  .idx__list li { flex: none; }
  .idx__list li:has(.idx__btn--aside) { margin-top: 0; padding-top: 0; border-top: 0; }
  .idx__btn { align-items: center; gap: 6px; width: auto; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; }
  .idx__btn[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
  .idx__btn[aria-pressed="true"] .idx__n { color: rgb(255 255 255 / 0.68); font-weight: 500; }
  .idx + .idx .idx__list { gap: 16px; }
  .idx + .idx .idx__btn { padding: 0; border: 0; border-radius: var(--r-sm); background: none; }
  .idx + .idx .idx__btn[aria-pressed="true"] { color: var(--ink); }
  .idx + .idx .idx__btn[aria-pressed="true"] .idx__n { color: var(--pub-ink); font-weight: 650; }
}
@media (max-width: 599px) {
  .srow__head { font-size: 1.125rem; }
  .srow__thesis { font-size: 1rem; -webkit-line-clamp: 8; line-clamp: 8; } /* shorter lines on a phone */
  .sgroup__title { font-size: 1.4375rem; }
  .seedpager { grid-template-columns: 1fr; gap: 4px; }
  .seedpager__link--next { margin-right: 0; margin-left: -14px; text-align: left; align-items: flex-start; }
}
@media (min-width: 760px) {
  .tw-list { margin-left: -32px; }
  .tw { grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; }
  .tw__text { font-size: var(--fs-prose); line-height: 1.7; }
}
@media (min-width: 1024px) {
  .seedlib__grid { grid-template-columns: 200px minmax(0, var(--measure)); justify-content: center; gap: 64px; align-items: start; }
  .seedlib__index {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    max-height: calc(100dvh - var(--header-h) - 40px);
    overflow-y: auto;
    margin-inline: -8px;
    padding: 10px 8px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
  }
  .seedpage:has(.seedrail) { grid-template-columns: minmax(0, var(--measure)) 200px; column-gap: 64px; align-items: start; }
  .seedread, .seedafter { grid-column: 1; }
  .seedrail {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100dvh - var(--header-h) - 48px);
    overflow-y: auto;
    margin-top: 32px;
    padding: 2px 4px 24px 0;
    border-top: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
  }
}
/* Wide: the list and the seed sit in the middle of the page, as the essay does. */
@media (min-width: 1280px) {
  .seedlib__grid { grid-template-columns: 200px minmax(0, var(--measure)) 200px; }
  .seedpage:has(.seedrail) { grid-template-columns: 200px minmax(0, var(--measure)) 200px; }
  .seedpage:has(.seedrail) > .seedread, .seedpage:has(.seedrail) > .seedafter { grid-column: 2; }
  .seedpage:has(.seedrail) > .seedrail { grid-column: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .ghost { animation: none; }
  .is-target { animation-duration: 0.01ms; }
}
