/* /tests/color-check: "Is this color mine?". Swatches are flat and exact on plain paper; the paper and ink are the frame. */
.cc { max-width: var(--read); margin: 18px auto 0; display: grid; gap: 22px; }
.cc-noscript { padding: 14px 16px; background: #FFFDF8; box-shadow: var(--shadow-paper); }
.cc-step { display: grid; gap: 12px; padding: 18px 16px 20px; background: #FFFDF8; box-shadow: var(--shadow-paper); border-radius: 2px; }
.cc-step > h2, .cc-result > h2 { font-size: clamp(28px, 7vw, 38px); line-height: 1.04; display: flex; align-items: center; gap: 12px; }
.cc-n { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--berry); color: #FFFDF8; font: 600 20px/1 var(--serif); }
.cc-remember { font-size: 16px; padding: 8px 12px; background: var(--blush-soft); border-left: 4px solid var(--berry); }

/* season pans */
.cc-seasons { border: 0; padding: 0; margin: 0; min-width: 0; }
.cc-seasons-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cc-pan { position: relative; display: block; cursor: pointer; }
.cc-pan input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-pan-in { display: grid; gap: 6px; padding: 8px 8px 9px; background: #fff; border: 2px solid transparent; box-shadow: 0 1px 0 rgba(43, 34, 48, .08), 0 4px 10px -6px rgba(43, 34, 48, .35); border-radius: 3px; transition: transform .25s var(--ease), border-color .2s; min-height: 64px; }
.cc-pan-strip { display: flex; height: 22px; }
.cc-pan-strip i { flex: 1; background: var(--c); }
.cc-pan-name { font: 700 16px/1.15 var(--sans); color: var(--ink); }
.cc-pan:hover .cc-pan-in { transform: translateY(-2px) rotate(-.6deg); }
.cc-pan input:checked + .cc-pan-in { border-color: var(--berry); box-shadow: 0 0 0 1px var(--berry), 0 8px 14px -8px rgba(110, 29, 55, .5); transform: translateY(-2px); }
.cc-pan input:checked + .cc-pan-in .cc-pan-name::after { content: " \2713"; color: var(--berry); }
.cc-pan input:focus-visible + .cc-pan-in { outline: 3px solid var(--berry); outline-offset: 2px; }

/* modes */
.cc-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-modes [role="tab"] { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 10px; font: 700 16px/1.1 var(--sans); color: var(--ink); background: #fff; border: 1.5px solid rgba(43, 34, 48, .35); border-radius: 4px 12px 5px 10px / 10px 5px 12px 4px; cursor: pointer; }
.cc-modes [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cc-panel { display: grid; gap: 12px; justify-items: start; }
.cc-panel[hidden] { display: none; }
.cc-pickrow { display: flex; align-items: center; gap: 14px; }
.cc-pickrow input[type="color"] { width: 84px; height: 84px; padding: 0; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(43, 34, 48, .3), 0 6px 12px -6px rgba(43, 34, 48, .5); background: none; cursor: pointer; flex: none; }
.cc-pick-hex { font: 600 24px/1.1 var(--serif); }
.cc-label { font-weight: 700; }
.cc-hexrow { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 320px; }
.cc-hex-chip { flex: none; width: 52px; height: 52px; background: #fff; box-shadow: inset 0 0 0 1px rgba(43, 34, 48, .25); }
.cc-hexrow input { flex: 1; min-width: 0; min-height: 52px; padding: 8px 12px; font: 600 22px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 4px; }
.cc-hexrow input[aria-invalid="true"] { border-color: var(--berry); box-shadow: 0 0 0 2px var(--blush); }
.cc-privacy { padding: 10px 14px; background: var(--blush-soft); border-left: 4px solid var(--berry); font-size: 17px; }
.cc-drop { width: 100%; display: grid; gap: 8px; justify-items: start; padding: 14px; border: 2px dashed rgba(43, 34, 48, .4); border-radius: 4px; transition: background .2s; }
.cc-drop.is-over { background: var(--blush-soft); border-color: var(--berry); }
.cc-file { position: relative; cursor: pointer; }
.cc-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.cc-file:focus-within { outline: 3px solid var(--berry); outline-offset: 3px; }
.cc-msg { font-size: 16px; color: var(--berry-dark); min-height: 0; }
.cc-msg:empty { display: none; }
.cc-photo { width: 100%; display: grid; gap: 8px; }
.cc-hint { font-weight: 700; font-size: 16.5px; }
.cc-photo-wrap { position: relative; justify-self: start; max-width: 100%; touch-action: none; line-height: 0; background: #fff; box-shadow: 0 0 0 1px rgba(43, 34, 48, .25); }
.cc-photo-wrap canvas { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; cursor: crosshair; touch-action: none; }
.cc-photo-wrap canvas:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; }
.cc-mark { display: none; position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--ink); pointer-events: none; }
.cc-need { padding: 12px 16px; background: #FFFDF8; border-left: 4px solid var(--gold); }
.cc-need[hidden], .cc-result[hidden] { display: none; }

/* result */
.cc-result { display: grid; gap: 20px; padding: 18px 16px 22px; background: #FFFDF8; box-shadow: var(--shadow-paper); border-radius: 2px; position: relative; }
.cc-result h3 { font-size: 26px; line-height: 1.05; margin-bottom: 8px; }
.cc-stage { display: grid; gap: 14px; justify-items: center; position: relative; }
.cc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; width: 100%; max-width: 420px; background: #fff; padding: 8px 8px 4px; box-shadow: 0 1px 0 rgba(43, 34, 48, .08), 0 12px 24px -14px rgba(43, 34, 48, .5); }
.cc-chip { margin: 0; display: grid; gap: 6px; align-content: start; }
.cc-chip figcaption { padding: 0 6px 6px; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.cc-chip figcaption b { display: block; }
.cc-chip figcaption span { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cc-sw { display: block; height: 128px; background: var(--c, #ddd); box-shadow: inset 0 0 0 1px rgba(43, 34, 48, .12); }
.cc-sw--sm { height: 44px; width: 44px; flex: none; }
.cc-stamp { font: 600 24px/1 var(--serif); padding: 8px 16px 9px; border: 3px solid currentColor; border-radius: 6px; transform: rotate(-2.5deg); color: var(--berry); background: rgba(255, 253, 248, .9); }
.cc-stamp[data-tier="yes"] { color: var(--strong); }
.cc-stamp[data-tier="near"] { color: var(--tradition); }
.cc-stamp[data-tier="no"] { color: var(--berry); }

.cc-delta { display: grid; gap: 8px; }
.cc-delta-num { font-size: 18px; }
.cc-delta-num b { font: 600 34px/1 var(--serif); font-variant-numeric: tabular-nums; margin: 0 4px; }
.cc-ruler { position: relative; display: grid; grid-template-columns: 25fr 25fr 50fr; height: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(43, 34, 48, .3); }
.cc-z--yes { background: #BFD9C9; } .cc-z--near { background: #F0DDA8; } .cc-z--no { background: #F1C3CE; }
.cc-pin { position: absolute; top: -7px; width: 4px; height: 30px; margin-left: -2px; background: var(--ink); border-radius: 2px; transition: left .8s var(--ease); box-shadow: 0 0 0 2px #FFFDF8; }
.cc-ruler-ends { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: 25fr 25fr 50fr; font-size: 13.5px; color: var(--ink-soft); line-height: 1.2; }
.cc-sub { font: 700 15px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.cc-near { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cc-near li { align-content: start; display: grid; grid-template-columns: 44px 1fr; grid-template-areas: "sw name" "sw bar" "sw de"; column-gap: 12px; row-gap: 3px; align-items: center; }
.cc-near .cc-sw { grid-area: sw; align-self: start; }
.cc-near-name { grid-area: name; font-weight: 700; font-size: 16px; line-height: 1.2; }
.cc-bar { grid-area: bar; display: block; height: 8px; background: rgba(43, 34, 48, .12); position: relative; }
.cc-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--ink); transform-origin: left; }
.cc-near-de { grid-area: de; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.cc-reasons { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.cc-reasons li { padding-left: 16px; position: relative; }
.cc-reasons li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 8px; background: var(--berry); border-radius: 50%; }
.cc-axes { display: grid; gap: 14px; }
.cc-axis { display: grid; gap: 4px; }
.cc-axis-k { font: 700 15px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.cc-track { position: relative; height: 18px; background: #fff; box-shadow: inset 0 0 0 1px rgba(43, 34, 48, .3); }
.cc-band { position: absolute; top: 0; bottom: 0; background: var(--lilac); box-shadow: inset 0 0 0 1.5px #5B4570; }
.cc-dot { position: absolute; top: -4px; left: var(--at); width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: var(--ink); border: 3px solid #FFFDF8; box-shadow: 0 0 0 1px var(--ink); transition: left .9s var(--ease); }
.is-out .cc-dot { background: var(--berry); box-shadow: 0 0 0 1px var(--berry-dark); }
.cc-track-ends { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-soft); line-height: 1.2; }
.cc-axis-v { font-size: 16px; color: var(--ink); }
.is-out .cc-axis-v { color: var(--berry-dark); font-weight: 700; }

.cc-wear { padding: 14px 16px; background: var(--book); border-radius: 2px; }
.cc-wear[hidden] { display: none; }
.cc-tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: t; }
.cc-tips li { position: relative; padding-left: 34px; counter-increment: t; }
.cc-tips li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 14px/24px var(--sans); text-align: center; }
.cc-ashy { padding: 12px 14px; border-left: 4px solid var(--gold); background: #FBF3DD; font-size: 16.5px; }
.cc-ashy[hidden] { display: none; }
.cc-limit { font-size: 15.5px; color: var(--ink); padding-top: 10px; border-top: 1px dashed rgba(43, 34, 48, .3); }
.cc-result .mascots { margin-top: 0; }

/* entrance: chips slide in like paint chips, stamp lands, bars fill. Off for reduced motion (JS never adds .is-live then). */
.cc-result.is-live.go .cc-chip--yours { animation: cc-slide-l .6s var(--ease) both; }
.cc-result.is-live.go .cc-chip--best { animation: cc-slide-r .6s .12s var(--ease) both; }
.cc-result.is-live.go .cc-stamp { animation: cc-stamp .5s .5s var(--ease) both; }
.cc-result.is-live.go .cc-bar::after { animation: cc-fill .8s .3s var(--ease) both; }
.cc-result.is-live.go .cc-near li { animation: cc-rise .5s .35s var(--ease) both; }
.cc-result.is-live.go .cc-near li + li { animation-delay: .45s; }
.cc-result.is-live.go .cc-dot { animation: cc-dot-in .9s .2s var(--ease) both; }
@keyframes cc-slide-l { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cc-slide-r { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cc-stamp { from { transform: rotate(-2.5deg) scale(1.6); opacity: 0; } to { transform: rotate(-2.5deg) scale(1); opacity: 1; } }
@keyframes cc-fill { from { transform: scaleX(0); } to { transform: none; } }
@keyframes cc-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cc-dot-in { from { margin-left: -13px; left: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cc-result *, .cc-pan-in, .cc-pin, .cc-dot { animation: none !important; transition: none !important; }
}

@media (min-width: 560px) {
  .cc-seasons-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cc-sw { height: 160px; }
  .cc-step, .cc-result { padding: 24px 26px 28px; }
}
@media (min-width: 900px) {
  .cc { max-width: 880px; }
  .cc-seasons-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (forced-colors: active) { .cc-pan input:checked + .cc-pan-in { outline: 3px solid Highlight; } .cc-dot, .cc-pin { background: CanvasText; } }

/* pair it with */
.cc-pair-note { font-size: 16px; color: var(--ink); margin-bottom: 10px; }
.cc-pairs { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.cc-prop { display: flex; height: 52px; background: #fff; padding: 4px; box-shadow: 0 1px 0 rgba(43, 34, 48, .08), 0 8px 16px -12px rgba(43, 34, 48, .5); gap: 2px; }
.cc-prop span { flex: var(--w) 1 0; min-width: 6px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(43, 34, 48, .12); transform-origin: left; }
.cc-prop-names { list-style: none; padding: 0; margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; line-height: 1.25; }
.cc-prop-names li { display: inline-flex; align-items: center; gap: 6px; }
.cc-prop-names i { width: 12px; height: 12px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(43, 34, 48, .3); flex: none; }
.cc-prop-why { font-size: 16px; color: var(--ink); }
.cc-result.is-live.go .cc-prop span { animation: cc-fill .7s .5s var(--ease) both; }

/* ---------- in the lab (site/css/lab.css): the three steps are the panels of one instrument, set off by hairlines ---------- */
.lab .cc { max-width: none; margin: 0; gap: 0; }
.lab .cc-noscript { background: #fff; box-shadow: none; border: 1px solid var(--lab-edge); }
.lab .cc-step, .lab .cc-result { padding: 18px 0 20px; background: transparent; box-shadow: none; border-radius: 0; }
.lab .cc-step + .cc-step, .lab .cc-step + .cc-need, .lab .cc-need + .cc-result, .lab .cc-step + .cc-result { border-top: 1px solid var(--lab-edge); }
.lab .cc-step:first-of-type { padding-top: 0; }
.lab .cc-step > h2, .lab .cc-result > h2 { font-size: clamp(24px, 6vw, 30px); gap: 10px; }
.lab .cc-n { border-radius: 0; width: 30px; height: 30px; background: var(--lab-ink); font-size: 17px; }
.lab .cc-remember, .lab .cc-privacy { background: #fff; border: 1px solid var(--lab-edge); border-left: 3px solid var(--lab-ink); }
.lab .cc-pan-in { border: 1px solid var(--lab-edge); border-radius: 0; box-shadow: none; transition: border-color .2s; }
.lab .cc-pan:hover .cc-pan-in { transform: none; border-color: var(--lab-ink); }
.lab .cc-pan input:checked + .cc-pan-in { border-color: var(--lab-ink); box-shadow: inset 0 0 0 1px var(--lab-ink); transform: none; }
.lab .cc-pan input:checked + .cc-pan-in .cc-pan-name::after { color: var(--lab-ink); }
.lab .cc-pan-name { font-size: 15.5px; }
.lab .cc-modes { gap: 8px; }
.lab .cc-modes [role="tab"] { border-radius: 0; border: 1px solid var(--lab-edge); background: #fff; font-size: 15.5px; }
.lab .cc-modes [role="tab"][aria-selected="true"] { background: var(--lab-ink); border-color: var(--lab-ink); color: #fff; }
.lab .cc-drop { border: 1px dashed var(--lab-tick); border-radius: 0; }
.lab .cc-hexrow input { border: 1px solid var(--lab-ink); border-radius: 0; }
.lab .cc-split { box-shadow: none; border: 1px solid var(--lab-edge); }
.lab .cc-sw { box-shadow: none; }
.lab .cc-stamp { transform: none; border-radius: 0; border-width: 2px; background: #fff; font-size: 20px; }
.lab .cc-ruler, .lab .cc-track { box-shadow: 0 0 0 1px var(--lab-edge); }
.lab .cc-pin { border-radius: 0; box-shadow: 0 0 0 2px #fff; }
.lab .cc-dot { border-radius: 0; width: 22px; height: 22px; margin-left: -11px; top: -2px; border-width: 2px; }
.lab .cc-wear { background: #fff; border: 1px solid var(--lab-edge); }
.lab .cc-ashy { background: #fff; border: 1px solid var(--lab-edge); border-left: 3px solid var(--lab-ink); }
.lab .cc-tips li::before { border-radius: 0; background: var(--lab-ink); color: #fff; }
.lab .cc-limit { border-top: 1px solid var(--lab-edge); }
.lab .cc-sub, .lab .cc-axis-k { color: var(--lab-sub); letter-spacing: .14em; }
.lab .cc-reasons li::before { border-radius: 0; background: var(--lab-ink); }
@media (min-width: 560px) { .lab .cc-step, .lab .cc-result { padding: 20px 0 24px; } }
