/* Epistemia shared design system - loaded by report and lab.
   Tokens first, then the shared chrome (header, footer, buttons, pills).
   Page-specific rules live in each page's own CSS. */

:root {
  --bg: #f7f6f3;
  --ink: #26241f;
  --muted: #6b675e;
  --faint: #8a857a;
  --line: #d8d4cc;
  --line-soft: #e2ded6;
  --panel: #fdfdfc;
  --accent: #2c3e50;
  --accent-soft: #3d556e;
  --gold: #b08d3e;
  --red: #9c3c34;
  --green: #4a7d52;
  --blue: #4e79a7;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, 'Helvetica Neue', sans-serif;
  --mono: ui-monospace, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); line-height: 1.65; }

a { color: var(--accent); }

h1 { font-weight: 600; letter-spacing: -0.015em; }
h2, h3 { font-weight: 600; }

/* ---------- shared site header ---------- */
.site-header { position: sticky; top: 0; z-index: 100;
  background: rgba(247, 246, 243, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 rgba(194, 87, 31, 0.28);
  font-family: var(--sans); }
.site-header .bar { max-width: 1400px; margin: 0 auto;
  padding: 7px 36px; display: flex; align-items: center; gap: 22px; }
.site-header .wordmark { font-family: var(--serif); font-size: 1.18rem;
  font-weight: 700; color: var(--ink); text-decoration: none;
  letter-spacing: 0.035em; display: inline-flex; align-items: center;
  gap: 10px; transition: color 0.15s ease; }
.site-header .wordmark svg { display: block; flex: none;
  transition: transform 0.25s ease; }
.site-header .wordmark:hover { color: var(--gold); }
.site-header .wordmark:hover svg { transform: rotate(-8deg); }
.site-header nav { display: flex; gap: 20px; flex: 1; min-width: 0;
  overflow-x: auto; white-space: nowrap; }
.site-header nav a { color: var(--muted); text-decoration: none;
  font-size: 0.88rem; padding: 5px 2px; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease; }
.site-header nav a:hover { color: var(--ink); border-bottom-color: #d9d4c9; }
.site-header nav a.active { color: var(--ink); font-weight: 600;
  border-bottom-color: var(--accent); }

/* status pill (oracle connected / demo mode) */
.status-pill { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 3px 11px; border-radius: 20px;
  border: 1px solid transparent; white-space: nowrap; }
.status-pill.connected { background: #e3f0e3; color: #2c6b2f;
  border-color: #c8e2c8; }
.status-pill.demo { background: #f4e9d4; color: #8a6413;
  border-color: #e6d7b8; }
.status-pill.checking { background: var(--panel); color: var(--faint);
  border-color: var(--line-soft); }

/* ---------- shared buttons ---------- */
button { font-family: var(--serif); font-size: 0.92rem; padding: 7px 16px;
  border: 1px solid #b9b4a9; background: var(--panel); color: var(--ink);
  border-radius: 6px; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.05s ease; }
button:hover { background: #efece6; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: default; transform: none; }
button.primary { background: var(--accent); border-color: var(--accent);
  color: var(--bg); }
button.primary:hover { background: var(--accent-soft); }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- shared footer ---------- */
.site-footer { margin-top: 90px; border-top: 1px solid var(--line);
  padding: 22px 36px 40px; color: var(--faint); font-size: 0.85rem;
  font-family: var(--serif); }
.site-footer .bar { max-width: 1400px; margin: 0 auto; }
.site-footer a { color: var(--muted); }
.site-footer code { font-family: var(--mono); font-size: 0.9em;
  background: #efece6; padding: 1px 5px; border-radius: 4px;
  overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .site-header .bar { padding: 6px 16px; gap: 12px; }
  .site-header nav { gap: 12px; }
  .site-footer { padding: 18px 16px 34px; }
}
