/* The research pages (src/pages/research.tsx): findings, the /research index and /replay. Plain HTML for everyone, no script; this file gives it the
   site's ground and fonts, a bar pinned to the top and a card under it that send a visitor to the real thing (briefs/2026-10-25-clarity-fixes.md C1,
   "take 4" of briefs/clarity-fixes/research-pages.html). Fonts are the site's own files (public/fonts). */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url('/fonts/archivo-800-wdth112-latin-v25.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/geist-var-latin-v5.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/geist-mono-var-latin-v6.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --ground: #050d22;
  --ground-2: #081736;
  --line: rgba(120, 160, 230, 0.16);
  --fg: #e7ecf5;
  --fg-2: #b4c0d6;
  --fg-3: #7d8cab;
  --blue: #1f6bff;
  --sky: #4fa3ff;
  --f-display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --f-ui: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--ground-2), var(--ground) 520px, #03070f) no-repeat var(--ground);
  color: var(--fg);
  font: 400 16px/1.65 var(--f-ui);
}
a { color: var(--sky); }

/* ------------------------------------------------------------ the bar */
.rbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px max(28px, env(safe-area-inset-right)) 7px max(28px, env(safe-area-inset-left));
  background: rgba(6, 14, 34, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.rbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  font: 800 15px/1 var(--f-display);
  font-stretch: 112%;
}
.rbar__mark { width: 40px; height: 21px; flex: none; }
.rbar__line { flex: 1; min-width: 0; color: var(--fg-3); font-size: 14px; line-height: 1.3; }
.rbar__sec { color: var(--fg-2); font-size: 14px; text-decoration: none; white-space: nowrap; }
.rbar__sec:hover { color: var(--fg); }
.rbar__go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 26px rgba(31, 107, 255, 0.4);
}
.rbar__go:hover { background: #3a82ff; }
.rbar a:focus-visible, .tcard a:focus-visible, .rstrip a:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }

/* The one-line brand strip under the bar on /replay. */
.rstrip { margin: 0; padding: 9px max(28px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: rgba(16, 32, 66, 0.4); color: var(--fg-2); font-size: 14px; line-height: 1.45; text-align: center; }

/* ------------------------------------------------------------ the page */
main { max-width: 720px; margin: 0 auto; padding: 36px max(28px, env(safe-area-inset-left)) 40px; }
.rkick { margin: 0 0 12px; font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky); }
h1, h2 { font-family: var(--f-display); font-stretch: 112%; font-weight: 800; text-wrap: balance; }
h1 { margin: 0 0 16px; font-size: 38px; line-height: 1.08; letter-spacing: -0.01em; }
h2 { margin: 40px 0 12px; font-size: 22px; line-height: 1.2; }
h3 { margin: 22px 0 6px; font-size: 17px; line-height: 1.3; }
p { margin: 0 0 14px; color: var(--fg-2); }
.sum { font-size: 18px; color: var(--fg); line-height: 1.6; }
.meta { font: 400 13px/1.5 var(--f-mono); color: var(--fg-3); margin-bottom: 22px; }
.claim { border-left: 3px solid var(--sky); padding: 4px 0 4px 16px; color: var(--fg); font-size: 17px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; color: var(--fg-2); }
li { margin: 0 0 10px; padding-left: 4px; }
li::marker { color: var(--sky); }
dl { margin: 0 0 14px; }
dt { margin-top: 12px; font-weight: 600; color: var(--fg); }
dd { margin: 2px 0 0; color: var(--fg-2); }

/* Results tables: mono right-aligned figures, sideways scroll on a phone. */
.tbl { overflow-x: auto; margin: 6px 0 18px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
caption { text-align: left; padding: 0 0 8px; color: var(--fg-3); font-size: 13px; }
th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; font: 500 11.5px/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--fg-2); vertical-align: top; font-variant-numeric: tabular-nums; }
td.n { font-family: var(--f-mono); color: var(--fg); text-align: right; white-space: nowrap; }
th.n { text-align: right; }

/* The CFTC 4.41 statement (src/lib/compliance.tsx): the same size as the text around it, never smaller. */
.disclaimer { margin: 18px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(16, 32, 66, 0.45); }
.disclaimer__label { margin: 0 0 6px; font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg); }
.disclaimer__body { margin: 0; font-size: inherit; color: var(--fg-2); }

/* ------------------------------------------------------------ the card under the bar */
.tcard { margin: 0 0 30px; border: 1px solid rgba(120, 160, 230, 0.3); border-radius: 16px; overflow: hidden; background: rgba(16, 32, 66, 0.55); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.tcard img { display: block; width: 100%; height: auto; }
.tcard__in { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 14px 18px; }
.tcard__in span { flex: 1; min-width: 180px; color: var(--fg-2); font-size: 14.5px; line-height: 1.45; }
.tcard__in b { color: var(--fg); }
.tcard a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: 0 8px 26px rgba(31, 107, 255, 0.4); }
.tcard a:hover { background: #3a82ff; }
.tcard--text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; }
.tcard__k { font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky); }
.tcard--text strong { font: 800 19px/1.2 var(--f-display); font-stretch: 112%; color: var(--fg); }

footer { max-width: 720px; margin: 0 auto; padding: 0 max(28px, env(safe-area-inset-left)) 56px; color: var(--fg-3); font-size: 14px; }
footer p { color: inherit; }

/* ------------------------------------------------------------ phones: the bar is the mark and the button, one row */
@media (max-width: 640px) {
  .rbar { gap: 8px; padding: 7px 12px; }
  .rbar__line, .rbar__sec, .rbar__brand span { display: none; }
  .rbar__go { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .rstrip { padding: 9px 16px; font-size: 13px; text-align: left; }
  main { padding: 24px 18px 32px; }
  footer { padding: 0 18px 48px; }
  h1 { font-size: 24px; }
  h2 { font-size: 19px; margin-top: 30px; }
  .sum { font-size: 16px; }
  body { font-size: 15px; }
  .tcard--text strong { font-size: 17px; }
}
@media (prefers-reduced-motion: no-preference) {
  .rbar__go { transition: background 0.2s ease; }
}
