/* Color lab extras (prefix cx-): white-card bench, filter and mixing panel, range/steps/gamut/print panel */
.cx { margin: 20px 0 22px; }
.prose .cx-title { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.prose .cx-note { color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; margin: 12px 0 0; }
.prose .cx-note b { color: var(--ink); }
.cx .ctrl { margin-bottom: 12px; }
.cx .seg button { white-space: normal; }

/* one white card, six lights */
.cx-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cx-item { margin: 0; text-align: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 4px 10px; --glow: #fff; }
.cx-item svg { display: block; width: 100%; max-width: 120px; height: auto; margin: 0 auto; }
.cx-glow { fill: var(--glow); }
.cx-glow-s { stroke: var(--glow); fill: none; }
.cx-beam { fill: var(--glow); opacity: .16; }
.cx-item figcaption { display: grid; gap: 3px; margin-top: 6px; }
.cx-item figcaption b { font-size: 0.8rem; line-height: 1.2; color: var(--ink); font-weight: 600; }
.cx-item figcaption small { font: 500 0.64rem/1.2 var(--mono); color: var(--ink-3); }
.cx-item figcaption span { font-size: 0.74rem; line-height: 1.25; font-weight: 600; margin-top: 2px; }
.cx-item figcaption span.good { color: var(--teal); }
.cx-item figcaption span.warn { color: var(--rose); }
.cx-item [data-card] { transition: fill .2s; }

/* filter and mixing */
.cx-mix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; scroll-margin-top: 76px; }
.cx-half { min-width: 0; }
.cx-fsvg, .cx-msvg { display: block; width: 100%; height: auto; }
.cx-fsvg text { font-family: var(--mono); }
.cx-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.cx-msvg { max-width: 300px; margin: 0 auto; }

/* range and steps */
.cx-strip { position: relative; }
.cx-strip canvas { display: block; width: 100%; height: 104px; border-radius: 8px; image-rendering: pixelated; }
.cx-strip svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.cx-strip svg text { font-family: var(--mono); }
.cx-strip-label { position: absolute; left: 8px; top: 6px; font: 600 0.62rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.6); padding: 4px 6px; border-radius: 5px; }
.cx-strip-label.b { top: 61px; }
.cx-ctrls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; margin-top: 14px; }
.cx-after .chips { margin-top: 12px; }

/* gamut */
.cx-gamut { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cx-chart { position: relative; aspect-ratio: 320 / 360; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: crosshair; overflow: hidden; touch-action: manipulation; }
.cx-chart canvas, .cx-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cx-chart svg text { font-family: var(--mono); }
.cx-chart [data-g] { fill: none; stroke: #0e0d0b; stroke-opacity: .35; stroke-width: 1.2; stroke-dasharray: 4 4; }
.cx-chart [data-g].is-on { stroke: #fff; stroke-opacity: 1; stroke-width: 2.4; stroke-dasharray: none; fill: #fff; fill-opacity: .1; filter: drop-shadow(0 0 2px rgba(0,0,0,.8)); }
.prose .cx-verdicts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.prose .cx-verdicts li { margin: 0; font-size: 0.86rem; line-height: 1.4; padding-left: 22px; position: relative; color: var(--ink-2); }
.prose .cx-verdicts li b { color: var(--ink); font-weight: 600; }
.cx-verdicts li.good::before, .cx-verdicts li.warn::before { content: ''; position: absolute; left: 2px; top: 5px; width: 10px; height: 10px; border-radius: 50%; }
.cx-verdicts li.good::before { background: var(--teal); }
.cx-verdicts li.warn::before { background: none; border: 2px solid var(--rose); width: 6px; height: 6px; }

/* screen and print */
.cx-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; background: #000; padding: 12px; border-radius: var(--r-sm); }
.cx-pair figure { margin: 0; }
.cx-pair canvas { display: block; width: 100%; height: auto; border-radius: 4px; }
.cx-pair figcaption { font: 500 0.7rem/1.3 var(--mono); color: #b9b2a3; margin-top: 7px; }

@media (max-width: 620px) {
  .cx-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cx-mix { grid-template-columns: 1fr; }
  .cx-ctrls { grid-template-columns: 1fr; }
  .cx-gamut { grid-template-columns: 1fr; }
  .cx-chart { max-width: 320px; margin: 0 auto; width: 100%; }
}
@media (max-width: 420px) { .cx-pair { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .cx-item [data-card] { transition: none; } }
