/* Noto Serif, SIL Open Font License 1.1 (see /fonts/OFL.txt), subset to Latin. */
@font-face { font-family: "Why Serif"; src: url("/fonts/NotoSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Why Serif"; src: url("/fonts/NotoSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Why Serif"; src: url("/fonts/NotoSerif-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Why Serif"; src: url("/fonts/NotoSerif-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #eef0f3;
  --surface: #ffffff;
  --ink: #15181c;
  --muted: #5a626e;
  --rule: #d5d9df;
  --mark: #1f5fa8;
  --note: #1f5fa8;
  --note-bg: #f2f6fb;
  --note-rule: #c9d7ea;
  --link: #1b4fd8;
  --badge: #1d9bf0;
  --desk: #dfe3e8;
  --serif: "Why Serif", "Noto Serif", Georgia, "Times New Roman", serif;
  /* Posts are set in the reader's own system UI face, the way the platform renders them. */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1013;
    --surface: #171b20;
    --ink: #e6e8eb;
    --muted: #9aa2ad;
    --rule: #2b3038;
    --mark: #7fb0ec;
    --note: #8fbcf2;
    --note-bg: #141c26;
    --note-rule: #263445;
    --link: #8ab2ff;
    --desk: #08090b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  font-variant-numeric: lining-nums;
}
img { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: 0.5rem 1rem; }

.wrap { max-width: 48rem; margin: 0 auto; padding: 0 1.25rem; }


/* Site header and footer */
header.site { border-bottom: 1px solid var(--rule); background: var(--surface); }
.site-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.wordmark { font-weight: 700; font-size: 1.5rem; color: var(--ink); text-decoration: none; line-height: 1; padding-bottom: 0.15rem; }
header.site nav { display: flex; gap: 1.25rem; font-family: var(--sans); font-size: 0.95rem; }
header.site nav a { color: var(--ink); text-decoration: none; }
header.site nav a:hover { text-decoration: underline; }
.site-foot { margin-top: 5rem; border-top: 1px solid var(--rule); color: var(--muted); font-family: var(--sans); font-size: 0.9rem; padding: 1.5rem 0 3rem; }
.site-foot p { margin: 0.25rem 0; }

/* Home hero: a calm sample of posts, each with a short note on the record. */
.hero { padding: 3.5rem 0 0; }
.hero-text, .hero-foot { max-width: 48rem; margin: 0 auto; padding: 0 1.25rem; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 1.1rem; max-width: 22ch; }
.lede { font-size: 1.25rem; line-height: 1.55; margin: 0 0 0.9rem; max-width: 36em; }
.hero-method { color: var(--muted); margin: 0; max-width: 38em; }
.hero-foot { margin-top: 1.5rem; color: var(--muted); }

.desk { background: var(--desk); margin: 2.75rem 0 0; padding: 2.5rem 1.25rem; }
/* Masonry columns: each card keeps its natural height, so there are no gaps or padded cards. */
.wall { max-width: 76rem; margin: 0 auto; columns: 3 21rem; column-gap: 1.5rem; }
.tile { display: block; break-inside: avoid; margin: 0 0 1.5rem; color: var(--ink); text-decoration: none; border-radius: 14px; }
.tile-card { display: block; background: var(--surface); border: 1px solid var(--rule); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 0.85rem 0.95rem 0.75rem; font-family: var(--sans); font-size: 0.95rem; line-height: 1.4; }
.tile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.tile-head .avatar { width: 28px; height: 28px; }
.tile-head .handle { flex-basis: auto; font-size: 0.88rem; }
.tile-text { display: block; margin: 0.6rem 0 0; font-size: 1.05rem; }
.tile-media { position: relative; display: block; margin: 0.6rem 0 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.tile-media img { display: block; width: 100%; height: auto; }
.tile-meta { display: block; margin-top: 0.6rem; color: var(--muted); font-size: 0.82rem; }
.tile-parent { display: block; position: relative; padding: 0 0 0.75rem 0.85rem; margin: 0 0 0.6rem; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
.tile-parent::before { content: ""; position: absolute; left: 0; top: 0.35rem; bottom: 0.9rem; width: 2px; background: var(--rule); border-radius: 2px; }
.tile-quote { display: block; margin: 0.65rem 0 0; padding: 0.6rem 0.7rem; border: 1px solid var(--rule); border-radius: 10px; color: var(--muted); font-size: 0.88rem; }
.tile-head.small { gap: 0.3rem; font-size: 0.85rem; }
.tile-head.small .avatar { width: 18px; height: 18px; }
.tile-head.small .name { color: var(--ink); }
.tile-ctx-text { display: block; margin-top: 0.3rem; line-height: 1.35; }
/* The note reads like added context under a post. */
.tile-note { display: block; background: var(--note-bg); border: 1px solid var(--note-rule); border-radius: 0 0 14px 14px; padding: 0.75rem 0.95rem 0.8rem; font-family: var(--sans); font-size: 0.93rem; line-height: 1.45; color: var(--ink); }
.tile-note-h { display: block; font-weight: 700; font-size: 0.85rem; color: var(--note); margin-bottom: 0.2rem; }
.tile-more { display: block; margin-top: 0.45rem; color: var(--link); font-size: 0.88rem; }

/* Share image (rendered once to /og.png). */
.og body { margin: 0; }
.og-frame { position: relative; width: 1200px; height: 630px; overflow: hidden; background: var(--desk); padding: 44px 56px; }
.og-site { margin: 0 0 6px; font-family: var(--sans); font-size: 22px; color: var(--muted); }
.og-frame h1 { margin: 0 0 28px; font-size: 64px; line-height: 1; letter-spacing: -0.02em; font-weight: 700; }
.og-frame .desk { background: none; padding: 0; margin: 0; }
.og-frame .wall { columns: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; max-width: none; }

.megaphone h2, .directory > h2 { font-size: 1.6rem; margin: 0 0 1rem; }

.megaphone { margin: 4rem 0; }
.megaphone ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.megaphone li { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.2rem; }
.megaphone li p { margin: 0; }
.megaphone li .src-meta { margin-top: 0.4rem; }

.directory { margin: 4rem 0 0; }
.topics { display: flex; flex-wrap: wrap; gap: 0.5rem; font-family: var(--sans); font-size: 0.92rem; margin: 0 0 2rem; }
.topics a { display: inline-flex; align-items: baseline; gap: 0.4rem; border: 1px solid var(--rule); border-radius: 999px; padding: 0.3rem 0.85rem; color: var(--ink); background: var(--surface); text-decoration: none; }
.topics a:hover { border-color: var(--ink); }
.topics .n { color: var(--muted); font-size: 0.85em; }
.topic { margin: 0 0 2.75rem; scroll-margin-top: 1rem; }
.topic h3 { font-size: 1.3rem; margin: 0 0 0.4rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list a { display: grid; grid-template-columns: 8.5rem 1fr; column-gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.list li:last-child a { border-bottom: 1px solid var(--rule); }
.li-date { grid-row: span 2; font-family: var(--sans); font-size: 0.85rem; color: var(--muted); padding-top: 0.2rem; }
.li-head { font-weight: 600; line-height: 1.35; }
.li-verdict { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; }
.list a:hover .li-head { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
@media (max-width: 560px) {
  .list a { grid-template-columns: 1fr; }
  .li-date { grid-row: auto; padding-top: 0; }
}

/* Entry */
.entry { padding-top: 2.5rem; }
.crumb { font-family: var(--sans); font-size: 0.92rem; margin: 0 0 0.5rem; }
.crumb a { color: var(--muted); }
.entry h1 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.005em; margin: 0 0 0.6rem; max-width: 22ch; }
.when { font-family: var(--sans); color: var(--muted); font-size: 0.95rem; margin: 0 0 1.25rem; }
.rating { display: inline-block; margin: 0 0 1.25rem; padding: 0.3rem 0.75rem; border: 1px solid var(--note-rule); background: var(--note-bg); color: var(--ink); border-radius: 6px; font-family: var(--sans); font-size: 0.95rem; font-weight: 600; }
.context { max-width: 40em; margin: 0 0 1.5rem; }
.evidence { margin: 1.5rem 0 2.25rem; }

.correction, .harm { margin: 2rem 0; padding: 0.15rem 0 0.15rem 1.15rem; max-width: 40em; }
.correction { border-left: 3px solid var(--mark); }
.harm { border-left: 3px solid var(--muted); }
.correction h2, .harm h2, .sources h2, .about h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.correction p, .harm p { margin: 0 0 0.6rem; }

.sources { margin: 2.5rem 0 0; max-width: 40em; }
.sources ol { margin: 0; padding-left: 1.4rem; }
.sources li { margin: 0 0 0.75rem; }
.sources li a { display: block; line-height: 1.4; }
.src-meta { display: block; font-family: var(--sans); font-size: 0.88rem; color: var(--muted); }
.src-meta a { color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 3.5rem 0 0; }
.pager a { display: block; border: 1px solid var(--rule); background: var(--surface); border-radius: 6px; padding: 0.8rem 1rem; color: var(--ink); text-decoration: none; line-height: 1.35; font-weight: 600; }
.pager a:hover { border-color: var(--ink); }
.pager span { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.2rem; }
.pager .next { grid-column: 2; text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; text-align: left; } }

.about { max-width: 40em; }
.about h2 { margin-top: 2rem; }

/* Post cards: the evidence, styled like the platform shows a post. */
.post {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1rem 1.1rem 0.85rem;
  margin: 0 0 1.25rem;
  max-width: 37rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
}
.post-head { display: flex; align-items: center; gap: 0.65rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--rule); object-fit: cover; }
.avatar.initials { display: inline-grid; place-items: center; color: var(--muted); font-family: var(--sans); font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; line-height: 1; }
.tile-head .avatar.initials { font-size: 0.68rem; }
.tile-head.small .avatar.initials { font-size: 0.5rem; }
.who { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.25rem; line-height: 1.25; min-width: 0; }
.name { font-weight: 700; }
.badge { width: 1.1em; height: 1.1em; color: var(--badge); flex: none; }
.handle { color: var(--muted); flex-basis: 100%; }
.replying { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.92rem; }
.post-text { margin: 0.6rem 0 0; font-size: 1.06rem; overflow-wrap: anywhere; }
.post-desc { margin: 0.6rem 0 0; color: var(--muted); font-style: italic; }
.mention { color: var(--badge); }
.media { position: relative; margin: 0.75rem 0 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--paper); }
.media img { display: block; width: 100%; height: auto; }
.media .play { position: absolute; left: 0.6rem; bottom: 0.6rem; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; margin: 0.85rem 0 0; padding-top: 0.7rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.86rem; }
.stats { display: flex; flex-wrap: wrap; gap: 0.2rem 0.85rem; }
.stats b { color: var(--ink); font-weight: 600; }
.view { margin-left: auto; }
.post.quoted { margin: 0.75rem 0 0; padding: 0.7rem 0.85rem; border-radius: 12px; font-size: 0.93rem; max-width: none; }
.post.quoted .avatar { width: 20px; height: 20px; }
.post.quoted .handle { flex-basis: auto; }
.post.quoted .post-text { font-size: 0.95rem; margin-top: 0.35rem; }
.quoted-when { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.82rem; }
/* A post he replied to; .thread-line joins a post to a direct reply below it. */
.post.parent { background: var(--surface); }
.post.parent .post-text { color: var(--ink); }
.evidence .post:has(+ .thread-line) { margin-bottom: 0; }
.thread-line { width: 2px; height: 1.4rem; margin-left: calc(1.1rem + 21px); background: var(--muted); opacity: 0.45; }
.post.ghost { background: transparent; border: 2px dashed var(--rule); }
.post.ghost .avatar { filter: grayscale(1); opacity: 0.7; }
.ghost-label { color: var(--ink); font-weight: 600; }

/* Something he said out loud rather than posted. */
.said { margin: 0 0 1.25rem; max-width: 37rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; }
.said figcaption { font-family: var(--sans); color: var(--muted); font-size: 0.9rem; }
.said blockquote { margin: 0.4rem 0 0; font-size: 1.35rem; line-height: 1.35; font-weight: 600; }
.said blockquote p { margin: 0; }
.said-desc { margin: 0.4rem 0 0; }
.said-src { margin: 0.6rem 0 0; font-family: var(--sans); font-size: 0.88rem; color: var(--muted); }
.said-src a { color: var(--muted); }

@media print {
  header.site nav, .pager, .skip { display: none; }
  body { background: #fff; }
}

/* One-page layout: each entry laid out in turn, oldest first. */
.folder-head { padding: 3.5rem 0 1rem; max-width: 40em; }
.folder-head h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.9rem; }
.folder-head p { margin: 0; color: var(--muted); font-size: 1.15rem; line-height: 1.55; }
.item { margin: 3.5rem 0 0; padding-top: 2.5rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.item .when { margin: 0 0 0.3rem; }
.item h2 { font-size: 1.5rem; margin: 0 0 1.25rem; }
.item h2 a { color: var(--ink); text-decoration: none; }
.item h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.item .evidence { margin: 0 0 1.25rem; }
.record { max-width: 40em; }
.record h3 { margin: 0 0 0.3rem; font-family: var(--sans); font-size: 0.9rem; font-weight: 700; color: var(--note); }
.record p { margin: 0 0 0.75rem; }
.srcs { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.srcs li { margin: 0 0 0.45rem; line-height: 1.4; }
.srcs .src-meta { display: inline; margin-left: 0.5rem; }

/* Grid of entries: label and date, the post card, then the record and its sources. */
.tile-label { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; margin: 0 0 0.5rem; font-size: 1.1rem; line-height: 1.3; }
.tile-label a { color: var(--ink); text-decoration: none; }
.tile-label a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.tile-label span { flex: none; font-family: var(--sans); font-weight: 400; font-size: 0.82rem; color: var(--muted); }
.tile-card.ghost { border-style: dashed; border-width: 2px; border-bottom: 0; background: transparent; }
.tile-card.ghost .avatar { filter: grayscale(1); opacity: 0.7; }
.tile-reply { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.88rem; }
.tile-text.desc { color: var(--muted); font-style: italic; font-size: 0.98rem; }
.tile-where { display: block; color: var(--muted); font-size: 0.85rem; }
.tile-said { display: block; margin-top: 0.35rem; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.35; }
.tile-meta a { color: var(--link); }
.tile-meta b { color: var(--ink); font-weight: 600; }
.tile-srcs { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; margin: 0.55rem 0 0; padding: 0; font-size: 0.85rem; }
.tile-srcs .src-meta { display: inline; font-size: inherit; }

/* Footer licences: a button that opens the list in place. */
.licences { margin-top: 1rem; }
.licences summary { display: inline-block; cursor: pointer; list-style: none; border: 1px solid var(--rule); border-radius: 999px; padding: 0.25rem 0.85rem; color: var(--ink); background: var(--surface); }
.licences summary::-webkit-details-marker { display: none; }
.licences summary:hover { border-color: var(--ink); }
.licences[open] summary { margin-bottom: 0.6rem; }
.licences ul { margin: 0; padding-left: 1.2rem; max-width: 46em; }
.licences li { margin: 0 0 0.45rem; }
.licences b { color: var(--ink); font-weight: 600; }
