/* fxyz research index — plain semantic CSS, no framework, light + dark */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --text: #16181d;
  --text-dim: #565c66;
  --border: #dde1e6;
  --link: #1a54c4;
  --link-visited: #5b3fa8;
  --accent: #0f172a;
  --badge-verified-bg: #e3f6ea;
  --badge-verified-text: #146c3e;
  --badge-unverified-bg: #eef0f3;
  --badge-unverified-text: #4a505a;
  --code-bg: #f0f1f4;
  --max-width: 860px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f14;
    --bg-alt: #17181f;
    --text: #e7e9ee;
    --text-dim: #a3a8b3;
    --border: #2a2c35;
    --link: #7fb0ff;
    --link-visited: #c3a6ff;
    --accent: #e7e9ee;
    --badge-verified-bg: #103322;
    --badge-verified-text: #6bdba0;
    --badge-unverified-bg: #22242c;
    --badge-unverified-text: #b7bcc6;
    --code-bg: #1c1e26;
  }
}

:root[data-theme="dark"] {
  --bg: #0f0f14;
  --bg-alt: #17181f;
  --text: #e7e9ee;
  --text-dim: #a3a8b3;
  --border: #2a2c35;
  --link: #7fb0ff;
  --link-visited: #c3a6ff;
  --accent: #e7e9ee;
  --badge-verified-bg: #103322;
  --badge-verified-text: #6bdba0;
  --badge-unverified-bg: #22242c;
  --badge-unverified-text: #b7bcc6;
  --code-bg: #1c1e26;
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --text: #16181d;
  --text-dim: #565c66;
  --border: #dde1e6;
  --link: #1a54c4;
  --link-visited: #5b3fa8;
  --accent: #0f172a;
  --badge-verified-bg: #e3f6ea;
  --badge-verified-text: #146c3e;
  --badge-unverified-bg: #eef0f3;
  --badge-unverified-text: #4a505a;
  --code-bg: #f0f1f4;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.site-header .brand {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}
.site-header .tagline {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

main {
  padding: 32px 20px 64px;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 12px;
  line-height: 1.25;
}
h2 {
  font-size: 1.15rem;
  margin: 40px 0 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
h3.paper-title {
  font-size: 1.02rem;
  margin: 0 0 4px;
  line-height: 1.4;
}

.lede { color: var(--text); }
.totals { color: var(--text-dim); }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-dim); }

.domain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.domain-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.domain-list a {
  font-weight: 600;
  text-decoration: none;
}
.domain-list a:hover { text-decoration: underline; }
.domain-list .count {
  color: var(--text-dim);
  font-size: 0.85rem;
  white-space: nowrap;
}

.paper-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.paper {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 16px 18px;
}
.paper-authors {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.paper-meta {
  margin: 0 0 8px;
  font-size: 0.82rem;
}
.paper-id {
  color: var(--text-dim);
}
.paper-notes {
  margin: 0 0 10px;
  font-size: 0.92rem;
}
.paper-tags {
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 0.72rem;
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 2px 8px;
  color: var(--text-dim);
}
.tag:hover { color: var(--text); border-color: var(--text-dim); }
.paper-link { margin: 0; font-size: 0.9rem; }
.paper-link-none {
  color: var(--text-dim);
  font-style: italic;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 2px;
}
.badge-verified {
  background: var(--badge-verified-bg);
  color: var(--badge-verified-text);
}
.badge-unverified {
  background: var(--badge-unverified-bg);
  color: var(--badge-unverified-text);
}

code {
  background: var(--code-bg);
  padding: 1px 4px;
  font-size: 0.9em;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 40px;
  color: var(--text-dim);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  main { padding: 24px 16px 48px; }
  .domain-list li { flex-direction: column; gap: 2px; }
}
