:root {
  color-scheme:light;
  --bg:#fff;
  --ink:#161616;
  --muted:#6b6f78;
  --soft:#f5f6f8;
  --line:#e9eaee;
  --purple:#8660d5;
  --apricot:#ffc774;
  --blue:#8dbfea;
  --mint:#a6d5bd;
  --button:#161616;
  --button-text:#fff;
  --button-edge:#000;
  --field:#fafafb;
  --danger:#b32936;
  font-family:"Avenir Next",Avenir,"Century Gothic",ui-rounded,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none
}
:root[data-theme=dark] {
  color-scheme:dark;
  --bg:#18191c;
  --ink:#f3f3f5;
  --muted:#a0a3ac;
  --soft:#23252a;
  --line:#35373e;
  --button:#f3f3f5;
  --button-text:#18191c;
  --button-edge:#b5b5ba;
  --field:#202126;
  --danger:#ff9da7
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased
}
button,input,textarea {
  font:inherit
}
button,a,input {
  -webkit-tap-highlight-color:transparent
}
button {
  -webkit-appearance:none;
  appearance:none;
  color:inherit;
  cursor:pointer
}
a {
  color:inherit
}
button:disabled {
  cursor:wait
}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible {
  outline:2px solid var(--purple);
  outline-offset:-4px
}
button {
  border:0
}
svg {
  width:23px;
  height:23px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round
}
.site-header {
  max-width:1160px;
  padding:35px 40px 0;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between
}
.brand {
  display:flex;
  align-items:center;
  text-decoration:none;
  font-size:30px;
  letter-spacing:-1.5px;
  font-weight:800;
  line-height:1
}
.brand-period {
  color:var(--purple)
}
.brand-mark {
  width:32px;
  height:27px;
  display:flex;
  gap:4px;
  margin-right:11px
}
.brand-mark i {
  display:block;
  width:19px;
  background:var(--purple);
  border-radius:3px
}
.brand-mark i+i {
  width:9px;
  background:var(--apricot)
}
.header-actions {
  display:flex;
  gap:8px
}
.icon-button {
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border-radius:11px;
  transition:background .15s,transform .12s
}
.icon-button:hover {
  background:var(--soft)
}
.icon-button:active {
  background:var(--line);
  transform:translateY(2px) scale(.95)
}
.sound-slash { display:none }
#sound-button[aria-pressed=false] .sound-waves { display:none }
#sound-button[aria-pressed=false] .sound-slash { display:block }
.theme-icon-moon { display:none }
.theme-icon-sun { display:block }
:root[data-theme=dark] .theme-icon-sun { display:none }
:root[data-theme=dark] .theme-icon-moon { display:block }
.header-actions .icon-button { position:relative }
.header-actions .icon-button:after {
  content:attr(title);
  position:absolute;
  top:calc(100% + 9px);
  right:0;
  white-space:nowrap;
  padding:5px 9px;
  border-radius:6px;
  background:var(--ink);
  color:var(--bg);
  font-size:11px;
  font-weight:500;
  pointer-events:none;
  opacity:0;
  transform:translateY(-3px);
  transition:opacity .12s,transform .12s;
  z-index:6
}
.header-actions .icon-button:hover:after,.header-actions .icon-button:focus-visible:after {
  opacity:1;
  transform:translateY(0)
}
.app {
  max-width:800px;
  padding:0 30px;
  margin:39px auto 0;
  min-height:630px
}
.steps {
  list-style:none;
  margin:21px auto 30px;
  padding:0;
  display:flex;
  max-width:330px;
  justify-content:space-between;
  position:relative;
  gap:12px
}
.steps:before {
  content:"";
  position:absolute;
  top:14px;
  left:30px;
  right:30px;
  height:1px;
  background:var(--line);
  z-index:-1
}
.step {
  background:var(--bg);
  display:flex;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:12px;
  padding:0 7px
}
.step-number {
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border:1px solid var(--line);
  border-radius:50%;
  font-size:12px;
  font-weight:650;
  background:var(--bg)
}
.step.active {
  color:var(--ink)
}
.step.active .step-number {
  background:var(--ink);
  color:var(--bg);
  border-color:var(--ink)
}
.step.done .step-number {
  background:var(--soft);
  color:var(--ink)
}
.challenge-heading {
  margin-bottom:25px
}
h1 {
  font-size:clamp(36px,5.7vw,56px);
  letter-spacing:-2.3px;
  line-height:1.12;
  font-weight:750;
  margin:0 0 17px
}
p {
  margin:0
}
.question {
  font-size:16px;
  line-height:1.65;
  max-width:590px
}
.basis {
  font-size:12px;
  color:var(--muted);
  margin-top:10px
}
.bar-area {
  padding:8px 0 0
}
.composition {
  display:flex;
  width:100%;
  height:124px;
  position:relative;
  isolation:isolate;
  border-radius:12px;
  box-shadow:0 1px 0 #00000020,0 5px 9px -6px #00000045
}
.segments {
  display:flex;
  width:100%;
  height:100%;
  overflow:hidden;
  border-radius:12px;
  box-shadow:inset 0 1px 0 #ffffff45,inset 0 -2px 0 #0000000b
}
.segment {
  container-type:inline-size;
  height:100%;
  position:relative;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#222;
  font-size:38px;
  font-weight:700;
  letter-spacing:-1.8px;
  font-variant-numeric:tabular-nums;
  transition:width .16s ease,filter .15s
}
.segment>span {
  white-space:nowrap;
  font-size:clamp(20px,32cqi,38px)
}
@container(max-width:64px) {
  .segment>span { visibility:hidden }
}
.segment small,
.target-value small {
  font-size:.43em;
  font-weight:600;
  letter-spacing:-.5px;
  margin-left:2px
}
.segment.part-active { filter:brightness(1.045) }
.dragging .segment {
  transition:none
}
.boundary {
  position:absolute;
  top:50%;
  transform:translate(-50%,-50%);
  width:32px;
  height:64px;
  min-height:44px;
  padding:0;
  background:#fff;
  border-radius:11px;
  box-shadow:0 2px 2px #00000016,0 5px 12px #00000023,inset 0 -2px 0 #e8e8eb;
  touch-action:none;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid #0000000b;
  color:#85858f;
  transition:box-shadow .12s,color .12s
}
.boundary:before,.boundary:after {
  content:"";
  height:19px;
  width:2px;
  background:currentColor;
  border-radius:2px
}
.boundary:hover,.boundary.handle-active {
  color:#6c647c;
  box-shadow:0 2px 3px #00000020,0 6px 15px #00000030,inset 0 -2px 0 #e8e8eb
}
.dragging .boundary.handle-active {
  box-shadow:0 1px 2px #00000020,0 3px 7px #00000025,inset 0 1px 2px #0000000a
}
.boundary:focus-visible {
  z-index:5;
  outline-color:var(--purple);
  outline-offset:-4px
}
.ruler {
  display:flex;
  justify-content:space-between;
  position:relative;
  color:var(--muted);
  font-size:11px;
  margin:13px 0 0;
  padding-top:9px;
  font-variant-numeric:tabular-nums
}
.ruler:before {
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:5px;
  background:repeating-linear-gradient(to right,var(--line) 0 1px,transparent 1px 10%)
}
.edit-hint {
  font-size:12px;
  text-align:center;
  color:var(--muted);
  margin:12px 0 12px
}
.part-list {
  margin-top:5px
}
.part-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:54px;
  padding:0 8px;
  gap:15px;
  background:transparent
}
.part-row+.part-row {
  border-top:1px solid var(--line)
}
.part-row.part-active .color-dot {
  box-shadow:0 0 0 4px color-mix(in srgb,var(--part) 22%,transparent)
}
.part-label {
  display:flex;
  align-items:center;
  gap:11px;
  font-size:15px
}
.color-dot {
  height:10px;
  width:10px;
  flex:none;
  border-radius:3px;
  background:var(--part);
  transition:box-shadow .15s
}
.number-control {
  display:flex;
  align-items:center;
  gap:3px;
  font-weight:650;
  font-variant-numeric:tabular-nums
}
.number-control input {
  width:62px;
  min-height:40px;
  text-align:right;
  padding:6px 10px;
  border:1px solid var(--line);
  background:var(--bg);
  color:var(--ink);
  font-weight:650;
  border-radius:7px;
  appearance:textfield;
  -moz-appearance:textfield
}
.number-control input::-webkit-inner-spin-button,.number-control input::-webkit-outer-spin-button {
  appearance:none
}
.number-control input:hover { border-color:var(--muted) }
.part-row.part-active .number-control input,.number-control input:focus {
  border-color:var(--purple)
}
.number-control input:focus-visible {
  outline:none;
  box-shadow:inset 0 0 0 1px var(--purple)
}
.number-control input:disabled { opacity:.65 }
.number-control>span {
  color:var(--muted);
  font-weight:400;
  font-size:13px
}
.primary {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  background:var(--button);
  color:var(--button-text);
  border-radius:12px;
  min-height:53px;
  padding:13px 25px;
  font-size:15px;
  font-weight:650;
  width:100%;
  box-shadow:0 4px 0 var(--button-edge),0 6px 7px -5px #0005,inset 0 1px 0 #ffffff24;
  transform:translateY(-2px);
  transition:transform .12s,box-shadow .12s,background .12s
}
.primary:hover:not(:disabled) {
  transform:translateY(-3px);
  box-shadow:0 5px 0 var(--button-edge),0 8px 10px -6px #0005,inset 0 1px 0 #ffffff30
}
.primary:active:not(:disabled) {
  transform:translateY(2px);
  box-shadow:0 0 0 var(--button-edge),inset 0 2px 3px #00000020
}
.primary:disabled {
  opacity:.55;
  transform:translateY(1px);
  box-shadow:0 1px 0 var(--button-edge)
}
.primary svg {
  width:18px;
  height:18px
}
.action-area {
  max-width:340px;
  margin:24px auto 0
}
.error {
  color:var(--danger);
  font-size:13px;
  margin:12px 0;
  text-align:center;
  line-height:1.6
}
.notice {
  background:var(--soft);
  border-radius:6px;
  padding:12px 15px;
  font-size:13px;
  margin-bottom:25px;
  color:var(--muted)
}
.loading {
  text-align:center;
  padding:150px 0;
  font-size:14px;
  color:var(--muted)
}
.loading h1 {
  color:var(--ink);
  font-size:clamp(25px,4vw,38px);
  letter-spacing:-1px
}
.game-about {
  max-width:800px;
  margin:48px auto 0;
  padding:24px 30px 36px;
  color:var(--muted);
  font-size:13px;
  line-height:1.7
}
.game-about h2 {
  color:var(--ink);
  border-top:1px solid var(--line);
  padding-top:24px;
  margin:0 0 10px;
  font-size:16px;
  font-weight:650;
  letter-spacing:-.25px
}
.game-about details {
  margin-top:14px
}
.game-about summary {
  width:fit-content;
  cursor:pointer;
  color:var(--ink);
  font-weight:600
}
.game-about summary:focus-visible {
  outline:2px solid var(--purple);
  outline-offset:4px;
  border-radius:2px
}
.game-rules p {
  margin-top:12px
}
.game-footer {
  padding:24px 20px 32px;
  color:var(--muted);
  font-size:13px
}
.game-footer nav {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:0 12px
}
.game-footer a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 8px;
  color:inherit;
  text-decoration:none
}
.game-footer a:hover {
  color:var(--ink);
  text-decoration:underline
}
.game-footer a:focus-visible {
  outline:2px solid var(--purple);
  outline-offset:2px;
  border-radius:2px
}
.loading-bar {
  display:block;
  background:linear-gradient(to right,var(--purple) 0 65%,var(--apricot) 65%);
  width:105px;
  height:25px;
  margin:0 auto 20px;
  border-radius:4px
}
.result-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:25px 0
}
.result-label {
  font-size:14px;
  color:var(--muted)
}
.score {
  font-size:34px;
  font-weight:750;
  letter-spacing:-1.4px;
  line-height:1
}
.score small {
  font-size:13px;
  letter-spacing:0;
  font-weight:400;
  color:var(--muted);
  margin-left:4px
}
.comparison-caption {
  font-size:12px;
  color:var(--muted);
  margin:18px 0 8px
}
.target-bar {
  position:relative;
  display:flex;
  overflow:hidden
}
.target-segment {
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#222;
  font-weight:700;
  letter-spacing:-1.8px;
  font-variant-numeric:tabular-nums
}
.target-value {
  white-space:nowrap
}
.comparison-head {
  display:grid;
  grid-template-columns:1fr 65px 65px 60px;
  font-size:10px;
  color:var(--muted);
  text-align:right;
  margin-top:26px;
  padding-bottom:7px;
  border-bottom:1px solid var(--line)
}
.comparison-head span:first-child {
  text-align:left
}
.comparison-row {
  display:grid;
  grid-template-columns:1fr 65px 65px 60px;
  align-items:center;
  min-height:48px;
  border-bottom:1px solid var(--line);
  font-size:13px;
  text-align:right;
  font-variant-numeric:tabular-nums
}
.comparison-row .part-label {
  font-size:13px;
  gap:8px;
  text-align:left
}
.difference {
  color:var(--muted);
  font-size:12px
}
.explanation {
  margin:23px 0 0;
  font-size:14px;
  line-height:1.8
}
.source-link {
  font-size:12px;
  color:var(--muted);
  display:inline-block;
  margin-top:9px;
  text-underline-offset:3px
}
.reveal .composition,
.target-bar {
  height:72px;
  border-radius:12px;
  box-shadow:0 1px 0 #00000020,0 5px 9px -6px #00000045
}
.reveal .segment,
.target-segment {
  font-size:25px
}
.reveal .segment>span { font-size:inherit }
.result-enter .result-top { animation:result-settle .36s ease-out both }
.result-enter .result-details { animation:result-settle .28s ease-out both }
@keyframes result-settle {
  from { opacity:.4; transform:translateY(5px) }
  to { opacity:1; transform:translateY(0) }
}
.reveal .ruler {
  display:none
}
.summary {
  text-align:center;
  margin-top:0
}
.summary .summary-kicker {
  font-size:13px;
  color:var(--muted);
  margin-bottom:12px
}
.summary h1 {
  font-size:48px;
  margin-bottom:12px
}
.summary-intro {
  font-size:14px;
  color:var(--muted)
}
.total-score {
  font-size:90px;
  line-height:1;
  font-weight:750;
  letter-spacing:-5px;
  margin:30px 0 7px
}
.total-caption {
  font-size:13px;
  color:var(--muted);
  margin-bottom:32px
}
.summary-round {
  text-align:left;
  display:grid;
  grid-template-columns:34px 1fr auto;
  gap:13px;
  align-items:center;
  padding:19px 0;
  border-bottom:1px solid var(--line)
}
.summary-round .round-icon {
  width:32px;
  height:32px;
  background:var(--part);
  border-radius:7px;
  display:grid;
  place-items:center;
  color:#222;
  font-size:13px;
  font-weight:650
}
.summary-round strong {
  font-size:15px;
  font-weight:600
}
.summary-round small {
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:2px
}
.summary-round .round-score {
  font-size:20px;
  font-weight:650;
  font-variant-numeric:tabular-nums
}
.next-game {
  font-size:12px;
  color:var(--muted);
  margin-top:18px
}
.text-button {
  background:transparent;
  text-decoration:underline;
  text-underline-offset:4px;
  font-size:13px;
  padding:10px
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
dialog {
  max-width:460px;
  width:calc(100% - 36px);
  max-height:85dvh;
  padding:25px 29px 30px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--bg);
  color:var(--ink);
  box-shadow:0 20px 100px #0002
}
dialog::backdrop {
  background:#15151e55;
  backdrop-filter:blur(3px)
}
.dialog-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:19px
}
.dialog-head h2 {
  font-size:25px;
  letter-spacing:-.8px;
  margin:0
}
.dialog-head .icon-button {
  flex:none;
  margin-right:-10px
}
.help-copy p {
  font-size:14px;
  line-height:1.8;
  margin-bottom:15px
}
.help-copy a {
  color:var(--ink);
  text-decoration:underline;
  text-underline-offset:3px
}
.help-copy a:hover {
  color:var(--purple)
}
.help-copy a:focus-visible {
  outline:2px solid var(--purple);
  outline-offset:2px;
  border-radius:2px
}
.mini-composition {
  height:45px;
  border-radius:6px;
  display:flex;
  overflow:hidden;
  margin:20px 0
}
.mini-composition span:first-child {
  background:var(--purple);
  width:65%
}
.mini-composition span:last-child {
  background:var(--apricot);
  width:35%
}
.help-note {
  font-size:12px!important;
  color:var(--muted)
}
.stat-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:26px 20px;
  margin:15px 0 28px
}
.stat-number {
  font-size:35px;
  letter-spacing:-1px;
  font-weight:700
}
.stat-name {
  font-size:12px;
  color:var(--muted);
  margin-top:3px
}
.stats-note {
  font-size:12px;
  line-height:1.8;
  color:var(--muted)
}
@media(min-width:900px) {
  .app {
    margin-top:40px
  }
  .challenge-heading {
    margin-bottom:26px
  }
  .summary {
    max-width:580px;
    margin:0 auto
  }
  .summary .total-score {
    margin-top:45px
  }
}
@media(max-width:600px) {
  .site-header {
    padding:21px 19px 0
  }
  .brand {
    font-size:26px
  }
  .brand-mark {
    height:24px;
    width:28px;
    gap:3px;
    margin-right:9px
  }
  .brand-mark i {
    width:17px
  }
  .brand-mark i+i {
    width:8px
  }
  .header-actions {
    gap:0
  }
  .icon-button {
    width:38px;
    height:38px
  }
  .icon-button svg {
    width:21px;
    height:21px
  }
  .app {
    padding:0 24px;
    margin-top:28px;
    min-height:600px
  }
  .steps {
    margin:19px auto 27px;
    max-width:300px;
    gap:3px
  }
  .step {
    gap:6px;
    font-size:11px;
    padding:0 4px
  }
  .step-number {
    width:26px;
    height:26px
  }
  .steps:before {
    top:13px
  }
  .challenge-heading {
    margin-bottom:25px
  }
  h1 {
    font-size:38px;
    letter-spacing:-1.5px;
    margin-bottom:14px
  }
  .question {
    font-size:14px;
    line-height:1.65
  }
  .basis {
    font-size:11px;
    margin-top:9px
  }
  .composition {
    height:104px;
    border-radius:10px
  }
  .segments {
    border-radius:10px
  }
  .segment {
    font-size:34px
  }
  .boundary {
    width:30px;
    height:56px
  }
  .edit-hint {
    font-size:11px;
    line-height:1.6;
    margin:11px 0 10px
  }
  .part-row {
    min-height:51px
  }
  .part-label {
    font-size:14px
  }
  .number-control input {
    font-size:16px
  }
  .action-area {
    margin-top:22px;
    max-width:none
  }
  .primary {
    min-height:52px;
    font-size:14px
  }
  .header-actions .icon-button:after { display:none }
  .comparison-head,.comparison-row {
    grid-template-columns:1fr 47px 47px 42px
  }
  .comparison-row .part-label {
    font-size:12px;
    gap:7px
  }
  .comparison-row {
    font-size:12px
  }
  .explanation {
    font-size:13px
  }
  .score {
    font-size:30px
  }
  .summary h1 {
    font-size:38px
  }
  .total-score {
    font-size:77px;
    margin-top:30px
  }
  .summary-round {
    padding:16px 0;
    gap:10px
  }
  .summary-round strong {
    font-size:13px
  }
  .summary-round .round-score {
    font-size:19px
  }
  .summary-intro {
    font-size:13px
  }
  .summary .total-caption {
    margin-bottom:20px
  }
  .reveal .challenge-heading {
    margin-bottom:18px
  }
  .reveal .composition,
  .target-bar {
    height:58px
  }
  .reveal .composition,
  .reveal .segments {
    border-radius:12px
  }
  .reveal .segment,
  .target-segment {
    font-size:22px
  }
  .notice {
    margin-bottom:20px
  }
  dialog {
    padding:22px
  }
  .dialog-head h2 {
    font-size:23px
  }
}
@media(max-width:360px) {
  .site-header { padding-left:15px; padding-right:15px }
  .brand { font-size:24px }
  .brand-mark { width:24px; margin-right:6px }
  .icon-button { width:34px }
  .app { padding:0 20px }
  .game-about { padding-left:20px; padding-right:20px }
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    transition:none!important;
    animation:none!important;
    scroll-behavior:auto!important
  }
}

