/* Snowmelt's own research template with the prototypes' additions drawn in the site's vocabulary, loaded after
   research.css: per-run charts in the house chart style, controls set as words like the header links (the current one
   underlined), the README in the transcript panel, next reads in the index's own list. Nothing here restyles the post. */
.doc{--font:"DM Sans",Arial,sans-serif;
  --muted:color-mix(in srgb,var(--ink) 62%,var(--paper));--dim:color-mix(in srgb,var(--ink) 16%,var(--paper));--card:#fff;
  --mono:ui-monospace,SFMono-Regular,Menlo,monospace}
[data-theme=dark] .doc{--card:#171a1d;--dim:color-mix(in srgb,var(--ink) 24%,var(--paper))}
.doc,.doc .essay{font-family:var(--font)}
.doc .essay h1{text-wrap:balance}

/* ---------------------------------------------------------------- controls, as words */
.ctl{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:0 28px;margin:0 0 2px;font-size:.875rem;line-height:1.4}
.ctl [role=group],.tab-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 16px}
.doc .ctl button,.doc .win-tabs button{font:inherit;background:none;border:0;padding:7px 0;color:inherit;opacity:.5;cursor:pointer;
  -webkit-tap-highlight-color:transparent;transition:opacity .15s}
.doc .ctl button:hover,.doc .win-tabs button:hover{opacity:.85}
.doc .ctl button[aria-pressed=true],.doc .win-tabs button[aria-pressed=true]{opacity:1;text-decoration:underline;
  text-decoration-thickness:1px;text-underline-offset:.32em}
.doc .ctl button:focus-visible,.doc .win-tabs button:focus-visible{outline:1px solid currentColor;outline-offset:2px}

/* ---------------------------------------------------------------- per-run strip charts (app.js), drawn like the post's figures */
.plot{position:relative;touch-action:manipulation}
.strip{display:block;overflow:visible;font-family:var(--font);font-variant-numeric:tabular-nums;user-select:none;-webkit-user-select:none}
.strip .grid{stroke:currentColor;stroke-opacity:.12;stroke-width:1}
.strip .zero{stroke:currentColor;stroke-opacity:.6;stroke-width:1.5}
.strip .tick,.strip .axt{fill:currentColor;fill-opacity:.72;font-size:12px}
.strip .rlab,.strip .val{fill:currentColor;font-size:13px}
.strip .ptitle{fill:currentColor;fill-opacity:.72;font-size:13px}
.strip .rlab,.strip .ptitle{paint-order:stroke;stroke:var(--paper);stroke-width:4px;stroke-linejoin:round}
.strip .val{transition:transform .25s cubic-bezier(.2,.75,.2,1),fill .15s}
.strip.focused .val{fill:var(--fig-1)}
.strip .dot{fill:var(--fig-1);stroke:var(--paper);stroke-width:1.2;transition:transform .25s cubic-bezier(.2,.75,.2,1),fill .15s}
.strip .dot.dim{fill:var(--dim)}
.strip .dot.hot{stroke:var(--ink);stroke-width:1.6}
.strip .mean,.strip .fmean{transition:transform .25s cubic-bezier(.2,.75,.2,1),opacity .15s}
.strip .mean line{stroke:var(--ink);stroke-width:2.6;stroke-linecap:round}
.strip .fmean line{stroke:var(--fig-1);stroke-width:2.6;stroke-linecap:round}
.strip .fmean{opacity:0}
.strip.focused .fmean{opacity:1}
.strip.focused .mean{opacity:.25}
.strip.noanim *{transition:none!important}
@media(prefers-reduced-motion:reduce){.strip *{transition:none!important}}
.tip{position:absolute;left:0;top:0;z-index:3;pointer-events:none;width:max-content;max-width:min(300px,82vw);padding:6px 9px;
  border:1px solid var(--line);border-radius:4px;background:var(--card);box-shadow:0 6px 18px rgb(0 0 0/.08);font-size:13px;
  line-height:1.4;color:var(--muted);transform:translate(-50%,calc(-100% - 12px));opacity:0;transition:opacity .12s}
.tip.on{opacity:1}
.tip b{display:block;font-weight:500;color:var(--ink)}

