/* uncompute companion site.
   One serif for prose and figures, one mono for small labels; both come from
   the system, so the site loads no fonts from other hosts. One accent color
   marks discovered circuits and links; baselines are gray. Figures are
   inline SVG and take every color from the tokens below, so both themes
   need no redraw. */

/* Two surfaces, one token set: light-dark() resolves per the effective
   scheme; the data-theme attribute (set pre-paint from localStorage or
   ?theme=) overrides the OS preference. */
:root {
  color-scheme: light dark;
  --paper: light-dark(#fdfdfc, #15161a);
  --fg: light-dark(#1a1c20, #e8e6e1);
  --muted: light-dark(#5a616c, #a9adb6);
  --faint: light-dark(#8a919c, #7c828c);
  --line: light-dark(#e3e5e2, #2e3036);
  --line-soft: light-dark(#eff0ee, #232529);
  --accent: light-dark(#1a56a0, #79aef0);
  --accent-soft: light-dark(#e6eef8, #1b2c44);
  --base: light-dark(#7d848f, #9aa0aa);
  --bg-soft: light-dark(#f6f6f3, #1b1d22);
  --serif: Charter, "Bitstream Charter", "Sitka Text", "Iowan Old Style", Cambria, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
body {
  margin: 0 auto; max-width: 1060px; padding: 2.6rem 1.5rem 4rem;
  font: 400 17px/1.6 var(--serif); color: var(--fg); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.task { max-width: 800px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* theme toggle: a quiet glyph, fixed top right */
#themetoggle {
  position: fixed; top: .8rem; right: 1rem; z-index: 20;
  font: 400 1rem var(--mono); color: var(--faint);
  background: none; border: none; cursor: pointer; padding: .25rem .45rem; line-height: 1;
}
#themetoggle:hover { color: var(--fg); }

/* ---- type ---- */
h1 { font-weight: 400; font-size: 2.3rem; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.005em; }
h1 a { color: inherit; text-decoration: none; }
/* the mark: a qubit-occupancy tent. Allocated cubes are gray, the peak
   is the accent, and released cubes are outlines. */
h1 a:has(.logo) { display: inline-flex; align-items: center; gap: .3em; }
h1 a:has(.logo):hover { text-decoration: none; }
.logo {
  height: .95em; width: auto; flex: none;
  --acc-lt: light-dark(#5c8bc6, #a9cbf6); --acc-dk: light-dark(#123f78, #4e86cc);
  --cube: light-dark(#b6c0cc, #8b95a3); --cube-top: light-dark(#d3dae2, #aab3bf);
  --cube-side: light-dark(#8e9aa8, #6b7584); --cube-ln: light-dark(#4a5563, #d0d5db);
  --ghost: light-dark(#b9bfc8, #4b5059);
}
.logo .f-paper { fill: var(--paper); }
.logo .f-acc { fill: var(--accent); }
.logo .f-acclt { fill: var(--acc-lt); }
.logo .f-accdk { fill: var(--acc-dk); }
.logo .f-solid { fill: var(--cube); }
.logo .f-solidtop { fill: var(--cube-top); }
.logo .f-soliddk { fill: var(--cube-side); }
.logo .s-solidln { stroke: var(--cube-ln); }
.logo .s-accln { stroke: var(--acc-dk); }
.logo .s-gh { stroke: var(--ghost); }
h2 {
  font: 600 .74rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .13em;
  color: var(--muted); margin: 2.8rem 0 .9rem; padding-top: .9rem;
  border-top: 1px solid var(--line);
}
h3 { font-size: 1.04rem; font-weight: 600; margin: 1.7rem 0 .35rem; }
p { margin: 0 0 .9rem; }
.dek { font-size: 1.12rem; color: var(--muted); max-width: 40rem; margin: 0 0 1.6rem; }
.dek:not(:last-child) { margin-bottom: .7rem; }
.sub { color: var(--muted); font-size: .9rem; }
sub, sup { line-height: 0; }
.prose { max-width: 40rem; }

/* ---- index: card grid ---- */
.method { margin-top: 3rem; }
.nw { white-space: nowrap; }
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 1rem;
}
.card {
  display: flex; flex-direction: column; color: var(--fg);
  border: 1px solid var(--line); border-radius: 6px; padding: .85rem .9rem .6rem;
  background: var(--paper); transition: border-color .15s ease, background .15s ease;
}
.card:hover { text-decoration: none; border-color: var(--accent); background: var(--bg-soft); }
.card h3 { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.3; min-height: 2.6em; }
.card .fig { width: 100%; height: auto; }
.cardnote { margin: .4rem 0 0; font-size: .86rem; line-height: 1.45; color: var(--muted); }

/* ---- task page ---- */
nav { font: .8rem var(--mono); margin-bottom: 1.8rem; }
.lede { font-size: 1.16rem; line-height: 1.55; color: var(--fg); margin-bottom: 1.4rem; }
.brief p { max-width: 40rem; }
figure { margin: 1.8rem 0 2rem; }
figure .fig { width: 100%; height: auto; display: block; }
.cmp { border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.cmp th, .cmp td { padding: .3rem .6rem .3rem 0; text-align: left; border-bottom: 1px solid var(--line-soft); }
.cmp th { font-weight: 600; color: var(--muted); border-bottom-color: var(--line); }
.cmp .n { text-align: right; }
.cmp th:last-child, .cmp td:last-child { padding-right: 0; }
.cmp tr.disc td, .cmp tr.fam td, .cmp td.s.fam, .cmp td.s.disc { color: var(--accent); }
.cmp tr.disc td { font-weight: 600; }
.cmp td.s { vertical-align: middle; }
.cmp a.cite, .cmp a.src { color: inherit; text-decoration: underline dotted var(--faint); text-underline-offset: 3px; }
.cmp a.cite:hover, .cmp a.src:hover { text-decoration-style: solid; }
figure:has(> .cmp) { overflow-x: auto; }
figcaption { font-size: .88rem; line-height: 1.5; color: var(--muted); margin-top: .5rem; }
figcaption b { color: var(--fg); font-weight: 600; }
details.deep {
  margin: 2.6rem 0 0; border-top: 1px solid var(--line); padding-top: .4rem;
}
details.deep > summary {
  cursor: pointer; list-style: none; padding: .7rem 0;
  font: 600 .74rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .13em;
  color: var(--accent);
}
details.deep > summary::-webkit-details-marker { display: none; }
details.deep > summary::before { content: "+ "; }
details.deep[open] > summary::before { content: "− "; }
details.deep > summary span {
  text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted);
}
details.deep p, details.deep ul { max-width: 40rem; }
details.deep h3:first-of-type { margin-top: .8rem; }
.m { font-style: italic; }
code { font-family: var(--mono); font-size: .84em; }

/* ---- plane tooltip (plane.js) ----
   A mark shows its tooltip on hover or focus; a click pins it. A hot mark
   shows a halo, and its inset profile stands out while the others fade. */
.fig .mk { cursor: pointer; outline: none; }
.fig .mk .hit { fill: var(--fg); fill-opacity: 0; stroke: none; }
.fig .mk.hot .hit { fill-opacity: .1; }
.fig .mk:focus-visible .hit { stroke: var(--accent); stroke-width: 1.5; }
.fig .iz { cursor: pointer; transition: opacity .15s ease; }
.fig .iz.cool { opacity: .3; }
.fig .iz.hot .disc.occ { fill-opacity: .7; }
.fig .iz.hot .base.occ { fill-opacity: .55; }
.fig .iz.hot .box { stroke-width: 2; }
.tip {
  position: absolute; z-index: 30; max-width: 18rem; pointer-events: none;
  font-size: .82rem; line-height: 1.45; color: var(--fg);
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  padding: .45rem .65rem .5rem; box-shadow: 0 2px 8px rgb(0 0 0 / .12);
}
.tip.pinned { pointer-events: auto; border-color: var(--faint); }
.tip b { font-weight: 600; }
.tip dl {
  display: grid; grid-template-columns: auto auto; gap: 0 .9rem; margin: .25rem 0 0;
}
.tip dt { color: var(--muted); }
.tip dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.tip .links { margin: .3rem 0 0; }
.tip .links a + a::before { content: "·"; color: var(--faint); margin: 0 .4em; display: inline-block; }

footer {
  margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--muted); max-width: 46rem;
}
footer .sep { margin: 0 .4rem; color: var(--faint); }

/* ---- figures (inline SVG) ---- */
.fig text { font-family: var(--serif); fill: var(--muted); }
.fig .tl { font-size: 11px; font-variant-numeric: tabular-nums; }
.fig .al { font-size: 12px; fill: var(--muted); }
.fig .lg { font-size: 12.5px; fill: var(--fg); }
.fig .num { fill: var(--muted); }
.fig .pl { font-size: 12.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.fig .pl.disc { fill: var(--accent); }
.fig .pl.base { fill: var(--base); }
.card-fig .al { font-size: 11.5px; fill: var(--faint); }
.fig .axis { stroke: var(--faint); stroke-width: 1; }
.fig .tick { stroke: var(--faint); stroke-width: 1; }
.fig .grid { stroke: var(--line-soft); stroke-width: 1; }
.fig .frame { fill: none; stroke: var(--line); stroke-width: 1; }
.fig .iso { stroke: var(--line); stroke-width: 1; }
.fig .iso-l { font-size: 10.5px; fill: var(--faint); }
.fig .pt { stroke: var(--paper); stroke-width: 1.5; }
.fig .pt.disc { fill: var(--accent); }
.fig .pt.base { fill: var(--base); }
.fig .pt.var { fill: var(--accent); fill-opacity: .45; stroke-width: 1; }
.fig .stair { fill: none; stroke: var(--faint); stroke-width: 1.3; stroke-opacity: .8; }
.fig .pt.ext { fill: var(--faint); stroke: none; }
.fig .disc.occ { fill: var(--accent); fill-opacity: .5; }
.fig .base.occ { fill: var(--base); fill-opacity: .3; }
.fig .box { fill: none; stroke-width: 1.2; stroke-dasharray: 4 3; }
.fig .inset { fill: var(--paper); stroke: var(--line); stroke-width: 1; }
.fig .il { font-size: 10.5px; font-variant-numeric: tabular-nums; }
.fig .box.disc { stroke: var(--accent); }
.fig .box.base { stroke: var(--base); }
.fig .key.disc { fill: var(--accent); fill-opacity: .55; }
.fig .key.base { fill: var(--base); fill-opacity: .42; }
.fig .io { stroke: var(--fg); stroke-opacity: .5; stroke-dasharray: 2 3; }
.fig .io-l { fill: var(--fg); }
.fig .stage.s0 { fill: var(--line-soft); }
.fig .stage.s1 { fill: var(--line); }
.fig .stage:hover { fill: var(--accent-soft); }
.fig .sl { font-size: 10.5px; fill: var(--fg); pointer-events: none; }
.fig .curve { fill: none; stroke: var(--fg); stroke-width: 1.6; }
.fig .run.disc-bg, .fig .run.zero { fill: var(--line-soft); }
.fig .run.quad { fill: var(--accent); fill-opacity: .3; }
.fig .run.const { fill: var(--accent); fill-opacity: .12; }
.fig .cut { stroke-width: .7; fill: none; }
.fig .cut.base { stroke: var(--base); stroke-width: 1.2; }
.fig .cut.disc { stroke: var(--accent); }

/* ---- small screens ---- */
@media (max-width: 640px) {
  body { padding: 1.4rem 1rem 3rem; font-size: 16px; }
  h1 { font-size: 1.9rem; }
  .lede { font-size: 1.06rem; }
  /* wide figures keep a legible scale and scroll sideways */
  figure { overflow-x: auto; }
  figure .fig { min-width: 600px; }
}

/* ---- code walkthrough ----
   Narration steps on the left, the circuit source on the right. The source
   pane is sticky and scrolls to the lines of the step in view; the build
   resolves every step to its lines. Token colors stay low in saturation so
   the code reads as a figure, not an editor. Below 900px the pane gives way
   to an excerpt inside each step. */
:root {
  --code-kw: light-dark(#6f3f8f, #c3a1dc);
  --code-str: light-dark(#4b6f2e, #a9c98c);
  --code-com: light-dark(#7d848f, #80868f);
  --code-num: light-dark(#9a4f1c, #dfa57a);
  --code-def: light-dark(#1a56a0, #8db8ee);
  --code-bi: light-dark(#2d6a73, #86c0c8);
  --code-hl: light-dark(#eaf0f8, #1d2838);
  --code-ref: light-dark(#c9daf1, #2c4a75);
}
body:has(.walk) { overflow-x: clip; }
.walk { margin: 0 0 1rem; }
.code { font: 400 12.5px/1.6 var(--mono); }
.code .l { white-space: pre; padding: 0 .9rem 0 0; cursor: pointer; }
.code .l::before {
  content: attr(data-n); display: inline-block; width: 3.4em; padding-right: 1em;
  text-align: right; color: var(--faint); user-select: none;
}
.code .kw { color: var(--code-kw); }
.code .str { color: var(--code-str); }
.code .com { color: var(--code-com); font-style: italic; }
.code .num { color: var(--code-num); }
.code .def { color: var(--code-def); font-weight: 600; }
.code .bi { color: var(--code-bi); }
.code a.call {
  color: var(--accent); text-decoration: underline; text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.code .ann {
  font: 400 11px/1.4 var(--mono); color: var(--muted); white-space: nowrap;
  margin: .5rem 0 .1rem 4.4em; padding: .1rem .45rem; display: table;
  background: var(--paper); border: 1px solid var(--line); border-radius: 3px;
}
.code .ann b { font-weight: 600; color: var(--fg); margin-right: .35em; }
.code .gap { color: var(--faint); padding: .4rem 0 .4rem 4.4em; }
.code .l { transition: opacity .15s ease, background .15s ease; }
.code.dim .l { opacity: .5; }
.code .l.hl { opacity: 1; background: var(--code-hl); }
.code .l.ref { opacity: 1; background: var(--code-ref); box-shadow: inset 2px 0 var(--accent); }

.wk-step { padding: 1.1rem 0 1.3rem; border-top: 1px solid var(--line-soft); outline: none; }
.wk-step header { display: grid; grid-template-columns: 1.7em 1fr; align-items: baseline; }
.wk-step h3 { margin: 0 0 .45rem; font-size: 1.02rem; }
.wk-n { font: 600 .72rem var(--mono); color: var(--faint); }
.wk-tag { grid-column: 2; margin: -.35rem 0 .45rem; font-size: .72rem; color: var(--faint); }
.wk-step p { font-size: .95rem; line-height: 1.58; margin-bottom: .7rem; }
.wk-step.deep { padding-left: .9rem; border-left: 2px solid var(--line); }
.wk-fig { margin: .9rem 0 1rem; }
.wk-fig .fig { min-width: 0; max-width: 460px; }
.wk-step a.ref {
  color: inherit; text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: default;
}
.wk-step a.ref:hover { background: var(--code-ref); text-decoration: none; }
.wk-ex {
  max-height: 60vh; overflow: auto; margin: .6rem 0 0; padding: .4rem 0;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px;
}
.wk-pane { display: none; }

@media (min-width: 900px) {
  .walk {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.2rem;
    width: min(1200px, calc(100vw - 3rem));
    margin-left: calc(50% - min(600px, 50vw - 1.5rem));
  }
  .wk-steps { padding-bottom: 45vh; }
  .wk-ex { display: none; }
  .wk-step { cursor: pointer; transition: opacity .2s ease; }
  .wk-step:not(.on) { opacity: .55; }
  .wk-step:hover { opacity: 1; }
  .wk-step.on .wk-n { color: var(--accent); }
  .wk-step.pinned .wk-n::after { content: " ·"; color: var(--accent); }
  .wk-pane {
    display: flex; flex-direction: column; position: sticky; top: 1rem;
    height: calc(100vh - 2rem); min-height: 420px;
    border: 1px solid var(--line); border-radius: 6px; background: var(--bg-soft);
    overflow: hidden;
  }
  .wk-strip { padding: .5rem .7rem .2rem; border-bottom: 1px solid var(--line); }
  .wk-strip .fig { width: 100%; height: auto; display: block; }
  .wk-bar {
    display: flex; align-items: center; gap: .6rem; padding: .35rem .8rem;
    font: 400 .74rem var(--mono); color: var(--muted); border-bottom: 1px solid var(--line);
  }
  .wk-back {
    font: inherit; color: var(--accent); background: none; cursor: pointer;
    border: 1px solid var(--line); border-radius: 3px; padding: .05rem .45rem;
  }
  .wk-views { flex: 1; min-height: 0; position: relative; }
  .wk-code { position: absolute; inset: 0; overflow: auto; padding: .5rem 0 40vh; }
  .wk-code[data-view]:not([data-view="main"]) { background: var(--paper); }
}

/* the phase strip above the code */
.strip .occ { fill: var(--base); fill-opacity: .4; pointer-events: none; }
.strip .ph { fill: transparent; cursor: pointer; }
.strip .ph:hover { fill: var(--line-soft); }
.strip .ph.lit { fill: var(--accent); fill-opacity: .55; }
.wk-ex .l { cursor: auto; }

/* ---- circuit editor (try.js) ----
   The editor spans the page column on the index, beyond the prose measure.
   CodeMirror takes the code tokens of the walkthrough. Below 900px the
   controls stack under the editor. */
.method.prose { max-width: none; }
.method > :not(.try, .method-top), .method-text, .try > p { max-width: 40rem; }
.method-fig { margin: 1rem 0 0; max-width: 300px; }
.method-fig .fig { min-width: 0; }
.fig .flow { stroke: var(--faint); stroke-width: 1.2; fill: none; }
.fig .mhead { fill: var(--faint); }
.try {
  position: relative; margin-top: 3rem; padding-top: 1.3rem;
  border-top: 1px solid var(--line-soft);
}
.try::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 2.5rem; height: 2px; background: var(--accent);
}
.try h3 { margin-top: 0; }
.try-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.try-ed textarea, .try-ed .CodeMirror {
  display: block; width: 100%; height: 26rem; margin: 0;
  font: 400 12.5px/1.6 var(--mono); color: var(--fg); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 6px;
}
.try-ed textarea { padding: .5rem .7rem; resize: vertical; tab-size: 4; white-space: pre; }
.try-ed .CodeMirror-focused { border-color: var(--faint); }
.try-ed .CodeMirror-gutters { background: var(--bg-soft); border-right: 1px solid var(--line-soft); }
.try-ed .CodeMirror-linenumber { color: var(--faint); }
.try-ed .CodeMirror-scrollbar-filler, .try-ed .CodeMirror-gutter-filler { background: var(--bg-soft); }
.try-ed .CodeMirror-cursor { border-left-color: var(--fg); }
.try-ed .CodeMirror-selected { background: var(--code-hl); }
.try-ed .CodeMirror-focused .CodeMirror-selected { background: var(--code-ref); }
.try-ed .CodeMirror-line::selection, .try-ed .CodeMirror-line > span::selection,
.try-ed .CodeMirror-line > span > span::selection { background: var(--code-ref); }
.try-ed .CodeMirror-matchingbracket { color: var(--fg) !important; text-decoration: underline; }
.try-ed .cm-keyword { color: var(--code-kw); }
.try-ed .cm-string { color: var(--code-str); }
.try-ed .cm-comment { color: var(--code-com); font-style: italic; }
.try-ed .cm-number { color: var(--code-num); }
.try-ed .cm-def { color: var(--code-def); font-weight: 600; }
.try-ed .cm-builtin { color: var(--code-bi); }
.try-ed .cm-variable, .try-ed .cm-property, .try-ed .cm-operator { color: var(--fg); }
.try-ed .cm-variable-2 { color: var(--fg); }
.try-ed .cm-error { color: var(--fg); }
.try-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.try-bar button, .try-bar select {
  font: 400 .78rem var(--mono); color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); border-radius: 3px; padding: .3rem .7rem; cursor: pointer;
}
.try-bar select { min-width: 0; max-width: 100%; padding-right: .3rem; }
.try-bar button:hover, .try-bar select:hover { color: var(--fg); border-color: var(--faint); }
.try-bar button.go { color: var(--accent); border-color: var(--accent); min-width: 4.5rem; }
.try-out { margin-top: .9rem; font-size: .92rem; line-height: 1.5; }
.try-out p { margin: 0 0 .6rem; }
.try-status { color: var(--muted); font-style: italic; }
.try-verdict {
  font: 600 .74rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .13em;
}
.try-verdict.pass { color: var(--accent); }
.try-cost {
  display: grid; grid-template-columns: auto 1fr; gap: 0 1rem; margin: 0 0 .6rem;
}
.try-cost dt { color: var(--muted); }
.try-cost dd { margin: 0; font-variant-numeric: tabular-nums lining-nums; }
.try-note { color: var(--muted); font-size: .86rem; }
.try-out pre {
  margin: 0 0 .6rem; padding: .45rem .6rem; overflow-x: auto;
  font: 400 11.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px;
}
.try-out pre.try-print { color: var(--muted); }
.try-trace { margin: 0 0 .6rem; }
.try-exc { font: 400 12.5px/1.5 var(--mono); overflow-wrap: anywhere; }
.try-exc b { font-weight: 600; }
.try-frame {
  display: block; width: 100%; text-align: left; margin: 0 0 .35rem; padding: .35rem .6rem;
  font: inherit; color: inherit; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); border-left: 2px solid var(--faint);
  border-radius: 4px;
}
.try-frame:hover { border-left-color: var(--accent); }
.try-loc { display: block; font: 400 10.5px/1.4 var(--mono); color: var(--faint); }
.try-frame code { font: 400 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.try-hint { color: var(--muted); font-size: .86rem; font-style: italic; }
.try-ed .try-errline { background: var(--code-ref); }
.try-ed .try-opline { background: var(--code-hl); }
/* the circuit of the last build: row labels stay put, the wires scroll */
.try-circ {
  display: flex; margin-top: 1rem; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 6px;
}
.try-circ[hidden] { display: none; }
.try-circ > svg { flex: none; display: block; }
.try-circ-sc { flex: 1; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.try-circ-sc svg { display: block; }
.try-circ text { font: 400 10.5px var(--mono); fill: var(--muted); }
.try-circ text.anc { fill: var(--faint); }
.try-circ .wire, .try-circ .live, .try-circ .cl { pointer-events: none; }
.try-circ .wire { stroke: var(--line); stroke-width: 1; }
.try-circ .live { stroke: var(--base); stroke-width: 1; }
.try-circ .cl { stroke: var(--base); stroke-width: 1; fill: none; }
.try-circ .g { color: var(--fg); stroke: currentColor; stroke-width: 1.2; fill: none; pointer-events: none; }
.try-circ .g.t { color: var(--accent); }
.try-circ .g .dot { fill: currentColor; stroke: none; }
.try-circ .g .open { fill: var(--bg-soft); }
.try-circ .g .box { fill: var(--bg-soft); }
.try-circ .g text { fill: currentColor; stroke: none; font-size: 10px; }
.try-circ .hit { fill: transparent; stroke: none; cursor: pointer; }
.try-circ .hit.sel, .try-circ .g.sel :is(.box, .open) { fill: var(--code-hl); }
.try-circ .hit.on, .try-circ .g.on :is(.box, .open) { fill: var(--code-ref); }
@media (min-width: 900px) {
  .try-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.4rem; }
  .method-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.4rem; }
  .method-fig { margin: .2rem 0 0; }
  .try-ed textarea, .try-ed .CodeMirror { height: 34rem; }
}
