/* Figure 1. Wigner's friend: one sealed laboratory, shown twice. Every class is prefixed wf1-.
   Colours with a meaning: cyan = what is held (values that add, the computed read); magenta = a posting (on the record);
   ink = counts and the measured value. The page's tokens (--wf-*) are read with fallbacks; the figure's own are --k-*. */
.wf1 {
  --k-paper: var(--wf-paper, #faf8f3); --k-ink: var(--wf-ink, #1d1d1b); --k-body: var(--wf-body, #2a2926); --k-soft: var(--wf-soft, #3c3a36);
  --k-hair: var(--wf-hair, #8a8a8a); --k-rule: var(--wf-rule, color-mix(in srgb, var(--k-ink) 16%, var(--k-paper)));
  --k-tint: var(--wf-tint, color-mix(in srgb, var(--k-ink) 5%, var(--k-paper)));
  --k-c: var(--wf-cyan, #009fe3); --k-m: var(--wf-magenta, #e6007e); --k-c-text: var(--wf-cyan-text, #0072b5); --k-m-text: var(--wf-magenta-text, #c4006b);
  --k-text: var(--wf-text, "InterVariable", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif);
  --k-display: var(--wf-display, "Inter Display", "InterVariable", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif);
  --k-mono: var(--wf-mono, "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace);
  container-type: inline-size;
  margin: 0; padding: clamp(.9rem, 1.8vw, 1.25rem); background: var(--k-paper); color: var(--k-body);
  border: 1px solid var(--k-ink); font-family: var(--k-text); font-weight: 420; line-height: 1.42;
  font-optical-sizing: auto; box-sizing: border-box; position: relative;
}
@media screen and (prefers-color-scheme: dark) {
  .wf1 { --k-paper: var(--wf-paper, #141413); --k-ink: var(--wf-ink, #faf8f3); --k-body: var(--wf-body, #e9e6df); --k-soft: var(--wf-soft, #c9c5bc);
    --k-c: var(--wf-cyan, #2bb3f0); --k-m: var(--wf-magenta, #ff3d9e); --k-c-text: var(--wf-cyan-text, #2bb3f0); --k-m-text: var(--wf-magenta-text, #ff6fb6);
    --k-tint: var(--wf-tint, color-mix(in srgb, var(--k-ink) 7%, var(--k-paper))); }
}
.wf1 *, .wf1 *::before, .wf1 *::after { box-sizing: border-box; }
.wf1-label { margin: 0; font: 700 .7rem/1.3 var(--k-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--k-soft); }
.wf1-gk { font-style: normal; text-transform: none; letter-spacing: 0; }
.wf1-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: center;
  padding-bottom: .7rem; margin-bottom: .9rem; border-bottom: 1px solid var(--k-rule); }
.wf1-live { color: var(--k-ink); display: flex; align-items: center; gap: .7rem; }
.wf1-live::before { content: ""; display: inline-block; width: .5rem; height: .5rem; background: var(--k-c); margin-right: -.25rem; }
.wf1-play { font: 700 .66rem/1 var(--k-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--k-ink);
  background: transparent; border: 1px solid var(--k-ink); padding: .42rem .6rem; min-height: 28px; cursor: pointer; }
.wf1-play:hover { background: var(--k-tint); }

.wf1-labs { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@container (min-width: 740px) { .wf1-labs { grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.4vw, 1.75rem); } }
.wf1-lab { min-width: 0; }
.wf1-labhead { display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem; min-height: 32px; }
.wf1-swl { font: 700 .78rem/1.25 var(--k-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--k-ink); }
.wf1-switch { display: inline-flex; align-items: center; gap: .45rem; background: transparent; border: 0; padding: 4px 0; cursor: pointer; color: var(--k-ink); min-height: 32px; }
.wf1-track { position: relative; width: 44px; height: 22px; border: 1.5px solid var(--k-ink); background: var(--k-paper); flex: none; }
.wf1-knob { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; background: var(--k-ink); transition: left .15s; }
.wf1-switch[aria-checked="true"] .wf1-track { background: var(--k-m); border-color: var(--k-m); }
.wf1-switch[aria-checked="true"] .wf1-knob { left: 24px; background: var(--k-paper); }
.wf1-onoff { font: 700 .72rem/1 var(--k-mono); letter-spacing: .12em; text-transform: uppercase; width: 2.4em; text-align: left; color: var(--k-ink); }
.wf1-switch:focus-visible { outline: 3px solid var(--k-c-text); outline-offset: 3px; }
.wf1-play:focus-visible { outline: 3px solid var(--k-c-text); outline-offset: 3px; }

.wf1-draw { display: block; width: 100%; overflow: visible; }
.wf1-draw text { font-family: var(--k-mono); fill: var(--k-soft); paint-order: stroke; stroke: var(--k-paper); stroke-width: 3px; stroke-linejoin: round; }
.wf1-draw .cap { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; fill: var(--k-ink); }
.wf1-draw .small { font-size: 10px; letter-spacing: .04em; }
.wf1-draw .out-t { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; fill: var(--k-ink); }
.wf1-draw .post-t { fill: var(--k-m-text); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 9px; }
.wf1-draw .tally { font-size: 11px; font-weight: 700; fill: var(--k-m-text); font-variant-numeric: tabular-nums; }
.wf1-draw .box { fill: none; stroke: var(--k-ink); stroke-width: 2; }
.wf1-draw .path { fill: none; stroke: var(--k-c); stroke-width: 1.6; }
.wf1-draw .photon { fill: var(--k-c); }
.wf1-draw .contact { fill: var(--k-paper); stroke: var(--k-ink); stroke-width: 1.4; }
.wf1-draw .split { fill: var(--k-paper); stroke: var(--k-c); stroke-width: 1.4; }
.wf1-draw .link { stroke: var(--k-ink); stroke-width: 1.1; }
.wf1-draw .reg { fill: var(--k-paper); stroke: var(--k-c); stroke-width: 1.6; }
.wf1-draw .regmid { stroke: var(--k-c); stroke-width: 1; }
.wf1-draw .post { fill: none; stroke: var(--k-m); stroke-width: 1.6; }
.wf1-draw .book { fill: var(--k-paper); stroke: var(--k-m); stroke-width: 1.6; }
.wf1-draw .bookmid { stroke: var(--k-m); stroke-width: 1; }
.wf1-draw .arrow { fill: none; stroke: var(--k-ink); stroke-width: 1.2; }
.wf1-draw .turn { fill: var(--k-paper); stroke: var(--k-ink); stroke-width: 1.3; }
.wf1-draw .det { fill: var(--k-ink); }
.wf1-draw .cell { fill: var(--k-paper); stroke: var(--k-m); stroke-width: 1; }
.wf1-draw .cell.on { fill: var(--k-m); }

.wf1-strip { margin-top: .35rem; border: 1px solid var(--k-rule); line-height: 0; }
.wf1-dots { display: block; width: 100%; }
.wf1-axis { display: flex; justify-content: space-between; gap: .5rem; margin: .35rem 0 0; font: 400 .66rem/1.3 var(--k-mono); color: var(--k-soft); letter-spacing: .04em; }
.wf1-runs { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wf1-verdict { margin: .55rem 0 0; font-family: var(--k-display); font-weight: 820; font-size: clamp(1.6rem, 3.6vw, 2.25rem); line-height: .94;
  letter-spacing: -.038em; color: var(--k-ink); }
.wf1-lab.is-writes .wf1-verdict { color: var(--k-ink); }

.wf1-meas { display: grid; grid-template-columns: 1fr; gap: .6rem 1.5rem; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--k-rule); align-items: end; }
@container (min-width: 740px) { .wf1-meas { grid-template-columns: minmax(14rem, auto) minmax(0, 1fr); } }
.wf1-num { margin: .3rem 0 0; font-family: var(--k-display); font-weight: 860; font-size: clamp(2.4rem, 5.4vw, 3.6rem); line-height: .86;
  letter-spacing: -.05em; color: var(--k-ink); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.wf1-pm { font-weight: 700; font-size: .5em; letter-spacing: -.02em; }
.wf1-scale { display: block; width: 100%; overflow: visible; }
.wf1-scale text { font-family: var(--k-mono); fill: var(--k-soft); paint-order: stroke; stroke: var(--k-paper); stroke-width: 3px; stroke-linejoin: round; }
.wf1-scale .sc-l { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.wf1-scale .bound-t { fill: var(--k-ink); }
.wf1-scale .ceil-t { fill: var(--k-soft); }
.wf1-scale .sc-tick { font-size: 10px; }
.wf1-scale .axis { stroke: var(--k-ink); stroke-width: 1.2; }
.wf1-scale .tick { stroke: var(--k-ink); stroke-width: 1; }
.wf1-scale .bound { stroke: var(--k-ink); stroke-width: 2.2; }
.wf1-scale .ceil { stroke: var(--k-hair); stroke-width: 1.4; stroke-dasharray: 4 3; }
.wf1-scale .err { stroke: var(--k-ink); stroke-width: 1.6; }
.wf1-scale .pt { fill: var(--k-ink); }
.wf1-src { margin: .2rem 0 0; font-size: .82rem; line-height: 1.32; color: var(--k-soft); }
.wf1-cap { margin: 1rem 0 0; font-size: .84rem; line-height: 1.4; color: var(--k-soft); max-width: 60rem; }
.wf1-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) { .wf1-knob { transition: none; } }
@media (forced-colors: active) {
  .wf1, .wf1-track { border-color: CanvasText; }
  .wf1-draw .box, .wf1-draw .link, .wf1-draw .arrow, .wf1-scale .axis, .wf1-scale .bound, .wf1-scale .err { stroke: CanvasText; }
  .wf1-draw .path, .wf1-draw .reg, .wf1-draw .regmid { stroke: LinkText; }
  .wf1-draw .post, .wf1-draw .book, .wf1-draw .bookmid { stroke: Highlight; }
  .wf1-draw text, .wf1-scale text { fill: CanvasText; stroke: Canvas; }
  .wf1-scale .pt, .wf1-draw .photon { fill: CanvasText; }
  .wf1-switch[aria-checked="true"] .wf1-track { background: Highlight; border-color: Highlight; }
  .wf1-switch[aria-checked="true"] .wf1-knob { background: HighlightText; }
  .wf1-knob { background: CanvasText; forced-color-adjust: none; }
}
@media print {
  .wf1 { --k-paper: #fff; --k-ink: #000; --k-body: #111; --k-soft: #333; --k-tint: #f2f2f2; break-inside: avoid; }
  .wf1, .wf1 * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wf1-play { display: none; }
}

/* compact: the two copies side by side when the figure is narrow (phones) */
.wf1-ccap { display: block; margin: .7rem 0 0; font-size: .8rem; line-height: 1.32; color: var(--k-soft); max-width: 60rem; }
.wf1-axis { justify-content: flex-end; }
@container (max-width: 519px) {
  .wf1-head { flex-wrap: nowrap; gap: .5rem; padding-bottom: .5rem; margin-bottom: .6rem; }
  .wf1-long { display: none; }
  .wf1-head .wf1-label { font-size: .62rem; letter-spacing: .1em; white-space: nowrap; }
  .wf1-play { padding: .38rem .5rem; }
  .wf1-live { gap: .45rem; }
  .wf1-labs { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .wf1-labhead { flex-wrap: wrap; gap: .1rem .4rem; min-height: 0; margin-bottom: .35rem; }
  .wf1-switch { min-height: 28px; padding: 2px 0; }
  .wf1-track { width: 36px; height: 20px; }
  .wf1-knob { width: 13px; height: 13px; }
  .wf1-switch[aria-checked="true"] .wf1-knob { left: 18px; }
  .wf1-swl { flex-basis: 100%; font-size: .6rem; letter-spacing: .06em; line-height: 1.2; }
  .wf1-axis { font-size: .6rem; justify-content: flex-end; margin-top: .2rem; }
  .wf1-axis > span:first-child { display: none; }
  .wf1-verdict { font-size: 1.2rem; margin-top: .3rem; }
  .wf1-ccap { display: block; margin: .6rem 0 0; font-size: .74rem; line-height: 1.3; color: var(--k-soft); }
  .wf1-draw .mini { font-size: 8.5px; letter-spacing: .04em; }
  .wf1-draw .cap.mini { font-size: 8.5px; letter-spacing: .1em; }
}
@container (max-width: 359px) { .wf1-livet { display: none; } }
.wf1-ticks { position: relative; height: 1.1em; margin-top: .15rem; font: 400 .62rem/1.1 var(--k-mono); color: var(--k-soft); font-variant-numeric: tabular-nums; }
.wf1-ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.wf1-ticks span::before { content: ""; position: absolute; left: 50%; top: -.3rem; height: .25rem; border-left: 1px solid var(--k-hair); }
