:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #666;
  --border: #ddd;
  --accent: #0066cc;
  --accent-hover: #004499;
  --banner-bg: #f0f4ff;
  --banner-border: #b3c6ff;
  --code-bg: #f0f0f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --fg: #e0e0e0;
    --muted: #999;
    --border: #333;
    --accent: #6da3ff;
    --accent-hover: #a0c4ff;
    --banner-bg: #1a2233;
    --banner-border: #334466;
    --code-bg: #1a1a1a;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

code {
  font-family: inherit;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  font-size: 0.92em;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

strong {
  font-weight: 600;
}

/* Header */
.site-header {
  margin-bottom: 3rem;
}

.site-header h1 {
  font-size: 1.6rem;
}

.site-header .tagline {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Theory delta banner */
.theory-delta-banner {
  background: var(--banner-bg);
  border: 1px solid var(--banner-border);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.theory-delta-banner .label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* Findings list */
.findings-list {
  list-style: none;
  padding-left: 0;
}

.findings-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.findings-list li:last-child {
  border-bottom: none;
}

.findings-list .finding-title {
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}

.findings-list .finding-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.findings-list .finding-delta {
  font-size: 0.88rem;
  color: var(--fg);
}

/* Finding page */
.finding-meta-header {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.finding-meta-header span {
  margin-right: 1rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

/* Value prop */
.value-prop {
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.value-prop p {
  margin-bottom: 0.6rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

td a {
  word-break: break-word;
}

/* Evidence tags */
.evidence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  white-space: nowrap;
}

.tag-warn {
  border-color: #cc6600;
  color: #cc6600;
}

@media (prefers-color-scheme: dark) {
  .tag-warn {
    border-color: #ff9933;
    color: #ff9933;
  }
}

/* Nav */
nav {
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

/* Methodology page */
.site-header + h2 {
  margin-top: 0;
}
