/* Pith — dense, monospace-flavored, dark by default. HN-meets-Linear. */

:root {
  color-scheme: light dark;
  --bg: #0b0b0c;
  --panel: #15151a;
  --panel-2: #1c1c22;
  --line: #22222a;
  --fg: #e7e7ea;
  --fg-2: #bdbdc4;
  --fg-3: #7a7a82;
  --link: #9bd0ff;
  --link-hover: #d2e8ff;
  --accept: #00d18a;
  --conditional: #f59e0b;
  --reject: #ef4444;
  --unverdicted: #7a7a82;
  /* Skeptic UI is now neutral: no implied "we think it's false."
     Amber accent only on the left edge for visual continuity. */
  --critique: #f59e0b;
  --critique-bg: rgba(245, 158, 11, 0.05);
  /* Long-form serif used inside critical-analysis prose. Charter ships
     with macOS/iOS, Iowan Old Style is the iPad reading default. The
     fallbacks cover Windows (Cambria, Georgia) and Linux (Liberation
     Serif via Times). Mono stays the rest of the site's voice. */
  --font-prose: "Charter", "Iowan Old Style", "Iowan Old Style W7", "Iowan Old Style W8", "Iowan Old Style W9", Georgia, Cambria, "Liberation Serif", "Times New Roman", Times, serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfa;
    --panel: #ffffff;
    --panel-2: #f4f4f1;
    --line: #e6e6df;
    --fg: #14141a;
    --fg-2: #4a4a52;
    --fg-3: #7a7a82;
    --link: #1a4ea3;
    --link-hover: #0a2a73;
    --critique: #b45309;
    --critique-bg: rgba(180, 83, 9, 0.05);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.55 ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted var(--link);
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.meta,
.meta a {
  color: var(--fg-3);
  font-size: 12px;
}

.meta a {
  border-bottom: none;
}

/* topbar — fixed-position with hide-on-scroll-down / reveal-on-scroll-up */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  transform: translateY(0);
  transition: transform 0.22s ease-out;
  will-change: transform;
}

.topbar.is-hidden {
  transform: translateY(-100%);
}

/* Compensate for the fixed header so content isn't hidden underneath.
   The fixed topbar is ~50px tall; we add ~50px breathing room on top of
   that so the page hero / paper meta line aren't crowding the border. */
body {
  padding-top: 100px;
}

/* Top row: brand · cats-toggle · right-side meta */
.topbar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1.5px;
  border-bottom: 0;
  flex: 0 0 auto;
}

/* Mobile-only "categories ▾" text link. Hidden on desktop. */
.cats-toggle {
  display: none;
  background: transparent;
  border: 0;
  border-bottom: 1px dotted var(--fg-3);
  color: var(--fg-2);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 4px 0;
  text-transform: uppercase;
}

.cats-toggle:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.cats-toggle .caret {
  display: inline-block;
  transition: transform 0.18s ease-out;
}

.cats-toggle[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

.primary-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 22px 10px;
  border-top: 1px solid var(--line);
}

.primary-nav .primary {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 11px;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--fg-2);
  background: transparent;
}

.primary-nav .primary:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}

.primary-nav .primary.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.topbar .version {
  margin-left: auto;
}

/* Mobile (≤700px) — collapse the primary-nav into the cats-toggle drawer */
@media (max-width: 700px) {
  body {
    padding-top: 92px;
  }

  .topbar-row {
    padding: 10px 16px;
    gap: 10px;
  }

  .cats-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .topbar-right {
    gap: 10px;
  }

  .topbar-right .version {
    display: none;
  }

  /* hide version chip; user-chip + sign-in stay */

  /* primary-nav becomes a drawer below the topbar row, collapsed by default */
  .primary-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: 0;
    transition: max-height 0.22s ease-out, padding 0.22s ease-out, border-top-color 0.22s ease-out;
  }

  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .topbar.cats-open .primary-nav {
    max-height: 80px;
    padding-top: 8px;
    padding-bottom: 10px;
    border-top: 1px solid var(--line);
  }

  .primary-nav .primary {
    flex: 0 0 auto;
    /* prevent wrap; horizontal scroll instead */
    white-space: nowrap;
    font-size: 11px;
    padding: 4px 9px;
  }
}

/* subnav (subcategory drill-down) */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  margin: 0 0 16px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.subnav .sub-label {
  color: var(--fg-3);
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.subnav .sub {
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 2px 8px;
  color: var(--fg-2);
  background: var(--panel);
}

.subnav .sub:hover {
  color: var(--fg);
  border-color: var(--line);
}

.subnav .sub.active {
  background: var(--fg-2);
  color: var(--bg);
  border-color: var(--fg-2);
}

.card-side .subnav {
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

/* main + footer */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px 80px;
}

.footer {
  max-width: 1100px;
  margin: 32px auto 64px;
  padding: 22px 24px;
  color: var(--fg-3);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.footer .meta {
  display: block;
  margin-top: 6px;
}

/* hero */
.hero {
  padding: 18px 0 22px;
}

.hero h1 {
  font: 600 56px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: -2.5px;
  margin: 0 0 12px;
}

.hero.small h1 {
  font-size: 32px;
  letter-spacing: -1px;
}

.hero .tagline {
  font-size: 17px;
  color: var(--fg-2);
  margin: 0 0 8px;
}

.hero .stats {
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  margin-top: 8px;
}

.charter {
  color: var(--fg-2);
  margin: 6px 0;
  max-width: 720px;
}

/* row + sidebar */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 800px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.col-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-side {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  background: var(--panel);
}

.card-side h3 {
  font-size: 12px;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-3);
  margin: 0 0 10px;
}

.tracklist,
.catlist,
.abouts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.abouts li {
  font-size: 12px;
  color: var(--fg-2);
}

.abouts b {
  color: var(--fg);
  font-family: ui-monospace, monospace;
}

.tracklist li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tracklist li a {
  font-weight: 500;
}

.track-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}

.track-tag {
  color: var(--fg-3);
  font-size: 12px;
}

.catlist li {
  display: flex;
  justify-content: space-between;
}

/* sort row */
.sort-row {
  display: flex;
  gap: 14px;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  align-items: baseline;
}

.sort-row .sort-label {
  color: var(--fg-3);
  font-size: 11px;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sort {
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 0;
}

.sort.active {
  color: var(--fg);
  border-bottom: 2px solid var(--fg);
  padding-bottom: 2px;
}

/* card */
.card {
  position: relative;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 12px 16px 12px 10px;
  margin: 0 0 10px;
}

/* Top-Pith ribbon: shown on the leaderboard slots of category pages.
   Anchors to the top-right of the card and uses the category accent. */
.card.is-top-pith {
  border-color: var(--accent, var(--cat-default));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, var(--link)) 35%, transparent) inset;
}

.top-pith-ribbon {
  position: absolute;
  top: -8px;
  right: 14px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent, var(--cat-default));
  color: #0b0b0c;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--accent, var(--link)) 60%, #000);
  z-index: 1;
}

/* "See full archive" footer below feeds. Sits where pagination would go;
   the feed itself is capped at 30 and the archive is the deep tail. */
.feed-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 24px 0 8px;
  padding: 18px;
  border-top: 1px dashed var(--line);
  font-family: ui-monospace, monospace;
  text-align: center;
}

.feed-more-link {
  color: var(--accent, var(--link));
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 0;
}

.feed-more-link:hover {
  filter: brightness(1.1);
  text-decoration: underline;
}

.feed-more-meta {
  color: var(--fg-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Archive: search bar + sitemap-style list ----------
   The /archive route is the dense browse surface for the full corpus.
   Search input, category filter, and a numbered list of papers with
   one row each. Replaces the old "see all" sitemap idea. */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 16px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-bar .search-input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.4 ui-monospace, monospace;
}

.search-bar .search-input:focus {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

.search-bar .search-cat {
  flex: 0 1 200px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: 12px/1.4 ui-monospace, monospace;
}

.search-bar .search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 12px/1.4 ui-monospace, monospace;
  color: var(--fg-2);
  user-select: none;
}

.search-bar .search-btn {
  padding: 8px 18px;
  border: 1px solid var(--link);
  border-radius: 6px;
  background: var(--link);
  color: var(--bg);
  font: 12px/1 ui-monospace, monospace;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-bar .search-btn:hover {
  filter: brightness(1.1);
}

.search-bar .search-clear {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg-3);
  border-bottom: 1px solid var(--line);
  font: 11px/1 ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-bar .search-clear:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}

.archive-stats {
  margin: 0 0 12px;
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
}

.archive-list {
  list-style: decimal;
  margin: 0 0 24px;
  padding: 0 0 0 36px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--fg);
}

.arch-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 16px;
  padding: 12px 6px 12px 8px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.arch-row::marker {
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.arch-row:hover {
  background: color-mix(in srgb, var(--accent, var(--link)) 5%, transparent);
}

.arch-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.arch-meta .arch-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-left: 3px solid var(--accent, var(--cat-default));
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent, var(--cat-default));
  border-radius: 3px;
  background: var(--panel-2);
  color: var(--fg-2);
  width: fit-content;
}

.arch-meta .arch-cat:hover {
  color: var(--fg);
}

.arch-meta .arch-date {
  color: var(--fg-3);
}

.arch-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: fit-content;
}

.arch-pill-rev {
  background: color-mix(in srgb, var(--accept, #00d18a) 20%, transparent);
  color: var(--accept, #00d18a);
}

.arch-body {
  min-width: 0;
}

.arch-title {
  display: inline-block;
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  border-bottom: 0;
}

.arch-title:hover {
  color: var(--accent, var(--link-hover));
}

.arch-orig {
  margin: 4px 0 0;
  color: var(--fg-3);
  font-size: 12px;
  font-style: italic;
}

.arch-authors {
  margin: 4px 0 0;
  color: var(--fg-3);
  font-size: 12px;
  font-family: ui-monospace, monospace;
}

.arch-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-3);
}

.arch-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--panel-2);
  color: var(--fg-2);
  border-bottom: 0;
}

.arch-stat:hover {
  color: var(--fg);
}

.arch-stat .stat-num {
  font-weight: 700;
}

.arch-stat .stat-lbl {
  color: var(--fg-3);
  font-size: 10px;
}

.archive-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 0;
  font-family: ui-monospace, monospace;
}

.archive-pager .pager-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg-2);
  font-size: 12px;
}

.archive-pager .pager-btn:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}

.archive-pager .pager-btn.disabled {
  color: var(--fg-3);
  opacity: 0.4;
  cursor: not-allowed;
}

.archive-pager .pager-pos {
  color: var(--fg-3);
  font-size: 12px;
}