/* ---------------------------------------------------------------- the README, in the transcript panel */
.readme .win-tabs{display:grid;gap:0;margin:-.15rem .15rem .55rem;font-size:.875rem;line-height:1.4}
.readme .grp{font-size:.72rem;opacity:.6;min-width:6.4rem}
.doc .essay .readme .tx-box pre{background:none;padding:0;margin:0;font-family:var(--mono);font-size:.78em;line-height:1.62;white-space:pre-wrap;overflow-wrap:anywhere}
.doc .essay .readme pre.k{opacity:.55}
.readme pre mark{color:inherit;background:color-mix(in srgb,var(--fig-1) 22%,transparent);border-radius:2px}
.readme pre del{text-decoration:line-through;text-decoration-thickness:1px;opacity:.5}
.readme pre del+mark{margin-left:.45em}
.v-stack{position:relative;overflow:hidden}
.readme .v-stack{margin-top:1.15em}
.v-stack pre{position:absolute;inset:0 0 auto 0;visibility:hidden}
.v-stack pre.on{position:relative;visibility:visible}
@media(max-width:560px){
  .readme .grp{min-width:0;flex-basis:100%;padding-top:.45rem}
  .readme .tab-row{column-gap:14px}
  .doc .readme .win-tabs button{padding:4px 0}
}

/* ---------------------------------------------------------------- one picture in two states, flipped in place */
.doc .pane{display:none}
.doc .pane.on{display:block}

/* ---------------------------------------------------------------- two runs' final messages side by side, where there's room */
@media(min-width:720px){
  .doc .tx-vs .tx-panel{display:grid;grid-template-columns:1fr 1fr;column-gap:.6rem}
  .doc .tx-vs .tx-box{grid-column:1/-1}
  .doc .tx-vs .tx-box.vs-a{grid-column:1}
  .doc .tx-vs .tx-box.vs-b{grid-column:2;margin-top:.6rem}
}

/* ---------------------------------------------------------------- the study map, in place of the table of arms: a tree with
   the batches as boxes and the questions that led to them on its branches */
.smap-fig{--smap-line:color-mix(in srgb,var(--ink) 34%,var(--paper))}
.doc .essay .smap,.doc .essay .smap ol,.doc .essay .smap ul{list-style:none;margin:0;padding:0}
.doc .essay .smap li{margin:0;padding:0;font-family:var(--font);font-size:.875rem;line-height:1.45}
.doc .essay .smap ol{margin-left:1.05rem}
.doc .essay .smap ol>li{position:relative;padding:.3rem 0 .15rem 1.45rem}
.smap ol>li::before{content:"";position:absolute;left:0;top:0;bottom:0;border-left:1px solid var(--smap-line)}
.smap ol>li:last-child::before{bottom:auto;height:calc(1rem - 2px)}
.smap ol>li::after{content:"";position:absolute;left:0;top:calc(1rem - 2px);width:1.05rem;border-top:1px solid var(--smap-line)}
.smap .arw{position:absolute;left:1.02rem;top:calc(1rem - 5.5px);border-left:6px solid var(--smap-line);
  border-top:4px solid transparent;border-bottom:4px solid transparent}
.doc .essay .smap a.q{color:inherit;text-decoration:none}
.doc .essay .smap a.q:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.25em}
.doc .essay .smap a.q:focus-visible{outline:1px solid currentColor;outline-offset:2px}
.smap .node{margin:.35rem 0 0;padding:.55rem .8rem .6rem;border:1px solid var(--line);border-radius:8px;background:var(--paper)}
.smap .node.reread{border-style:dashed;background:none}
.smap .nh{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:.6rem}
.smap .nh b{font-weight:500}
.smap .nm,.smap .k,.smap .n{color:var(--muted)}
.doc .essay .smap .conds{display:flex;flex-wrap:wrap;column-gap:1.15rem;row-gap:.1rem;margin-top:.3rem}
.smap .n{margin-left:.4rem;font-variant-numeric:tabular-nums}
.doc .essay .smap-fig figcaption{margin-top:1.1rem}

/* ---------------------------------------------------------------- guesses and scores drawn together: the guess an open ring */
.strip .dot.g{fill:none;stroke:var(--fig-1);stroke-width:1.5}
.strip .dot.g.dim{fill:none;stroke:var(--dim)}
.strip .dot.g.hot{stroke:var(--ink);stroke-width:2}
.strip:not(.pair) .dot.g{visibility:hidden}
/* each row's means with both drawn: a bar from the mean score (a filled dot) to the mean guess (an open ring), the gap,
   over the runs, which step back; the picked model's bar in its colour over everyone's, faded */
