:root {
  --ink: #111111;
  --muted: #777777;
  --track: #e4e4e4;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 620px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.counter {
  min-height: 1.4em;
  margin: 0 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 2.5rem;
  color: var(--muted);
}

.step {
  display: none;
}

.step.active {
  display: block;
}

/* Name */

.field span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input[type='text'] {
  width: 100%;
  padding: 0.5rem 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: none;
}

input[type='text']:focus {
  border-bottom-width: 2px;
}

/* Idea brief */

.brief {
  margin: 0 0 2.5rem;
}

.brief p {
  margin: 0 0 1rem;
}

.brief .k {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Dials */

.dials {
  display: grid;
  gap: 2rem;
  margin: 0 0 2.5rem;
}

.dial-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.dial-head label {
  font-weight: 600;
}

.dial-head output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.range {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 36px;
  margin: 0;
  background: transparent;
  cursor: grab;
  touch-action: pan-y;
}

.range:active {
  cursor: grabbing;
}

.range:focus {
  outline: none;
}

.range::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--ink) var(--fill), var(--track) var(--fill));
}

.range::-moz-range-track {
  height: 2px;
  background: var(--track);
}

.range::-moz-range-progress {
  height: 2px;
  background: var(--ink);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--ink);
}

.range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--ink);
}

.range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink);
}

.range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink);
}

/* Not yet rated: empty track, hollow thumb. */

.range.untouched::-webkit-slider-runnable-track {
  background: var(--track);
}

.range.untouched::-moz-range-progress {
  background: var(--track);
}

.range.untouched::-webkit-slider-thumb {
  background: #fff;
  border-color: #bbbbbb;
}

.range.untouched::-moz-range-thumb {
  background: #fff;
  border-color: #bbbbbb;
}

.ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Message and actions */

.message {
  min-height: 1.4em;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--error);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

button {
  margin-left: auto;
  padding: 0.6rem 1.4rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}

button.link {
  margin-left: 0;
  padding: 0.6rem 0;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 0;
}

button.link:hover {
  color: var(--ink);
}

button[hidden] {
  display: none;
}

button[disabled] {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 480px) {
  .shell {
    padding: 2.5rem 1.25rem 4rem;
  }
}
