:root {
  --jc-body: #2f3337;
  --jc-detail: #4b5157;
  --jc-left: #2fb5d8;
  --jc-right: #e2594a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --jc-body: #3a4046;
    --jc-detail: #5a6168;
  }
}

.diagram {
  display: block;
  align-self: end;
  width: 100%;
  max-width: 26rem;
  height: auto;
  margin: 0 auto;
}

.dg-body {
  fill: #2b3138;
}

.dg-rail-left {
  fill: #3ec6f0;
}

.dg-rail-right {
  fill: #ff6a5c;
}

.dg-key {
  fill: #48515a;
}

.dg-key-label {
  fill: #a3adb6;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
}

.dg-stick {
  fill: #1b1f24;
  stroke: #48515a;
  stroke-width: 3;
}

.dg-button {
  fill: #48515a;
}

.dg-led {
  fill: #58626c;
}

.dg-led-lit,
.dg-sweep-1,
.dg-sweep-3 {
  fill: #b5f5e2;
}

.dg-sweep {
  animation: led-sweep 1.6s linear infinite;
}

.dg-sweep-2 {
  animation-delay: 0.2s;
}

.dg-sweep-3 {
  animation-delay: 0.4s;
}

.dg-sweep-4 {
  animation-delay: 0.6s;
}

@keyframes led-sweep {
  0%,
  30%,
  100% {
    fill: #58626c;
  }

  8%,
  22% {
    fill: #b5f5e2;
  }
}

.dg-rays-left,
.dg-rays-right {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  animation: rays 1.6s ease-in-out infinite;
}

.dg-rays-left {
  stroke: #3ec6f0;
}

.dg-rays-right {
  stroke: #ff6a5c;
}

@keyframes rays {
  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }
}

.dg-sync {
  fill: #15191d;
  stroke: #6b757e;
  stroke-width: 1.5;
}

.dg-ring {
  fill: color-mix(in srgb, var(--teal) 18%, transparent);
  stroke: var(--teal);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: ring 1.8s ease-in-out infinite;
}

@keyframes ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.25);
    opacity: 0.55;
  }
}

