@charset "UTF-8";
* {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
}

html, body, figure, div {
  display: grid;
}

html {
  min-height: 100%;
}

body {
  --hl: 0;
  grid-template-rows: 1fr auto;
  container-type: inline-size;
  background: #22242a;
  color: #7b849c;
  font: Round(clamp(.75em, 2.5vmin, 1.25em), 1px)/1.25 jura, trebuchet ms, sans-serif;
}

svg {
  position: fixed;
}

figure, [type=range] {
  --r: 5/ 3;
  --w: min(100cqw - 3em - .5em, 1200px);
  grid-area: 1/1;
  place-self: center;
}

figure {
  width: var(--w);
  filter: url(#comp) drop-shadow(2px 2px 5px #000);
}

img {
  width: 100%;
  aspect-ratio: var(--r);
  object-fit: cover;
  object-position: 50% 41%;
  mask: linear-gradient(90deg, red calc(var(--p)*1%), rgba(0, 0, 0, 0.5) 0);
}

[type=range] {
  /* allow styling in WebKit browsers */
  /* position of thumb vertical midline */
  --pos:
  	calc(1.5em +
  		   var(--p)/100*(100% - 3em));
  /* ensure it's on top of figure; without z-index, 
   * its thumb shows up on top of the figure element... 
   * but its background is painted underneath 🙀 */
  z-index: 1;
  width: calc(var(--w) + 3em);
  height: calc(var(--w)/(var(--r)));
  opacity: calc(1 - .625*(1 - var(--hl)));
  /* vertical split line coincides with thumb vertical midline */
  background: linear-gradient(90deg, #0000 calc(var(--pos) - .5*2px), currentcolor 0 calc(var(--pos) + .5*2px), #0000 0) 0 0/100% calc(50% - 1.5em) space;
  color: #ededed;
  /* some kind of :hover/ :focus extra style */
  filter: drop-shadow(1px 0 2px rgba(0, 0, 0, var(--hov, 1)));
  /* allow click through to images & right click context menu */
  pointer-events: none;
  /* style thumb cross-browser */
}
[type=range], [type=range]::-webkit-slider-thumb {
  appearance: none;
}
[type=range]::-webkit-slider-thumb {
  /* full area coverage gradient */
  --full: linear-gradient(red 0 0);
  /* set explicitly as it's content-box in Firefox & 
   * we want border & padding subtracted from dims */
  box-sizing: border-box;
  /* highlight thumb boundary */
  border: solid 2px currentcolor;
  /* create space between lateral ◀ ▶ tips & border */
  /* precisely ½ of width of a background-size  
   * rectangle minus a border width */
  padding: calc(0.63em + -1*2px);
  /* set both width & height to same value here as 
   * aspect-ratio fails in Firefox for slider thumbs */
  width: 3em;
  height: 3em;
  border-radius: 50%;
  /* make round */
  background: repeating-conic-gradient(from 60deg, currentcolor 0% 60deg, #0000 0% 50%) 0/42% space border-box;
  /* mask out padding area containing half backgrounds 
   * not covered by border; border area + content-box 
   * remain visible; out of the ▶◀ ▶◀ bg pattern, 
   * the outer triangles are masked out, leaving ◀ ▶ */
  mask: var(--full) content-box, var(--full) padding-box exclude, var(--full);
  /* make it clickable as slider was made unclickable 
   * to allow for click through to images and context 
   * menu on them */
  pointer-events: auto;
  /* proper resize cursor */
  cursor: ew-resize;
}
[type=range]::-moz-range-thumb {
  /* full area coverage gradient */
  --full: linear-gradient(red 0 0);
  /* set explicitly as it's content-box in Firefox & 
   * we want border & padding subtracted from dims */
  box-sizing: border-box;
  /* highlight thumb boundary */
  border: solid 2px currentcolor;
  /* create space between lateral ◀ ▶ tips & border */
  /* precisely ½ of width of a background-size  
   * rectangle minus a border width */
  padding: calc(0.63em + -1*2px);
  /* set both width & height to same value here as 
   * aspect-ratio fails in Firefox for slider thumbs */
  width: 3em;
  height: 3em;
  border-radius: 50%;
  /* make round */
  background: repeating-conic-gradient(from 60deg, currentcolor 0% 60deg, #0000 0% 50%) 0/42% space border-box;
  /* mask out padding area containing half backgrounds 
   * not covered by border; border area + content-box 
   * remain visible; out of the ▶◀ ▶◀ bg pattern, 
   * the outer triangles are masked out, leaving ◀ ▶ */
  mask: var(--full) content-box, var(--full) padding-box exclude, var(--full);
  /* make it clickable as slider was made unclickable 
   * to allow for click through to images and context 
   * menu on them */
  pointer-events: auto;
  /* proper resize cursor */
  cursor: ew-resize;
}
figure:hover + [type=range], [type=range]:hover, [type=range]:focus {
  --hl: 1 ;
}
[type=range]:focus {
  outline: none;
}

[role=group] {
  grid-template-columns: auto 1fr;
  grid-gap: 0.5rem 0.75em;
  padding: 0.5em;
  background: #1b1d22;
}

[id=lbl] {
  grid-area: 1/1/span 2;
  rotate: 0.5turn;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: 600;
}

code {
  --prc: calc(var(--hl)*100%);
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: victor mono, ubuntu mono, consolas, monaco, monospace;
}
code:last-child::after {
  display: inline-block;
  padding-left: 1ch;
  content: " /* complementary */";
}
code:hover, code:focus-within {
  --hl: 1 ;
}

label, output {
  color: color-mix(in srgb, var(--c, #f5886b) var(--prc), currentcolor);
}

[type=color] {
  margin: 0 0.25em;
  border: solid 1px currentcolor;
  width: 1lh;
  height: 1lh;
  border-radius: 50%;
  background: #0000;
  color: rgba(170, 170, 170, var(--hl));
  filter: drop-shadow(2px 2px 5px #000);
  transition: color 0.3s;
  cursor: pointer;
}
[type=color]::-webkit-color-swatch-wrapper {
  padding: 3px;
}
[type=color]::-webkit-color-swatch {
  border: solid 1px currentcolor;
  border-radius: 50%;
}
[type=color]::-moz-color-swatch {
  border: solid 1px currentcolor;
  border-radius: 50%;
}
[type=color]:focus {
  outline: none;
}

output {
  --c: #f1c972;
}
output::after {
  content: ";";
}