/* Figure 9. The other units, and why two ticks.
   Every class is prefixed wc9- and every token is scoped to the figure. */
.wc9 {
  --wc-paper: #faf8f3; --wc-ink: #1d1d1b; --wc-body: #2a2926; --wc-soft: #3c3a36; --wc-hair: #8a8a8a; --wc-hair-text: #6b6b6b;
  --wc-rule: color-mix(in srgb, var(--wc-ink) 16%, var(--wc-paper));
  --wc-c: #009fe3; --wc-m: #e6007e; --wc-c-text: #0072b5; --wc-m-text: #c4006b;
  --wc-text: "InterVariable", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wc-display: "Inter Display", "InterVariable", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wc-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  margin: 0; padding: clamp(1rem, 2.4vw, 1.75rem); background: var(--wc-paper); color: var(--wc-body);
  border: 1px solid var(--wc-ink); font-family: var(--wc-text); font-weight: 420; line-height: 1.42;
  font-optical-sizing: auto; box-sizing: border-box; container-type: inline-size;
}
.wc9[data-frame="none"] { border: 0; padding: 0; background: transparent; }
@media screen and (prefers-color-scheme: dark) {
  .wc9 { --wc-paper: #141413; --wc-ink: #faf8f3; --wc-body: #e9e6df; --wc-soft: #c9c5bc; --wc-hair: #8a8a8a; --wc-hair-text: #8a8a8a;
    --wc-c: #2bb3f0; --wc-m: #ff3d9e; --wc-c-text: #2bb3f0; --wc-m-text: #ff6fb6; }
}
.wc9 *, .wc9 *::before, .wc9 *::after { box-sizing: border-box; }
.wc9-label { margin: 0; font: 700 .72rem/1.3 var(--wc-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--wc-soft); }
.wc9-m { text-transform: none; letter-spacing: .02em; font-family: var(--wc-text); font-weight: 600; font-style: italic; }
.wc9-m sup { font-size: .72em; font-style: normal; }
.wc9-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline;
  padding-bottom: .75rem; border-bottom: 1px solid var(--wc-rule); }
.wc9-live { color: var(--wc-ink); }
.wc9-live::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .45rem; background: var(--wc-ink); vertical-align: .05rem; }
.wc9-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(13rem, .78fr); gap: clamp(1rem, 2.4vw, 2rem);
  padding-top: 1rem; align-items: start; }
.wc9-panel { min-width: 0; }
.wc9-svg { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 460px; margin: .4rem auto 0; overflow: visible; }
.wc9-key { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .45rem 0 0; padding: 0; list-style: none;
  font: 400 .72rem/1.35 var(--wc-mono); color: var(--wc-soft); }
.wc9-key i { display: inline-block; width: .8rem; height: .55rem; margin-right: .35rem; vertical-align: 0; }
.wc9-key .kc { background: var(--wc-ink); }
.wc9-key .km { background: var(--wc-m); }
.wc9-key .kg { border: 1.2px solid var(--wc-ink); }
.wc9-nw { white-space: nowrap; }
.wc9-note { margin: .45rem 0 0; font: 400 .72rem/1.4 var(--wc-mono); color: var(--wc-soft); min-height: 2.8em; }
.wc9-readout { border-top: 1px solid var(--wc-ink); padding-top: .8rem; min-width: 0; }
.wc9-big { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 .3rem; color: var(--wc-ink); }
.wc9-eq { font-family: var(--wc-display); font-weight: 760; font-style: italic; font-size: clamp(2.6rem, 5.2vw, 3.7rem); line-height: .86; letter-spacing: -.02em; }
.wc9-eq sup { font-size: .5em; font-style: normal; vertical-align: .9em; line-height: 0; margin-left: .04em; }
.wc9-eqs { font-family: var(--wc-display); font-weight: 500; font-size: clamp(2.6rem, 5.2vw, 3.7rem); line-height: .86; margin: 0 .14em; position: relative; top: -.04em; }
.wc9-num { font-family: var(--wc-display); font-weight: 860; font-size: clamp(3.2rem, 6.4vw, 4.6rem); line-height: .86;
  letter-spacing: -.05em; font-variant-numeric: tabular-nums lining-nums; }