.dg-arrow {
  fill: none;
  stroke: var(--teal);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dg-callout {
  fill: var(--teal-text);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.dg-callout-sub {
  fill: var(--ink-2);
  font-family: var(--font);
  font-size: 13px;
}

.dg-window {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.dg-list {
  fill: none;
  stroke: var(--line-strong);
}

.dg-row-selected {
  fill: var(--teal-soft);
  stroke: var(--teal);
  stroke-width: 1.5;
}

.dg-skeleton {
  fill: var(--track);
}

.dg-skeleton-strong {
  fill: var(--ink-2);
}

.dg-bt {
  fill: none;
  stroke: var(--teal-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dg-button-outline {
  fill: none;
  stroke: var(--line-strong);
}

.dg-button-fill {
  fill: var(--teal);
}

.dg-button-text,
.dg-button-text-muted {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
}

.dg-button-text {
  fill: #ffffff;
}

.dg-button-text-muted {
  fill: var(--ink-2);
}

.dg-cursor {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.choice-art {
  display: block;
  width: 100%;
  max-width: 16rem;
  height: auto;
  overflow: visible;
}

.choice-art-wide {
  max-width: 20rem;
}

.art-mini {
  stroke: var(--teal-tint);
  stroke-width: 2;
  paint-order: stroke;
}

.art-mini-stick {
  fill: #1b1f24;
}

.hw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  width: min(100%, 60rem);
  margin: 0 auto;
}

.hw-card {
  position: relative;
  display: grid;
  gap: 1rem;
  align-content: start;
  justify-items: center;
  margin: 0;
  padding: clamp(2.75rem, 4vw, 3.25rem) clamp(1rem, 2.4vw, 1.75rem) clamp(1rem, 2.4vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-2);
}

.hw-card[data-tone="ok"] {
  border-color: var(--teal-soft-line);
  background: var(--teal-tint);
}

.hw-badge {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
}

.hw-badge .icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 3;
}

.hw-badge[data-tone="ok"] {
  background: var(--cta);
  color: #ffffff;
}

.hw-badge[data-tone="no"] {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
}

.hw-art {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
}

.choice-card .hw-art {
  max-width: 16rem;
}

.hw-art-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 10rem;
  opacity: 0.6;
  filter: saturate(0.7);
}

.hw-art-small {
  display: block;
  width: clamp(6rem, 12vw, 8rem);
  height: auto;
}

.hw-text {
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.hw-name {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 700;
  text-align: center;
}

.hw-sub {
  color: var(--ink-2);
  text-align: center;
}

.hw-tells {
  display: grid;
  gap: 0.5rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.hw-tells li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.hw-tells .icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1875rem;
  color: var(--teal-strong);
  stroke-width: 3;
}

.art-stick-cap {
  fill: #3a434c;
}

.art-glyph {
  fill: none;
  stroke: #48515a;
  stroke-width: 4;
  stroke-linecap: round;
}

.art-home {
  fill: #1b1f24;
  stroke: #48515a;
  stroke-width: 2.5;
}

.art-c-label {
  fill: #e4ecf2;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
}

.art-leader {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.art-original-left {
  fill: #0ab9e6;
}

.art-original-right {
  fill: #ff3c28;
}

.art-original-rail {
  fill: #2b3138;
}

.art-original-key,
.art-original-stick {
  fill: #1b1f24;
  fill-opacity: 0.55;
}

.art-original-stick {
  fill-opacity: 0.85;
}

.art-original-glyph {
  fill: none;
  stroke: #1b1f24;
  stroke-opacity: 0.55;
  stroke-width: 3;
  stroke-linecap: round;
}

.art-pad {
  fill: var(--jc-body);
}

.art-pad-key,
.art-pad-stick {
  fill: var(--jc-detail);
}

.art-pad-stick {
  stroke: #1b1f24;
  stroke-width: 3;
}

.art-pad-detail {
  fill: none;
  stroke: var(--jc-detail);
  stroke-width: 7;
  stroke-linecap: round;
}

.art-device {
  fill: var(--surface);
  stroke: var(--ink-2);
  stroke-width: 3;
}

.art-device-base {
  fill: var(--ink-2);
}

.art-panel-left {
  fill: color-mix(in srgb, var(--jc-left) 28%, var(--surface));
}

.art-panel-right {
  fill: color-mix(in srgb, var(--jc-right) 28%, var(--surface));
}

.art-panel-label {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
}

.art-track {
  fill: none;
  stroke: var(--track);
  stroke-width: 5;
  stroke-linecap: round;
}

.art-track-fill {
  fill: none;
  stroke: var(--teal);
  stroke-width: 5;
  stroke-linecap: round;
}

.art-knob,
.art-cta {
  fill: var(--teal);
}

.art-label {
  fill: var(--ink-2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
}

.art-person {
  fill: var(--teal-muted);
}

.art-wave {
  fill: none;
  stroke: var(--teal);
  stroke-width: 4.5;
  stroke-linecap: round;
}

.art-wave-far {
  opacity: 0.5;
}

.art-link {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 8;
}

@media (prefers-reduced-motion: no-preference) {
  .art-link {
    animation: art-link 1s linear infinite;
  }

  .choice-card:hover .art-wave {
    animation: rays 0.8s ease-in-out infinite;
  }
}

@keyframes art-link {
  to {
    stroke-dashoffset: -10;
  }
}

@media (max-width: 48rem) {
  .hw-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.setup-question {
  display: grid;
  gap: 1rem;
}

.setup-question-title {
  font-size: clamp(1.25rem, 1.8vw, 1.625rem);
  font-weight: 700;
  text-align: center;
}

.setup-aside,
.setup-skip {
  max-width: 44rem;
  margin: 0 auto;
  color: var(--ink-2);
  text-align: center;
}

.art-glow {
  fill: var(--teal);
  opacity: 0.25;
}

.art-headband {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 5;
  stroke-linecap: round;
}

.art-cup {
  fill: var(--teal);
}
