/* The shape rating: a question, five shapes and a word, on a white page. Each shape is printed in three layers of one
   ink, like a risograph: the lighter one underneath, the two darker ones laid over it in multiply. The script reads
   the five inks and the grey of the marks from here. */
:root {
  --page: #ffffff;          /* the page */
  --ink: #1c1b22;           /* the question */
  --muted: #8a8794;         /* the thanks, the word before a pick */
  --empty: #dfdce8;         /* the grey mixed into the waiting marks, under a wash of their ink */
  --mood-1: #6a4cff;        /* the worst mark: violet */
  --mood-2: #2f7bff;        /* blue */
  --mood-3: #14b8a6;        /* the middle: teal */
  --mood-4: #7fcf3f;        /* green */
  --mood-5: #ff7a1a;        /* the best mark: orange */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Recursive Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.mood {
  display: grid;
  justify-items: center;
  width: min(380px, 100%);
  margin: 0;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

.mood__ask {
  margin: 0 0 20px;
  font-size: clamp(25px, 7.2vw, 32px);
  font-weight: 640;
  font-variation-settings: 'CASL' 0.18;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

/* ---------------------------------------------------------------- the shapes */
.mood__row {
  position: relative;
  width: min(310px, 100%);
  margin: 0;
  padding: 0;
  border: 0;
  touch-action: pan-y;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mood__art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* the three prints: the first one plain, the two over it in multiply, so where they overlap the ink deepens; the
   group keeps the multiply to itself, and covers the marks underneath */
.mood__shape {
  isolation: isolate;
}

.mood__print + .mood__print {
  mix-blend-mode: multiply;
}

/* the real choices: one radio button over each shape, see-through */
.mood__choices {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.mood__choices label {
  position: relative;
  cursor: pointer;
}

.mood__choices input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* the keyboard's ring: round the shape */
.mood__choices input:focus-visible + span {
  position: absolute;
  inset: -4px -5px;
  border-radius: 22px;
  box-shadow: 0 0 0 2px var(--ink);
}

/* ---------------------------------------------------------------- the word and the thanks */
.mood__word {
  height: 30px;
  margin: 18px 0 0;
  font-size: 22px;
  line-height: 30px;
  letter-spacing: -0.01em;
}

.mood__word span {
  display: block;
  font-weight: 700;
}

.mood__word .is-idle {
  color: var(--muted);
  font-weight: 450;
}

.mood__thanks {
  min-height: 22px;
  margin: 8px 0 0;
  font-size: 15.5px;
  line-height: 22px;
  color: var(--muted);
  font-variation-settings: 'CASL' 0.4;
}
