/* The research page (research.html, made by tools/research/build.py): text with figures in the margin.
   Figures only use --ra (accent) and --rb (background); the theme at the end of style.css sets the colours. */
.rv { --ra: #fcc200; --rb: #1c1c1c; --line: #fff; --dim: rgba(255,255,255,.34); color: var(--text); padding-bottom: 40px; }
/* text */
.rv p { font-size: 19px; line-height: 1.6; margin: 0 0 20px; }
.rv p strong { font-weight: 600; color: var(--white); }
.cite { color: inherit; text-decoration: underline; text-decoration-color: var(--ra); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color .15s; }
.cite:hover, .cite:focus-visible, .cite.lit { color: var(--ra); }
.cite-todo { text-decoration-style: dotted; }
.rv h2 { font-weight: 300; color: var(--white); }
.rv-sub { display: block; font-size: .5em; color: var(--muted); margin-top: 8px; line-height: 1.3; }
.rv-sub::first-letter { text-transform: uppercase; }

/* figures */
.rv-fig { margin: 0; }
.fig { width: 100%; height: auto; display: block; color: var(--line); overflow: visible; }
.fig .l, .fig .lm, .fig .a, .fig .lf, .fig .af2, .fig .af4 { fill: none; vector-effect: non-scaling-stroke; }
.fig .l { stroke: var(--line); stroke-width: 1.25; }
.fig .lm { stroke: var(--dim); stroke-width: 1; }
.fig .lf { stroke: var(--line); stroke-width: 1.25; fill: rgba(255,255,255,.14); }
.fig .a { stroke: var(--ra); stroke-width: 1.75; }
.fig .af { fill: var(--ra); }
.fig .af2 { fill: var(--ra); stroke: var(--ra); }
.fig .af3 { fill: var(--ra); opacity: .3; }
.fig .af4 { fill: var(--ra); opacity: .07; }
.fig .wf { fill: var(--line); }
.fig .band { fill: var(--ra); opacity: .22; }
.fig text { font-family: var(--font); font-size: 13px; font-weight: 400; }
.fig .t { fill: var(--line); }
.fig .tm { fill: rgba(255,255,255,.62); font-size: 12px; }
.fig .ta { fill: var(--ra); }
.fig .tb { fill: var(--rb); font-weight: 800; }
.fig .th { fill: var(--line); font-size: 15px; font-weight: 600; }
.fig .tf { fill: var(--ra); font-size: 14px; font-weight: 600; }
figcaption { font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 10px; }
figcaption a { text-decoration: none; }
figcaption a:hover { color: var(--ra); }

/* references */
.rv-refs { margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--ra); }
.rv .rv-refs h2 { font-size: 22px; font-weight: 600; margin: 0 0 16px; }
.rv-refs h3 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 22px 0 8px; }
.rv-refs ol { margin: 0; padding-left: 26px; font-size: 13px; line-height: 1.45; color: var(--muted); columns: 2; column-gap: 36px; }
.rv-refs li { margin-bottom: 8px; break-inside: avoid; }
.rv-refs li::marker { color: var(--ra); }
.rv-refs a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 2px; }
.rv-refs a:hover { color: var(--ra); text-decoration-color: var(--ra); }
.rv-refs em { font-style: normal; }

/* ---------- layout ---------- */
.rv-1 h2 { font-size: 40px; margin: 64px 0 28px; display: flex; flex-wrap: wrap; column-gap: 14px; align-items: baseline; }
.rv-1 .rv-num { color: var(--ra); font-weight: 600; }
.rv-1 .rv-sub { flex-basis: 100%; }
.m-group { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; margin-bottom: 36px; }
.m-figs { position: sticky; top: 24px; align-self: start; display: grid; gap: 26px; }

.m-full { margin-bottom: 8px; }
.fig .thick { stroke-width: 3; }
.rv-1 .fig text { font-size: 15px; }
.rv-1 .fig .tm { font-size: 14px; }
.np-demo .fig { border: 1px solid rgba(255,255,255,.25); cursor: crosshair; touch-action: manipulation; }
.np-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.np-chips button, .np-bar button { font: inherit; font-size: 14px; color: var(--white); background: none; border: 1px solid rgba(255,255,255,.4); padding: 3px 10px; cursor: pointer; }
.np-chips button:hover, .np-bar button:hover { border-color: var(--ra); }
.np-chips button.on { background: var(--ra); border-color: var(--ra); color: #000; font-weight: 600; }
.np-bar { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 12px; font-size: 14px; color: var(--muted); }
.np-sliders { display: grid; gap: 6px; }
.np-sliders label { display: grid; grid-template-columns: 74px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.np-sliders input { width: 100%; accent-color: var(--ra); margin: 0; }
.np-sliders b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }

.fig .dash { stroke-dasharray: 4 3; }
.fig text.td { font-size: 19px; }
.game-demo .fig { cursor: default; }
.game-demo .fig.gd-graph { border: 1px solid rgba(255,255,255,.15); }
.gd-top { margin: 0 0 10px; color: var(--text); }
.gd-stage { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; align-items: start; }
.gd-side { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.gd-ns { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.gd-side button { font: inherit; font-size: 13px; color: var(--white); background: none; border: 1px solid rgba(255,255,255,.4); padding: 3px 0; cursor: pointer; }
.gd-side button:hover { border-color: var(--ra); }
.gd-side button.on { background: var(--ra); border-color: var(--ra); color: #000; font-weight: 600; }
.gd-side [data-play] { margin-top: 8px; }
.rv-1 .gd-plot text, .gd-plot text { font-size: 20px; }
.rv-1 .gd-plot .tm { font-size: 18px; }
.game-demo .fig.gd-graph { margin-top: 4px; }
.rv .gd-hint { font-size: 13px; line-height: 1.4; color: var(--text); margin: 8px 0 0; }
.gd-presets-label { margin-top: 14px; line-height: 1.25; }
.rv .gd-hint { margin-bottom: 14px; }
.gd-node { cursor: pointer; }
.gd-node:focus { outline: none; }

.clips canvas { display: block; width: 100%; height: auto; border: 1px solid rgba(255,255,255,.35); image-rendering: pixelated; }
.clips-bar { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 14px; color: var(--muted); }
.clips-bar b { font-size: 18px; font-weight: 600; color: var(--white); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .m-group { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .m-figs { position: static; order: -1; }
  .rv-1 h2 { font-size: 30px; }
  .rv-refs ol { columns: 1; }
}
@media (max-width: 520px) {
  .rv p { font-size: 17px; }
  .fig text { font-size: 15px; }
  .fig .tm { font-size: 14px; }
}
