/* Publishing site styles, following the Mutuo brand (paper, ink, blue and orange; Manrope).
   Colors are tokens on :root, redefined for dark mode. */
@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope-Variable.woff") format("woff");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --bg: #faf9f5;
  --surface: #fdfcf9;
  --sunk: #efeee7;
  --text: #252a2a;
  --muted: #59625f;
  --faint: #737b78;
  --border: #d7dad2;
  --accent: #2e6493;
  --accent-hover: #234d72;
  --accent-ink: #fff;
  --repro: #2e6493;
  --repro-bg: #e2eaf1;
  --finding: #a84a00;
  --finding-dot: #d55e00;
  --finding-bg: #f7e6d7;
  --notice-bg: #f6eccf;
  --good: #267d78;
  --mixed: #85620a;
  --bad: #b0362a;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 42rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1f1f;
    --surface: #212626;
    --sunk: #2a3030;
    --text: #ece9e1;
    --muted: #aab1ad;
    --faint: #878e8b;
    --border: #363c3c;
    --accent: #93b8dc;
    --accent-hover: #b6d0e9;
    --accent-ink: #1b1f1f;
    --repro: #93b8dc;
    --repro-bg: #22344a;
    --finding: #f1a46c;
    --finding-dot: #e7843d;
    --finding-bg: #40291a;
    --notice-bg: #3a3420;
    --good: #6cc3bb;
    --mixed: #dcb45f;
    --bad: #f08b7a;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
code, pre { font-family: var(--mono); font-size: 0.88em; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: calc(var(--measure) + 2rem); }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } .narrow { max-width: calc(var(--measure) + 4rem); } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; }
.brand { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; padding: 0.6rem 0; color: var(--text); text-decoration: none; line-height: 1; }
.brand:hover { color: var(--text); }
.wordmark { display: block; height: 30px; width: auto; }
.brand span { font-size: 9px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
nav { display: flex; gap: 0.25rem; }
nav a { color: var(--muted); text-decoration: none; padding: 0.4rem 0.6rem; border-radius: 6px; font-size: 0.95rem; }
nav a:hover { color: var(--text); background: var(--sunk); }
nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.site-footer { border-top: 1px solid var(--border); margin-top: 4rem; padding: 2rem 0; color: var(--muted); font-size: 0.875rem; }
.footer-inner p { margin: 0.25rem 0; max-width: var(--measure); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

/* Home */
.hero { padding: 3.5rem 0 2.5rem; }
.hero h1 { font-family: var(--sans); font-weight: 600; font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.1; margin: 0 0 0.75rem; letter-spacing: -0.015em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); margin: 0; }
.kinds { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 3rem; }
@media (min-width: 40rem) { .kinds { grid-template-columns: 1fr 1fr; } }
.kind { display: block; padding: 1.25rem 1.35rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.15s; }
.kind:hover { border-color: var(--accent); color: var(--text); }
.kind h2 { font-family: var(--sans); font-size: 1.35rem; margin: 0 0 0.35rem; font-weight: 600; display: flex; align-items: center; gap: 0.55rem; }
.dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; flex: none; }
.dot-reproduction { background: var(--repro); }
.dot-finding { background: var(--finding-dot); }
.kind p { margin: 0 0 0.75rem; color: var(--muted); }
.count { font-size: 0.875rem; color: var(--faint); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-head h2, .page-head h1 { font-family: var(--sans); font-weight: 600; }
.section-head h2 { font-size: 1.4rem; margin: 0 0 1rem; }
.page-head { padding: 2.5rem 0 1.5rem; }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 0.5rem; line-height: 1.15; }
.empty { color: var(--muted); }

/* Badges and cards */
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 4px; line-height: 1.4; }
.badge-reproduction { color: var(--repro); background: var(--repro-bg); }
.badge-finding { color: var(--finding); background: var(--finding-bg); }