.strip.pair .dot{opacity:.45}
.strip.pair.focused .dot:not(.dim),.strip.pair .dot.hot{opacity:1}
.strip.pair .mean,.strip.pair .fmean,.strip:not(.pair):not(.gapv) .db,.strip:not(.pair) .dblab,
.strip:not(.pair) .db .dh,.strip:not(.pair) .db .dg{visibility:hidden}
/* guess minus actual: the same bar from zero to the mean, quieter, under the tick */
.strip.gapv .db .gapbar{fill-opacity:.2}
.strip.gapv .db.f .gapbar{fill-opacity:.4}
.strip .db{transition:opacity .15s}
.strip .db>*,.strip .dblab{transition:transform .25s cubic-bezier(.2,.75,.2,1)}
.strip .db .gapbar{fill:var(--ink);fill-opacity:.42}
.strip .db .dh{fill:var(--ink);stroke:var(--paper);stroke-width:1.5}
.strip .db .dg{fill:var(--paper);stroke:var(--ink);stroke-width:2}
.strip .db.f{opacity:0}
.strip .db.f .gapbar{fill:var(--fig-1);fill-opacity:.6}
.strip .db.f .dh{fill:var(--fig-1)}
.strip .db.f .dg{stroke:var(--fig-1)}
.strip.focused .db.f{opacity:1}
.strip.focused .db:not(.f){opacity:.22}
.strip .dblab{fill:currentColor;fill-opacity:.8;font-size:12px;paint-order:stroke;stroke:var(--paper);stroke-width:4px;
  stroke-linejoin:round}

/* ---------------------------------------------------------------- the README each arm got, folded beside the study map */
.doc .essay .readme-fold{margin:-.6rem 0 2rem}
.doc .essay .more-fold{margin:-.4rem 0 1.6rem}
.doc .essay :is(.readme-fold,.more-fold)>summary{width:max-content;cursor:pointer;font-family:var(--font);font-size:.875rem;
  color:var(--muted);padding:.25rem 0}
.doc .essay :is(.readme-fold,.more-fold)>summary:hover{color:var(--ink)}
.doc .essay :is(.readme-fold,.more-fold)>summary:focus-visible{outline:1px solid currentColor;outline-offset:2px}
.doc .essay :is(.readme-fold,.more-fold)[open]>summary{color:var(--ink)}
/* an open "More detail" is a card of its own so it reads as set apart from the text around it: the page's card and line
   colours, a little smaller type, and as much wider than the column as its padding, so the words keep the column's edge.
   Its top and bottom room is the first and last paragraph's margin, not padding: the fold's script animates this box's
   height to 0 and padding would be left standing at the end of a close. The line is an inset shadow for the same reason,
   and the gap under the summary is the summary's own padding (shut or open), not a margin that would pop in and out. */
.doc .essay .more-fold{margin-bottom:1.25rem}
.doc .essay .more-fold>summary{padding-bottom:.6rem}
.doc .essay .more-fold .fold-body{margin:0 -1.15rem;padding:0 1.15rem;background:var(--card);border-radius:8px;
  box-shadow:inset 0 0 0 1px var(--line)}
/* the site sets a paragraph's size on the paragraph (manifesto.css), so the card's is that same clamp, a notch smaller */
.doc .essay .more-fold .fold-body>p{font-size:calc(clamp(1.0625rem,1.3vw,1.1875rem)*.93);line-height:1.68;margin-bottom:1.05rem}
.doc .essay .more-fold .fold-body>:first-child{margin-top:1.1rem}
.doc .essay .more-fold .fold-body>:last-child{margin-bottom:1.1rem}
@media(max-width:560px){.doc .essay .more-fold .fold-body{margin-inline:-.8rem;padding-inline:.8rem}}
.fold-body{overflow:hidden}
.doc .essay .readme-fold .fold-body>.tx-fig{margin:.4rem 0 0}
.doc .essay .readme-fold .tx-fig{margin:0}

