/* ------------------------------------------------------------------ design tokens
   Change a value here and it changes everywhere on the site.
   Colours, fonts, text sizes and spacing come from the Figma file
   "evidence-jam-causapalooza", frames "home page" and "components" (issue #27).
   Tokens marked "not in Figma yet" keep the site's earlier values until the
   design covers them. */

/* Fonts: system fonts only for now. The Figma fonts (Against, Flecha, Neue Haas Grotesk,
   Babel Sans) have trial, personal-use or commercial licences, so they can't be published in
   this public MIT repo. To use a web font: bundle it in static/fonts/ WITH its licence file
   (an open licence such as OFL), declare it here and put its name first in a stack below.
   Nothing may load from the internet (the site must work offline).

   Body text is Inter (SIL Open Font License, static/fonts/inter-LICENSE.txt), from the
   official Inter 4.1 release. static/fonts/inter.woff2 is cut down to keep pages light: weights
   400 to 700 only, text optical size, Latin characters only (31 KB instead of 352 KB). Any
   character it lacks falls back to the system fonts after it in --font-body. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* Headings are Newsreader Light (SIL Open Font License, static/fonts/newsreader-LICENSE.txt),
   from Google Fonts' repo (google/fonts, ofl/newsreader). Cut down to keep pages light: weight
   300 only, optical size fixed at 48 (the headings are all large), Latin characters only
   (20 KB instead of 451 KB). */
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colours, named as in Figma */
  --bright-blue: #024fec;  /* 6.3:1 on white: headings, links */
  --dark-blue: #28316e;
  --dark-navy: #262933;    /* text */
  --mid-blue: #6289c1;     /* 3.6:1 on white: large text, lines and fills only */
  --light-blue: #b8c3d7;   /* 1.9:1 on white: lines and backgrounds only, never text */
  --cream: #eee2cc;        /* panels */
  --white: #fff;

  /* what each colour is for */
  --text: var(--dark-navy);
  --ink: var(--text);      /* older name, still used by the card and layout styles */
  --heading: var(--bright-blue);
  --link: var(--bright-blue);
  --focus: var(--bright-blue);
  --bg: var(--white);
  --panel: var(--cream);
  --line: var(--light-blue);
  --rule: #c7c7c7;          /* Figma home page: thin grey rules under headings and menu rows */
  --muted: #555;           /* not in Figma yet */

  /* findings, gaps and the Q3 map: not in Figma yet */
  --dir-up: #1b6e3a;       /* green: increase */
  --dir-down: #c0262d;     /* red: decrease */
  --dir-mixed: #1a5fb4;    /* blue: mixed */
  --accent: #a3402f;       /* 6.4:1 on white: words picked out in headings (not --dir-down: red = decrease) */
  --dir-none: #5f5f5f;     /* grey: no effect / unclear */
  --gap: #767676;
  --d-thin: #e8f0ff;      /* 1 study: pale */
  --d-some: #8fbcff;      /* 2-3 studies: dark-blue number on it, 7:1 */
  --d-dense: #2347e6;     /* 4 or more: white number on it, 6.7:1 */
  --d-top: #0e1650;       /* 8 or more (our step inside dense): white number on it, 15:1 */
  --d-num: #1b2475;
  --box-condition: #f3f0e8;   /* graph: condition boxes */
  --box-outcome: #eaf2ea;     /* graph: outcome boxes */
  --box-combination: #f6f6f4; /* graph: combination box */
  --row-detail: #fafafa;      /* table detail rows */
  --divider: #eee;            /* thin list dividers */
  --target: #fffbe6;          /* section you jumped to */

  /* fonts */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;   /* display titles */
  --font-heading: "Newsreader", Georgia, "Times New Roman", serif;   /* page and question headings */
  --heading-weight: 300;                                             /* Newsreader Light */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-graph: "Arial Narrow", "Helvetica Neue", Arial, system-ui, sans-serif;  /* the Q1 graph */

  /* text sizes (Figma: 65, 40, 24, 18, 15.6 px) */
  --text-display: 4rem;      /* 64 px: page title */
  --text-heading: 2.5rem;    /* 40 px: section and question headings */
  --text-lg: 1.5rem;         /* 24 px */
  --text-base: 1.125rem;     /* 18 px: body text */
  --text-sm: 0.9375rem;      /* 15 px: menus, notes, table detail */

  /* spacing (measured from the frames) */
  --space-1: 0.5rem;   /*  8 px */
  --space-2: 1rem;     /* 16 px */
  --space-3: 1.5rem;   /* 24 px */
  --space-4: 2.5rem;   /* 40 px */
  --space-5: 5rem;     /* 80 px */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
main, footer.site { max-width: 72rem; margin: 0 auto; padding: 0 var(--space-2); }
main { padding-bottom: var(--space-4); }
main:focus { outline: none; }
p, li, dd, .lead, figcaption { max-width: 68ch; }
h1, h2 { font-family: var(--font-heading); font-weight: var(--heading-weight); color: var(--heading); }
h1 { font-size: clamp(2.25rem, 4vw + 1rem, var(--text-display)); line-height: 1.1; margin: var(--space-3) 0 var(--space-2); max-width: 20em; }
h2 { font-size: clamp(1.625rem, 2vw + 1rem, var(--text-heading)); line-height: 1.2; margin: var(--space-4) 0 var(--space-2); }
h3 { font-size: var(--text-lg); line-height: 1.3; margin: var(--space-3) 0 var(--space-1); }
h4 { font-size: var(--text-base); margin: var(--space-1) 0; }
a { color: var(--link); }
code { font-size: .95em; }
.muted, .note, small { color: var(--muted); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a.edge:focus-visible, a.gap-link:focus-visible { outline: 3px solid var(--focus); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 0; background: var(--bg); padding: var(--space-1) var(--space-2); z-index: 25; }
.skip:focus { left: var(--space-2); top: var(--space-1); }

/* one short line at the very bottom */
footer.site { max-width: 90rem; padding: .6rem var(--space-4); border-top: 1px solid var(--rule); color: var(--muted); font-size: .8125rem; }
footer.site p { margin: 0; max-width: none; }

.lead { font-size: var(--text-lg); line-height: 1.4; }
.short { font-size: var(--text-base); }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 0 var(--space-2); margin: var(--space-2) 0; }
.callout { border-left: 6px solid var(--link); background: var(--panel); padding: var(--space-1) var(--space-2); margin: var(--space-2) 0; }
details.limits { border: 1px solid var(--line); border-radius: 6px; padding: .5rem 1rem; margin: 1rem 0; }
details.limits > summary { cursor: pointer; }
details.limits[open] { background: var(--panel); }
details.limits .built { font-size: .95rem; }

/* badges */
.dir { font-weight: 600; white-space: nowrap; }
.dir-increase, .dir-above-reference { color: var(--dir-up); }
.dir-decrease, .dir-below-reference { color: var(--dir-down); }
.dir-mixed { color: var(--dir-mixed); }
.dir-no-effect, .dir-unclear, .dir-comparable { color: var(--dir-none); }
details.cert { display: inline-block; }
details.cert summary { cursor: pointer; }
details.cert p { font-size: var(--text-sm); margin: .25rem 0; }
.counts, .votes { white-space: normal; }
.lags { display: inline-block; border: 1px solid var(--dir-down); color: var(--dir-down); border-radius: 3px; padding: 0 .3rem; font-size: var(--text-sm); }
.badges { display: flex; flex-wrap: wrap; gap: .25rem var(--space-2); align-items: baseline; }

/* gaps: never red, never "failed" */
.gap { border: 2px dashed var(--gap); color: var(--text); border-radius: 4px; padding: var(--space-1) var(--space-2); margin: var(--space-1) 0; max-width: 68ch; }
.gap .searched { display: block; color: var(--muted); font-size: var(--text-sm); }

/* tables */
/* positioned so absolutely positioned .sr-only spans stay inside the scroll box (no page-wide sideways scroll) */
.table-wrap, .grid-wrap { position: relative; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; margin: var(--space-1) 0 var(--space-3); }
caption { text-align: left; font-weight: 600; padding: .25rem 0; }
th, td { border: 1px solid var(--line); padding: var(--space-1); vertical-align: top; text-align: left; }
thead th { background: var(--panel); }
tr.sub td { background: var(--row-detail); font-size: var(--text-sm); }
tr.sub p { margin: .25rem 0; }
ul.when { margin: 0; padding-left: var(--space-2); }

/* evidence */
details.ev > summary { cursor: pointer; }
details.ev { border-left: 3px solid var(--line); padding: .25rem var(--space-1); margin: var(--space-1) 0; }
blockquote.quote { margin: var(--space-1) 0; padding: .25rem var(--space-2); border-left: 3px solid var(--link); background: var(--panel); max-width: 68ch; }
.src { margin: .25rem 0; }
dl.camo { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: .1rem var(--space-2); font-size: var(--text-sm); margin: .25rem 0; }
dl.camo dt { font-weight: 600; }
dl.camo dd { margin: 0; }

/* Q3 gap map (shading is a second cue; the number and word carry the meaning) */
.grid-wrap { overflow: auto; max-height: 80vh; border: 1px solid var(--line); }
table.gapmap { margin: 0; font-size: var(--text-sm); }
table.gapmap th[scope="col"] { min-width: 6rem; font-weight: 600; }
table.gapmap th[scope="row"] { min-width: 12rem; }
table.gapmap td { text-align: center; white-space: nowrap; }
table.gapmap td.empty { color: var(--gap); }
.swatch.d-thin { background: var(--d-thin); }
.swatch.d-some { background: var(--d-some); }
.swatch.d-dense { background: var(--d-dense); }
dl.key { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
dl.key dt { font-weight: 600; }
dl.key dd { margin: 0; color: var(--muted); }
.swatch { display: inline-block; width: 1.2em; height: 1.2em; border: 1px solid var(--line); vertical-align: middle; text-align: center; line-height: 1.1em; }
.swatch.empty { color: var(--gap); }
ul.cells { list-style: none; padding: 0; }
ul.cells > li { border-bottom: 1px solid var(--divider); padding: .25rem 0; }
.density { color: var(--muted); }

/* Q1 graph: its text uses the graph font */
figure.graph svg text { font-family: var(--font-graph); }
figure.graph { margin: var(--space-2) 0; }
figure.graph svg { display: block; max-width: 1194px; height: auto; }
/* the graph page is wide (see .layout.wide): the drawing fills the width so its text is bigger */
.layout.wide figure.graph > svg { width: 100%; max-width: 1600px; }   /* the drawing only, not the key samples */
/* One meaning per channel. Colour = direction, thickness = number of studies (w-1..4),
   dash pattern = certainty (solid = high; no dotted lines). Legend samples use the same values. */
.lg { stroke: var(--text); fill: none; stroke-width: 2.5; }
.lg.high, svg .vis.c-high { stroke-dasharray: none; }
.lg.moderate, svg .vis.c-moderate { stroke-dasharray: 16 5; }
.lg.low, svg .vis.c-low { stroke-dasharray: 9 5; }
.lg.very_low, svg .vis.c-very_low { stroke-dasharray: 5 5; }
.lg.w-1, svg .w-1 .vis { stroke-width: 2; }
.lg.w-2, svg .w-2 .vis { stroke-width: 3.25; }
.lg.w-3, svg .w-3 .vis { stroke-width: 4.75; }
.lg.w-4, svg .w-4 .vis { stroke-width: 6.5; }
.lg.gapline { stroke: var(--gap); stroke-width: 1.5; stroke-dasharray: 6 6; }
.lg-ring { fill: var(--bg); stroke: var(--text); stroke-width: 2.5; }
.lg-sym { font-size: var(--text-lg); font-weight: 700; }
/* the graph's key, a small panel in the figure's bottom corner */
figure.graph { position: relative; }
.gkey { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); padding: var(--space-1) var(--space-2);
  margin-top: var(--space-1); max-width: 1194px; font-size: .875rem; line-height: 1.3;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .25rem var(--space-3); }
.gkey .gkey-g:last-child { grid-column: 1 / -1; }
.gkey .gkey-g:last-child ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 var(--space-3); }
.gkey h2 { grid-column: 1 / -1; font-size: 1rem; margin: 0; }
.gkey h3 { font-size: .875rem; margin: .25rem 0; color: var(--text); font-family: var(--font-body); }
.gkey ul { list-style: none; margin: 0; padding: 0; }
.gkey li { display: flex; align-items: flex-start; gap: .4rem; margin: .15rem 0; }
.gkey li svg { margin-top: .2rem; }
.gkey li svg { flex: none; }
.gkey .kb { flex: none; border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; font-weight: 700; white-space: nowrap; }
.t-up { color: var(--dir-up); } .t-down { color: var(--dir-down); } .t-mixed { color: var(--dir-mixed); } .t-none { color: var(--dir-none); }
/* hovering an arrow: a small tooltip with its full counts (the same words as its accessible name) */
.gtip { position: fixed; z-index: 30; max-width: 20rem; pointer-events: none; background: var(--text); color: var(--bg);
  border-radius: 4px; padding: .35rem .5rem; font-size: .8125rem; line-height: 1.35; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.gtip[hidden] { display: none; }
.gtip strong { display: block; }
/* full screen (graph.js): the figure covers the window, under the evidence panel (z 20) and tooltip */
.full-exit { display: none; }
figure.graph.full { position: fixed; inset: 0; z-index: 18;  /* above the page's divider line (16), below the panel (20) */ margin: 0; padding: var(--space-1) var(--space-2);
  background: var(--bg); overflow: auto; }
figure.graph.full .full-exit { display: inline-block; margin-bottom: var(--space-1); }
figure.graph.full svg { max-width: none; width: 100%; height: calc(100vh - 4.5rem); }
html.graph-full body { overflow: hidden; }
/* flow diagram / matrix switch (graph.js) */
.view-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin: var(--space-2) 0 var(--space-1); }
/* matrix view: colour repeats the symbol, never carries the meaning alone */
table.matrix { border-collapse: collapse; font-size: .875rem; }
table.matrix th, table.matrix td { border: 1px solid var(--line); padding: .25rem .4rem; }
table.matrix thead th { font-weight: 600; text-align: center; vertical-align: bottom; min-width: 5.5rem; }
table.matrix tbody th { text-align: left; font-weight: 600; max-width: 14rem; }
table.matrix tr.mx-group th { background: var(--panel); text-align: left; }
td.mx { text-align: center; min-width: 5.5rem; }
td.mx a { display: block; text-decoration: none; color: inherit; }
td.mx a:hover .mx-main, td.mx a:focus .mx-main { text-decoration: underline; }
.mx-main { display: block; font-weight: 700; font-size: 1rem; }
.mx-cert { display: block; font-size: .75rem; color: var(--text); }
td.mx.d-increase { background: #e6f2ea; color: var(--dir-up); }
td.mx.d-decrease { background: #fbe9ea; color: var(--dir-down); }
td.mx.d-mixed { background: #e7eff9; color: var(--dir-mixed); }
td.mx.d-no_effect, td.mx.d-unclear { background: #efefef; color: var(--dir-none); }
td.mx.gap { background: repeating-linear-gradient(135deg, var(--bg) 0 6px, #f2f2f2 6px 12px); outline: 1px dashed var(--gap);
  outline-offset: -4px; font-style: italic; }
td.mx.gap a { color: var(--gap); }
td.mx.self { color: var(--muted); }
.mx-note { font-size: .875rem; }

svg .node .shape { fill: var(--bg); stroke: var(--text); stroke-width: 1.5; }
svg .node.k-condition .shape { fill: var(--box-condition); }
svg .node.k-outcome .shape { fill: var(--box-outcome); stroke-width: 2.5; }
svg .node.k-combination .shape { fill: var(--box-combination); stroke-width: 2; }
svg .node text { font-size: 14px; fill: var(--text); }
svg .colhead { font-size: 13px; font-weight: 700; fill: var(--muted); }
svg .member { stroke: var(--muted); stroke-width: 1; fill: none; }
svg .hit { stroke: transparent; stroke-width: 14; fill: none; pointer-events: stroke; }
svg .vis { fill: none; }
svg .d-increase .vis { stroke: var(--dir-up); }
svg .d-decrease .vis { stroke: var(--dir-down); }
svg .d-mixed .vis { stroke: var(--dir-mixed); }
svg .d-no_effect .vis, svg .d-unclear .vis { stroke: var(--dir-none); }
svg .ring { fill: var(--bg); stroke-width: 3; }  /* moderation marker on the arrow it changes */
svg .d-increase .ring { stroke: var(--dir-up); }
svg .d-decrease .ring { stroke: var(--dir-down); }
svg .d-mixed .ring { stroke: var(--dir-mixed); }
svg .d-no_effect .ring, svg .d-unclear .ring { stroke: var(--dir-none); }
svg marker path { stroke: none; }
svg .ah-increase { fill: var(--dir-up); }
svg .ah-decrease { fill: var(--dir-down); }
svg .ah-mixed { fill: var(--dir-mixed); }
svg .ah-none { fill: var(--dir-none); }
svg .lbl rect { fill: var(--bg); stroke: var(--line); }
svg .lbl text { font-size: 15px; font-weight: 700; }
svg .lbl .sym { font-size: 17px; }
svg .lbl .n { font-size: 15px; }
svg .lbl .split { font-size: 14px; }
svg .d-increase .lbl text { fill: var(--dir-up); }
svg .d-decrease .lbl text { fill: var(--dir-down); }
svg .d-mixed .lbl text { fill: var(--dir-mixed); }
svg .d-no_effect .lbl text, svg .d-unclear .lbl text { fill: var(--dir-none); }
/* "not studied": a thin, light grey dashed line with no arrowhead, so it never reads as a result.
   Its tag stays at full contrast. */
svg .gap-link .vis { stroke: var(--light-blue); stroke-dasharray: 6 6; stroke-width: 1.5; }
svg .gap-link .lbl rect { stroke-dasharray: 3 3; }
svg .gap-link .lbl text { fill: var(--gap); font-size: 12px; font-style: italic; font-weight: 400; }
svg .member { stroke-width: 1.5; }

/* graph.js: dragging, highlighting, side panel */
button { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--text); border-radius: 4px; padding: .3rem var(--space-2); cursor: pointer; }
button:hover { background: var(--panel); }
.graph-tools p { margin: var(--space-1) 0; }
.tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin: var(--space-1) 0; }
.seg { display: flex; flex-wrap: wrap; gap: .25rem; }
button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
button[aria-pressed="true"]::before { content: "✓ "; }  /* pressed is shown by a tick too, not by colour alone */
.tool-status { min-height: 1.5em; color: var(--muted); }
svg .node { cursor: grab; }
svg .node.dragging { cursor: grabbing; }
svg .node.dragging .shape { stroke-width: 3; }
svg .node.pinned .shape { stroke-width: 3.5; stroke: var(--focus); }
/* selecting treatments (#77): chosen boxes get a thick outline and a tick; what doesn't apply is
   greyed and faded (not by colour alone: faded, dashed outline, and it says why on hover/focus) */
svg .node[role="button"] { cursor: pointer; }
svg .node:focus:not(:focus-visible) { outline: none; }
svg .node:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
svg .node:focus-visible .shape { stroke: var(--focus); stroke-width: 3; }
svg .node.chosen .shape { stroke-width: 4; stroke: var(--focus); }
svg .node.sel-off { cursor: not-allowed; opacity: .4; }
svg .node.sel-off .shape { stroke-dasharray: 4 3; fill: var(--rule); stroke: var(--gap); }
svg.selecting a.sel-off, svg.selecting .member.sel-off { opacity: .1; cursor: not-allowed; }
.combo-part { border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .75rem; }
.combo-part h4 { margin: 0 0 .35rem; }
.ix { margin-top: .5rem; }
.ix-dir { margin: .25rem 0; font-size: .9rem; }
svg a.edge, svg a.gap-link { cursor: pointer; }
svg a.dragging { cursor: grabbing; }
.fig-state { display: block; margin-top: .25rem; font-weight: 600; color: var(--text); }

/* side panel: how the studies split (counts also written out in words below the bar) */
.votes-head { margin: var(--space-2) 0 .25rem; font-weight: 600; }
.votebar { display: flex; gap: 2px; max-width: 26rem; border-radius: 4px; overflow: hidden; }
.votebar span { flex-basis: 2.8em; padding: .2rem .35rem; color: var(--white); font-weight: 700; white-space: nowrap; text-align: center; }
.vote-increase { background: var(--dir-up); }
.vote-decrease { background: var(--dir-down); }
.vote-mixed { background: var(--dir-mixed); }
.vote-no_effect, .vote-unclear { background: var(--dir-none); }

/* legend keys */
.lg.sw { stroke-width: 5; }
.lg.sw.up { stroke: var(--dir-up); }
.lg.sw.down { stroke: var(--dir-down); }
.lg.sw.mixed { stroke: var(--dir-mixed); }
.lg.sw.none { stroke: var(--dir-none); }
.lg-box { stroke: var(--text); stroke-width: 1.5; fill: var(--bg); }
.lg-box.condition { fill: var(--box-condition); }
.lg-box.outcome { fill: var(--box-outcome); stroke-width: 2.5; }
.lg-box.combination { fill: var(--box-combination); stroke-width: 2; }
@media (min-width: 700px) { svg .node { touch-action: none; } }  /* on a phone a touch on a box still scrolls the page */
svg a.edge, svg a.gap-link { transition: opacity .12s; }
svg.hl a.edge:not(.on), svg.hl a.gap-link:not(.on), svg.hl .member:not(.on) { opacity: .15; }
/* faded boxes stay opaque, so arrows never show through them */
svg.hl .node:not(.on) .shape { stroke: var(--line); }
svg.hl .node:not(.on) text { fill: var(--muted); }
/* filter buttons: hidden arrows are gone (not focusable); an arrow kept only because a
   moderation arrow points at it is faded */
svg a.filtered { display: none; }
svg a.context { opacity: .3; }
svg a.sel .lbl rect { stroke: var(--text); stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { svg a.edge, svg a.gap-link { transition: none; } }

/* Evidence panel. From 700px wide it sits BESIDE the page, never over it: the page (and the
   full-screen graph) is pushed left by the panel's width, so the graph shrinks to fit and nothing
   is covered. On a phone there is no room beside it, so it covers the page (Close returns). */
:root { --drawer-w: 100%; }
@media (min-width: 700px) { :root { --drawer-w: min(28rem, 40vw); } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 20; width: var(--drawer-w); overflow-y: auto; box-sizing: border-box;
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: -6px 0 18px rgba(0, 0, 0, .18); padding: 0 var(--space-2) var(--space-4); }
.drawer[hidden] { display: none; }
.drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-2); background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--space-2) 0 var(--space-1); }
.drawer-head h2 { margin: 0; font-size: var(--text-lg); line-height: 1.25; }
.drawer-head h2:focus { outline: none; }
.drawer-head h2:focus-visible { outline: 3px solid var(--focus); }
.drawer-body h3 { font-size: var(--text-base); margin: var(--space-3) 0 .25rem; }
.drawer-body .badges { margin-top: var(--space-2); }
.drawer-body details.cert { display: block; }
.drawer-sources { margin-top: var(--space-2); }
@media (min-width: 700px) {
  html.drawer-open body { padding-right: var(--drawer-w); }
  html.drawer-open figure.graph.full { right: var(--drawer-w); }
}

.edge-panel { border-top: 1px solid var(--line); padding-top: .25rem; }
.edge-panel:target { background: var(--target); }
a.srclink { white-space: nowrap; }
.sources details.ev { margin: var(--space-2) 0; }

/* finding cards (#49). Closed: one line. Open: panels (why / sources / pathways). */
:root {
  --c-high: #1b7a3a; --c-moderate: #5c8a1f; --c-low: #b25f00; --c-very-low: #b3261e;  /* green = more certain */
  --s-up: #1b7a3a; --s-down: #c2410c; --s-mixed: #6b46c1; --s-none: #a67c00;         /* studies: up, down, mixed, no effect */
}
.cards { display: flex; flex-direction: column; gap: .5rem; margin: .5rem 0 1.5rem; }
.fcard { border: 1px solid var(--line); border-left: 6px solid var(--dir-none); border-radius: 6px; background: var(--bg); min-width: 0; }
.fcard.fdir-increase, .fcard.fdir-above-reference { border-left-color: var(--s-up); }
.fcard.fdir-decrease, .fcard.fdir-below-reference { border-left-color: var(--s-down); }
.fcard.fdir-mixed { border-left-color: var(--s-mixed); }
.fcard.fdir-no-effect, .fcard.fdir-comparable { border-left-color: var(--s-none); }
.fcard:target { box-shadow: 0 0 0 3px var(--focus); }
.fcard p, .fcard li { max-width: none; }

/* the closed line */
details.fd > summary { list-style: none; cursor: pointer; display: grid; align-items: center; gap: .35rem 1rem;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto; grid-template-areas: "chip name more" ". meta meta"; padding: .6rem .9rem; }
.fchip { grid-area: chip; white-space: nowrap; }
/* Q2 compares with natural marshes: its chips ("▼ Below reference") are longer, so a wider column */
.fcard.fref details.fd > summary { grid-template-columns: 11.5rem minmax(0, 1fr) auto; } .fcard .fhead { grid-area: name; } .fmore { grid-area: more; } .fmeta { grid-area: meta; }
.fmeta { display: flex; flex-wrap: wrap; gap: .25rem 2rem; color: var(--ink); }
.sp { white-space: nowrap; }
details.fd > summary::-webkit-details-marker { display: none; }
details.fd > summary:hover { background: var(--panel); }
.chip { display: inline-block; border: 1px solid currentColor; border-radius: 999px; padding: 0 .5rem; font-size: .9rem; white-space: nowrap; }
.chip.gapchip { border-style: dashed; color: var(--muted); }
.reason { white-space: normal; color: var(--ink); }
.fcard .fhead { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.fcard .fhead .arrow { color: var(--muted); font-weight: 400; }
.fcert, .fsplit { font-size: .9rem; }
.fmore { color: var(--link); font-size: .9rem; text-align: right; }
.fmore::after { content: " ▾"; }
details.fd[open] .fmore::after { content: " ▴"; }
details.fd[open] > summary { border-bottom: 1px solid var(--line); }
@media (max-width: 40rem) {
  details.fd > summary, .fcard.fref details.fd > summary { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "chip more" "name name" "meta meta"; }
}

/* open: panels side by side, stacked on phones */
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; padding: .75rem .9rem; }
.panel { background: var(--panel); border-radius: 4px; padding: .5rem .75rem; min-width: 0; }
.panel h5 { font-size: .95rem; margin: .25rem 0 .5rem; }
ul.checks { list-style: none; padding: 0; margin: 0 0 .5rem; }
ul.checks li { display: flex; gap: .5rem; margin: .2rem 0; align-items: baseline; }
ul.checks .t { flex: 1; }
ul.checks .pts { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
ul.checks li.total { border-top: 1px solid var(--line); padding-top: .25rem; font-weight: 600; }
ul.checks .cap { font-weight: 400; font-size: .85rem; color: var(--muted); }
.mk { font-weight: 700; min-width: 1rem; }
details.raw { margin-top: .25rem; }
details.raw > summary { cursor: pointer; font-size: .8rem; color: var(--muted); }
.panel .rule { font-size: .8rem; color: var(--muted); margin: .25rem 0; }
.panel .go { margin: .5rem 0 .25rem; }
.panel .split { margin: 0 0 .5rem; font-size: .95rem; }
figure.cq { margin: .5rem 0; }
figure.cq blockquote.quote { margin: 0; font-size: .95rem; background: var(--bg); }
figure.cq figcaption { font-size: .85rem; color: var(--muted); margin-top: .2rem; }
.panel .warn { font-size: .9rem; margin: 0 0 .5rem; }
ol.chain { list-style: none; padding: 0; margin: 0 0 .75rem; }
ol.chain .node { border: 1px solid var(--ink); border-radius: 4px; background: var(--bg); padding: .2rem .5rem; font-weight: 600; display: inline-block; }
ol.chain .step { padding: .2rem 0 .2rem 1rem; font-size: .9rem; }
ol.chain .down { color: var(--muted); margin-right: .25rem; }
.fcard .when-wrap, .fcard .density, .fcard .flinks { padding: 0 .9rem; margin: .25rem 0 .75rem; font-size: .95rem; }
.mlabel { font-weight: 600; margin-right: .5rem; }
.when-wrap ul.when { display: inline; padding: 0; }
.when-wrap ul.when li { display: inline; }
.when-wrap ul.when li + li::before { content: " · "; }

/* certainty: 4 bars from one element, the first N filled; colour follows the grade */
.bars { --c: var(--ink); display: inline-block; width: 4.4rem; height: .75rem; border-radius: 2px; vertical-align: middle;
  background: repeating-linear-gradient(90deg, transparent 0 .95rem, var(--bg) .95rem 1.1rem),
              linear-gradient(90deg, var(--c) 0 var(--fill), transparent var(--fill));
  box-shadow: inset 0 0 0 1px var(--c); }
.bars.b1 { --fill: .95rem; --c: var(--c-very-low); }
.bars.b2 { --fill: 2.05rem; --c: var(--c-low); }
.bars.b3 { --fill: 3.15rem; --c: var(--c-moderate); }
.bars.b4 { --fill: 4.4rem; --c: var(--c-high); }

/* studies: one segment per direction, and a matching dot before each number */
.agree { display: inline-flex; width: 4.5rem; height: .75rem; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; vertical-align: middle; }
.agree i { display: block; min-width: 4px; border-right: 2px solid var(--bg); }
.agree i:last-child { border-right: 0; }
.dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .3em; }
.s-increase, .s-above-reference { background: var(--s-up); }
.s-decrease, .s-below-reference { background: var(--s-down); }
.s-mixed { background: var(--s-mixed); }
.s-no-effect, .s-comparable { background: var(--s-none); }
.s-unclear { background: var(--dir-none); }
ul.cells > li > .fcard { margin: .5rem 0; }

/* Q1 at a glance */
table.glance { font-size: .9rem; }
table.glance td a { display: block; text-decoration: none; color: var(--ink); white-space: nowrap; }
table.glance td a:hover .dir, table.glance td a:focus .dir { text-decoration: underline; }
table.glance td.gapcell { border: 2px dashed var(--gap); }
table.glance td.gapcell a { color: var(--muted); }
table.glance td.none { color: var(--muted); text-align: center; }

/* gap card: grey, dashed, "?", no bars */
.gap .gq { display: inline-block; width: 1.4em; height: 1.4em; line-height: 1.3em; text-align: center; border: 1px dashed var(--gap); border-radius: 50%; color: var(--gap); font-weight: 700; }

/* sources pages: grouped by paper, first 3 shown */
section.paper h2 { font-size: 1.05rem; margin: 1.5rem 0 .25rem; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--link); margin: 1rem 0; }