.wc9-unit { font: 700 .72rem/1.3 var(--wc-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--wc-soft); margin-left: .3rem; align-self: flex-end; }
.wc9-sub { margin: .5rem 0 0; font-size: 1rem; line-height: 1.32; color: var(--wc-ink); font-weight: 450; }
.wc9-check { margin: .7rem 0 0; font: 400 .74rem/1.45 var(--wc-mono); color: var(--wc-soft); font-variant-numeric: tabular-nums; }
.wc9-check b { color: var(--wc-ink); font-weight: 700; }
.wc9-state { margin: 1rem 0 0; padding-top: .7rem; border-top: 1px solid var(--wc-rule); }
.wc9-state .wc9-label { color: var(--wc-ink); }
.wc9-state p + p { margin-top: .3rem; }
.wc9-controls { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.wc9-controls button { appearance: none; border: 1px solid var(--wc-ink); border-radius: 0; background: transparent; color: var(--wc-ink); cursor: pointer;
  font: 700 .68rem/1 var(--wc-mono); letter-spacing: .12em; text-transform: uppercase; padding: .6rem .8rem; min-height: 40px; min-width: 44px; }
.wc9-controls button.is-main { background: var(--wc-ink); color: var(--wc-paper); padding-left: 1.1rem; padding-right: 1.1rem; }
.wc9-controls button:hover { background: color-mix(in srgb, var(--wc-ink) 10%, transparent); }
.wc9-controls button.is-main:hover { background: color-mix(in srgb, var(--wc-ink) 84%, var(--wc-paper)); }
.wc9-controls button:focus-visible { outline: 2px solid var(--wc-ink); outline-offset: 2px; }
.wc9-caption { margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--wc-rule); font-size: .95rem; color: var(--wc-body); max-width: 50rem; }
.wc9-caption p { margin: 0; }
.wc9-caption p + p { margin-top: .5rem; }
.wc9-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* drawing */
.wc9 svg text { font-family: var(--wc-mono); fill: var(--wc-soft); }
.wc9 .t-val { font-family: var(--wc-text); font-weight: 650; fill: var(--wc-ink); font-variant-numeric: tabular-nums; }
.wc9 .t-pos { fill: var(--wc-hair-text); }   /* small grey digits: 4.5:1 on the paper */
.wc9 .t-ink { fill: var(--wc-ink); }
.wc9 .t-big { font-family: var(--wc-display); font-weight: 860; fill: var(--wc-ink); letter-spacing: -.04em; }
.wc9 .t-math { font-family: var(--wc-text); font-style: italic; font-weight: 600; fill: var(--wc-ink); }
.wc9 .ln-hair { stroke: var(--wc-hair); fill: none; }
.wc9 .ln-rule { stroke: var(--wc-rule); fill: none; }
.wc9 .ln-ink { stroke: var(--wc-ink); fill: none; }
.wc9 .node { fill: var(--wc-paper); stroke: var(--wc-ink); }
.wc9 .ghost { stroke: var(--wc-ink); fill: none; }
.wc9 .bar-p { fill: var(--wc-ink); stroke: none; }
.wc9 .bar-m { fill: var(--wc-m); stroke: none; }
.wc9 .arrow { stroke: var(--wc-ink); fill: none; }
.wc9 .arrowhead { fill: var(--wc-ink); stroke: none; }
.wc9 .station { stroke: var(--wc-hair); fill: none; }
.wc9 .station-i { stroke: var(--wc-c); fill: none; }
.wc9 .stationhead-i { fill: var(--wc-c); }
.wc9 .ln-i { stroke: var(--wc-c); fill: none; }
.wc9 .t-i { fill: var(--wc-c-text); }
.wc9 .stationhead { fill: var(--wc-hair); }
@container (max-width: 900px) {
  .wc9-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wc9-readout { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.5rem; }
  .wc9-readout > .wc9-state { margin-top: 0; padding-top: 0; border-top: 0; }
  /* the reading in the left column, the checks down the right, so no gap opens under the reading */
  .wc9-readout > .wc9-label, .wc9-readout > .wc9-big, .wc9-readout > .wc9-sub, .wc9-readout > .wc9-state, .wc9-readout > .wc9-controls { grid-column: 1; }
  .wc9-readout > .wc9-check { grid-column: 2; grid-row: 1 / span 5; margin-top: 0; align-self: start; }
  .wc9-readout > .wc9-state { margin-top: .9rem; padding-top: .6rem; border-top: 1px solid var(--wc-rule); }
}
@container (max-width: 560px) {
  .wc9-grid { grid-template-columns: minmax(0, 1fr); }
  .wc9-readout { display: block; }
  .wc9-readout > .wc9-state { margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--wc-rule); }
  .wc9-svg { max-height: 360px; }
}
@media (forced-colors: active) {
  .wc9 { border-color: CanvasText; }
  .wc9 .arrow, .wc9 .ln-ink, .wc9 .node, .wc9 .ghost { stroke: CanvasText; }
  .wc9 .bar-p { fill: CanvasText; }
  .wc9 .bar-m { fill: Canvas; stroke: CanvasText; stroke-width: 1.5; }
  .wc9 .arrowhead { fill: CanvasText; }
  .wc9 .station, .wc9 .ln-hair { stroke: GrayText; }
  .wc9 .station-i, .wc9 .ln-i { stroke: CanvasText; }
  .wc9 .stationhead-i { fill: CanvasText; }
  .wc9 .t-i { fill: CanvasText; }
  .wc9 .stationhead { fill: GrayText; }
  .wc9 svg text, .wc9 .t-val, .wc9 .t-big, .wc9 .t-math { fill: CanvasText; }
  .wc9 .node { fill: Canvas; }
  .wc9-key .kc { background: CanvasText; forced-color-adjust: none; }
  .wc9-key .km { background: Canvas; border: 1.5px solid CanvasText; forced-color-adjust: none; }
  .wc9-key .kg { border: 1.2px dashed CanvasText; }
  .wc9 .ghost { stroke-dasharray: 3 2; }
  .wc9-controls button.is-main { background: ButtonText; color: ButtonFace; forced-color-adjust: none; }
}
@media print {
  .wc9, .wc9 * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wc9 { --wc-paper: #ffffff; --wc-ink: #1d1d1b; --wc-body: #2a2926; --wc-soft: #3c3a36; --wc-c: #0072b5; --wc-m: #c4006b;
    break-inside: auto; border-color: #1d1d1b; }
  .wc9-controls { display: none; }
  .wc9-panel, .wc9-readout { break-inside: avoid; }
}

/* figure 6: sliders, the eighth turn, the state line */
.wc9-sliders { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem 1.8rem; margin-top: .6rem; }
.wc9-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .5rem; align-items: center;
  font: 700 .64rem/1.3 var(--wc-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--wc-soft); }
