:root {
  color-scheme: light;
  --ink: #191919;
  --muted: #606060;
  --line: #d6d6d6;
  --paper: #fcfcfc;
  --mast-glass: rgb(252 252 252 / 76%);
  --panel: #efefef;
  --sans: "TwitterChirp", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
    "Twemoji Mozilla", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font: 16px/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration-line: underline;
  text-underline-offset: .16em;
}
a:hover,
.author-book:hover h3 {
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}
.edition-list a:hover,
.work-details a:hover {
  text-underline-offset: 3px;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 0;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--sans);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
.wrap {
  width: min(100%, 1232px);
  margin-inline: auto;
  --gutter: clamp(20px, 5.5vw, 76px);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.mast {
  padding-top: env(safe-area-inset-top, 0px);
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mast {
    background: var(--mast-glass);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}
.bar,
.brand,
nav,
.meta,
.filters,
.pager {
  display: flex;
  align-items: center;
}
.bar,
.pager {
  justify-content: space-between;
}
.bar {
  height: 68px;
}
.brand {
  gap: 11px;
  font: 500 20px var(--sans);
}
.brand strong { font-weight: inherit; }
.brand:hover {
  text-decoration: none;
}
nav {
  gap: 24px;
  font-size: 13px;
}
.mast nav a:is(:hover, [aria-current]) {
  text-decoration-line: underline;
  text-underline-offset: 6px;
}
.skip {
  position: fixed;
  top: -80px;
  z-index: 10;
  background: white;
  padding: 8px;
}
.skip:focus {
  top: 4px;
}
main {
  min-height: 70vh;
}
#content:has(> .loading-status) {
  display: flex;
  flex-direction: column;
}
#content > .loading-status {
  flex: 1;
}
.prose:has(> .loading-status) {
  padding-top: 0;
}
.prose > .loading-status {
  min-height: clamp(9rem, 32vh, 20rem);
}
.loading-status {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font: 13px/1.6 var(--sans);
}
.page-title {
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.045em;
}
.label,
.meta,
.caption,
aside,
.date,
.type,
.row-author,
.count {
  color: var(--muted);
  font-size: 13px;
}
.date { font-variant-numeric: tabular-nums; }
.row {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) 108px 40px;
  align-items: baseline;
  gap: 16px;
  padding: 17px 4px;
}
.row strong {
  font: 500 19px/1.5 var(--sans);
}
.page-head {
  padding: 44px 0 20px;
}
.page-head p {
  margin-top: 12px;
}
.filters {
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}
.filters input,
.filters select {
  border: 1px solid var(--line);
  border-radius: 0;
  background-color: transparent;
  font-size: 14px;
  min-height: 42px;
}
.filters input {
  padding: 8px 13px;
  width: min(340px, 100%);
}
.filters select {
  appearance: none;
  padding: 8px 36px 8px 12px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.count {
  margin: 12px 0;
}
.more {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background: var(--panel);
}
.reading {
  max-width: 714px;
  margin: 44px auto 60px;
}
.article-title {
  font-size: clamp(33px, 4.3vw, 55px);
  font-weight: 500;
  line-height: 1.26;
  overflow-wrap: anywhere;
}
.meta {
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 16px 0 27px;
}
.prose {
  padding-top: 14px;
  font: 19px/1.95 var(--sans);
  overflow-wrap: anywhere;
}
.prose :is(h1, h2, h3) {
  margin: 1.4em 0 .45em;
  line-height: 1.35;
  font-weight: 700;
}
.prose h1 { font-size: 1.8em; }
.prose h2 { font-size: 1.45em; }
.prose h3 { font-size: 1.2em; }
.prose strong { font-weight: 700; }
.prose pre,
.prose table {
  max-width: 100%;
  overflow-x: auto;
}
.prose pre {
  padding: 1em;
  border-radius: 4px;
  background: var(--panel);
  font: 0.85em/1.9 var(--mono);
}
.prose blockquote {
  margin-inline: 0;
  padding-inline-start: 1em;
  border-inline-start: 2px solid var(--line);
  color: var(--muted);
}
.prose table { display: block; border-collapse: collapse; }
.prose :is(th, td) { padding: .3em .7em; border: 1px solid var(--line); }
.prose p {
  margin: 1em 0;
}
.prose figure {
  margin: 1.4em 0;
}
.prose img,
.prose video {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}
.prose img.image-pending { background-color: var(--panel); }
.prose figcaption {
  text-align: center;
  margin-top: 6px;
  color: var(--muted);
  font: 13px/1.6 var(--sans);
}
.meta a,
.prose a,
.pager a {
  text-decoration-line: underline;
  text-underline-offset: 4px;
}
.prose a {
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
}
.prose a:hover {
  text-decoration-color: color-mix(in srgb, currentColor 80%, transparent);
}
.pager {
  margin-top: 30px;
  padding-top: 16px;
  gap: 20px;
  font-size: 14px;
}
.empty {
  padding: 30px 0;
  color: var(--muted);
}
@media (max-width: 720px) {
  .bar {
    height: 57px;
  }
  .row {
    grid-template-columns: auto 1fr auto;
    gap: 4px 10px;
    padding: 13px 2px;
  }
  .row strong {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .row-author {
    grid-column: 2;
    grid-row: 2;
  }
  .type {
    grid-column: 3;
    grid-row: 2;
  }
  .date {
    grid-column: 1;
    grid-row: 2;
  }
  .reading { margin-block: 22px; }
  .prose {
    font-size: 18px;
  }
  .page-head {
    padding: 27px 0 12px;
  }
  .filters input {
    width: 100%;
  }
  nav {
    gap: 14px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #ededed;
    --muted: #b5b5b5;
    --line: #444444;
    --paper: #181818;
    --mast-glass: rgb(24 24 24 / 76%);
    --panel: #262626;
  }
  .skip {
    background: var(--panel);
  }
}

.home-columns {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 3fr);
  align-items: start;
  grid-template-areas: ". title" "authors editions";
  gap: 28px clamp(48px, 7.5vw, 100px);
  margin-block: clamp(36px, 5vw, 72px) clamp(52px, 8vw, 104px);
}
.author-index { grid-area: authors; }
.latest-list { grid-area: editions; min-width: 0; }
.latest-list > .edition-date:first-child { margin-top: 0; }
.author-index h2 {
  margin-bottom: 17px;
  font: 500 15px/1.5 var(--sans);
  letter-spacing: .1em;
}
.author-books { display: grid; gap: 10px; }
.author-book {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  padding: 17px 16px 17px 21px;
  border-inline-start: 4px solid var(--ink);
  border-radius: 1px 4px 4px 1px;
  background: var(--panel);
}
.author-book:hover { text-decoration: none; }
.author-book:hover h3, .author-book:focus-visible h3 {
  text-decoration-line: underline;
  text-underline-offset: 3px;
}
.shelf-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  font: 700 .65em/1 var(--sans);
}
.shelf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-book .shelf-avatar { grid-area: 1 / 1; width: 34px; height: 34px; font-size: 17px; }
.author-book h3 { grid-column: 1 / -1; margin-top: 14px; font-size: 21px; font-weight: 500; line-height: 1.4; }
.book-handle, .book-count, .shelf-count { color: var(--muted); font-size: 12px; }
.book-handle { grid-column: 1 / -1; overflow-wrap: anywhere; }
.book-count { grid-area: 1 / 2; align-self: center; font-variant-numeric: tabular-nums; }
.shelf-count { margin-top: 14px; }
.recent-title {
  grid-area: title;
  font-size: clamp(40px, 4.25vw, 62px);
  line-height: 1.03;
  letter-spacing: -.045em;
  font-weight: 500;
}
.edition-date {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block: 28px 6px;
  color: var(--muted);
  font: 500 12px/1.5 var(--sans);
  letter-spacing: .06em;
}
.edition-date::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.edition-list { margin: 0; padding: 0; list-style: none; }
.edition-list li { padding-block: 15px; }
.edition-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 12px/1.5 var(--sans);
}
.edition-meta .shelf-avatar { width: 21px; height: 21px; font-size: 11px; }
.edition-meta time { font-variant-numeric: tabular-nums; }
.edition-list h3 {
  margin-top: 6px;
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.edition-list:first-of-type > li:first-child h3 {
  font-size: clamp(23px, 2.3vw, 32px);
  line-height: 1.42;
  text-wrap: balance;
  font-weight: 500;
}
@media (max-width: 760px) {
  .home-columns {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "authors" "title" "editions";
    gap: 0;
    margin-block-start: 22px;
  }
  .recent-title { margin-block: 32px 18px; }
  .author-index h2 { margin-bottom: 10px; font-size: 14px; }
  .author-books { grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr)); gap: 8px; }
  .author-book { padding: 11px 12px; border-inline-start-width: 3px; }
  .author-book .shelf-avatar { width: 26px; height: 26px; font-size: 14px; }
  .author-book h3 { margin-top: 7px; font-size: 17px; }
  .shelf-count { margin-top: 8px; }
  .edition-date { margin-block-start: 18px; }
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
}
#content {
  --date-width: clamp(84px, 10vw, 130px);
  --catalog-gap: 16px;
}
.filters {
  display: grid;
  margin-inline-start: calc(var(--date-width) + var(--catalog-gap));
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.filters input { width: 100%; min-width: 0; }
.month-group {
  margin-bottom: 30px;
}
.month-group .rows { position: relative; }
.month-group .rows::before {
  content: "";
  position: absolute;
  inset-block: 12px;
  inset-inline-start: var(--date-width);
  border-inline-start: 1px solid var(--line);
  pointer-events: none;
}
.month-group .row {
  column-gap: var(--catalog-gap);
  padding-inline: 0;
  grid-template-columns: var(--date-width) minmax(0, 1fr);
  align-items: start;
}
.month-group .date-cell {
  text-align: center;
  line-height: 1.5;
}
.month-group h2 { font: 500 clamp(12px, 1.3vw, 16px)/1.6 var(--sans); }
.month-group .date { white-space: nowrap; }
.date-cell .clock-time { display: block; font-size: 12px; }
.work-metadata {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 3px;
}
.work-details { overflow-wrap: anywhere; }
.article-title { text-wrap: pretty; }
.meta { margin-bottom: 16px; }
@media (max-width: 720px) {
  #content { --catalog-gap: 10px; }
  .filters {
    margin-inline-start: 0;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .filters input {
    grid-column: 1 / -1;
    margin-inline-start: calc(var(--date-width) + var(--catalog-gap));
    width: auto;
  }
  .filters select { min-width: 0; }
  .author-filters {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }
  .author-filters input {
    grid-column: auto;
    margin-inline-start: 0;
  }
  .author-filters :is(input, select) {
    min-height: 44px;
    font-size: 16px;
  }
}
.compact-filter-label { display: none; }
@media (max-width: 540px) {
  .author-filters {
    grid-template-columns: minmax(0, 1fr) 4rem 4rem;
    gap: 6px;
  }
  .author-filter-field { position: relative; }
  .author-filter-field select {
    display: block;
    width: 100%;
    opacity: 0;
  }
  .compact-filter-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding-inline: 8px 24px;
    border: 1px solid var(--line);
    font-size: 14px;
    pointer-events: none;
  }
  .compact-filter-label::after {
    content: "";
    position: absolute;
    right: 12px;
    width: 5px;
    height: 5px;
    border: solid currentColor;
    border-width: 0 1px 1px 0;
    transform: translateY(-2px) rotate(45deg);
  }
  .author-filter-field select:focus-visible + .compact-filter-label {
    outline: 2px solid currentColor;
    outline-offset: 4px;
  }
}

.open-image {
  position: relative;
  appearance: none;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}
.open-image:focus-visible {
  outline: none;
}
.open-image:focus-visible::after {
  content: "";
  position: absolute;
  inset: auto 0 -4px;
  height: 3px;
  background: Highlight;
  pointer-events: none;
}
html:has(.viewer[open]) { overflow: hidden; }
.viewer {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px))
           calc(12px + env(safe-area-inset-right, 0px))
           calc(12px + env(safe-area-inset-bottom, 0px))
           calc(12px + env(safe-area-inset-left, 0px));
  color: white;
  background: #151515;
}
.viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}
.viewer-tools {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.viewer-tools button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: #343434;
  border-radius: 4px;
}
.viewer-tools svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.viewer-tools button:disabled { opacity: .35; cursor: default; }
.viewer-tools button:enabled:hover { background: #505050; }
.viewer:has(.enlarged) .zoom-plus { display: none; }
.viewer-stage {
  display: flex;
  overflow: auto;
  overscroll-behavior: contain;
}
.viewer-stage img {
  flex: none;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  cursor: zoom-in;
}
.viewer-stage.enlarged img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.insight-controls { display: flex; gap: 6px; margin-block: 12px 32px; }
.insight-controls button { padding: 7px 14px; background: transparent; border-radius: 4px; }
.insight-controls [aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.insight-scroll { overflow-x: auto; }
.insight-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.insight-table caption, .insight-results h2 { text-align: left; font: 500 26px/1.5 var(--sans); }
.insight-table :is(th, td) { padding: 12px 16px 12px 0; text-align: left; white-space: nowrap; }
.insight-table thead, .insight-note, .length-stat small { color: var(--muted); font-size: 13px; }
.insight-table th a { text-underline-offset: 3px; text-decoration-line: underline; }
.length-stat small { display: block; }
.insight-note { margin-block: 8px 28px; max-width: 76ch; }
.insight-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px 6%; }
.insight-charts h3 { font-size: 22px; }
.insight-charts h4 { margin: 18px 0 8px; font-size: 14px; }
.insight-bars { margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.insight-bars > div, .insight-bars dd { display: grid; align-items: center; gap: 12px; }
.insight-bars > div { grid-template-columns: 62px 1fr; padding-block: 3px; }
.insight-bars dd { margin: 0; grid-template-columns: 1fr 54px; text-align: right; }
.insight-track { height: 6px; background: var(--panel); }
.insight-track i { display: block; height: 100%; background: var(--muted); }

.article-outline {
  margin: 0 0 16px;
  font-size: 14px;
}
.article-outline summary { cursor: pointer; font-weight: 700; }
.article-outline ol {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  max-height: 50vh;
  overflow: auto;
}
.article-outline li { padding-inline-start: calc(var(--depth) * .65em); }
.article-outline button {
  display: block;
  width: 100%;
  text-align: start;
  padding: 5px 0;
  background: transparent;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.article-outline button:hover { color: var(--ink); text-decoration-line: underline; }
.prose :is(h1,h2,h3,h4,h5,h6) {
  scroll-margin-top: calc(84px + env(safe-area-inset-top, 0px));
}
@media (min-width: 1000px) {
  .reading:has(.article-outline) {
    display: grid;
    max-width: none;
    grid-template-columns: 1fr minmax(0, min(64%, 714px)) 1fr;
  }
  .reading:has(.article-outline) > :not(.article-outline) { grid-column: 2; }
  .reading:has(.article-outline) > .prose { grid-row: 3; }
  .article-outline {
    grid-area: 3 / 3;
    position: sticky;
    top: calc(84px + env(safe-area-inset-top, 0px));
    align-self: start;
    margin: 14px 0 0 clamp(16px, 2vw, 32px);
  }
  .article-outline ol { max-height: calc(100dvh - 150px - env(safe-area-inset-top, 0px)); }
}
