:root {
  --bg: #0a0c0f;
  --bg2: #0f1216;
  --card: #13171c;
  --card2: #181d23;
  --line: #222a33;
  --line2: #2c3540;
  --text: #e8edf2;
  --muted: #8d99a6;
  --faint: #5d6874;
  --accent: #d4ff3a;
  --accent-ink: #0a0c0f;
  --true: #3ddc84;
  --mostly: #9be15d;
  --partly: #f5c542;
  --false: #ff5d5d;
  --pending: #6aa9ff;
  --stale: #8d99a6;
  --unver: #b48cff;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7f4;
  --bg2: #eef0ec;
  --card: #ffffff;
  --card2: #f7f8f5;
  --line: #e2e5df;
  --line2: #d3d8d0;
  --text: #14181c;
  --muted: #5b6670;
  --faint: #8b949c;
  --accent: #4b6b00;
  --accent-ink: #ffffff;
  --true: #12a150;
  --mostly: #5c9e1a;
  --partly: #c08a00;
  --false: #d93636;
  --pending: #2a6fdb;
  --stale: #6b7680;
  --unver: #7b4fd6;
  --shadow: 0 10px 40px rgba(20,30,20,.12);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f4; --bg2: #eef0ec; --card: #ffffff; --card2: #f7f8f5; --line: #e2e5df; --line2: #d3d8d0;
    --text: #14181c; --muted: #5b6670; --faint: #8b949c; --accent: #4b6b00; --accent-ink: #ffffff;
    --true: #12a150; --mostly: #5c9e1a; --partly: #c08a00; --false: #d93636; --pending: #2a6fdb; --stale: #6b7680;
    --unver: #7b4fd6; --shadow: 0 10px 40px rgba(20,30,20,.12); color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand b { color: var(--accent); font-weight: 800; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 999px; font-weight: 500; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.active { color: var(--text); background: var(--card2); box-shadow: inset 0 0 0 1px var(--line2); }
.theme-btn { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--muted); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.theme-btn:hover { color: var(--text); border-color: var(--line2); }

/* hero */
.hero { padding: 34px 0 18px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: end; }
.hero h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 10px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; color: var(--muted); max-width: 560px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .n { font: 600 22px/1.1 var(--mono); letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* controls */
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; position: sticky; top: 60px; z-index: 10; background: var(--bg); }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 8px; font: 500 13px Inter, sans-serif; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.select, .search { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 11px; padding: 8px 12px; font: 13px Inter, sans-serif; }
.search { min-width: 200px; flex: 1; max-width: 320px; }
.select:focus, .search:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 1px; }
.toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent); }

/* feed */
.day { margin: 26px 0 10px; font: 600 12px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 10px; }
.day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.card:hover { border-color: var(--line2); background: var(--card2); }
.card.new { box-shadow: inset 3px 0 0 var(--accent); }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.who .name { font-weight: 600; }
.who .handle { color: var(--muted); }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--line); object-fit: cover; flex: none; }
.avatar.lg { width: 64px; height: 64px; }
.avatar.md { width: 34px; height: 34px; }
.claim { font-size: 16px; line-height: 1.45; font-weight: 500; letter-spacing: -.005em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 9px; color: var(--muted); font-size: 12.5px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line2); font-size: 11.5px; font-weight: 500; color: var(--muted); }
.tag.lab { color: var(--text); }
.cred { font: 500 11.5px var(--mono); padding: 2px 7px; border-radius: 6px; background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.dots { display: inline-flex; gap: 2px; vertical-align: middle; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line2); display: block; }
.dots i.on { background: var(--muted); }
.pill { white-space: nowrap; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; }
.v-true { color: var(--true); } .v-mostly_true { color: var(--mostly); } .v-partly_true { color: var(--partly); }
.v-false { color: var(--false); } .v-pending { color: var(--pending); } .v-already_public { color: var(--stale); }
.v-unverifiable { color: var(--unver); } .v-unfalsifiable { color: var(--stale); }
.bg-true { background: var(--true); } .bg-mostly_true { background: var(--mostly); } .bg-partly_true { background: var(--partly); }
.bg-false { background: var(--false); } .bg-pending { background: var(--pending); } .bg-already_public, .bg-unfalsifiable { background: var(--stale); }
.bg-unverifiable { background: var(--unver); }