.wc9-slider .wc9-opp { font-weight: 400; letter-spacing: .04em; text-transform: none; }
.wc9-slider output { font-weight: 700; letter-spacing: .02em; color: var(--wc-ink); font-variant-numeric: tabular-nums; }
.wc9-slider input { grid-column: 1 / -1; width: 100%; margin: .1rem 0 0; accent-color: var(--wc-ink); min-height: 28px; }
.wc9-slider input:focus-visible { outline: 2px solid var(--wc-ink); outline-offset: 2px; }
.wc9-svg[data-k="ring"] { touch-action: pan-y pinch-zoom; cursor: ns-resize; }
.wc9 .zeta { stroke: var(--wc-soft); fill: none; }
.wc9 .zetahead { fill: var(--wc-soft); }
.wc9-key .ki { height: 0; border-top: 2px solid var(--wc-c); vertical-align: .2rem; }
.wc9-key .kz { height: 0; border-top: 2px dashed var(--wc-soft); vertical-align: .2rem; }
.wc9-key .kp { background: var(--wc-ink); height: .55rem; }
.wc9-key .kn { background: var(--wc-m); height: .55rem; }
.wc9-key .kg { border: 1.2px solid var(--wc-ink); height: .55rem; }
.wc9-ringkey { margin-top: .4rem; }
.wc9-key .kf { height: 0; border-top: 3px solid var(--wc-ink); vertical-align: .2rem; }
.wc9-state { margin: .9rem 0 0; padding-top: .6rem; border-top: 1px solid var(--wc-rule); font: 400 .78rem/1.45 var(--wc-mono); color: var(--wc-ink); }
.wc9-check sub, .wc9-caption sub { font-size: .72em; }
@media (forced-colors: active) {
  .wc9 .zeta { stroke: CanvasText; }
  .wc9 .zetahead { fill: CanvasText; }
  .wc9-key .ki, .wc9-key .kz, .wc9-key .kf { border-top-color: CanvasText; }
}
.wc9-hint { margin: .5rem 0 0; font: 400 .72rem/1.4 var(--wc-mono); color: var(--wc-soft); }
/* figure 9 additions: the matrix dots, the chosen unit's button, the verdict */
.wc9 .dot-p { fill: var(--wc-ink); }
.wc9 .dot-m { fill: var(--wc-m); }
.wc9-controls button.is-on { background: var(--wc-ink); color: var(--wc-paper); }
.wc9-controls button.is-on:hover { background: color-mix(in srgb, var(--wc-ink) 84%, var(--wc-paper)); }
.wc9-sub { margin: .4rem 0 .35rem; font-size: 1rem; line-height: 1.34; color: var(--wc-ink); }
.wc9-num sup { font-size: .5em; margin-right: .08em; }   /* the 3 of S³ clear of the bracket */
@media (forced-colors: active) {
  .wc9 .dot-p { fill: CanvasText; }
  .wc9 .dot-m { fill: Canvas; stroke: CanvasText; stroke-width: 1.5; }
  .wc9-controls button.is-on { background: Highlight; color: HighlightText; forced-color-adjust: none; }
}
.wc9-num.is-long { font-size: min(clamp(1.9rem, 3.4vw, 2.6rem), 13.5cqi); white-space: nowrap; }   /* (S + S³)/√2 on one line; large reader text: never wider than the figure */
.wc9 .wc9-mat { aspect-ratio: 320 / 340; }   /* room for the axis caption under the grid */
