:root {
  color-scheme: light;
  --ink: #292c2a;
  --muted: #61665f;
  --hot: #ff846d;
  --mono: "SFMono-Regular", Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f7f3;
  color: var(--ink);
  font:
    16px/1.5 "Helvetica Neue",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
header {
  height: 78px;
  border-bottom: 1px solid #dcded6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5%, calc((100% - 1120px) / 2));
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -1.3px;
}
.mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #fb836c;
  color: #252925;
  display: grid;
  place-content: center;
  font: bold 36px/1 Georgia;
  transform: rotate(-5deg);
}
button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.help {
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.help b {
  border: 1.5px solid;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  line-height: 15px;
  font-size: 12px;
}
main {
  max-width: 1000px;
  margin: clamp(36px, 6vh, 78px) auto 32px;
  padding: 0 28px;
}
.intro h1 {
  font:
    normal clamp(54px, 5.5vw, 82px) / 1.08 Georgia,
    serif;
  letter-spacing: -0.065em;
  margin: 0;
}
.intro h1 span {
  color: #e97460;
}
.intro p {
  color: var(--muted);
  margin: 12px 0 29px;
  font-size: 18px;
}
.instrument {
  border-radius: 24px;
  overflow: hidden;
  background: #222623;
  color: #f7f7ef;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  box-shadow: 0 12px 24px -18px #171f18aa;
}
.pad {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 28px 25px;
  background: radial-gradient(
    ellipse at 50% 52%,
    #33332d 0%,
    #282c28 56%,
    #272b27 76%
  );
  border-right: 1px solid #444842;
}
.cap {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 12px var(--mono);
  color: #dbded6;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: var(--hot);
}
.well {
  width: min(100%, 290px);
  height: 290px;
  max-width: 100%;
  position: relative;
  margin: -4px 0 -5px;
}
.well canvas {
  width: 100%;
  height: 100%;
  display: block;
}
#tap {
  color: #212621;
  background: var(--hot);
  font-weight: 650;
  border: 0;
  border-radius: 100px;
  min-width: 198px;
  padding: 13px 24px;
  box-shadow: inset 0 1px #ffc3b5;
  transition:
    background 0.18s,
    transform 0.15s;
}
#tap:hover {
  background: #ff9a85;
}
#tap:active {
  transform: scale(0.97);
}
#tap span:first-child {
  padding-right: 5px;
}
.shortcut {
  color: #b9bcb5;
  font-size: 13px;
  margin-top: 12px;
}
kbd {
  font: 12px var(--mono);
  border: 1px solid #5b6058;
  border-radius: 4px;
  padding: 1px 6px;
}
.readings {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.label,
.axis {
  font: 12px var(--mono);
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: #bfc4b9;
}
.value {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 100px;
}
.value strong {
  font:
    500 clamp(68px, 7vw, 96px) / 1.1 "Helvetica Neue",
    Arial,
    sans-serif;
  letter-spacing: -0.065em;
  color: var(--hot);
}
.value > span {
  font: 14px var(--mono);
  color: #bec3b9;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #454942;
  border-bottom: 1px solid #454942;
  padding: 23px 0;
}
.metrics > div + div {
  padding-left: 24px;
  border-left: 1px solid #454942;
}
.metric {
  font-size: 37px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: 6px;
  letter-spacing: -2px;
}
.metric small {
  font-size: 16px;
  color: #bec3b9;
}
.timeline {
  margin-top: 22px;
}
.graph {
  position: relative;
  height: 41px;
  margin: 10px 0 5px;
  background:
    repeating-linear-gradient(90deg, #3a4038 0 1px, transparent 1px 5%),
    linear-gradient(transparent 49%, #62665c 50%, transparent 53%);
}
.graph i {
  position: absolute;
  top: 18%;
  height: 64%;
  width: 2px;
  border-radius: 4px;
  background: var(--hot);
}
.axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  padding: 19px 2px;
}
.clock {
  font-size: 20px;
}
.note button {
  margin-left: auto;
  border: 0;
  background: transparent;
  text-decoration: underline;
  color: inherit;
}
.sr {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
dialog:not([open]) {
  display: none;
}
dialog {
  border: 0;
  border-radius: 20px;
  max-width: min(455px, 92vw);
  padding: 32px;
  max-height: 85vh;
  overflow: auto;
  background: #f7f7f3;
  color: var(--ink);
}
dialog::backdrop {
  background: #171b18aa;
}
dialog h2 {
  font: 36px Georgia;
  margin: 0 0 20px;
}
dialog ol {
  padding-left: 20px;
}
dialog li {
  margin: 12px 0;
}
dialog p,
dialog a {
  font-size: 14px;
  color: var(--muted);
}
.close {
  float: right;
  border: 0;
  background: transparent;
  font-size: 24px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #659edf;
  outline-offset: 4px;
}
@media (max-width: 680px) {
  header {
    height: 62px;
  }
  main {
    padding: 0 16px;
    margin-top: 24px;
  }
  .intro p {
    font-size: 16px;
    margin: 7px 0 17px;
  }
  .instrument {
    grid-template-columns: 1fr;
  }
  .pad {
    padding: 16px 20px;
    border: 0;
  }
  .well {
    width: 196px;
    height: 196px;
    margin: -12px 0 -9px;
  }
  .shortcut {
    margin-top: 7px;
  }
  .readings {
    padding: 19px 20px;
    display: grid;
    grid-template-columns: 0.85fr 1.3fr;
    gap: 12px;
    border-top: 1px solid #454942;
  }
  .value {
    gap: 6px;
    min-height: 0;
    align-items: baseline;
  }
  .value strong {
    font-size: 49px;
  }
  .value > span {
    font-size: 12px;
  }
  .metrics {
    border: 0;
    padding: 0;
    gap: 9px;
  }
  .metrics > div + div {
    padding-left: 8px;
  }
  .metric {
    font-size: 30px;
  }
  .timeline {
    grid-column: 1/-1;
    margin: 0;
    border-top: 1px solid #454942;
    padding-top: 12px;
  }
  .graph {
    height: 22px;
  }
  .label {
    font-size: 12px;
    letter-spacing: 0.015em;
  }
  .note {
    align-items: baseline;
    padding-top: 12px;
  }
  .axis {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.history {
  margin: 17px 0 0;
  border-top: 1px solid #d6d9d0;
  padding: 22px 0;
}
.history-head,
.history li,
.choices {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.history h2 {
  font:
    normal 32px/1.2 Georgia,
    serif;
  letter-spacing: -0.055em;
  margin: 0;
}
.history p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 14px;
}
.history-head button {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  font-size: 14px;
}
.history ol {
  padding: 0;
  margin: 12px 0;
}
.history li {
  padding: 12px 0;
  border-bottom: 1px solid #dcdfd7;
}
.history time,
.history summary {
  color: var(--muted);
  font-size: 14px;
}
.history summary {
  cursor: pointer;
}
.choices {
  justify-content: flex-end;
  margin-top: 24px;
}
.choices button {
  border: 1px solid #bdc2b8;
  background: transparent;
  padding: 8px 14px;
  border-radius: 22px;
}
.choices button:last-child {
  background: var(--hot);
  border-color: var(--hot);
}
.mark {
  transform: none;
}
.mark svg {
  display: block;
}
.well {
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.well:focus-visible {
  outline-offset: -5px;
}
.ripple {
  pointer-events: none;
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1px solid #ff9b83;
  opacity: 0;
}
.pad {
  isolation: isolate;
}
.pad::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(#999b80 0.65px, transparent 0.85px) 1px 1px/7px
    7px;
  opacity: 0.12;
  mask-image: radial-gradient(ellipse at 50% 45%, transparent 20%, #000 87%);
}
.well:before {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 45% 37%, #4a3b2f55, transparent 75%), #21251f;
  box-shadow:
    inset 0 2px 9px #15191166,
    0 1px 0 #ffffff14;
}
.value strong {
  font-variant-numeric: tabular-nums;
}
.graph i {
  transform-origin: center;
}
.graph {
  overflow: hidden;
}
.help,
.history-head button,
.choices button {
  transition:
    color 0.18s,
    background 0.18s;
}
.help:hover,
.history-head button:hover {
  color: #a14635;
}
.choices button:hover {
  background: #e8e9e3;
}
.choices button:last-child:hover {
  background: #ff9c87;
}
.history li strong {
  font-weight: 550;
}
.instrument {
  border: 1px solid #353a34;
}
#tap {
  position: relative;
  min-height: 48px;
  user-select: none;
}
.intro h1 {
  font-weight: 400;
}
.status {
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(7px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  @keyframes mark-in {
    from {
      transform: scaleY(0.15);
      opacity: 0.2;
    }
    to {
      transform: scaleY(1);
      opacity: 1;
    }
  }
  @keyframes settle {
    0% {
      transform: translateY(4px);
      opacity: 0.6;
    }
    100% {
      transform: none;
      opacity: 1;
    }
  }
  .instrument {
    animation: arrive 0.45s ease-out both;
  }
  .graph i {
    animation: mark-in 0.2s ease-out;
  }
  .history li:first-child,
  dialog[open],
  body[data-phase="done"] .value {
    animation: settle 0.26s ease-out;
  }
  .sculpture img {
    will-change: transform;
  }
  #tap {
    transition:
      transform 0.16s,
      background 0.16s,
      box-shadow 0.16s;
  }
  #tap:hover {
    box-shadow:
      0 3px 18px #ff886b20,
      inset 0 1px #ffc3b5;
  }
  #tap:active {
    box-shadow: inset 0 2px 5px #9d49384a;
  }
}
@media (max-width: 380px) {
  .readings {
    grid-template-columns: 1fr 1.3fr;
    padding: 16px 14px;
  }
  .value strong {
    font-size: 40px;
  }
  .value {
    gap: 4px;
  }
  .intro h1 {
    font-size: 48px;
  }
}

button {
  -webkit-appearance: none;
  appearance: none;
}
#tap,
.well {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.help,
.close,
#clear,
#reset,
.choices button {
  min-height: 44px;
  min-width: 44px;
}
.choices {
  flex-wrap: wrap;
}
.history summary {
  min-height: 44px;
  padding-block: 10px;
}
@media (hover: none) and (pointer: coarse) {
  .shortcut {
    display: none;
  }
}
@media (max-width: 380px) {
  dialog {
    padding: 20px;
  }
  .choices {
    justify-content: flex-start;
  }
}
@media (orientation: landscape) and (max-height: 520px) and (min-width: 480px) {
  header {
    height: 48px;
  }
  main {
    margin-top: 14px;
  }
  .intro h1 {
    font-size: 40px;
  }
  .intro p {
    margin: 3px 0 12px;
    font-size: 16px;
  }
  .instrument {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .pad {
    padding: 12px;
  }
  .well {
    width: 126px;
    height: 126px;
    margin: -3px 0;
  }
  .readings {
    display: flex;
    padding: 12px 16px;
    gap: 5px;
    border-top: 0;
  }
  .value {
    min-height: 0;
  }
  .value strong {
    font-size: 40px;
  }
  .metrics {
    padding: 5px 0;
  }
  .metric {
    font-size: 24px;
    margin: 0;
  }
  .timeline {
    margin: 0;
    padding: 0;
  }
  .graph {
    height: 16px;
    margin: 4px 0;
  }
}
.sculpture {
  position: absolute;
  inset: 16.5%;
  pointer-events: none;
  display: block;
}
.sculpture img {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-user-drag: none;
  transform-origin: 50% 55%;
}
.well::before {
  background: radial-gradient(
    ellipse at 43% 29%,
    #444039 0,
    #2b2c26 45%,
    #1c201c 86%
  );
  box-shadow:
    inset 0 2px 8px #10130f88,
    0 1px 0 #f1efe722;
}
.well::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  box-shadow:
    0 -1px 1px #baba9b0e,
    inset 0 1px 0 #f2edde13;
}
.graph {
  isolation: isolate;
}
.graph::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #ff956b03, #ff956b12);
  border-right: 1px solid #ec947a88;
  transform: scaleX(0);
  transform-origin: left;
}
@keyframes trace-window {
  to {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: no-preference) {
  body[data-phase="running"] .graph::before {
    animation: trace-window 30s linear forwards;
  }
}
body[data-phase="done"] .graph::before {
  transform: scaleX(1);
}
body[data-phase="done"][data-result="complete"] .dot {
  width: 11px;
  height: 6px;
  border-radius: 0;
  border-left: 2px solid #bed7bc;
  border-bottom: 2px solid #bed7bc;
  background: transparent;
  transform: translateY(-2px) rotate(-45deg);
}
.history li strong {
  font-variant-numeric: tabular-nums;
}
.history li time {
  text-align: right;
}

@media (prefers-reduced-motion: no-preference) {
  .well:active .sculpture {
    transform: scale(0.986);
  }
  .sculpture {
    transition: transform 90ms ease-out;
  }
}
@media (max-width: 380px) {
  .readings {
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.45fr);
    gap: 9px;
  }
  .metrics {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4px;
  }
  .label {
    letter-spacing: 0;
  }
}
