/* Round 23: the H06 hub-and-ring figure (ring16 + ending D "lights on") on the round 21 page,
   in light (K1 warm paper) and dark. Only colour tokens change between the two; the figure code is
   the same files h16-06d.html uses (figures/kernel.js, kit610.js, ring16.js, ring16-d.js).

   How the figure is coloured (same idea as Hairline): every solid is filled with the page colour so
   nearer shapes hide farther ones, and strokes come in three tones plus the one orange:
     base  the normal line          --r-base
     m     the dim inner creases     --r-dim
     hi    the bright, "lit" line    --r-hi   (labels light to this too)  */
:root {
  --r-base: #8f867c; --r-dim: #cfc6bb; --r-hi: #1C1713; --r-lbl: #8a8178;
  --r-lit: #e6d9c0; --r-face: #ebe5da;   /* lit window tone / display glass tone */
}
[data-paper="dark"] {
  --r-base: #5c5c5c; --r-dim: #454545; --r-hi: #f2f2f2; --r-lbl: #8f8f8f;
  --r-lit: #4a4235; --r-face: #1f1f1f;
}
[data-paper="stone"] { --r-dim: #c4baae; }

.fig { container-type: inline-size; position: relative; width: min(100%, 600px); aspect-ratio: 5 / 4; margin-left: auto; }
.fig > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; scale: var(--k, 1); }
.fig path { fill: var(--paper); stroke: var(--r-base); stroke-width: .9; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.fig path.nf { fill: none; }
.fig path.fo { stroke: none; }
.fig path.m { stroke: var(--r-dim); }
.fig path.hi { stroke: var(--r-hi); }
.fig path.or { stroke: #FF560D; }
.fig path.dot { fill: var(--r-hi); stroke: none; }
.fig path.dot.or { fill: #FF560D; stroke: none; }
.fig path.win { fill: var(--r-lit); stroke: var(--r-base); }   /* a lit window or awning stripe */
.fig path.glass { fill: var(--r-face); stroke: var(--r-dim); }   /* a display's glass */
.fig path.glow { fill: #FF560D; stroke: none; }   /* the lit doorway */
.fig path.pool { fill: #FFB36B; fill-opacity: .42; stroke: none; }   /* the warm pool of light */
[data-paper="dark"] .fig path.pool { fill-opacity: .2; }
.fig .led { fill: #FF560D; stroke: none; }
/* Labels are HTML outside the drawing so they stay readable at any size (positions come from ring16.js). */
.fig .lbl { position: absolute; translate: -50% -50%; pointer-events: none; white-space: nowrap;
  left: calc(50% + (var(--x) - 50) * var(--k, 1) * 1% + var(--dx, 0) * var(--push, 0px));
  top: calc(50% + (var(--y) - 50) * var(--k, 1) * 1% + var(--dy, 0) * var(--push, 0px) * .5);
  font: clamp(7px, calc(1.9cqi * var(--k, 1)), 11px)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--r-lbl); transition: color .3s ease; }
.fig .lbl.on { color: var(--r-hi); }
.fig { animation: rise 1.1s cubic-bezier(.16, 1, .3, 1) both .35s; }
@media (max-width: 860px) { .fig { --k: .84; --push: 22px; margin-top: 12px; width: 100%; } }

/* The review panel (bottom right): four selects. Review chrome only; hidden in the still/reduced-motion pose. */
.opts { position: fixed; right: 16px; bottom: 16px; z-index: 9; display: flex; flex-wrap: wrap; gap: 6px 10px; max-width: calc(100vw - 32px); padding: 8px 10px; border: 1px solid var(--hair); border-radius: 8px; background: var(--paper); font: 400 12px/1 var(--mono); }
.opts label { display: flex; align-items: center; gap: 6px; color: var(--mute); }
.opts select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--hair); border-radius: 5px; padding: 5px 4px; }
.calm .opts { display: none; }