.search-controls { margin: 0 0 1.25rem; }
.search-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.search { flex: 1 1 18rem; margin: 0; }
.search input { width: 100%; max-width: 32rem; font: inherit; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.sort-select { font: inherit; font-size: 0.92rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.pill { font: inherit; font-size: 0.84rem; padding: 0.3rem 0.65rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; transition: border-color 0.12s, background 0.12s, color 0.12s; }
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pill[aria-pressed="true"] .pill-count { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.pill-count { font-size: 0.76rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.search-count { margin: 0.65rem 0 0; font-size: 0.85rem; color: var(--faint); }
.search-empty { color: var(--muted); }
.program-tag { font-weight: 500; color: var(--muted); }

.cards { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.card { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.85rem; font-size: 0.85rem; color: var(--faint); }
.card h3 { font-family: var(--sans); font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 0.5rem 0 0.35rem; max-width: 48rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card-original { margin: 0 0 0.35rem; font-size: 0.9rem; color: var(--muted); }
.card-summary { margin: 0; color: var(--muted); max-width: 48rem; }

/* Reproduction verdict: two labelled parts, each with a glyph so color is never the only cue */
.verdict { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0.15rem 0 0.45rem; font-size: 0.85rem; }
.verdict-part { display: flex; align-items: baseline; gap: 0.4rem; }
.verdict dt { color: var(--faint); }
.verdict dd { margin: 0; font-weight: 600; display: inline-flex; align-items: baseline; gap: 0.25rem; }
.glyph { font-size: 0.9em; }
.tone-good dd { color: var(--good); }
.tone-mixed dd { color: var(--mixed); }
.tone-bad dd { color: var(--bad); }
.tone-unclear dd { color: var(--muted); }
.verdict-large { margin: 0.85rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 0.95rem; gap: 0.5rem 1.75rem; }
.verdict-large .verdict-part { flex-direction: column; gap: 0.1rem; }
.verdict-large dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.verdict-large dd { font-size: 1.05rem; }
.verdict-note { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* Paper */
.paper-head { border-bottom: 1px solid var(--border); background: var(--surface); padding: 2.25rem 0 1.75rem; }
.paper-kicker { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; color: var(--faint); letter-spacing: 0.06em; }
.paper-head h1 { font-family: var(--sans); font-weight: 600; font-size: clamp(1.65rem, 4.5vw, 2.35rem); line-height: 1.18; letter-spacing: -0.01em; margin: 0.75rem 0 0.75rem; max-width: 50rem; }
.paper-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: 0; color: var(--muted); font-size: 0.92rem; }
.paper-byline { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.92rem; }
.notice { background: var(--notice-bg); padding: 0.6rem 0.85rem; border-radius: 6px; margin: 1rem 0 0; font-size: 0.92rem; }
.original { margin-top: 1.25rem; padding: 0.85rem 1rem; border-left: 3px solid var(--repro); background: var(--sunk); border-radius: 0 6px 6px 0; max-width: 50rem; }
.original .label { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.original a { font-family: var(--sans); font-size: 1.05rem; }
.original-cite { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 0.2rem; }

.paper-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-top: 1.5rem; }
@media (min-width: 64rem) {
  .paper-layout { grid-template-columns: minmax(0, 1fr) 15.5rem; gap: 3.5rem; padding-top: 2.25rem; }
  .paper-aside { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; }
}
.paper-body { min-width: 0; max-width: var(--measure); }
.aside-block { border-bottom: 1px solid var(--border); padding: 0.85rem 0; font-size: 0.9rem; }
.aside-block:first-child { padding-top: 0; }
.aside-block h2, .aside-block summary { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.45rem; }
.aside-block summary { cursor: pointer; margin: 0; }
.aside-block[open] summary { margin-bottom: 0.45rem; }
.aside-block ol, .plain { margin: 0; padding-left: 0; list-style: none; }
.aside-block ol { padding-left: 1.2rem; list-style: decimal; color: var(--faint); }
.aside-block li { margin: 0.3rem 0; line-height: 1.35; }
.aside-block a { text-decoration: none; }
.aside-block a:hover { text-decoration: underline; }
.aside-note { color: var(--faint); margin: 0.35rem 0 0; font-size: 0.85rem; }
.cite pre { white-space: pre-wrap; word-break: break-all; background: var(--sunk); padding: 0.6rem; border-radius: 6px; font-size: 0.75rem; margin: 0; }
@media (max-width: 63.99rem) {
  .paper-aside { margin-top: 1rem; display: grid; grid-template-columns: 1fr; border: 1px solid var(--border); border-radius: 10px; padding: 0.25rem 1rem; background: var(--surface); }
  .paper-aside .aside-block:last-child { border-bottom: 0; }
  .paper-aside .aside-block:first-child { padding-top: 0.85rem; }
}

.summary { background: var(--sunk); border-radius: 8px; padding: 1rem 1.2rem; margin-bottom: 2rem; }
.summary h2 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.35rem; font-family: var(--sans); }
.summary p { margin: 0; font-family: var(--sans); font-size: 1.05rem; line-height: 1.55; }

/* Long-form text */
.prose { font-family: var(--sans); font-size: 1.1rem; line-height: 1.65; }
.prose h2, .prose h3 { font-family: var(--sans); line-height: 1.3; scroll-margin-top: 1rem; }
.prose h2 { font-size: 1.3rem; font-weight: 600; margin: 2.5rem 0 0.75rem; letter-spacing: -0.005em; }
.prose h3 { font-size: 1.08rem; font-weight: 600; margin: 2rem 0 0.5rem; }
.prose h4 { font-family: var(--sans); font-size: 1rem; margin: 1.5rem 0 0.5rem; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose li { margin: 0.3rem 0; }
.prose li > p { margin: 0; }
.prose blockquote { margin: 1.5rem 0; padding: 0 0 0 1rem; border-left: 3px solid var(--border); color: var(--muted); }
.prose img { display: block; margin: 1.5rem auto 0.5rem; border-radius: 4px; background: #fff; }
.prose code { background: var(--sunk); padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.82em; word-break: break-word; }
.prose pre { background: var(--sunk); padding: 0.85rem 1rem; border-radius: 6px; overflow-x: auto; font-size: 0.85rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: 6px; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 0.85rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--sunk); font-weight: 600; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose .footnotes { font-size: 0.92rem; color: var(--muted); }
@media (max-width: 40rem) { .prose { font-size: 1.04rem; } }

/* Plain-English summary at the top of each paper */
.so-what { background: var(--sunk); border-radius: 8px; padding: 1rem 1.2rem; margin-bottom: 2rem; }
.so-what h2 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.4rem; }
.so-what p { margin: 0; font-size: 1.12rem; line-height: 1.6; }

/* A finding's self-rated importance */
.importance { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin: 0.15rem 0 0.45rem; font-size: 0.85rem; color: var(--faint); }
.importance strong { color: var(--finding); font-weight: 600; }
.self-rated { font-size: 0.9em; }
.dots { display: inline-flex; gap: 3px; }
.dot-i { width: 0.55rem; height: 0.55rem; border-radius: 50%; border: 1.5px solid var(--finding-dot); }
.dot-i.on { background: var(--finding-dot); }
.rating { margin-top: 1rem; max-width: 50rem; }
.importance-large { font-size: 0.95rem; margin: 0; }
.importance-large .importance-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.importance-large .dot-i { width: 0.7rem; height: 0.7rem; }
.importance-large strong { font-size: 1.05rem; }

/* Equations */
.prose .math.block { margin: 1.25rem 0; overflow-x: auto; overflow-y: hidden; }
.prose .katex { font-size: 1.05em; }

.verdict .why { font-weight: 400; color: var(--muted); }

/* Retraction notice and published responses from original authors */
.notice-retracted { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.response { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--border); }
.response h2 { font-size: 1.3rem; font-weight: 600; margin: 0 0 0.25rem; }
.response-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 1rem; }