@media (max-width: 720px) {
  .arch-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .arch-meta {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .arch-stats {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
}

/* Feed banner: terse explainer above the home/category feeds telling
   the reader how the cards are ranked. */
.feed-banner {
  margin: 4px 0 12px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent, var(--cat-default, #9bd0ff));
  background: color-mix(in srgb, var(--accent, var(--link)) 6%, transparent);
  color: var(--fg-2);
  font-size: 12.5px;
  line-height: 1.5;
  border-radius: 0 4px 4px 0;
}

.card-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding-top: 4px;
}

.fire {
  background: #f7f0b6;
  border: 1px solid #d8c95d;
  border-radius: 3px;
  color: #3d3510;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 6px;
  text-transform: uppercase;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.fire:hover {
  background: #fff3a3;
  border-color: #cdb63d;
}

.fire.on {
  background: #e7f4ff;
  border-color: #6aa8df;
  color: #17456d;
  transform: scale(1.08);
}

.fire.pending {
  opacity: 0.6;
  cursor: wait;
}

.fire-count {
  font-family: ui-monospace, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  min-width: 20px;
  text-align: center;
}

.fire-count.big {
  font-size: 16px;
  color: var(--fg);
}

.pith-count-label {
  margin-top: -3px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-vote-muted {
  justify-content: flex-start;
  padding-top: 2px;
}

.card-vote-muted .badge {
  white-space: nowrap;
  padding: 2px 5px;
  letter-spacing: 0;
}

.card-body {
  min-width: 0;
}

.card img {
  max-width: 100%;
  height: auto;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.card-title {
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.card-title a {
  color: var(--fg);
  border-bottom: 0;
}

.card-title a:hover {
  color: var(--link-hover);
}

.card-summary {
  margin: 4px 0 6px;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.45;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--fg-3);
  font-size: 12px;
  font-family: ui-monospace, monospace;
}

.card-foot .links a {
  margin-left: 12px;
}

/* ---------- Feature media slot ----------
   The card-media block sits between the headline/subtitle and the
   action row, like a Twitter attachment. 16:9 by default, capped to
   a sane height to keep cards scrollable. Rounded corners and a
   subtle border tie it back to the card chrome. */
.card-media {
  margin: 12px 0 4px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
  position: relative;
  max-width: 100%;
}

.card-media-video,
.card-media-iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0;
}

.card-media-image {
  display: block;
  width: 100%;
  background: var(--panel-2);
}

.card-media-image img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.card-media-youtube {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--media-thumb) center/cover no-repeat, #0a0a0a;
  border-bottom: 0;
  cursor: pointer;
  transition: filter 120ms ease;
}

.card-media-youtube:hover {
  filter: brightness(1.05);
}

.card-media-youtube .play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}

.card-media-youtube .play-badge svg {
  background: rgba(15, 15, 15, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 12px 16px;
  width: 56px;
  height: 56px;
  box-sizing: content-box;
}

.card-media-youtube .media-source-pill {
  position: absolute;
  bottom: 10px;
  left: 12px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(15, 15, 15, 0.78);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.card-media-audio {
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.card-media-audio audio {
  width: 100%;
}

.card-media-cap {
  font-size: 12px;
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  margin: 0;
}

.card-media-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--fg-2);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  border-bottom: 0;
}

.card-media-link:hover {
  color: var(--fg);
}

.card-media-link .link-icon {
  font-size: 14px;
  color: var(--accent, var(--cat-default));
}

/* ---------- Twitter-style action row ----------
   The action row sits below the card body and shows the comment
   bubble + count, the share affordance, and a quieter trailing
   meta block (authors + source links). The bubble lights up the
   accent color on hover; the share button does too. */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--fg-3);
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--fg-3);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.card-action:hover {
  color: var(--accent, var(--cat-default));
  background: color-mix(in srgb, var(--accent, var(--link)) 10%, transparent);
}

.card-action:focus-visible {
  outline: 2px solid var(--accent, var(--link));
  outline-offset: 2px;
}

.card-action .act-icon {
  display: inline-block;
  flex: 0 0 auto;
  color: currentColor;
}

/* Icon swap for the copy-link button. The check icon hides until the
   button gets the .copied class (set by pith.js after a successful
   clipboard write). */
.card-action .icon-check,
.paper-action-link .icon-check {
  display: none;
}

.card-action.copied .icon-link,
.paper-action-link.copied .icon-link {
  display: none;
}

.card-action.copied .icon-check,
.paper-action-link.copied .icon-check {
  display: inline-block;
}

.card-action.copied,
.paper-action-link.copied {
  color: var(--accept, #00d18a);
  background: color-mix(in srgb, var(--accept, #00d18a) 15%, transparent);
}

.card-action.act-share-x:hover {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

.card-action .act-count {
  font-weight: 600;
  letter-spacing: 0.01em;
  min-width: 1ch;
}

.card-action.act-comments.zero .act-count {
  color: var(--fg-3);
  font-weight: 500;
}

.card-action .act-label {
  font-weight: 500;
}

.card-action-spacer {
  flex: 1 1 auto;
}

.card-meta-trailing {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--fg-3);
}

.card-meta-trailing .authors {
  font-style: normal;
}

.card-meta-trailing .src-link {
  color: var(--fg-3);
  border-bottom: 0;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 11px;
  transition: border-color 120ms ease, color 120ms ease;
}

.card-meta-trailing .src-link:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}

@media (max-width: 720px) {
  .card-actions {
    gap: 2px 8px;
  }

  .card-action {
    padding: 4px 6px;
  }

  .card-action .act-label {
    display: none;
  }

  .card-meta-trailing {
    gap: 8px;
  }

  .card-meta-trailing .authors {
    flex-basis: 100%;
    margin-bottom: 4px;
  }
}

/* ---------- Category accent palette ----------
   Each top-level archive carries an accent the card uses for the headline
   underline, the cat-pill border, and the hero outline. The palette
   targets dark mode by default and leans cooler in light mode below. */
:root {
  --cat-default: #9bd0ff;
  --cat-physics: #f59e0b;
  /* warm amber for matter */
  --cat-math: #c084fc;
  /* violet for math */
  --cat-cs: #34d399;
  /* green for compute */
  --cat-astro: #60a5fa;
  /* deep sky for astro-ph */
  --cat-condmat: #67e8f9;
  /* cyan for cond-mat */
  --cat-qbio: #f472b6;
  /* magenta for q-bio */
  --cat-qfin: #fbbf24;
  --cat-stat: #fde047;
  --cat-econ: #fbbf24;
  --cat-eess: #93c5fd;
  --cat-hep: #fb7185;
  /* coral for high-energy physics */
  --cat-grqc: #a78bfa;
  /* purple for general relativity */
  --cat-nlin: #4ade80;
  --cat-quantph: #38bdf8;
}

@media (prefers-color-scheme: light) {
  :root {
    --cat-default: #1a4ea3;
    --cat-physics: #b45309;
    --cat-math: #7c3aed;
    --cat-cs: #047857;
    --cat-astro: #1d4ed8;
    --cat-condmat: #0e7490;
    --cat-qbio: #be185d;
    --cat-qfin: #b45309;
    --cat-stat: #92400e;
    --cat-econ: #b45309;
    --cat-eess: #1e40af;
    --cat-hep: #be123c;
    --cat-grqc: #6d28d9;
    --cat-nlin: #047857;
    --cat-quantph: #0369a1;
  }
}

.card.cat-default {
  --accent: var(--cat-default);
}

.card.cat-physics {
  --accent: var(--cat-physics);
}

.card.cat-math {
  --accent: var(--cat-math);
}

.card.cat-cs {
  --accent: var(--cat-cs);
}

.card.cat-astro {
  --accent: var(--cat-astro);
}

.card.cat-condmat {
  --accent: var(--cat-condmat);
}

.card.cat-qbio {
  --accent: var(--cat-qbio);
}

.card.cat-qfin {
  --accent: var(--cat-qfin);
}

.card.cat-stat {
  --accent: var(--cat-stat);
}

.card.cat-econ {
  --accent: var(--cat-econ);
}

.card.cat-eess {
  --accent: var(--cat-eess);
}

.card.cat-hep {
  --accent: var(--cat-hep);
}

.card.cat-grqc {
  --accent: var(--cat-grqc);
}

.card.cat-nlin {
  --accent: var(--cat-nlin);
}

.card.cat-quantph {
  --accent: var(--cat-quantph);
}

/* The category pill uses the accent on its left edge and on hover. */
.card-head .cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent, var(--cat-default));
  border-radius: 3px;
  background: var(--panel-2);
  color: var(--fg-2);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-decoration: none;
}

.card-head .cat-pill:hover {
  color: var(--fg);
  border-color: var(--accent, var(--cat-default));
}

.card-head .cat-pill .cat-emoji {
  font-size: 12px;
  line-height: 1;
}

.card-head .cat-pill .cat-code {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card-head .dot-sep {
  display: inline-flex;
  align-items: center;
}

.card-head .dot-sep::before {
  content: "·";
  color: var(--fg-3);
  margin-right: 8px;
}

.card-head .src-pill {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-3);
}

/* Headline + original-title treatment.
   The headline is the AI-rewritten newspaper line; the original is the
   academic title, preserved as a smaller credibility line below. */
.card-headline {
  margin: 8px 0 2px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.card-headline a {
  color: var(--fg);
  border-bottom: 0;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: color 120ms ease;
}

.card-headline a:hover {
  color: var(--accent, var(--link-hover));
}

.card-original-title {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--fg-3);
  font-style: italic;
}

.card-original-title a {
  color: inherit;
  border-bottom: 0;
}

.card-original-title a:hover {
  color: var(--fg-2);
}

.card-subtitle {
  margin: 6px 0 8px;
  color: var(--fg-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.card-lead {
  margin: 6px 0 8px;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.5;
}

.unreviewed {
  opacity: 0.7;
}

.critique-marker,
.skeptic-marker {
  color: var(--critique);
  font-weight: 700;
}

.pith-score {
  font-family: ui-monospace, monospace;
}

/* badges */
.badge {
  background: #444;
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge.big {
  font-size: 12px;
  padding: 4px 10px;
}

.badge.formal {
  background: var(--accept);
}

.badge.unrev {
  background: var(--unverdicted);
}

.conf {
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.conf.big {
  font-size: 13px;
}

.score {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-3);
}

.cat a {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--link);
}

/* paper page */
.paper {
  max-width: 880px;
}

.paperhead {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paper-title {
  font: 600 28px/1.25 ui-sans-serif, system-ui;
  letter-spacing: -0.5px;
  margin: 12px 0 8px;
}

.authors-line {
  color: var(--fg-2);
  margin: 0 0 16px;
}

/* Paper artifact card — first-page thumbnail + arXiv / Download PDF buttons.
   On desktop, sits as a 2-col grid (cover left, buttons right); on mobile
   the cover stacks above the button column. */
.paper-artifact {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: start;
  margin: 0 0 24px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cover-link {
  display: block;
  border: 0;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.15s ease-out, transform 0.15s ease-out;
}

.cover-link:hover {
  box-shadow: 0 0 0 1px var(--fg-3), 0 4px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.cover-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8.5 / 11;
  /* US Letter; A4 is 1/√2 ~ 8.27/11.7, close enough */
  object-fit: cover;
  object-position: top center;
}

.artifact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  justify-content: center;
}

.artifact-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.artifact-btn:hover {
  border-color: var(--fg-3);
  background: var(--panel-2);
}

.artifact-btn.primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.artifact-btn.primary:hover {
  opacity: 0.92;
  background: var(--fg);
  color: var(--bg);
}

.artifact-icon {
  font-family: ui-monospace, monospace;
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}

.artifact-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.3px;
  min-width: 0;
}

.artifact-label b {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.artifact-label em {
  font-style: normal;
  color: var(--fg-3);
  font-size: 11px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artifact-btn.primary .artifact-label em {
  color: rgba(11, 11, 12, 0.55);
}

.paper-video {
  margin: 12px 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel);
}

.paper-video video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

.video-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--fg-2);
  font-size: 13px;
}

.paper-positioning {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.positioning-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.positioning-group b {
  margin-right: 2px;
  color: var(--fg-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.positioning-label {
  margin-left: 6px;
  color: var(--fg-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.positioning-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--panel-2);
  color: var(--fg-1);
}

.positioning-chip.soft {
  color: var(--fg-2);
}

.positioning-chip.standard {
  background: rgba(91, 109, 245, 0.08);
  border-color: rgba(91, 109, 245, 0.24);
  color: var(--link);
}

.paper-figures {
  margin: 18px 0 24px;
  padding: 14px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.paper-figures .figures-head h4 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.paper-figures .figures-attribution {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--fg-2);
}

.paper-figures .figures-attribution a {
  color: var(--link);
  text-decoration: underline;
}

.figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.paper-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.paper-figure a {
  display: block;
  background: #fafafa;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: #fff;
}

.paper-figure:first-child {
  grid-column: 1 / -1;
}

.paper-figure:first-child img {
  max-height: 820px;
}

.paper-figure figcaption {
  padding: 8px 11px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--fg-1);
}

.paper-figure .fig-num {
  margin-right: 4px;
}

.paper-figure .fig-caption {
  color: var(--fg-2);
}

.paper-figure .fig-source {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--link);
  text-decoration: none;
}

.paper-figure .fig-source:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .figures-grid {
    grid-template-columns: 1fr;
  }

  .paper-figure img {
    max-height: 320px;
  }

  .paper-figure:first-child img {
    max-height: 620px;
  }
}

@media (max-width: 700px) {
  .paper-artifact {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .cover-link {
    max-width: 220px;
    margin: 0 auto;
  }
}

.paper-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 18px;
  flex-wrap: wrap;
}

.paper-contents {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 4px 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.paper-contents .contents-label {
  grid-column: 1 / -1;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0 0 4px;
}

.paper-contents a {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.35;
  color: var(--fg);
  text-decoration: none;
  border-left: 2px solid var(--line);
  padding: 7px 10px 7px 18px;
  background: transparent;
}

.paper-contents a:hover {
  color: var(--fg);
  border-left-color: var(--fg-3);
  background: var(--panel-2);
}

.vote-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px;
  background: var(--panel);
}

.vote-block .fire {
  margin-left: 4px;
}

.abstract {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 0 0 24px;
}

.abstract summary {
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.abstract p {
  margin: 10px 0 0;
  color: var(--fg-2);
}

.verdict-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  background: var(--panel);
  margin-bottom: 24px;
}

.verdict-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.verdict-head h2 {
  margin: 0 8px 0 0;
  font: 700 18px ui-monospace, monospace;
  letter-spacing: -0.3px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  /* strongest_claim + weakest_assumption stack full-width
                                     so each can read as its own paragraph */
  gap: 18px;
  margin: 18px 0 8px;
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.cell h4 {
  margin: 0 0 4px;
  font: 700 11px ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-3);
}

.cell p {
  margin: 0;
  color: var(--fg);
}

.scores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.score-pill {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.score-pill span {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 10px;
}

.score-pill b {
  color: var(--fg);
  font-weight: 600;
}

/* Skeptic's Critique — neutral panel with subtle amber accent.
   Pink/red dropped: a skeptic critique is not a verdict of falsehood. */
.critique,
.skeptic {
  border: 1px solid var(--line);
  border-left: 3px solid var(--critique);
  background: var(--critique-bg);
  border-radius: 4px;
  padding: 12px 16px;
  margin: 18px 0 8px;
  color: var(--fg);
}

.critique-head,
.skeptic header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.critique-label,
.skeptic-mark {
  color: var(--fg);
  font-family: ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 13px;
  text-transform: none;
}

.critique-headline,
.skeptic-headline {
  font-weight: 600;
  margin: 4px 0 6px;
  color: var(--fg);
  line-height: 1.4;
}

.critique-attack-short,
.critique-attack-full,
.skeptic-attack {
  margin: 6px 0;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.55;
}

.critique-more {
  margin: 8px 0 0;
}

.critique-more>summary {
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.critique-test,
.skeptic-test {
  margin: 8px 0 0;
  color: var(--fg-2);
  font-size: 13px;
}

.critique-test .meta,
.skeptic-test .meta {
  font-family: ui-monospace, monospace;
}

.block {
  margin: 12px 0;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}

.block summary {
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.block p {
  margin: 8px 0 0;
}

.flags {
  padding-left: 22px;
}

.flags li {
  margin-bottom: 8px;
}

.flags li b {
  font-family: ui-monospace, monospace;
}

/* Legacy .history table (kept for any cached pages); new compact list
   below replaces it on the paper view. */
.history {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

.history th,
.history td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.history th {
  color: var(--fg-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 10px;
}

/* Review history: a single inline link on the paper page; the list
   itself lives on /paper/{id}/history to keep mobile widths sane. */
.review-history-link {
  margin: 14px 0 0;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.review-history-link a {
  color: var(--fg-2);
  text-decoration: none;
  border-bottom: 1px dotted var(--fg-3);
}

.review-history-link a:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

/* Dedicated review-history page */
.paper-history {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.paper-history h1 {
  font-size: 22px;
  margin: 6px 0 4px;
}

.paper-history-title {
  font-size: 14px;
  color: var(--fg-2);
  margin: 4px 0 18px;
}

.paper-history-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.paper-history-list .ph-item {
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}

.paper-history-list .ph-item:first-child {
  border-top: 0;
}

.ph-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.ph-row.meta {
  font-size: 10px;
  margin-top: 4px;
}

.ph-date {
  color: var(--fg-3);
}

.ph-verdict {
  color: #000;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 3px;
  text-transform: lowercase;
}

.ph-conf,
.ph-novelty,
.ph-pipeline,
.ph-time {
  font-size: 10px;
}

.ph-pipeline,
.ph-time {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.empty {
  color: var(--fg-3);
  padding: 24px 0;
}

.section {
  margin: 24px 0 8px;
}

.verdict-meta {
  font-family: ui-monospace, monospace;
}

.verdict-box.pending {
  color: var(--fg-3);
}

/* v0.9: kids-hero — the schoolchild explainer at the very top of the paper page.
   Lives ABOVE the breadcrumb and title so the first thing a reader sees is one
   simple sentence about the paper. No "for a schoolchild:" label. */
.kids-hero {
  font: 500 28px/1.35 ui-sans-serif, system-ui, -apple-system;
  letter-spacing: -0.5px;
  color: var(--fg);
  margin: 8px 0 22px;
  max-width: 880px;
  border-left: 3px solid var(--fg-3);
  padding: 6px 0 6px 18px;
}

@media (max-width: 700px) {
  .kids-hero {
    font-size: 22px;
    padding-left: 14px;
  }
}

/* v0.9: per-paper extras (infographic, NotebookLM, podcast, video, data) */
.paper-extras {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 18px;
}

.paper-references {
  width: min(100%, clamp(760px, 72vw, 1040px));
  margin: 28px auto;
  padding: 22px 26px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.references-head {
  margin: 0 0 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.references-kicker {
  margin: 0 0 6px;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.references-title {
  margin: 0 0 6px;
  font-family: var(--font-prose);
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.references-meta {
  margin: 0;
  color: var(--fg-2);
  font-size: 13px;
}

.references-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reference-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.reference-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.reference-index {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 12px;
  color: var(--fg-3);
}

.reference-body {
  min-width: 0;
}

.reference-title {
  margin: 0 0 4px;
  font-family: var(--font-prose);
  font-size: 16px;
  line-height: 1.35;
}

.reference-raw {
  margin: 0 0 6px;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.45;
}

.reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
  color: var(--fg-3);
}

.reference-links a {
  border-bottom: 0;
}

.references-more {
  margin: 16px 0 0;
}

@media (max-width: 720px) {
  .paper-references {
    width: 100%;
    padding: 18px 16px;
    border-radius: 14px;
  }

  .reference-row {
    grid-template-columns: 42px 1fr;
    gap: 8px;
  }
}

.extra-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: transform 100ms ease, border-color 100ms ease;
  color: inherit;
}

.extra-card:hover {
  transform: translateY(-1px);
  border-color: var(--fg-3);
  color: inherit;
}

.extra-card.extra-card-image {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.extra-card .extra-image {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
}

.extra-card .extra-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.extra-card.extra-card-link {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.extra-card .extra-kind {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-3);
}

.extra-card .extra-title {
  color: var(--fg);
  font: 600 15px ui-sans-serif, system-ui;
  letter-spacing: -0.2px;
}

.extra-card .extra-desc {
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.5;
}

.extra-card .extra-cta {
  color: var(--link);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* v0.9: abstract-bottom — distinct from the inline abstract; muted footer block */
.abstract-bottom,
.abstract-inline {
  padding: 12px 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--fg-3);
}

/* preserve the original bottom-of-page placement margin if anyone still
   uses the bottom variant; the inline variant is spaced via the
   .paper > * + * lobotomized-owl rule below, so it gets no extra margin. */
.abstract-bottom {
  margin: 32px 0 16px;
}

.abstract-bottom summary,
.abstract-inline summary {
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.abstract-bottom p,
.abstract-inline p {
  margin: 10px 0 0;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.55;
}

/* v0.13: consistent vertical rhythm between the major sections of a paper
   page. The lobotomized-owl selector applies a top margin to every direct
   child of .paper after the first, so neighbouring sections (artifact card,
   title, extras, lead, abstract, actions row, verdict-box, history,
   comments-block) get uniform breathing room without us having to touch
   each one's margin individually. */
.paper>*+* {
  margin-top: 24px;
}

.paper>p.authors-line {
  /* The authors line sits tight against the title, so reduce the gap
     specifically between paper-title and authors-line. */
  margin-top: 4px;
}

/* v0.7: paper-lead (1-2 line plain-English header above the actions row) */
.paper-lead {
  font: 500 16px/1.55 ui-sans-serif, system-ui, -apple-system;
  color: var(--fg);
  margin: 4px 0 14px;
  max-width: 760px;
}

/* v0.7: card-lead replaces card-summary when lead is present */
.card-lead {
  margin: 4px 0 6px;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
}

/* v0.7: Novel badge — accent green pill */
.badge-novel {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: var(--accept);
  color: #02110b;
  cursor: help;
}

/* v0.7: 5-of-5 confidence meter; tooltip on hover */
.conf-meter {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  cursor: help;
}

.conf-meter .dots-on {
  color: var(--fg);
  letter-spacing: 1px;
}

.conf-meter .dots-off {
  color: var(--fg-3);
  letter-spacing: 1px;
}

.conf-meter.big {
  font-size: 14px;
}

.conf-meter.big .dots-on,
.conf-meter.big .dots-off {
  letter-spacing: 1.4px;
}

.conf-meter .conf-label {
  color: var(--fg-2);
  font-size: 11px;
  letter-spacing: 1px;
  margin-left: 4px;
}

/* discovery-chip cursor-help so users know it has tooltip text */
.discovery-chip {
  cursor: help;
}

.badge {
  cursor: help;
}

/* v0.8: Lean Theorem badge — accent purple-blue pill linking to the Canon */
.badge-lean {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: #5b6df5;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 0;
  cursor: pointer;
}

.badge-lean:hover {
  background: #4a5cd9;
  color: #ffffff;
}

.badge-lean.inline {
  padding: 0 7px;
  font-size: 9px;
  cursor: help;
}

/* v0.8: connected-lean-theorems block on the paper page */
.lean-theorems {
  margin: 18px 0 0;
}

.lean-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lean-item {
  border: 1px solid var(--line);
  border-left: 3px solid #5b6df5;
  border-radius: 4px;
  padding: 10px 14px;
  background: var(--panel);
}

.lean-item .lean-cite {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  border-bottom: 0;
  text-decoration: none;
  color: var(--fg);
}

.lean-item .lean-cite:hover {
  color: var(--link-hover);
}

.lean-item .lean-cite code {
  color: var(--fg-2);
  background: var(--panel-2);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}

.lean-item .lean-thm {
  font-weight: 600;
  color: var(--fg);
}

.lean-rel {
  display: inline-block;
  margin-left: 6px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-3);
}

.lean-passage {
  margin: 6px 0 0;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.5;
}

/* v0.8: Canon styles */
.canon-link {
  font-style: italic;
}

.canon-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 12px 0 18px;
}

.canon-search input[type="search"] {
  flex: 1 1 auto;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

.canon-search button {
  background: var(--fg);
  color: var(--bg);
  border: 0;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.canon-bucket {
  margin: 8px 0;
}

.canon-bucket>summary {
  cursor: pointer;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.canon-bucket>summary .bucket-name {
  font: 700 12px ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg);
}

.canon-list {
  list-style: none;
  padding: 12px 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.canon-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}

.canon-list li code {
  font-size: 12px;
  color: var(--fg);
}

.canon-search-results {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.canon-search-results li {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.canon-breadcrumb {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  margin: 6px 0 14px;
}

.canon-toc {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 12px 16px;
  margin: 0 0 18px;
}

.canon-toc h3 {
  margin: 0 0 8px;
  font: 700 11px ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--fg-3);
}

.canon-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 280px;
  overflow-y: auto;
}

.canon-toc li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.canon-toc .meta {
  font-size: 10px;
}

.decl-kind {
  display: inline-block;
  min-width: 70px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-3);
  font-weight: 700;
}

.decl-theorem {
  color: #5b6df5;
}

.decl-lemma {
  color: #5b6df5;
  opacity: 0.85;
}

.decl-def {
  color: var(--fg-2);
}

/* Lean source listing */
.canon-source {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 12px 14px;
  margin: 0 0 14px;
  overflow-x: auto;
}

.canon-source pre {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg);
  white-space: pre;
}

.canon-source .ln {
  display: inline-block;
  width: 5ch;
  padding-right: 10px;
  margin-right: 8px;
  border-right: 1px solid var(--line);
  color: var(--fg-3);
  user-select: none;
  text-align: right;
}

.canon-source .lc {
  display: inline;
}

.canon-source .anchor {
  position: relative;
  top: -80px;
  display: inline-block;
}

.canon-source .lc:target,
.canon-source .anchor:target+* {
  background: rgba(91, 109, 245, 0.12);
}

.canon-foot {
  margin: 8px 0 24px;
  font-size: 12px;
}

/* Plain-language-first paper-page layout (v0.6) */
.hero-summary {
  font: 600 22px/1.35 ui-sans-serif, system-ui, -apple-system;
  letter-spacing: -0.4px;
  margin: 14px 0 20px;
  color: var(--fg);
}

.section-band {
  margin: 18px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.section-band h4 {
  margin: 0 0 6px;
  font: 700 11px ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-3);
}

@media (min-width: 900px) {
  .section-band {
    position: relative;
    padding-top: 16px;
  }

  .section-band h4 {
    position: absolute;
    right: calc(100% + 44px);
    top: 16px;
    width: max-content;
    margin: 0;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    text-align: right;
    transform: rotate(-90deg);
    transform-origin: right top;
    color: var(--link);
  }
}

.section-band .prose {
  color: var(--fg);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

.section-band .grid {
  margin: 10px 0 0;
}

.section-band .cell h5 {
  margin: 0 0 4px;
  font: 700 10px ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-3);
}

.section-band .cell p {
  margin: 0;
  color: var(--fg);
}

.for-kids {
  margin: 14px 0 4px;
  padding: 8px 12px;
  border-left: 2px solid var(--line);
  color: var(--fg-2);
  font-size: 13px;
  font-style: italic;
}

.for-kids .meta {
  font-style: normal;
}

.block-h5 {
  margin: 14px 0 6px;
  font: 700 11px ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-3);
}

/* discovery-kind chip beside verdict + confidence */
.discovery-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font: 700 10px ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border: 1px solid var(--line);
  color: var(--fg-2);
  background: var(--panel-2);
}

.discovery-chip.discovery-paradigm_shift,
.discovery-chip.discovery-first_principles,
.discovery-chip.discovery-unification {
  background: rgba(0, 209, 138, 0.18);
  border-color: var(--accept);
  color: var(--accept);
}

.discovery-chip.discovery-incremental,
.discovery-chip.discovery-replication,
.discovery-chip.discovery-review {
  color: var(--fg-3);
}

/* topbar right side: auth state */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.user-chip {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.role-badge {
  background: var(--panel-2);
  color: var(--fg-2);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.version {
  color: var(--fg-3);
  font-size: 11px;
}

/* auth */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
  margin: 8px 0 12px;
}

.auth-form label {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-form input[type="email"] {
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: ui-monospace, monospace;
}

.auth-form button {
  background: var(--fg);
  color: var(--bg);
  border: 0;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-form button:hover {
  opacity: 0.9;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  margin: 14px 0 12px;
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1 1 auto;
  border-top: 1px solid var(--line);
}

.orcid-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid #a6ce39;
  color: #a6ce39;
  background: transparent;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  max-width: 380px;
  border-bottom: 1px solid #a6ce39;
}

/* Provider chooser on /auth/login */
.provider-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
  margin: 8px 0 16px;
}

.provider-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  transition: transform 100ms ease, border-color 100ms ease, background 100ms ease;
}

.provider-btn:hover {
  transform: translateY(-1px);
  border-color: var(--fg-3);
}

.provider-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.provider-disabled:hover {
  transform: none;
  border-color: var(--line);
  background: var(--panel);
}

.provider-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.provider-text b {
  color: var(--fg);
  font: 600 14px ui-sans-serif, system-ui;
  letter-spacing: -0.2px;
}

.provider-text em {
  color: var(--fg-3);
  font: 400 12px ui-sans-serif, system-ui;
  font-style: normal;
}

.provider-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  flex-shrink: 0;
}

.provider-orcid {
  border-color: #a6ce39;
}

.provider-orcid:hover {
  background: rgba(166, 206, 57, 0.08);
}

.provider-orcid-mark {
  background: #a6ce39;
  color: #000;
  font-size: 14px;
}

.provider-apple {
  border-color: #d1d1d6;
}

.provider-apple:hover {
  background: rgba(209, 209, 214, 0.08);
}

.provider-apple-mark {
  background: #ffffff;
  color: #000;
  font-size: 22px;
  line-height: 1;
}

.provider-twitter {
  border-color: #1d9bf0;
}

.provider-twitter:hover {
  background: rgba(29, 155, 240, 0.08);
}

.provider-twitter-mark {
  background: #000;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.orcid-btn:hover {
  background: rgba(166, 206, 57, 0.08);
  color: #a6ce39;
  border-color: #a6ce39;
}

.orcid-mark {
  background: #a6ce39;
  color: #000;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 11px;
}

.auth-note {
  color: var(--fg-3);
  font-size: 11px;
  max-width: 480px;
  margin: 14px 0;
}

/* comments */
.comments-block {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 18px;
}

.comment-form textarea {
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font: 13px/1.5 ui-sans-serif, system-ui;
  resize: vertical;
  min-height: 70px;
}

.comment-form-foot {
  display: flex;
  gap: 8px;
}

.comment-form input[type="text"] {
  flex: 1 1 auto;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.comment-form button {
  background: var(--fg);
  color: var(--bg);
  border: 0;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.comments {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 14px;
  background: var(--panel);
}

.comment.orcid-verified {
  border-left: 3px solid #a6ce39;
}

.comment.apple-verified {
  border-left: 3px solid #d1d1d6;
}

.comment.twitter-verified {
  border-left: 3px solid #1d9bf0;
}

.comment-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.comment-author {
  color: var(--fg);
  font-weight: 600;
}

.orcid-tag,
.apple-tag,
.twitter-tag,
.arxiv-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 9px;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.orcid-tag {
  background: #a6ce39;
  color: #000;
}

.apple-tag {
  background: #d1d1d6;
  color: #000;
}

.twitter-tag {
  background: #1d9bf0;
  color: #fff;
}

.arxiv-tag {
  background: #b31b1b;
  color: #fff;
}

.section-anchor {
  color: var(--fg-3);
  font-style: italic;
}

.comment-body {
  margin: 6px 0 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ===========================================================
 * v0.9 — score cards, Lean Confirmed, desk editor, referee,
 *        rebuttal, circularity, axiom ledger, methodology page.
 * =========================================================== */

/* Lean Confirmed badge — stronger than badge-lean. Gold accent. */
.badge-lean-confirmed {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #b58e3a 0%, #e0bf6e 60%, #b58e3a 100%);
  color: #1a1408;
  text-decoration: none;
  border-bottom: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 222, 140, 0.5) inset;
}

.badge-lean-confirmed:hover {
  filter: brightness(1.1);
  color: #000;
}

/* ---- Scorecard --------------------------------------------- */

.scorecard {
  margin: 24px 0 12px;
  padding: 14px 14px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.scorecard-head {
  margin-bottom: 10px;
}

.scorecard-head h4 {
  margin: 0 0 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-2);
}

.scorecard-head .meta {
  font-size: 11px;
  color: var(--fg-3);
}

.scorecard-head .meta a {
  color: var(--fg-2);
  text-decoration: underline;
}

.score-expand-hint {
  margin: 8px 0 0;
  padding: 7px 9px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--link);
  font: 700 11px ui-monospace, monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: var(--bg);
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.score-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}

.score-card[open] {
  background: rgba(255, 255, 255, 0.02);
}

.score-card>summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.score-card>summary::-webkit-details-marker {
  display: none;
}

.score-card>summary::after {
  content: "expand rationale ▸";
  margin-left: 6px;
  color: var(--link);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  white-space: nowrap;
}

.score-card[open]>summary::after {
  content: "collapse rationale ▾";
}

.score-label {
  color: var(--fg);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.4px;
}

.score-label em {
  color: var(--fg-3);
  font-style: italic;
  font-weight: 400;
  margin-left: 6px;
  font-size: 10px;
}

.score-meter {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 1px;
}

.score-meter .dots-on {
  color: #2dd4bf;
}

.score-card-circular .score-meter .dots-on {
  color: #f59e0b;
}

.score-meter .dots-off {
  color: var(--fg-3);
}

.score-tier {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--fg-2);
}

.score-num {
  font-weight: 700;
  color: var(--fg);
  font-size: 13px;
  min-width: 36px;
  text-align: right;
}

@media (max-width: 700px) {
  .score-card>summary {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }

  .score-meter,
  .score-num {
    grid-column: 2;
  }

  .score-card>summary::after {
    grid-column: 1 / -1;
    margin-left: 0;
  }
}

.score-rationale {
  padding: 0 14px 8px;
  margin: 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.55;
}

.score-rubric {
  padding: 0 14px 12px;
  margin: 0;
  font-size: 11px;
  color: var(--fg-3);
}

.is-new-result {
  margin: 14px 0 4px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}

.is-new-result strong {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-2);
}

.is-new-result .badge-newresult {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 9px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.is-new-result.yes .badge-newresult {
  background: #2dd4bf;
  color: #001a18;
}

.is-new-result.no .badge-newresult {
  background: rgba(245, 158, 11, 0.7);
  color: #1a1408;
}

.is-new-result .meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.5;
}

/* ---- Desk Editor letter ------------------------------------ */

.desk-editor {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid #6b7280;
  border-radius: 4px;
  background: rgba(107, 114, 128, 0.05);
}

.desk-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.desk-label {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--fg-2);
}

.desk-headline {
  margin: 0 0 6px;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.45;
  font-style: italic;
}

.desk-letter>summary {
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.5px;
  padding: 2px 0;
}

.desk-letter-body {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg);
  white-space: pre-line;
}

.desk-letter-body p {
  margin: 0 0 10px;
}

/* ---- Referee report --------------------------------------- */

.referee,
.rebuttal,
.circularity,
.axiom-ledger,
.lean-confirmation {
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.referee-head h4,
.rebuttal-head h4,
.circ-head h4,
.ledger-head h4,
.lc-head h4 {
  margin: 0 0 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-2);
}

.referee-head,
.rebuttal-head,
.circ-head,
.ledger-head,
.lc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}

.referee-head .meta,
.rebuttal-head .meta,
.circ-head .meta,
.ledger-head .meta,
.lc-head .meta {
  font-size: 11px;
}

.referee-summary,
.rebuttal-summary,
.circ-headline {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg);
}

.referee-block>summary,
.rebuttal-block>summary,
.circ-block>summary,
.ledger-block>summary {
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  margin-top: 8px;
}

.referee-list,
.rebuttal-list,
.circ-list {
  padding: 8px 0 0 22px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.referee-list li,
.rebuttal-list li,
.circ-list li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg);
}

.ref-loc,
.circ-loc {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(91, 109, 245, 0.15);
  color: var(--fg-2);
  font-family: ui-monospace, monospace;
  font-size: 10px;
}

/* ---- Authors' rebuttal ------------------------------------- */

.reb-comment,
.reb-response {
  margin: 0 0 6px;
}

.reb-comment {
  color: var(--fg-2);
}

.reb-response {
  color: var(--fg);
}

.reb-revision {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.rev-yes {
  background: rgba(45, 212, 191, 0.18);
  color: #2dd4bf;
}

.rev-partial {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.rev-no {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
}

.rebuttal-standing {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.rebuttal-standing strong {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--fg-2);
}

.rebuttal-standing ul {
  margin: 6px 0 0 18px;
  padding: 0;
  font-size: 13px;
  line-height: 1.55;
}

/* ---- Circularity ------------------------------------------- */

.circ-kind {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.circ-quote {
  margin: 6px 0 4px;
  padding: 6px 10px;
  border-left: 3px solid var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--fg-2);
  font-style: italic;
}

.circ-why {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--fg);
}

/* ---- Axiom ledger ------------------------------------------ */

.ledger-rationale {
  margin: 0 0 8px;
}

.ledger-list {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ledger-list li {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font-size: 13px;
  line-height: 1.55;
}

.ledger-list code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: rgba(91, 109, 245, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
}

.axiom-kind {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.axiom-standard_math {
  background: rgba(45, 212, 191, 0.18);
  color: #2dd4bf;
}

.axiom-domain_assumption {
  background: rgba(91, 109, 245, 0.2);
  color: #8b9aff;
}

.axiom-ad_hoc_to_paper {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.entity-evidence {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.entity-evidence.has-evidence {
  background: rgba(45, 212, 191, 0.2);
  color: #2dd4bf;
}

.entity-evidence.no-evidence {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ---- Lean Confirmation ------------------------------------- */

.lc-citations {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lc-cite {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #b58e3a;
  border-radius: 4px;
  background: rgba(181, 142, 58, 0.05);
}

.lc-status {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.lc-confirmed {
  color: #2dd4bf;
}

.lc-partial {
  color: #f59e0b;
}

.lc-unconfirmed,
.lc-out_of_scope,
.lc-unclear {
  color: var(--fg-3);
}

/* ---- /methodology page ------------------------------------- */

.prose-page {
  max-width: 760px;
  margin: 24px auto;
  padding: 0 16px;
  line-height: 1.65;
  color: var(--fg);
}

.prose-page h1,
.prose-page h2,
.prose-page h3 {
  color: var(--fg);
  letter-spacing: 0.3px;
}

.prose-page h1 {
  font-size: 28px;
  margin: 18px 0 14px;
}

.prose-page h2 {
  font-size: 20px;
  margin: 24px 0 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.prose-page h3 {
  font-size: 16px;
  margin: 18px 0 8px;
}

.prose-page p {
  font-size: 14px;
  margin: 0 0 12px;
}

.prose-page table {
  border-collapse: collapse;
  margin: 10px 0 18px;
  font-size: 13px;
  width: 100%;
}

.prose-page th,
.prose-page td {
  border: 1px solid var(--line);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.prose-page th {
  background: var(--panel);
  font-weight: 700;
}

.prose-page code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: rgba(91, 109, 245, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ============================================================
   PITH LEAD — the new primary content of every paper page
   ============================================================ */

.pith-lead {
  max-width: 760px;
  margin: 36px auto 28px;
  padding: 36px 44px 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

@media (max-width: 720px) {
  .pith-lead {
    padding: 24px 20px 28px;
    margin: 24px 0;
    max-width: 100%;
  }
}

/* ---- pith header: kicker + serif title + italic dek -------- */

.pith-lead .pith-head {
  margin: 0 0 32px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.pith-lead .pith-kicker {
  margin: 0 0 8px;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.pith-lead .pith-title {
  margin: 0 0 12px;
  font-family: var(--font-prose);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--fg);
}

@media (max-width: 720px) {
  .pith-lead .pith-title {
    font-size: 24px;
  }
}

/* ---- final responsive paper width ---------------------------
   Keep this as the last paper-page width block. Earlier article-system
   sections still define legacy 760-780px caps. */

.paper {
  width: min(100%, clamp(760px, 68vw, 960px));
  max-width: none;
  margin-inline: auto;
}

.pith-lead,
.critical-analysis-open {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.paper-figures {
  width: min(100%, clamp(760px, 72vw, 1040px));
  max-width: none;
}

.paper-figure figcaption {
  max-width: none;
}

@media (max-width: 860px) {

  .paper,
  .paper-figures {
    width: 100%;
  }
}

/* ---- final feed media thumbnails ----------------------------
   Feed cards should show one resized paper image, not a cropped slice.
   This applies to figure fallbacks and other image attachments. */

.card-media.mode-image {
  background: #fff;
}

.card-media.mode-image .card-media-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  max-height: 280px;
  background: #fff;
}

.card-media.mode-image .card-media-image img,
.card-media.kind-figure .card-media-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 280px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
}

/* ---- final figure treatment --------------------------------
   One marquee image per paper. Remaining figures become compact
   thumbnails so the paper page does not turn into a wall of images. */

.figures-grid.has-thumbnails {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}

.paper-figure.figure-marquee {
  grid-column: 1 / -1;
}

.paper-figure.figure-marquee img {
  max-height: min(760px, 82vh);
  object-fit: contain;
}

.paper-figure.figure-thumb a {
  box-shadow: none;
  border-radius: 6px;
}

.paper-figure.figure-thumb img {
  aspect-ratio: 4 / 3;
  max-height: 180px;
  object-fit: cover;
}

.paper-figure.figure-thumb figcaption {
  padding-top: 8px;
  font-size: 12.5px;
  line-height: 1.4;
}

.paper-figure.figure-thumb .fig-caption {
  display: none;
}

.paper-figure.figure-thumb .fig-source {
  margin-left: 0;
}

.card-media.kind-figure {
  margin-top: 14px;
}

.card-media.kind-figure .card-media-image img {
  aspect-ratio: 16 / 9;
  max-height: 260px;
  object-fit: cover;
}

/* ---- responsive paper-page reading width --------------------
   The earlier paper page used fixed 760-780px columns. That is tidy on
   small laptops, but cramped on a 16" MacBook Pro or desktop monitor. */

.paper {
  width: min(100%, clamp(760px, 68vw, 960px));
  max-width: none;
  margin-inline: auto;
}

.pith-lead,
.critical-analysis-open {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.paper-figures {
  width: min(100%, clamp(760px, 72vw, 1040px));
  max-width: none;
}

.paper-figure figcaption {
  max-width: none;
}

@media (max-width: 860px) {

  .paper,
  .paper-figures {
    width: 100%;
  }
}

.pith-lead .pith-dek {
  margin: 0;
  font-family: var(--font-prose);
  font-size: 16px;
  line-height: 1.6;
  font-style: italic;
  color: var(--fg-2);
}

.pith-lead .pith-headline {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.pith-lead .section-band:first-of-type {
  margin-top: 8px;
}

.pith-lead .pith-band .pith-implications {
  margin: 2px 0 0 18px;
  padding: 0;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.6;
}

.pith-lead .pith-band .pith-implications li {
  margin: 0 0 6px;
}

.pith-inferences-note {
  margin: 0 0 8px;
  font-style: italic;
}

.pith-lead .pith-block {
  margin: 0 0 18px;
}

.pith-lead .pith-block:last-child {
  margin-bottom: 0;
}

.pith-lead .pith-h {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent, #5b6df5);
}

.pith-lead .pith-prose,
.pith-lead .pith-prose p {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
}

.pith-lead .pith-prose p:last-child {
  margin-bottom: 0;
}

.pith-lead .pith-implications {
  margin: 4px 0 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.55;
}

.pith-lead .pith-implications li {
  margin: 0 0 5px;
}

.pith-lead .pith-inferences {
  border-left: 3px solid rgba(91, 109, 245, 0.45);
  padding-left: 14px;
}

.pith-lead .pith-inferences .pith-meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--fg-3);
  font-style: italic;
}

.pith-lead .pith-load-bearing {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 18px;
}

@media (max-width: 720px) {
  .pith-lead {
    padding: 16px 14px 18px;
  }

  .pith-lead .pith-headline {
    font-size: 19px;
  }

  .pith-lead .pith-prose,
  .pith-lead .pith-prose p {
    font-size: 15px;
  }
}

/* ============================================================
   CRITICAL ANALYSIS
   ============================================================ */

.critical-analysis {
  margin: 28px 0 24px;
  padding: 0 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.critical-head {
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.critical-head h3 {
  margin: 0 0 3px;
  font-size: 18px;
}

.critical-head .meta {
  margin: 0;
}

.critical-analysis>summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  user-select: none;
}

.critical-analysis>summary::-webkit-details-marker {
  display: none;
}

.critical-analysis>summary::before {
  content: "▸ ";
  display: inline;
  margin-right: 4px;
  color: var(--muted, #8a8a92);
  font-size: 13px;
}

.critical-analysis[open]>summary::before {
  content: "▾ ";
}

.critical-analysis>summary:hover {
  background: rgba(91, 109, 245, 0.04);
}

.critical-analysis .ca-summary-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.critical-analysis .ca-summary-meta {
  font-size: 12px;
  color: var(--fg-3);
  font-style: italic;
}

.critical-analysis[open] {
  padding: 0 16px 18px;
}

.critical-analysis .ca-preamble {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: rgba(91, 109, 245, 0.05);
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.5;
}

/* ----- Hide a few legacy elements that no longer ship ----- */

.paper-actions-quiet {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0 6px;
}

/* Inline action chips next to the Pith It block (comments, copy link,
   share to X). They share the look of the card-action chips on the
   feed but render against the paper page background. */
.paper-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-2);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.paper-action-link:hover {
  color: var(--accent, var(--link));
  border-color: var(--accent, var(--link));
  background: color-mix(in srgb, var(--accent, var(--link)) 10%, transparent);
}

.paper-action-link:focus-visible {
  outline: 2px solid var(--accent, var(--link));
  outline-offset: 2px;
}

.paper-action-link .act-icon {
  flex: 0 0 auto;
}

.paper-action-link.act-share-x:hover {
  color: var(--fg);
  border-color: var(--fg-3);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

/* ============================================================
   CRITICAL ANALYSIS — long-form readability layer.
   Lessons borrowed from NYT / The Atlantic article pages:
   single narrow column, serif body, generous line-height, kicker +
   dek hierarchy, restrained color, vertical rhythm between sections.
   Scoped to .critical-analysis-open so the legacy collapsed
   <details class="critical-analysis"> styling is untouched.
   ============================================================ */

.critical-analysis-open {
  max-width: 760px;
  margin: 36px auto 28px;
  padding: 36px 44px 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

@media (max-width: 720px) {
  .critical-analysis-open {
    padding: 24px 20px 28px;
    margin: 24px 0;
    max-width: 100%;
  }
}

/* ---- header: kicker + serif headline + dek ------------------ */

.critical-analysis-open .critical-head {
  margin: 0 0 32px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.critical-analysis-open .critical-kicker {
  margin: 0 0 8px;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.critical-analysis-open .critical-title {
  margin: 0 0 12px;
  font-family: var(--font-prose);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--fg);
}

@media (max-width: 720px) {
  .critical-analysis-open .critical-title {
    font-size: 24px;
  }
}

.critical-analysis-open .critical-meta {
  margin: 0;
  font-family: var(--font-prose);
  font-size: 16px;
  line-height: 1.6;
  font-style: italic;
  color: var(--fg-2);
}

/* ---- preamble (legacy ca-preamble used elsewhere) ----------- */

.critical-analysis-open .ca-preamble {
  display: none;
  /* The .critical-meta dek above replaces it. */
}

/* ---- table of contents (jump to subsection) ----------------- */

.critical-analysis-open .ca-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin: -10px 0 28px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.critical-analysis-open .ca-toc-link {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.critical-analysis-open .ca-toc-link:hover {
  color: var(--fg);
  border-color: var(--line);
  background: var(--panel-2);
}

/* ---- subsection container (desk, referee, rebuttal, ...) ---- */

.critical-analysis-open .desk-editor,
.critical-analysis-open .referee,
.critical-analysis-open .rebuttal,
.critical-analysis-open .circularity,
.critical-analysis-open .axiom-ledger,
.critical-analysis-open .lean-confirmation {
  margin: 40px 0 0;
  padding: 32px 0 0;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
}

.critical-analysis-open .desk-editor:first-of-type,
.critical-analysis-open .referee:first-of-type,
.critical-analysis-open .rebuttal:first-of-type {
  /* When the first subsection follows the TOC, soften the top rule
     so the reader's eye keeps moving. */
}

/* ---- subsection header: kicker + meta + (optional) dek ------ */

.critical-analysis-open .desk-head,
.critical-analysis-open .referee-head,
.critical-analysis-open .rebuttal-head,
.critical-analysis-open .circ-head,
.critical-analysis-open .ledger-head,
.critical-analysis-open .lc-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  margin: 0 0 14px;
}

.critical-analysis-open .desk-label,
.critical-analysis-open .referee-head h4,
.critical-analysis-open .rebuttal-head h4,
.critical-analysis-open .circ-head h4,
.critical-analysis-open .ledger-head h4,
.critical-analysis-open .lc-head h4 {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.critical-analysis-open .desk-head .meta,
.critical-analysis-open .referee-head .meta,
.critical-analysis-open .rebuttal-head .meta,
.critical-analysis-open .circ-head .meta,
.critical-analysis-open .ledger-head .meta {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  text-transform: none;
}

/* The "dek" — the lead serif italic line under the kicker. */
.critical-analysis-open .desk-headline,
.critical-analysis-open .referee-summary:first-of-type,
.critical-analysis-open .rebuttal-summary,
.critical-analysis-open .circ-headline,
.critical-analysis-open .ledger-rationale {
  margin: 0 0 18px;
  font-family: var(--font-prose);
  font-size: 19px;
  line-height: 1.45;
  font-style: italic;
  letter-spacing: -0.005em;
  color: var(--fg);
}

@media (max-width: 720px) {

  .critical-analysis-open .desk-headline,
  .critical-analysis-open .referee-summary:first-of-type,
  .critical-analysis-open .rebuttal-summary,
  .critical-analysis-open .circ-headline,
  .critical-analysis-open .ledger-rationale {
    font-size: 17px;
  }
}

/* Subsequent referee-summary blocks (Significance.) are normal body. */
.critical-analysis-open .referee-summary {
  font-family: var(--font-prose);
  font-size: 17px;
  line-height: 1.7;
  font-style: normal;
  color: var(--fg);
  margin: 0 0 16px;
}

.critical-analysis-open .referee-summary b,
.critical-analysis-open .rebuttal-summary b {
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.02em;
}

/* ---- desk editor letter (free-text body) -------------------- */

.critical-analysis-open .desk-letter {
  margin: 0;
}

.critical-analysis-open .desk-letter>summary {
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 4px 0 12px;
  list-style: none;
}

.critical-analysis-open .desk-letter>summary:hover {
  color: var(--fg-2);
}

.critical-analysis-open .desk-letter-body {
  font-family: var(--font-prose);
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--fg);
  margin: 0;
  white-space: normal;
}

.critical-analysis-open .desk-letter-body p {
  margin: 0 0 18px;
}

.critical-analysis-open .desk-letter-body p:last-child {
  margin-bottom: 0;
}

/* ---- referee / rebuttal / circ inner <details open> -------- */

.critical-analysis-open .referee-block,
.critical-analysis-open .rebuttal-block,
.critical-analysis-open .circ-block,
.critical-analysis-open .ledger-block {
  margin: 22px 0 0;
}

.critical-analysis-open .referee-block>summary,
.critical-analysis-open .rebuttal-block>summary,
.critical-analysis-open .circ-block>summary,
.critical-analysis-open .ledger-block>summary {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 6px 0;
  border: none;
  margin: 0 0 10px;
}

/* Lists: serif body + breathing room. */
.critical-analysis-open .referee-list,
.critical-analysis-open .rebuttal-list,
.critical-analysis-open .circ-list,
.critical-analysis-open .ledger-list {
  list-style: decimal;
  padding-left: 1.3em;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.critical-analysis-open .ledger-list {
  list-style: disc;
}

.critical-analysis-open .referee-list li,
.critical-analysis-open .rebuttal-list li,
.critical-analysis-open .circ-list li,
.critical-analysis-open .ledger-list li {
  font-family: var(--font-prose);
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
}

.critical-analysis-open .referee-list li::marker,
.critical-analysis-open .rebuttal-list li::marker,
.critical-analysis-open .circ-list li::marker {
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

/* ---- chips inline within the list --------------------------- */

.critical-analysis-open .ref-loc,
.critical-analysis-open .circ-loc {
  display: inline-block;
  margin: 0 6px 0 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  vertical-align: 0.06em;
}

.critical-analysis-open .circ-kind {
  display: inline-block;
  margin: 0 8px 0 0;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--critique) 18%, transparent);
  color: var(--critique);
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---- block quotes: NYT pull-quote treatment ----------------- */

.critical-analysis-open .circ-quote {
  margin: 14px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent, var(--link));
  border-radius: 0;
  background: transparent;
  font-family: var(--font-prose);
  font-size: 17px;
  line-height: 1.6;
  font-style: italic;
  color: var(--fg);
}

.critical-analysis-open .circ-why {
  margin: 8px 0 0;
  font-family: var(--font-prose);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--fg-2);
}

/* ---- rebuttal point/response pair -------------------------- */

.critical-analysis-open .reb-comment,
.critical-analysis-open .reb-response {
  margin: 0 0 8px;
  font-family: var(--font-prose);
  font-size: 17px;
  line-height: 1.65;
}

.critical-analysis-open .reb-comment {
  color: var(--fg-2);
}

.critical-analysis-open .reb-response {
  color: var(--fg);
}

.critical-analysis-open .reb-comment b,
.critical-analysis-open .reb-response b {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-right: 4px;
}

.critical-analysis-open .reb-revision {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: 0.06em;
}

.critical-analysis-open .rebuttal-standing {
  margin: 24px 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--reject, #ef4444);
  background: color-mix(in srgb, var(--reject, #ef4444) 6%, transparent);
  border-radius: 0;
}

.critical-analysis-open .rebuttal-standing strong {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.critical-analysis-open .rebuttal-standing ul {
  margin: 8px 0 0 22px;
  padding: 0;
  font-family: var(--font-prose);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- axiom ledger ------------------------------------------ */

.critical-analysis-open .axiom-kind {
  display: inline-block;
  margin: 0 8px 0 0;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.critical-analysis-open .entity-evidence {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.critical-analysis-open .entity-evidence.has-evidence {
  background: color-mix(in srgb, var(--accept) 14%, transparent);
  color: var(--accept);
}

.critical-analysis-open .entity-evidence.no-evidence {
  background: color-mix(in srgb, var(--reject) 12%, transparent);
  color: var(--reject);
}

/* ---- footer meta inside critical-analysis ------------------ */

.critical-analysis-open .verdict-meta {
  margin: 36px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
}

/* ============================================================
   PROSE VOICE — propagate the critical-analysis serif treatment
   to every reading surface (paper page, cards, archive,
   comments). Mono stays the chrome voice (nav, brand, dates,
   chips, kickers, code). Same `--font-prose` stack defined in
   :root, so designers can tune one variable for the whole site.
   Appended last so the cascade lands these on top of the older
   mono rules; ordering matters.
   ============================================================ */

/* ---- paper page header ----------------------------------- */

.paper-title {
  font-family: var(--font-prose);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 14px 0 6px;
  color: var(--fg);
}

@media (max-width: 720px) {
  .paper-title {
    font-size: 28px;
    line-height: 1.22;
  }
}

.authors-line,
.paper>p.authors-line {
  font-family: var(--font-prose);
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: var(--fg-2);
  margin: 0 0 14px;
  letter-spacing: 0;
}

/* The "paper lead" plain-English subhead just above the actions row.
   Treat as a dek when present. */
.paper-lead {
  font-family: var(--font-prose);
  font-weight: 400;
  font-style: italic;
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--fg-2);
  margin: 0 0 16px;
}

/* ---- pith section ---------------------------------------- */

.pith-lead .pith-headline {
  font-family: var(--font-prose);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 0 0 22px;
  color: var(--fg);
}

@media (max-width: 720px) {
  .pith-lead .pith-headline {
    font-size: 22px;
  }
}

.pith-lead .pith-prose,
.pith-lead .pith-prose p {
  font-family: var(--font-prose);
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--fg);
}

.pith-lead .pith-prose p {
  margin: 0 0 16px;
}

.pith-lead .pith-prose p:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {

  .pith-lead .pith-prose,
  .pith-lead .pith-prose p {
    font-size: 16.5px;
    line-height: 1.65;
  }
}

.pith-lead .pith-implications {
  margin: 6px 0 0;
  padding-left: 1.3em;
  font-family: var(--font-prose);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--fg);
}

.pith-lead .pith-implications li {
  margin: 0 0 10px;
}

.pith-lead .pith-implications li::marker {
  color: var(--fg-3);
}

/* The pith-band still uses a kicker label on the rotated rail —
   keep mono for the rail, but the body inside switches to serif. */
.pith-lead .section-band p,
.pith-lead .section-band>.prose p {
  font-family: var(--font-prose);
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--fg);
}

.pith-lead .section-band h4 {
  /* keep this kicker mono, just refine the size/letter-spacing
     so it reads as a NYT-style "Section: " label, not a heading. */
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 700;
  margin: 0 0 8px;
}

/* ---- abstract -------------------------------------------- */

.abstract p,
.abstract-inline p {
  font-family: var(--font-prose);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--fg-2);
  margin: 10px 0 0;
}

.abstract-inline>summary {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ---- cards (home + category feed) ------------------------ */

.card-headline {
  font-family: var(--font-prose);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.008em;
  margin: 8px 0 4px;
}

.card-headline a {
  color: var(--fg);
  border-bottom: 0;
}

.card-original-title,
.card-original-title a {
  font-family: var(--font-prose);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--fg-3);
  margin: 0 0 4px;
}

.card-subtitle {
  font-family: var(--font-prose);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg-2);
  margin: 6px 0 8px;
}

.card-lead {
  font-family: var(--font-prose);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--fg-2);
  margin: 6px 0 8px;
}

.card-summary {
  font-family: var(--font-prose);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-2);
  margin: 4px 0 6px;
}

/* ---- archive (sitemap-style list) ------------------------ */

.arch-title {
  font-family: var(--font-prose);
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--fg);
}

.arch-orig {
  font-family: var(--font-prose);
  font-size: 13.5px;
  line-height: 1.4;
  font-style: italic;
  color: var(--fg-3);
  margin: 4px 0 0;
}

/* ---- hero (home + paper) --------------------------------- */

/* The hero brand "Pith." stays mono — it's the wordmark.
   The tagline next to it switches to serif italic so the page
   opens with the same prose voice the body now carries. */
.hero .tagline {
  font-family: var(--font-prose);
  font-style: italic;
  font-size: 19px;
  line-height: 1.45;
  color: var(--fg-2);
}

@media (max-width: 720px) {
  .hero .tagline {
    font-size: 17px;
  }
}

/* ---- comments (paper page) ------------------------------- */

.comment-body {
  font-family: var(--font-prose);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  white-space: pre-wrap;
}

/* ---- generic prose helper -------------------------------- */

/* Use `.prose` on any free-form block of editorial copy that
   should pick up the body voice. The .prose class already
   exists elsewhere; here we promote it to serif to match. */
.prose,
.prose p {
  font-family: var(--font-prose);
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
}

.prose p {
  margin: 0 0 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Keep `.prose` inside chrome surfaces (cards, sidebars, etc.)
   from blowing up by capping at the parent's width. The serif
   reading column still feels right at 60-75ch wide. */
.prose {
  max-width: 72ch;
}

/* When .prose appears inside the dense pith section bands,
   inherit the section-band rhythm (no max-width override). */
.section-band .prose {
  max-width: none;
}

/* ============================================================
   ARTICLE SYSTEM — normalize the remaining old paper-page
   surfaces exposed by media-heavy papers like 2605.00028.
   The old look was card/chrome driven: boxed artifact, dense video
   strip, figure cards, and hard chip blocks. This layer makes those
   read like parts of the same long-form article.
   ============================================================ */

.paper {
  max-width: 780px;
  margin-inline: auto;
}

.paperhead {
  margin-bottom: 8px;
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ---- classification / keywords ---------------------------- */

.paper-positioning {
  display: grid;
  gap: 8px;
  margin: 18px 0 22px;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.positioning-group {
  gap: 7px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.5;
}

.positioning-group b,
.positioning-label {
  color: var(--fg-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.positioning-chip {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
  color: var(--fg-2);
}

.positioning-chip.soft {
  color: var(--fg-3);
  background: transparent;
}

.positioning-chip.standard {
  background: color-mix(in srgb, var(--link) 9%, transparent);
  border-color: color-mix(in srgb, var(--link) 30%, var(--line));
  color: var(--link);
}

/* ---- artifact block (source, PDF, podcast) ---------------- */

.paper-artifact {
  display: grid;
  grid-template-columns: minmax(160px, 210px) 1fr;
  gap: 22px;
  align-items: center;
  margin: 24px 0 26px;
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.cover-link {
  border-radius: 6px;
  background: var(--panel-2);
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(0, 0, 0, 0.20);
}

.cover-link:hover {
  box-shadow: 0 0 0 1px var(--fg-3), 0 14px 36px rgba(0, 0, 0, 0.28);
}

.artifact-actions {
  gap: 8px;
  justify-content: center;
}

.artifact-btn {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
}

.artifact-btn:hover {
  background: transparent;
  border-color: var(--fg-3);
}

.artifact-btn.primary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}

.artifact-btn.primary:hover {
  background: transparent;
  color: var(--fg);
  opacity: 1;
  border-color: var(--fg-3);
}

.artifact-icon {
  color: var(--fg-3);
}

.artifact-label {
  font-family: var(--font-prose);
  letter-spacing: 0;
}

.artifact-label b {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.artifact-label em,
.artifact-btn.primary .artifact-label em {
  font-family: var(--font-prose);
  font-size: 15px;
  line-height: 1.35;
  font-style: italic;
  color: var(--fg-2);
}

@media (max-width: 700px) {
  .paper-artifact {
    grid-template-columns: 1fr;
    padding: 18px 0;
  }

  .cover-link {
    max-width: 240px;
  }
}

/* ---- video attachment ------------------------------------- */

.paper-video {
  margin: 28px 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.paper-video video {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.video-caption {
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  font-family: var(--font-prose);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--fg-2);
}

.video-caption .extra-kind {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ---- pith blocks: make the opening read like the critical section ---- */

.pith-lead {
  max-width: 760px;
  margin: 36px auto 34px;
  padding: 0;
}

.pith-lead .pith-block {
  margin: 34px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}

.pith-lead .pith-block:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.pith-lead .pith-h {
  margin: 0 0 12px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.pith-lead .pith-inferences {
  border-left: 0;
  padding-left: 0;
}

.pith-lead .pith-meta {
  margin: 0 0 12px;
  font-family: var(--font-prose);
  font-size: 16px;
  line-height: 1.55;
  font-style: italic;
  color: var(--fg-2);
}

.pith-lead .pith-load-bearing {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 34px;
}

/* ---- figures: article figures, not app cards -------------- */

.paper-figures {
  max-width: 960px;
  margin: 44px auto 34px;
  padding: 34px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.paper-figures .figures-head h4 {
  margin: 0 0 8px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.paper-figures .figures-attribution {
  max-width: 72ch;
  margin: 0 0 22px;
  font-family: var(--font-prose);
  font-size: 15.5px;
  line-height: 1.55;
  font-style: italic;
  color: var(--fg-2);
}

.figures-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}

.paper-figure,
.paper-figure:first-child {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.paper-figure a {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.paper-figure img,
.paper-figure:first-child img {
  display: block;
  width: 100%;
  max-height: min(760px, 82vh);
  object-fit: contain;
  background: #fff;
}

.paper-figure figcaption {
  max-width: 760px;
  padding: 12px 0 0;
  font-family: var(--font-prose);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-2);
}

.paper-figure .fig-num {
  margin-right: 4px;
  color: var(--fg);
  font-weight: 700;
}

.paper-figure .fig-caption {
  color: var(--fg-2);
}

.paper-figure .fig-source {
  display: inline-block;
  margin-left: 6px;
  margin-top: 0;
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.paper-figure .fig-source:hover {
  color: var(--link);
}

/* ---- final paper-page editorial unification -----------------
   This must stay after the article-system block above. That block
   intentionally reset .pith-lead for an earlier design pass; the
   current paper page wants the pith card to match critical analysis. */

.pith-lead {
  max-width: 760px;
  margin: 36px auto 34px;
  padding: 36px 44px 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.pith-lead .pith-head {
  margin: 0 0 32px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.pith-lead .pith-kicker {
  margin: 0 0 8px;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.pith-lead .pith-title {
  margin: 0 0 12px;
  font-family: var(--font-prose);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--fg);
}

.pith-lead .pith-dek {
  margin: 0;
  font-family: var(--font-prose);
  font-size: 16px;
  line-height: 1.6;
  font-style: italic;
  color: var(--fg-2);
}

@media (max-width: 720px) {
  .pith-lead {
    padding: 24px 20px 28px;
    margin: 24px 0;
    max-width: 100%;
  }

  .pith-lead .pith-title {
    font-size: 24px;
  }
}

/* ---- final responsive paper width ---------------------------
   Keep this as the last paper-page width block. Earlier article-system
   sections still define legacy 760-780px caps. */

.paper {
  width: min(100%, clamp(760px, 68vw, 960px));
  max-width: none;
  margin-inline: auto;
}

.pith-lead,
.critical-analysis-open {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.paper-figures {
  width: min(100%, clamp(760px, 72vw, 1040px));
  max-width: none;
}

.paper-figure figcaption {
  max-width: none;
}

@media (max-width: 860px) {

  .paper,
  .paper-figures {
    width: 100%;
  }
}


.taxonomy-wrap {
  width: min(100%, clamp(760px, 78vw, 1160px));
  margin: 24px auto 56px;
}

.taxonomy-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--panel);
  color: var(--muted);
  line-height: 1.55;
}

.taxonomy-note a,
.taxonomy-code {
  color: var(--ink);
  text-decoration: none;
}

.taxonomy-group {
  margin-top: 34px;
}

.taxonomy-group h2 {
  margin: 0 0 14px;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: -0.03em;
}

.taxonomy-archives {
  display: grid;
  gap: 14px;
}

.taxonomy-archive {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 18px;
}

.taxonomy-archive-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.taxonomy-code {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.98rem;
  padding: 4px 8px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}

.taxonomy-label {
  margin-left: 8px;
  font-weight: 700;
}

.taxonomy-counts,
.taxonomy-child-counts,
.taxonomy-alias {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.taxonomy-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 78ch;
}

.taxonomy-children {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.taxonomy-child {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: color-mix(in srgb, var(--panel-2, var(--panel)) 72%, transparent);
  color: var(--ink);
  text-decoration: none;
}

.taxonomy-child:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.taxonomy-child-code {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.84rem;
}

.taxonomy-child-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

@media (max-width: 720px) {
  .taxonomy-wrap {
    width: 100%;
  }

  .taxonomy-archive-head {
    display: block;
  }

  .taxonomy-counts {
    display: block;
    margin-top: 8px;
  }

  .taxonomy-children {
    grid-template-columns: 1fr;
  }

  .taxonomy-child {
    grid-template-columns: 1fr auto;
  }

  .taxonomy-child-label {
    grid-column: 1 / -1;
    white-space: normal;
  }
}


.category-taxonomy-desc {
  max-width: 76ch;
  margin: 10px auto 0;
  color: var(--muted);
  line-height: 1.55;
}

.sub-count {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.75em;
}


.taxonomy-nav {
  align-items: center;
  gap: 6px 7px;
}

.primary-nav .nav-group {
  border-color: color-mix(in srgb, var(--line) 78%, var(--link));
}

.primary-nav .canon-link {
  border-color: color-mix(in srgb, var(--accept) 35%, var(--line));
}
















.physics-archive-name {
  color: var(--fg);
  font-weight: 800;
  border-bottom: 0;
}

.physics-archive-code,
.physics-archive-count {
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.physics-archive-code {
  display: block;
  margin-top: 2px;
}

.physics-archive-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.physics-archive-actions a {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-2);
  background: var(--panel);
}

.physics-archive-children {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.physics-archive-children a {
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 999px;
  color: var(--fg-2);
  background: color-mix(in srgb, var(--bg) 35%, transparent);
  font-size: 12px;
}

.physics-archive-children a:hover,
.physics-archive-actions a:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}





.taxonomy-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.taxonomy-sublist>li {
  padding: 0;
}

.taxonomy-sub-archive {
  display: inline-block;
  color: var(--fg);
  font-weight: 700;
  font-size: 13px;
  border-bottom: 0;
}

.taxonomy-sub-archive:hover {
  color: var(--link-hover);
}

.taxonomy-sublist-children {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 0 0 12px;
  border-left: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.taxonomy-sublist-children a {
  color: var(--fg-2);
  font-size: 12px;
  border-bottom: 0;
}

.taxonomy-sublist-children a:hover {
  color: var(--fg);
}

/* canon: compact domain tail (auto-discovered from public mirror) */
.canon-domains-tail {
  margin-top: 2.4rem;
}

.canon-domains-tail .section-h {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--meta-fg, #6b6b6b);
  text-transform: lowercase;
}

.canon-domains-tail .section-sub {
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.86rem;
  max-width: 60ch;
}

.domain-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 6px;
  margin-top: 0.9rem;
}

.domain-card-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--rule, #e7e2d8);
  border-radius: 4px;
  background: var(--surface, #fafaf7);
  text-decoration: none;
  color: inherit;
  transition: border-color 100ms ease, background 100ms ease;
}

.domain-card-compact:hover {
  border-color: var(--accent, #b06a3a);
  background: var(--surface-hi, #fff);
}

.domain-card-compact .domain-label {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.domain-card-compact .domain-meta-compact {
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
  font-variant-numeric: tabular-nums;
}


/* ===========================================================
   Canon tools strip (in the hero) + Ask + Peer Review pages
   Added: 2026-05-07
   =========================================================== */

.canon-tools-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.canon-tool {
  display: block;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 16px 18px;
  background: var(--surface, #fafaf7);
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, transform 100ms ease;
}

.canon-tool:hover {
  border-color: var(--accent, #b06a3a);
  transform: translateY(-1px);
}

.canon-tool .tool-tag {
  display: inline-block;
  font-size: 0.70rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #b06a3a);
  background: rgba(176, 106, 58, 0.08);
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.canon-tool h3 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.canon-tool p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--body-fg, #444);
  line-height: 1.45;
}

/* Tool page wrapper */
.canon-tool-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 0 60px 0;
}

.canon-tool-page .crumbs {
  font-size: 0.82rem;
  color: var(--meta-fg, #6b6b6b);
  margin-bottom: 10px;
}

.canon-tool-page .crumbs a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.canon-tool-page h1 {
  margin: 0 0 6px 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.canon-tool-page .lede {
  margin: 0 0 22px 0;
  font-size: 0.98rem;
  color: var(--body-fg, #444);
  line-height: 1.55;
}

/* Ask form */
.canon-ask-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface, #fafaf7);
  margin-bottom: 22px;
}

.canon-ask-form .ask-label,
.canon-pr-form .ask-label {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--meta-fg, #6b6b6b);
}

.canon-ask-form textarea,
.canon-pr-form input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong, #cfccc4);
  border-radius: 6px;
  background: #fff;
  resize: vertical;
}

.canon-pr-form input[type="text"] {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
}

.canon-ask-form .ask-controls,
.canon-pr-form .ask-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.canon-ask-form button.primary,
.canon-pr-form button.primary {
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--accent, #b06a3a);
  background: var(--accent, #b06a3a);
  color: #fff;
  cursor: pointer;
}

.canon-ask-form button.primary:hover,
.canon-pr-form button.primary:hover {
  background: var(--accent-hi, #985a30);
}

/* Ask result */
.canon-ask-result {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 18px 20px;
  background: #fff;
}

.ask-result-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ask-conf,
.ask-status,
.ask-cached {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule, #d6d4ce);
}

.ask-conf-high {
  color: #1c6f3c;
  border-color: #c4e2cf;
  background: #ebf6ee;
}

.ask-conf-moderate {
  color: #82530a;
  border-color: #ecdfb8;
  background: #faf3e1;
}

.ask-conf-low {
  color: #7d2727;
  border-color: #e6c8c4;
  background: #f7e8e6;
}

.ask-status-yes {
  color: #1c6f3c;
}

.ask-status-no {
  color: #7d2727;
}

.ask-cached {
  color: var(--meta-fg, #6b6b6b);
}

.ask-derivation {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--body-fg, #2c2c2c);
}

.ask-derivation h2 {
  font-size: 1.05rem;
  margin-top: 18px;
}

.ask-derivation h3 {
  font-size: 0.98rem;
  margin-top: 14px;
}

.ask-derivation pre {
  background: var(--surface, #fafaf7);
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 0.86rem;
}

.ask-derivation code {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  font-size: 0.88em;
  background: var(--surface, #fafaf7);
  padding: 1px 5px;
  border-radius: 3px;
}

.ask-derivation a {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ask-citations,
.ask-gaps,
.ask-context {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--rule, #d6d4ce);
}

.ask-citation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ask-citation-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed var(--rule, #d6d4ce);
}

.ask-citation-list li:last-child {
  border-bottom: 0;
}

.ask-citation-list a {
  white-space: nowrap;
}

.ask-why {
  font-size: 0.86rem;
  color: var(--meta-fg, #6b6b6b);
}

.ask-gap-list,
.ask-module-list {
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--meta-fg, #6b6b6b);
}

.ask-error {
  color: #7d2727;
}

/* Peer Review form + recents */
.canon-pr-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface, #fafaf7);
  margin-bottom: 22px;
}

.canon-pr-recent {
  margin-bottom: 30px;
}

.pr-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pr-recent-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--rule, #d6d4ce);
  font-size: 0.88rem;
}

.pr-recent-list a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  color: inherit;
  text-decoration: none;
}

.pr-recent-list a:hover .pr-title {
  text-decoration: underline;
}

.pr-status {
  font-size: 0.70rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--rule, #d6d4ce);
}

.pr-status-done {
  color: #1c6f3c;
  background: #ebf6ee;
  border-color: #c4e2cf;
}

.pr-status-running {
  color: #82530a;
  background: #faf3e1;
  border-color: #ecdfb8;
}

.pr-status-queued {
  color: var(--meta-fg, #6b6b6b);
}

.pr-status-failed {
  color: #7d2727;
  background: #f7e8e6;
  border-color: #e6c8c4;
}

.pr-arxiv {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  font-size: 0.84rem;
}

.pr-title {
  font-weight: 500;
}

/* Peer Review ticket page */
.pr-paper-line {
  margin-bottom: 22px;
  line-height: 1.6;
}

.pr-paper-title {
  font-weight: 600;
  margin: 0 8px;
}

.pr-arxiv-link {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pr-status-card {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface, #fafaf7);
  margin-bottom: 24px;
}

.pr-status-card-running {
  background: #faf3e1;
  border-color: #ecdfb8;
}

.pr-status-card-failed {
  background: #f7e8e6;
  border-color: #e6c8c4;
}

.pr-status-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pr-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent, #b06a3a);
  animation: prpulse 1.4s ease-in-out infinite;
}

.pr-status-card-failed .pr-status-dot,
.pr-status-card-done .pr-status-dot {
  animation: none;
  background: #999;
}

@keyframes prpulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

.pr-status-label {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

.pr-status-detail {
  color: var(--body-fg, #444);
  font-size: 0.9rem;
}

.pr-final {
  border-top: 1px solid var(--rule, #d6d4ce);
  padding-top: 18px;
}

.pr-final-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.pr-rec,
.pr-conf,
.pr-canon {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule, #d6d4ce);
}

.pr-rec-accept {
  color: #1c6f3c;
  background: #ebf6ee;
  border-color: #c4e2cf;
}

.pr-rec-minor_revision {
  color: #1c6f3c;
}

.pr-rec-major_revision {
  color: #82530a;
  background: #faf3e1;
  border-color: #ecdfb8;
}

.pr-rec-reject {
  color: #7d2727;
  background: #f7e8e6;
  border-color: #e6c8c4;
}

.pr-rec-uncertain {
  color: var(--meta-fg, #6b6b6b);
}

.pr-conf-high {
  color: #1c6f3c;
}

.pr-conf-moderate {
  color: #82530a;
}

.pr-conf-low {
  color: #7d2727;
}

.pr-canon-strong {
  color: #1c6f3c;
  background: #ebf6ee;
  border-color: #c4e2cf;
}

.pr-canon-partial {
  color: #82530a;
  background: #faf3e1;
  border-color: #ecdfb8;
}

.pr-canon-tangential {
  color: var(--meta-fg, #6b6b6b);
}

.pr-canon-none {
  color: var(--meta-fg, #6b6b6b);
  background: var(--surface, #fafaf7);
}

.pr-block {
  margin: 22px 0;
}

.pr-block .section-h {
  margin-bottom: 8px;
}

.pr-citations {
  list-style: none;
  padding: 0;
}

.pr-citations li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--rule, #d6d4ce);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
}

.pr-rel {
  font-size: 0.70rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--rule, #d6d4ce);
}

.pr-rel-supports {
  color: #1c6f3c;
  background: #ebf6ee;
  border-color: #c4e2cf;
}

.pr-rel-contradicts {
  color: #7d2727;
  background: #f7e8e6;
  border-color: #e6c8c4;
}

.pr-rel-extends {
  color: #82530a;
  background: #faf3e1;
  border-color: #ecdfb8;
}

.pr-rel-tangential {
  color: var(--meta-fg, #6b6b6b);
}

.pr-cite-note {
  font-size: 0.86rem;
  color: var(--meta-fg, #6b6b6b);
}

.pr-strengths {
  padding-left: 20px;
}

.pr-major {
  padding-left: 22px;
}

.pr-major li {
  margin-bottom: 14px;
}

.pr-evidence {
  list-style: none;
  padding-left: 18px;
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--meta-fg, #6b6b6b);
}

.pr-minor li {
  margin-bottom: 6px;
}

.pr-disagreements {
  list-style: none;
  padding: 0;
}

.pr-disagreements li {
  border: 1px dashed var(--rule, #d6d4ce);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--surface, #fafaf7);
}

.pr-dis-point {
  margin: 0 0 6px 0;
}

.pr-dis-call {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--rule, #d6d4ce);
}

.pr-modules {
  font-size: 0.86rem;
}

.pr-modules-list {
  list-style: none;
  padding-left: 0;
  column-count: 2;
  column-gap: 22px;
}

.pr-raw {
  margin-top: 26px;
}

.pr-raw summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--meta-fg, #6b6b6b);
}

.pr-raw-block pre {
  background: var(--surface, #fafaf7);
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.78rem;
  max-height: 420px;
  overflow: auto;
}

.canon-pr-howto .howto {
  padding-left: 22px;
}

.canon-pr-howto .howto li {
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--body-fg, #444);
}

/* Canon hero: distinction formula and auxiliary charter line. */
.canon-formula {
  font-family: "Latin Modern Roman", "STIX Two Math", "Cambria Math", Georgia, serif;
  font-size: 1.04em;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.canon-formula var {
  font-style: italic;
  font-family: inherit;
}

.charter.charter-aux {
  margin-top: -6px;
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.95em;
}


/* === peer-review v2 dropzone === */
.canon-pr-form {
  gap: 0;
  padding: 18px 18px 16px;
}

.pr-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--rule, #d6d4ce);
}

.pr-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 14px 9px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--meta-fg, #6b6b6b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.01em;
  margin-bottom: -1px;
  transition: color .12s ease, border-color .12s ease;
}

.pr-tab:hover {
  color: var(--body-fg, #222);
}

.pr-tab.is-active {
  color: var(--accent, #b06a3a);
  border-bottom-color: var(--accent, #b06a3a);
  font-weight: 600;
}

.pr-tab-ico {
  font-size: 0.95rem;
  opacity: 0.8;
}

.pr-panels {
  position: relative;
}

.pr-panel {
  display: block;
}

.pr-panel[hidden] {
  display: none;
}

/* Visually hidden but focusable file input. */
.pr-file-input {
  position: absolute;
  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;
  pointer-events: none;
  opacity: 0;
}

.pr-dropzone {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  gap: 10px;
  padding: 28px 20px 22px;
  border: 2px dashed var(--rule, #cfcdc6);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(176, 106, 58, 0.04));
  cursor: pointer;
  text-align: center;
  color: var(--body-fg, #222);
  transition: border-color .15s ease, background .15s ease, transform .08s ease;
}

.pr-dropzone:hover {
  border-color: var(--accent, #b06a3a);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(176, 106, 58, 0.08));
}

.pr-dropzone:focus-within {
  outline: 2px solid var(--accent, #b06a3a);
  outline-offset: 2px;
}

.pr-dropzone.is-dragover {
  border-color: var(--accent, #b06a3a);
  background: rgba(176, 106, 58, 0.12);
  transform: scale(1.005);
}

.pr-dropzone.has-file {
  border-style: solid;
  border-color: #1c6f3c;
  background: #f1f9f3;
}

.pr-drop-icon {
  width: 44px;
  height: 44px;
  color: var(--accent, #b06a3a);
  opacity: 0.85;
}

.pr-dropzone.has-file .pr-drop-icon {
  color: #1c6f3c;
}

.pr-drop-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 1.02rem;
}

.pr-drop-headline {
  font-weight: 600;
}

.pr-drop-or {
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.92rem;
}

.pr-drop-link {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pr-drop-hint {
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
  letter-spacing: 0.01em;
}

.pr-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #c4e2cf;
  background: #ebf6ee;
  border-radius: 8px;
}

.pr-file-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.pr-file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.pr-file-name {
  font-weight: 600;
  color: var(--body-fg, #222);
  word-break: break-all;
  font-size: 0.92rem;
}

.pr-file-size {
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
}

.pr-file-remove {
  appearance: none;
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--meta-fg, #6b6b6b);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.pr-file-remove:hover {
  color: #7d2727;
  background: rgba(125, 39, 39, 0.08);
}

.pr-validation {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f7e8e6;
  border: 1px solid #e6c8c4;
  color: #7d2727;
  font-size: 0.88rem;
}

.pr-submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.canon-pr-form button.primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.pr-progress {
  margin-top: 12px;
}

.pr-progress-label {
  font-size: 0.82rem;
  color: var(--meta-fg, #6b6b6b);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.pr-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.pr-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent, #b06a3a), #d68a5a);
  transition: width .15s ease-out;
}

@media (max-width: 600px) {
  .pr-dropzone {
    padding: 22px 14px 18px;
  }

  .pr-drop-headline {
    font-size: 0.96rem;
  }

  .pr-tab {
    padding: 8px 10px;
    font-size: 0.86rem;
  }
}


/* === lean-theorems v2 polish === */
.lean-theorems-lede {
  margin: 4px 0 12px;
  font-size: 0.9rem;
}

.lean-cite-unresolved {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--meta-fg, #6b6b6b);
  opacity: 0.75;
}

.lean-cite-unresolved code {
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 5px;
  border-radius: 3px;
}

.lean-passage {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--body-fg, #444);
}

.lean-rel {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(91, 109, 245, 0.10);
  color: #4a5cd9;
}


/* === profile page === */
.profile-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 18px 40px;
}

.profile-identity {
  margin: 22px 0 28px;
}

.profile-identity-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px 18px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--surface, #fafaf7);
}

.profile-identity-row {
  display: contents;
}

.profile-identity-key {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--meta-fg, #6b6b6b);
  align-self: center;
}

.profile-identity-val {
  font-size: 0.95rem;
  color: var(--body-fg, #222);
  align-self: center;
  word-break: break-word;
}

.profile-ok {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1c6f3c;
  background: #ebf6ee;
  border: 1px solid #c4e2cf;
  border-radius: 999px;
}

.profile-pending {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #82530a;
  background: #faf3e1;
  border: 1px solid #ecdfb8;
  border-radius: 999px;
}

.profile-actions {
  margin-top: 10px;
}

.profile-reviews {
  margin: 22px 0;
}

.pr-error {
  color: #7d2727;
  font-size: 0.82rem;
}


/* === peer-review auth gate === */
.canon-pr-gate {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--surface, #fafaf7);
  margin: 18px 0 26px;
}

.pr-gate-checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.pr-gate-checklist li {
  padding: 8px 10px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.45);
}

.pr-gate-ok {
  color: #1c6f3c;
}

.pr-gate-todo {
  color: #82530a;
}

/* === profile activity === */
.profile-activity {
  margin: 22px 0;
}

.profile-activity-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 10px;
}

.profile-activity-list li {
  border-bottom: 1px dashed var(--rule, #d6d4ce);
  padding: 8px 0 10px;
}

.profile-activity-list p {
  margin: 5px 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--body-fg, #444);
}


/* === first-party stats === */
.stats-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 18px 42px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin: 20px 0 26px;
}

.stat-card {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface, #fafaf7);
}

.stat-num {
  display: block;
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin: 24px 0;
}

.stats-wide {
  margin: 28px 0 0;
}

.stats-list {
  margin: 10px 0 0;
  padding-left: 22px;
}

.stats-list li {
  margin: 0 0 12px;
}

.stats-list a {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.stats-list a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stats-list .meta {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
}

.stats-list-compact li {
  margin-bottom: 7px;
}

@media (max-width: 780px) {
  .stats-columns {
    grid-template-columns: 1fr;
  }
}


/* Views chip on cards */
.card-action.act-views {
  cursor: default;
}

.card-action.act-views:hover {
  color: var(--fg-3);
  background: transparent;
}

.card-action.act-views.zero .act-count {
  color: var(--fg-3);
  font-weight: 500;
}

/* ===========================================================
   Recognition page (formerly Canon)
   Added: 2026-05-08
   =========================================================== */

/* Hero / console */
.recognition-hero {
  margin: 18px 0 36px;
  padding: 28px 28px 32px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 12px;
  background: var(--surface, #fafaf7);
  position: relative;
}

.recognition-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.recognition-hero-title h1 {
  font-size: 2.45rem;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  text-transform: lowercase;
}

.recognition-tag {
  margin: 0;
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.95rem;
}

.recognition-stat-bar {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.recognition-stat-bar li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.recognition-stat-bar .stat-num {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.recognition-stat-bar .stat-lbl {
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}

.recognition-charter {
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 78ch;
  margin: 0 0 22px;
}

.recognition-formula {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  white-space: nowrap;
}

.recognition-formula var {
  font-style: italic;
}

/* Ask box on the hero */
.recognition-ask {
  display: flex;
  gap: 0;
  margin-top: 6px;
  margin-bottom: 14px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.recognition-ask input[type="text"] {
  flex: 1;
  border: 0;
  padding: 14px 18px;
  font-size: 1.02rem;
  font-family: inherit;
  background: transparent;
  outline: none;
  color: inherit;
}

.recognition-ask input[type="text"]::placeholder {
  color: var(--meta-fg, #8c8c87);
}

.recognition-ask button {
  border: 0;
  border-left: 1px solid var(--rule, #d6d4ce);
  background: var(--accent, #b06a3a);
  color: #fff;
  padding: 0 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  cursor: pointer;
}

.recognition-ask button:hover {
  filter: brightness(1.05);
}

/* Prompt chips */
.recognition-prompt-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recognition-prompt-chips li a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--meta-fg, #6b6b6b);
  background: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.12s, border-color 0.12s;
}

.recognition-prompt-chips li a:hover {
  color: var(--accent, #b06a3a);
  border-color: var(--accent, #b06a3a);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Proof Path rail */
.recognition-proofpath {
  margin: 32px 0;
}

.proofpath-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  gap: 8px;
  counter-reset: proofstep;
  position: relative;
}

.proofpath-node {
  position: relative;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  background: var(--surface, #fafaf7);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proofpath-step {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.proofpath-node a {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}

.proofpath-node a:hover {
  color: var(--accent, #b06a3a);
}

.proofpath-meta {
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.84rem;
}

/* Tools strip */
.recognition-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 28px 0 36px;
}

.recognition-tool {
  display: block;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 16px 18px;
  background: var(--surface, #fafaf7);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s, transform 0.12s;
}

.recognition-tool:hover {
  border-color: var(--accent, #b06a3a);
  transform: translateY(-1px);
}

.recognition-tool h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}

.recognition-tool p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--meta-fg, #555);
  line-height: 1.45;
}

.recognition-tool.small {
  padding: 12px 14px;
}

.recognition-tool.small h3 {
  font-size: 0.98rem;
}

.recognition-tool.small p {
  font-size: 0.86rem;
}

/* Search results inline */
.recognition-results {
  margin: 26px 0;
}

.recognition-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recognition-search-results li {
  padding: 8px 0;
  border-bottom: 1px solid var(--rule, #d6d4ce);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.recognition-search-results li:last-child {
  border-bottom: 0;
}

.recognition-search-results a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.recognition-search-results a:hover code {
  text-decoration: underline;
}

/* Claim cards */
.recognition-claims {
  margin: 36px 0;
}

.claim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.claim-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 14px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 10px;
  background: var(--surface, #fafaf7);
  position: relative;
}

.claim-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.claim-card-head h3 {
  margin: 0;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  flex: 1;
}

.claim-status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule, #d6d4ce);
  background: #fff;
  color: var(--meta-fg, #6b6b6b);
  white-space: nowrap;
}

.claim-status.status-proved {
  color: #1c6f3c;
  border-color: #c4e2cf;
  background: #ebf6ee;
}

.claim-status.status-definition {
  color: #2c4f8a;
  border-color: #c8d4ec;
  background: #eef2fa;
}

.claim-status.status-conditional {
  color: #82530a;
  border-color: #ecdfb8;
  background: #faf3e1;
}

.claim-status.status-hypothesis {
  color: #82530a;
  border-color: #ecdfb8;
  background: #faf3e1;
}

.claim-status.status-open {
  color: #6b6b6b;
}

.claim-status.status-missing {
  color: #7d2727;
  border-color: #e6c8c4;
  background: #f7e8e6;
}

.claim-text {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.5;
}

.claim-gap {
  margin: 0;
  font-size: 0.84rem;
  color: var(--meta-fg, #6b6b6b);
}

.claim-gap strong {
  color: var(--body-fg, #444);
}

.claim-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--rule, #d6d4ce);
  flex-wrap: wrap;
}

.claim-link,
.claim-ask {
  font-size: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.claim-link span {
  color: var(--meta-fg, #6b6b6b);
  margin-right: 4px;
}

.claim-link code {
  color: var(--accent, #b06a3a);
}

.claim-ask {
  color: var(--accent, #b06a3a);
}

.claim-link:hover code,
.claim-ask:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Anchor / domain block headings reuse existing styles, but the
   wrapper sections need the same spacing as before. */
.recognition-anchors,
.recognition-domains,
.recognition-domains-tail,
.recognition-name-search {
  margin: 36px 0;
}

/* Anchor grid: reuse .anchor-card etc. (defined in canon CSS above). */

/* Name search box */
.recognition-search {
  display: flex;
  gap: 0;
  margin-top: 10px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 6px;
  overflow: hidden;
  max-width: 640px;
  background: #fff;
}

.recognition-search input {
  flex: 1;
  border: 0;
  padding: 10px 12px;
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  background: transparent;
  outline: none;
  color: inherit;
}

.recognition-search button {
  border: 0;
  border-left: 1px solid var(--rule, #d6d4ce);
  padding: 0 18px;
  background: var(--surface, #fafaf7);
  cursor: pointer;
  font-family: inherit;
}

.recognition-typeahead {
  margin-top: 6px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 6px;
  background: #fff;
  max-width: 640px;
  overflow: hidden;
}

.recognition-typeahead .th-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule, #d6d4ce);
  text-decoration: none;
  color: inherit;
}

.recognition-typeahead .th-item:last-child {
  border-bottom: 0;
}

.recognition-typeahead .th-item:hover {
  background: var(--surface, #fafaf7);
}

.recognition-foot {
  margin-top: 28px;
  text-align: center;
  font-size: 0.85rem;
}

/* Recognition theorem page */
.recognition-breadcrumb {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.recognition-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.recognition-breadcrumb a:hover {
  text-decoration: underline;
}

.recognition-theorem {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 10px;
  padding: 22px 24px 18px;
  margin-bottom: 18px;
  background: var(--surface, #fafaf7);
}

.theorem-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.theorem-titlewrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.theorem-titlewrap h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.theorem-claim {
  font-size: 1.04rem;
  line-height: 1.55;
  margin: 6px 0 18px;
  max-width: 78ch;
}

.theorem-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
  font-size: 0.86rem;
}

.theorem-meta div {
  margin: 0;
}

.theorem-meta dt {
  color: var(--meta-fg, #6b6b6b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  margin-bottom: 2px;
}

.theorem-meta dd {
  margin: 0;
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
}

.theorem-meta a {
  color: inherit;
}

.theorem-meta a:hover {
  color: var(--accent, #b06a3a);
}

.recognition-theorem-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

/* Compact override for hero on small screens */
@media (max-width: 720px) {
  .recognition-hero {
    padding: 22px 18px;
  }

  .recognition-hero-title h1 {
    font-size: 2rem;
  }

  .recognition-stat-bar {
    gap: 14px;
  }

  .theorem-head {
    flex-direction: column;
  }
}

/* ===========================================================
   Recognition Ask permalink + sitemap (added 2026-05-08 phase 2)
   =========================================================== */
.recognition-asks-link {
  margin: 8px 0 0;
  font-size: 0.86rem;
}

.recognition-asks-link a {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ask-question {
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin: 6px 0 4px;
  line-height: 1.3;
}

.ask-permalink-line {
  margin: 0 0 14px;
  font-size: 0.88rem;
}

.ask-slug {
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
}

.ask-permalink {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  font-size: 0.82rem;
  color: var(--accent, #b06a3a);
}

.recognition-asks-page .recognition-asks-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.recognition-ask-row {
  border-bottom: 1px solid var(--rule, #d6d4ce);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recognition-ask-row:last-child {
  border-bottom: 0;
}

.ask-row-q {
  font-size: 1rem;
  letter-spacing: -0.005em;
  color: inherit;
  text-decoration: none;
  line-height: 1.4;
}

.ask-row-q:hover {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ask-row-meta {
  font-size: 0.82rem;
}

.recognition-asks-pager {
  margin: 24px 0 0;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-start;
}

.recognition-asks-pager a {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* recognition theorem head -- overlap fix (2026-05-08 phase 3) */
.recognition-theorem .theorem-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.recognition-theorem .theorem-titlewrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.recognition-theorem .theorem-titlewrap .decl-kind {
  /* Override pre-existing canon rule (min-width:70px, font-size:9px)
     so the kicker line sits cleanly above the title. */
  min-width: 0 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.06em;
  line-height: 1;
}

.recognition-theorem .theorem-titlewrap h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.recognition-theorem .theorem-titlewrap h1 code {
  font-size: inherit;
  background: transparent;
  padding: 0;
}

.recognition-theorem .theorem-head .claim-status {
  flex: 0 0 auto;
  margin-top: 6px;
  white-space: nowrap;
}

.recognition-theorem .theorem-claim {
  font-size: 1.04rem;
  line-height: 1.55;
  margin: 4px 0 14px;
  max-width: 78ch;
}

.recognition-theorem .theorem-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 22px;
  margin: 12px 0 0;
  font-size: 0.86rem;
}

.recognition-theorem .theorem-meta>div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recognition-theorem .theorem-meta dt {
  color: var(--meta-fg, #6b6b6b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  margin: 0;
}

.recognition-theorem .theorem-meta dd {
  margin: 0;
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.recognition-theorem .theorem-meta a {
  color: inherit;
}

.recognition-theorem .theorem-meta a:hover {
  color: var(--accent, #b06a3a);
}

.recognition-breadcrumb {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.recognition-breadcrumb code {
  background: transparent;
  padding: 0;
}

@media (max-width: 720px) {
  .recognition-theorem .theorem-titlewrap h1 {
    font-size: 1.3rem;
  }

  .recognition-theorem .theorem-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* recognition tool cards -- wrap fix (2026-05-08 phase 3) */
.recognition-tool {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.recognition-tool h3,
.recognition-tool p {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.recognition-tool code {
  word-break: break-all;
  overflow-wrap: anywhere;
}

.recognition-theorem-actions {
  min-width: 0;
}

.recognition-theorem-actions>.recognition-tool {
  min-width: 0;
}

/* Recognition nav family - minimal (2026-05-08 phase 5) */
.recog-divider {
  display: inline-block;
  width: 1px;
  height: 14px;
  margin: 0 8px 0 4px;
  background: var(--rule, #d6d4ce);
  vertical-align: middle;
}

.primary-nav .recognition-link {
  color: var(--accent, #b06a3a);
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 0;
  background: transparent;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 0;
  position: relative;
}

.primary-nav .recognition-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.primary-nav .recognition-link.active {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .recog-divider {
    display: none;
  }

  .primary-nav .recognition-link {
    padding: 3px 6px;
  }
}

/* Sitemap + footer links (2026-05-08 phase 6) */
.footer-links {
  margin: 6px 0;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  margin: 0 4px;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sitemap-page h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.sitemap-page .lede {
  margin: 0 0 24px;
  color: var(--meta-fg, #6b6b6b);
  max-width: 70ch;
}

.sitemap-section {
  margin: 0 0 28px;
}

.sitemap-section h2 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--rule, #d6d4ce);
  padding-bottom: 4px;
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px 18px;
}

.sitemap-list li {
  padding: 4px 0;
}

.sitemap-list a {
  color: inherit;
  text-decoration: none;
}

.sitemap-list a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--accent, #b06a3a);
}

.sitemap-list .meta-suffix {
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.82rem;
  margin-left: 6px;
}

/* Citation graph pages (2026-05-08) */
.work-page h1,
.graph-page h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.work-kicker {
  color: var(--meta-fg, #6b6b6b);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin: 0;
}

.work-head,
.graph-page {
  margin: 18px 0 28px;
}

.work-meta,
.graph-page .lede {
  max-width: 74ch;
}

.work-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.work-badge {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
  text-decoration: none;
}

.work-badge.reviewed {
  color: #1c6f3c;
  border-color: #c4e2cf;
  background: #ebf6ee;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.work-links a {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.work-block {
  margin: 24px 0;
}

.work-inbound-list,
.foundational-list {
  padding-left: 22px;
}

.work-inbound-list li,
.foundational-row {
  margin-bottom: 12px;
}

.foundational-title {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.foundational-title:hover {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Author profiles + imported works (2026-05-08) */
.profile-author-import,
.author-hero,
.author-owner-panel,
.author-queue,
.author-works,
.work-page section {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0;
  background: var(--surface, #fafaf7);
}

.profile-inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}

.profile-inline-form input[type='text'] {
  min-width: min(420px, 100%);
  flex: 1 1 320px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
}

.profile-inline-form label {
  font-size: 0.85rem;
  color: var(--meta-fg, #6b6b6b);
}

.author-hero h1,
.work-page h1 {
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.author-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 0;
  margin: 16px 0 0;
}

.author-stats li {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.author-stats b {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}

.author-stats span {
  display: block;
  margin-top: 4px;
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.author-work-list,
.author-mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.author-work-list li,
.author-mini-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--rule, #d6d4ce);
}

.author-work-list li:last-child,
.author-mini-list li:last-child {
  border-bottom: 0;
}

.work-title {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.work-title:hover {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
}

/* Visibility toggle + user chip link (2026-05-08 vis1) */
.user-chip {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}

.user-chip:hover {
  border-bottom-color: currentColor;
}

.pr-recent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
}

.pr-recent-link {
  flex: 1 1 60%;
  min-width: 0;
}

.pr-visibility-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.pr-visibility-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  background: var(--surface, #fafaf7);
}

.pr-vis {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule, #d6d4ce);
}

.pr-vis.pr-vis-public {
  color: #1c6f3c;
  border-color: #c4e2cf;
  background: #ebf6ee;
}

.pr-vis.pr-vis-private {
  color: #82530a;
  border-color: #ecdfb8;
  background: #faf3e1;
}

.pr-vis-btn {
  border: 1px solid var(--accent, #b06a3a);
  background: transparent;
  color: var(--accent, #b06a3a);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
}

.pr-vis-btn:hover {
  background: var(--accent, #b06a3a);
  color: #fff;
}

/* Ask Recognition pending spinner (2026-05-08) */
.ask-pending {
  margin: 18px 0 24px;
  padding: 18px 22px;
  border: 1px solid var(--accent, #b06a3a);
  border-radius: 10px;
  background: rgba(176, 106, 58, 0.06);
}

.ask-pending-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.ask-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--rule, #d6d4ce);
  border-top-color: var(--accent, #b06a3a);
  animation: ask-spin 0.9s linear infinite;
  flex: 0 0 auto;
  margin-top: 2px;
}

.ask-pending-body {
  flex: 1 1 auto;
}

.ask-pending-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.ask-pending-meta {
  color: var(--meta-fg, #555);
  font-size: 0.9rem;
  margin-bottom: 6px;
  line-height: 1.45;
}

.ask-pending-phase {
  font-size: 0.85rem;
  color: var(--accent, #b06a3a);
  font-style: italic;
}

.ask-pending-elapsed {
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
  margin-top: 2px;
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
}

@keyframes ask-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Ask via banner + asks search box (2026-05-08) */
.ask-via-banner {
  margin: 6px 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--accent, #b06a3a);
  border-radius: 8px;
  background: rgba(176, 106, 58, 0.06);
  font-size: 0.9rem;
}

.ask-via-banner.subtle {
  border-color: var(--rule, #d6d4ce);
  background: var(--surface, #fafaf7);
  color: var(--meta-fg, #555);
}

.ask-via-banner a {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.recognition-asks-search {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
  align-items: center;
  max-width: 640px;
}

.recognition-asks-search input[type="search"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  font-family: inherit;
  font-size: 0.95rem;
}

.recognition-asks-search button {
  padding: 8px 16px;
  border: 1px solid var(--accent, #b06a3a);
  border-radius: 999px;
  background: var(--accent, #b06a3a);
  color: #fff;
  cursor: pointer;
  font-weight: 500;
}

.recognition-asks-search a {
  color: var(--meta-fg, #6b6b6b);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Recognition coverage chips */
.recognition-chip {
  display: inline-block;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: .72rem;
  line-height: 1.2;
  color: var(--meta-fg, #6b6b6b);
  background: var(--surface, #fafaf7);
  white-space: nowrap
}

.recognition-chip-theorem-linked {
  color: #1c6f3c;
  border-color: #c4e2cf;
  background: #ebf6ee
}

.recognition-chip-none {
  color: #82530a;
  border-color: #ecdfb8;
  background: #faf3e1
}

.recognition-coverage-badge {
  margin: 8px 0 12px;
  display: inline-block;
  padding: 4px 10px;
  font-size: .82rem
}

/* Ask cards (sitemap) - v2 cards (2026-05-08) */
.recognition-asks-resultcount {
  margin: 0 0 12px;
  font-size: 0.85rem;
}

.ask-card-grid {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ask-card {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 10px;
  padding: 14px 18px 12px;
  background: var(--surface, #fafaf7);
  transition: border-color 0.12s, transform 0.12s;
}

.ask-card:hover {
  border-color: var(--accent, #b06a3a);
  transform: translateY(-1px);
}

.ask-card-title {
  display: block;
  font-size: 1.04rem;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 6px;
  word-break: break-word;
}

.ask-card-title:hover {
  color: var(--accent, #b06a3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ask-card-preview {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--body-fg, #444);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ask-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
  letter-spacing: 0.01em;
  align-items: center;
}

.ask-card-meta>span {
  display: inline-flex;
  align-items: center;
}

.ask-conf-chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule, #d6d4ce);
  background: #fff;
  font-size: 0.74rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.ask-conf-high {
  color: #1c6f3c;
  border-color: #c4e2cf;
  background: #ebf6ee;
}

.ask-conf-moderate {
  color: #82530a;
  border-color: #ecdfb8;
  background: #faf3e1;
}

.ask-conf-low {
  color: #7d2727;
  border-color: #e6c8c4;
  background: #f7e8e6;
}

.ask-status-chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e6c8c4;
  background: #f7e8e6;
  color: #7d2727;
  font-size: 0.74rem;
}

.ask-model-chip code {
  font-size: 0.74rem;
  padding: 1px 5px;
  background: #fff;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 4px;
}

.ask-sim-chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule, #d6d4ce);
  background: #fff;
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  font-size: 0.72rem;
  color: var(--meta-fg, #6b6b6b);
}

@media (min-width: 880px) {
  .ask-card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ask landing recent strip (2026-05-08) */
.recent-asks-strip {
  margin: 32px 0 22px;
}

.recent-asks-strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.recent-asks-strip-head .section-h {
  margin: 0;
}

.recent-asks-strip-more {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--accent, #b06a3a);
  white-space: nowrap;
}

/* Citations index page (2026-05-08 cite1) */
.citations-page h1 {
  font-size: 1.95rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.citations-page .lede {
  color: var(--meta-fg, #6b6b6b);
  max-width: 78ch;
  margin: 0 0 18px;
}

.citations-search-wrap {
  margin: 0 0 24px;
  max-width: 720px;
}

.citations-search {
  display: flex;
  gap: 0;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.citations-search input {
  flex: 1;
  border: 0;
  padding: 12px 16px;
  font: inherit;
  background: transparent;
  outline: none;
}

.citations-search button {
  border: 0;
  border-left: 1px solid var(--rule, #d6d4ce);
  padding: 0 18px;
  background: var(--accent, #b06a3a);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.citations-typeahead {
  margin-top: 8px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  max-width: 720px;
}

.citations-typeahead .ct-item {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule, #d6d4ce);
  color: inherit;
  text-decoration: none;
}

.citations-typeahead .ct-item:last-child {
  border-bottom: 0;
}

.citations-typeahead .ct-item:hover {
  background: var(--surface, #fafaf7);
}

.citations-typeahead .ct-meta {
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.82rem;
  margin-left: 8px;
}

.citations-section {
  margin: 28px 0;
}

.citations-section .section-h {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--rule, #d6d4ce);
  padding-bottom: 4px;
}

.citations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.citation-card {
  display: block;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface, #fafaf7);
  color: inherit;
  text-decoration: none;
}

.citation-card:hover {
  border-color: var(--accent, #b06a3a);
}

.citation-card .ct-title {
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.citation-card .ct-meta {
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.84rem;
  margin-top: 6px;
}

.citations-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 10px;
  background: var(--surface, #fafaf7);
  margin: 0 0 22px;
}

.citations-stats .stat-num {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
  font-size: 1.45rem;
  font-weight: 600;
}

.citations-stats .stat-lbl {
  display: block;
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coverage-card {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 10px;
  padding: 14px 18px;
  background: var(--surface, #fafaf7);
  margin: 0 0 22px;
}

.coverage-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: -0.005em;
}

.coverage-bar {
  position: relative;
  height: 10px;
  background: #e9e7e1;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.coverage-bar .fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--accent, #b06a3a);
}

/* Citations landing page (2026-05-08 phase 6) */
.citations-page h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.citations-page .lede {
  max-width: 76ch;
  color: var(--meta-fg, #6b6b6b);
  margin-bottom: 24px;
}

.citations-search-form {
  margin: 24px 0 32px;
  max-width: 640px;
  position: relative;
}

.search-box-wrap {
  display: flex;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.search-box-wrap input {
  flex: 1;
  border: 0;
  padding: 12px 14px;
  font-size: 1rem;
  background: transparent;
  outline: none;
  color: inherit;
}

.search-box-wrap button {
  border: 0;
  border-left: 1px solid var(--rule, #d6d4ce);
  padding: 0 22px;
  background: var(--surface, #fafaf7);
  cursor: pointer;
  font-weight: 500;
}

.citations-typeahead {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
  max-height: 400px;
  overflow-y: auto;
}

.citations-typeahead .th-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule, #d6d4ce);
  text-decoration: none;
  color: inherit;
}

.citations-typeahead .th-item:last-child {
  border-bottom: 0;
}

.citations-typeahead .th-item:hover {
  background: var(--surface, #fafaf7);
}

.citations-typeahead .th-name {
  font-weight: 500;
  line-height: 1.3;
}

.citations-typeahead .work-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  padding: 2px 6px;
  margin-bottom: 2px;
}

/* Ask cards: search-result mode override (2026-05-08) */
.ask-card-grid {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  margin: 0 0 18px !important;
}

.ask-card {
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 12px 0 14px !important;
  border-bottom: 1px solid var(--rule, #d6d4ce) !important;
}

.ask-card:last-child {
  border-bottom: 0 !important;
}

.ask-card:hover {
  transform: none !important;
  border-color: transparent transparent var(--rule, #d6d4ce) transparent !important;
  background: transparent !important;
}

.ask-card-title {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--accent, #b06a3a);
  margin-bottom: 4px;
}

.ask-card-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ask-card-preview {
  -webkit-line-clamp: 2;
  margin: 4px 0 6px;
  color: var(--meta-fg, #555);
}

.ask-card-meta {
  font-size: 0.78rem;
  color: var(--meta-fg, #6b6b6b);
}

/* Tighter on the ask landing strip so the form stays the focus */
.recent-asks-strip {
  margin: 24px 0 18px;
}

.recent-asks-strip-head .section-h {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--meta-fg, #6b6b6b);
}

@media (min-width: 880px) {
  .ask-card-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Forward-citation list (paper.html: "Cited by Pith papers"). */
.paper-incoming {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-soft, #e5e7eb);
}

.incoming-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: grid;
  gap: 0.85rem;
}

.incoming-row {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule-soft, #e5e7eb);
  border-radius: 6px;
  background: var(--card-bg, #fbfbfb);
}

.incoming-row:hover {
  background: var(--card-hover, #f3f4f6);
}

.incoming-title {
  display: block;
  font-weight: 600;
  color: var(--link, #1f2937);
  text-decoration: none;
  line-height: 1.3;
}

.incoming-title:hover {
  text-decoration: underline;
}

.incoming-meta {
  margin: 0.25rem 0 0 0;
  font-size: 0.85rem;
  color: var(--meta, #6b7280);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.incoming-meta .verdict-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--tag-bg, #eef2ff);
  color: var(--tag-fg, #3730a3);
}

.incoming-meta .verdict-conditional {
  background: #fef3c7;
  color: #92400e;
}

.incoming-meta .verdict-pass {
  background: #d1fae5;
  color: #065f46;
}

.incoming-meta .verdict-fail {
  background: #fee2e2;
  color: #991b1b;
}

.incoming-meta .formal-tag {
  background: #dbeafe;
  color: #1e40af;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.incoming-summary {
  margin: 0.4rem 0 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink, #374151);
}

.pith-inbound-pill {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 2px;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 500;
}



/* Foundational sample with recaps. */
.foundational-row {
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule-soft, #e5e7eb);
  border-radius: 6px;
  background: var(--card-bg, #fbfbfb);
  margin-bottom: 0.7rem;
  list-style: none;
}

.foundational-row.is-reviewed {
  background: var(--card-reviewed-bg, #f8fafc);
  border-color: #cbd5e1;
}

.foundational-title {
  display: block;
  font-weight: 600;
  font-size: 1.04rem;
  line-height: 1.35;
  color: var(--link, #1f2937);
  text-decoration: none;
}

.foundational-title:hover {
  text-decoration: underline;
}

.foundational-meta {
  margin: 0.3rem 0 0 0;
  font-size: 0.85rem;
  color: var(--meta, #6b7280);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.foundational-meta .verdict-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #eef2ff;
  color: #3730a3;
}

.foundational-meta .verdict-conditional {
  background: #fef3c7;
  color: #92400e;
}

.foundational-meta .verdict-pass {
  background: #d1fae5;
  color: #065f46;
}

.foundational-meta .verdict-fail {
  background: #fee2e2;
  color: #991b1b;
}

.foundational-meta .verdict-unverdicted {
  background: #f1f5f9;
  color: #64748b;
}

.foundational-meta .pending-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  background: #fef9c3;
  color: #854d0e;
}

.foundational-meta .formal-tag {
  background: #dbeafe;
  color: #1e40af;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.foundational-meta .recognition-pill {
  background: #ede9fe;
  color: #5b21b6;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 500;
}

.foundational-meta .lean-pill {
  background: #cffafe;
  color: #155e75;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.foundational-summary {
  margin: 0.45rem 0 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink, #374151);
}

/* Home page latest arXiv reviews strip. */
.latest-reviews {
  margin: 0 0 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--rule-soft, #e5e7eb);
  border-radius: 8px;
  background: var(--card-bg, #fbfbfb);
}

.latest-reviews-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.latest-reviews-title {
  margin: 0.1rem 0 0 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.latest-review-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.latest-review-list li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule-soft, #e5e7eb);
}

.latest-review-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.latest-review-list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--link, #1f2937);
}

.latest-review-list a:hover {
  text-decoration: underline;
}

/* Review signature: public audit stamp for when and by which model Pith read the paper. */
.review-signature {
  color: var(--fg-3);
  font-size: 11px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.review-signature.compact {
  margin-left: 6px;
}

.paper-review-signature {
  margin: 4px 0 12px;
  font-size: 12px;
}

/* Recognition explainer pages (2026-05-09) */
.recognition-explainer-strip,
.recognition-explainer-empty,
.recognition-explainer-body {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  padding: 18px;
  margin: 18px 0;
}

.recognition-explainer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.explainer-hero .theorem-claim {
  max-width: 920px;
}

.explainer-decl-list {
  columns: 2;
  column-gap: 28px;
}

.explainer-decl-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.module-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 760px) {
  .recognition-explainer-strip {
    display: block;
  }

  .explainer-decl-list {
    columns: 1;
  }
}

/* Citation dossier pages (2026-05-09) */
.citation-dossier .work-hero {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(155, 208, 255, 0.06), rgba(255, 255, 255, 0.02));
  margin-bottom: 18px;
}

.citation-dossier .work-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.work-meta-line {
  max-width: 980px;
}

.work-abstract {
  max-width: 880px;
  color: var(--fg-2);
}

.dossier-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.dossier-metrics div,
.dossier-why,
.dossier-facets,
.representative-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
}

.dossier-metrics div {
  padding: 14px;
}

.dossier-metrics strong {
  display: block;
  color: var(--fg);
  font-size: 24px;
  line-height: 1.1;
}

.dossier-metrics span {
  display: block;
  color: var(--fg-3);
  font-size: 12px;
  margin-top: 4px;
}

.dossier-why {
  padding: 16px;
  margin: 18px 0;
}

.dossier-why p {
  max-width: 900px;
  color: var(--fg-2);
}

.dossier-facets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  margin: 18px 0;
}

.facet-group h3 {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  font-size: 11px;
}

.facet-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  margin: 0 5px 7px 0;
  background: var(--panel-2);
  color: var(--fg-2);
  font-size: 12px;
}

.facet-chip.active {
  border-color: var(--link);
  color: var(--fg);
  background: rgba(155, 208, 255, 0.12);
}

.facet-chip span {
  color: var(--fg-3);
}

.facet-clear {
  grid-column: 1 / -1;
  margin: 0;
}

.representative-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 20px;
}

.representative-card {
  padding: 14px;
}

.representative-card p {
  color: var(--fg-2);
  margin-bottom: 0;
}

.dossier-incoming-list {
  margin-top: 10px;
}

.dossier-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--fg-3);
}

@media (max-width: 800px) {

  .dossier-metrics,
  .dossier-facets,
  .representative-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile HN-style feed + right-stacked nav (2026-05-09) */
.topbar-row {
  align-items: flex-start;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  line-height: 1.15;
}

.auth-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cats-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.topbar .version {
  margin-left: 0;
  font-size: 10px;
}

.primary-nav {
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  border-top: 0;
  transition: max-height 0.22s ease-out, padding 0.22s ease-out, border-top-color 0.22s ease-out;
}

.topbar.cats-open .primary-nav {
  max-height: 140px;
  padding-top: 8px;
  padding-bottom: 10px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  body {
    padding-top: 66px;
  }

  .main {
    padding: 10px 8px 48px;
  }

  .footer {
    padding: 16px 10px;
    margin-top: 18px;
  }

  .topbar-row {
    padding: 7px 10px;
    gap: 8px;
  }

  .brand {
    font-size: 20px;
    letter-spacing: -1.2px;
  }

  .brand-slogan {
    display: none;
  }

  .topbar-right {
    gap: 1px;
  }

  .cats-toggle {
    font-size: 11px;
  }

  .auth-stack .meta,
  .user-chip {
    font-size: 11px;
  }

  .topbar-right .version {
    display: none;
  }

  .topbar.cats-open .primary-nav {
    max-height: 190px;
  }

  .primary-nav {
    padding-left: 8px;
    padding-right: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .primary-nav .primary {
    flex: 0 0 auto;
    font-size: 10px;
    padding: 3px 7px;
    white-space: nowrap;
  }

  .hero,
  .feed-banner,
  .col-side,
  .latest-reviews-bottom {
    display: none !important;
  }

  .row {
    display: block;
  }

  .feed-more {
    margin: 14px 0;
  }

  .feed-more-link {
    font-size: 12px;
  }

  .feed-more-meta {
    display: none;
  }

  .card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
    margin: 0;
    padding: 6px 0;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
  }

  .card.is-top-pith {
    border-color: color-mix(in srgb, var(--line) 80%, transparent);
  }

  .top-pith-ribbon,
  .card-media,
  .card-subtitle,
  .card-lead,
  .card-summary,
  .card-original-title,
  .recognition-chip {
    display: none !important;
  }

  .card-vote {
    padding-top: 2px;
    gap: 2px;
  }

  .fire-count {
    font-size: 12px;
    min-width: 0;
    color: var(--fg-3);
  }

  .fire {
    padding: 2px 3px;
    font-size: 8px;
    line-height: 1;
    border-radius: 2px;
    text-transform: lowercase;
    letter-spacing: 0;
    background: transparent;
    color: var(--fg-3);
    border-color: var(--line);
  }

  .card-head {
    gap: 4px 6px;
    font-size: 10px;
    line-height: 1.2;
  }

  .card-head .cat-pill {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fg-3);
  }

  .card-head .cat-emoji {
    display: none;
  }

  .card-head .dot-sep::before {
    margin-right: 5px;
  }

  .card-title,
  .card-headline {
    margin: 1px 0 2px;
    font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: 0;
  }

  .card-title a,
  .card-headline a {
    color: var(--fg);
  }

  .card-actions {
    margin-top: 2px;
    padding-top: 0;
    border-top: 0;
    gap: 4px 8px;
    font-size: 10px;
  }

  .card-action {
    padding: 0;
    gap: 3px;
    border-radius: 0;
  }

  .card-action .act-label,
  .card-action-spacer,
  .card-action.act-share-x {
    display: none;
  }

  .card-action .act-icon {
    width: 12px;
    height: 12px;
  }

  .card-meta-trailing {
    flex-basis: 100%;
    gap: 5px;
    font-size: 10px;
  }

  .card-meta-trailing .authors {
    flex-basis: 100%;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .review-signature.compact {
    font-size: 10px;
  }

  .category-taxonomy-desc,
  .taxonomy-wrap,
  .subnav {
    display: none;
  }
}

/* ----- Topbar v2: layered nav + corner pin (2026-05-09) -----
   First-principles split: identity (sign-in/@handle) gets a quiet
   corner pin; navigation (categories + Recognition) is an ambient
   strip directly below the brand row. They never share the same
   visual cluster, so they cannot crowd each other. The cats-toggle
   button and auth-stack wrappers are retired; CSS below neutralizes
   any leftover rules from earlier mobile/cats CSS layers.
*/

.topbar {
  padding: 0;
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 22px 7px;
}

.topbar-row .brand-slogan {
  flex: 1 1 auto;
  color: var(--fg-3);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.topbar-corner {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  margin-left: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--fg-3);
}

.topbar-corner .user-chip {
  font-family: inherit;
  font-size: 12px;
  color: var(--fg);
  border-bottom: 1px dotted var(--fg-3);
}

.topbar-corner .user-chip:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.topbar-corner .corner-link {
  color: var(--fg-3);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  border-bottom: 1px dotted transparent;
}

.topbar-corner .corner-link:hover {
  color: var(--fg);
  border-bottom-color: var(--fg-3);
}

.primary-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 22px 9px;
  margin: 0;
  border-top: 1px solid var(--line);
  max-height: none;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

/* Strip links read like a magazine masthead row, not buttons. */
.primary-nav .primary {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  border-radius: 0;
}

.primary-nav .primary:hover {
  color: var(--fg);
  background: transparent;
  border-color: var(--fg-3);
}

.primary-nav .primary.active {
  color: var(--fg);
  background: transparent;
  border-color: var(--fg);
}

.primary-nav .nav-group {
  border-radius: 0;
}

.primary-nav .recog-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 14px;
  background: var(--line);
  margin: 0 4px;
}

.primary-nav .recognition-link {
  color: var(--fg-2);
}

.primary-nav .recognition-link:hover {
  color: var(--accept, #00d18a);
  border-color: var(--accept, #00d18a);
}

.primary-nav .recognition-link.active {
  color: var(--accept, #00d18a);
  border-color: var(--accept, #00d18a);
}

/* Retire the categories toggle / drawer behavior entirely. */
.cats-toggle,
.topbar.cats-open .primary-nav,
.auth-stack,
.topbar-right {
  all: unset;
}

.cats-toggle,
.auth-stack,
.topbar-right {
  display: none !important;
}

.topbar.cats-open .primary-nav {
  max-height: none;
}

/* Sign-in is now alone in the corner, so no special gap or floating chrome. */
.topbar .version {
  display: none;
}

/* Mobile: smaller padding, smaller strip, brand slogan disappears. */
@media (max-width: 760px) {
  body {
    padding-top: 80px;
  }

  .topbar-row {
    padding: 7px 12px 5px;
    gap: 8px;
  }

  .topbar-row .brand-slogan {
    display: none;
  }

  .topbar-row .brand {
    font-size: 19px;
    letter-spacing: -1.2px;
  }

  .topbar-corner {
    font-size: 11px;
    gap: 10px;
  }

  .topbar-corner .user-chip {
    font-size: 11px;
  }

  .primary-nav {
    gap: 14px;
    padding: 4px 12px 7px;
    -webkit-overflow-scrolling: touch;
  }

  .primary-nav .primary {
    font-size: 10.5px;
    letter-spacing: 0.05em;
  }

  .primary-nav .recog-divider {
    height: 11px;
  }
}

/* Mobile overflow containment for paper + review pages (2026-05-09)
   Rule: the document viewport must never be the scroll container for long
   scientific tokens. Long prose wraps; pre/code/tables scroll inside their
   own boxes. This specifically targets paper pages, Recognition review
   pages, theorem/source pages, citation dossiers, and upload/file widgets. */

html,
body {
  max-width: 100%;
}

.main,
.paper,
.paper *,
.canon-tool-page,
.canon-tool-page *,
.recognition-theorem,
.recognition-theorem *,
.work-page,
.work-page * {
  min-width: 0;
}

.paper,
.paper-page,
.pith-lead,
.critical-analysis,
.section-band,
.referee,
.rebuttal,
.circularity,
.axiom-ledger,
.lean-theorems,
.paper-incoming,
.paper-references,
.paper-extras,
.paper-figures,
.paper-video,
.paper-artifact,
.canon-tool-page,
.pr-final,
.pr-block,
.pr-status-card,
.pr-raw,
.pr-raw-block,
.pr-modules,
.recognition-theorem,
.theorem-head,
.theorem-titlewrap,
.theorem-meta,
.work-page,
.citation-dossier {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.paper h1,
.paper h2,
.paper h3,
.paper .subtitle,
.paper .meta,
.paper-review-signature,
.pr-h,
.pr-paper-title,
.pr-arxiv-link,
.pr-status-label,
.pr-block h2,
.pr-block li,
.pr-block p,
.pr-modules-list,
.pr-modules-list a,
.pr-modules-list code,
.lean-theorems,
.lean-theorems a,
.lean-theorems code,
.lean-thm,
.theorem-titlewrap h1,
.theorem-claim,
.theorem-meta dd,
.theorem-meta code,
.recognition-breadcrumb,
.recognition-breadcrumb code,
.artifact-btn,
.artifact-label,
.paper-action-link,
.reference-title,
.reference-meta,
.incoming-title,
.incoming-meta,
.incoming-summary,
.facet-chip,
.citation-dossier h1,
.work-meta-line,
.work-abstract {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.paper a,
.canon-tool-page a,
.recognition-theorem a,
.work-page a {
  overflow-wrap: anywhere;
}

.paper img,
.paper video,
.paper iframe,
.paper svg,
.canon-tool-page img,
.canon-tool-page video,
.canon-tool-page iframe,
.recognition-theorem img,
.recognition-theorem svg,
.work-page img,
.work-page video,
.work-page iframe {
  max-width: 100%;
  height: auto;
}

.paper table,
.canon-tool-page table,
.recognition-theorem table,
.work-page table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.paper pre,
.canon-tool-page pre,
.recognition-theorem pre,
.work-page pre,
.pr-raw-block pre,
.source-code,
.lean-source,
.theorem-source {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.paper :not(pre)>code,
.canon-tool-page :not(pre)>code,
.recognition-theorem :not(pre)>code,
.work-page :not(pre)>code,
.pr-block :not(pre)>code,
.lean-theorems :not(pre)>code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.artifact-actions,
.paper-actions,
.paper-meta-row,
.paper-positioning,
.positioning-row,
.lean-evidence-list,
.pr-visibility-bar,
.pr-visibility-form,
.pr-recent-row,
.pr-file-card,
.profile-inline-form,
.dossier-metrics,
.dossier-facets,
.representative-grid {
  max-width: 100%;
  flex-wrap: wrap;
}

.artifact-btn,
.paper-action-link,
.pr-vis-btn,
.pr-file-name,
.pr-file-meta,
.profile-identity-val {
  min-width: 0;
}

.pr-file-name,
.upload-name,
.filename,
.file-name,
.source-path,
.module-path,
.lean-module,
.lean-thm {
  overflow-wrap: anywhere;
  word-break: break-all;
}

@media (max-width: 760px) {

  html,
  body {
    overflow-x: hidden;
  }

  .main {
    width: 100%;
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  .paper,
  .canon-tool-page,
  .recognition-theorem,
  .work-page {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .paper-artifact,
  .pith-lead,
  .critical-analysis,
  .pr-final,
  .pr-block,
  .theorem-head,
  .dossier-facets,
  .dossier-metrics,
  .representative-grid {
    width: 100%;
  }

  .artifact-actions,
  .paper-actions,
  .pr-visibility-bar,
  .pr-visibility-form,
  .profile-inline-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .artifact-btn,
  .paper-action-link,
  .pr-vis-btn {
    width: 100%;
    justify-content: center;
  }

  .pr-modules-list {
    column-count: 1 !important;
  }

  .paper-references .reference-row,
  .paper-incoming .incoming-row,
  .dossier-incoming-list .incoming-row {
    max-width: 100%;
  }
}

/* Mobile overflow firewall for paper/review surfaces (2026-05-09)
   Fixes phone-side horizontal movement from long filenames, URLs,
   theorem/module names, reference strings, buttons, tables, and raw JSON.
*/
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.paper,
.paper *,
.critical-analysis,
.critical-analysis *,
.paper-references,
.paper-references *,
.paper-incoming,
.paper-incoming *,
.lean-theorems,
.lean-theorems *,
.canon-tool-page,
.canon-tool-page *,
.pr-final,
.pr-final *,
.recognition-theorem,
.recognition-theorem *,
.work-page,
.work-page * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.paper,
.canon-tool-page,
.recognition-theorem,
.work-page {
  overflow-x: clip;
}

.paper h1,
.paper h2,
.paper h3,
.paper p,
.paper li,
.paper dd,
.paper dt,
.paper a,
.paper code,
.paper .meta,
.paper .paper-title,
.paper .paper-meta,
.paper .ref-title,
.paper .ref-text,
.paper .incoming-title,
.paper .incoming-summary,
.paper .lean-thm,
.paper .section-anchor,
.pr-h,
.pr-paper-title,
.pr-block,
.pr-block li,
.pr-block code,
.pr-modules-list a,
.pr-modules-list code,
.theorem-titlewrap h1,
.theorem-meta dd,
.theorem-meta code,
.work-page h1,
.work-page a,
.work-page code,
.work-page li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.paper pre,
.paper code,
.pr-raw-block pre,
.pr-block pre,
.recognition-source pre,
.theorem-source pre,
pre[class],
pre {
  white-space: pre-wrap;
  overflow-x: auto;
  max-width: 100%;
}

.paper table,
.pr-block table,
.canon-tool-page table,
.recognition-theorem table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.paper-artifact,
.artifact-actions,
.paper-actions,
.paper-action-row,
.pr-visibility-bar,
.pr-visibility-form,
.pr-tabs,
.pr-submit-row,
.profile-inline-form,
.search-bar {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.artifact-btn,
.paper-action-link,
.pr-vis-btn,
.pr-tab,
.pr-file-name,
.pr-arxiv-link,
.lean-cite-unresolved code,
.lean-cite code {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.cover-link,
.cover-link img,
.paper-cover,
.paper-media,
.paper-video video,
.paper-figures img,
.card-media img,
.card-media video,
.card-media iframe {
  max-width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .paper,
  .canon-tool-page,
  .recognition-theorem,
  .work-page {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .paper-artifact,
  .paper-positioning,
  .paper-extras,
  .paper-figures,
  .critical-analysis,
  .verdict-box,
  .comments-block,
  .lean-theorems,
  .paper-incoming,
  .paper-references,
  .pr-block,
  .pr-status-card,
  .pr-final,
  .pr-raw,
  .work-hero,
  .dossier-facets,
  .dossier-metrics {
    width: 100% !important;
    max-width: 100% !important;
  }

  .artifact-actions,
  .paper-actions,
  .pr-tabs,
  .pr-submit-row,
  .profile-inline-form,
  .search-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .artifact-btn,
  .paper-action-link,
  .pr-tab,
  .pr-vis-btn,
  .search-bar .search-input,
  .search-bar .search-cat,
  .search-bar .search-btn {
    width: 100%;
  }

  .pr-modules-list {
    column-count: 1 !important;
  }

  .ref-row,
  .reference-row,
  .incoming-row,
  .foundational-row,
  .author-work-list li {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

/* Home/feed card media: uniform-height, non-cropped image view (2026-05-09)
   Earlier rules accidentally re-cropped .kind-figure attachments with
   object-fit: cover. These final rules keep the media slot height stable
   while showing the complete image. */
.card-media.mode-image,
.card-media.kind-figure {
  background: #fff;
}

.card-media.mode-image .card-media-image,
.card-media.kind-figure .card-media-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  background: #fff;
}

.card-media.mode-image .card-media-image img,
.card-media.kind-figure .card-media-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
}

@media (max-width: 760px) {

  .card-media.mode-image .card-media-image,
  .card-media.kind-figure .card-media-image {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
  }
}


/* Feed card full-image affordance (2026-05-09)
   The media slot stays uniform-height, but clicking opens the actual
   extracted image asset, not the paper page. */
.card-media-image {
  position: relative;
}

.media-full-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .64);
  color: #fff;
  font: 11px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .02em;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
}

.card-media-image:hover .media-full-pill,
.card-media-image:focus-visible .media-full-pill {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none) {
  .media-full-pill {
    opacity: 1;
    transform: none;
  }
}


/* Smaller feed image previews only (videos keep 16:9 current size), 2026-05-09 */
.card-media.mode-image .card-media-image,
.card-media.kind-figure .card-media-image {
  height: 190px;
  min-height: 190px;
  max-height: 190px;
}

@media (max-width: 760px) {

  .card-media.mode-image .card-media-image,
  .card-media.kind-figure .card-media-image {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
  }
}


/* Infinite feed loader (2026-05-09) */
.feed-list {
  min-width: 0;
}

.infinite-sentinel {
  height: 1px;
}

.feed-loading,
.feed-end {
  text-align: center;
  margin: 16px 0;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Admin users dashboard (2026-05-09) */
.admin-page {
  max-width: 1180px;
  margin: 0 auto;
}

.admin-hero {
  margin: 0 0 18px;
}

.admin-hero h1 {
  margin: 4px 0 6px;
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

.admin-metrics div,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.admin-metrics div {
  padding: 14px;
}

.admin-metrics strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.admin-metrics span {
  color: var(--fg-3);
  font-size: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.admin-panel {
  padding: 14px;
}

.admin-panel h2 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}

.admin-breakdown {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
}

.admin-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 6px;
}

.admin-breakdown li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.admin-email {
  display: block;
  overflow-wrap: anywhere;
}

.admin-role {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.admin-role-admin {
  color: var(--accept);
  border-color: var(--accept);
}

.admin-role-expert,
.admin-role-editor {
  color: var(--link);
  border-color: var(--link);
}

@media (max-width: 760px) {

  .admin-metrics,
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4),
  .admin-table th:nth-child(6),
  .admin-table td:nth-child(6) {
    display: none;
  }
}


/* Admin account merge (2026-05-09) */
.admin-select,
.admin-input {
  width: 100%;
  min-width: 0;
  margin: 6px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: 12px/1.4 ui-monospace, monospace;
}

.admin-merge-confirm {
  display: grid;
  gap: 8px;
  max-width: 520px;
  margin-top: 14px;
}

.admin-merge-link {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Recognition explainer index cards (mobile-tight) — 2026-05-09 */
.explainer-index-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0 24px;
}

.explainer-index-list .ask-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  min-width: 0;
  max-width: 100%;
}

.explainer-index-list .ask-card-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: anywhere;
  border-bottom: 0;
}

.explainer-index-list .ask-card-title code {
  font-size: 13px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.explainer-index-list .ask-card-preview {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--fg-2);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.explainer-index-list .ask-card-preview code {
  font-size: 11.5px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.explainer-index-list .ask-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--fg-3);
  font-family: ui-monospace, monospace;
}

.explainer-index-list .ask-card-meta span {
  white-space: nowrap;
}

.explainer-index-list .ask-card-meta a {
  color: var(--fg-3);
  border-bottom: 1px dotted var(--fg-3);
}

.explainer-index-list .ask-card-meta a:hover {
  color: var(--fg);
}

@media (min-width: 760px) {
  .explainer-index-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .explainer-index-list {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* Explainable status tags (2026-05-09) */
.verdict-tag,
.formal-tag,
.arch-pill,
.badge,
.recognition-chip,
.claim-status,
.ask-conf-chip,
.ask-status-chip {
  cursor: help;
  text-decoration: underline dotted currentColor 1px;
  text-underline-offset: 2px;
}

.verdict-tag:focus-visible,
.formal-tag:focus-visible,
.arch-pill:focus-visible,
.badge:focus-visible,
.recognition-chip:focus-visible,
.claim-status:focus-visible,
.ask-conf-chip:focus-visible,
.ask-status-chip:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}


/* Recognition hero stats simplification (2026-05-10) */
.recognition-stat-bar-simplified {
  gap: 0;
}

.recognition-library-stat {
  gap: 3px;
}

.recognition-stat-sub {
  border-bottom: 1px dotted var(--meta-fg, #6b6b6b);
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.recognition-stat-sub:hover {
  color: var(--accent, #b06a3a);
  border-bottom-color: var(--accent, #b06a3a);
}


/* Cited-by-N inbound chip on feed cards (2026-05-10) */
.card-action.act-cited {
  color: var(--accent, #b06a3a);
}

.card-action.act-cited:hover {
  color: var(--accent-2, #8c4f29);
}

.card-action.act-cited .act-count {
  font-weight: 600;
}


/* Theorem graph: depends-on / used-by lists (2026-05-10) */
.theorem-graph .graph-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: grid;
  gap: 0.4rem;
}

.theorem-graph .graph-list li {
  border-bottom: 1px dotted var(--meta-fg, #6b6b6b);
  padding: 0.25rem 0;
}

.theorem-graph .graph-list a {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.theorem-graph .graph-list code {
  font-weight: 600;
}

.theorem-graph .graph-list .meta {
  font-size: 0.78rem;
}

/* ----------------------------------------------------------------------
 * Recognition Explainer V1 — researcher-grade structured layout.
 * Appended 2026-05-10.
 * --------------------------------------------------------------------*/

.explainer-v1 {
  margin: 1rem 0 1.5rem 0;
  padding: 1.25rem 1.25rem 1rem 1.25rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: var(--card-bg, #fff);
}

.explainer-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.role-pill,
.status-pill,
.confidence-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--chip-bg, #f3f4f6);
  color: var(--text, #111);
}

.role-pill.role-theorem {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.role-pill.role-hypothesis_bridge {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.role-pill.role-definition {
  background: #e0f2fe;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.role-pill.role-instance {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #4c1d95;
}

.role-pill.role-scaffolding {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.role-pill.role-proof_term {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1f2937;
}

.role-pill.role-tactic_lemma {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1f2937;
}

.status-pill.status-proved {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.status-pill.status-conditional {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.status-pill.status-hypothesis_interface {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.status-pill.status-definition {
  background: #e0f2fe;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.status-pill.status-open {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.confidence-pill.confidence-high {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.confidence-pill.confidence-moderate {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.confidence-pill.confidence-low {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.explainer-title {
  margin: 0.25rem 0 0.5rem 0;
  font-size: 1.6rem;
  line-height: 1.2;
  font-weight: 600;
}

.explainer-title code {
  font-size: 1.1em;
  background: transparent;
  padding: 0;
}

.explainer-tldr {
  margin: 0.25rem 0 0.75rem 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text, #111);
}

.explainer-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.4rem 1rem;
  margin: 0.6rem 0 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-soft, #f1f5f9);
}

.explainer-meta>div {
  display: flex;
  flex-direction: column;
}

.explainer-meta dt {
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--meta, #6b7280);
}

.explainer-meta dd {
  margin: 0;
  font-size: 0.92rem;
}

.explainer-section {
  margin: 1.25rem 0;
}

.explainer-section .section-h {
  font-size: 1rem;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--meta, #6b7280);
  margin-bottom: 0.5rem;
}

.explainer-prose {
  font-size: 1rem;
  line-height: 1.6;
}

.explainer-prose p {
  margin: 0.4rem 0;
}

.explainer-prose code {
  background: var(--chip-bg, #f3f4f6);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-size: 0.92em;
}

.explainer-prose pre {
  background: var(--code-bg, #0f172a);
  color: #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.45;
}

.hypothesis-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.hypothesis-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: var(--card-bg, #fff);
}

.hypothesis-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.hypothesis-name {
  font-size: 0.95rem;
}

.hypothesis-role {
  font-size: 0.75rem;
}

.hypothesis-body {
  font-size: 0.95rem;
  line-height: 1.5;
}

.hypothesis-type {
  margin: 0.4rem 0 0 0;
  background: var(--chip-bg, #f3f4f6);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  overflow-x: auto;
}

.scope-list,
.gap-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.scope-list li,
.gap-list li {
  margin: 0.25rem 0;
}

.explainer-falsifier {
  border-left: 3px solid #fcd34d;
  padding-left: 0.85rem;
  background: #fffbeb;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-radius: 0 8px 8px 0;
}

.invocation-block code,
.invocation-block pre {
  background: #0f172a;
  color: #e2e8f0;
}

.related-list,
.refs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.related-card,
.ref-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  border: 1px solid var(--border-soft, #f1f5f9);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.92rem;
}

.related-relation,
.ref-kind {
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--meta, #6b7280);
  background: var(--chip-bg, #f3f4f6);
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
}

.related-note {
  color: var(--meta, #6b7280);
  font-size: 0.88rem;
}

.explainer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-soft, #f1f5f9);
  font-size: 0.85rem;
}

.explainer-regenerate {
  text-decoration: underline;
}

.explainer-legacy {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fffaf0;
}

.explainer-legacy-head {
  margin-bottom: 0.75rem;
}

.explainer-empty {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
}

/* -----------------------------------------------------------------------
 * Recognition Explainer V2 — researcher-grade structured layout.
 * Appended 2026-05-10.
 * Cache key: ?v=20260510-explainer-v2
 * --------------------------------------------------------------------- */

.explainer-v2 {
  margin: 1rem 0 1.25rem 0;
  padding: 1.1rem 1.25rem 0.9rem 1.25rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: var(--card-bg, #fff);
}

.explainer-v2 .explainer-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.explainer-v2 .status-pill,
.explainer-v2 .proof-pill,
.explainer-v2 .confidence-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--chip-bg, #f3f4f6);
  color: var(--text, #111);
  letter-spacing: 0.01em;
}

.explainer-v2 .status-pill.status-proved {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.explainer-v2 .status-pill.status-conditional {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.explainer-v2 .status-pill.status-hypothesis_interface {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.explainer-v2 .status-pill.status-definition {
  background: #e0f2fe;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.explainer-v2 .status-pill.status-axiom {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #4c1d95;
}

.explainer-v2 .status-pill.status-scaffolding {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.explainer-v2 .status-pill.status-module {
  background: #e0f2fe;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.explainer-v2 .status-pill.status-open {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.explainer-v2 .status-pill.status-other {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1f2937;
}

.explainer-v2 .proof-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1f2937;
}

.explainer-v2 .proof-pill.proof-wrapper {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.explainer-v2 .proof-pill.proof-decidable_or_rfl {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.explainer-v2 .proof-pill.proof-sorry_stub {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.explainer-v2 .confidence-pill.confidence-high {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.explainer-v2 .confidence-pill.confidence-moderate {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.explainer-v2 .confidence-pill.confidence-low {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.explainer-v2 .explainer-title {
  margin: 0.25rem 0 0.5rem 0;
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 600;
}

.explainer-v2 .explainer-title code {
  font-size: 1.05em;
  background: transparent;
  padding: 0;
}

.explainer-v2 .explainer-tldr {
  margin: 0.2rem 0 0.7rem 0;
  font-size: 1.02rem;
  line-height: 1.55;
}

.explainer-v2 .explainer-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.4rem 1rem;
  margin: 0.6rem 0 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-soft, #f1f5f9);
}

.explainer-v2 .explainer-meta>div {
  display: flex;
  flex-direction: column;
}

.explainer-v2 .explainer-meta dt {
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--meta, #6b7280);
}

.explainer-v2 .explainer-meta dd {
  margin: 0;
  font-size: 0.92rem;
}

/* --- section shells --- */

.explainer-section {
  margin: 1.1rem 0;
}

.explainer-section .section-h {
  font-size: 1rem;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--meta, #6b7280);
  margin-bottom: 0.45rem;
}

.det-section .section-h::before {
  content: "deterministic · ";
  color: #94a3b8;
  font-weight: 500;
}

.prose-section .section-h::before {
  content: "grok · ";
  color: #94a3b8;
  font-weight: 500;
}

/* --- Lean source blocks --- */

.lean-source {
  background: var(--code-bg, #0f172a);
  color: #e2e8f0;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
}

.lean-source .ln {
  display: inline-block;
  min-width: 3em;
  margin-right: 0.7em;
  color: #64748b;
  user-select: none;
}

.lean-source .lc {
  white-space: pre;
}

.latex-translation {
  margin: 0.5rem 0 0 0;
  padding: 0.55rem 0.75rem;
  background: var(--chip-bg, #f1f5f9);
  border-radius: 6px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.proof-note {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--meta, #6b7280);
}

.proof-note-warn {
  color: #7f1d1d;
}

/* --- prose blocks --- */

.explainer-prose {
  font-size: 1rem;
  line-height: 1.6;
}

.explainer-prose p {
  margin: 0.4rem 0;
}

.explainer-prose code {
  background: var(--chip-bg, #f3f4f6);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-size: 0.92em;
}

.explainer-prose pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.86rem;
}

.scope-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.scope-list li {
  margin: 0.2rem 0;
}

.explainer-falsifier {
  border-left: 3px solid #fcd34d;
  padding-left: 0.85rem;
  background: #fffbeb;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-radius: 0 8px 8px 0;
}

/* --- graph edges --- */

.edge-list,
.sibling-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.3rem;
}

.edge-row,
.sibling-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  border: 1px solid var(--border-soft, #f1f5f9);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.92rem;
}

.edge-decl {
  font-weight: 500;
}

.edge-kind {
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--meta, #6b7280);
  background: var(--chip-bg, #f3f4f6);
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
}

/* --- footer / CTA --- */

.explainer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.2rem 0 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-soft, #f1f5f9);
  font-size: 0.84rem;
}

.explainer-regenerate {
  text-decoration: underline;
}

.explainer-cta {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fffaf0;
}

.explainer-source-context {
  margin-top: 1.5rem;
  opacity: 0.85;
}

/* -----------------------------------------------------------------------
 * Recognition Explainer V2.1 — prose-first layout.
 * Appended 2026-05-11.
 * Cache key: ?v=20260511-explainer-v2-1
 * --------------------------------------------------------------------- */

/* Override the V2 header pills/title spacing for the prose-first card. */
.explainer-v2 {
  padding: 1.2rem 1.4rem 1.1rem 1.4rem;
}

.explainer-v2 .explainer-title {
  margin: 0.3rem 0 0.8rem 0;
}

/* The explanation block: the main reason researchers come to the page. */
.explainer-explanation {
  padding: 0.6rem 0 0.2rem 0;
}

.explainer-explanation .explainer-tldr {
  margin: 0 0 0.85rem 0;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text, #111);
}

.explainer-explanation .explainer-statement {
  margin: 0.55rem 0;
  font-size: 1rem;
  line-height: 1.55;
  padding: 0.55rem 0.8rem 0.55rem 0.95rem;
  background: var(--chip-bg, #f1f5f9);
  border-radius: 8px;
  border-left: 3px solid #93c5fd;
}

.explainer-explanation .explainer-meaning {
  margin: 0.65rem 0 0 0;
  font-size: 0.98rem;
  line-height: 1.55;
}

.explainer-explanation .explainer-meaning p {
  margin: 0.35rem 0;
}

.explainer-explanation .explainer-meaning code {
  background: var(--chip-bg, #f3f4f6);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-size: 0.92em;
}

.explainer-label {
  display: inline-block;
  min-width: 7.5em;
  margin-right: 0.55em;
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: var(--meta, #6b7280);
  vertical-align: baseline;
}

.explainer-no-prose {
  padding: 0.5rem 0;
  border-top: 1px dashed var(--border-soft, #e5e7eb);
  margin-top: 0.5rem;
}

/* Suppress the V2 dl metadata grid; we now use a footer line. */
.explainer-v2 .explainer-meta {
  display: none;
}

/* Compact single-line footer. */
.explainer-coords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: baseline;
  margin: 1.25rem 0 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-soft, #f1f5f9);
  font-size: 0.82rem;
  color: var(--meta, #6b7280);
}

.explainer-coords code {
  background: var(--chip-bg, #f3f4f6);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-size: 0.92em;
}

.explainer-coords .explainer-regenerate {
  text-decoration: underline;
}

/* Remove the "deterministic ·" / "grok ·" prefixes from section headers in
   V2.1; the page audience is researchers, not pipeline operators. */
.det-section .section-h::before,
.prose-section .section-h::before {
  content: none;
}

/* Tighter section spacing. */
.explainer-section {
  margin: 1rem 0;
}

.explainer-section .section-h {
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}

/* -----------------------------------------------------------------------
 * Recognition Explainer V3 — context-rich prose layout.
 * Appended 2026-05-11.
 * Cache key: ?v=20260511-explainer-v3
 * --------------------------------------------------------------------- */

/* Background / proof idea / significance sections share a roomy prose look. */
.explainer-background,
.explainer-proof-idea,
.explainer-significance {
  margin: 1.15rem 0;
}

.explainer-background .explainer-prose,
.explainer-proof-idea .explainer-prose,
.explainer-significance .explainer-prose {
  font-size: 1rem;
  line-height: 1.62;
}

.explainer-background .explainer-prose p,
.explainer-proof-idea .explainer-prose p,
.explainer-significance .explainer-prose p {
  margin: 0.45rem 0;
}

/* Make the section headings a touch heavier so they read as real sections,
   not micro-labels. */
.explainer-section .section-h {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.55rem;
  color: var(--text, #111);
}

/* Background gets a soft left rail to mark it visually as the pre-read. */
.explainer-background {
  border-left: 3px solid #cbd5e1;
  padding-left: 0.9rem;
}

/* Significance gets a slightly stronger rail to mark its importance. */
.explainer-significance {
  border-left: 3px solid #93c5fd;
  padding-left: 0.9rem;
  background: #f8fbff;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-radius: 0 8px 8px 0;
}

/* Proof idea: subtle rail, no background. */
.explainer-proof-idea {
  border-left: 3px solid #fcd34d;
  padding-left: 0.9rem;
}

/* The boxed claim sits flush below TL;DR; tighten its margins so the page
   reads as a single explanation, not a stack of cards. */
.explainer-explanation .explainer-statement {
  margin-top: 0.55rem;
  margin-bottom: 0;
}

/* Inline code in prose is muted to keep prose readable. */
.explainer-background .explainer-prose code,
.explainer-proof-idea .explainer-prose code,
.explainer-significance .explainer-prose code {
  background: var(--chip-bg, #f1f5f9);
  padding: 0.05rem 0.32rem;
  border-radius: 4px;
  font-size: 0.92em;
}

/* Journal-grade peer-review sections (2026-05-12) */
.pr-journal-letter,
.pr-technical-assessment,
.pr-rs-audit,
.pr-required-revisions,
.pr-optional-revisions,
.pr-verification,
.pr-novelty {
  border-left: 3px solid var(--accent, #2563eb);
  padding-left: 1rem;
}

.pr-longform {
  white-space: pre-wrap;
  line-height: 1.62;
  font-size: 1rem;
}

.pr-required-list,
.pr-optional-list {
  line-height: 1.55;
}

.pr-required-list li,
.pr-optional-list li {
  margin: 0.45rem 0;
}

/* Claim ledger (2026-05-12) */
.pr-claim-ledger {
  margin-top: 1rem;
}

.pr-claim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 0.5rem;
}

.pr-claim-table th,
.pr-claim-table td {
  border-top: 1px solid var(--border-soft, #e5e7eb);
  padding: 0.42rem 0.5rem;
  vertical-align: top;
  text-align: left;
}

.pr-claim-table th {
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  background: var(--surface-muted, #f8fafc);
}

.pr-claim-id {
  font-family: var(--font-mono);
  font-weight: 600;
}

.pr-claim-text {
  line-height: 1.45;
}

.pr-claim-note {
  color: var(--text-muted, #4b5563);
}

.pr-claim-status-chip {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid var(--border, #cbd5f5);
  background: var(--surface-muted, #eef2ff);
}

.pr-claim-status-chip-verified {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

.pr-claim-status-chip-conditional {
  background: #f1f5ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.pr-claim-status-chip-plausible {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.pr-claim-status-chip-unsupported {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.pr-claim-status-chip-overclaimed {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}

.pr-claim-status-chip-out_of_scope {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

.pr-verification-grade {
  margin-top: 1rem;
}

.pr-vg-chip {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--accent, #2563eb);
  color: var(--accent, #2563eb);
  margin-right: 0.5rem;
}

.pr-vg-v0 {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.pr-vg-v1 {
  background: #f1f5ff;
  color: #1d4ed8;
}

.pr-vg-v2 {
  background: #ecfdf5;
  color: #047857;
  border-color: #6ee7b7;
}

.pr-vg-v3 {
  background: #dcfce7;
  color: #166534;
  border-color: #4ade80;
}

.pr-vg-v4 {
  background: #fef9c3;
  color: #854d0e;
  border-color: #fde68a;
}

.pr-vg-v5 {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}

.pr-vg-detail {
  font-size: 0.92rem;
  color: var(--text-muted, #4b5563);
}

/* end claim ledger */

/* Claim ledger cards redesign (2026-05-12) */
.pr-claim-ledger-cards {
  margin-top: 1.25rem;
}

.pr-claim-ledger-intro {
  margin: 0 0 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 12px;
  background: var(--surface, #fafaf7);
  line-height: 1.55;
}

.pr-claim-ledger-intro p {
  margin: 0.25rem 0;
}

.pr-claim-card-list {
  display: grid;
  gap: 0.9rem;
}

.pr-claim-card {
  border: 1px solid var(--rule, #d6d4ce);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.pr-claim-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.pr-claim-card-idline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pr-claim-id-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.pr-claim-location-pill {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--surface, #f3f1eb);
  color: var(--meta-fg, #6b6b6b);
  font-size: 0.82rem;
  white-space: nowrap;
}

.pr-claim-card-text {
  margin: 0.4rem 0 0.85rem;
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 520;
}

.pr-claim-card-meta {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(260px, 1fr);
  gap: 0.7rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule, #eee9df);
  border-bottom: 1px solid var(--rule, #eee9df);
}

.pr-claim-card-meta div {
  min-width: 0;
}

.pr-claim-card-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--meta-fg, #6b6b6b);
  margin-bottom: 0.2rem;
}

.pr-claim-card-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.pr-claim-card-meta code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.pr-claim-card-note h3 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--meta-fg, #6b6b6b);
}

.pr-claim-card-note p {
  margin: 0;
  line-height: 1.55;
  color: #1f2937;
}

.pr-claim-card-verified {
  border-left: 5px solid #10b981;
}

.pr-claim-card-conditional {
  border-left: 5px solid #3b82f6;
}

.pr-claim-card-plausible {
  border-left: 5px solid #f59e0b;
}

.pr-claim-card-unsupported,
.pr-claim-card-overclaimed {
  border-left: 5px solid #ef4444;
}

.pr-claim-card-out_of_scope {
  border-left: 5px solid #9ca3af;
}

@media (max-width: 760px) {
  .pr-claim-card-head {
    flex-direction: column;
  }

  .pr-claim-card-meta {
    grid-template-columns: 1fr;
  }
}

/* end claim ledger cards redesign */

/* Expanded peer-review decision categories (2026-05-12) */
.pr-rec-accept_with_metadata_fixes {
  color: #1c6f3c;
  background: #eefbf1;
  border-color: #bfe8cc;
}

.pr-rec-formalization_required {
  color: #5b3d8a;
  background: #f1ecfb;
  border-color: #d6c6f0;
}

.pr-rec-empirical_evidence_required {
  color: #82530a;
  background: #fff7e6;
  border-color: #f0d69a;
}

.pr-rec-out_of_scope {
  color: var(--meta-fg, #6b6b6b);
  background: var(--surface, #fafaf7);
  border-color: var(--rule, #d6d4ce);
}

/* end expanded peer-review decision categories */

/* Peer-review hero/share redesign (2026-05-12) */
.pr-hero {
  position: relative;
  margin: 0 0 1.4rem 0;
  padding: 1.2rem 1.35rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.pr-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.pr-kicker {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.pr-title-main {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  line-height: 1.16;
  color: var(--fg);
  text-wrap: balance;
}

.pr-share-panel {
  justify-self: end;
  min-width: 210px;
  text-align: right;
}

.pr-share-label {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}

.pr-share-toggle,
.pr-share-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
}

.pr-share-toggle-public,
.pr-share-state-public {
  color: var(--accept);
  border-color: rgba(0, 209, 138, 0.45);
  background: rgba(0, 209, 138, 0.09);
}

.pr-share-toggle-private,
.pr-share-state-private {
  color: var(--conditional);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.10);
}

.pr-share-toggle:hover {
  filter: brightness(1.08);
}

.pr-decision-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.95rem;
}

.pr-review-meta {
  color: var(--fg-2);
  font-size: 0.92rem;
}

.pr-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-top: 0.8rem;
  color: var(--fg-3);
  font-size: 0.9rem;
}

.pr-hero-meta code {
  color: var(--fg-2);
  background: var(--panel-2);
  padding: 0.05rem 0.3rem;
  border-radius: 5px;
}

.pr-rec,
.pr-conf,
.pr-canon,
.pr-vg-chip,
.pr-vis {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--fg-2);
}

.pr-rec-accept,
.pr-rec-accept_with_metadata_fixes,
.pr-rec-minor_revision,
.pr-canon-strong,
.pr-conf-high,
.pr-vg-v3,
.pr-vg-v4,
.pr-vg-v5,
.pr-vis-public {
  color: var(--accept);
  background: rgba(0, 209, 138, 0.09);
  border-color: rgba(0, 209, 138, 0.35);
}

.pr-rec-major_revision,
.pr-rec-formalization_required,
.pr-rec-empirical_evidence_required,
.pr-conf-moderate,
.pr-canon-partial,
.pr-vg-v1,
.pr-vg-v2,
.pr-vis-private {
  color: var(--conditional);
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.35);
}

.pr-rec-reject,
.pr-conf-low {
  color: var(--reject);
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.35);
}

.pr-canon-none,
.pr-canon-tangential,
.pr-rec-out_of_scope,
.pr-rec-uncertain,
.pr-vg-v0 {
  color: var(--fg-3);
  background: var(--panel-2);
  border-color: var(--line);
}

@media (prefers-color-scheme: light) {

  .pr-share-toggle-public,
  .pr-share-state-public,
  .pr-rec-accept,
  .pr-rec-accept_with_metadata_fixes,
  .pr-rec-minor_revision,
  .pr-canon-strong,
  .pr-conf-high,
  .pr-vg-v3,
  .pr-vg-v4,
  .pr-vg-v5,
  .pr-vis-public {
    color: #1c6f3c;
    background: #ebf6ee;
    border-color: #c4e2cf;
  }

  .pr-share-toggle-private,
  .pr-share-state-private,
  .pr-rec-major_revision,
  .pr-rec-formalization_required,
  .pr-rec-empirical_evidence_required,
  .pr-conf-moderate,
  .pr-canon-partial,
  .pr-vg-v1,
  .pr-vg-v2,
  .pr-vis-private {
    color: #82530a;
    background: #faf3e1;
    border-color: #ecdfb8;
  }
}

@media (max-width: 760px) {
  .pr-hero-top {
    grid-template-columns: 1fr;
  }

  .pr-share-panel {
    justify-self: start;
    text-align: left;
    min-width: 0;
  }

  .pr-share-toggle,
  .pr-share-state {
    width: 100%;
  }
}

/* end peer-review hero/share redesign */

/* Peer-review taxonomy chips (2026-05-12) */
.pr-taxonomy-row {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.pr-taxonomy-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.pr-taxonomy-label {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  margin-right: 0.2rem;
}

.pr-category-chip,
.pr-keyword-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--fg-2);
}

.pr-category-chip {
  color: var(--link);
  border-color: color-mix(in srgb, var(--link) 38%, var(--line));
  background: color-mix(in srgb, var(--link) 10%, var(--panel-2));
}

@media (prefers-color-scheme: light) {
  .pr-category-chip {
    color: #1a4ea3;
    border-color: #b8cff2;
    background: #eef5ff;
  }

  .pr-keyword-chip {
    color: #4a4a52;
    border-color: #ddd8cc;
    background: #f7f5ef;
  }
}

/* end peer-review taxonomy chips */

/* Peer-review Lean identifier rendering (2026-05-12) */
.pr-lean-link {
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--link) 55%, transparent);
}

.pr-lean-link:hover {
  text-decoration: none;
  border-bottom-color: var(--link);
}

.pr-lean-path {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--fg-2);
  letter-spacing: 0.01em;
}

.pr-lean-path code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  opacity: 0.85;
}

.pr-citations li,
.pr-evidence li {
  display: block;
  margin-bottom: 0.55rem;
}

.pr-claim-card-meta .pr-lean-path {
  display: block;
  margin-top: 0.2rem;
}

.pr-modules-list li {
  margin-bottom: 0.35rem;
}

.pr-modules-list .pr-lean-path {
  margin-left: 0.4rem;
}

@media (prefers-color-scheme: light) {
  .pr-lean-link {
    color: #1a4ea3;
    border-bottom-color: #9ab8e6;
  }

  .pr-lean-path {
    color: #5f5a52;
  }
}

/* end Lean identifier rendering */

/* Peer-review rerun button (2026-05-12) */
.pr-hero-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  justify-self: end;
}

.pr-rerun-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 0;
}

.pr-rerun-form {
  margin: 0;
}

.pr-rerun-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid color-mix(in srgb, var(--link) 55%, var(--line));
  background: color-mix(in srgb, var(--link) 12%, var(--panel-2));
  color: var(--link);
  cursor: pointer;
  white-space: nowrap;
}

.pr-rerun-button:hover {
  filter: brightness(1.1);
}

.pr-rerun-hint {
  font-size: 0.72rem;
  color: var(--fg-3);
  letter-spacing: 0.01em;
  text-align: right;
}

.pr-rerun-banner {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.88rem;
  border: 1px solid var(--line);
}

.pr-rerun-banner-error {
  background: rgba(239, 68, 68, 0.12);
  color: #f7b8b8;
  border-color: rgba(239, 68, 68, 0.45);
}

.pr-rerun-banner-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #f3d28a;
  border-color: rgba(245, 158, 11, 0.45);
}

@media (prefers-color-scheme: light) {
  .pr-rerun-button {
    color: #1a4ea3;
    border-color: #b8cff2;
    background: #eef5ff;
  }

  .pr-rerun-hint {
    color: #6f6960;
  }

  .pr-rerun-banner-error {
    background: #fde7e7;
    color: #7a1a1a;
    border-color: #f0b8b8;
  }

  .pr-rerun-banner-warn {
    background: #fdf2d6;
    color: #6a4d00;
    border-color: #ecd58a;
  }
}

@media (max-width: 760px) {
  .pr-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pr-rerun-panel {
    align-items: flex-start;
  }

  .pr-rerun-button {
    width: 100%;
  }

  .pr-rerun-hint {
    text-align: left;
  }
}

/* end peer-review rerun button */

/* Recognition Science audit restructure (2026-05-12) */
.pr-rs-audit-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.pr-rs-glossary {
  font-size: 0.82rem;
  color: var(--fg-2);
}

.pr-rs-glossary>summary {
  cursor: pointer;
  list-style: none;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--fg-2) 45%, var(--line));
  background: var(--panel-2);
}

.pr-rs-glossary>summary::-webkit-details-marker {
  display: none;
}

.pr-rs-glossary[open]>summary {
  border-style: solid;
}

.pr-rs-glossary dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 0.85rem;
  margin: 0.6rem 0 0;
  padding: 0.75rem 0.95rem;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

.pr-rs-glossary dt {
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.pr-rs-glossary dd {
  margin: 0;
  color: var(--fg-2);
}

.pr-rs-audit-summary {
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0.85rem 0 1.1rem;
  padding-left: 0.85rem;
  border-left: 3px solid color-mix(in srgb, var(--link) 55%, var(--line));
}

.pr-rs-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.95rem;
  margin: 0.5rem 0 1.1rem;
}

.pr-rs-bucket {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.pr-rs-bucket-h {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  color: var(--fg-2);
}

.pr-rs-bucket ul {
  margin: 0;
  padding-left: 1.05rem;
}

.pr-rs-bucket li {
  margin-bottom: 0.55rem;
  line-height: 1.5;
}

.pr-rs-bucket-text {
  color: var(--fg);
}

.pr-rs-bucket-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--link) 50%, transparent);
}

.pr-rs-bucket-link:hover {
  border-bottom-color: var(--link);
}

.pr-rs-bucket-empty {
  margin: 0;
  font-style: italic;
  color: var(--fg-3);
  font-size: 0.88rem;
}

.pr-rs-bucket-paper {
  border-top: 3px solid color-mix(in srgb, var(--accept) 70%, var(--line));
}

.pr-rs-bucket-rs {
  border-top: 3px solid color-mix(in srgb, var(--link) 70%, var(--line));
}

.pr-rs-bucket-open {
  border-top: 3px solid color-mix(in srgb, var(--conditional) 70%, var(--line));
}

.pr-rs-audit-detail {
  margin-top: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.pr-rs-audit-detail>summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-2);
  list-style: revert;
}

.pr-rs-audit-detail .pr-longform {
  margin-top: 0.65rem;
}

@media (prefers-color-scheme: light) {
  .pr-rs-glossary dl {
    background: #f7f5ef;
    border-color: #ddd8cc;
  }

  .pr-rs-glossary>summary {
    border-color: #c8c2b3;
    background: #f7f5ef;
    color: #4a4438;
  }

  .pr-rs-bucket {
    background: #faf8f2;
    border-color: #ddd8cc;
  }

  .pr-rs-bucket-h {
    color: #5a5347;
  }

  .pr-rs-bucket-text {
    color: #14141a;
  }

  .pr-rs-bucket-empty {
    color: #7a7468;
  }

  .pr-rs-audit-summary {
    border-left-color: #9ab8e6;
  }
}

@media (max-width: 760px) {
  .pr-rs-audit-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .pr-rs-buckets {
    grid-template-columns: 1fr;
  }
}

/* end Recognition Science audit restructure */

/* Peer-review tag hover affordances (2026-05-12) */
.pr-rec,
.pr-conf,
.pr-canon,
.pr-vg-chip,
.pr-vis,
.pr-share-toggle,
.pr-share-state,
.pr-claim-status-chip,
.pr-claim-id-badge,
.pr-claim-location-pill,
.pr-category-chip,
.pr-keyword-chip,
.pr-rel,
.pr-inline-tag {
  cursor: help;
}

/* Actual click targets keep the pointer cursor even when they carry a
 * data-tooltip; the tooltip bubble is enough hover-affordance.
 */
.pr-rerun-button,
button.pr-rerun-button,
a.pr-rerun-button,
.journal-cta-primary,
.theorem-view-toggle-button {
  cursor: pointer;
}

.pr-rerun-button-disabled,
.pr-rerun-button-disabled:hover {
  cursor: not-allowed;
}

.pr-inline-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.06rem 0.32rem;
  border-radius: 999px;
  border: 1px dotted color-mix(in srgb, var(--fg-2) 45%, transparent);
  color: var(--fg-2);
  background: color-mix(in srgb, var(--panel-2) 80%, transparent);
  line-height: 1.35;
}

.pr-inline-tag:hover,
.pr-category-chip:hover,
.pr-keyword-chip:hover,
.pr-claim-status-chip:hover,
.pr-vg-chip:hover,
.pr-rec:hover,
.pr-share-toggle:hover,
.pr-share-state:hover,
.pr-rel:hover {
  filter: brightness(1.08);
}

@media (prefers-color-scheme: light) {
  .pr-inline-tag {
    border-color: #c8c2b3;
    color: #4a4438;
    background: #f7f5ef;
  }
}

/* end peer-review tag hover affordances */

/* Peer-review manuscript author metadata (2026-05-12) */
.pr-manuscript-meta {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
}

.pr-author-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.pr-author-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  border: 1px solid color-mix(in srgb, var(--link) 32%, var(--line));
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  background: color-mix(in srgb, var(--link) 7%, var(--panel-2));
  color: var(--fg);
  cursor: help;
}

.pr-author-chip strong {
  font-weight: 650;
}

.pr-author-chip sup {
  color: var(--link);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.pr-affiliation-list {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--fg-2);
  font-size: 0.86rem;
  line-height: 1.45;
}

.pr-affiliation-list li {
  margin-bottom: 0.28rem;
}

.pr-affiliation-key {
  display: inline-flex;
  min-width: 1.4rem;
  margin-right: 0.25rem;
  color: var(--link);
  font-weight: 700;
}

@media (prefers-color-scheme: light) {
  .pr-author-chip {
    color: #14141a;
    border-color: #b8cff2;
    background: #eef5ff;
  }

  .pr-affiliation-list {
    color: #5f5a52;
  }
}

/* end peer-review manuscript author metadata */

/* Peer-review metadata editor (2026-05-12) */
.pr-source-title-note {
  margin-top: 0.35rem;
  color: var(--fg-3);
  font-size: 0.82rem;
}

.pr-metadata-editor {
  margin-top: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
}

.pr-metadata-editor>summary {
  cursor: pointer;
  color: var(--fg-2);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pr-metadata-editor form {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.pr-metadata-editor label {
  display: grid;
  gap: 0.25rem;
  color: var(--fg-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pr-metadata-editor input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--fg);
  padding: 0.45rem 0.55rem;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
}

.pr-metadata-editor button {
  justify-self: start;
  border: 1px solid color-mix(in srgb, var(--link) 55%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--link) 12%, var(--panel-2));
  color: var(--link);
  padding: 0.42rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

@media (prefers-color-scheme: light) {
  .pr-metadata-editor {
    background: #faf8f2;
    border-color: #ddd8cc;
  }

  .pr-metadata-editor input {
    background: #fff;
    color: #14141a;
  }
}

/* end peer-review metadata editor */

/* Footer institute line (2026-05-12) */
.footer-institute {
  color: var(--fg-2);
  line-height: 1.45;
}

.footer-institute a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--link) 55%, transparent);
}

.footer-institute a:hover {
  border-bottom-color: var(--link);
}

/* end footer institute line */

/* Pith Journal (2026-05-12) */
.journal-page {
  max-width: 920px;
}

.journal-hero {
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.journal-hero h1 {
  font-size: 1.85rem;
  margin: 0.2rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.journal-lede {
  font-size: 1.05rem;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0.4rem 0;
}

.journal-authors {
  color: var(--fg-2);
  font-size: 0.95rem;
  margin: 0.1rem 0 0.6rem;
}

.journal-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 0.95rem;
  align-items: center;
}

.journal-cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--link) 18%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--link) 55%, var(--line));
  color: var(--link);
  text-decoration: none;
  font-weight: 700;
}

.journal-cta-primary:hover {
  filter: brightness(1.1);
}

.journal-cta-link {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--link) 55%, transparent);
  padding-bottom: 0.05rem;
}

.journal-cta-link:hover {
  border-bottom-color: var(--link);
}

.journal-section {
  margin: 26px 0;
}

.journal-section h2 {
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  margin: 0 0 0.6rem;
}

.journal-states {
  margin: 0 0 0.4rem 1.2rem;
  color: var(--fg-2);
  line-height: 1.55;
}

.journal-floors {
  margin: 0 0 0.4rem 1.2rem;
  color: var(--fg-2);
  line-height: 1.55;
}

.journal-flow {
  margin: 0 0 0.4rem 1.2rem;
  color: var(--fg-2);
  line-height: 1.55;
}

.journal-rubric {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.journal-rubric th,
.journal-rubric td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.journal-rubric th {
  color: var(--fg-2);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

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

.journal-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.journal-list-authors {
  display: inline-block;
  margin-left: 0.6rem;
  color: var(--fg-2);
  font-size: 0.92rem;
}

.journal-list-meta {
  display: block;
  color: var(--fg-3);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.journal-endorsements,
.journal-objections {
  list-style: none;
  margin: 0;
  padding: 0;
}

.journal-endorsements li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.journal-objections li {
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--line);
  background: color-mix(in srgb, var(--panel-2) 60%, transparent);
  margin-bottom: 0.65rem;
  border-radius: 0 8px 8px 0;
}

.journal-objections li.severity-blocking {
  border-left-color: color-mix(in srgb, var(--reject) 70%, var(--line));
}

.journal-objections li.severity-major {
  border-left-color: color-mix(in srgb, var(--conditional) 70%, var(--line));
}

.journal-objections li.severity-minor {
  border-left-color: color-mix(in srgb, var(--link) 55%, var(--line));
}

.journal-objection-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.journal-author-response {
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.65rem;
  border-left: 2px solid color-mix(in srgb, var(--accept) 65%, var(--line));
  background: color-mix(in srgb, var(--accept) 8%, var(--panel-2));
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
}

.journal-form {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.journal-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.journal-form input,
.journal-form textarea,
.journal-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--fg);
  padding: 0.45rem 0.55rem;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
}

.journal-form button {
  justify-self: start;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--link) 55%, var(--line));
  background: color-mix(in srgb, var(--link) 12%, var(--panel-2));
  color: var(--link);
  font-weight: 700;
  cursor: pointer;
}

.journal-decision-letter {
  white-space: pre-wrap;
  font-family: ui-monospace, monospace;
  font-size: 0.86rem;
  padding: 0.6rem 0.75rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  margin-top: 0.35rem;
}

.journal-decision-log {
  margin: 0;
  padding-left: 1.2rem;
}

.journal-decision-log li {
  margin-bottom: 0.65rem;
}

@media (prefers-color-scheme: light) {

  .journal-form input,
  .journal-form textarea,
  .journal-form select {
    background: #fff;
    color: #14141a;
  }
}

/* end Pith Journal */

/* Journal submission two-step explainer (2026-05-12) */
.pr-journal-steps {
  margin-top: 0.85rem;
  padding: 0.7rem 0.9rem 0.7rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}

.pr-journal-steps li {
  margin-bottom: 0.45rem;
}

.pr-journal-steps li:last-child {
  margin-bottom: 0;
}

@media (prefers-color-scheme: light) {
  .pr-journal-steps {
    background: #faf8f2;
    border-color: #ddd8cc;
  }
}

/* end journal submission two-step explainer */

/* Peer-review new-version and canon contribution lanes (2026-05-13) */
.journal-fee-box {
  border: 1px solid color-mix(in srgb, var(--conditional) 50%, var(--line));
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: color-mix(in srgb, var(--conditional) 8%, var(--panel-2));
}

.journal-checkline {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 0.45rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.journal-checkline input {
  width: auto !important;
}

.pr-canon-contribution-editor textarea {
  min-height: 10rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.pr-canon-contributions .journal-list li {
  display: grid;
  gap: 0.25rem;
}

@media (prefers-color-scheme: light) {
  .journal-fee-box {
    background: #fbf4df;
    border-color: #e5d08f;
  }
}

/* end peer-review new-version and canon contribution lanes */

/* Pith Journal admin controls (2026-05-13) */
.journal-admin-controls {
  border: 1px solid color-mix(in srgb, var(--link) 45%, var(--line));
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: color-mix(in srgb, var(--link) 7%, var(--panel-2));
}

.journal-admin-mini-form {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}

.journal-admin-mini-form button,
.journal-admin-inline-form button {
  border: 1px solid color-mix(in srgb, var(--link) 55%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--link) 12%, var(--panel-2));
  color: var(--link);
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.journal-admin-table {
  font-size: 0.86rem;
}

.journal-admin-table td {
  vertical-align: top;
}

.journal-admin-inline-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) auto;
  gap: 0.35rem;
}

.journal-admin-inline-form select,
.journal-admin-inline-form input {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--fg);
  padding: 0.3rem 0.45rem;
}

@media (prefers-color-scheme: light) {
  .journal-admin-controls {
    background: #eef5ff;
    border-color: #b8cff2;
  }

  .journal-admin-inline-form select,
  .journal-admin-inline-form input {
    background: #fff;
    color: #14141a;
  }
}

/* end Pith Journal admin controls */

/* Published journal right rail (2026-05-13) */
.journal-rail-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.journal-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.58rem;
}

.journal-rail-list li {
  display: grid;
  gap: 0.18rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.journal-rail-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.journal-rail-list a {
  color: var(--fg);
  text-decoration: none;
  line-height: 1.25;
}

.journal-rail-list a:hover {
  color: var(--link);
}

/* end published journal right rail */

/* ---------- Pith Journal: article page (2026-05-13 redesign) ----------
   Two-column long-form reading surface using site tokens. Body in serif
   at optimal width with a sticky right rail for verdict + TOC + jumps.
   Falls back to single column under 1100px. */

.journal-article {
  --journal-rail-w: 280px;
  --journal-body-w: 720px;
  --journal-gutter: clamp(1rem, 3vw, 2.25rem);
  --journal-topbar-offset: 110px;
  max-width: calc(var(--journal-body-w) + var(--journal-rail-w) + 4rem);
  margin: 0 auto;
  padding: 1.4rem var(--journal-gutter) 5rem;
  color: var(--fg);
  font-family: var(--font-prose);
  font-size: 1.05rem;
  line-height: 1.65;
}

.journal-article .skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.journal-article .skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  display: inline-block;
  padding: 0.4rem 0.7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg);
}

.journal-article-crumbs {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--fg-3);
  letter-spacing: 0.02em;
  margin-bottom: 1.2rem;
}

.journal-article-crumbs a {
  color: var(--fg-3);
  border-bottom-color: transparent;
}

.journal-article-crumbs a:hover {
  color: var(--link);
  border-bottom-color: var(--link);
}

/* ---- Masthead ---- */

.journal-article-masthead {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
  margin-bottom: 1.8rem;
}

.journal-article-masthead-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 0.85rem;
}

.journal-article-masthead-mark {
  color: var(--fg);
  font-weight: 600;
}

.journal-article-masthead-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--fg-3);
}

.journal-article-masthead-meta .sep {
  color: var(--fg-3);
  opacity: 0.5;
}

.journal-article-masthead-rubric {
  color: var(--fg-2);
}

.journal-article-title {
  font-family: var(--font-prose);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0.2rem 0 0.8rem;
}

.journal-article-authors-line {
  font-family: var(--font-prose);
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--fg);
  margin: 0 0 0.25rem;
}

.journal-article-authors-line .author-sup {
  font-size: 0.7em;
  color: var(--fg-3);
  margin-left: 0.1rem;
}

.journal-article-affs-line {
  font-family: var(--font-prose);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--fg-2);
  margin: 0 0 0.85rem;
}

.journal-article-affs-line .aff-id {
  color: var(--fg-3);
  font-size: 0.78em;
  margin-right: 0.2rem;
}

.journal-article-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.18rem 0.75rem;
  margin: 0.9rem 0 1.1rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  max-width: 60ch;
}

.journal-article-meta dt {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  align-self: center;
}

.journal-article-meta dd {
  margin: 0;
  color: var(--fg-2);
}

.journal-article-meta dd a {
  color: var(--link);
}

/* ---- Action bar (three-tier) ---- */

.journal-article-actionbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin-top: 1rem;
}

.journal-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.48rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.journal-action:hover {
  border-color: var(--fg-2);
  color: var(--fg);
}

.journal-action-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.journal-action-primary:hover {
  background: var(--fg-2);
  color: var(--bg);
  border-color: var(--fg-2);
}

.journal-action-tertiary {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--fg-3);
  text-decoration: none;
  border-bottom: 1px dotted var(--fg-3);
  padding-bottom: 1px;
  margin-left: 0.25rem;
}

.journal-action-tertiary:hover {
  color: var(--link);
  border-bottom-color: var(--link);
}

.journal-action-arrow {
  font-size: 0.85em;
  opacity: 0.7;
}

/* ---- Admin strip ---- */

.journal-article-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  background: color-mix(in srgb, var(--conditional) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--conditional) 35%, var(--line));
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  margin: 0 0 1.4rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--fg-2);
}

.journal-article-admin a {
  color: var(--link);
}

.journal-article-admin-warn {
  color: var(--conditional);
  font-weight: 600;
}

/* ---- Two-column layout (sticky right rail) ---- */

.journal-article-layout {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

@media (min-width: 1100px) {
  .journal-article-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--journal-body-w)) var(--journal-rail-w);
    column-gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
  }

  .journal-article-rail {
    position: sticky;
    top: var(--journal-topbar-offset);
    max-height: calc(100vh - var(--journal-topbar-offset) - 1rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
    /* Subtle scrollbar styling so the rail does not look noisy */
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }

  .journal-article-rail::-webkit-scrollbar { width: 6px; }
  .journal-article-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

  .journal-article-toc-mobile { display: none; }
}

@media (max-width: 1099px) {
  .journal-article-rail .journal-rail-toc {
    /* Desktop rail TOC duplicates the mobile <details> TOC; hide it on mobile */
    display: none;
  }
}

.journal-article-main {
  min-width: 0;
}

/* ---- Abstract card ---- */

.journal-article-abstract {
  margin: 0 0 1.6rem;
  padding: 1.1rem 1.3rem 1.2rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.journal-article-eyebrow {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 0.5rem;
}

.journal-article-abstract p {
  margin: 0 0 0.85rem;
  font-family: var(--font-prose);
  font-size: 1.0rem;
  line-height: 1.65;
  color: var(--fg);
}

.journal-article-abstract p:last-of-type { margin-bottom: 0; }

.journal-article-abstract-tail {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--fg-2);
  display: grid;
  gap: 0.3rem;
}

.journal-article-abstract-tail strong {
  color: var(--fg-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  margin-right: 0.4rem;
}

/* ---- Mobile collapsible TOC ---- */

.journal-article-toc-mobile {
  margin: 0 0 1.5rem;
  padding: 0.55rem 0.85rem 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-prose);
}

.journal-article-toc-mobile summary {
  cursor: pointer;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0.35rem 0;
}

.journal-article-toc-mobile summary:hover { color: var(--link); }

.journal-article-toc-mobile ol {
  list-style: none;
  padding: 0.4rem 0 0;
  margin: 0;
  display: grid;
  gap: 0.25rem;
  font-size: 0.92rem;
}

.journal-article-toc-mobile li.journal-article-toc-level-3 {
  padding-left: 1.1rem;
  font-size: 0.86rem;
  color: var(--fg-2);
}

.journal-article-toc-mobile a {
  color: var(--fg);
  border-bottom-color: transparent;
}

.journal-article-toc-mobile a:hover {
  color: var(--link);
  border-bottom-color: var(--link);
}

/* ---- Article body typography ---- */

.journal-article-body {
  font-family: var(--font-prose);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--fg);
}

.journal-article-body > *:first-child { margin-top: 0; }

.journal-article-body h1,
.journal-article-body h2,
.journal-article-body h3,
.journal-article-body h4 {
  font-family: var(--font-prose);
  color: var(--fg);
  letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--journal-topbar-offset) + 0.5rem);
  position: relative;
}

.journal-article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.4rem 0 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  letter-spacing: -0.012em;
}

.journal-article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.6rem 0 0.6rem;
  color: var(--fg);
}

.journal-article-body h4 {
  font-size: 1.02rem;
  font-weight: 600;
  font-style: italic;
  margin: 1.2rem 0 0.45rem;
  color: var(--fg-2);
}

.journal-article-body h5,
.journal-article-body h6 {
  font-family: var(--font-prose);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1.1rem 0 0.35rem;
  color: var(--fg-2);
}

.journal-heading-permalink {
  position: absolute;
  left: -1.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--fg-3);
  opacity: 0;
  text-decoration: none;
  border-bottom: 0;
  padding: 0 0.3rem;
  transition: opacity 100ms ease;
}

.journal-article-body :where(h2, h3, h4):hover .journal-heading-permalink,
.journal-heading-permalink:focus-visible {
  opacity: 1;
}

.journal-heading-permalink:hover { color: var(--link); }

.journal-article-body p {
  margin: 0 0 0.95rem;
}

.journal-article-body ul,
.journal-article-body ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.4rem;
}

.journal-article-body li {
  margin: 0.18rem 0;
}

.journal-article-body figure {
  margin: 1.4rem 0;
}

.journal-article-body figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.journal-article-body figcaption {
  color: var(--fg-3);
  font-size: 0.85rem;
  margin-top: 0.45rem;
  text-align: center;
}

.journal-article-body blockquote {
  margin: 1.1rem 0;
  padding: 0.6rem 0 0.6rem 1.1rem;
  border-left: 3px solid var(--line);
  color: var(--fg-2);
  font-style: italic;
}

.journal-article-body code {
  background: var(--panel-2);
  padding: 0.08rem 0.32rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--fg);
}

.journal-article-body pre {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 0.8rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--fg);
  margin: 1rem 0;
}

.journal-article-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.journal-article-body a {
  color: var(--link);
}

.journal-article-body .pith-eq {
  display: block;
  margin: 1.1rem auto;
  text-align: center;
  overflow-x: auto;
}

.journal-article-body .pith-cite {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  color: var(--link);
  cursor: help;
  padding: 0 0.05rem;
}

/* ---- Theorem callouts (site palette) ---- */

.journal-article-body .pith-thm {
  padding: 0.7rem 1.0rem 0.75rem;
  margin: 1.2rem 0;
  border-left: 3px solid var(--line);
  background: var(--panel-2);
  border-radius: 0 6px 6px 0;
}

.journal-article-body .pith-thm p:last-child { margin-bottom: 0; }

.journal-article-body .pith-thm-theorem,
.journal-article-body .pith-thm-proposition,
.journal-article-body .pith-thm-corollary {
  border-left-color: var(--accept);
  background: color-mix(in srgb, var(--accept) 7%, var(--panel-2));
}

.journal-article-body .pith-thm-lemma,
.journal-article-body .pith-thm-definition {
  border-left-color: var(--fg-3);
  background: var(--panel-2);
}

.journal-article-body .pith-thm-claim,
.journal-article-body .pith-thm-conjecture {
  border-left-color: var(--conditional);
  background: color-mix(in srgb, var(--conditional) 7%, var(--panel-2));
}

.journal-article-body .pith-thm-remark,
.journal-article-body .pith-thm-example {
  border-left-color: var(--fg-3);
  background: transparent;
  font-size: 0.97em;
}

.journal-article-body .pith-thm-proof {
  border-left-color: var(--fg-3);
  background: transparent;
  font-style: italic;
  color: var(--fg-2);
}

/* ---- PDF-only fallback ---- */

.journal-article-pdf-only {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.journal-article-pdf-only h2 {
  margin-top: 0;
  font-family: var(--font-prose);
}

.journal-pdf-embed {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 0.7rem;
  background: var(--panel);
}

/* ---- Theorem index card grid ---- */

.journal-article-theorem-index {
  margin: 2.4rem 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.journal-article-theorem-index h2 {
  font-family: var(--font-prose);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--fg);
}

.journal-article-theorem-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.7rem;
}

.journal-article-theorem-index li {
  padding: 0.7rem 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-prose);
  font-size: 0.92rem;
  line-height: 1.45;
}

.journal-article-theorem-index .thm-kind {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accept);
  margin-bottom: 0.3rem;
}

.journal-article-theorem-index a {
  color: var(--fg);
}

.journal-article-theorem-index a:hover { color: var(--link); }

/* ---- Peer-review panel (cards) ---- */

.journal-article-review {
  margin-top: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.journal-article-review h2 {
  font-family: var(--font-prose);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--fg);
}

.journal-article-review h3 {
  font-family: var(--font-prose);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.4rem 0 0.6rem;
}

.journal-review-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
  margin: 0.6rem 0 1.2rem;
}

.journal-review-summary-card {
  padding: 0.7rem 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.journal-review-summary-card-label {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 0.3rem;
}

.journal-review-summary-card-value {
  font-family: var(--font-prose);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
}

.journal-review-summary-card-value-sub {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--fg-2);
  margin-left: 0.3rem;
}

.journal-decision-letter-prose {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  background: var(--panel-2);
  border-left: 3px solid var(--accept);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-prose);
  font-size: 1.0rem;
  line-height: 1.6;
  color: var(--fg);
  white-space: pre-wrap;
}

.journal-decision-letter-byline {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--fg-3);
  margin-top: 0.45rem;
}

.journal-endorsements,
.journal-objections {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.journal-endorsements li,
.journal-objections li {
  padding: 0.7rem 0.9rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-prose);
  font-size: 0.95rem;
  line-height: 1.5;
}

.journal-objection-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.journal-author-response {
  margin: 0.45rem 0 0;
  padding: 0.45rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.92em;
  color: var(--fg-2);
  font-style: italic;
}

/* ---- References (structured grid) ---- */

.journal-article-references {
  margin-top: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.journal-article-references h2 {
  font-family: var(--font-prose);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--fg);
}

.journal-article-references > .meta {
  margin: 0 0 1rem;
}

.journal-reference-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  counter-reset: refnum;
}

.journal-reference {
  display: grid;
  grid-template-columns: 4.5rem 1fr 0.9rem;
  gap: 0.6rem 0.85rem;
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  font-family: var(--font-prose);
  font-size: 0.94rem;
  line-height: 1.5;
  align-items: start;
  transition: background 100ms ease;
}

.journal-reference:hover {
  background: var(--panel-2);
}

.journal-reference:target {
  background: color-mix(in srgb, var(--accept) 8%, transparent);
  outline: 1px solid color-mix(in srgb, var(--accept) 35%, var(--line));
}

.journal-reference-key {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--fg-3);
  font-weight: 600;
}

.journal-reference-key a {
  color: var(--link);
  border-bottom-color: transparent;
}

.journal-reference-key a:hover {
  border-bottom-color: var(--link);
}

.journal-reference-body {
  color: var(--fg);
}

.journal-reference-badge {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-top: 0.35rem;
  justify-self: center;
  cursor: help;
  background: var(--unverdicted);
}

.journal-reference-badge-resolved { background: var(--accept); }
.journal-reference-badge-enriched { background: var(--accept); }
.journal-reference-badge-raw { background: var(--conditional); }
.journal-reference-badge-manual { background: var(--conditional); }
.journal-reference-badge-unresolved { background: var(--unverdicted); }

/* ---- Decision log timeline ---- */

.journal-article-decision-log {
  margin-top: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.journal-article-decision-log h2 {
  font-family: var(--font-prose);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--fg);
}

.journal-decision-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.journal-decision-timeline::before {
  content: "";
  position: absolute;
  left: 4.1rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--line);
}

.journal-decision-entry {
  display: grid;
  grid-template-columns: 4rem 1fr;
  column-gap: 1rem;
  margin: 0 0 1rem;
  position: relative;
}

.journal-decision-marker {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--fg-3);
  text-align: right;
  padding-top: 0.6rem;
  position: relative;
}

.journal-decision-marker::after {
  content: "";
  position: absolute;
  right: -0.45rem;
  top: 0.85rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--fg-3);
}

.journal-decision-entry-published .journal-decision-marker::after {
  border-color: var(--accept);
  background: var(--accept);
}

.journal-decision-entry-declined .journal-decision-marker::after,
.journal-decision-entry-withdrawn .journal-decision-marker::after,
.journal-decision-entry-revise_and_resubmit .journal-decision-marker::after {
  border-color: var(--reject);
}

.journal-decision-entry-eligible .journal-decision-marker::after,
.journal-decision-entry-candidate_opened .journal-decision-marker::after,
.journal-decision-entry-candidate_extended .journal-decision-marker::after {
  border-color: var(--conditional);
}

.journal-decision-card {
  padding: 0.7rem 0.95rem 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-prose);
}

.journal-decision-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.journal-decision-pill {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.16rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  color: var(--fg-2);
  background: var(--bg);
}

.journal-decision-pill-published {
  color: var(--bg);
  background: var(--accept);
  border-color: var(--accept);
}

.journal-decision-pill-declined,
.journal-decision-pill-withdrawn,
.journal-decision-pill-revise_and_resubmit {
  color: var(--bg);
  background: var(--reject);
  border-color: var(--reject);
}

.journal-decision-pill-eligible,
.journal-decision-pill-candidate_opened,
.journal-decision-pill-candidate_extended {
  color: var(--bg);
  background: var(--conditional);
  border-color: var(--conditional);
}

.journal-decision-card .meta {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--fg-3);
}

.journal-decision-letter {
  margin: 0.5rem 0 0;
  font-family: var(--font-prose);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--fg);
  white-space: pre-wrap;
}

/* ---- Right rail ---- */

.journal-article-rail {
  display: grid;
  gap: 0.85rem;
  font-family: var(--font-prose);
}

.journal-rail-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 0.95rem 0.9rem;
}

.journal-rail-eyebrow {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 0.55rem;
}

/* Verdict card */

.journal-rail-verdict {
  padding: 0.95rem 1rem 1.05rem;
}

.journal-rail-verdict-score {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.journal-rail-verdict-num {
  font-family: var(--font-prose);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1;
}

.journal-rail-verdict-num-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}

.journal-rail-verdict-grade {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--fg-3);
}

.journal-rail-verdict-grade-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg);
  font-weight: 600;
}

.journal-rail-verdict-bars {
  display: grid;
  gap: 0.32rem;
  margin: 0.4rem 0 0.75rem;
}

.journal-rail-verdict-bar {
  display: grid;
  grid-template-columns: 0.7fr 1fr 0.3fr;
  align-items: center;
  gap: 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  color: var(--fg-3);
}

.journal-rail-verdict-bar-label {
  white-space: nowrap;
}

.journal-rail-verdict-bar-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.journal-rail-verdict-bar-fill {
  height: 100%;
  background: var(--accept);
  border-radius: 2px;
}

.journal-rail-verdict-bar-fill.is-low { background: var(--reject); }
.journal-rail-verdict-bar-fill.is-mid { background: var(--conditional); }

.journal-rail-verdict-bar-num {
  text-align: right;
  color: var(--fg-2);
}

.journal-rail-link {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted var(--link);
  margin-top: 0.35rem;
}

.journal-rail-link:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* Rail TOC */

.journal-rail-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.18rem;
}

.journal-rail-toc-item a {
  display: grid;
  grid-template-columns: 0.55rem 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.22rem 0;
  font-family: var(--font-prose);
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--fg-2);
  border-bottom: 0;
}

.journal-rail-toc-item a:hover {
  color: var(--fg);
}

.journal-rail-toc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: background 120ms ease, transform 120ms ease;
}

.journal-rail-toc-item.is-active a {
  color: var(--fg);
  font-weight: 600;
}

.journal-rail-toc-item.is-active .journal-rail-toc-dot {
  background: var(--accept);
  transform: scale(1.4);
}

.journal-rail-toc-level-3 {
  display: none;
  padding-left: 0.95rem;
}

.journal-rail-toc-level-3 a {
  font-size: 0.8rem;
  color: var(--fg-3);
}

.journal-rail-toc[data-show-subs="1"] .journal-rail-toc-level-3 {
  display: block;
}

.journal-rail-toc-toggle {
  margin-top: 0.55rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--fg-3);
  background: transparent;
  border: 0;
  padding: 0.18rem 0;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.02em;
}

.journal-rail-toc-toggle:hover { color: var(--link); }

/* Rail meta strip */

.journal-rail-meta dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.22rem 0.6rem;
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.74rem;
}

.journal-rail-meta dt {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.66rem;
}

.journal-rail-meta dd {
  margin: 0;
  color: var(--fg-2);
  word-break: break-word;
}

.journal-rail-meta a { color: var(--link); }

/* Rail jump anchors */

.journal-rail-jumps ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.28rem;
  font-family: var(--font-prose);
  font-size: 0.88rem;
}

.journal-rail-jumps a {
  color: var(--fg-2);
  border-bottom: 1px dotted var(--line);
}

.journal-rail-jumps a:hover {
  color: var(--link);
  border-bottom-color: var(--link);
}

/* ---- Scroll progress hairline ---- */

.journal-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: var(--progress, 0%);
  background: var(--accept);
  z-index: 200;
  pointer-events: none;
  transition: width 60ms linear;
}

/* ---- Debug panel (admin only) ---- */

.journal-article-debug {
  margin-top: 1.6rem;
  padding: 0.8rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--reject) 4%, var(--panel-2));
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--fg-2);
}

.journal-article-debug ul {
  padding-left: 1.2rem;
  margin: 0.4rem 0 0;
}

/* ---- Print stylesheet ---- */

@media print {
  .topbar,
  .footer,
  .journal-article-rail,
  .journal-article-admin,
  .journal-article-actionbar,
  .journal-article-crumbs,
  .journal-article-toc-mobile,
  .journal-article-debug,
  .journal-scroll-progress {
    display: none !important;
  }
  body { padding-top: 0; background: #ffffff; color: #000000; }
  .journal-article {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-size: 11pt;
    line-height: 1.45;
    color: #000;
  }
  .journal-article-title { font-size: 22pt; color: #000; }
  .journal-article-body { font-size: 11pt; }
  .journal-article-body h2,
  .journal-article-body h3,
  .journal-article-body h4 {
    page-break-after: avoid;
    color: #000;
  }
  .journal-article-body p, .journal-article-body li {
    page-break-inside: avoid;
  }
  .journal-article-body .pith-thm {
    background: #fff;
    border-left-color: #000;
  }
  a { color: #000; text-decoration: underline; border-bottom: 0; }
  .journal-decision-letter, .journal-decision-letter-prose {
    background: #fff;
    border-left-color: #000;
  }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  .journal-rail-toc-dot,
  .journal-reference,
  .journal-action,
  .journal-scroll-progress {
    transition: none !important;
  }
}

/* candidate-page article-assets section */

.journal-article-assets {
  background: var(--bg-soft, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.0rem 1.1rem;
}

.journal-readiness-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.7rem;
  display: grid;
  gap: 0.18rem;
  font-size: 0.9rem;
  font-family: var(--mono, ui-monospace, monospace);
}

.journal-readiness-blockers {
  color: #b85b00;
}

.journal-readiness-ok {
  color: #1a7f37;
}

.journal-assets-form {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.journal-ref-preview {
  list-style: decimal inside;
  padding: 0;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  display: grid;
  gap: 0.22rem;
}

.journal-ref-preview li {
  display: block;
  line-height: 1.4;
}

.journal-render-warnings {
  margin-top: 0.8rem;
  font-size: 0.85rem;
}

.journal-notice {
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  margin: 0.6rem 0;
  font-size: 0.9rem;
}

.journal-notice-info {
  background: rgba(31, 111, 235, 0.10);
  border: 1px solid rgba(31, 111, 235, 0.35);
  color: #0a3069;
}

.journal-notice-error {
  background: rgba(207, 34, 46, 0.10);
  border: 1px solid rgba(207, 34, 46, 0.35);
  color: #82071e;
}

/* admin table readiness column */

.journal-admin-readiness-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.14rem;
  font-size: 0.78rem;
  font-family: var(--mono, ui-monospace, monospace);
}

.journal-admin-readiness-blockers {
  color: #b85b00;
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.journal-admin-readiness-ok {
  color: #1a7f37;
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.journal-admin-row-ready {
  background: rgba(26, 127, 55, 0.05);
}

.journal-admin-row-warn {
  background: rgba(184, 91, 0, 0.07);
}

/* end Pith Journal article + candidate-page support styles */

/* ---------- Lean / math display toggle (2026-05-13) ---------- */

.theorem-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.65rem 0;
  padding: 0.32rem 0.6rem;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 9999px;
  background: var(--bg, transparent);
  font-size: 0.82rem;
  line-height: 1.2;
  flex-wrap: wrap;
}

.theorem-view-toggle-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #666);
  font-size: 0.7rem;
}

.theorem-view-toggle-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.theorem-view-toggle-button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #666);
  padding: 0.18rem 0.65rem;
  border-radius: 9999px;
  font: inherit;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.theorem-view-toggle-button:hover {
  color: var(--fg);
  border-color: var(--line, rgba(0, 0, 0, 0.18));
  background: var(--bg-soft, rgba(0, 0, 0, 0.04));
}

.theorem-view-toggle-button-active {
  color: var(--fg);
  background: var(--bg-soft, rgba(31, 111, 235, 0.10));
  border-color: var(--accent, rgba(31, 111, 235, 0.45));
  font-weight: 600;
}

.theorem-view-toggle-alt {
  color: var(--link, #1f6feb);
  text-decoration: none;
  font-size: 0.78rem;
  border-left: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  padding-left: 0.55rem;
}

.theorem-view-toggle-alt:hover {
  text-decoration: underline;
}

/* end Lean / math display toggle */

/* ---------- Peer-review journal-submit revision gate (2026-05-13) ---------- */

.pr-rerun-panel-blocked .pr-rerun-button-disabled {
  background: var(--bg-soft, rgba(0, 0, 0, 0.04));
  color: var(--muted, #777);
  border-color: var(--line, rgba(0, 0, 0, 0.18));
  cursor: not-allowed;
  text-decoration: line-through;
}

.pr-rerun-hint-warn {
  color: #b85b00;
}

.pr-rerun-hint-warn a {
  color: #b85b00;
  font-weight: 600;
}

/* end revision gate */

/* ---------- Home-page reviewed-papers ticker (2026-05-13) ---------- */

.pith-ticker {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 0.55rem 0.85rem;
  margin: 0 0 0.9rem;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 8px;
  background: var(--bg-soft, rgba(0, 0, 0, 0.025));
  font-size: 0.85rem;
  line-height: 1.25;
}

.pith-ticker-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--muted, #6b6b73);
}

.pith-ticker-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.pith-ticker-delta {
  color: var(--muted, #6b6b73);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.pith-ticker-delta span[data-ticker-24h],
.pith-ticker-delta span[data-ticker-7d] {
  color: var(--fg);
  font-weight: 600;
}

.pith-ticker-live {
  color: #1a7f37;
  font-weight: 600;
  position: relative;
  padding-left: 0.7rem;
}

.pith-ticker-live::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #2da44e;
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(45, 164, 78, 0.5);
  animation: pith-ticker-pulse 1.6s ease-out infinite;
}

@keyframes pith-ticker-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 164, 78, 0.55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(45, 164, 78, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(45, 164, 78, 0);
  }
}

.pith-ticker-bumped {
  animation: pith-ticker-bump 1.1s ease-out 1;
}

@keyframes pith-ticker-bump {
  0% {
    color: #1a7f37;
    transform: translateY(0);
  }

  20% {
    color: #1a7f37;
    transform: translateY(-2px);
  }

  100% {
    color: inherit;
    transform: translateY(0);
  }
}

/* end reviewed-papers ticker */

/* ---------- Custom tooltips (2026-05-13) ----------
 * Replaces the native title-attribute tooltip (which Chrome delays by ~1.5s
 * and renders in the browser's default chrome). All `title=` attributes are
 * migrated to `data-tooltip=` by pith.js at DOM-ready, so we own the render.
 */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: normal;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  background: #14161a;
  color: #f4f4f6;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 90ms ease 80ms, transform 90ms ease 80ms;
}

[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 6px solid transparent;
  border-top-color: #14161a;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 90ms ease 80ms, transform 90ms ease 80ms;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Nested tooltip suppression: when a `data-tooltip` element has a descendant
 * that is also a `data-tooltip` AND is currently hovered, hide the outer
 * tooltip so only the innermost (most specific) bubble renders. Requires
 * :has() (Chrome 105+, Safari 15.4+, Firefox 121+). Falls back to native
 * stacking on older browsers.
 */
[data-tooltip]:has([data-tooltip]:hover)::after,
[data-tooltip]:has([data-tooltip]:hover)::before,
[data-tooltip]:has([data-tooltip]:focus-visible)::after,
[data-tooltip]:has([data-tooltip]:focus-visible)::before {
  display: none;
}

/* Tooltip flip-down: elements that opt in (or sit near the top of the
 * viewport) can declare data-tooltip-pos="below" to flip the bubble down.
 */
[data-tooltip][data-tooltip-pos="below"]::after {
  bottom: auto;
  top: calc(100% + 8px);
}

[data-tooltip][data-tooltip-pos="below"]::before {
  bottom: auto;
  top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: #14161a;
}

/* Empty / disabled state: do not render the bubble. */
[data-tooltip=""]::after,
[data-tooltip=""]::before {
  content: none;
  display: none;
}

/* Mobile / touch: the native tap-and-hold already exposes the data-tooltip
 * via the migrated aria-label for screen readers; on coarse pointers we
 * suppress the bubble (hover does not exist) to avoid touch-induced popups.
 */
@media (hover: none) {

  [data-tooltip]::after,
  [data-tooltip]::before {
    display: none;
  }
}

/* The pre-existing `cursor: help` rules in this stylesheet remain - the ?
 * cursor is the right semantic; previously the cursor was the only feedback
 * because the native tooltip text was slow / invisible. With the custom
 * bubble in place the cursor + immediate bubble together read correctly.
 */

/* end custom tooltips */


/* HOTFIX 2026-05-13 17:58 UTC: tooltip subsystem disabled.
 * The CSS block above set [data-tooltip] { position: relative; } which
 * captured every absolutely-positioned element on the site (.top-pith-ribbon,
 * media pills, coverage bars, etc.) and broke the card layout. Force-restore
 * static positioning at the end of the cascade so original position rules
 * (set by class) win again, and suppress the tooltip pseudo-elements.
 */
[data-tooltip] {
  position: static !important;
}
[data-tooltip]::after,
[data-tooltip]::before {
  content: none !important;
  display: none !important;
}
.top-pith-ribbon[data-tooltip],
.top-pith-ribbon {
  position: absolute !important;
}
/* end tooltip disable */

/* HOTFIX 2026-05-13 18:45 UTC: peer-review hero "journal blocked" panel.
 * The blocked panel was pushing the hero actions row wide because the hint
 * text was long and the disabled button had a strike-through that looked
 * broken next to live action buttons. Cap the panel width, allow the hint
 * to wrap, restyle the button as a small muted pill, and drop the strike.
 */
.pr-rerun-panel-blocked {
  max-width: 11rem;
  align-items: flex-end;
}
.pr-rerun-panel-blocked .pr-rerun-button-disabled,
.pr-rerun-button-disabled,
.pr-rerun-button-disabled:hover {
  text-decoration: none !important;
  min-height: 26px !important;
  padding: 0.18rem 0.65rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, #b85b00 14%, var(--panel-2)) !important;
  border-color: color-mix(in srgb, #b85b00 45%, var(--line)) !important;
  color: #b85b00 !important;
  cursor: not-allowed !important;
  user-select: none;
}
.pr-rerun-panel-blocked .pr-rerun-hint,
.pr-rerun-panel-blocked .pr-rerun-hint-warn {
  white-space: normal;
  text-align: right;
  line-height: 1.3;
}
/* end pr-hero blocked-panel hotfix */



/* ---------- Peer-review preprint-context section (2026-05-13) ----------
 * Surfaces the public-paper "pith" (core claim / load-bearing premise /
 * what would settle it / forward implications) and the editorial-analysis
 * fragments (desk editor / circularity / axiom ledger) inside the peer-
 * review ticket page so the reader gets context before the verdict.
 */

.pr-preprint-context {
  margin: 1.6rem 0 1.4rem;
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pr-preprint-context-head {
  margin-bottom: 0.85rem;
}

.pr-preprint-context-kicker {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 0.4rem;
}

.pr-preprint-context-title {
  font-family: var(--font-prose);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.pr-preprint-context-dek {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
}

.pr-preprint-block {
  margin: 0.9rem 0;
  font-family: var(--font-prose);
}

.pr-preprint-block .pr-longform {
  font-family: var(--font-prose);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--fg);
}

.pr-preprint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.7rem;
  margin: 0.9rem 0 0.5rem;
}

.pr-preprint-card {
  padding: 0.75rem 0.95rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-prose);
}

.pr-preprint-card-h {
  margin: 0 0 0.4rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.pr-preprint-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--fg);
}

.pr-preprint-card-load {
  border-left: 3px solid var(--conditional);
  background: color-mix(in srgb, var(--conditional) 6%, var(--bg));
}

.pr-preprint-implications {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  font-family: var(--font-prose);
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--fg);
}

.pr-preprint-implications li {
  margin: 0.15rem 0;
}

.pr-preprint-collapsible {
  margin: 0.8rem 0 0;
  padding: 0.45rem 0.85rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pr-preprint-collapsible[open] {
  padding-bottom: 0.85rem;
}

.pr-preprint-collapsible > summary {
  cursor: pointer;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  padding: 0.3rem 0;
}

.pr-preprint-collapsible > summary:hover {
  color: var(--link);
}

.pr-preprint-collapsible[open] > summary {
  margin-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.pr-preprint-collapsible .pr-longform {
  font-family: var(--font-prose);
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--fg);
}

.pr-preprint-collapsible ul {
  margin: 0.35rem 0;
  padding-left: 1.1rem;
  font-family: var(--font-prose);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pr-preprint-ledger {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.28rem;
}

.pr-preprint-ledger li {
  font-family: var(--font-prose);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--fg);
}

.pr-axiom-kind {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0.06rem 0.4rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  margin-right: 0.35rem;
}

.pr-preprint-source {
  margin-top: 0.8rem;
  font-size: 0.78rem;
}

/* ---------- Cited-theorems collapsible (demoted) ---------- */

.pr-cited-theorems {
  margin-top: 1rem;
}

.pr-cited-theorems > details {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.95rem 0.65rem;
}

.pr-cited-theorems > details[open] {
  padding-bottom: 0.95rem;
}

.pr-cited-theorems > details > summary {
  cursor: pointer;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg-2);
  padding: 0.32rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.pr-cited-theorems > details > summary:hover {
  color: var(--link);
}

.pr-cited-theorems-summary-hint {
  font-size: 0.74rem;
}

.pr-cited-theorems .pr-citations {
  list-style: none;
  padding: 0;
  margin: 0.55rem 0 0;
  display: grid;
  gap: 0.45rem;
}

.pr-cited-theorems .pr-citation {
  display: grid;
  grid-template-columns: minmax(0, max-content) auto 1fr;
  gap: 0.45rem;
  align-items: baseline;
  font-family: var(--font-prose);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--fg);
}

.pr-cited-theorems .pr-cite-note {
  color: var(--fg-2);
  font-size: 0.88rem;
}

/* Small explanatory paragraph under the audit heading */
.pr-rs-audit-dek {
  margin: 0.3rem 0 0.8rem;
  font-size: 0.86rem;
  color: var(--fg-2);
  font-family: var(--font-prose);
}

/* end peer-review preprint-context + cited-theorems styles */


/* ---------- Card expandable abstract (2026-05-13) ---------- */

.card-abstract {
  margin: 0.6rem 0 0.45rem;
  padding: 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-prose);
}

.card-abstract > summary {
  cursor: pointer;
  padding: 0.45rem 0 0.4rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  list-style: none;
  color: var(--fg-3);
}

.card-abstract > summary::-webkit-details-marker {
  display: none;
}

.card-abstract > summary::before {
  content: "+";
  display: inline-block;
  width: 0.8rem;
  text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--fg-3);
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 100ms ease;
}

.card-abstract[open] > summary::before {
  content: "-";
}

.card-abstract-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.card-abstract > summary:hover .card-abstract-label,
.card-abstract > summary:hover {
  color: var(--link);
}

.card-abstract-hint {
  font-size: 0.72rem;
  color: var(--fg-3);
}

.card-abstract[open] > summary .card-abstract-hint::before {
  content: "click to collapse";
}

.card-abstract[open] > summary .card-abstract-hint {
  font-size: 0;
}

.card-abstract[open] > summary .card-abstract-hint::before {
  font-size: 0.72rem;
  color: var(--fg-3);
}

.card-abstract-body {
  margin: 0.2rem 0 0.35rem;
  padding: 0.7rem 0.9rem 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-prose);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--fg);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* end card expandable abstract */

/* HOTFIX 2026-05-13 22:52 UTC: compact peer-review hero action row. */
.pr-hero-actions {
  gap: 0.65rem !important;
  align-items: flex-start !important;
}
.pr-share-panel,
.pr-rerun-panel {
  max-width: 14rem;
}
.pr-rerun-panel-blocked {
  max-width: 9rem !important;
}
.pr-rerun-panel-blocked .pr-rerun-button-disabled,
.pr-rerun-button-disabled,
.pr-rerun-button-disabled:hover {
  text-decoration: none !important;
  min-height: 28px !important;
  padding: 0.2rem 0.7rem !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, #b85b00 13%, var(--panel-2)) !important;
  border-color: color-mix(in srgb, #b85b00 45%, var(--line)) !important;
  color: #b85b00 !important;
  cursor: not-allowed !important;
  user-select: none;
}
.pr-rerun-panel-blocked .pr-rerun-hint,
.pr-rerun-panel-blocked .pr-rerun-hint-warn {
  white-space: normal !important;
  text-align: right !important;
  line-height: 1.25 !important;
}
.pr-rerun-panel-blocked .pr-rerun-hint-warn a {
  color: #b85b00 !important;
  font-weight: 800 !important;
}
@media (max-width: 980px) {
  .pr-hero-top { grid-template-columns: 1fr !important; }
  .pr-hero-actions { justify-self: stretch !important; flex-wrap: wrap !important; }
  .pr-share-panel, .pr-rerun-panel { align-items: flex-start !important; text-align: left !important; }
  .pr-rerun-panel-blocked .pr-rerun-hint { text-align: left !important; }
}
/* end compact peer-review hero action row */

/* ---------- Pith Research interface (2026-05-13) ---------- */

.research-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.4rem 1.4rem 4rem;
}

.research-hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.1rem;
  margin-bottom: 1.2rem;
}

.research-kicker {
  margin: 0 0 0.35rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.research-hero h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-prose);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.research-dek {
  margin: 0;
  color: var(--fg-2);
  font-family: var(--font-prose);
  font-size: 1rem;
}

.research-top {
  max-width: 920px;
  margin: 0 auto 1.6rem;
  display: grid;
  gap: 0.8rem;
}

.research-top .research-anchor-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.research-top .research-composer {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.research-top .research-composer label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

.research-top .research-composer textarea {
  min-height: 120px;
  font-size: 16px;
}

.research-newsession {
  margin-left: auto;
  align-self: center;
  font-size: 0.85rem;
  color: var(--fg-2);
  text-decoration: none;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
}

.research-newsession:hover {
  color: var(--fg);
  border-color: var(--fg-3);
  border-style: solid;
}

.research-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  gap: 1rem;
  align-items: start;
}

.research-session-rail,
.research-source-rail {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 0.8rem;
}

.research-rail-card,
.research-composer,
.research-anchor-card,
.research-message,
.research-empty {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.research-rail-card {
  padding: 0.85rem 0.95rem;
}

.research-rail-card h2 {
  margin: 0 0 0.55rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.research-session-list,
.research-suggestion-list,
.research-source-cards,
.research-source-list-inline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.research-session-list li {
  display: grid;
  gap: 0.1rem;
  font-size: 0.86rem;
}

.research-session-list li.active a {
  color: var(--fg);
  font-weight: 700;
}

.research-suggestion {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg-2);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  font: inherit;
  cursor: pointer;
}

.research-suggestion:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}

.research-main {
  display: grid;
  gap: 0.9rem;
}

.research-composer {
  padding: 0.95rem;
}

.research-composer label {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 0.5rem;
}

.research-composer textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  padding: 0.75rem 0.85rem;
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.research-composer textarea:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--link) 20%, transparent);
}

.research-composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.65rem;
}

.research-submit,
.research-deep,
.research-session-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  cursor: pointer;
}

.research-deep,
.research-session-actions button {
  background: transparent;
  color: var(--fg);
}

.research-submit:hover,
.research-deep:hover,
.research-session-actions button:hover {
  border-color: var(--fg-2);
}

.research-anchor-card {
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
}

.research-anchor-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.research-transcript {
  display: grid;
  gap: 0.8rem;
}

.research-message {
  padding: 0.85rem 1rem;
}

.research-message header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.research-message-user {
  background: color-mix(in srgb, var(--link) 6%, var(--panel-2));
}

.research-message-assistant {
  background: var(--panel-2);
}

.research-message-system {
  background: color-mix(in srgb, var(--conditional) 8%, var(--panel-2));
}

.research-message-body {
  font-family: var(--font-prose);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--fg);
}

.research-message-body p:first-child { margin-top: 0; }
.research-message-body p:last-child { margin-bottom: 0; }
.research-message-body li { margin: 0.15rem 0; }

.research-message-sources {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.research-message-sources summary {
  cursor: pointer;
  color: var(--fg-2);
  font-size: 0.82rem;
}

.research-source-cards li {
  padding: 0.6rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.research-source-title {
  display: block;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.research-source-kind {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 0.25rem;
}

.research-source-cards p {
  margin: 0.25rem 0 0;
  color: var(--fg-2);
  font-size: 0.82rem;
  line-height: 1.42;
}

.research-empty {
  padding: 1.4rem;
  text-align: center;
}

.research-empty h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-prose);
}

.research-session-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
}

.research-notice {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.research-notice-warn {
  background: color-mix(in srgb, var(--conditional) 9%, var(--panel-2));
  border-color: color-mix(in srgb, var(--conditional) 35%, var(--line));
}

.research-notice-error {
  background: color-mix(in srgb, var(--reject) 9%, var(--panel-2));
  border-color: color-mix(in srgb, var(--reject) 35%, var(--line));
}

@media (max-width: 1000px) {
  .research-layout {
    grid-template-columns: 1fr;
  }
  .research-session-rail,
  .research-source-rail {
    position: static;
  }
  .research-session-rail {
    order: 2;
  }
  .research-source-rail {
    order: 3;
  }
}

/* ---------- Research workspace polish (2026-05-13 V2) ---------- */

.research-empty {
  text-align: left;
}

.research-empty-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.research-empty-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}

.research-empty-card h3 {
  margin: 0 0 0.35rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.research-empty-card p {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  color: var(--fg-2);
  line-height: 1.4;
}

.research-empty-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.research-followups {
  margin-top: 0.85rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.research-followup-form {
  display: contents;
}

.research-followup {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg-2);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-size: 0.84rem;
  cursor: pointer;
}

.research-followup:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}

.research-source-group + .research-source-group {
  margin-top: 0.65rem;
}

.research-rename {
  font-size: 0.85rem;
}

.research-rename summary {
  cursor: pointer;
  color: var(--fg-2);
  list-style: none;
}

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

.research-rename summary::before {
  content: "✎ ";
}

.research-rename[open] form {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.research-rename input[type="text"] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  padding: 0.35rem 0.55rem;
  font: inherit;
}

.research-rename button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  padding: 0.32rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.research-admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin: 0.8rem 0 1.2rem;
}

.research-admin-stats > div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  display: grid;
}

.research-admin-stats strong {
  font-size: 1.4rem;
  line-height: 1.1;
}

.research-admin-stats span {
  color: var(--fg-3);
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.research-admin-chunks ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-size: 0.86rem;
}

.research-admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0.4rem 0 0.8rem;
}

.research-admin-filters input,
.research-admin-filters select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  padding: 0.32rem 0.55rem;
  font: inherit;
}

.research-admin-filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  padding: 0.32rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.research-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-bottom: 1.4rem;
}

.research-admin-table th,
.research-admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.research-admin-table tr.research-admin-blocked {
  background: color-mix(in srgb, var(--conditional) 9%, var(--panel-2));
}

/* end Pith Research interface */


/* ---------- Peer-review header redesign (2026-05-13 23:55 UTC) ----------
 * Replaces the row of large oval buttons in the peer-review hero with a
 * compact, definition-list-style status panel.
 *
 * The previous CSS path stacked .pr-share-toggle / .pr-rerun-button rules
 * (all rendered as ~210px ovals) into a horizontal flex row. With three
 * separate states (visibility, revision, journal) the row crowded the
 * title, mis-aligned, and used button styling for things that were not
 * actions. The new layout keeps every existing route and form, but renders
 * each state as a single short row: label - state chip - inline action.
 */

.pr-hero-top:has(.pr-action-stack) {
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  gap: 1.2rem;
}

.pr-hero-actions.pr-action-stack {
  display: grid !important;
  grid-auto-flow: row;
  align-items: stretch !important;
  justify-self: end !important;
  gap: 0 !important;
  width: 100%;
  max-width: 22rem;
  padding: 0.45rem 0.7rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
}

.pr-action-row {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.45rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.pr-action-row:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}

.pr-action-row:last-child {
  padding-bottom: 0.2rem;
}

.pr-action-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fg-3);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.pr-action-row-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.55rem;
  color: var(--fg);
  min-width: 0;
}

.pr-state {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  white-space: nowrap;
  line-height: 1.4;
}

a.pr-state {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.pr-state-private {
  color: var(--conditional);
  border-color: rgba(245, 158, 11, 0.40);
  background: rgba(245, 158, 11, 0.10);
}

.pr-state-public {
  color: var(--accept);
  border-color: rgba(0, 209, 138, 0.40);
  background: rgba(0, 209, 138, 0.09);
}

.pr-state-ready {
  color: var(--link);
  border-color: color-mix(in srgb, var(--link) 45%, var(--line));
  background: color-mix(in srgb, var(--link) 11%, var(--panel-2));
}

.pr-state-blocked {
  color: #b85b00;
  border-color: color-mix(in srgb, #b85b00 45%, var(--line));
  background: color-mix(in srgb, #b85b00 13%, var(--panel-2));
  cursor: help;
}

.pr-state-journal {
  color: var(--fg);
  border-color: var(--line);
  background: var(--panel);
}

.pr-state-journal-eligible {
  color: var(--link);
  border-color: color-mix(in srgb, var(--link) 45%, var(--line));
  background: color-mix(in srgb, var(--link) 11%, var(--panel-2));
}

.pr-state-journal-candidate {
  color: var(--conditional);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.11);
}

.pr-state-journal-published {
  color: var(--accept);
  border-color: rgba(0, 209, 138, 0.45);
  background: rgba(0, 209, 138, 0.10);
}

.pr-state-journal-declined,
.pr-state-journal-ineligible,
.pr-state-journal-withdrawn {
  color: var(--reject);
  border-color: rgba(239, 68, 68, 0.40);
  background: rgba(239, 68, 68, 0.10);
}

.pr-action-link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted var(--link);
  cursor: pointer;
  font-size: 0.87rem;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}

.pr-action-link:hover,
.pr-action-link:focus-visible {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.pr-action-link-warn {
  color: #b85b00;
  border-bottom-color: #b85b00;
}

.pr-action-link-warn:hover,
.pr-action-link-warn:focus-visible {
  color: #b85b00;
  filter: brightness(0.85);
}

.pr-action-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.pr-action-meta {
  color: var(--fg-3);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

@media (prefers-color-scheme: light) {
  .pr-action-link {
    color: #1a4ea3;
    border-bottom-color: #b8cff2;
  }
  .pr-action-link:hover,
  .pr-action-link:focus-visible {
    color: #0a2a73;
    border-bottom-color: #0a2a73;
  }
}

@media (max-width: 760px) {
  .pr-hero-top:has(.pr-action-stack) {
    grid-template-columns: 1fr;
  }
  .pr-hero-actions.pr-action-stack {
    max-width: none;
    width: auto;
    justify-self: stretch !important;
    margin-top: 0.65rem;
  }
  .pr-action-row {
    grid-template-columns: 5.25rem minmax(0, 1fr);
  }
}

/* end peer-review header redesign */


/* Citation Hub Phase 2 */
.hub-role-chip.active, .facet-chip.active { font-weight: 700; }
.admin-hubs table { width: 100%; border-collapse: collapse; }
.admin-hubs th, .admin-hubs td { padding: .45rem .55rem; border-bottom: 1px solid var(--border, #ddd); vertical-align: top; }
.hub-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.admin-card { border: 1px solid var(--border, #ddd); border-radius: 12px; padding: 1rem; background: var(--card-bg, #fff); }
.hub-admin-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.hub-admin-form input, .hub-admin-form select { min-width: 180px; }
.profile-pending { color: var(--muted, #64748b); font-style: italic; }

/* HOTFIX 2026-05-14 00:18 UTC: journal reference-list grid.
 * Long BibTeX keys like [AmariNagaoka2000] overflowed the old 4.5rem first
 * column and visually overlapped the raw reference text. Reserve a real key
 * column on desktop and stack the key above the body on narrow screens.
 */
.journal-reference {
  grid-template-columns: minmax(10.5rem, 12rem) minmax(0, 1fr) 0.9rem !important;
  column-gap: 1rem !important;
}
.journal-reference-key {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.journal-reference-body {
  min-width: 0;
}
@media (max-width: 760px) {
  .journal-reference {
    grid-template-columns: minmax(0, 1fr) 0.9rem !important;
    row-gap: 0.25rem !important;
  }
  .journal-reference-key {
    grid-column: 1 / 2;
  }
  .journal-reference-body {
    grid-column: 1 / 3;
  }
  .journal-reference-badge {
    grid-column: 2 / 3;
    grid-row: 1;
  }
}
/* end journal reference-list grid hotfix */

/* ---------- Pith Research page redesign (2026-05-14) ----------
 * Tighten typography, switch transcript body from prose serif to sans,
 * cap markdown heading sizes inside assistant turns, slim the right rail
 * to a compact list, rebalance the three-column grid, and collapse the
 * mode-grid into a single horizontal control bar once a session is active.
 */

.research-page {
  max-width: 1180px !important;
  padding: 1.0rem 1.2rem 3rem !important;
}

.research-hero {
  padding-bottom: 0.85rem !important;
  margin-bottom: 0.85rem !important;
}
.research-hero h1 {
  font-size: clamp(1.25rem, 2vw, 1.7rem) !important;
  letter-spacing: -0.01em !important;
  margin: 0 0 0.25rem !important;
}
.research-dek {
  font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.86rem !important;
  color: var(--fg-3) !important;
  margin: 0 !important;
}

.research-top {
  max-width: none !important;
  margin: 0 0 1.1rem !important;
  gap: 0.6rem !important;
}
.research-top .research-composer {
  padding: 0.75rem 0.85rem !important;
}
.research-top .research-composer textarea {
  min-height: 88px !important;
  font-size: 14.5px !important;
  padding: 0.55rem 0.7rem !important;
}
.research-mode-banner { display: none !important; }
.research-top .research-mode-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 0.6rem !important;
  margin-top: 0.7rem !important;
}
.research-mode-card {
  padding: 0.6rem 0.75rem !important;
  border-radius: 8px !important;
  background: var(--bg) !important;
}
.research-mode-card header {
  display: flex !important;
  align-items: baseline !important;
  gap: 0.45rem !important;
  margin-bottom: 0.25rem !important;
}
.research-mode-card h3 {
  font-size: 0.92rem !important;
  margin: 0 !important;
  font-family: ui-sans-serif, system-ui, sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em !important;
}
.research-mode-card p.meta {
  font-size: 0.78rem !important;
  line-height: 1.45 !important;
  margin: 0.2rem 0 0.5rem !important;
}
.research-mode-card button {
  padding: 0.3rem 0.7rem !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}
.research-force-fresh {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.32rem !important;
  margin-left: 0.6rem !important;
  font-size: 0.72rem !important;
  color: var(--fg-3) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* When a session is active, collapse mode cards into a single tight bar. */
.research-top-compact .research-mode-banner { display: none !important; }
.research-top-compact .research-composer {
  padding: 0.55rem 0.7rem !important;
}
.research-top-compact .research-composer label {
  font-size: 0.66rem !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 0.3rem !important;
}
.research-top-compact .research-composer textarea {
  min-height: 60px !important;
  font-size: 14px !important;
  padding: 0.45rem 0.6rem !important;
}
.research-top-compact .research-mode-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  align-items: center !important;
  margin-top: 0.55rem !important;
}
.research-top-compact .research-mode-card {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.32rem 0.6rem !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
}
.research-top-compact .research-mode-card header {
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}
.research-top-compact .research-mode-card h3 {
  font-size: 0.78rem !important;
  margin: 0 !important;
  font-weight: 600 !important;
}
.research-top-compact .research-mode-card .research-mode-badge { font-size: 0.62rem !important; padding: 0.04rem 0.4rem !important; }
.research-top-compact .research-mode-card p.meta { display: none !important; }
.research-top-compact .research-mode-card button {
  padding: 0.22rem 0.65rem !important;
  font-size: 0.74rem !important;
}
.research-top-compact .research-force-fresh { display: none !important; }
.research-top-compact .research-composer-actions { margin-top: 0.45rem !important; }

/* Column rebalance. */
.research-layout {
  grid-template-columns: 200px minmax(0, 1fr) 260px !important;
  gap: 0.9rem !important;
}

/* Rail cards: denser. */
.research-rail-card {
  padding: 0.6rem 0.75rem !important;
  border-radius: 8px !important;
}
.research-rail-card h2 {
  font-size: 0.66rem !important;
  letter-spacing: 0.08em !important;
  margin: 0 0 0.45rem !important;
}
.research-session-list { gap: 0.28rem !important; }
.research-session-list li {
  font-size: 0.78rem !important;
  line-height: 1.3 !important;
  padding-bottom: 0.28rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.research-session-list li:last-child { border-bottom: 0; }
.research-session-list li .meta {
  font-size: 0.68rem !important;
  color: var(--fg-3) !important;
}

.research-recent-list,
.research-suggestion-list {
  gap: 0.3rem !important;
  font-size: 0.78rem !important;
}
.research-suggestion {
  font-size: 0.76rem !important;
  padding: 0.35rem 0.5rem !important;
  border-radius: 5px !important;
}

/* Message cards: compact, sans body, capped heading sizes. */
.research-message {
  padding: 0.6rem 0.85rem !important;
  border-radius: 8px !important;
}
.research-message header {
  margin-bottom: 0.32rem !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.08em !important;
}
.research-message-body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.92rem !important;
  line-height: 1.5 !important;
  color: var(--fg) !important;
}
.research-message-body h1,
.research-message-body h2,
.research-message-body h3,
.research-message-body h4,
.research-message-body h5,
.research-message-body h6 {
  font-family: ui-sans-serif, system-ui, sans-serif !important;
  letter-spacing: -0.005em !important;
  margin: 0.85rem 0 0.35rem !important;
  line-height: 1.3 !important;
}
.research-message-body h1 { font-size: 1.05rem !important; font-weight: 700 !important; }
.research-message-body h2 { font-size: 0.98rem !important; font-weight: 700 !important; }
.research-message-body h3 { font-size: 0.92rem !important; font-weight: 700 !important; }
.research-message-body h4,
.research-message-body h5,
.research-message-body h6 { font-size: 0.88rem !important; font-weight: 600 !important; color: var(--fg-2) !important; }
.research-message-body p { margin: 0.4rem 0 !important; }
.research-message-body ul,
.research-message-body ol { margin: 0.35rem 0 0.5rem !important; padding-left: 1.1rem !important; }
.research-message-body li { margin: 0.1rem 0 !important; line-height: 1.45 !important; }
.research-message-body code {
  font-size: 0.85em !important;
  padding: 0.04rem 0.32rem !important;
  border-radius: 4px !important;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}
.research-message-body pre {
  font-size: 0.82rem !important;
  padding: 0.55rem 0.7rem !important;
  background: var(--bg) !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  overflow-x: auto;
}

/* Epistemic + cache strip lighter. */
.research-epistemic-strip {
  margin: 0 0 0.4rem !important;
  gap: 0.28rem !important;
}
.research-epistemic-tag {
  font-size: 0.62rem !important;
  padding: 0.06rem 0.4rem !important;
  letter-spacing: 0.06em !important;
}

/* Citation groups inline: dense list. */
.research-citation-group {
  margin-top: 0.55rem !important;
  padding-top: 0.45rem !important;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent) !important;
}
.research-citation-group h4 {
  margin: 0 0 0.32rem !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--fg-3) !important;
  font-weight: 700 !important;
  font-family: ui-sans-serif, system-ui, sans-serif !important;
}
.research-citation-group h4 .meta { font-size: 0.66rem !important; }
.research-citation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.32rem;
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
}
.research-citation-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.32rem 0.55rem;
}
.research-citation-list li a {
  font-weight: 500;
  color: var(--link);
  border-bottom: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.research-citation-relevance {
  font-size: 0.66rem !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  white-space: nowrap;
}
.research-citation-why {
  grid-column: 1 / -1;
  margin: 0.05rem 0 0 !important;
  font-size: 0.72rem !important;
  color: var(--fg-3) !important;
  line-height: 1.35 !important;
}

/* Promote button as a small inline action. */
.research-promote-form { margin: 0.55rem 0 0 !important; }
.research-promote {
  font-size: 0.72rem !important;
  padding: 0.22rem 0.65rem !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--fg-2) !important;
  border: 1px dashed var(--line) !important;
  cursor: pointer;
}
.research-promote:hover {
  color: var(--fg) !important;
  border-style: solid !important;
  border-color: var(--fg-3) !important;
}

/* Follow-ups as compact chips. */
.research-followups {
  margin-top: 0.55rem !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.32rem !important;
}
.research-followup-form { margin: 0 !important; }
.research-followup {
  font-size: 0.74rem !important;
  padding: 0.25rem 0.6rem !important;
  border-radius: 999px !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--fg-2) !important;
  cursor: pointer;
}
.research-followup:hover {
  color: var(--fg) !important;
  border-color: var(--fg-3) !important;
}

/* Right rail: compact list, not stacked cards. */
.research-source-rail {
  gap: 0.6rem !important;
}
.research-source-rail .research-rail-card {
  padding: 0.55rem 0.7rem !important;
}
.research-source-rail .research-source-cards {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  gap: 0.4rem !important;
}
.research-source-rail .research-source-cards li {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-bottom: 0.35rem !important;
}
.research-source-rail .research-source-cards li:last-child { border-bottom: 0 !important; padding-bottom: 0 !important; }
.research-source-rail .research-source-title {
  font-weight: 600 !important;
  font-size: 0.78rem !important;
  line-height: 1.3 !important;
  margin-bottom: 0.18rem !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.research-source-rail .research-source-kind {
  font-size: 0.62rem !important;
  letter-spacing: 0.05em !important;
}
.research-source-rail .research-source-cards li p {
  font-size: 0.74rem !important;
  line-height: 1.35 !important;
  color: var(--fg-3) !important;
  margin: 0.18rem 0 0 !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* Session actions footer: lighter row. */
.research-session-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.6rem !important;
  margin-top: 0.4rem !important;
  font-size: 0.76rem !important;
}
.research-session-actions button {
  padding: 0.25rem 0.65rem !important;
  font-size: 0.74rem !important;
}
.research-rename summary { cursor: pointer; font-size: 0.74rem; color: var(--fg-2); }

/* Notices: compact. */
.research-notice {
  padding: 0.45rem 0.7rem !important;
  border-radius: 6px !important;
  font-size: 0.82rem !important;
  margin-bottom: 0.6rem !important;
}

/* Mobile collapse. */
@media (max-width: 980px) {
  .research-layout {
    grid-template-columns: 1fr !important;
  }
  .research-session-rail,
  .research-source-rail {
    position: static !important;
  }
}

/* end Pith Research redesign */

/* HOTFIX 2026-05-14 02:35 UTC: research redesign pass 2.
 *
 * Earlier pass put the rules under `.research-message-body` but the prior
 * stylesheet block (line 16240+) still wins in some Chrome cache cases and
 * for any rule that happens to be slightly more specific. This block uses
 * body-rooted selectors and explicit pixel sizes so the cascade cannot lose,
 * caps content line length, and hides the redundant <h3> inside the compact
 * mode pills so each pill reads as a single label.
 */

body .research-page .research-message .research-message-body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: var(--fg) !important;
  max-width: 72ch !important;
}

body .research-page .research-message .research-message-body p,
body .research-page .research-message .research-message-body li,
body .research-page .research-message .research-message-body blockquote {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  margin: 0.35rem 0 !important;
}

body .research-page .research-message .research-message-body h1,
body .research-page .research-message .research-message-body h2,
body .research-page .research-message .research-message-body h3,
body .research-page .research-message .research-message-body h4,
body .research-page .research-message .research-message-body h5,
body .research-page .research-message .research-message-body h6 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif !important;
  line-height: 1.3 !important;
  letter-spacing: -0.005em !important;
  margin: 0.7rem 0 0.3rem !important;
}
body .research-page .research-message .research-message-body h1 { font-size: 14.5px !important; font-weight: 700 !important; }
body .research-page .research-message .research-message-body h2 { font-size: 14px !important; font-weight: 700 !important; }
body .research-page .research-message .research-message-body h3 { font-size: 13.5px !important; font-weight: 700 !important; }
body .research-page .research-message .research-message-body h4,
body .research-page .research-message .research-message-body h5,
body .research-page .research-message .research-message-body h6 { font-size: 13px !important; font-weight: 600 !important; color: var(--fg-2) !important; }
body .research-page .research-message .research-message-body strong,
body .research-page .research-message .research-message-body b { font-weight: 700 !important; }

body .research-page .research-message .research-message-body pre,
body .research-page .research-message .research-message-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important;
  font-size: 12.5px !important;
}

body .research-page .research-message header {
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 0.32rem !important;
}

/* Compact mode pills: hide the duplicated heading + duplicated button text. */
.research-top-compact .research-mode-card header h3 { display: none !important; }
.research-top-compact .research-mode-card header { gap: 0.32rem !important; }

/* Tighten the rest of the page typography to match. */
body .research-page { font-size: 13.5px; }
body .research-page .research-rail-card h2 { font-size: 10.5px !important; }
body .research-page .research-session-list li { font-size: 12.5px !important; }
body .research-page .research-session-list li .meta { font-size: 11px !important; }
body .research-page .research-recent-list,
body .research-page .research-suggestion-list { font-size: 12.5px !important; }

body .research-page .research-source-rail .research-source-title { font-size: 12.5px !important; }
body .research-page .research-source-rail .research-source-cards li p { font-size: 12px !important; }

body .research-page .research-citation-list { font-size: 12.5px !important; }
body .research-page .research-citation-group h4 { font-size: 11px !important; }

/* end research redesign pass 2 */


/* Peer Review ticket page: publication-impact redesign 2026-05-14 */
.pr-impact-summary { background: var(--card-bg, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 14px; padding: 1.1rem 1.25rem; margin: 1.4rem 0; }
.pr-impact-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: .65rem 0 1.1rem; }
.pr-impact-count { background: var(--soft-bg, #f8fafc); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: .6rem .75rem; display: flex; flex-direction: column; }
.pr-impact-count strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1; }
.pr-impact-count span { color: var(--muted, #64748b); font-size: .85rem; margin-top: .2rem; }
.pr-impact-count-blockers strong { color: #b91c1c; }
.pr-impact-count-clarify strong { color: #b45309; }
.pr-impact-count-ok strong { color: #166534; }
.pr-impact-count-muted strong { color: #475569; }

.pr-impact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.pr-impact-item { border: 1px solid var(--border, #e2e8f0); border-left-width: 4px; border-radius: 10px; padding: .6rem .8rem; background: var(--soft-bg, #f8fafc); }
.pr-impact-item header { display: flex; gap: .6rem; align-items: baseline; }
.pr-impact-claim { margin: .25rem 0 .25rem; font-weight: 600; }
.pr-impact-note { margin: 0; color: var(--muted, #475569); }
.pr-impact-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; border: 1px solid currentColor; }
.pr-impact-label-verified { color: #166534; }
.pr-impact-label-warn { color: #b45309; }
.pr-impact-label-bad { color: #b91c1c; }
.pr-impact-label-muted { color: #475569; }
.pr-impact-item-verified { border-left-color: #166534; }
.pr-impact-item-warn { border-left-color: #b45309; }
.pr-impact-item-bad { border-left-color: #b91c1c; }
.pr-impact-item-muted { border-left-color: #475569; }

.pr-audit-trail { margin: 1.4rem 0; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: .25rem 0; background: var(--card-bg, #fff); }
.pr-audit-trail > summary { cursor: pointer; list-style: none; padding: .85rem 1.1rem; display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; }
.pr-audit-trail > summary::-webkit-details-marker { display: none; }
.pr-audit-trail .pr-audit-trail-summary { font-weight: 600; }
.pr-audit-trail .pr-audit-trail-hint { color: var(--muted, #64748b); }
.pr-audit-trail[open] > summary { border-bottom: 1px solid var(--border, #e2e8f0); }
.pr-audit-trail > .pr-block { padding: 0 1.1rem 1rem; }


/* Paid Peer Review report v2 (2026-05-14) */
.pr-topline-grid, .pr-pith-reading-grid, .pr-score-axis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .85rem; }
.pr-topline-card, .pr-pith-reading-grid article, .pr-score-axis { border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: .8rem .95rem; background: var(--soft-bg, #f8fafc); }
.pr-topline-card header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .35rem; }
.pr-desk-letter { border-left: 4px solid #64748b; background: color-mix(in srgb, var(--soft-bg, #f8fafc) 80%, white); }
.pr-claim-table-wrap { overflow-x: auto; }
.pr-claim-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pr-claim-table th, .pr-claim-table td { border-bottom: 1px solid var(--border, #e2e8f0); padding: .5rem .55rem; vertical-align: top; text-align: left; }
.pr-claim-table th { color: var(--muted, #64748b); font-weight: 650; }
.pr-claim-id-cell { color: var(--muted, #64748b); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.pr-validation-tag { white-space: nowrap; }
.pr-validation-lean_match { color: #166534; }
.pr-validation-paper_supported { color: #166534; }
.pr-validation-needs_reference, .pr-validation-hypothesis, .pr-validation-unclear { color: #b45309; }
.pr-validation-unsupported, .pr-validation-contradicted { color: #b91c1c; }
.pr-claim-reference-list, .pr-duplication-list { padding-left: 1.15rem; }
.pr-claim-reference-list li, .pr-duplication-list li { margin: .45rem 0; }
.pr-score-gate { display: inline-flex; align-items: baseline; gap: .75rem; border: 1px solid var(--border, #e2e8f0); border-radius: 999px; padding: .35rem .75rem; background: var(--soft-bg, #f8fafc); margin: .4rem 0 .8rem; }
.pr-score-gate strong { text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }
.pr-score-axis strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pr-author-responses blockquote { margin: .3rem 0 .8rem; padding: .55rem .75rem; border-left: 3px solid var(--border, #cbd5e1); background: var(--soft-bg, #f8fafc); }
/* ====================================================================
   Pith Derivations System
   /derivations index, slug pages, and /admin/derivations
   ==================================================================== */

.derivations-hero {
  padding: 3.5rem 1rem 2rem;
  background: linear-gradient(135deg, #0b0d12 0%, #131822 100%);
  color: var(--text-strong, #f5f7fb);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.derivations-hero-inner {
  max-width: 960px;
  margin: 0 auto;
}

.derivations-hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93a3c4;
  margin-bottom: 0.5rem;
}

.derivations-hero-title {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  margin: 0 0 0.5rem;
  line-height: 1.15;
  color: #f5f7fb;
}

.derivations-hero-lede {
  margin: 0 0 1.5rem;
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 760px;
  color: #c4ccdd;
}

.derivations-admin-stats {
  font-size: 0.92rem;
  color: #aab4c8;
}

.derivations-search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  max-width: 720px;
  margin-top: 0.75rem;
}

.derivations-search-form input[type="search"] {
  flex: 1 1 auto;
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #2a3140;
  border-radius: 8px;
  background: #161b25;
  color: #f5f7fb;
}

.derivations-search-form input[type="search"]::placeholder {
  color: #6b7280;
}

.derivations-admin-banner {
  max-width: 960px;
  margin: 1rem auto 0;
  padding: 0.6rem 0.9rem;
  background: #fef3c7;
  color: #7c3500;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  font-size: 0.9rem;
}

.derivations-section {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.derivations-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-strong, #1a1f2e);
}

.derivations-card-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.derivations-card {
  border: 1px solid #e4e6ed;
  border-radius: 10px;
  background: #ffffff;
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.derivations-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.derivations-card-link {
  display: block;
  padding: 1rem 1.1rem;
  color: inherit;
  text-decoration: none;
}

.derivations-card-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.derivations-card-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.derivations-card-summary {
  margin: 0 0 0.5rem;
  font-size: 0.91rem;
  line-height: 1.45;
  color: #475067;
}

.derivations-card-meta {
  font-size: 0.82rem;
  color: #6b7382;
}

.derivations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.derivations-table thead {
  background: #f2f4f9;
  text-align: left;
}

.derivations-table th,
.derivations-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #e4e6ed;
  vertical-align: top;
}

.derivations-table th.numeric,
.derivations-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.derivations-row-link {
  color: inherit;
  text-decoration: none;
}

.derivations-row-link strong {
  color: var(--brand-strong, #2950a8);
}

.derivations-row-subtitle {
  font-size: 0.82rem;
  color: #6b7382;
}

.derivations-tier-badge,
.derivations-epistemic,
.derivation-domain-pill,
.derivation-admin-status {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.derivations-tier-foundational { background: #1f3a5f; color: #e2ecff; }
.derivations-tier-derived      { background: #2950a8; color: #ffffff; }
.derivations-tier-applied      { background: #6d4d9c; color: #f3eaff; }
.derivations-tier-hypothesis   { background: #b25e1f; color: #fff3e6; }

.derivations-epistemic-theorem    { background: #144d2c; color: #d6f4e0; }
.derivations-epistemic-hypothesis { background: #7a4500; color: #ffe1bb; }
.derivations-epistemic-model      { background: #423a6b; color: #e3deff; }
.derivations-epistemic-open       { background: #555c69; color: #e7eaf0; }

.derivation-domain-pill {
  background: #eef2fb;
  color: #2950a8;
  text-transform: none;
  letter-spacing: 0;
}

.derivation-admin-status-published { background: #144d2c; color: #d6f4e0; }
.derivation-admin-status-draft     { background: #555c69; color: #e7eaf0; }
.derivation-admin-status-proposed  { background: #7a4500; color: #ffe1bb; }
.derivation-admin-status-retired   { background: #6b1f1f; color: #ffd9d9; }

/* -------- Individual derivation page -------- */

.derivation-page {
  max-width: 880px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
}

.derivation-crumbs {
  font-size: 0.85rem;
  color: #5d6678;
  padding: 1rem 0 0.6rem;
}

.derivation-crumbs a {
  color: inherit;
}

.derivation-hero {
  padding: 1.2rem 0 1.6rem;
  border-bottom: 1px solid #e4e6ed;
  margin-bottom: 1.4rem;
}

.derivation-hero-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.8rem;
}

.derivation-version {
  font-size: 0.78rem;
  color: #6b7382;
  font-variant-numeric: tabular-nums;
}

.derivation-title {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: #0d1320;
}

.derivation-subtitle {
  font-size: 1.05rem;
  color: #475067;
  margin: 0 0 0.8rem;
  line-height: 1.45;
}

.derivation-summary {
  font-size: 1rem;
  line-height: 1.55;
  color: #2d3548;
  margin: 0;
  border-left: 3px solid #2950a8;
  padding-left: 0.9rem;
}

.derivation-section {
  margin: 1.8rem 0;
}

.derivation-section-title {
  font-size: 1.18rem;
  margin: 0 0 0.7rem;
  color: #0d1320;
  border-bottom: 1px solid #eaecf2;
  padding-bottom: 0.35rem;
}

.derivation-predictions {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.derivation-predictions th,
.derivation-predictions td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid #e4e6ed;
  vertical-align: top;
  text-align: left;
}

.derivation-predictions thead {
  background: #f2f4f9;
}

.derivation-prediction-notes,
.derivation-prediction-source {
  font-size: 0.84rem;
  color: #5d6678;
}

.derivation-chain {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: deriv-chain;
}

.derivation-chain-lede {
  color: #475067;
  font-size: 0.92rem;
  margin: 0 0 0.9rem;
}

.derivation-chain-step {
  margin: 0 0 0.7rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #e4e6ed;
  border-left: 4px solid #2950a8;
  border-radius: 6px;
  background: #ffffff;
}

.derivation-chain-step-unresolved {
  border-left-color: #b25e1f;
  background: #fff7ee;
}

.derivation-chain-step-head {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.derivation-chain-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: #1f3a5f;
  color: #e2ecff;
  font-size: 0.78rem;
  font-weight: 600;
}

.derivation-chain-label {
  flex: 1 1 auto;
  color: #0d1320;
}

.derivation-chain-kind {
  font-size: 0.72rem;
  color: #5d6678;
  background: #eef2fb;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  text-transform: lowercase;
}

.derivation-chain-flag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}

.derivation-chain-flag-ok  { background: #144d2c; color: #d6f4e0; }
.derivation-chain-flag-bad { background: #7a1f1f; color: #ffd9d9; }

.derivation-chain-step-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.88rem;
}

.derivation-chain-symbol {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace;
  background: #f2f4f9;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: #1f3a5f;
}

.derivation-chain-link {
  font-size: 0.86rem;
  font-weight: 500;
  color: #2950a8;
}

.derivation-narrative {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #1c2233;
}

.derivation-narrative h2,
.derivation-narrative h3,
.derivation-narrative h4 {
  margin: 1.4rem 0 0.6rem;
  color: #0d1320;
  line-height: 1.3;
}

.derivation-narrative p {
  margin: 0 0 0.9rem;
}

.derivation-narrative code {
  background: #f2f4f9;
  padding: 0.1rem 0.32rem;
  border-radius: 3px;
  font-size: 0.92em;
}

.derivation-narrative pre {
  background: #0e1320;
  color: #d8e0f0;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
}

.derivation-narrative pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.derivation-narrative blockquote {
  border-left: 3px solid #2950a8;
  background: #f5f7fb;
  margin: 0 0 0.9rem;
  padding: 0.4rem 0.8rem;
}

.derivation-falsifier .derivation-section-title {
  color: #7a1f1f;
}

.derivation-falsifier {
  background: #fff5f5;
  border-left: 3px solid #b03030;
  padding: 0.6rem 1rem 0.3rem;
  border-radius: 4px;
}

.derivation-deps {
  list-style: square;
  margin: 0;
  padding-left: 1.4rem;
  font-size: 0.95rem;
}

.derivation-references {
  list-style: decimal;
  padding-left: 1.4rem;
  font-size: 0.92rem;
  color: #2d3548;
}

.derivation-references li {
  margin: 0 0 0.7rem;
  line-height: 1.5;
}

.derivation-ref-kind {
  display: inline-block;
  background: #eef2fb;
  color: #2950a8;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  margin-right: 0.4rem;
  letter-spacing: 0.04em;
}

.derivation-ref-meta {
  color: #5d6678;
  font-size: 0.88rem;
}

.derivation-ref-note {
  color: #475067;
  font-size: 0.88rem;
  font-style: italic;
}

.derivation-editor-notes {
  background: #fef9e7;
  border-left: 3px solid #f59e0b;
  padding: 0.6rem 1rem 0.3rem;
  border-radius: 4px;
}

.derivation-cite-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
}

.derivation-cite-list li {
  margin: 0 0 0.25rem;
}

.derivation-cite-list code {
  font-size: 0.86em;
  word-break: break-all;
}

.derivation-cite-bibtex code {
  display: block;
  background: #f2f4f9;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.derivation-tex-block {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e4e6ed;
  overflow-x: auto;
}

.derivations-empty {
  color: #5d6678;
}

.derivations-footer-note {
  font-size: 0.92rem;
  color: #475067;
  background: #f8fafc;
  padding: 1rem 1.2rem;
  border-radius: 8px;
}

.derivations-footer-note p { margin: 0 0 0.6rem; }
.derivations-footer-note p:last-child { margin-bottom: 0; }

.derivations-footer-note code {
  background: #e4e9f3;
  padding: 0.05rem 0.32rem;
  border-radius: 3px;
}

/* -------- Theorem page cross-link panel -------- */

.canon-theorem-derivations {
  margin: 1.5rem 0;
  padding: 0.9rem 1rem;
  background: #f5f7fb;
  border-radius: 8px;
  border-left: 3px solid #2950a8;
}

.canon-theorem-derivations h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #1f3a5f;
}

.canon-theorem-derivations ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.94rem;
}

.canon-theorem-derivations li {
  margin: 0 0 0.25rem;
}

/* -------- Admin table tightening -------- */

.derivations-admin-table {
  font-size: 0.88rem;
}

.derivations-admin-actions form {
  margin: 0;
}

.derivations-admin-actions .btn {
  font-size: 0.82rem;
  padding: 0.25rem 0.6rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -3em;
  left: 0;
  background: #1f3a5f;
  color: #f5f7fb;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}


/* === Pith Research UI v3 (2026-05-14) === */
.research-intent-row { display: flex; align-items: center; gap: .55rem; margin: -.2rem 0 .55rem; flex-wrap: wrap; }
.research-intent-badge { font-size: .76rem; padding: .15rem .55rem; border-radius: 999px; background: #1b2845; color: #e2e8f0; letter-spacing: .02em; text-transform: lowercase; }
.research-intent-formal_derivation { background: #1f3a8a; color: #fff; }
.research-intent-counterarguments { background: #7c2d12; color: #fff; }
.research-intent-citation_trail { background: #1e3a8a; color: #fff; }
.research-intent-literature_survey { background: #0f766e; color: #fff; }
.research-intent-paper_review { background: #5b21b6; color: #fff; }
.research-intent-definition_explainer { background: #0e7490; color: #fff; }
.research-intent-journal_help { background: #4d7c0f; color: #fff; }
.research-intent-general { background: #475569; color: #fff; }
.research-source-head { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.research-source-meta-row { display: flex; gap: .3rem; flex-wrap: wrap; margin: .25rem 0; }
.research-source-channel { font-size: .68rem; padding: .1rem .4rem; border-radius: 5px; background: rgba(99,102,241,0.13); color: #6366f1; letter-spacing: .03em; }
.research-channel-vector { background: rgba(20,184,166,0.15); color: #14b8a6; }
.research-channel-fts { background: rgba(99,102,241,0.13); color: #4f46e5; }
.research-channel-exact { background: rgba(34,197,94,0.18); color: #15803d; font-weight: 600; }
.research-channel-hub { background: rgba(245,158,11,0.18); color: #b45309; }
.research-channel-canon { background: rgba(124,58,237,0.18); color: #6d28d9; }
.research-channel-prior_ask { background: rgba(56,189,248,0.18); color: #0284c7; }
.research-channel-polarity { background: rgba(244,114,182,0.18); color: #be185d; }
.research-channel-graph_inbound { background: rgba(248,113,113,0.18); color: #b91c1c; }
.research-source-rerank { font-size: .68rem; padding: .1rem .4rem; border-radius: 5px; background: rgba(15,23,42,0.06); color: #475569; }
.research-source-polarity { font-size: .68rem; padding: .1rem .4rem; border-radius: 5px; background: rgba(15,23,42,0.06); color: #334155; }
.research-polarity-support { background: rgba(34,197,94,0.16); color: #15803d; }
.research-polarity-extend { background: rgba(45,212,191,0.16); color: #0f766e; }
.research-polarity-use_method { background: rgba(99,102,241,0.16); color: #4338ca; }
.research-polarity-baseline { background: rgba(245,158,11,0.16); color: #b45309; }
.research-polarity-contest { background: rgba(248,113,113,0.18); color: #b91c1c; }
.research-polarity-refute { background: rgba(220,38,38,0.18); color: #b91c1c; }
.research-polarity-background { background: rgba(148,163,184,0.18); color: #475569; }
.research-source-tier { font-size: .68rem; padding: .1rem .4rem; border-radius: 5px; background: rgba(245,158,11,0.16); color: #b45309; }
.research-source-why { font-size: .82rem; color: #334155; margin: .3rem 0 .2rem; }
.research-source-snippet { font-size: .82rem; color: #475569; margin: 0; }


/* === Pith Research dossier v3 (2026-05-14) === */
.research-claim-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.research-claim-table th, .research-claim-table td { padding: .35rem .55rem; border-bottom: 1px solid #e2e8f0; vertical-align: top; text-align: left; }
.research-claim-table th { font-weight: 600; background: rgba(15,23,42,0.03); }
.research-stage-list { display: flex; gap: .6rem; flex-wrap: wrap; padding-left: 0; list-style: none; margin: 0; }
.research-stage { font-size: .75rem; padding: .25rem .6rem; border-radius: 999px; background: rgba(148,163,184,0.18); color: #475569; letter-spacing: .03em; }
.research-stage-done { background: rgba(34,197,94,0.16); color: #15803d; }
.research-stage-current { background: rgba(99,102,241,0.18); color: #4338ca; font-weight: 600; }
.research-subq-list li { margin: .2rem 0; }
