/* Lab sheet, the event2vec.com template: a left-aligned reading column with a margin rail for notes;
   figures break out to the full sheet width under a heavy rule. Every interval is drawn the way the
   logo is: solid = belief (what the evidence guarantees), outlined = plausibility (what it allows). */
:root {
  --paper: #ffffff;
  --ink: #15181d;
  --ink-2: #3c434f;
  --muted: #687180;
  --rule: #dde1e6;
  --tint: #f4f6f8;
  --blue: #2a7bcf;
  --red: #d6453a;
  --yellow: #f0be2c;
  --yellow-ink: #8c6a00;
  --green: #3a9b5c;
  --flame: #e5482b;

  /* the three classes (or fixes) of every figure, and ignorance */
  --c0: var(--blue);
  --c1: var(--yellow);
  --c2: var(--green);
  --theta: #c9ced6;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --sheet: 1120px;
  --col: 680px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101317; --ink: #e8ebef; --ink-2: #c2c8d1; --muted: #8b94a2; --rule: #272c34; --tint: #171b21;
    --blue: #5ea6ee; --red: #f06a5d; --yellow: #f3c94a; --yellow-ink: #f3c94a; --green: #5cc282; --flame: #ff7a55;
    --theta: #3a414b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101317; --ink: #e8ebef; --ink-2: #c2c8d1; --muted: #8b94a2; --rule: #272c34; --tint: #171b21;
  --blue: #5ea6ee; --red: #f06a5d; --yellow: #f3c94a; --yellow-ink: #f3c94a; --green: #5cc282; --flame: #ff7a55;
  --theta: #3a414b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--text); font-size: 17px; line-height: 1.6; font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
code, pre, kbd { font-family: var(--mono); }
p code, li code, td code, dd code { font-size: .86em; background: var(--tint); padding: 1px 4px; }
::selection { background: var(--yellow); color: #15181d; }

.sheet { max-width: var(--sheet); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding-block: 18px; border-bottom: 1px solid var(--ink); }
.mark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 18px; font-variation-settings: "wdth" 125; letter-spacing: -0.01em; }
.mark svg { width: 20px; height: 20px; display: block; }
.top nav { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: 14px; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- reading layout ---------- */
.row { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); gap: 0 48px; }
.row > * { min-width: 0; }
.row .note { font-size: 13.5px; line-height: 1.5; color: var(--muted); padding-top: 8px; }
.row .note b { color: var(--ink-2); font-weight: 600; }
.row .note p { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }
@media (max-width: 900px) { .row { grid-template-columns: minmax(0, 1fr); } .row .note { padding-top: 0; margin-bottom: 12px; } }

section { padding-block: 60px 8px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(52px, 10vw, 112px); line-height: .9; font-weight: 700; font-variation-settings: "wdth" 125; letter-spacing: -0.04em; }
h1 b { color: var(--flame); font-weight: 700; }
h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.1; font-weight: 650; font-variation-settings: "wdth" 112; letter-spacing: -0.015em; margin-bottom: 16px; }
h3 { font-size: 18px; line-height: 1.25; font-weight: 650; font-variation-settings: "wdth" 105; margin: 26px 0 6px; }
p { margin: 0 0 16px; color: var(--ink-2); text-wrap: pretty; }
p strong { color: var(--ink); font-weight: 650; }

/* ---------- intro ---------- */
.intro { padding-block: 40px 20px; }
.intro .dek { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.45; color: var(--ink); max-width: 34ch; margin: 22px 0 26px; }
.intro .row { align-items: start; }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.pip { display: inline-flex; align-items: stretch; border: 1px solid var(--ink); font-family: var(--mono); font-size: 15px; max-width: 100%; }
.pip code { padding: 9px 14px; white-space: nowrap; overflow-x: auto; font-size: 15px; }
.pip code::before { content: "$ "; color: var(--muted); }
.pip button, .copy { appearance: none; border: 0; border-left: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 13px var(--mono); padding: 0 14px; cursor: pointer; }
.copy { padding: 8px 14px; }
.pip button:hover, .copy:hover { background: var(--blue); }
.facts { font-size: 14px; color: var(--muted); margin: 0; }
.facts a { color: var(--ink-2); }

