/* Source-backed NOT-gate figures. Scope every rule to these figures. */
.not-fig {
  --not-fig-muted: var(--ink-3);
  --not-fig-light: var(--paper-edge);
  min-width: 0;
  max-width: 100%;
  margin: 1.8rem 0;
  border: 1px solid var(--paper-edge);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.not-fig *, .not-fig *::before, .not-fig *::after { box-sizing: border-box; }
.not-fig .not-fig__heading { padding: 1.25rem 1.4rem 0.75rem; }
.not-fig .not-fig__kicker { display: block; font: 700 0.68rem/1.5 var(--font-mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--pipe-blue-deep); }
.not-fig .not-fig__heading h5 { margin: 0.5rem 0 0.6rem; font-family: var(--font-display); font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.35; }
.not-fig .not-fig__heading p { max-width: 74ch; margin: 0; color: var(--ink-2); font-size: 0.87rem; line-height: 1.55; }
.not-fig figcaption { margin: 0; padding: 1rem 1.4rem 1.2rem; border-top: 1px solid var(--paper-edge); font-size: 0.8rem; line-height: 1.6; color: var(--ink-2); }
.not-fig__scroll, .not-fig__data-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.not-fig__scroll:focus-visible, .not-fig__data-scroll:focus-visible { outline: 3px solid var(--pipe-blue-deep); outline-offset: -3px; }
.not-fig svg, .not-fig img.wiki-webp { display: block; width: 100%; height: auto; }
.not-fig svg text { fill: var(--ink-2); font-family: var(--font-sans); font-size: 14px; }
.not-fig .not-fig__signal-text { fill: var(--cernal-red); }

/* Domain schematics: exact labels; domain width is deliberately illustrative. */
.not-fig__state { border-top: 1px solid var(--paper-edge); }
.not-fig__state-heading { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1.4rem 0; }
.not-fig__state-heading strong { font-family: var(--font-display); font-size: 0.95rem; }
.not-fig__state-label { padding: 0.15rem 0.5rem; border: 1px solid var(--cernal-red); border-radius: 4px; background: var(--cernal-red-soft); color: var(--cernal-red-deep); font: 700 0.68rem/1.4 var(--font-mono); }
.not-fig__state-label--on { background: var(--paper); border-color: var(--pipe-blue-deep); color: var(--pipe-blue-deep); }
.not-fig__architecture-svg { min-width: 660px; }
.not-fig__context-line { fill: none; stroke: var(--paper-edge); stroke-width: 5; stroke-linecap: round; }
.not-fig__trigger { fill: none; stroke: var(--cernal-red); stroke-width: 5; stroke-linecap: round; }
.not-fig__pair { fill: none; stroke: var(--ink-3); stroke-width: 1.7; }
.not-fig__switch { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.not-fig__arm { fill: none; stroke: var(--ink-3); stroke-width: 10; stroke-linecap: round; }
.not-fig__fixed { fill: var(--paper-sink); stroke: var(--ink); stroke-width: 1.5; }
.not-fig__start { fill: var(--cernal-red); stroke: var(--cernal-red-deep); stroke-width: 1.5; }
.not-fig .not-fig__start-text { fill: var(--paper); font-family: var(--font-mono); font-size: 13px; }
.not-fig__reporter { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.7; }
.not-fig__ribosome { fill: var(--pipe-blue-soft); stroke: var(--pipe-blue-deep); stroke-width: 1.8; }
.not-fig .not-fig__ribosome-label { fill: var(--pipe-blue-deep); font-weight: 700; }
.not-fig__output-arrow { fill: none; stroke: var(--pipe-blue-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.not-fig .not-fig__domain-text { fill: var(--ink); font-size: 13px; font-weight: 700; }
.not-fig .not-fig__domain-label { fill: var(--ink); font-size: 14px; }
.not-fig .not-fig__polarity { fill: var(--ink-2); font-family: var(--font-mono); font-size: 14px; }
.not-fig .not-fig__small-label { font-size: 12px; }
.not-fig .not-fig__annotation { fill: var(--ink-2); font-size: 14px; }
.not-fig__leader { fill: none; stroke: var(--ink-3); stroke-width: 1; }

/* The pipeline remains selectable HTML and wraps at every viewport width. */
.not-fig .not-fig__pipeline { counter-reset: not-step; list-style: none; margin: 0.5rem 1.4rem 1.25rem; padding: 0; }
.not-fig__pipeline > li { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: start; gap: 0.8rem; margin: 0; padding: 1.1rem 0; border-bottom: 1px solid var(--paper-edge); }
.not-fig__pipeline > li:last-child { border-bottom: 0; }
.not-fig__pipeline > li::before { counter-increment: not-step; content: counter(not-step, decimal-leading-zero); display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--pipe-blue-deep); border-radius: 50%; background: var(--paper); color: var(--pipe-blue-deep); font: 700 0.7rem/1 var(--font-mono); }
.not-fig__pipeline > li:not(:last-child)::after { content: ""; position: absolute; top: 3.5rem; bottom: -0.8rem; left: 0.96rem; width: 1px; background: var(--paper-edge); }
.not-fig__pipeline strong { display: block; margin: 0.2rem 0 0.4rem; font-family: var(--font-display); font-size: 0.95rem; }
.not-fig .not-fig__pipeline p { max-width: none; margin: 0.3rem 0 0; color: var(--ink-2); font-size: 0.83rem; line-height: 1.6; }
.not-fig .not-fig__step-metrics { font-family: var(--font-mono); color: var(--pipe-blue-deep); font-size: 0.74rem; }
.not-fig__step-role { margin-top: 0.35rem; color: var(--ink-2); font: 0.65rem/1.5 var(--font-mono); white-space: nowrap; }
.not-fig__totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; border-top: 1px solid var(--paper-edge); background: var(--paper-edge); }
.not-fig__totals > div { display: flex; flex-direction: column-reverse; gap: 0.3rem; padding: 1rem; background: var(--cernal-red-soft); }
.not-fig__totals dt { font-weight: 400; font-size: 0.72rem; line-height: 1.4; color: var(--ink-2); }
.not-fig__totals dd { margin: 0; font: 700 clamp(1.2rem, 2.5vw, 1.75rem)/1.15 var(--font-display); color: var(--cernal-red-deep); }

/* Counts are deliberately separate panels because each source axis differs. */
.not-fig__count-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 0.8rem; padding: 0.8rem 1rem 0; }
.not-fig__count-panel { min-width: 0; }
.not-fig .not-fig__chart-heading { display: flex; align-items: baseline; justify-content: center; gap: 0.6rem; margin: 0.5rem 0 0; }
.not-fig__chart-heading strong { font-family: var(--font-display); font-size: 1rem; }
.not-fig__chart-heading span { color: var(--ink-2); font-size: 0.75rem; }
.not-fig__gridline { fill: none; stroke: var(--paper-edge); stroke-width: 1; }
.not-fig__axis { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.not-fig__bar { fill: var(--ink-2); }
.not-fig__bar--muted { fill: var(--not-fig-muted); }
.not-fig__bar--signal { fill: var(--cernal-red); }
.not-fig__bar--cap { fill: var(--paper); stroke: var(--cernal-red); stroke-width: 1.5; stroke-dasharray: 3 2; }
.not-fig .not-fig__tick { fill: var(--ink-2); font-size: 12px; }
.not-fig .not-fig__value { fill: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.not-fig .not-fig__category { fill: var(--ink-2); font-size: 14px; }
.not-fig .not-fig__stage-label { fill: var(--ink-2); font-size: 11px; }
.not-fig .not-fig__axis-label { font-size: 13px; }

/* All exact chart values remain available as ordinary, printable tables. */
.not-fig__data-scroll { padding: 0.5rem 1.4rem 1.1rem; }
.not-fig__total-row { border-top: 2px solid var(--paper-edge); font-weight: 700; }

/* The human test bars share a 0–100% axis. */
.not-fig__tests-svg { min-width: 680px; }
.not-fig__tests-mobile { display: none; }
.not-fig .not-fig__mobile-category { font-size: 13px; }
.not-fig .not-fig__bar-label { fill: var(--ink-2); font-size: 14px; font-weight: 700; }
.not-fig .not-fig__bar-label.not-fig__signal-text { fill: var(--cernal-red); }
.not-fig__test-bar--0 { fill: var(--ink-2); }
.not-fig__test-bar--1 { fill: var(--not-fig-muted); }
.not-fig__test-bar--2 { fill: var(--cernal-red); }
.not-fig__test-bar--3 { fill: var(--not-fig-light); }
.not-fig .not-fig__legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.2rem; list-style: none; margin: 0 1.4rem 1rem; padding: 0; }
.not-fig__legend li { display: flex; align-items: baseline; gap: 0.45rem; margin: 0; font-size: 0.78rem; line-height: 1.5; color: var(--ink-2); }
.not-fig__legend sub { margin-left: -0.4rem; }
.not-fig__swatch { flex: 0 0 1rem; width: 1rem; height: 0.65rem; align-self: center; }
.not-fig__swatch--0 { background: var(--ink-2); }
.not-fig__swatch--1 { background: var(--not-fig-muted); }
.not-fig__swatch--2 { background: var(--cernal-red); }
.not-fig__swatch--3 { background: var(--not-fig-light); }
.not-fig__off-svg { max-width: 570px; margin-inline: auto; }
.not-fig__zero-block { fill: var(--cernal-red); }
.not-fig__nonzero-block { fill: var(--not-fig-light); }
.not-fig .not-fig__stack-label { fill: var(--ink); font-family: var(--font-mono); font-size: 17px; }
.not-fig .not-fig__stack-value { fill: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.not-fig .not-fig__stack-label--light { fill: var(--paper); }

@media (max-width: 575.98px) {
  .not-fig .not-fig__heading, .not-fig figcaption { padding-inline: 1rem; }
  .not-fig__state-heading { padding-inline: 1rem; }
  .not-fig .not-fig__pipeline { margin-inline: 1rem; }
  .not-fig__pipeline > li { grid-template-columns: 2rem minmax(0, 1fr); column-gap: 0.6rem; }
  .not-fig__step-role { grid-column: 2; margin: 0; }
  .not-fig__totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .not-fig__totals > div { padding: 0.85rem 1rem; }
  .not-fig__data-scroll { padding-inline: 1rem; }
  .not-fig .not-fig__legend { grid-template-columns: 1fr; margin-inline: 1rem; }
  .not-fig__tests-wide { display: none; }
  .not-fig__tests-mobile { display: grid; gap: 1.2rem; padding: 0.75rem 1rem 1rem; }
  .not-fig__test-panel { min-width: 0; border-bottom: 1px solid var(--paper-edge); }
  .not-fig__test-panel:last-child { border-bottom: 0; }
}
@media print {
  .not-fig { overflow: visible; break-inside: avoid; box-shadow: none; }
  .not-fig__scroll, .not-fig__data-scroll { overflow: visible; }
  .not-fig svg, .not-fig img.wiki-webp { min-width: 0; }
  .not-fig__tests-wide { display: block; }
  .not-fig__tests-mobile { display: none; }
  .not-fig__count-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .not-fig__bar, .not-fig__zero-block, .not-fig__nonzero-block, .not-fig__start, .not-fig__swatch { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Toehold gate report figures (th- prefix) */
.th-fig__hairpin-svg { min-width: 640px; }
.th-fig__chain-svg { min-width: 700px; }
.th-fig__refold-svg { min-width: 700px; }
.th-fig__ratio-svg { max-width: 760px; margin-inline: auto; }
.th-fig__chip { fill: var(--paper-sink); stroke: var(--ink); stroke-width: 1.4; }
.th-fig__chip--muted { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.4; }
.th-fig__chip--new { fill: var(--paper); stroke: var(--ink); stroke-width: 1.8; }
.th-fig__chip--payload { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 5 3; }
.th-fig__chip--start { fill: var(--cernal-red); stroke: var(--cernal-red-deep); stroke-width: 1.4; }
.not-fig .th-fig__chip-text { fill: var(--ink); font-family: var(--font-mono); font-size: 11.5px; }
.not-fig .th-fig__chip-text--light { fill: var(--paper); }
.th-fig__arc { fill: none; stroke: var(--ink-2); stroke-width: 1.7; }
.th-fig__arc--new { stroke: var(--cernal-red); stroke-width: 2; }
.th-fig__arc--open { stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 4 3; }
.th-fig__backbone { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.th-fig__reference { fill: none; stroke: var(--cernal-red); stroke-width: 1.6; stroke-dasharray: 6 4; }
.not-fig .th-fig__reference-label { fill: var(--cernal-red); font-size: 12px; }
.th-fig__cross { fill: none; stroke: var(--ink-3); stroke-width: 2.4; stroke-linecap: round; }
.th-fig__checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--paper-edge); border-top: 1px solid var(--paper-edge); }
.th-fig__checks > div { min-width: 0; padding: 1rem 1.2rem 1.2rem; background: var(--paper); }
.th-fig__checks h6 { margin: 0 0 0.2rem; font-family: var(--font-display); font-size: 0.95rem; }
.th-fig__checks > div > p { margin: 0 0 0.6rem; color: var(--ink-2); font-size: 0.78rem; line-height: 1.5; }
.not-fig .th-fig__checks ul { list-style: none; margin: 0; padding: 0; }
.th-fig__checks li { position: relative; margin: 0.45rem 0; padding-left: 1.5rem; font-size: 0.82rem; line-height: 1.5; }
.th-fig__checks li::before { position: absolute; left: 0; top: 0; font: 700 0.8rem/1.6 var(--font-mono); }
.th-fig__checks--veto li::before { content: "\00d7"; color: var(--cernal-red); }
.th-fig__checks--warn li::before { content: "!"; color: var(--pipe-blue-deep); }
@media (max-width: 640px) {
.th-fig__checks { grid-template-columns: 1fr; }
}
@media print {
.th-fig__checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.th-fig__chip--start, .th-fig__reference { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