.fallback-page {
  max-width:560px;
  margin:clamp(72px,12vh,128px) auto 0;
  padding:0 24px 72px;
  text-align:center
}
.fallback-code {
  margin:0;
  font-size:clamp(112px,24vw,168px);
  font-weight:750;
  letter-spacing:-.07em;
  line-height:1
}
.fallback-split {
  display:block;
  width:104px;
  height:12px;
  margin:24px auto 36px;
  border-radius:3px;
  background:linear-gradient(to right,var(--purple) 0 65%,var(--apricot) 65%)
}
.fallback-page h1 {
  font-size:clamp(32px,6vw,42px);
  letter-spacing:-1.3px;
  margin-bottom:16px
}
.fallback-copy,.script-fallback p {
  max-width:360px;
  margin:0 auto;
  color:var(--muted);
  font-size:15px;
  line-height:1.7
}
.fallback-actions {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  margin-top:28px
}
.fallback-primary {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:48px;
  padding:12px 24px;
  border-radius:9px;
  background:var(--button);
  color:var(--button-text);
  font-size:15px;
  font-weight:650;
  text-decoration:none
}
.fallback-primary:hover {
  background:var(--muted)
}
.fallback-primary:focus-visible,.fallback-secondary:focus-visible {
  outline-offset:4px
}
.fallback-secondary {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  font-size:13px;
  text-underline-offset:4px
}
.script-fallback h2 {
  margin:28px 0 12px;
  color:var(--ink);
  font-size:21px;
  font-weight:650;
  line-height:1.35;
  letter-spacing:-.4px
}

.answer-moving .target-value { visibility:hidden }
.result-details[hidden] { display:none }