/* "?" help button and the grading popup */
.panel { position: relative; }
.panel h5 { padding-right: 2rem; }
button.help { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--link); background: var(--bg);
  color: var(--link); font-weight: 700; cursor: pointer; line-height: 1; padding: 0; font-size: .9rem; }
.panel button.help { position: absolute; top: .4rem; right: .4rem; }
h2 button.help { vertical-align: middle; margin-left: .25rem; }
button.help:hover { background: var(--link); color: var(--bg); }
.pop { max-width: min(36rem, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.2); color: var(--ink); background: var(--bg); }
.pop::backdrop { background: rgba(0,0,0,.25); }
.pop h2 { margin-top: 0; font-size: 1.2rem; }
.pop .ex { background: var(--panel); padding: .4rem .6rem; border-radius: 4px; }
.none-pw { font-size: .95rem; color: var(--muted); margin: .25rem 0; }

/* ---------------------------------------------------------------------------
   Site structure (temporary look; Track A is designing the real one: #27, #50)
   Home: top nav + big headline. Every other page: left sidebar + content.
   --------------------------------------------------------------------------- */
:root { --navy: #1f2a5c; }  /* --cream comes from the design tokens above */

/* sidebar layout */
.layout { display: grid; grid-template-columns: var(--col) minmax(0, 1fr); gap: var(--space-4); margin: 0; padding: 0 var(--edge); }
.layout > main, .layout > .content { max-width: 62rem; margin: 0; padding: 0 0 3rem; }
.side { position: sticky; top: var(--top-h); align-self: start; max-height: calc(100vh - var(--top-h)); overflow-y: auto; padding: var(--space-3) 0; }
/* the left menu, on every page (home's section menu and the other pages' sidebar look the same) */
ol.qnav, ul.qnav { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
ul.qnav.more { margin-top: var(--space-3); }
.qnav > li { max-width: none; border-bottom: 1px solid var(--rule); }
.qnav > li > a { display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: center;
  padding: .45rem .25rem; color: var(--dark-navy); text-decoration: none; text-transform: uppercase;
  font-size: var(--text-sm); letter-spacing: .02em; }
.qnav > li > a:hover { color: var(--bright-blue); }
.qnav > li > a[aria-current="page"] { font-weight: 700; color: var(--bright-blue); }
.qnav .n { color: var(--bright-blue); font-size: var(--text-lg); line-height: 1; font-variant-numeric: tabular-nums; }
ul.jumps { list-style: none; margin: 0 0 .5rem 4.25rem; padding: 0; font-size: var(--text-sm); }
ul.jumps a { display: block; padding: .15rem 0; color: var(--muted); text-decoration: none; }
ul.jumps a:hover { color: var(--link); text-decoration: underline; }
.layout > main h1, .layout > .content h1 { margin-top: 1.5rem; }

/* short answer: the cream box */
p.short { background: var(--cream); border-radius: 6px; padding: .75rem 1rem; max-width: none; }

/* home */
h1.mega { font-size: clamp(3rem, 13vw, 9rem); line-height: .95; font-weight: 600; letter-spacing: -.05em;
  text-transform: lowercase; margin: 2.5rem 0 1rem; max-width: none; }
ol.qrows { list-style: none; padding: 0; margin: 2rem 0; border-top: 1px solid var(--ink); }
li.qrow { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
li.qrow .n { font-size: 2rem; font-weight: 600; color: var(--link); line-height: 1; }
li.qrow h2 { margin: 0 0 .25rem; font-size: 1.4rem; }
li.qrow h2 a { color: var(--ink); text-decoration: none; }
li.qrow h2 a:hover { color: var(--link); text-decoration: underline; }
li.qrow .q { color: var(--muted); margin: 0 0 .5rem; }
.key-strip { border-top: 1px solid var(--ink); padding-top: .5rem; margin: 2rem 0; }
.key-strip h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.key-strip ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.key-strip li { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.qmark { font-size: 1.4rem; font-weight: 700; color: var(--link); }


/* phones: the sidebar becomes a compact menu across the top */
/* Graph page: the left menu runs across the top (same look, in a row) so the graph gets the full width */
.layout.wide { display: block; }
.layout.wide::before { display: none; }
.layout.wide > main { max-width: none; }
.layout.wide .side { position: static; max-height: none; overflow: visible; padding: var(--space-2) 0 0; }
.layout.wide .side nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-3);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.layout.wide ol.qnav, .layout.wide ul.qnav { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); border: 0; margin: 0; }
.layout.wide .qnav > li { border: 0; }
.layout.wide .qnav > li > a { display: flex; align-items: baseline; gap: .5rem; padding: .45rem 0; }
.layout.wide .qnav .n { font-size: var(--text-base); }
.layout.wide ul.jumps { display: none; }

@media (max-width: 52rem) {
  .layout { display: block; }
  .side { position: static; max-height: none; padding: var(--space-2) 0 0; }
  ol.qnav, ul.qnav { display: flex; flex-wrap: wrap; gap: 0 1rem; border: 0; }
  ul.qnav.more { margin-top: 0; }
  .qnav > li { border: 0; }
  .qnav > li > a { display: flex; gap: .4rem; padding: .3rem 0; }
  .qnav .n { font-size: var(--text-sm); }
  ul.jumps { display: none; }
  li.qrow { grid-template-columns: 2.5rem minmax(0, 1fr); }
  li.qrow .n { font-size: 1.4rem; }
}

/* short answer box (div: may hold a bullet list) */
div.short { background: var(--cream); border-radius: 6px; padding: .6rem 1rem; margin: .75rem 0 1rem; }
div.short p { margin: .25rem 0; max-width: none; }
div.short .sa-h { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
ul.sa { margin: .25rem 0; padding-left: 1.2rem; }
ul.sa li { margin: .3rem 0; max-width: none; }
.glance-sec { margin-bottom: 1.5rem; }

/* sections that open like dropdowns */
details.sec { border-top: 1px solid var(--line); }
details.sec:last-of-type { border-bottom: 1px solid var(--line); }
details.sec > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: .75rem; padding: .6rem 0; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::before { content: "▸"; color: var(--link); }
details.sec[open] > summary::before { content: "▾"; }
details.sec > summary > h2, details.sec > summary > h3 { margin: 0; display: inline; }
details.sec > summary:hover h2, details.sec > summary:hover h3 { color: var(--link); }
.cnt { color: var(--muted); font-size: .9rem; }
.sec-body { padding: 0 0 1rem; }
details.limits .cnt { margin-left: .5rem; }
details.limits .intro { font-size: .95rem; color: var(--muted); }
details.limits .lim-h { font-size: 1rem; margin: 1rem 0 .25rem; }
details.limits ul.lims { list-style: none; padding: 0; margin: 0; }
details.limits ul.lims li { padding: .5rem 0; border-top: 1px solid var(--rule); }
details.limits .lim-t { display: block; }
details.limits .lim-x { display: block; font-size: .9rem; color: var(--muted); margin-top: .15rem; }

/* home guide */
.guide { border-top: 1px solid var(--ink); margin: 2rem 0; }
.guide ol { padding-left: 1.4rem; }
.guide li { margin: .4rem 0; }
h2.rows-h { margin-bottom: 0; }

/* shared question page (one template for Q1, Q2, Q3) */
.kicker { margin: 1.5rem 0 -.75rem; font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--link); }
div.short.callout { border-left: 6px solid var(--link); background: var(--cream); }
.to-method { margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.graph-link { margin: 1rem 0; }

/* not studied: the same compact list everywhere */
/* Not studied: a "See not-studied pairings" button that opens a filterable list (Figma frame) */
/* intro above it (Figma): Newsreader, a few words picked out in dark blue. Not red or orange:
   those mean "decrease" / "behind", and a gap is never a negative result. */
.ns-sec { max-width: 48rem; margin: var(--space-4) 0; }
.ns-h { font-size: 2rem; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; color: var(--link); margin: 0 0 .75rem; }
.ns-intro { font-family: var(--font-heading); font-weight: 300; font-size: 1.2rem; line-height: 1.35; color: var(--text); max-width: none; margin: 0 0 var(--space-3); }
.ns-intro em { font-style: normal; color: var(--dark-blue); }
details.ns { margin: var(--space-3) 0 0; }
details.ns > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem;
  background: var(--bg); border-radius: 12px; padding: 1rem 1.25rem; box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
  border: 1.5px solid var(--link); }
details.ns > summary::-webkit-details-marker { display: none; }
details.ns > summary::after { content: "⌄" / ""; color: var(--link); margin-left: .25rem; font-size: 1.4rem; line-height: 1; }
details.ns[open] > summary::after { content: "⌃" / ""; }
details.ns > summary h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--link); }
details.ns > summary:hover h3 { text-decoration: underline; }
details.ns .v-hide, details.ns[open] .v-see { display: none; }
details.ns[open] .v-hide { display: inline; }
.ns-q { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; flex: none; border-radius: 50%;
  border: 1.5px dashed var(--dir-none); color: var(--dir-none); font-size: .9rem; font-weight: 700; }
.ns-c { margin-left: auto; background: var(--divider); color: var(--text); border-radius: 999px; padding: .05rem .55rem; font-size: .8rem; }
details.ns > summary .ns-c { margin-left: auto; font-size: .9rem; padding: .1rem .7rem; }
.ns-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: var(--space-2) var(--space-4); margin: var(--space-3) 0; }
.ns-pick { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.ns-lab { font-size: .8rem; }
.ns-box { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; min-height: 2.6rem; padding: .4rem .6rem;
  border: 1.5px solid transparent; border-radius: 10px; background: var(--bg); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); cursor: pointer; }
.ns-pick.on .ns-box { border-color: var(--link); }
.ns-chips { display: contents; }
.ns-chip { font: inherit; font-size: .75rem; display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .55rem;
  border: 1px solid var(--link); border-radius: 999px; background: var(--bg); color: var(--link); cursor: pointer; }
.ns-chip:hover { background: var(--divider); }
.ns-open { font: inherit; font-size: .875rem; flex: 1 1 8rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .15rem 0; border: 0; background: none; color: var(--muted); text-align: left; cursor: pointer; }
.ns-open::after { content: "⌄" / ""; color: var(--link); font-size: 1rem; line-height: 1; }
.ns-open[aria-expanded="true"]::after { content: "⌃" / ""; }
.ns-panel { grid-column: 1 / -1; columns: 3 11rem; column-gap: var(--space-3); padding: var(--space-2);
  background: var(--bg); border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.ns-panel[hidden] { display: none; }
.ns-panel button { font: inherit; font-size: .8125rem; line-height: 1.3; display: block; width: 100%; break-inside: avoid;
  margin: 0 0 .25rem; padding: .55rem .6rem; border: 0; border-radius: 6px; background: none; color: var(--link); text-align: left; cursor: pointer; }
.ns-panel button[hidden] { display: none; }
.ns-panel button:hover, .ns-panel button:focus-visible { background: var(--link); color: #fff; }
.ns-p { background: var(--bg); border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); padding: var(--space-3) var(--space-4); margin-top: var(--space-3); }
.ns-t { margin: 0; font-size: 1.05rem; }
.ns-p p { max-width: none; }
.ns-sub { margin: .2rem 0 .75rem; font-size: .8rem; padding-bottom: .75rem; border-bottom: 1px solid var(--rule); }
details.ns ul.gaps { list-style: none; padding: 0; margin: .5rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); gap: .9rem var(--space-4); }
details.ns li.gap { display: grid; grid-template-columns: 1rem 1fr 1.2fr; gap: .25rem .5rem; align-items: start;
  border: 0; padding: 0; margin: 0; max-width: none; font-size: .8125rem; line-height: 1.35; }