/* score ring */
.ring { position: relative; width: 58px; height: 58px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; font: 600 17px var(--mono); letter-spacing: -.03em; }
.ring .cap { position: absolute; left: 0; right: 0; bottom: -15px; text-align: center; font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.ring.lg { width: 92px; height: 92px; }
.ring.lg .num { font-size: 28px; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.more { display: block; margin: 18px auto 40px; background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 10px 18px; border-radius: 11px; cursor: pointer; font: 500 14px Inter, sans-serif; }
.more:hover { border-color: var(--line2); }

/* leaderboard */
.lb-head { padding: 34px 0 6px; }
.lb-head h1 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 8px; }
.lb-head p { color: var(--muted); margin: 0; max-width: 720px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 30px; }
table.lb { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
table.lb th { text-align: left; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 12px 12px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; background: var(--card2); position: sticky; top: 0; }
table.lb th.num, table.lb td.num { text-align: right; }
table.lb th:hover { color: var(--text); }
table.lb th.sorted { color: var(--accent); }
table.lb td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.lb tr:last-child td { border-bottom: 0; }
table.lb tbody tr { cursor: pointer; }
table.lb tbody tr:hover td { background: var(--card2); }
.rank { font: 600 14px var(--mono); color: var(--faint); width: 34px; }
.rank.top { color: var(--accent); }
.lbwho { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.lbwho .n1 { font-weight: 600; line-height: 1.2; }
.lbwho .n2 { color: var(--muted); font-size: 12.5px; }
.mono { font-family: var(--mono); }
.scorebar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.scorebar .bar { width: 70px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.scorebar .bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.strip { display: flex; gap: 2px; }
.strip i { width: 6px; height: 14px; border-radius: 2px; display: block; }
.catbadge { font-size: 11px; color: var(--muted); border: 1px solid var(--line2); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.section-title { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 30px 0 10px; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer.open { pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow); overflow-y: auto; transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); padding: 26px 26px 60px; }
.drawer.open .drawer-panel { transform: none; }
.drawer-close { position: sticky; top: 0; float: right; margin: -8px -8px 0 0; background: var(--card); border: 1px solid var(--line); color: var(--muted); width: 34px; height: 34px; border-radius: 10px; font-size: 20px; cursor: pointer; z-index: 2; }
.drawer-close:hover { color: var(--text); }
.d-top { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; padding-right: 40px; }
.d-claim { font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; margin: 6px 0 12px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.panel h3 { margin: 0 0 10px; font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.tweet { border-left: 2px solid var(--line2); padding: 2px 0 2px 12px; margin: 8px 0; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; color: var(--text); }
.tweet .tmeta { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; white-space: normal; }
.tweet a { color: var(--accent); text-decoration: none; }
.comp { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.comp:last-child { border-bottom: 0; }
.comp .dv { font-family: var(--mono); color: var(--muted); }
.comp .dv.pos { color: var(--true); } .comp .dv.neg { color: var(--false); }
.ev a { display: block; color: var(--accent); text-decoration: none; font-size: 13.5px; margin: 4px 0; word-break: break-word; }
.ev a:hover { text-decoration: underline; }
.minirow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.minirow:last-child { border-bottom: 0; }
.minirow:hover .mt { color: var(--accent); }
.minirow .md { color: var(--faint); font: 12px var(--mono); white-space: nowrap; padding-top: 2px; }
.minirow .mt { flex: 1; }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 6px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.kv div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.kv b { display: block; font: 600 18px var(--mono); }
.kv span { color: var(--muted); font-size: 11.5px; }
.note { color: var(--muted); font-size: 12.5px; }
.link { color: var(--accent); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* profile */
.prof-head { display: flex; gap: 20px; align-items: center; padding: 30px 0 10px; flex-wrap: wrap; }
.prof-head h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.prof-head .sub { color: var(--muted); }
.prof-head .bio { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 640px; }
.prof-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.labbars .lr { display: grid; grid-template-columns: 90px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.labbars .track { height: 8px; background: var(--line); border-radius: 5px; overflow: hidden; }
.labbars .track i { display: block; height: 100%; border-radius: 5px; }

/* about */
.prose { max-width: 760px; padding: 30px 0 40px; }
.prose h1 { font-size: 30px; letter-spacing: -.03em; }
.prose h2 { font-size: 19px; margin-top: 30px; letter-spacing: -.01em; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.prose code { font-family: var(--mono); font-size: 13px; background: var(--card); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line); }
.calib { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding: 10px 0 0; border-bottom: 1px solid var(--line); }
.calib .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.calib .barv { width: 100%; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 2px; opacity: .85; }
.calib .exp { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); }
.calib-labels { display: flex; gap: 8px; font: 11px var(--mono); color: var(--faint); }
.calib-labels span { flex: 1; text-align: center; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--faint); font-size: 12.5px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); margin-top: 40px; }
.foot a { color: var(--muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 22px; }
  .hero h1 { font-size: 27px; }
  .prof-grid { grid-template-columns: 1fr; }
  .controls { top: 60px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav { margin-left: 0; }
  .nav a { padding: 6px 9px; }
  .brand span { display: none; }
  .card { grid-template-columns: 48px 1fr; padding: 14px; gap: 12px; }
  .card .right { grid-column: 2; }
  .ring { width: 46px; height: 46px; }
  .ring .num { font-size: 14px; }
  .claim { font-size: 15px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat .n { font-size: 18px; }
  .search { max-width: none; min-width: 0; width: 100%; }
  .drawer-panel { padding: 20px 16px 50px; }
  .d-claim { font-size: 17px; }
}

/* keep segmented controls inside the viewport on narrow screens */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
body { overflow-x: hidden; }
@media (max-width: 560px) {
  .controls { position: static; gap: 8px; }
  .controls .seg { width: 100%; }
  .controls .select { flex: 1; }
  .lb-head h1 { font-size: 25px; }
  .prof-head h1 { font-size: 23px; }
  .kv { grid-template-columns: repeat(2, 1fr); }
}
