/* Public research-briefs site — clean reading design, light + dark. */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1b1a17;
  --muted: #6b6862;
  --border: #e6e2da;
  --accent: #7a5cff;
  --accent-soft: #efeaff;
  --tooltip-bg: #26241f;
  --tooltip-text: #f4f2ec;
  --maxw: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16151a;
    --surface: #1e1d24;
    --text: #ececf0;
    --muted: #a2a0ab;
    --border: #302e39;
    --accent: #b3a0ff;
    --accent-soft: #262238;
    --tooltip-bg: #0c0b10;
    --tooltip-text: #ececf0;
  }
}

:root[data-theme="dark"] {
  --bg: #16151a; --surface: #1e1d24; --text: #ececf0; --muted: #a2a0ab;
  --border: #302e39; --accent: #b3a0ff; --accent-soft: #262238;
  --tooltip-bg: #0c0b10; --tooltip-text: #ececf0;
}
:root[data-theme="light"] {
  --bg: #fbfaf8; --surface: #ffffff; --text: #1b1a17; --muted: #6b6862;
  --border: #e6e2da; --accent: #7a5cff; --accent-soft: #efeaff;
  --tooltip-bg: #26241f; --tooltip-text: #f4f2ec;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* AI-authorship disclaimer banner */
.ai-disclaimer {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.5;
  padding: 0.6rem 0;
}

/* Header / footer */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 2.25rem 0 1.75rem;
}
.site-header h1 { margin: 0.2rem 0 0.4rem; font-size: 1.9rem; line-height: 1.15; letter-spacing: -0.01em; }
.tagline { margin: 0; color: var(--muted); font-size: 0.98rem; }
.brief-eyebrow { margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.brief-eyebrow a, .site-footer a { color: var(--accent); text-decoration: none; }
.brief-eyebrow a:hover, .site-footer a:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; padding: 2rem 0 3rem; margin-top: 3rem; }

/* Index list */
.brief-list { list-style: none; margin: 2rem 0; padding: 0; display: grid; gap: 0.75rem; }
.brief-card a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.brief-card a:hover { border-color: var(--accent); transform: translateY(-1px); }
.brief-date { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9rem; min-width: 6.2rem; }
.brief-topic { font-weight: 600; font-size: 1.05rem; }
.empty { color: var(--muted); margin: 2rem 0; }

/* Brief body */
.brief-body { padding-top: 1.5rem; }
.brief-body h2 { margin: 2.4rem 0 0.8rem; font-size: 1.3rem; letter-spacing: -0.01em; padding-bottom: 0.35rem; border-bottom: 1px solid var(--border); }
.brief-body h3 { margin: 1.6rem 0 0.6rem; font-size: 1.08rem; }
.brief-body p { margin: 0.85rem 0; }
.brief-body a { color: var(--accent); }
.brief-body ul { padding-left: 1.25rem; }
.brief-body li { margin: 0.4rem 0; }
.no-refs-notice { color: var(--muted); font-style: italic; font-size: 0.92rem; }

/* Tables */
.brief-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.94rem; display: block; overflow-x: auto; }
.brief-body th, .brief-body td { border: 1px solid var(--border); padding: 0.5rem 0.65rem; text-align: left; vertical-align: top; }
.brief-body th { background: var(--accent-soft); }

/* Clickable source citations */
.ref {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.ref:hover { text-decoration: underline; }