/* ---------------------------------------------------------------- two runs, drawn: one guess beside one score, before any chart */
.doc .essay .runs-fig{margin:2.2rem 0}
.runs{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
@media(max-width:620px){.runs{grid-template-columns:1fr}}
.run{display:flex;flex-direction:column;padding:.75rem .9rem .3rem;border:1px solid var(--line);border-radius:6px;background:var(--card);font-family:var(--font);
  font-size:.875rem;line-height:1.45}
.run-h{display:flex;align-items:baseline;justify-content:space-between;gap:.6rem;margin-bottom:.6rem}
.run-h b{font-weight:500}
.run-h .gap{font-weight:500;font-variant-numeric:tabular-nums;color:var(--fig-1)}
.doc .essay .run p{margin:0;font-family:var(--font);font-size:inherit;line-height:inherit}
.doc .essay .run .says{margin:0 0 .65rem;padding-left:.65rem;border-left:2px solid var(--line);font-family:var(--mono);
  font-size:.76rem;line-height:1.6}
.doc .essay .run .says code{font:inherit;background:none;padding:0}
.run .says mark{display:inline;padding:0 .1em;border-radius:2px;color:inherit;background:color-mix(in srgb,var(--fig-1) 20%,transparent)}
.doc .essay .run .played{margin-bottom:2.3rem;color:var(--muted)}
.scale{position:relative;height:1px;margin:auto .35rem 2.4rem;font-variant-numeric:tabular-nums}
.sc-line{position:absolute;left:0;right:0;top:0;border-top:1px solid color-mix(in srgb,var(--ink) 34%,var(--paper))}
.sc-gap{position:absolute;top:-2px;height:5px;background:color-mix(in srgb,var(--fig-1) 40%,transparent)}
.sc-dot{position:absolute;top:0;width:11px;height:11px;border-radius:50%;transform:translate(-50%,-50%);box-sizing:border-box}
.sc-dot.h{background:var(--fig-1)}
.sc-dot.g{border:1.5px solid var(--fig-1);background:var(--card)}
.sc-lab{position:absolute;white-space:nowrap;transform:translateX(-50%);font-size:.8rem}
.sc-lab.up{bottom:10px}
.sc-lab.dn{top:10px}
.sc-lab.l{transform:translateX(-6px)}
.sc-lab.r{transform:translateX(calc(-100% + 6px))}
.sc-end{position:absolute;top:-1.55rem;transform:translateX(-50%);font-size:.72rem;color:var(--muted)}

/* ---------------------------------------------------------------- next reads, in the index's list without the summaries */
.doc .more{margin-top:4.5rem}
.doc .essay .more h2{margin:0 0 .25rem}
.doc .more .post-summary{display:none}
@media(min-width:561px){.doc .more .posts a{grid-template-columns:9.5rem 1fr}}

/* ---------------------------------------------------------------- one run, read five ways: each reading's guess on the
   same 0 to 1 scale, with the player's score as one line down every row */
.doc .essay .reads-fig{margin:2.2rem 0}
.run.reads{padding-bottom:.5rem}
.doc .essay ol.rd{list-style:none;margin:.1rem 0 0;padding:0}
.doc .essay ol.rd>li{display:grid;grid-template-columns:minmax(7.5rem,13rem) 1fr;column-gap:1rem;margin:0;padding:0;
  min-height:2.4rem;font-family:var(--font);font-size:.875rem;line-height:1.3}
.rd-l{align-self:center;color:var(--muted);padding:.2rem 0}
.rd-s{position:relative;margin:0 .35rem}
.rd-s .sc-line{top:50%}
.rd-s .sc-gap{top:calc(50% - 2px)}
.rd-s .sc-dot{top:50%}
.rd-s::after{content:"";position:absolute;left:var(--h);top:0;bottom:0;border-left:1.5px solid var(--fig-1);transform:translateX(-.75px)}
.rd-v{position:absolute;top:50%;transform:translate(9px,-50%);padding:0 .25rem;background:var(--card);font-size:.78rem;
  line-height:1.2;font-variant-numeric:tabular-nums}
.doc .essay ol.rd>li.rd-ax{min-height:1.7rem}
.rd-ax .rd-s::after{bottom:auto;height:.3rem}
.rd-ax .sc-end{top:.4rem}
.rd-h{position:absolute;top:.4rem;transform:translateX(-50%);white-space:nowrap;font-size:.78rem;color:var(--fig-1);
  font-variant-numeric:tabular-nums}
@media(max-width:560px){
  .doc .essay ol.rd>li{grid-template-columns:7rem 1fr;column-gap:.6rem;font-size:.8rem}
}