details.ns li.gap::before, .ns-dot { content: "" / ""; width: .55rem; height: .55rem; margin-top: .3em; border: 1.5px dashed var(--dir-none); border-radius: 50%; }
details.ns li.gap .o { color: var(--text); }
details.ns li.gap .o::before { content: "→ " / "on "; color: var(--muted); }
details.ns li.gap .searched { grid-column: 2 / -1; font-size: .75rem; color: var(--muted); }
details.ns li.gap[hidden] { display: none; }
/* one topic for every gap (Q2): a plain bulleted list of outcomes, each with what it covers */
details.ns ul.gaps.one { gap: .6rem var(--space-4); }
details.ns ul.gaps.one li.gap { grid-template-columns: 1rem 1fr; gap: .15rem .5rem; }
details.ns ul.gaps.one li.gap .on { font-weight: 600; }
details.ns ul.gaps.one li.gap .info { grid-column: 2; font-size: .75rem; color: var(--muted); }
.ns-key { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: .75rem; color: var(--muted); }
.ns-dot { display: inline-block; flex: none; margin-top: 0 !important; }
p.searched { font-size: .8rem; color: var(--muted); margin: .25rem 0; }
.ns-more { font: inherit; font-size: .8125rem; color: var(--link); background: none; border: 0; padding: .25rem 0; cursor: pointer; }
.ns-more:hover { text-decoration: underline; }
.ns-none { font-size: .8125rem; color: var(--muted); }
.ns-foot { margin: .75rem 0 0; padding-top: .75rem; border-top: 1px solid var(--rule); font-size: .75rem; color: var(--muted); }

/* Q3 gap map: row and column names stay visible while scrolling */
.grid-wrap thead th, .grid-wrap thead td { position: sticky; top: 0; z-index: 2; background: var(--panel); }
.grid-wrap tbody th { position: sticky; left: 0; z-index: 1; background: var(--bg); }
.grid-wrap thead td:first-child { left: 0; z-index: 3; }

/* ------------------------------------------------------------------ home page (Figma "home page" frame)
   WHIMSY logo and a boxed menu across the top; a numbered menu of the page's sections on the
   left that stays in view; each section a big blue heading over a thin rule, text indented. */
/* Top bar on every page: a thin line across the whole screen with the boxed menu hanging from
   it (no top border on the boxes: the line is their top edge), and the logo, which goes home.
   It stays at the top while scrolling; --top-h is its height, so the sidebars sit below it. */
:root { --top-h: 6rem; --top-line: .75rem; --edge: 1.5rem; }   /* --edge: gap to the screen's left and right edges */
html { scroll-padding-top: calc(var(--top-h) + var(--space-2)); }   /* in-page links land below the bar */
.site-top { position: sticky; top: 0; z-index: 15; height: var(--top-h); box-sizing: border-box;
  padding-top: calc(var(--top-line) + 1px);
  background: linear-gradient(var(--rule), var(--rule)) 0 var(--top-line) / 100% 1px no-repeat, var(--bg); }
/* the menu box hangs a little below the grey top rule, open at the top (Figma) */
.site-top nav { margin-top: .6rem; }
.site-top-in { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2);
  padding: 0 var(--edge); }
/* the WHIMSY logo is an image (static/logo.svg, from Figma) that links home */
.site-top .logo { display: block; margin-top: var(--space-2); line-height: 0; }
.site-top .logo img { display: block; width: clamp(10rem, 16vw, 13rem); height: auto; }
.site-top .logo:hover img { opacity: .75; }
.boxnav { list-style: none; margin: 0; padding: 0; display: flex; border: 1px solid var(--text); border-top: 0; }
.boxnav li { max-width: none; border-left: 1px solid var(--text); }
.boxnav li:first-child { border-left: 0; }
.boxnav a { position: relative; isolation: isolate; display: block; min-width: 3.25rem; padding: .3rem .95rem;
  font-size: .8125rem; text-align: center; text-transform: uppercase; letter-spacing: .02em; color: var(--text);
  text-decoration: none; transition: color .6s ease-in-out; }
/* hover / focus: a blue fill rises from the bottom and the text turns white (like mecha-xyz) */
.boxnav a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--link);
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.boxnav a:hover, .boxnav a:focus-visible { color: #fff; }
.boxnav a:hover::before, .boxnav a:focus-visible::before { transform: scaleY(1); }
.boxnav a[aria-current="page"], .boxnav a.here { font-weight: 700; }
.boxnav a[aria-current="page"]::after, .boxnav a.here::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: .2rem;
  height: 2px; background: var(--link); transition: background-color .6s ease-in-out; }
.boxnav a:hover::after, .boxnav a:focus-visible::after { background: #fff; }   /* stays visible on the blue fill */
@media (prefers-reduced-motion: reduce) { .boxnav a, .boxnav a::before { transition: none; } }

/* Left column on every page: --col wide, then a thin vertical line (fixed to the screen, from the
   top line down) in the middle of the --gap before the content. --col-x is where the column starts,
   lined up with the logo; 100% here is the screen width without the scrollbar. */
.layout, .home-grid { --col-x: var(--edge); --gap: var(--space-4); }
.layout, .home-grid { --col: clamp(16rem, 22vw, 19rem); }   /* same width on every page */
.layout::before, .home-grid::before { content: ''; position: fixed; z-index: 16; top: var(--top-line); bottom: 0;
  left: calc(var(--col-x) + var(--col) + var(--gap) / 2); border-left: 1px solid var(--rule); pointer-events: none; }

.home-grid { display: grid; grid-template-columns: var(--col) minmax(0, 1fr); gap: var(--gap);
  margin: 0; padding: 0 var(--edge); }
.home-grid main { margin: 0; padding: var(--space-5) 0 var(--space-4); }
.home-grid main > .hsec { max-width: 56rem; }   /* the Problem opening may run to the right edge */
/* pinned to the screen (fixed, not sticky) so it stays put even at the very bottom of the page;
   the grid's first column stays empty to keep its place */
.home-side { position: fixed; top: var(--top-h); bottom: 0; left: var(--col-x); width: var(--col);
  box-sizing: border-box; display: flex; flex-direction: column; padding: var(--space-2) 0 var(--space-3); }
.home-grid main { grid-column: 2; }
/* home: the footer sits in the right column, clear of the menu, with its line only above the text */
.home-grid + footer.site { border-top: 0; max-width: calc(56rem + var(--edge) + clamp(16rem, 22vw, 19rem) + var(--space-4));
  margin: 0; padding: 0 var(--edge) 0 calc(var(--edge) + clamp(16rem, 22vw, 19rem) + var(--space-4)); box-sizing: border-box; }
.home-grid + footer.site p { border-top: 1px solid var(--rule); padding: .6rem 0; }
/* the turning tree (static/tree.js) fills the space above the menu; the menu stays at the bottom
   of the column while the tree turns */
.home-tree { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
/* the section being read: dark, with a line under it that fills as you read through it;
   the others go grey (only once the script is running and a section is in view) */
.home-menu.has-on .qnav > li > a, .home-menu.has-on .qnav .n { color: var(--muted); transition: color .2s; }
.home-menu.has-on .qnav > li.on > a { color: var(--dark-navy); }
.home-menu.has-on .qnav > li.on .n { color: var(--bright-blue); }
.home-menu .qnav > li { position: relative; }
.home-menu .qnav > li.on::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px;
  width: calc(var(--p, 0) * 100%); background: var(--dark-navy); }
.home-menu .qnav > li > a:hover { color: var(--bright-blue); }
@media (prefers-reduced-motion: reduce) { .home-menu .qnav a, .home-menu .qnav .n { transition: none; } }
.home-tree .tree-scene { position: absolute; left: 50%; top: 50%; width: 386px; height: 526px; transform-origin: center; }
.home-tree .tree-layer { position: absolute; inset: 0; transform-origin: 193px 300px; will-change: transform; }
.home-tree .tree-layer svg { display: block; }
.home-menu { flex: none; margin-top: var(--space-2); }   /* styled by .qnav, like the sidebar */

.hsec { margin: 0 0 var(--space-5); }
.hsec > h1, .hsec > h2 { margin: 0; padding-bottom: var(--space-1); border-bottom: 1px solid var(--rule);
  font-family: var(--font-heading); font-weight: var(--heading-weight); color: var(--heading); max-width: none; }
.hsec > h1, .hsec.mission > h2 { font-size: clamp(2.5rem, 5vw, var(--text-display)); line-height: 1.1; letter-spacing: 0; }
.hsec > h2 { font-size: clamp(1.75rem, 3vw, var(--text-heading)); line-height: 1.2; text-transform: none; letter-spacing: 0; }
.hsec > h2 a { color: inherit; text-decoration: none; }
.hsec > h2 a:hover { text-decoration: underline; }
.hsec-body { padding: var(--space-3) 0 0 var(--space-4); }
.hsec-body > :first-child { margin-top: 0; }
.hsec .lead { font-size: var(--text-base); }
.hsec.guide, .hsec.key-strip { border-top: 0; padding-top: 0; }
.hsec.qsec .q { color: var(--text); }

@media (max-width: 900px) {
  :root { --top-h: 4.25rem; --top-line: .5rem; }
  .site-top-in, .layout { padding: 0 var(--space-2); }
  .site-top .logo { margin-top: .6rem; }
  .site-top .logo img { width: 7.5rem; }
  .boxnav a { min-width: 0; padding: .3rem .6rem; font-size: .8125rem; }
  .site-top .logo img { width: min(7.5rem, 28vw); }
}
@media (max-width: 420px) {
  .boxnav a { padding: .3rem .4rem; font-size: .75rem; letter-spacing: 0; }
  .home-grid { display: block; padding: 0 var(--space-2); }
  .home-side { position: static; width: auto; height: auto; padding: 0; }
  footer.site { padding: .6rem var(--space-2); }
  .home-grid + footer.site { padding: 0 var(--space-2); }
  .layout::before, .home-grid::before { display: none; }
  .home-tree { display: none; }
  .home-menu { margin-top: var(--space-3); }
  .home-grid main { padding-top: var(--space-4); }
  .hsec { margin-bottom: var(--space-4); }
  .hsec-body { padding-left: 0; }
}

/* Q2 "Outcome by outcome" (Figma frame "current graph"): result, certainty blocks, marsh ages
   studied (not a recovery curve) and "Matched natural marshes yet?". A grid of rows; below
   44rem of width each row stacks. The outcome name is a button that opens the finding's card. */
.mc-key, .mc-how, .mc-wrap, .mc-tview, .mc-take, .mc-tipbox { --mc-behind: #c2410c; --mc-ahead: #1b7a3a; --mc-mixed: #6b4fa1; --mc-unclear: #666;
  --mc-nochg: #8a6a00; --mc-grid: #d9dce3; --mc-match: #ecf4ee; --mc-ink: 46, 61, 102; --mc-empty: #edeef1; }
.mc-behind { --c: var(--mc-behind); } .mc-ahead { --c: var(--mc-ahead); } .mc-mixed { --c: var(--mc-mixed); }
.mc-unclear { --c: var(--mc-unclear); } .mc-nochg { --c: var(--mc-nochg); }
.mc-key { font-size: .8125rem; color: var(--muted); margin: 3rem 0 0; }
.mc-key p { margin: 0 0 1.1rem; max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; }
.mc-kh { font-weight: 600; }
.mc-sw { display: inline-flex; align-items: center; gap: .5rem; }
.mc-sw i { width: 22px; height: 14px; border-radius: 3px; background: var(--c); opacity: .9; }
.mc-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; height: 18px; }
.mc-meter i { background: var(--mc-empty); }
.mc-meter i:first-child { border-radius: 4px 0 0 4px; } .mc-meter i:last-child { border-radius: 0 4px 4px 0; }
.mc-meter.m1 i:nth-child(-n+1) { background: rgba(var(--mc-ink), .51); }
.mc-meter.m2 i:nth-child(-n+2) { background: rgba(var(--mc-ink), .68); }
.mc-meter.m3 i:nth-child(-n+3) { background: rgba(var(--mc-ink), .84); }
.mc-meter.m4 i { background: rgb(var(--mc-ink)); }
.mc-kmeter { display: inline-grid; width: 132px; height: 14px; }
.mc-kmeter i:nth-child(1) { background: rgba(var(--mc-ink), .51); } .mc-kmeter i:nth-child(2) { background: rgba(var(--mc-ink), .68); }
.mc-kmeter i:nth-child(3) { background: rgba(var(--mc-ink), .84); }
/* "How to read this" (Figma "How to read this (dropdown)"): a grey button; open, a white card
   listing each result colour and what it means, per chart group. Chevrons are the Figma icons. */
details.mc-how { width: fit-content; max-width: 100%; margin: .5rem 0 1.25rem; font-size: .8125rem; }
details.mc-how > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 12px; background: #f6f7f9; border: 1px solid var(--mc-grid); border-radius: 6px; font-weight: 600; color: var(--text); }
details.mc-how > summary::-webkit-details-marker { display: none; }
details.mc-how > summary::after { content: ""; width: 16px; height: 16px; flex: none;
  background: url("icons/chevron-down.svg") center / 16px 16px no-repeat; }
details.mc-how[open] { width: 660px; padding: 12px 16px; background: var(--bg); border: 1px solid var(--mc-grid);
  border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, .12); }
