/* ============================================
   Whitepaper Styles
   Reading-optimized, same dark theme
   ============================================ */

:root {
  --bg-deep: #0a0e1a;
  --bg-panel: #0f1526;
  --bg-card: #141b2d;
  --bg-hover: #1a2340;
  --border: #1e2a4a;
  --border-glow: #2a4a8a;

  --cyan: #00e5ff;
  --cyan-dim: #0088aa;
  --cyan-glow: rgba(0, 229, 255, 0.3);
  --amber: #ffb300;
  --amber-dim: #aa7700;
  --purple: #b388ff;
  --purple-dim: #7c4dff;
  --green: #69f0ae;
  --green-dim: #2e7d32;
  --red: #ff5252;
  --red-dim: #c62828;

  --text: #e0e6f0;
  --text-dim: #8899bb;
  --text-muted: #556688;

  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.8;
  min-height: 100vh;
}

/* ---- Whitepaper Container ---- */
.wp-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ---- Header ---- */
.wp-header {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.wp-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  max-width: 650px;
  margin: 0 auto;
}

.wp-header .wp-subtitle {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.wp-header .wp-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.wp-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.wp-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.wp-nav a:hover { color: var(--cyan); }

/* ---- Table of Contents ---- */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2.5rem;
}

.toc h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}

.toc ol {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
}

.toc li {
  counter-increment: toc-counter;
  padding: 0.25rem 0;
}

.toc li::before {
  content: counter(toc-counter) ". ";
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.toc a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.toc a:hover { color: var(--cyan); }

/* ---- Sections ---- */
.wp-section {
  margin-bottom: 2.5rem;
}

.wp-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.wp-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan);
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.wp-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

.wp-section p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.8;
}

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

.wp-section .highlight { color: var(--amber); font-weight: 500; }
.wp-section .emphasis { color: var(--cyan); font-weight: 500; }

/* ---- Equations ---- */
.equation {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

/* ---- Data Tables ---- */
.wp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.8rem;
}

.wp-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 2px solid var(--border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wp-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(30, 42, 74, 0.5);
  color: var(--text);
}

.wp-table tr:hover td { background: rgba(0, 229, 255, 0.03); }

.wp-table .mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ---- Verdict Badges ---- */
.verdict {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}

.verdict.plausible { background: rgba(100,200,255,0.15); color: #64c8ff; border: 1px solid rgba(100,200,255,0.3); }
.verdict.falsified { background: rgba(255,82,82,0.15); color: var(--red); border: 1px solid rgba(255,82,82,0.3); }
.verdict.consistent { background: rgba(158,158,158,0.15); color: #9e9e9e; border: 1px solid rgba(158,158,158,0.3); }
.verdict.inconclusive { background: rgba(255,179,0,0.15); color: var(--amber); border: 1px solid rgba(255,179,0,0.3); }
.verdict.unvalidated { background: rgba(206,147,216,0.15); color: #ce93d8; border: 1px solid rgba(206,147,216,0.3); }

/* ---- Callout / Quote ---- */
.wp-callout {
  background: var(--bg-card);
  border-left: 3px solid var(--cyan);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
}

.wp-callout.warning {
  border-left-color: var(--amber);
}

.wp-callout.critical {
  border-left-color: var(--red);
}

/* ---- Parameter Lists ---- */
.param-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.param-list li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.2rem 0 0.2rem 1rem;
  position: relative;
  line-height: 1.6;
}

.param-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.param-list code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* ---- References ---- */
.wp-references {
  list-style: none;
  padding: 0;
}

.wp-references li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.4rem 0 0.4rem 2rem;
  position: relative;
  line-height: 1.6;
}

.wp-references li::before {
  content: attr(data-ref);
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.wp-references em { color: var(--text); }

/* ---- Footer ---- */
.wp-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.wp-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.wp-footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.wp-footer-links a:hover { color: var(--cyan); }

.wp-footer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .wp-header h1 { font-size: 1.3rem; }
  .wp-container { padding: 0 1rem 3rem; }
  .wp-table { font-size: 0.7rem; }
  .equation { font-size: 0.7rem; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-glow); }
