/* css.slopped.site exhibit: One colour, a whole palette. From css/exhibits/palette.mjs. */
.x-palette .palette { display: grid; gap: 18px; }
.x-palette .seeds { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.x-palette legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.x-palette .seed { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 8px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; cursor: pointer; }
.x-palette .seed input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.x-palette .chip { width: 28px; height: 28px; border-radius: 50%; background: oklch(0.7 0.14 var(--h)); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2); }
.x-palette .seed:has(:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.x-palette .seed:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.x-palette .paint { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
@media (max-width: 700px) { .x-palette .paint { grid-template-columns: minmax(0, 1fr); } }
.x-palette .swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.x-palette .sw { display: flex; align-items: end; min-height: 64px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgb(0 0 0 / .15); font-size: 13px; font-weight: 700; }
.x-palette .poster { padding: 26px; border-radius: 16px; }
.x-palette .poster .kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.x-palette .poster h3 { margin: 10px 0 0; font-size: clamp(34px, 5vw, 52px); letter-spacing: -1.5px; }
.x-palette .poster .body { max-width: 34ch; margin: 10px 0 18px; }
.x-palette .poster .tag { display: inline-block; margin: 0; padding: 6px 14px; border-radius: 999px; font-weight: 700; }
/* the fallback palette, before any relative colour: the moss one, written out */
.x-palette .paint { --seed: #6fb27c; --surface: #f1f7f0; --ink: #16301d; --soft: #d3e8d4; --line: #9cc6a2; --far: #b083c2; }
/* key */
/* the seed: whichever chip is picked */
.x-palette .palette:has(#seed-moss:checked) .paint { --seed: oklch(0.7 0.14 145); }
.x-palette .palette:has(#seed-tide:checked) .paint { --seed: oklch(0.7 0.14 200); }
.x-palette .palette:has(#seed-dusk:checked) .paint { --seed: oklch(0.7 0.14 285); }
.x-palette .palette:has(#seed-berry:checked) .paint { --seed: oklch(0.7 0.14 350); }
.x-palette .palette:has(#seed-ember:checked) .paint { --seed: oklch(0.7 0.14 35); }
.x-palette .palette:has(#seed-brass:checked) .paint { --seed: oklch(0.7 0.14 85); }

/* everything else, worked out from the seed: same hue, fixed lightness, so the contrast holds for any hue */
@supports (color: oklch(from red l c h)) {
  .x-palette .paint {
    --surface: oklch(from var(--seed) 0.97 0.02 h);
    --ink: oklch(from var(--seed) 0.27 0.07 h);
    --soft: color-mix(in oklch, var(--seed) 30%, var(--surface));
    --line: color-mix(in oklch, var(--seed) 60%, var(--surface));
    --far: oklch(from var(--seed) l c calc(h + 180));   /* across the wheel */
  }
}
.x-palette .poster { background: var(--surface); color: var(--ink); border: 3px solid var(--line); box-shadow: 10px 10px 0 var(--soft); }
.x-palette .poster .tag { background: var(--seed); color: var(--ink); }
.x-palette .poster .kicker { color: var(--ink); border-bottom: 4px solid var(--far); display: inline-block; }
/* /key */
.x-palette .sw-seed { background: var(--seed); color: var(--ink); }
.x-palette .sw-surface { background: var(--surface); color: var(--ink); }
.x-palette .sw-ink { background: var(--ink); color: var(--surface); }
.x-palette .sw-soft { background: var(--soft); color: var(--ink); }
.x-palette .sw-line { background: var(--line); color: var(--ink); }
.x-palette .sw-far { background: var(--far); color: var(--ink); }
@media (forced-colors: active) { .x-palette .seed:has(:checked) { outline: 3px solid Highlight; } }

/* live support notes (built from css/exhibits.js) */
.sup-relative-color .sup-no { display: none; }
@supports not (color: oklch(from red l c h)) { .sup-relative-color .sup-yes { display: none; } .sup-relative-color .sup-no { display: inline; } .sup-relative-color { --sup: var(--no); } }
.sup-color-mix .sup-no { display: none; }
@supports not (color: color-mix(in oklch, red, blue)) { .sup-color-mix .sup-yes { display: none; } .sup-color-mix .sup-no { display: inline; } .sup-color-mix { --sup: var(--no); } }
.sup-has .sup-no { display: none; }
@supports not selector(:has(*)) { .sup-has .sup-yes { display: none; } .sup-has .sup-no { display: inline; } .sup-has { --sup: var(--no); } }