details.mc-how[open] > summary { padding: 0; background: none; border: 0; }
details.mc-how[open] > summary::after { background-image: url("icons/chevron-up.svg"); }
.mc-hg { margin-top: 12px; }
.mc-hg + .mc-hg { border-top: 1px solid var(--mc-grid); padding-top: 12px; }
.mc-hgt { margin: 0 0 8px; font-size: .75rem; font-weight: 600; color: var(--muted); max-width: none; }
details.mc-how dl { display: grid; gap: 8px; margin: 0; }
.mc-def { display: grid; grid-template-columns: 116px 1fr; column-gap: 10px; align-items: center; }
.mc-def dt, .mc-def .mc-dt { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--c, var(--text)); }
.mc-def dt > i:not(.mc-samp), .mc-def .mc-dt > i:not(.mc-samp) { flex: none; width: 22px; height: 14px; border-radius: 3px; background: var(--c); opacity: .9; }
.mc-def dd, .mc-def .mc-dd { margin: 0; color: var(--text); }
.mc-smeter { flex: none; width: 44px; height: 10px; gap: 2px; }
.mc-def.mc-plain dt, .mc-def.mc-plain .mc-dt { color: var(--text); }
.mc-def .mc-samp { flex: none; width: 22px; height: 14px; border-radius: 3px; background: var(--c, #737373); opacity: .9; }
.mc-def .mc-samp-pt { width: 7px; }
.mc-def .mc-samp-tick { width: 3px; height: 18px; margin: 0 9.5px; border-radius: 1.5px; background: #3d3d3d; opacity: 1; }
.mc-def .mc-samp-none { background: none; border: 1.5px dashed var(--c, #737373); opacity: 1; }
/* toolbar: "How to read this" on the left, the Chart | Table switch on the right */
.mc-tools { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem; margin: 0 0 2.5rem; }
.mc-tools details.mc-how { margin: 0; }
.mc-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--light-blue); border-radius: 999px; background: #f5f7fb; }
.mc-switch[hidden], .mc-view[hidden] { display: none; }
.mc-switch button { font: inherit; font-size: .8125rem; font-weight: 600; padding: .4rem 1.1rem; border: 0; border-radius: 999px;
  background: none; color: var(--dark-blue); cursor: pointer; }
.mc-switch button:hover { background: #e3e8f1; }
.mc-switch button[aria-pressed="true"] { background: var(--dark-blue); color: var(--white); }
/* table view (brand colours): dark-blue header, a pale-blue group row, ages as pills */
.mc-tview { overflow-x: auto; border: 1px solid var(--light-blue); border-radius: 14px; }
table.mc-table { width: 100%; min-width: 40rem; margin: 0; border-collapse: collapse; font-size: .875rem; }
table.mc-table th, table.mc-table td { padding: .7rem .9rem; border: 0; border-bottom: 1px solid #e3e8f1; background: none;
  text-align: left; vertical-align: middle; }
table.mc-table thead th { background: var(--dark-blue); color: var(--white); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
table.mc-table tr.mc-tgroup th { padding: .55rem .9rem; background: #f5f7fb; color: var(--muted); font-size: .8125rem; font-weight: 600; }
table.mc-table tbody:last-child tr:last-child > * { border-bottom: 0; }
table.mc-table tr.mc-trow { cursor: pointer; }
table.mc-table tr.mc-trow:hover > * { background: rgba(2, 79, 236, .035); }
table.mc-table .mc-name::after { content: none; }   /* the chart's whole-row layer; mc.js handles table rows */
.mc-tres { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--c); white-space: nowrap; }
.mc-tres i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.mc-tcert { display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap; }
td.mc-tnum { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--dark-blue); }
.mc-age { display: inline-block; margin: .15rem .3rem .15rem 0; padding: .1rem .55rem; border-radius: 999px; background: #e3e8f1;
  color: var(--dark-blue); font-size: .8rem; white-space: nowrap; }
.mc-nr { color: var(--muted); font-size: .8125rem; font-style: italic; }
/* hover help (static/mc.js): one floating box, filled from the hidden .mc-tt of what is hovered */
.mc-tip { cursor: help; }
.mc-dir.mc-tip, .mc-cbox { position: relative; }   /* above the row's click layer, so hover reaches them */
.mc-dir.mc-tip { display: block; width: fit-content; }   /* own line under the name; hover only on the word */
.mc-cbox { display: block; }
.mc-tipbox { position: fixed; z-index: 50; display: grid; gap: 6px; width: max-content;
  max-width: min(26rem, calc(100vw - 16px)); padding: 10px 12px; background: var(--bg); border: 1px solid var(--mc-grid);
  border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, .14); font-size: .8125rem; line-height: 1.35; pointer-events: auto; }
.mc-tipbox[hidden] { display: none; }
.mc-tnote { display: block; font-size: .75rem; color: var(--muted); }
/* heading (Figma "current graph"): small label, the question in plain words, the answer to "how long?" */
.mc-top { margin-top: var(--space-4); }
/* wide screens: the chart section runs the page width less 56px each side (Figma frame margins),
   centred on the page column; narrower screens keep the column */
@media (min-width: 64rem) {
  .mc-section { --mc-w: min(83.5rem, calc(100vw - 7rem)); width: var(--mc-w); margin-left: calc((100% - var(--mc-w)) / 2); }
}
.mc-eyebrow { margin: 0 0 .5rem; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.mc-top h2 { margin: 0; }
.mc-sub { margin: .8rem 0 0; max-width: none; font-size: 1.0625rem; font-weight: 600; color: var(--link); }
.mc-wrap { container-type: inline-size; margin: 0; }
.mc-row { position: relative; display: grid; grid-template-columns: minmax(0, 300fr) minmax(0, 229fr) minmax(0, 500fr) minmax(0, 170fr);
  column-gap: 2.5rem; }
.mc-row > div { min-width: 0; line-height: 1.3; }   /* Figma: normal line height in the chart */
.mc-row:not(.mc-head):not(.mc-group) { border-bottom: 1px solid var(--mc-grid); }
.mc-row:not(.mc-head):not(.mc-group):hover { background: rgba(2, 79, 236, .035); }
.mc-out, .mc-cert { padding: .8rem 0 .6rem; }
.mc-name { font: inherit; font-size: .9375rem; font-weight: 600; color: var(--text); background: none; border: 0; padding: 0;
  margin: 0; text-align: left; cursor: pointer; line-height: 1.3; }
.mc-name::after { content: ""; position: absolute; inset: 0; }   /* the whole row opens the card */
.mc-name:hover { text-decoration: underline; text-underline-offset: 3px; background: none; }
.mc-name:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.mc-dir { display: block; margin-top: .3rem; font-size: .75rem; font-weight: 600; color: var(--c); }
.mc-meta { display: block; margin-top: .35rem; font-size: .75rem; color: var(--muted); }
.mc-ages { position: relative; min-height: 2.5rem;
  background: repeating-linear-gradient(to right, var(--mc-grid) 0 1px, transparent 1px calc(100% / 6));
  border-right: 1px solid var(--mc-grid); }
.mc-track { position: absolute; left: 0; right: 0; top: 50%; height: 22px; transform: translateY(-50%); }
.mc-bar, .mc-pt, .mc-tick { position: absolute; top: 0; height: 100%; background: var(--c); border-radius: 4px; }
.mc-bar { opacity: .9; }
.mc-pt { width: 7px; margin-left: -3.5px; opacity: .9; }
.mc-tick { width: 3px; margin-left: -1.5px; top: -5px; height: 32px; border-radius: 1.5px; filter: brightness(.65); }
.mc-none { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 26px; display: flex;
  align-items: center; justify-content: center; border: 1.5px dashed var(--c); border-radius: 6px; background: var(--bg);
  font-size: .8125rem; font-style: italic; color: var(--c); }
.mc-ax, .mc-mlab { display: none; }
.mc-match { padding: .8rem .9rem .6rem; background: var(--mc-match); }
.mc-nom .mc-match { background: none; }
.mc-row:not(.mc-head):not(.mc-group):not(.mc-nom):hover .mc-match { background: #dbeadf; }
/* answer words a shade darker than the bars, so they keep 4.5:1 on the hover green too */
.mc-behind .mc-match strong { color: #a3360a; } .mc-ahead .mc-match strong { color: #166a32; }
.mc-match strong { display: block; font-size: .9375rem; color: var(--c); }
.mc-msub { display: block; margin-top: .2rem; font-size: .75rem; color: var(--muted); }
.mc-head { font-size: .8125rem; font-weight: 600; color: var(--muted); align-items: end; }
.mc-head > div { padding: 0 0 .5rem; }
.mc-head .mc-ages { background: none; border: 0; min-height: 0; }
.mc-head .mc-match { color: var(--mc-ahead); font-size: .875rem; border-radius: 10px 10px 0 0; padding: .8rem .9rem .5rem; }
.mc-ch { display: block; color: var(--text); font-size: .875rem; margin-bottom: .6rem; }
.mc-clabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; font-size: .6875rem; font-weight: 400; text-align: center;
  white-space: nowrap; }
.mc-ticks { position: relative; display: block; height: 1.1em; font-weight: 400; font-size: .75rem; }
.mc-ticks span, .mc-ax span { position: absolute; transform: translateX(-50%); }
.mc-group h3 { margin: 0; white-space: nowrap; font-family: var(--font-body); font-size: .8125rem; font-weight: 600; color: var(--muted); }
.mc-group .mc-out { padding: 1.25rem 0 .6rem; }
.mc-last .mc-match { border-radius: 0 0 10px 10px; }
.mc-take { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--mc-grid); font-size: .8125rem; color: var(--muted); }
.mc-take p { margin: .35rem 0; max-width: none; }
.mc-take p.mc-take-h { font-size: 1.125rem; font-weight: 600; color: var(--text); margin-bottom: .6rem; }
@container (max-width: 44rem) {
  .mc-row { display: block; padding: .9rem 0; }
  .mc-head { display: none; }
  .mc-group { padding: 1rem 0 0; }
  .mc-group h3 { white-space: normal; }   /* one line only where the grid gives it room (wide fonts, #83 review) */
  .mc-group > div:not(.mc-out) { display: none; }
  .mc-out, .mc-cert, .mc-group .mc-out { padding: 0; }
  .mc-cert { margin-top: .6rem; max-width: 18rem; }
  .mc-ages { margin-top: .7rem; min-height: 0; height: 2.6rem; background: none; border: 0; }
  .mc-track { top: 0; transform: none; height: 16px;
    background: repeating-linear-gradient(to right, var(--mc-grid) 0 1px, transparent 1px calc(100% / 6)); border-right: 1px solid var(--mc-grid); }
  .mc-tick { top: -3px; height: 22px; }
  .mc-ax { display: block; position: absolute; left: 0; right: 0; top: 20px; height: 1em; font-size: .6875rem; color: var(--muted); }
  .mc-none { position: relative; top: 0; transform: none; }
  .mc-row:has(.mc-none) .mc-ages { height: auto; }
  .mc-match { background: none; padding: 0; margin-top: .35rem; font-size: .8125rem; }
  .mc-match:empty { display: none; }
  .mc-mlab { display: inline; color: var(--muted); }
  .mc-match strong, .mc-msub { display: inline; }
  .mc-msub::before { content: " · "; }
}
/* the finding card, in a popup */
.pop.fpop { max-width: min(56rem, calc(100vw - 32px)); max-height: 85vh; overflow: auto; padding: 2.5rem 1rem 1rem; }
.pop.fpop .fcard { margin: 0; }
.pop-x { position: absolute; top: .5rem; right: .5rem; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.pop-x:hover { background: var(--panel); }
/* labels used only in the one-finding popup below */
.flab, .fnote { display: none; }
/* the "why" panel says what it is for (every card) */
.why-sub { margin: 0 0 .6rem; font-size: .85rem; color: var(--muted); max-width: none; }

/* Q2 one-finding popup (.cardpop): brand colours (Figma "components": dark blue, cream, light
   blue, mid blue, bright blue). Name large; certainty and the study split as two labelled
   boxes; the "how it is worked out" and sources panels below. */
/* panel blue: the Figma light blue (#b8c3d7) mixed with white, so text and links on it keep
   AA contrast (bright-blue links 5:1; plain light blue would give 3.7:1) */
.cardpop, .hgpop { --pop-blue: #e3e8f1; }
.pop.cardpop { max-width: min(60rem, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(40, 49, 110, .3); }
.pop.cardpop::backdrop { background: rgba(40, 49, 110, .35); }
.cardpop .pop-x { top: 1rem; right: 1rem; z-index: 2; border-color: var(--light-blue); color: var(--dark-blue); }
.cardpop .pop-x:hover { background: var(--dark-blue); color: var(--white); }
.cardpop .fcard { border: 0; border-top: 6px solid var(--dir-none); border-radius: 16px; }
.cardpop .fcard.fdir-below-reference { border-top-color: var(--s-down); }
.cardpop .fcard.fdir-above-reference { border-top-color: var(--s-up); }
.cardpop .fcard.fdir-mixed { border-top-color: var(--s-mixed); }
.cardpop .fcard.fdir-no-effect, .cardpop .fcard.fdir-comparable { border-top-color: var(--s-none); }
.cardpop details.fd > summary, .cardpop .fcard.fref details.fd > summary { display: block; cursor: default;
  padding: 1.4rem 1.5rem 1.25rem; border-bottom: 1px solid var(--light-blue); }
.cardpop details.fd > summary:hover { background: none; }
.cardpop .fmore { display: none; }
.cardpop .fchip .chip { font-size: .85rem; font-weight: 600; padding: .1rem .65rem; }
.cardpop .fcard .fhead { margin: .6rem 0 1.1rem; padding-right: 3rem; font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 600; line-height: 1.2;
  color: var(--dark-blue); }
.cardpop .fmeta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; }
.cardpop .fcert, .cardpop .fsplit { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem;
  padding: .75rem .9rem; border: 1px solid var(--light-blue); border-radius: 12px; background: #f5f7fb; font-size: .9rem; }
.cardpop .flab { display: block; flex-basis: 100%; font-size: .7rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--dark-blue); }
.cardpop .fnote { display: block; flex-basis: 100%; font-size: .78rem; color: var(--muted); }
.cardpop .agree { width: 8rem; height: .9rem; border-color: var(--dark-blue); }
.cardpop .panels { padding: 1.25rem 1.5rem 1rem; gap: 1.25rem; }
.cardpop .panel { background: var(--pop-blue); border-radius: 12px; padding: 1rem 1.1rem; }
.cardpop .panel h5 { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--dark-blue); }
.cardpop .panel button.help { top: .8rem; right: .8rem; border-color: var(--dark-blue); color: var(--dark-blue); }
.cardpop .panel button.help:hover { background: var(--dark-blue); color: var(--white); }
.cardpop ul.checks { font-size: .95rem; }
.cardpop ul.checks li { align-items: center; margin: .4rem 0; padding: .55rem .7rem; border-radius: 8px; background: var(--white); }
.cardpop ul.checks .mk { color: var(--dark-blue); font-weight: 700; }
.cardpop ul.checks .pts { padding: .1rem .55rem; border-radius: 999px; background: var(--light-blue); color: var(--dark-blue); }
.cardpop ul.checks .pts:empty { display: none; }
.cardpop ul.checks li.total { border-top: 0; padding: .65rem .7rem; background: var(--dark-blue); color: var(--white); }
.cardpop ul.checks li.total .mk { color: var(--white); }
.cardpop ul.checks li.total .pts { background: rgba(255, 255, 255, .2); color: var(--white); }
.cardpop ul.checks li.total .cap { color: #dfe4ef; }
.cardpop .fcard .when-wrap { margin: 0 1.5rem 1.4rem; padding: .7rem .9rem; border: 1px solid var(--light-blue); border-radius: 12px; }

/* "How grading works" (the "?" in the panel): a dark-blue header, the four levels as bars,
   numbered steps, the example on pale blue */
.pop.hgpop { max-width: min(34rem, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(40, 49, 110, .3); }
.pop.hgpop::backdrop { background: rgba(40, 49, 110, .35); }
.hg-head { position: relative; padding: 1.1rem 3.5rem 1rem 1.4rem; background: var(--dark-blue); color: var(--white); }
.hg-kick { margin: 0; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--light-blue); }
.pop.hgpop .hg-head h2 { margin: .15rem 0 0; font-size: 1.6rem; color: var(--white); }
.hg-x { position: absolute; top: 1rem; right: 1rem; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--mid-blue);
  background: transparent; color: var(--white); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.hg-x:hover { background: var(--white); color: var(--dark-blue); }
.hg-x:focus-visible, .hg-close:focus-visible { outline: 3px solid var(--light-blue); outline-offset: 2px; }
.hg-body { padding: 1.1rem 1.4rem 1.2rem; }
.hg-body p { max-width: none; }
.hg-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .5rem; list-style: none; padding: 0; margin: .5rem 0 1rem; }
.hg-levels li { display: flex; flex-direction: column; gap: .35rem; padding: .55rem .65rem; border: 1px solid var(--light-blue);
  border-radius: 10px; font-size: .85rem; }
ol.hg-steps { counter-reset: hg; list-style: none; padding: 0; margin: 0 0 1rem; }
ol.hg-steps li { counter-increment: hg; position: relative; margin: .55rem 0; padding-left: 2.2rem; font-size: .92rem; }
ol.hg-steps li::before { content: counter(hg); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--dark-blue); color: var(--white); font-size: .8rem; font-weight: 700; }
.pop.hgpop .ex { padding: .6rem .8rem; border-radius: 10px; background: var(--pop-blue); }
.hg-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0 0; }
.hg-close { font: inherit; padding: .4rem 1.1rem; border: 0; border-radius: 999px; background: var(--dark-blue); color: var(--white); cursor: pointer; }
.hg-close:hover { background: var(--bright-blue); }

/* Q3 gap map: cells are buttons showing just the study count; the shade says how many
   (pale = 1, light = 2-3, dark = 4+). Certainty is in the popup. */
table.gapmap { font-size: .95rem; }
table.gapmap th[scope="col"] { min-width: 7.5rem; padding: .6rem .5rem; }
table.gapmap th[scope="row"] { min-width: 14rem; padding: .7rem .75rem; }
table.gapmap td { padding: 0; }
table.gapmap td.empty { padding: .7rem .5rem; }
table.gapmap td.d-thin { background: var(--d-thin); }
table.gapmap td.d-some { background: var(--d-some); }
table.gapmap td.d-dense { background: var(--d-dense); }
table.gapmap td button { display: block; width: 100%; min-height: 3rem; padding: .5rem; border: 0; background: transparent;
  font: inherit; font-size: 1.25rem; font-weight: 700; color: var(--d-num); cursor: pointer; text-align: center; }
table.gapmap td.d-dense button { color: var(--white); }
table.gapmap td button:hover { outline: 2px solid var(--link); outline-offset: -2px; }
table.gapmap td button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
table.gapmap td.d-dense button:hover, table.gapmap td.d-dense button:focus-visible { outline-color: var(--white); }
.rowpop.only ul.cells > li:not(.on) { display: none; }
.rowpop.only .cnt { display: none; }
.rowpop:not(.only) .show-all { display: none; }
.show-all { margin-top: .75rem; border: 1px solid var(--link); color: var(--link); background: var(--bg); border-radius: 999px;
  padding: .3rem .9rem; font: inherit; cursor: pointer; }
.show-all:hover { background: var(--link); color: var(--bg); }
.fs-row { margin: .5rem 0; }
.fs-btn { border: 1px solid var(--link); color: var(--link); background: var(--bg); border-radius: 999px;
  padding: .3rem .9rem; font: inherit; cursor: pointer; }
.fs-btn:hover { background: var(--link); color: var(--bg); }
/* full screen: the map fills the screen and its columns tighten so most of it fits */
.grid-wrap:fullscreen { max-height: none; background: var(--bg); padding: 1rem; overflow: auto; }
.grid-wrap:fullscreen table.gapmap { font-size: .85rem; }
.grid-wrap:fullscreen table.gapmap th[scope="col"] { min-width: 0; padding: .4rem .3rem; }
.grid-wrap:fullscreen table.gapmap th[scope="row"] { min-width: 11rem; }
.grid-wrap:fullscreen table.gapmap td button { min-height: 2.4rem; padding: .4rem .2rem; font-size: 1.05rem; }
.rowpop .pop-h { font-size: 1.2rem; font-weight: 700; margin: 0 0 .25rem; }
.rowpop ul.cells { list-style: none; padding: 0; margin: .5rem 0 0; }
.rowpop ul.cells > li { margin: .4rem 0; }
.rowpop ul.cells > li:target .fcard { box-shadow: 0 0 0 3px var(--focus); }
ol.densest { margin-bottom: .2rem; }
details.more-densest > summary { cursor: pointer; color: var(--link); margin: 0 0 .5rem; }

/* Question page hero (Figma): kicker, the question with one phrase in the accent colour, dotted
   blue shapes, a picture (beside the text for Q1, a landscape band for Q2 and Q3) and a blue bar
   of counts. Pictures and shapes are decorative (alt="", aria-hidden). */
main.has-hero { max-width: none; margin: 0; padding: 0; }
.has-hero > .content.solo { max-width: 62rem; margin: 0 auto; padding: 0 var(--edge) 3rem; }
.hero { position: relative; overflow: hidden; isolation: isolate; padding: var(--space-4) var(--edge) 0; }
.hero-in { position: relative; z-index: 1; max-width: 90rem; margin: 0 auto; }
.hero-side .hero-in { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-4); align-items: end; }
.hero-txt { padding: clamp(1rem, 5vw, 5rem) clamp(0rem, 3vw, 3rem) var(--space-4); }
.hero .kicker { margin: 0 0 1rem; font-size: clamp(1rem, 1.6vw, 1.5rem); font-weight: 400; letter-spacing: .14em; }
.hero h1 { margin: 0; max-width: 24ch; font-family: var(--font-body); font-weight: 400; color: var(--text);
  font-size: clamp(1.6rem, min(3.6vw, 6svh), 3.4rem); line-height: 1.1; letter-spacing: -.01em; }
.hero-band h1 { max-width: 30ch; }
.hero .hl { color: var(--accent); }
.hero-lead { margin: min(4svh, 3rem) 0 0 clamp(0rem, 4vw, 4rem); max-width: 46rem; font-size: 1rem; }
.hero-pic img { display: block; width: 100%; height: auto; }
.hero-side .hero-pic { margin-right: calc(-1 * var(--edge)); align-self: end; }
/* Q1: the hero is exactly the screen under the header, so the blue bar starts at the fold */
.hero-side { height: max(30rem, calc(100svh - var(--top-h))); box-sizing: border-box; display: flex; flex-direction: column; }
.hero-side .hero-in { flex: 1 1 auto; min-height: 0; align-items: stretch; width: 100%; }
.hero-side .hero-txt { display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(0rem, 3vw, 3rem) min(4svh, 2rem); }
.hero-side .hero-pic { display: flex; align-items: flex-end; justify-content: flex-end; min-height: 0; }
.hero-side .hero-pic img { max-height: calc(100svh - var(--top-h) - 1rem); width: auto; max-width: 100%; }
.hero-band .hero-pic { margin: 0 calc(-1 * var(--edge)); }
.hero-band .hero-pic img { height: clamp(14rem, 32vw, 26rem); object-fit: cover; object-position: center 72%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%); mask-image: linear-gradient(to bottom, transparent, #000 25%); }
.hero-band .hero-txt { padding-bottom: var(--space-2); }
.hero.no-pic .hero-txt { padding-bottom: var(--space-5); }
/* dotted shapes: a dot pattern clipped to soft blobs */
.blob { position: absolute; z-index: 0; pointer-events: none; opacity: .75;
  background-image: radial-gradient(circle, var(--link) 1.1px, transparent 1.4px); background-size: 7px 7px;
  border-radius: 58% 42% 63% 37% / 46% 55% 45% 54%; }
.blob.b1 { top: -12%; left: 36%; width: 34rem; height: 26rem; transform: rotate(-12deg); }
.blob.b2 { top: 34%; left: -6%; width: 26rem; height: 24rem; opacity: .55; }
.blob.b3 { bottom: 12%; right: -8%; width: 30rem; height: 16rem; transform: rotate(8deg); opacity: .5; }
.hero-side .blob.b3 { bottom: 30%; right: 4%; }
/* the blue bar of counts */
.hero-stats { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-around; gap: var(--space-2) var(--space-4);
  padding: clamp(1rem, 2.5vw, 2rem) var(--edge); background: var(--link); color: #f2ead9; }   /* cream as in Figma: 5.4:1 */
.hero-stats > div { display: flex; align-items: center; gap: .9rem; }
.hero-stats dt { font-size: clamp(.8rem, 1.2vw, 1.1rem); letter-spacing: .08em; text-transform: uppercase; max-width: 22ch; line-height: 1.1; }
.hero-stats dd { margin: 0; font-family: var(--font-heading); font-weight: 300; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; }
@media (max-width: 760px) {
  .hero-side { height: auto; }
  .hero-side .hero-in { grid-template-columns: 1fr; }
  .hero-side .hero-pic { display: none; }   /* phones: the question first, no tall picture */
  .hero-txt { padding: var(--space-3) 0; }
  .hero-lead { margin: var(--space-3) 0 0; }
  .blob.b1 { left: 30%; width: 20rem; height: 16rem; }
  .blob.b2 { width: 14rem; height: 14rem; }
  .hero-stats { justify-content: flex-start; }
  .hero-stats > div { flex: 1 1 40%; }
}

/* Q3 (Figma "Desktop - 5"): the photo fills the hero, sky included, under the Figma's own dotted
   clouds (static/hero-q3-clouds.svg); the header sits over the sky until the photo scrolls away. */
.hero-full, .hero-sky { margin-top: calc(-1 * var(--top-h)); padding-top: var(--top-h);
  height: max(30rem, min(65.14vw, 100svh)); box-sizing: border-box; }   /* one screen: the blue bar starts at the fold */
.hero-full { background: #2f57b4; }   /* the photo's own top-of-sky blue, as Figma's Rectangle 16 */   /* the photo's own top-of-sky blue, as Figma's Rectangle 16 */
.hero-bg { position: absolute; inset: 7.7vw 0 0; z-index: -1; }   /* Figma: photo starts 111px down a 1440 frame */
.hero-full .hero-in, .hero-sky .hero-in { max-width: none; margin: 0; }   /* text on the left, as in the frames */
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center top;
  -webkit-mask-image: linear-gradient(transparent, #000 8%); mask-image: linear-gradient(transparent, #000 8%); }
.hero-clouds { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-full .hero-txt { padding-top: clamp(1rem, min(6vw, 8svh), 5.5rem); }
.hero-full .kicker { color: #fff; }
.hero-full h1 { max-width: min(64rem, 100%); }
/* Q2: its question is four lines long, so it starts higher to stay on the plain sky, clear of the
   photo and most of the dotted clouds */
.hero-q2.hero-sky .hero-txt { padding-top: clamp(1.5rem, 3vw, 3rem); }
@media (max-width: 760px) {   /* phones: the question on plain sky, the photo below it */
  .hero-full { display: flex; flex-direction: column; min-height: 0; height: auto; }
  .hero-full .hero-bg { position: relative; inset: auto; order: 2; margin: 0 calc(-1 * var(--edge)); height: 15rem; }
  .hero-full .hero-bg img { object-position: center 35%; }
  .hero-full h1 { color: #fff; }
  .hero-full .hl { color: #ffd4c2; }   /* light accent: 9:1 on the sky blue */
  .hero-full .hero-txt { padding-bottom: var(--space-3); }
}
.site-top { transition: background-color .3s; }
.site-top.over { background: linear-gradient(var(--rule), var(--rule)) 0 var(--top-line) / 100% 1px no-repeat, transparent; }
.site-top.over.light { background: linear-gradient(rgba(255, 255, 255, .7), rgba(255, 255, 255, .7)) 0 var(--top-line) / 100% 1px no-repeat, transparent; }
.site-top.over.light .logo img { filter: brightness(0) invert(1) sepia(.35) brightness(.97); }   /* cream, as in Figma */
.site-top.over.light .boxnav, .site-top.over.light .boxnav li { border-color: #fff; }
.site-top.over.light .boxnav a { color: #fff; }
.site-top.over.light .boxnav a[aria-current="page"]::after { background: #fff; }
.site-top.over.light a:focus-visible { outline-color: #fff; }

/* Q2 (Figma "Desktop - 4"): white sky fading to pale blue (Rectangle 15: y 321 to 606 of the 938px
   hero), the marsh photo from y 573 (cropped as in the frame), and the frame's dotted clouds over both. */
.hero-sky { background: linear-gradient(#fff 34.2%, #d7eef4 64.6%); }
.hero-sky .hero-bg { inset: auto 0 -6.4vw; height: 31.7vw; z-index: -1; }   /* marsh along the bottom, as in the frame */
.hero-sky .hero-clouds { object-fit: cover; object-position: center bottom; }
.hero-full .hero-clouds { object-fit: cover; object-position: center top; }
.hero-sky .hero-bg img { object-position: center top; -webkit-mask-image: none; mask-image: none; }
.hero-sky .hero-clouds { z-index: 0; }
.hero-sky .hero-txt { padding-top: clamp(1rem, min(16vw, 20svh), 15rem); }
.hero-sky h1 { max-width: 34ch; }
@media (max-width: 760px) {
  .hero-sky { display: flex; flex-direction: column; min-height: 0; height: auto; }
  .hero-sky .hero-bg { position: relative; inset: auto; order: 2; margin: 0 calc(-1 * var(--edge)); height: 13rem; }
  .hero-sky .hero-txt { padding-bottom: var(--space-3); }
}

/* Home "Problem" opening (Figma home page frame). With static/problem.js running (.anim): first
   only the sentence; as you scroll, the flowers drift in one by one; once all are in, "spread
   across: hundreds of papers" (below the flowers); then the paper band slice by slice. Normal
   scrolling throughout. Without the script, or with reduced motion, it is all shown at once. */
.problem { position: relative; margin: 0 calc(-1 * var(--edge)) var(--space-5) 0; }
.pb-pin { position: relative; display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); column-gap: var(--space-3);
  align-content: start; padding: var(--space-2) var(--edge) var(--space-4) 0; }
.pb-kicker { grid-column: 1; margin: 0 0 .4rem; font-family: var(--font-heading); font-weight: 300; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .02em; color: var(--link); }
.problem h1 { grid-column: 1; margin: 0; font-family: var(--font-heading); font-weight: 300; color: #111;
  font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.05; max-width: 22ch; }
.problem h1 .hl { color: var(--link); }
.pb-flowers { grid-column: 2; grid-row: 1 / span 3; position: relative; align-self: start; justify-self: end;
  width: min(100%, 26rem); aspect-ratio: 600 / 767; margin-top: var(--space-2); }
.pb-flowers img { position: absolute; inset: 0; width: 100%; height: 100%; }
.pb-spread { grid-column: 1; grid-row: 4; margin: var(--space-3) 0 0; font-family: var(--font-heading); font-weight: 300;
  font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.2; max-width: 22ch; color: #111; }
.pb-many { grid-column: 1; grid-row: 5; margin: clamp(1.5rem, 4vh, 2.5rem) 0 .25rem; font-family: var(--font-heading); font-weight: 300;
  font-size: clamp(1.4rem, 2.2vw, 2rem); color: var(--accent); }
.pb-papers { grid-column: 1 / -1; grid-row: 6; position: relative; margin-right: calc(-1 * var(--edge)); aspect-ratio: 934 / 144;
  -webkit-mask-image: linear-gradient(to right, #000 93%, transparent); mask-image: linear-gradient(to right, #000 93%, transparent); }   /* soft right end: the frame cut the band there */
.pb-papers img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* hidden until problem.js reaches them; each comes in with a short drift */
.problem.anim .pb-flowers img { opacity: 0; transform: translate(-1.5rem, -2rem) rotate(-25deg) scale(.7);
  transition: opacity .7s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.problem.anim .pb-spread, .problem.anim .pb-many { opacity: 0; transform: translateY(1rem); transition: opacity .6s ease, transform .6s ease; }
.problem.anim .pb-papers img { opacity: 0; transform: translateY(-1.5rem); transition: opacity .35s ease, transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.problem.anim .on { opacity: 1 !important; transform: none !important; }
/* problem.js holds the opening still while the flowers come in (top and the extra room are set there) */
.problem.pinned .pb-pin { position: sticky; }
@media (max-width: 900px) {   /* phones: one column, flowers between the sentence and the papers; no pinning */
  .problem { margin-right: calc(-1 * var(--space-2)); }
  .pb-pin { grid-template-columns: minmax(0, 1fr); padding-right: var(--space-2); }
  .pb-flowers { grid-column: 1; grid-row: auto; justify-self: center; width: min(80%, 18rem); }
  .pb-spread, .pb-many, .pb-papers { grid-row: auto; }
  .pb-papers { margin-right: calc(-1 * var(--space-2)); }
  .pb-spread { margin-top: var(--space-3); }
}

/* Q1 "Overview & Constraints" (Figma, under the blue bar). Wide screens: laid out over the dotted
   wave as in the frame (positions are the frame's, as % of a 1440 x 900 box). static/ov.js draws
   the wave left to right as you scroll and shows each part as the wave reaches it (.anim, wide
   screens without reduced motion only). Narrow screens: the two blocks stack, no wave. */
.ov { position: relative; margin: var(--space-4) 0; }
.ov-wave-box, .ov-pin { display: none; }
.ov .ov-label { font-family: var(--font-heading); font-weight: 300; color: var(--link); text-transform: uppercase;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.1; margin: 0 0 .5rem; }
.ov div.short.callout, .ov div.short { background: none; border: 0; padding: 0; margin: 0; }
.ov .short .sa-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ov .short ul.sa { list-style: none; padding: 0; margin: 0; }
.ov .short ul.sa > li { margin: 0 0 1.6rem; max-width: none; }
.ov .short ul.sa > li > strong:first-child { display: block; margin-bottom: .5rem; font-weight: 400; color: var(--link);
  text-transform: uppercase; letter-spacing: .14em; font-size: 1.15em; text-align: center; }
.ov details.limits { border: 0; background: none; padding: 0; margin: 0; }
.ov details.limits > summary { list-style: none; cursor: pointer; text-align: center; margin-bottom: 1rem; }
.ov details.limits > summary::-webkit-details-marker { display: none; }
.ov details.limits > summary strong { display: block; font-weight: 400; color: var(--link); text-transform: uppercase;
  letter-spacing: .14em; font-size: 1.15em; line-height: 1.3; }
.ov details.limits > summary .cnt { display: block; font-size: .8em; color: var(--muted); }
.ov details.limits ul { padding-left: 1.1rem; margin: .75rem 0 0; }
.ov details.limits li { margin: 0 0 .35rem; max-width: none; }
.ov details.limits li::marker { color: var(--accent); }
.ov .lim-tag { color: var(--accent); font-weight: 700; }
.ov-right .ov-label, .ov-left .ov-label { text-align: center; }
@media (min-width: 900px) {
  /* The Figma frame's section (1440 x 900) across the full screen width, as tall as fits under the
     header. Across: 1vw per 1/100 of the frame. Down (and text, pins, dots): --u, the smaller of 1vw
     and what the screen's height allows. Every position is the frame's own (px of 1440). */
  main.has-hero > .content.solo > .ov-track { width: 100vw; margin: 0 0 var(--space-4) calc(50% - 50vw); overflow-x: clip; }
  .ov-track, .ov { --u: min(1vw, calc((100svh - var(--top-h) - 1rem) / 62.5)); }
  .ov { width: 100vw; height: calc(var(--u) * 62.5); overflow: visible; font-size: max(11px, calc(var(--u) * .92)); }
  .ov.anim { position: sticky; top: calc(var(--top-h) + .5rem); }   /* stays put while the wave draws */
  .ov .short ul.sa > li { line-height: 1.3; margin-bottom: 1.2em; text-align: justify; }   /* Figma */
  /* the wave runs past both screen edges (Figma Vector 35: x -30 to 1682); its shape is a mask,
     so the dots stay round whatever its height (8px apart, 2px radius, in frame px, by width) */
  .ov-wave-box { display: block; position: absolute; left: -2.08vw; width: 118.87vw;
    top: calc(var(--u) * 6.32); height: calc(var(--u) * 45.38); z-index: 0; }
  .ov-wave { position: absolute; inset: 0;
    background: radial-gradient(circle, #28316e .139vw, transparent calc(.139vw + .5px)) 0 0 / .5556vw .5556vw;
    -webkit-mask: url("ov-wave.svg") 0 0 / 100% 100% no-repeat; mask: url("ov-wave.svg") 0 0 / 100% 100% no-repeat; }
  .ov-pin { display: block; position: absolute; z-index: 1; width: calc(var(--u) * 5.83); height: auto; }
  /* pins centred where the frame has them: over the crest and under the low point */
  .ov-pin.pin-top { left: calc(64.2vw - var(--u) * 2.915); top: calc(var(--u) * 2.45); }
  .ov-pin.pin-bottom { left: calc(20.2vw - var(--u) * 2.915); top: calc(var(--u) * 49.4); transform: rotate(180deg); }
  .ov-left { position: absolute; left: 8.5vw; top: calc(var(--u) * 13); width: 24.7vw;
    min-height: calc(var(--u) * 26); z-index: 1; display: flex; flex-direction: column; }
  .ov-left .ov-label { order: 2; margin: auto 0 0; padding-top: .4em; font-size: 2.6em; }
  .ov-right { position: absolute; left: 49vw; top: calc(var(--u) * 19); width: 32.4vw; z-index: 1; }
  /* Q2: a longer overview, so its block starts higher and its label stays above the wave's dip */
  .ov-q2 .ov-left { top: calc(var(--u) * 4.5); }
  .ov-right .ov-label { font-size: 2.6em; margin-bottom: .6em; }
  .ov-right details.limits > summary { margin-bottom: .6em; }
  .ov-right details.limits > summary strong { max-width: 24ch; margin: 0 auto; }
  .ov-right details.limits .intro { margin: 0 0 .5em; }
  .ov-right details.limits li { line-height: 1.3; margin-bottom: .3em; }
  /* every text in the composition takes its size from it (the site's p/li/intro sizes would not scale) */
  .ov .short, .ov p, .ov li, .ov ul, .ov .intro, .ov summary, .ov .cnt, .ov details.limits, .ov details.limits * { font-size: inherit; }
  .ov details.limits > summary strong { font-size: 1.15em; }
  .ov details.limits > summary .cnt { font-size: .8em; }
  /* the wave is drawn left to right with a soft edge (--p from static/ov.js); the text and the pins
     fade and rise in when the wave reaches them */
  .ov.anim:not(.done) .ov-wave {
    -webkit-mask: url("ov-wave.svg") 0 0 / 100% 100% no-repeat,
      linear-gradient(90deg, #000 calc(var(--p, 0) * 104% - 4%), transparent calc(var(--p, 0) * 104%));
    -webkit-mask-composite: source-in;
    mask: url("ov-wave.svg") 0 0 / 100% 100% no-repeat intersect,
      linear-gradient(90deg, #000 calc(var(--p, 0) * 104% - 4%), transparent calc(var(--p, 0) * 104%)); }
  .ov.anim .ov-left, .ov.anim .ov-right { opacity: 0; transform: translateY(1.5rem) scale(.97);
    transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1); }
  .ov.anim .ov-pin { opacity: 0; transform: translateY(-1.5rem) scale(.6);
    transition: opacity .5s ease, transform .9s cubic-bezier(.3, 1.6, .5, 1); }
  .ov.anim .ov-pin.pin-bottom { transform: rotate(180deg) translateY(-1.5rem) scale(.6); }
  .ov.anim .on, .ov.anim.done .ov-left, .ov.anim.done .ov-right, .ov.anim.done .ov-pin { opacity: 1; transform: none; }
  .ov.anim .ov-pin.pin-bottom.on, .ov.anim.done .ov-pin.pin-bottom { transform: rotate(180deg); }
}

/* Q3 gap map (Figma "Q3 gap map" page, frame "C · Q2 layout, site colours"): rounded boxes with
   white gaps between them, outcome names turned upright, an "Outcomes studied" column in cream,
   then the key and the takeaway. Same blues as before (pale 1, light 2-3, dark 4+). */
.gm { margin: var(--space-4) 0; }
.gm-kicker { margin: 0 0 .3rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gm h2 { margin: 0 0 .5rem; font-family: var(--font-heading); font-weight: 300; color: var(--link); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; }
.gm-sub { margin: 0 0 var(--space-3); color: var(--muted); max-width: none; }
.gm .grid-wrap { border: 0; max-height: none; }
table.gapmap { border-collapse: separate; border-spacing: 4px; font-size: .85rem; }
table.gapmap caption { caption-side: bottom; }
.gm table.gapmap thead .gm-corner { vertical-align: bottom; text-align: left; font-size: .75rem; color: var(--muted); padding: 0 0 .5rem; }
.gm .grid-wrap thead th, .gm .grid-wrap thead td { background: var(--bg); }
.gm table.gapmap th[scope="row"] { min-width: 15rem; max-width: 17rem; padding: .25rem 1.5rem .25rem 0; text-align: left; font-weight: 600; font-size: .85rem; white-space: normal; }
.gm table.gapmap, .gm table.gapmap th, .gm table.gapmap td { border: 0; }
.gm table.gapmap td { width: 2.75rem; height: 2.75rem; border-radius: 6px; padding: 0; vertical-align: middle; }
.gm table.gapmap th[scope="row"] { vertical-align: middle; }
.gm table.gapmap td.empty { background: #f1f2f6; color: #9aa0ac; padding: 0; font-size: .8rem; }
.gm table.gapmap td button { min-height: 2.75rem; padding: 0; font-size: 1rem; border-radius: 6px; }
.gm .gm-key { align-items: center; margin: var(--space-2) 0 .25rem; font-size: .85rem; }
.gm .gm-key dt { font-weight: 400; display: flex; align-items: center; gap: .4rem; }
.gm .gm-key dt.gm-k { font-weight: 600; }
.gm .gm-key .swatch { width: 1.1rem; height: 1.1rem; border-radius: 4px; display: inline-grid; place-items: center; }
.gm .gm-key .swatch.empty { background: #f1f2f6; color: #9aa0ac; font-size: .7rem; }
.gm-note { font-size: .85rem; color: var(--muted); max-width: none; }
.gm-take { margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--rule); }
.gm-take p { margin: .2rem 0; max-width: none; }
.gm-take p:first-child { font-size: 1.1rem; }
.gm-take p + p { font-size: .8rem; color: var(--muted); }

/* home: each question's plain summary (written by the build-time LLM when it is on) */
.hsec .qsum { font-size: 1.05rem; line-height: 1.45; }
.hsec .qsum .llm-note { display: block; margin-top: .3rem; font-size: .75rem; color: var(--muted); }

/* ---------------------------------------------------------------- Q1 flow view (Figma 278:1501) */
.graph-sec { --fg-blue: #024fec; --fg-grey: #6b6b6b; --fg-off: #d9d9d9; }
.flow-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: var(--space-3) 0 13px; padding: 0; }
.flow-steps li { display: flex; gap: 14px; align-items: center; border: 1px solid var(--dark-navy); background: var(--white); padding-right: 16px; }
.flow-steps li + li { border-left: 0; }
.flow-steps .num { width: 52px; height: 56px; font: 400 30px/1 var(--font-heading); border-radius: 0; }
.flow-steps strong { display: block; font-size: 15px; }
.flow-steps .st-s { display: block; font-size: 13px; color: var(--fg-grey); }
.num { flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; background: #024fec; color: #fff; font-weight: 700; font-size: .875rem; }
.vbtn, .flow-bar button, .fc-d > summary, .box-btn, .tile-acts a, .tile-acts summary {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 18px; border: 1px solid var(--dark-navy); background: var(--white);
  color: var(--dark-navy); font: 400 14px/1.2 var(--font-body); letter-spacing: 1.4px; text-transform: uppercase; text-decoration: none;
  cursor: pointer; box-sizing: border-box; min-height: 35px; }
.vbtn:hover, .flow-bar button:hover, .fc-d > summary:hover, .box-btn:hover { background: #f4f1ea; }
.flow-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 var(--space-3); }
.flow-bar[hidden] { display: none; }
.flow-bar .views { display: flex; align-items: center; }
.flow-bar .views > span { color: var(--fg-blue); font-size: 14px; margin-right: 18px; text-transform: uppercase; }
.flow-bar button::before { content: none; }
.flow-bar .views button + button { border-left: 0; }
.flow-bar .views button[aria-pressed="true"] { background: var(--fg-blue); color: #fff; }
.flow-bar .howto-btn span { margin-right: 6px; }
.view-note { font-size: 15px; margin: 0 0 12px; }
figure.graph.flow { background: var(--white); border-radius: 16px; padding: 24px; margin: 0; }
svg.pale a.edge, svg.pale a.gap-link, svg.pale .member { opacity: .45; }
svg.pale a.on, svg.pale a.sel, svg.pale a:focus-visible, svg.pale .member.on, svg.pale a.edge:hover { opacity: 1; }
svg.pale.hl a.edge:not(.on), svg.pale.hl a.gap-link:not(.on), svg.pale.hl .member:not(.on) { opacity: .3; }
.together { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: #faf6ef; padding: 16px 16px 16px 24px; margin: 16px 0 11px; }
.together::before { content: ""; flex: none; width: 52px; height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='28'%3E%3Cpath d='M1,14 L10,1 H42 L51,14 L42,27 H10 Z' fill='none' stroke='%23262933' stroke-width='1.5'/%3E%3C/svg%3E"); }
.together p { flex: 1 1 20rem; margin: 0; font: 400 24px/1.25 var(--font-heading); }
.together .tg-k { display: block; font: 400 13px/1.4 var(--font-body); letter-spacing: 1.6px; text-transform: uppercase; color: var(--fg-blue); margin-bottom: 4px; }
.together .tg-r { color: var(--dir-up); }
#card-slot { margin: 11px 0 var(--space-3); }
#card-slot[hidden] { display: none; }
.fcard, #card-slot .edge-panel { border: 1px solid var(--dark-navy); background: var(--white); padding: 32px 40px 36px; box-shadow: 8px 8px 0 #024fec;
  border-top: 1px solid var(--dark-navy); margin-right: 8px; }
.fc-head { display: flex; justify-content: space-between; align-items: center; }
.fc-kicker { margin: 0; font: 400 14px/1.3 var(--font-body); letter-spacing: 1.6px; text-transform: uppercase; color: #024fec; }
.edge-panel .x, .howto .x { min-width: 44px; min-height: 44px; margin: -10px -12px 0 0; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--dark-navy); }
#card-slot h3 { font: 400 38px/1.15 var(--font-heading); color: #024fec; margin: 6px 0 28px; }
#card-slot h3:focus { outline: none; }
#card-slot h3:focus-visible { outline: 3px solid var(--focus); }
.fc-figs { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; }
.fig { padding: 0 24px; }
.fig:first-child { padding-left: 0; }
.fig + .fig { border-left: 1px solid #c7c7c7; }
.fig-l { margin: 0 0 8px; font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: #6b6b6b; }
.fig-v { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font: 400 38px/1.1 var(--font-heading); }
.fig-v .dir { font: inherit; }
.fig-v .dir > span[aria-hidden] { font: 700 34px/1 var(--font-body); }
.fig-v .fig-s { font: 400 15px/1.3 var(--font-body); color: #6b6b6b; }
.dir-increase { color: var(--dir-up); } .dir-decrease { color: var(--dir-down); } .dir-mixed { color: var(--dir-mixed); } .dir-no-effect { color: var(--dir-none); }
/* certainty as four upright bars (Figma): dark = filled */
.fcard .bars, #card-slot .bars, .combo-part .bars, .q1v .bars { --f: 0px; display: inline-block; width: 45px; height: 26px; border: 0; border-radius: 0; box-shadow: none; vertical-align: middle;
  background: linear-gradient(90deg, #262933 var(--f), #d9d9d9 var(--f));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 9px, transparent 9px 12px); mask: repeating-linear-gradient(90deg, #000 0 9px, transparent 9px 12px); }
.fcard .bars::before, #card-slot .bars::before, .combo-part .bars::before, .q1v .bars::before { content: none; display: none; }
.fcard .bars.b1, #card-slot .bars.b1, .combo-part .bars.b1, .q1v .bars.b1 { --f: 12px; }
.fcard .bars.b2, #card-slot .bars.b2, .combo-part .bars.b2, .q1v .bars.b2 { --f: 24px; }
.fcard .bars.b3, #card-slot .bars.b3, .combo-part .bars.b3, .q1v .bars.b3 { --f: 36px; }
.fcard .bars.b4, #card-slot .bars.b4, .combo-part .bars.b4, .q1v .bars.b4 { --f: 48px; }
.combo-part .bars, .q1v .bars { width: 30px; height: 15px; -webkit-mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); }
.combo-part .bars.b1, .q1v .bars.b1 { --f: 8px; } .combo-part .bars.b2, .q1v .bars.b2 { --f: 16px; } .combo-part .bars.b3, .q1v .bars.b3 { --f: 24px; } .combo-part .bars.b4, .q1v .bars.b4 { --f: 32px; }
.split { margin: 0 0 28px; }
.split-bar { display: flex; gap: 3px; margin: 0; font: 700 13px/1.2 var(--font-body); color: #fff; }
.split-bar .seg { min-width: 6rem; padding: 6px 6px 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vote-increase { background: var(--dir-up); } .vote-decrease { background: var(--dir-down); } .vote-mixed { background: var(--dir-mixed); }
.vote-no_effect, .vote-unclear { background: var(--dir-none); }
.split-note { font-size: 14px; color: #6b6b6b; margin: 8px 0 0; }
.fc-btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.fc-d { min-width: 0; }
.fc-d[open] { flex-basis: 100%; }
.fc-d > summary { list-style: none; }
.fc-d > summary::-webkit-details-marker { display: none; }
.fc-d .pm::after { content: "+"; }
.fc-d[open] > summary { background: #024fec; color: #fff; border-color: #024fec; }
.fc-d[open] > summary .pm::after { content: "\2212"; }
.fc-in { border-top: 1px solid #c7c7c7; margin-top: 16px; padding: 16px 0 8px; }
.fc-lab { margin: 0 0 12px; font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: #024fec; }
.fc-d.sub { display: inline-block; margin: 0 12px 0 0; }
.fc-d.sub[open] { display: block; margin-top: 12px; }
.fc-d.warn > summary { border-color: var(--dir-down); color: var(--dir-down); }
.fc-d.warn[open] > summary { background: var(--dir-down); color: #fff; }
.ladder { list-style: none; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; padding: 0; margin: 0 0 16px; }
.ladder li { flex: 1 1 10rem; max-width: 13rem; border: 1px solid #c7c7c7; padding: 14px; position: relative; }
.ladder li + li::before { content: "\2192"; position: absolute; left: -15px; top: 12px; transform: translateX(-50%); color: #024fec; font-size: 20px; }
.ladder .lad-r { background: #f7f2ea; border-color: var(--dark-navy); }
.lad-k { display: block; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: #6b6b6b; }
.lad-n { display: flex; align-items: center; gap: 8px; font: 400 34px/1.2 var(--font-heading); }
.lad-a .lad-n { color: var(--dir-up); }
.lad-t { display: block; font-size: 14px; margin-top: 6px; }
.fc-rule-h { font-size: 13px; color: #6b6b6b; margin: 0 0 16px; }
.fc-rule-h p.rule { display: inline; font: inherit; margin: 0; }
.levels, .pts { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 4px; font-size: 14px; }
.pts li { display: flex; justify-content: space-between; max-width: 26rem; }
.levels li { display: flex; gap: 10px; align-items: center; }
.lv-h { display: flex; gap: 8px; align-items: center; font-weight: 600; margin: 8px 0 4px; }
.tile-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tile { border: 1px solid var(--dark-navy); box-shadow: 0 3px 0 #b8c3d7; }
.tile.open { border-color: #024fec; box-shadow: 0 6px 0 #024fec; }
.tile-b { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; width: 100%; text-align: left; font: inherit;
  font-size: 14px; padding: 12px 16px; background: none; color: var(--dark-navy); border: 0; cursor: pointer; }
.tile-y { font: 400 20px/1 var(--font-heading); color: #024fec; }
.tile-t { min-width: 0; overflow-wrap: anywhere; }
.tile-n { color: #555; white-space: nowrap; font-size: 13px; }
.tile-n::after { content: "  +"; white-space: pre; }
.tile.open .tile-n::after { content: "  \2212"; }
.tile-q { padding: 0 16px 16px; }
.tile-q blockquote { margin: 0 0 12px; font: 400 18px/1.45 var(--font-heading); }
.tile-q blockquote::before { content: "\201C"; } .tile-q blockquote::after { content: "\201D"; }
.tile-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.tile-acts details { flex-basis: auto; }
.tile-acts details[open] { flex-basis: 100%; }
.fc-lims { list-style: none; margin: 0 0 8px; padding: 0; font-size: 15px; display: grid; gap: 6px; }
.fc-lims strong { color: var(--dir-down); }
.fc-more { font-size: 14px; margin: 0; }
.fc-src, .fcard .fc-in { position: relative; overflow: hidden; }
/* the two-treatments card (Figma 278:1801) */
#card-slot .combo-panel h3 { margin-bottom: 6px; }
.combo-panel > p { margin: 0 0 24px; font-size: 15px; color: #6b6b6b; }
.combo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 20px; margin-bottom: 24px; }
.combo-part { border: 1px solid var(--dark-navy); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.combo-part > * { margin: 0; }
.combo-part.aside { background: #f5f5f5; border-color: #d9d9d9; }
.combo-part h4 { font: 400 24px/1.2 var(--font-heading); }
.cp-when { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: #6b6b6b; }
.cp-figs { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 15px; }
.cp-cert { display: inline-flex; gap: 6px; align-items: center; }
.cp-why { font-size: 14px; color: #6b6b6b; }
.cp-title { font-size: 13px; line-height: 1.4; color: #6b6b6b; }
.combo-part p.rule { font-size: 12px; color: #6b6b6b; }
.combo-part .fc-d { align-self: flex-start; }
.combo-part .fc-d[open] { align-self: stretch; }
.combo-panel h5 { margin: 12px 0 8px; font-size: 14px; }
/* Bars and Table views (Figma 285:52, 286:50), drawn by graph.js */
.q1v h3.ch { font: 400 24px/1.2 var(--font-heading); color: #024fec; margin: 20px 0 12px; }
.ckey { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 0 0 8px; font-size: 13px; }
.ckey i { display: inline-block; width: 18px; height: 11px; margin-right: 8px; vertical-align: -1px; }
.ckey .k-gap { border: 1px dashed #767676; }
.bchart { list-style: none; padding: 0; margin: 0; }
.brow { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: center; gap: 0 16px; }
.brow:nth-child(odd) { background: #f5f5f5; }
.brow button { display: contents; font: inherit; color: inherit; cursor: pointer; }
.brow .bl { text-align: right; font-size: 13px; padding: 5px 0; }
.brow .bt { display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--dark-navy); padding: 4px 0; position: relative;
  background: linear-gradient(90deg, transparent calc(25% - 1px), #e3e3e3 calc(25% - 1px) 25%, transparent 25% calc(50% - 1px), #e3e3e3 calc(50% - 1px) 50%, transparent 50% calc(75% - 1px), #e3e3e3 calc(75% - 1px) 75%, transparent 75%) 0 0 / 82% 100% no-repeat; }
.brow .bb { height: 22px; display: flex; align-items: center; padding-left: 6px; font: 700 11px/1 var(--font-body); color: #fff; white-space: nowrap; overflow: hidden; }
.brow .bn { font-size: 12px; color: #6b6b6b; white-space: nowrap; }
.brow.is-gap .bb { background: none; border: 1px dashed #767676; color: #555; font-weight: 400; width: 82%; }
.brow.picked { outline: 2px solid #024fec; outline-offset: -2px; background: #eef3ff; }
.brow.picked .bl { font-weight: 700; }
.baxis { display: grid; grid-template-columns: minmax(8rem, 22%) 1fr; gap: 0 16px; font: 700 12px/1 var(--font-body); }
.baxis span { display: grid; grid-template-columns: repeat(4, 1fr); width: 82%; border-top: 1px solid var(--dark-navy); padding-top: 8px; }
.baxis b { text-align: right; font-weight: 700; }
.baxis small { grid-column: 1 / -1; text-align: center; font-weight: 400; letter-spacing: 1.6px; color: #6b6b6b; margin-top: 10px; }
.vtable { border: 1px solid var(--dark-navy); box-shadow: 0 3px 0 #b8c3d7; margin: 0 0 20px; overflow-x: auto; }
.vtable table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vtable caption { text-align: left; background: #f7f2ea; padding: 10px 14px 0; font: 400 20px/1.3 var(--font-heading); color: #024fec; }
.vtable thead th { background: #f7f2ea; text-align: left; font-weight: 400; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: #6b6b6b; padding: 6px 14px 10px; }
.vtable td, .vtable tbody th { padding: 7px 14px; text-align: left; font-weight: 400; }
.vtable td:last-child, .vtable th:last-child { text-align: center; }
.vtable tbody tr:nth-child(even) { background: #f5f5f5; }
.vtable tbody tr { cursor: pointer; }
.vtable tbody tr:hover { background: #eef3ff; }
.vtable tbody tr.picked { outline: 2px solid #024fec; outline-offset: -2px; background: #eef3ff; font-weight: 700; }
.vtable tr.is-gap { color: #555; cursor: default; }
.vtable .dir { font-weight: 700; }
.vtable a { color: inherit; text-decoration: none; }
.vtable a:focus-visible { outline: 3px solid var(--focus); }
.vmore { margin: 0 0 20px; }
/* How to read the flow diagram */
.howto { max-width: min(37.5rem, calc(100vw - 2rem)); width: 100%; max-height: calc(100vh - 2rem); padding: 0; border: 1px solid var(--dark-navy);
  color: var(--dark-navy); box-sizing: border-box; box-shadow: 8px 8px 0 #024fec; }
.howto::backdrop { background: rgba(38, 41, 51, .5); }
.howto-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; background: var(--white); padding: 20px 29px 8px; z-index: 1; }
.howto-head h2 { margin: 0; font: 400 28px/1.15 var(--font-heading); color: #024fec; }
.howto-body { padding: 8px 29px 29px; }
.howto h3 { font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: #024fec; font-weight: 400; margin: 20px 0 10px; }
.howto h4 { font-size: 14px; margin: 14px 0 6px; }
.ht-use { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; }
.ht-use li { display: flex; gap: 10px; align-items: center; border: 1px solid var(--dark-navy); padding-right: 8px; font-size: 13px; }
.ht-use li + li { border-left: 0; }
.ht-use .num { width: 36px; height: 40px; font: 400 22px/1 var(--font-heading); }
.ht-ex, .ht-k { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.ht-ex li, .ht-k li { display: flex; gap: 12px; align-items: center; }
.ht-ex svg, .ht-k svg, .ht-ex .kb { flex: none; }
.ht-ex .kb { border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; font-weight: 700; }
.howto .lim-h { font-size: 13px; color: #6b6b6b; margin: 12px 0 4px; }
.howto .lims { font-size: 14px; padding-left: 1.1rem; }
.ht-cons { margin-top: 20px; }
.ht-cons .fc-d.sub { display: block; margin: 8px 0 0; }
@media (max-width: 760px) {
  .flow-steps, .ht-use { grid-template-columns: 1fr; }
  .flow-steps li + li, .ht-use li + li { border-left: 1px solid var(--dark-navy); border-top: 0; }
  .fcard, #card-slot .edge-panel { padding: 20px 16px; box-shadow: 4px 4px 0 #024fec; }
  #card-slot h3 { font-size: 28px; }
  .fc-figs { grid-template-columns: 1fr; gap: 14px; }
  .fig, .fig:first-child { padding: 0; }
  .fig + .fig { border-left: 0; border-top: 1px solid #c7c7c7; padding-top: 12px; }
  .fig-v { font-size: 30px; }
  .split-bar { flex-wrap: wrap; }
  .split-bar .seg { flex: 1 1 100% !important; }
  .ladder li { max-width: none; flex-basis: 100%; }
  .ladder li + li::before { content: "\2193"; left: 50%; top: -14px; }
  .together p { font-size: 20px; }
  .brow { grid-template-columns: 7rem minmax(0, 1fr); gap: 0 8px; }
  .vbtn, .flow-bar button, .fc-d > summary { letter-spacing: .6px; padding: 8px 12px; }
}
.together[hidden] { display: none; }
.baxis > span:first-child { border: 0; display: block; }
.tile-q blockquote { background: none; border: 0; padding: 0; }
.brow.is-gap { outline: 0; border: 0; }
.brow.bax { background: none; font: 700 12px/1 var(--font-body); }
.bax-s { display: grid; grid-template-columns: repeat(4, 1fr); width: 82%; border-top: 1px solid var(--dark-navy); padding-top: 8px; margin-left: 1px; }
.bax-s b { text-align: right; }
.bax-s small { grid-column: 1 / -1; text-align: center; font-weight: 400; letter-spacing: 1.6px; color: #6b6b6b; margin-top: 10px; }
.bchart .brow, .q1v .ckey li { max-width: none; }
.graph-sec .g-label { font-family: var(--font-heading); font-weight: 300; color: var(--link); text-transform: uppercase;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.1; margin: var(--space-3) 0 var(--space-2); }
.flow-steps[hidden], .flow-bar .howto-btn[hidden] { display: none; }
.flow-bar + .flow-steps { margin-top: 0; }
/* one type scale for the Q1 graph section: section label = OVERVIEW / CONSTRAINTS; one title size inside */
.graph-sec .g-label { font-size: clamp(1.6rem, 2.1vw, 1.9rem); }
.graph-sec { --title: 28px; }
#card-slot h3, .q1v h3.ch, .vtable caption { font-size: var(--title); line-height: 1.2; }
.together p { font-size: 22px; }
.flow-steps.view-note { display: block; border: 0; margin: 0 0 12px; padding: 0; }
@media (max-width: 760px) { .graph-sec { --title: 24px; } }
/* NOT STUDIED uses the same section-label size as OVERVIEW / CONSTRAINTS / GRAPH on Q1 */
.content .ns-h { font-size: clamp(1.6rem, 2.1vw, 1.9rem); font-weight: 300; }
.fig-v { font-size: 30px; }
.fig-v .dir > span[aria-hidden] { font-size: 26px; }
#card-slot h3:focus, #card-slot h3:focus-visible { outline: none; }
.flow-lims { margin: 12px 0 0; font-size: 14px; }
.flow-lims[hidden] { display: none; }
.flow-lims .paths { margin: 0 0 6px; }
.flow-lims summary { cursor: pointer; color: #024fec; }
.flow-lims .lims { padding-left: 1.1rem; margin: 6px 0 0; }
/* Home, after the Problem opening (Figma "home page" frame): Our Mission, then one block per
   question with its photo cluster. Parts marked .rv fade and rise in as they scroll into view
   (static/reveal.js; only when html has .rv-js, i.e. script on and no reduced motion). */
.home-grid main > .hsec.mission { max-width: none; margin-bottom: clamp(3rem, 12vw, 9rem); }
.hsec.mission > h2 { border-bottom: 0; font-size: clamp(2.6rem, 4.4vw, 4rem); margin-left: clamp(0rem, 2.6vw, 2.4rem); }
.hsec.mission .hsec-body { padding: var(--space-3) 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  font-family: var(--font-heading); font-weight: 300; font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.2; }
.hsec.mission .m1 { grid-column: 1; margin: 0 0 0 clamp(0rem, 2.6vw, 2.4rem); max-width: 26ch; }
.hsec.mission .m2 { grid-column: 2; margin: clamp(6rem, 22vw, 20rem) 0 0; text-align: right; justify-self: end; max-width: 27ch; }
.home-grid main > .hsec.qsec { max-width: none; margin-bottom: clamp(3rem, 8vw, 7rem); }
.hsec.qsec > h2 { font-size: clamp(1.6rem, 2.6vw, 2.35rem); font-weight: 300; line-height: 1.15; }
.hsec.qsec > h2 a { color: var(--link); }
.hsec.qsec > h2 .qn { color: inherit; }
.hsec.qsec .hsec-body { max-width: 56rem; }
.hphotos { position: relative; width: 100%; max-width: 56rem; margin-top: clamp(1.5rem, 5vw, 4rem); }
.hphotos img { position: absolute; height: auto; display: block; }
.rv-js .rv { opacity: 0; transform: translateY(2rem); transition: opacity .9s ease, transform 1s cubic-bezier(.2, .8, .2, 1); }
.rv-js .hphotos img.rv { transform: translateY(2.5rem) scale(.96); }
.rv-js .rv.on { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .hsec.mission .hsec-body { grid-template-columns: 1fr; }
  .hsec.mission .m2 { grid-column: 1; margin-top: var(--space-3); text-align: left; justify-self: start; }
}

/* Q3 gap map. The section uses the page's full width (small margins), and the map shows big boxes
   (at least 4rem) that you scroll sideways; "Full screen" is the zoomed-out view of the whole map.
   Outcome names are slanted so you can read them without turning your head; darkest shade for 8+. */
main.has-hero { overflow-x: clip; }
.gm { width: 100vw; margin-left: calc(50% - 50vw); padding: 0 clamp(1rem, 3vw, 3rem); box-sizing: border-box; }
.gm > p, .gm > h2 { max-width: 62rem; }
.swatch.d-top, table.gapmap td.d-top { background: var(--d-top); }
table.gapmap td.d-top button { color: var(--white); font-weight: 700; }
.gm .grid-wrap { container-type: inline-size; overflow-x: auto; padding: 0 7rem 0 0; }
.gm table.gapmap { --row: 15rem; --cw: clamp(4rem, calc((100cqi - var(--row) - 19 * 5px) / 17), 5.5rem); --ch: var(--cw);
  margin: 0; table-layout: fixed; border-spacing: 5px; }
.gm table.gapmap td, .gm table.gapmap thead th[scope="col"] { width: var(--cw); min-width: var(--cw); max-width: var(--cw); }
.gm table.gapmap td { height: var(--ch); }
.gm table.gapmap td button { height: var(--ch); min-height: 0; padding: 0; font-size: max(.75rem, calc(var(--ch) * .3)); }
.gm table.gapmap th[scope="row"] { width: var(--row); min-width: var(--row); max-width: var(--row); padding-right: 1rem; font-size: .88rem; line-height: 1.3; }
/* the outcome names: one slanted line each where they fit, two at most, with room between them */
.gm table.gapmap thead th[scope="col"] { height: 10.5rem; padding: 0; position: relative; top: auto; z-index: 2; background: transparent; overflow: visible; }
.gm table.gapmap thead th[scope="col"] span { writing-mode: horizontal-tb; position: absolute; left: 50%; bottom: .5rem;
  width: 13rem; max-height: none; margin: 0; transform-origin: 0 100%; transform: rotate(-45deg);
  font-size: .82rem; line-height: 1.3; letter-spacing: .01em; text-align: left; white-space: normal; }
@media (max-width: 600px) {
  .gm .grid-wrap { padding-right: 6rem; }
  .gm table.gapmap { --row: 8.5rem; --cw: 3.25rem; }
  .gm table.gapmap th[scope="row"] { font-size: .75rem; }
  .gm table.gapmap thead th[scope="col"] span { width: 11rem; font-size: .74rem; }
}
/* full screen: the whole map at once. Boxes stretch to fill the width (they can be wider than they
   are tall) and shrink to fit the height, so nothing goes off an edge. */
.gm .grid-wrap:fullscreen { background: var(--bg); padding: 1rem 6.5rem 1.5rem 2rem; overflow: auto; display: flex; flex-direction: column; }
.gm .grid-wrap:fullscreen table.gapmap { --row: 19rem; margin: 0 auto; border-spacing: 4px;
  --cw: max(1.4rem, min(calc((100cqi - var(--row) - 19 * 4px) / 17), 7rem));
  --ch: max(.8rem, min(calc((100vh - 2.5rem - 8.5rem - var(--leg, 0px) - 28 * 4px) / 25), 4rem)); }
.gm .grid-wrap:fullscreen table.gapmap thead th[scope="col"] { height: 8rem; }
.gm .grid-wrap:fullscreen table.gapmap thead th[scope="col"] span { width: 10rem; white-space: normal; font-size: .72rem; line-height: 1.15; bottom: .3rem; }
.gm .grid-wrap:fullscreen table.gapmap th[scope="row"] { font-size: .75rem; padding-top: 0; padding-bottom: 0; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm .grid-wrap:fullscreen caption { display: none; }
.gm .grid-wrap:fullscreen table.gapmap td { line-height: 1; font-size: .65rem; }
.gm .grid-wrap:fullscreen table.gapmap td button { min-height: 0; height: var(--ch); padding: 0; line-height: 1;
  font-size: max(.65rem, min(calc(var(--ch) * .55), 1rem)); }

/* Gap map extras: our own totals, every box a button */
.gm table.gapmap td button { position: relative; }
.gm table.gapmap td.empty button { color: #8a909c; font-size: .8rem; }
.gm table.gapmap td.tot { background: transparent; color: var(--muted); font-size: .8rem; font-weight: 600; text-align: center; }
.gm table.gapmap tfoot td { height: 1.75rem; }
.gm table.gapmap tfoot th { text-align: left; font-weight: 400; font-style: italic; font-size: .75rem; color: var(--muted); padding: 0 .75rem 0 0; }
.gm table.gapmap thead th.tot span { color: var(--muted); font-style: italic; }
.gm-skip { position: absolute; left: -10000px; }
.gm-skip:focus { position: static; display: inline-block; margin: 0 0 .5rem; padding: .3rem .7rem; background: var(--link); color: #fff; }

/* A box's details: a panel that slides in from the right (one per treatment row, plus one shared
   "Not studied" panel), laid out like the Figma Q1 "Bottom card · one cause" */
.pop.rowpop { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(40rem, 100vw); max-width: none; height: 100dvh; max-height: none;
  border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: -12px 0 32px rgba(15, 20, 60, .18);
  padding: 3rem clamp(1rem, 3vw, 2rem) 2rem; overflow: auto; translate: 0 0;
  transition: translate .28s ease, display .28s allow-discrete, overlay .28s allow-discrete; }
@starting-style { .pop.rowpop:popover-open { translate: 100% 0; } }
.pop.rowpop:not(:popover-open) { translate: 100% 0; }
.pop.rowpop::backdrop { background: rgba(0, 0, 0, .15); }
@media (prefers-reduced-motion: reduce) { .pop.rowpop { transition: none; } }
.rowpop.only .pop-h { display: none; }
.rowpop:not(.only) ul.cells > li + li { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }

.gmc-k { margin: 0 0 .3rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--link); }
.gmc-h { margin: 0 2rem 1.25rem 0; font-family: var(--font-heading); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.15; color: var(--link); }
.gmc-st { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr) minmax(0, 1fr); margin: 0 0 1.25rem; }
.gmc-st > div { padding: 0 1rem; border-left: 1px solid var(--rule); }
.gmc-st > div:first-child { padding-left: 0; border-left: 0; }
.gmc-st dt { margin: 0 0 .25rem; font-size: .68rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gmc-st dd { margin: 0; font-size: .8rem; color: var(--muted); }
.gmc-big, .gmc-st dd.gmc-big { display: block; font-family: var(--font-heading); font-size: 1.7rem; line-height: 1.15; color: var(--text); }
.gmc-big .bars { zoom: .75; margin-right: .15rem; }
.gmc-st dd.gmc-big.dir-increase { color: var(--dir-up); }
.gmc-st dd.gmc-big.dir-decrease { color: var(--dir-down); }
.gmc-st dd.gmc-big.dir-mixed { color: var(--dir-mixed); }
.gmc-st dd.gmc-big.dir-no-effect, .gmc-st dd.gmc-big.dir-unclear { color: var(--dir-none); }
.gmc-st > div:last-child .gmc-big { display: inline; margin-right: .3rem; }
.gmc-why { display: block; margin-top: .35rem; font-size: .78rem; }
.gmc .agree { display: flex; width: 100%; height: 1.1rem; border: 0; border-radius: 2px; }
.gmc-sp { margin: .45rem 0 0; font-size: .88rem; max-width: none; }
.gmc-sp .sp { white-space: nowrap; }
.gmc-sp .sp::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .3em; border-radius: 50%; background: var(--dc); }
.k-increase { --dc: var(--s-up); } .k-decrease { --dc: var(--s-down); } .k-mixed { --dc: var(--s-mixed); }
.k-no-effect { --dc: var(--s-none); } .k-unclear { --dc: var(--dir-none); }
.gmc-warn { margin: .9rem 0 0; padding: .5rem .75rem; border-left: 3px solid var(--c-low); background: #fff6e8; font-size: .85rem; max-width: none; }

/* the three fold-outs: outlined buttons in a row; an open one drops below the row, full width */
.gmc-more { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem; margin-top: 1.25rem; }
details.gmx[open] { order: 1; flex: 1 0 100%; }
details.gmx > summary, .gmx-qmore > summary, .gmx-btn { display: inline-flex; align-items: center; gap: .55rem; padding: .5rem .9rem;
  border: 1px solid var(--text); border-radius: 0; background: var(--bg); color: var(--text); font: inherit; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; list-style: none; }
details.gmx > summary::-webkit-details-marker, .gmx-qmore > summary::-webkit-details-marker,
.gmx-paper > summary::-webkit-details-marker { display: none; }
details.gmx > summary::after, .gmx-qmore > summary::after { content: "+"; content: "+" / ""; }
details.gmx[open] > summary::after, .gmx-qmore[open] > summary::after { content: "\2212"; content: "\2212" / ""; }
details.gmx > summary:hover, .gmx-qmore > summary:hover, .gmx-btn:hover { border-color: var(--link); color: var(--link); }
details.gmx[open] > summary { background: var(--link); border-color: var(--link); color: #fff; }
.gmx-b { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--rule); }
.gmx-b p { max-width: none; }
.gmx-n, .gmc-ck { margin: 0 0 .7rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--link); }

/* Certainty calculation: start → adjust → result */
.gmc-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.gmc-flow li { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: .75rem .9rem; border: 1px solid var(--line); }
.gmc-flow li + li::before { content: "\2192"; content: "\2192" / ""; position: absolute; left: -1.3rem; top: 1.1rem; color: var(--link); }
.gmc-flow li.res { border-color: var(--text); background: #f8f4ec; }
.gmc-flow .lab { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gmc-flow .num { font-family: var(--font-heading); font-size: 1.6rem; line-height: 1.1; }
.gmc-flow .num .bars { margin-left: .2rem; }
.gmc-flow .up { color: var(--dir-up); }
.gmc-flow .down { color: var(--dir-down); }
.gmc-flow .t { font-size: .8rem; }
.gmc-flow .mv { display: block; }
.gmc-rule { margin: .8rem 0 0; font-size: .78rem; color: var(--muted); }
.gmc-calc-more { margin: .8rem 0 0; }
.gmc-caveat { margin: .8rem 0 0; padding: .6rem .8rem; border-left: 3px solid var(--accent); background: #fbf0ee; font-size: .82rem; }
.gmc-caveat strong { display: block; font-family: var(--font-heading); font-weight: 400; font-size: 1.05rem; color: var(--accent); }

/* Citations: one box per paper; the first one open */
.gmx-papers { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .7rem; }
.gmx-paper { border: 1px solid var(--text); box-shadow: 0 4px 0 var(--light-blue); background: var(--bg); }
.gmx-paper[open] { border-color: var(--link); box-shadow: 0 4px 0 var(--link); }
.gmx-paper > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center;
  padding: .6rem .9rem; cursor: pointer; list-style: none; }
.gmx-paper .y { font-family: var(--font-heading); font-size: 1.35rem; color: var(--link); }
.gmx-paper .t { font-size: .85rem; }
.gmx-paper .n { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.gmx-paper .n::after { content: "  +"; content: "  +" / ""; }
.gmx-paper[open] > summary .n::after { content: "  \2212"; content: "  \2212" / ""; }
.gmx-paper blockquote.quote { margin: 0 .9rem .7rem; padding: 0; border: 0; background: none; font-family: var(--font-heading);
  font-size: 1.05rem; line-height: 1.4; max-width: none; }
.gmx-paper blockquote.quote::before { content: "\201C"; }
.gmx-paper blockquote.quote::after { content: "\201D"; }
.gmx-qmore { margin: 0 .9rem .7rem; }
.gmx-qmore[open] > summary { margin-bottom: .7rem; }
.gmx-qmore blockquote.quote { margin: 0 0 .7rem; }
.gmx-acts { margin: 0 .9rem .8rem; }
.gmx-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.gmx-acts .doi { color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.gmx-note { margin: 0 0 .7rem; font-size: .8rem; color: var(--muted); }
.gmx-about { margin: 0 .9rem .7rem; font-size: .8rem; }
.gmx-about > summary { cursor: pointer; color: var(--link); width: fit-content; }
.gmx-about > summary:hover { text-decoration: underline; }
.gmx-about dl.camo { margin: .4rem 0 0; padding: .5rem .7rem; background: var(--panel); border-radius: 4px; font-size: .8rem; }

/* Constraints: the pack's limitations, word for word, with our short tag in front */
.gmx-lims { list-style: none; margin: 0 0 .6rem; padding: 0; }
.gmx-lims li { margin: 0 0 .5rem; font-size: .88rem; }
.gmx-lims .lim-tag { color: var(--accent); }

/* the shared Not studied panel */
.gmc-gap .gmc-k { color: var(--muted); }
.gmc-gap .gmc-h { color: var(--text); }
.gmc-lead { font-size: 1.05rem; }
.gmc-searched { font-size: .85rem; color: var(--muted); }
.gmc-not { padding: .6rem .8rem; border-left: 3px solid var(--link); background: #eef3ff; }
.gmc-lims { margin: 1rem 0; }

@media (max-width: 560px) {
  .gmc-st { grid-template-columns: 1fr; gap: .9rem; }
  .gmc-st > div { padding: 0; border-left: 0; }
  .gmc-flow { grid-template-columns: 1fr; }
  .gmc-flow li + li::before { content: "\2193"; content: "\2193" / ""; left: 1rem; top: -1.45rem; }
}

/* the legend above the gap map: a one-line key, then a dropdown (styled like "See not-studied
   pairings") with the full explanation. In full screen it sits at the top of the map. */
.gm-legend { margin: 0 0 var(--space-3); max-width: 62rem; }
.gm-basic { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.4rem; margin: 0 0 .9rem; font-size: 1.05rem; max-width: none; }
.gm-basic > span { display: inline-flex; align-items: center; gap: .45rem; }
.gm-basic .gm-k { font-weight: 600; }
.gm-legend .swatch { width: 1.5rem; height: 1.5rem; border-radius: 5px; display: inline-grid; place-items: center; }
.gm-legend .swatch.empty { background: #f1f2f6; color: #9aa0ac; font-size: .85rem; }
details.gm-mk > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem;
  background: var(--bg); border-radius: 12px; padding: .85rem 1.25rem; box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
  border: 1.5px solid var(--link); }
details.gm-mk > summary::-webkit-details-marker { display: none; }
details.gm-mk > summary::after { content: "⌄" / ""; margin-left: auto; color: var(--link); font-size: 1.4rem; line-height: 1; }
details.gm-mk[open] > summary::after { content: "⌃" / ""; }
details.gm-mk > summary .ns-q { border-style: solid; border-color: var(--link); color: var(--link); font-family: var(--font-heading); }
.gm-mk-h { font-size: 1.1rem; font-weight: 600; color: var(--link); }
details.gm-mk > summary:hover .gm-mk-h { text-decoration: underline; }
details.gm-mk .v-hide, details.gm-mk[open] .v-see { display: none; }
details.gm-mk[open] .v-hide { display: inline; }
.gm-mk-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: 1rem 2rem;
  margin: .9rem 0 0; padding: 1.1rem 1.25rem; border: 1px solid var(--rule); border-radius: 12px; font-size: .95rem; line-height: 1.45; }
.gm-mk-b dt { margin: 0 0 .2rem; font-weight: 600; color: var(--text); }
.gm-mk-b dd { margin: 0; color: var(--text); }
.gm .grid-wrap:fullscreen { --leg: 5.4rem; }
.gm .grid-wrap:fullscreen .gm-legend { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; max-width: none; margin: 0 0 .5rem; }
.gm .grid-wrap:fullscreen .gm-basic { margin: 0; font-size: .9rem; }
.gm .grid-wrap:fullscreen .gm-legend .swatch { width: 1.2rem; height: 1.2rem; }
.gm .grid-wrap:fullscreen details.gm-mk > summary { padding: .45rem .9rem; }
.gm .grid-wrap:fullscreen details.gm-mk[open] { flex-basis: 100%; }
.gm .grid-wrap:fullscreen .gm-mk-h { font-size: .9rem; }

/* Gap map: the box under the mouse (or selected) and its row and column names grow a little,
   animated, and settle back when you move on (gm.js adds .hv for the mouse, .fx for focus) */
.gm table.gapmap tbody td, .gm table.gapmap tbody th[scope="row"], .gm table.gapmap thead th[scope="col"] span {
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease, color .2s ease; }
.gm table.gapmap tbody td { position: relative; }
.gm table.gapmap tbody td.hv, .gm table.gapmap tbody td.fx { transform: scale(1.18); z-index: 3;
  box-shadow: 0 6px 16px rgba(15, 20, 60, .28); }
.gm table.gapmap tbody th[scope="row"] { transform-origin: right center; }
.gm table.gapmap tbody th.hv, .gm table.gapmap tbody th.fx { transform: scale(1.1); color: var(--link); }
.gm table.gapmap thead th.hv span, .gm table.gapmap thead th.fx span { transform: rotate(-45deg) scale(1.12); color: var(--link); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .gm table.gapmap tbody td, .gm table.gapmap tbody th[scope="row"], .gm table.gapmap thead th[scope="col"] span { transition: none; }
}
/* room on the left so a growing row name is not clipped by the map's scroll box (same position) */
.gm .grid-wrap { margin-left: -1.75rem; padding-left: 1.75rem; }
.gm .grid-wrap:fullscreen { margin-left: 0; }

/* Overview & Constraints: the information itself a little larger, for reading (the labels stay) */
.ov .short ul.sa > li, .ov details.limits li, .ov details.limits .intro { font-size: 1.07rem; line-height: 1.45; }
@media (min-width: 900px) {
  .ov .short ul.sa > li, .ov-right details.limits li, .ov-right details.limits .intro { font-size: 1.1em; }
  .ov .short ul.sa > li > strong:first-child { font-size: 1.05em; }
}

/* Not studied, on every question page: a section that stands out (tinted panel, dashed "gap"
   edge, big heading) and a large dropdown button */
.ns-sec { max-width: 62rem; margin: var(--space-5, 4rem) 0; padding: clamp(1.25rem, 3vw, 2.5rem);
  background: #f3f6fd; border: 2px dashed var(--link); border-radius: 18px; }
.ns-h { font-size: clamp(2.2rem, 4vw, 3.2rem); margin: 0 0 1rem; }
.ns-intro { font-size: clamp(1.25rem, 1.8vw, 1.55rem); line-height: 1.4; margin-bottom: var(--space-3); }
details.ns { margin-top: 0; }
details.ns > summary { padding: 1.35rem 1.6rem; gap: 1rem; border-width: 2px; border-radius: 14px;
  box-shadow: 0 6px 22px rgba(2, 79, 236, .22); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
details.ns > summary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(2, 79, 236, .3); }
details.ns > summary h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
details.ns > summary::after { font-size: 1.9rem; }
details.ns > summary .ns-q { width: 2.3rem; height: 2.3rem; font-size: 1.15rem; border-width: 2px; }
details.ns > summary .ns-c { font-size: 1.1rem; font-weight: 700; padding: .25rem .9rem; background: var(--link); color: #fff; }
details.ns[open] > summary { background: var(--link); }
details.ns[open] > summary h3, details.ns[open] > summary::after { color: #fff; }
details.ns[open] > summary .ns-q { border-color: #fff; color: #fff; }
details.ns[open] > summary .ns-c { background: #fff; color: var(--link); }
@media (prefers-reduced-motion: reduce) { details.ns > summary { transition: none; } details.ns > summary:hover { transform: none; } }
/* the list inside, a step larger too */
details.ns .ns-t { font-size: 1.2rem; }
details.ns .ns-key { font-size: .9rem; }
details.ns li.gap { font-size: 1.02rem; }
details.ns li.gap .searched { font-size: .85rem; }
@media (max-width: 600px) {
  .ns-sec { padding: 1.1rem; border-radius: 14px; }
  details.ns > summary { padding: 1rem 1.1rem; gap: .7rem; }
  details.ns > summary .ns-q { display: none; }
  details.ns > summary h3 { font-size: 1.15rem; }
  details.ns > summary .ns-c { font-size: 1rem; padding: .2rem .7rem; }
}

/* Gap map: the names stay in view. The map scrolls inside its own box (at most one screen tall),
   with the outcome names pinned to its top and the treatment names pinned to its left, so a box
   far down or across still shows what it is. Full screen shows everything anyway. */
.gm .grid-wrap { overflow: auto; max-height: calc(100svh - var(--top-h, 6rem) - 1.5rem); overscroll-behavior: auto; }
.gm .grid-wrap:fullscreen { max-height: none; }
.gm table.gapmap thead { position: sticky; top: 0; z-index: 4; background: var(--bg); }
.gm table.gapmap thead td.gm-corner { position: sticky; left: 0; top: auto; z-index: 5; background: var(--bg); }
.gm table.gapmap tbody th[scope="row"], .gm table.gapmap tfoot th { position: sticky; left: 0; z-index: 2;
  background: var(--bg); box-shadow: -1.75rem 0 0 var(--bg); }
.gm table.gapmap tbody td.hv, .gm table.gapmap tbody td.fx { z-index: 3; }
.gm table.gapmap thead td.gm-corner { box-shadow: -1.75rem 0 0 var(--bg); }

/* ------------------------------------------------------------------ Guide (method.html)
   Figma "Q1 · graph section + cards": small blue capital labels, cream panels, white cards with a
   blue offset shadow, outlined capital buttons. The left menu is home's, without the tree, so it
   sits right under the logo; static/tree.js marks the section being read. */
:root { --gd-beige: #f8f4ee; --gd-warn-bg: #fbefef; }
.guide-grid .home-menu { margin-top: 0; }
.guide-grid main { position: relative; padding-top: var(--space-4); max-width: 60rem; }
.gd-top { position: sticky; top: calc(var(--top-h) + var(--space-1)); z-index: 5; display: flex; justify-content: flex-end;
  align-items: flex-start; height: 0; overflow: visible; }
.gd-back { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border: 1px solid var(--text);
  background: var(--bg); color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: .06em;
  font-size: .8125rem; box-shadow: 4px 4px 0 var(--bright-blue); }
.gd-back:hover, .gd-back:focus-visible { background: var(--link); border-color: var(--link); color: #fff; }
.gd-head h1 { margin-top: 0; padding-right: 9rem; }
.gd-intro { font-family: var(--font-heading); font-weight: 300; font-size: var(--text-lg); line-height: 1.35; }
.gd-sec { margin: var(--space-5) 0 0; }
.gd-sec > h2 { margin: 0; padding-bottom: var(--space-1); border-bottom: 1px solid var(--rule); max-width: none;
  font-size: clamp(1.75rem, 3vw, var(--text-heading)); }
.gd-sn { font-family: var(--font-body); font-size: var(--text-lg); vertical-align: .35em; margin-right: .25rem; }
.gd-body { padding-top: var(--space-3); }
.gd-body > :first-child { margin-top: 0; }
.gd-lead { font-size: var(--text-base); }
.gd-label, .gd-kicker { margin: 0 0 .6rem; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bright-blue); max-width: none; }
.gd-h3 { margin: var(--space-4) 0 var(--space-2); font-family: var(--font-heading); font-weight: 300; color: var(--heading);
  font-size: var(--text-lg); }
.gd-panel { background: var(--gd-beige); padding: var(--space-3); margin: var(--space-3) 0; }
.gd-card { position: relative; background: var(--bg); border: 1px solid var(--text); box-shadow: 8px 8px 0 var(--bright-blue);
  padding: var(--space-3); margin: 0 8px var(--space-3) 0; }
.gd-card h3 { margin: 0 0 var(--space-2); font-family: var(--font-heading); font-weight: 300; color: var(--heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.15; }
.gd-card.slim { padding: var(--space-2) var(--space-3); box-shadow: 5px 5px 0 var(--bright-blue); }
.gd-card.slim p, .gd-card.slim li { font-size: var(--text-sm); }
.gd-card.slim ul { margin: 0; padding-left: 1.1rem; }
.gd-cards { display: grid; gap: var(--space-2); }
.gd-cards.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.gd-signs { margin: 0; display: grid; gap: var(--space-2); }
.gd-signs > div { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: .25rem var(--space-3);
  padding-top: var(--space-2); border-top: 1px solid var(--rule); }
.gd-signs > div:first-child { border-top: 0; padding-top: 0; }
.gd-signs dt { font-weight: 600; }
.gd-signs dd { margin: 0; }
.gd-signs dd p { margin: 0 0 .35rem; font-size: var(--text-sm); }
p.gd-row { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; font-size: var(--text-base); }
.gd-lvl { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.gd-steps { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--space-2) var(--space-3); }
.gd-steps li { display: flex; gap: .6rem; max-width: none; font-size: var(--text-sm); }
.gd-steps strong { display: block; font-size: var(--text-base); color: var(--text); }
.gd-num { flex: none; font-family: var(--font-heading); font-weight: 300; font-size: 2rem; line-height: 1; color: var(--bright-blue); }
.gd-legend { list-style: none; margin: 0 0 var(--space-2); padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .4rem var(--space-3); font-size: var(--text-sm); }
.gd-legend li { display: flex; align-items: center; gap: .45rem; max-width: none; }
.gd-tl { flex: none; display: inline-block; width: 2.25rem; height: .9rem; border-radius: 3px; }
.gd-tl.hatch { border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, var(--bg) 0 3px, var(--line) 3px 5px); }
.gd-key { display: block; border: 0; padding: 0; margin: 0 0 var(--space-2); }
.gd-key .gkey-g { margin-bottom: var(--space-1); }
.gd-key h4 { margin: .5rem 0 .2rem; font-size: .8125rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bright-blue); font-family: var(--font-body); }
.gd-key ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0 var(--space-3);
  font-size: var(--text-sm); }
.gd-note, .gd-small { font-size: var(--text-sm); color: var(--muted); }
.gd-go { margin: var(--space-2) 0 0; }
.gd-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border: 1px solid var(--text);
  color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .8125rem; }
.gd-btn:hover, .gd-btn:focus-visible { background: var(--link); border-color: var(--link); color: #fff; }
.gd-defs { margin: 0; }
.gd-defs > div { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: .25rem var(--space-3);
  padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.gd-defs dt { display: flex; flex-wrap: wrap; gap: .3rem; align-items: flex-start; }
.gd-defs dd { margin: 0; font-size: var(--text-sm); }
/* certainty: four levels, then the two columns of the grade (Figma "How certainty is graded") */
.gd-levels { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-1); text-align: center; font-size: var(--text-sm); }
.gd-levels li { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.gd-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--space-2) var(--space-4); }
.gd-calc h3 { margin: 0 0 .5rem; font-size: var(--text-base); font-family: var(--font-body); font-weight: 700; }
.gd-score { list-style: none; margin: 0; padding: 0; font-size: var(--text-sm); }
.gd-score li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .2rem 0; max-width: none; }
.gd-n { font-family: var(--font-heading); font-weight: 300; font-size: 1.6rem; line-height: 1; }
.gd-n.down, .gd-big.down { color: var(--dir-down); }
.gd-n.up, .gd-big.up { color: var(--dir-up); }
.gd-example { list-style: none; margin: 0 0 var(--space-2); padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: var(--space-1); }
.gd-example li { display: flex; flex-direction: column; gap: .2rem; border: 1px solid var(--line); padding: .6rem .8rem;
  font-size: var(--text-sm); max-width: none; }
.gd-example li.res { background: var(--gd-beige); border-color: var(--text); }
.gd-k { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gd-big { display: flex; align-items: center; gap: .4rem; font-family: var(--font-heading); font-weight: 300; font-size: 2rem; line-height: 1.1; }
.gd-warn { border-left: 4px solid var(--dir-down); background: var(--gd-warn-bg); padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0; }
.gd-warn .gd-label { color: var(--dir-down); }
.gd-warn h3 { margin: 0 0 .3rem; font-family: var(--font-heading); font-weight: 300; color: var(--dir-down); font-size: var(--text-lg); }
.gd-warn p { margin: 0; }
.gd-more { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: .6rem 0; }
.gd-more summary { cursor: pointer; text-transform: uppercase; letter-spacing: .08em; font-size: .8125rem; }
.gd-more li, .gd-more p { font-size: var(--text-sm); }
@media (max-width: 52rem) {
  .guide-grid { display: block; padding: 0 var(--space-2); }
  .guide-grid::before { display: none; }
  .guide-grid .home-side { position: static; width: auto; height: auto; padding: var(--space-2) 0 0; }
  .guide-grid main { padding-top: var(--space-3); }
  .gd-top { top: calc(var(--top-h) + .4rem); }
  .gd-head h1 { padding-right: 0; margin-top: var(--space-4); }
  .gd-signs > div, .gd-defs > div { grid-template-columns: minmax(0, 1fr); }
  .gd-panel, .gd-card { padding: var(--space-2); }
}
@media (max-width: 30rem) { .gd-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------------------------------
   Q2 chart section and cards in the style of the Figma frame "Q1 · copy into the group file:
   graph section + cards": square outlined buttons (blue when open), numbered steps, a cream
   note band, cards with a hard blue offset shadow, Newsreader figures over small caps labels.
   ------------------------------------------------------------------------------------------ */
.mc-section, .bcpop, .fg-pop {
  --fg-ink: var(--dark-navy); --fg-blue: var(--bright-blue); --fg-grey: #6b6b6b; --fg-rule: #c7c7c7;
  --fg-cream: #faf6ef; --fg-red: #bd1010; --fg-red-bg: #fcf2f2; --fg-empty: #d9d9d9;
  /* result colours as on the Q1 flow diagram (↑ green, ↓ red, ⇅ blue, – grey) */
  --mc-behind: #c0262d; --mc-ahead: #1b6e3a; --mc-mixed: #1a5fb4; --mc-unclear: #7a5c00; --mc-nochg: #5f5f5f;
  --mc-grid: #e1e1e1; --mc-match: var(--fg-cream); --mc-empty: var(--fg-empty);
}
.mc-key, .mc-how, .mc-wrap, .mc-tview, .mc-take, .mc-tipbox { --mc-behind: #c0262d; --mc-ahead: #1b6e3a; --mc-mixed: #1a5fb4;
  --mc-unclear: #7a5c00; --mc-nochg: #5f5f5f; --mc-grid: #e1e1e1; --mc-match: #faf6ef; --mc-empty: #d9d9d9; }
.fg-k, .bc-k, .bc-kick, .bc-sk, .fg-vl { margin: 0; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-grey); }
.fg-k, .bc-kick, .bc-sk, .fg-vl { color: var(--fg-blue); }

/* square outlined button (Figma "View tab" / "Legend button") */
.fg-btn { display: inline-flex; align-items: center; gap: .6rem; padding: 8px 18px; border: 1px solid var(--fg-ink, #262933);
  border-radius: 0; background: var(--bg); color: var(--fg-ink, #262933); font: inherit; font-size: .875rem;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; line-height: 1.2; }
.fg-btn:hover { background: #eef3ff; text-decoration: none; }
.fg-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fg-btn[aria-expanded="true"] { background: var(--fg-blue, #024fec); color: var(--white); }
.fg-btn.fg-red { border-color: var(--fg-red); color: var(--fg-red); }
.fg-btn.fg-red[aria-expanded="true"] { background: var(--fg-red); color: var(--white); }
.fg-btn[hidden], .bc-folds[hidden] { display: none; }
.bc-pm::before { content: "+"; }
.fg-btn[aria-expanded="true"] .bc-pm::before, .bc-paper[open] > summary .bc-pm::before { content: "−"; }
.bc-pm.bc-go::before { content: none; }

/* heading of the section */
.mc-section .mc-eyebrow { color: var(--fg-blue); font-weight: 400; letter-spacing: .1em; }
.mc-section .mc-sub { font-weight: 400; color: var(--fg-ink); }

/* numbered steps (Figma "Graph steps") */
.fg-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 2rem 0 0; padding: 0; }
.fg-steps li { display: flex; align-items: center; gap: 14px; margin: 0; padding-right: 16px; border: 1px solid var(--fg-ink);
  background: var(--bg); }
.fg-steps li + li { border-left: 0; }
.fg-n { flex: none; display: grid; place-items: center; width: 52px; align-self: stretch; min-height: 56px; background: var(--fg-blue);
  color: var(--white); font-family: var(--font-display); font-size: 1.875rem; }
.fg-steps b { display: block; font-size: .9375rem; color: var(--fg-ink); }
.fg-steps li > span:last-child { font-size: .8125rem; color: var(--fg-grey); line-height: 1.3; padding: .4rem 0; }

/* toolbar (Figma "Graph toolbar"): VIEW + tabs on the left, How to read on the right */
.mc-section .mc-tools { align-items: center; margin: 1rem 0 1.5rem; }
.mc-section .mc-switch { gap: 0; padding: 0; border: 0; border-radius: 0; background: none; align-items: center; }
.mc-section .mc-switch .fg-vl { font-size: .875rem; margin-right: 18px; }
.mc-section .mc-switch button { padding: 8px 18px; border: 1px solid var(--fg-ink); border-radius: 0; background: var(--bg);
  color: var(--fg-ink); font-size: .875rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.mc-section .mc-switch button + button { border-left: 0; }
.mc-section .mc-switch button:hover { background: #eef3ff; }
.mc-section .mc-switch button[aria-pressed="true"] { background: var(--fg-blue); color: var(--white); }
.fg-help { margin-left: auto; }
.fg-help > span { margin-right: .4rem; }

/* the chart in a white panel (Figma "Graph") */
.fg-panel { padding: 24px; border-radius: 16px; background: var(--bg); box-shadow: 0 0 0 1px #ececec; }
.mc-section .mc-name { font-size: .9375rem; }
.mc-section .mc-head, .mc-section .mc-ch { font-weight: 400; color: var(--fg-grey); }
.mc-section .mc-ch { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.mc-section .mc-head .mc-match { color: var(--fg-blue); font-size: .75rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.mc-section .mc-group h3 { color: var(--fg-blue); font-weight: 400; letter-spacing: .1em; text-transform: uppercase; font-size: .75rem; }
.mc-section .mc-bar, .mc-section .mc-pt, .mc-section .mc-tick { border-radius: 0; }
.mc-section .mc-none { border-radius: 0; }
.mc-section .mc-meter { gap: 3px; }
.mc-section .mc-meter i, .fg-pop .mc-meter i, .mc-tipbox .mc-meter i { border-radius: 0 !important; background: var(--fg-empty, #d9d9d9); }
.mc-section .mc-meter.m1 i:nth-child(-n+1), .mc-section .mc-meter.m2 i:nth-child(-n+2), .mc-section .mc-meter.m3 i:nth-child(-n+3),
.mc-section .mc-meter.m4 i, .fg-pop .mc-meter.m1 i:nth-child(-n+1), .fg-pop .mc-meter.m2 i:nth-child(-n+2),
.fg-pop .mc-meter.m3 i:nth-child(-n+3), .fg-pop .mc-meter.m4 i,
.mc-tipbox .mc-meter.m1 i:nth-child(-n+1), .mc-tipbox .mc-meter.m2 i:nth-child(-n+2),
.mc-tipbox .mc-meter.m3 i:nth-child(-n+3), .mc-tipbox .mc-meter.m4 i { background: var(--dark-navy); }
.mc-section .mc-match strong, .mc-section .mc-behind .mc-match strong, .mc-section .mc-ahead .mc-match strong { color: var(--c); }
.mc-section .mc-row:not(.mc-head):not(.mc-group):not(.mc-nom):hover .mc-match { background: #f3ecdf; }
.mc-section .mc-head .mc-match, .mc-section .mc-last .mc-match { border-radius: 0; }
.mc-section .mc-tview { border: 1px solid var(--fg-ink); border-radius: 0; }
.mc-section table.mc-table thead th { background: var(--fg-blue); font-weight: 400; letter-spacing: .1em; }
.mc-section .mc-age, .bcpop .mc-age { border-radius: 0; background: var(--bg); border: 1px solid var(--fg-rule); }

/* takeaway (Figma "Used together note") */
.mc-section .mc-take { display: flex; align-items: center; gap: 18px; margin-top: 16px; padding: 16px 16px 16px 24px; border: 0;
  background: var(--fg-cream); color: var(--fg-ink); font-size: .875rem; }
.mc-take-w { flex: 1; min-width: 0; }
.mc-section .mc-take p { color: var(--fg-grey); }
.mc-section .mc-take p.fg-k { color: var(--fg-blue); }
.mc-section .mc-take p.mc-take-h { margin: .25rem 0 .5rem; font-family: var(--font-display); font-size: 1.5rem; font-weight: 300; color: var(--fg-ink); }
.mc-take .fg-btn { flex: none; }

/* "How to read the chart" popup (Figma "How to read the graph · open") */
.pop.fg-pop { width: min(38rem, calc(100vw - 32px)); max-width: none; max-height: 88vh; overflow: auto; padding: 24px 28px 28px;
  border: 1px solid var(--fg-ink); border-radius: 0; box-shadow: 0 18px 40px rgba(0,0,0,.12), 8px 8px 0 var(--fg-blue); }
.fg-pop > p { max-width: none; font-size: .9375rem; line-height: 1.45; }
.fg-pophead, .bc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.fg-pophead h3 { margin: 0 0 1.25rem; font-family: var(--font-display); font-weight: 300; font-size: 2rem; color: var(--fg-blue); }
.fg-x { flex: none; width: 2.25rem; height: 2.25rem; border: 0; background: none; color: var(--dark-navy); font-size: 1.375rem;
  line-height: 1; cursor: pointer; }
.fg-x:hover { background: #eef3ff; }
.fg-x:focus-visible { outline: 3px solid var(--focus); }
.fg-howsteps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin: .75rem 0 0; padding: 0; }
.fg-howsteps li { counter-increment: s; position: relative; margin: 0; padding-left: 1.5rem; font-size: .8125rem; color: var(--fg-grey); }
.fg-howsteps { counter-reset: s; }
.fg-howsteps li::before { content: counter(s); position: absolute; left: 0; top: -.35rem; font-family: var(--font-display);
  font-size: 1.625rem; color: var(--fg-blue); }
.fg-howsteps b { display: block; font-size: .875rem; color: var(--fg-ink); }
.fg-pop hr { border: 0; border-top: 1px solid var(--cream); margin: 1.5rem 0; }
.fg-lg { margin: 1rem 0 0; }
.fg-lt { margin: 0 0 .5rem; font-size: .8125rem; color: var(--fg-grey); }
.fg-lt span { margin-right: .4rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-blue); }
.fg-sws { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; font-size: .875rem; }
.fg-pop .mc-sw i { border-radius: 0; }
.fg-pop dl { display: grid; gap: 8px; margin: 0; font-size: .875rem; }
.fg-pop .mc-def { grid-template-columns: 130px 1fr; }
.fg-pop .mc-def .mc-samp { border-radius: 0; }
.fg-pop .mc-hg { margin-top: .5rem; }
.fg-pop .mc-hgt { font-weight: 400; color: var(--fg-ink); }

/* the finding card in its popup (Figma "Bottom card · one cause") */
.pop.bcpop { width: min(74rem, calc(100vw - 32px)); max-width: none; max-height: 90vh; overflow: auto; padding: 0; border: 0;
  border-radius: 0; background: none; box-shadow: none; }
.pop.bcpop::backdrop { background: rgba(38, 41, 51, .35); }
.bcpop > .fg-x { position: absolute; top: 28px; right: 32px; z-index: 2; }
.bcpop .fcard.bc { margin: 0 8px 8px 0; padding: 32px 40px 36px; border: 1px solid var(--fg-ink); border-radius: 0; background: var(--bg);
  box-shadow: 8px 8px 0 var(--fg-blue); color: var(--fg-ink); }
.bc p { max-width: none; }
.bc-head { padding-right: 3rem; }
.bc-title { margin: .4rem 0 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.75rem, 3.2vw, 2.375rem);
  line-height: 1.15; color: var(--fg-blue); }
.bc-title .arrow { font-family: var(--font-body); font-size: .85em; }
.bc-figs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
.bc-fig { padding: 0 24px; border-left: 1px solid var(--fg-rule); }
.bc-fig:first-child { padding-left: 0; border-left: 0; }
.bc-fig .bc-k { margin-bottom: 8px; }
.bc-big { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font-family: var(--font-display); font-size: 2.375rem;
  font-weight: 300; line-height: 1.1; color: var(--fg-ink); }
.bc-dir { color: var(--c); }
.bc-dir > span[aria-hidden] { font-family: var(--font-body); font-weight: 700; font-size: .85em; }
.bc-small { font-family: var(--font-body); font-size: .9375rem; color: var(--fg-grey); }
.bc-mean { margin: .4rem 0 0; font-size: .875rem; color: var(--fg-grey); }
.bc-bars { display: inline-flex; gap: 3px; }
.bc-bars i { width: 9px; height: 26px; background: var(--fg-empty); }
.bc-bars.b1 i:nth-child(-n+1), .bc-bars.b2 i:nth-child(-n+2), .bc-bars.b3 i:nth-child(-n+3), .bc-bars.b4 i { background: var(--fg-ink); }
.bc-ages { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin: 24px 0 0; font-size: .875rem; }
.bc-ages .bc-k { margin-right: .5rem; }
.bc-split { margin-top: 24px; }
.bc-bar { display: flex; gap: 3px; margin: 0; }
.bc-seg { flex-basis: 0; min-width: max-content; padding: 6px 6px 6px 10px; background: var(--c); color: var(--white); font-size: .8125rem;
  font-weight: 700; white-space: nowrap; }
.bc-note { margin: 8px 0 0; font-size: .875rem; color: var(--fg-grey); }
.bc-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.bc-secs > .bc-sec { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--fg-rule); }
.bc-secs > .bc-sec[hidden] { display: none; }
.bc-sk { margin-bottom: 14px; }
.bc .rule { margin: 14px 0 0; font-size: .8125rem; color: var(--fg-grey); }
.bc-ladder { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 38px; margin: 0; padding: 0; }
.bc-step { position: relative; flex: 1 1 12rem; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 14px 16px 16px;
  border: 1px solid var(--fg-rule); background: var(--bg); }
.bc-step + .bc-step::before { content: "→"; position: absolute; left: -30px; top: 38%; font-size: 1.625rem; color: var(--fg-blue); }
.bc-step.bc-res { border: 1.5px solid var(--fg-ink); background: var(--fg-cream); }
.bc-step .bc-k { font-size: .75rem; }
.bc-v { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 300; font-size: 2.5rem; line-height: 1; }
.bc-v .bc-bars i { width: 6px; height: 22px; }
.bc-t { font-size: .875rem; line-height: 1.45; }
.bc-up { color: #1b6e3a; } .bc-down { color: var(--fg-red); }
.bc-folds { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }
.bc-fold { margin-top: 16px; }
.bc-fold[hidden] { display: none; }
.bc-grade { padding: 20px 24px 24px; background: var(--fg-cream); }
.bc-scale { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 18px; padding: 0; }
.bc-scale li { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; font-size: .875rem; white-space: pre; }
.bc-scale .bc-bars i { width: 6px; height: 20px; }
.bc-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.bc-rules ul { list-style: none; margin: 0; padding: 0; }
.bc-rules li { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: .875rem; }
.bc-rules b { font-family: var(--font-display); font-weight: 300; font-size: 1.375rem; }
.bc-rh { margin: 0 0 8px; font-weight: 700; font-size: .9375rem; white-space: pre; }
.bc-gnote { margin: 18px 0 0; font-size: .875rem; color: var(--fg-grey); }
.bc-limit { padding: 18px 24px 20px; border-left: 4px solid var(--fg-red); background: var(--fg-red-bg); }
.bc-lh { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.5rem; color: var(--fg-red); }
.bc-limit p:last-child { margin: 0; font-size: .9375rem; line-height: 1.5; }
.bc-papers { display: grid; gap: 12px; }
.bc-paper { display: block; padding: 14px 18px; border: 1px solid var(--fg-ink); background: var(--bg); color: var(--fg-ink);
  box-shadow: 3px 3px 0 rgba(2, 79, 236, .35); text-decoration: none; }
.bc-paper[open] { border: 2px solid var(--fg-blue); box-shadow: 6px 6px 0 var(--fg-blue); }
.bc-paper > summary, a.bc-plink { display: flex; align-items: center; gap: 14px; list-style: none; cursor: pointer; }
.bc-paper > summary::-webkit-details-marker { display: none; }
a.bc-plink:hover, .bc-paper > summary:hover .bc-pt { text-decoration: underline; }
.bc-py { flex: none; font-family: var(--font-display); font-size: 1.375rem; color: var(--fg-blue); }
.bc-pt { flex: 1; min-width: 0; font-size: .9375rem; }
.bc-pn { flex: none; font-size: .875rem; color: var(--fg-grey); }
.bc-paper .quote { margin: 14px 0 12px; padding: 0; border: 0; font-family: var(--font-display); font-size: 1.1875rem; line-height: 1.4;
  color: var(--fg-ink); background: none; font-style: normal; }
.bc-paper .quote::before { content: "“"; } .bc-paper .quote::after { content: "”"; }
.bc-pb { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.bc-secs .go { margin: 14px 0 0; font-size: .875rem; }
.bc-lims { margin: 0; padding: 0; list-style: none; }
.bc-lims li { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.5; }
.bc-lims strong { color: var(--fg-red); }
.bc .lags { margin-left: .5rem; font-size: .9375rem; vertical-align: middle; }

@media (max-width: 760px) {
  .fg-steps { grid-template-columns: 1fr; }
  .fg-steps li + li { border-left: 1px solid var(--fg-ink); border-top: 0; }
  .fg-help { margin-left: 0; }
  .mc-section .mc-take { flex-direction: column; align-items: flex-start; padding: 16px; }
  .fg-howsteps { grid-template-columns: 1fr; gap: 10px; }
  .fg-pop .mc-def { grid-template-columns: 1fr; }
  .bcpop .fcard.bc { padding: 24px 18px 28px; }
  .bcpop > .fg-x { top: 16px; right: 18px; }
  .bc-figs { grid-template-columns: 1fr; gap: 18px; }
  .bc-fig, .bc-fig:first-child { padding: 0; border: 0; }
  .bc-big { font-size: 2rem; }
  .bc-ladder { flex-direction: column; gap: 30px; }
  .bc-step + .bc-step::before { content: "↓"; left: 1rem; top: -30px; }
  .bc-rules, .bc-scale { grid-template-columns: 1fr; }
  .bc-scale li { flex-direction: row; }
  .bc-bar { flex-direction: column; }
  .bc-seg { min-width: 0; white-space: normal; }
  .bc-paper > summary, a.bc-plink { flex-wrap: wrap; gap: 4px 12px; }
  .bc-pt { flex-basis: 100%; order: 3; }
}
.bc-head { display: block; }
.mc-section .mc-head .mc-out { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
/* Q2 Not studied, in the style of the chart section above it: square boxes, ink lines, blue offset shadow */
.fg-ns details.ns > summary { border: 1px solid var(--dark-navy); border-radius: 0; box-shadow: 8px 8px 0 var(--bright-blue); }
.fg-ns .ns-box, .fg-ns .ns-panel, .fg-ns .ns-p { border: 1px solid var(--dark-navy); border-radius: 0; box-shadow: none; }
.fg-ns .ns-pick.on .ns-box { border-color: var(--bright-blue); box-shadow: inset 0 0 0 1px var(--bright-blue); }
.fg-ns .ns-chip, .fg-ns .ns-c, .fg-ns .ns-panel button { border-radius: 0; }
.fg-ns .ns-lab { letter-spacing: .1em; text-transform: uppercase; color: var(--bright-blue); }
.fg-ns .ns-more { border: 1px solid var(--dark-navy); border-radius: 0; background: var(--bg); color: var(--dark-navy); padding: 8px 18px;
  font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 760px) { .bc-step { flex: none; } }
/* toolbar: How to read on the left, VIEW tabs on the right */
.fg-help { margin-left: 0; }
.mc-section .mc-switch { margin-left: auto; }
/* "How certainty is graded" fold-out: the layout of the "How grading works" popup (levels, steps, example) */
.bc-grade > p:first-child { margin: 0 0 .5rem; font-size: .9375rem; }
.bc-scale { grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .5rem 0 1rem; }
.bc-scale li { flex-direction: column; align-items: flex-start; gap: .4rem; padding: .6rem .7rem; border: 1px solid var(--fg-rule);
  background: var(--bg); white-space: normal; }
.bc-scale b { margin-right: .3rem; font-family: var(--font-display); font-weight: 300; font-size: 1.375rem; }
ol.bc-gsteps { counter-reset: g; list-style: none; margin: 0 0 1rem; padding: 0; }
ol.bc-gsteps li { counter-increment: g; position: relative; margin: .65rem 0; padding-left: 2.5rem; font-size: .9375rem; line-height: 1.45; }
ol.bc-gsteps li::before { content: counter(g); position: absolute; left: 0; top: -.05rem; display: grid; place-items: center;
  width: 1.75rem; height: 1.75rem; background: var(--fg-blue); color: var(--white); font-family: var(--font-display); font-size: 1.125rem; }
.bc-ex { margin: 0; padding: .65rem .85rem; border: 1px solid var(--fg-rule); background: var(--bg); font-size: .9375rem; }
.bc-grade .bc-gnote { margin-top: .75rem; }
@media (max-width: 760px) {
  .mc-section .mc-switch { margin-left: 0; }
  .bc-scale { grid-template-columns: repeat(2, 1fr); }
  .bc-scale li { flex-direction: column; }
}
/* Q2 card citations: every quote of a paper in its box, each with how the study tested it */
.bc-q { padding: 4px 0 14px; }
.bc-q + .bc-q { padding-top: 14px; border-top: 1px solid var(--fg-rule); }
.bc-paper .bc-q .quote { margin: 10px 0 8px; }
.bc-how > summary { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .8125rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fg-blue); list-style: none; }
.bc-how > summary::-webkit-details-marker { display: none; }
.bc-how > summary::after { content: "+"; }
.bc-how[open] > summary::after { content: "−"; }
.bc-how dl.camo { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0 0; padding: 12px 14px;
  background: var(--fg-cream); font-size: .875rem; }
.bc-how dl.camo dt { margin: 0; color: var(--fg-grey); }
.bc-how dl.camo dd { margin: 0; }
.bc-how .src { margin: 8px 0 0; font-size: .8125rem; color: var(--fg-grey); }
.bc-paper > .bc-pb { margin-top: 4px; }
@media (max-width: 760px) { .bc-how dl.camo { grid-template-columns: 1fr; } .bc-how dl.camo dd { margin-bottom: 6px; } }