/* the logo in the margin */
.flame { width: 96px; height: auto; display: block; overflow: visible; margin: 2px 0 10px; }
.flame .outer { fill: var(--flame); fill-opacity: .1; stroke: var(--flame); stroke-width: 7; stroke-linejoin: round; }
.flame .inner { transform-origin: 100px 178px; animation: breathe 5.5s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.9, .86); } }
@media (prefers-reduced-motion: reduce) { .flame .inner { animation: none; } }

/* ---------- figures ---------- */
figure { margin: 0; }
.fig { margin-block: 30px 10px; border-top: 2px solid var(--ink); padding-top: 12px; }
.fig-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.fig-no { font-family: var(--display); font-weight: 700; font-size: 15px; font-variation-settings: "wdth" 115; color: var(--ink); }
.fig-no span { font-weight: 500; color: var(--ink-2); margin-left: 8px; font-variation-settings: "wdth" 100; }
figcaption.cap { font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 18px; max-width: 900px; }
figcaption.cap b { color: var(--ink); font-weight: 650; }
.fgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 28px 40px; align-items: start; }
@media (max-width: 900px) { .fgrid { grid-template-columns: minmax(0, 1fr); } }
.fgrid > * { min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--ink); flex-wrap: wrap; }
.seg button { appearance: none; border: 0; background: transparent; color: var(--ink); font: 500 12.5px var(--text); padding: 6px 11px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn { appearance: none; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font: 500 12.5px var(--text); padding: 6px 11px; cursor: pointer; }
.btn:hover { background: var(--ink); color: var(--paper); }
.label, .ttl { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ttl { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
* + .ttl { margin-top: 24px; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

.readout { display: flex; flex-wrap: wrap; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); margin: 16px 0; }
.readout > div { flex: 1 1 110px; padding: 8px 12px 9px 0; display: flex; flex-direction: column; gap: 2px; }
.readout > div + div { padding-left: 12px; border-left: 1px solid var(--rule); }
.readout .k { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.readout .v { font-family: var(--display); font-weight: 650; font-size: 20px; font-variation-settings: "wdth" 112; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.readout .v.live { color: var(--red); }

.ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.ctl label { display: inline-flex; align-items: center; gap: 8px; }
.ctl output { font-family: var(--mono); font-size: 12.5px; color: var(--ink); min-width: 3.4em; font-variant-numeric: tabular-nums; }
input[type="range"] { accent-color: var(--ink); width: 140px; }

/* class swatches & subset fills (a pair is drawn in stripes of both classes) */
.c0 { color: var(--blue); } .c1 { color: var(--yellow-ink); } .c2 { color: var(--green); }
.f0 { background: repeating-linear-gradient(45deg, var(--ink) 0 2px, transparent 2px 5px); }
.f1 { background: var(--c0); } .f2 { background: var(--c1); } .f4 { background: var(--c2); }
.f3 { background: repeating-linear-gradient(135deg, var(--c0) 0 5px, var(--c1) 5px 10px); }
.f5 { background: repeating-linear-gradient(135deg, var(--c0) 0 5px, var(--c2) 5px 10px); }
.f6 { background: repeating-linear-gradient(135deg, var(--c1) 0 5px, var(--c2) 5px 10px); }
.f7 { background: var(--theta); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 8px; display: inline-block; }

/* at least / at most bars */
.ivals { display: grid; gap: 10px; }
.ival { display: grid; grid-template-columns: 5.6rem 1fr 6.6rem; gap: 12px; align-items: center; font-size: 14px; }
.ival .name { font-weight: 650; }
.ival .track { position: relative; height: 14px; background: var(--tint); }
.ival .track.c1 { color: var(--yellow); }
.ival .pl, .ival .bel { position: absolute; top: 0; bottom: 0; left: 0; transition: width .12s ease-out; }
.ival .pl { border: 1.5px solid currentColor; background: color-mix(in srgb, currentColor 16%, transparent); }
.ival .bel { background: currentColor; }
.ival .nums { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ival .nums b { color: var(--ink); font-weight: 500; }
.ival .name { white-space: nowrap; }
.axis { display: grid; grid-template-columns: 5.6rem 1fr 6.6rem; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; }
.axis div { display: flex; justify-content: space-between; }

.explain { margin: 16px 0 0; padding: 10px 14px; border-left: 2px solid var(--ink); background: var(--tint); font-size: 14.5px; color: var(--ink-2); max-width: none; }
.explain b { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); }

.decision { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--ink); }
.decision .k { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.decision .v { font-family: var(--display); font-size: clamp(24px, 3vw, 32px); line-height: 1.05; font-weight: 700; font-variation-settings: "wdth" 115; letter-spacing: -0.02em; }
.decision .v.bad::before { content: "⚠ "; }

/* plain controls */
.ask { font-size: 15px; color: var(--ink-2); margin: 0 0 8px; }
.ask b { color: var(--ink); }
* + .ask { margin-top: 18px; }
.big-slider { display: flex; align-items: center; gap: 16px; }
.big-slider input[type="range"] { flex: 1; max-width: 320px; width: auto; }
.big-slider output { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; font-variation-settings: "wdth" 115; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; min-width: 3ch; }
.sentence { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--ink); font-size: 17px; line-height: 1.5; color: var(--ink); max-width: none; }

.cams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
@media (max-width: 760px) { .cams { grid-template-columns: minmax(0, 1fr); } }
.cam { min-width: 0; }
.small-slider { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.small-slider input[type="range"] { flex: 1; width: auto; max-width: 200px; }
.small-slider output { font-family: var(--mono); font-size: 13px; color: var(--ink); min-width: 3.4em; }
.clash-v { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; font-variation-settings: "wdth" 115; letter-spacing: -0.03em; color: var(--red); font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; margin-top: 18px; }
@media (max-width: 960px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { min-width: 0; border-top: 1px solid var(--ink); padding-top: 10px; display: flex; flex-direction: column; }
.card h4 { margin: 0 0 4px; font-family: var(--display); font-size: 18px; font-weight: 650; font-variation-settings: "wdth" 105; }
.card p { font-size: 14px; line-height: 1.45; color: var(--muted); margin: 0 0 14px; min-height: 3em; }
.card .ivals { gap: 8px; }
.card .ival { grid-template-columns: 3.6rem 1fr 5.8rem; gap: 10px; font-size: 13.5px; }
.card .ans { margin-top: auto; padding-top: 12px; display: flex; align-items: baseline; gap: 10px; }
.card .ans .k { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.card .ans .v { font-family: var(--display); font-size: 26px; font-weight: 700; font-variation-settings: "wdth" 115; letter-spacing: -0.02em; }

ol.steps { margin: 0 0 16px; padding-left: 1.4em; color: var(--ink-2); }
ol.steps li { margin: 6px 0; padding-left: 4px; }
ol.steps b { color: var(--ink); font-weight: 650; }

/* a recorded conversation */
.chat { max-height: 540px; overflow-y: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overscroll-behavior: contain; }
.chat .round { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 12px 0 4px; }
.msg { padding: 9px 2px 10px; border-bottom: 1px solid var(--rule); }
.msg .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.msg .head b { font-weight: 650; }
.msg .head small { font-size: 12.5px; color: var(--muted); }
.msg p { margin: 2px 0 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: none; }
.msg.muted { opacity: .45; }
.msg .mute { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.comp { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--red); padding: 1px 5px; }
.probe { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.probe .stack { display: flex; height: 6px; background: var(--tint); }
.probe small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.probe small b { font-weight: 600; }
.trust { display: grid; gap: 8px; }
.trow { display: grid; grid-template-columns: 9.6rem 1fr 3rem; gap: 12px; align-items: center; font-size: 14px; }
.trow .bar { position: relative; height: 12px; background: var(--tint); }
.trow .bar i { display: block; height: 100%; background: var(--ink); transition: width .3s ease-out; }
.trow .bar .thr { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }
.trow.low .bar i { background: var(--red); }
.trow.low .num { color: var(--red); }
.trow.off .bar i { background: var(--theta); }
.trow .num { text-align: right; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
details.secret { margin-top: 14px; font-size: 14px; }
details.secret summary { font-family: var(--mono); font-size: 12px; color: var(--muted); cursor: pointer; }
details.secret p { margin: 8px 0 0; font-style: italic; }

/* tracking */
.tracks { display: flex; gap: 10px; flex-wrap: wrap; }
.trackbtn {
  appearance: none; display: flex; gap: 10px; align-items: center; padding: 4px 12px 4px 4px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink); font: 500 13px var(--text); text-align: left;
}
.trackbtn img { width: 44px; height: 44px; object-fit: cover; display: block; }
.trackbtn small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 400; }
.trackbtn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.trackbtn[aria-pressed="true"] small { color: var(--rule); }
svg.timeline { width: 100%; height: auto; display: block; margin-top: 18px; touch-action: pan-y; }
.timeline .lane-label { font-family: var(--text); font-size: 14px; fill: var(--ink-2); }
.timeline .lane-label.k { fill: var(--ink); font-weight: 650; }
.timeline .axis-t { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.timeline .bg { fill: var(--tint); }
.timeline .cur { stroke: var(--ink); stroke-width: 1; }
.timeline .s0 { fill: var(--c0); } .timeline .s1 { fill: var(--c1); } .timeline .s2 { fill: var(--c2); }
.timeline .sq { fill: var(--theta); }
.timeline .p0 { fill: var(--c0); fill-opacity: .18; stroke: var(--c0); stroke-width: 1; }
.timeline .p1 { fill: var(--c1); fill-opacity: .2; stroke: var(--c1); stroke-width: 1; }
.timeline .p2 { fill: var(--c2); fill-opacity: .18; stroke: var(--c2); stroke-width: 1; }
.trk-read { font-family: var(--mono); font-size: 12.5px; color: var(--muted); min-height: 1.6em; margin-top: 8px; }
.trk-read b { color: var(--ink); font-weight: 600; }
.clip { width: 100%; height: auto; display: block; background: #111; }

/* tables */
.tbl { overflow-x: auto; margin-block: 6px 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 600; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--ink); }
td.fn { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* code */
.code { border: 1px solid var(--ink); margin-block: 10px 20px; }
.code-bar { display: flex; justify-content: space-between; align-items: stretch; border-bottom: 1px solid var(--ink); flex-wrap: wrap; }
.code-bar .label { padding: 8px 12px; }
.code-bar .seg { border: 0; }
.code-bar .seg button { border-right: 1px solid var(--ink); padding: 8px 12px; }
.code-bar .seg button + button { border-left: 0; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.65; color: var(--ink-2); background: var(--tint); }
.tok-kw { color: var(--blue); } .tok-str { color: var(--green); } .tok-num { color: var(--yellow-ink); } .tok-com { color: var(--muted); }

dl.qa { margin: 0; }
dl.qa dt { font-weight: 650; color: var(--ink); margin-top: 18px; font-variation-settings: "wdth" 105; }
dl.qa dd { margin: 4px 0 0; color: var(--ink-2); }

.foot { margin-top: 72px; border-top: 1px solid var(--ink); padding-block: 18px 40px; display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--ink-2); }

@media (max-width: 560px) {
  .ival, .axis { grid-template-columns: 5rem 1fr 5.8rem; gap: 8px; }
  .trow { grid-template-columns: 7.6rem 1fr 2.6rem; gap: 8px; }
}
