:root {
  color-scheme: dark;
  --ink: #f2f4f8;
  --muted: #a7b0bd;
  --line: #343a46;
  --paper: #171a21;
  --page: #0c0e12;
  --bar: #12141a;
  --bad: #f15b4c;
  --average: #f5c400;
  --great: #2eae4e;
  --accent: #e86a1a;
  --accent-2: #ff9a4a;
  --focus: #ffb07a;
}

* { box-sizing: border-box; }

html { overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(232, 106, 26, 0.22), transparent 60%),
    var(--page);
  color: var(--ink);
  font: 17px/1.45 "Segoe UI", "Trebuchet MS", sans-serif;
}

a { color: var(--accent-2); }

.top {
  background: rgba(12, 14, 18, 0.92);
  border-bottom: 1px solid #262b34;
}

.top-inner, main {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 750;
  font-size: 18px;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.mark {
  width: 22px;
  height: 12px;
  border: 3px solid var(--accent);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
}

.download {
  display: inline-block;
  background: var(--accent);
  color: #1a0d06;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  flex: 0 0 auto;
}

.download:hover { background: #ff7d2a; }
.download:focus-visible, input:focus-visible, .suggest button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.welcome { padding: 36px 0 8px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.search { margin-top: 26px; }

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.combo { position: relative; }

input {
  width: 100%;
  height: 56px;
  border: 1px solid #3c4452;
  border-radius: 8px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
  padding: 0 16px;
}

input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--page) inset;
}

input::placeholder { color: #7d8796; }

.suggest {
  position: absolute;
  z-index: 2;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--page);
  border: 1px solid #3c4452;
  border-radius: 8px;
}

.suggest[hidden] { display: none; }

.suggest button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  text-align: left;
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
}

.suggest button[aria-selected="true"],
.suggest button:hover {
  background: transparent;
  border-color: #3c4452;
}

.swatch {
  width: 4px;
  border-radius: 4px;
  background: currentColor;
  flex: none;
}

.who { display: block; min-width: 0; }
.nm { display: block; font-size: 17px; font-weight: 750; color: inherit; }
.suggest .sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 450;
}

.status {
  min-height: 1.2em;
  margin: 10px 2px;
  color: var(--muted);
  font-size: 14px;
}

.card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--class, transparent) 18%, transparent), transparent 140px),
    var(--paper);
  border: 1px solid #2a303b;
  border-top: 3px solid var(--class, #3c4452);
  border-radius: 12px;
  padding: 22px 22px 26px;
}

.card[hidden] { display: none; }

.player {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.meta, .links {
  margin: 4px 0 0;
  text-align: center;
  color: var(--muted);
}

.parses {
  margin: 12px 0 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.parses[hidden] { display: none; }

.links a {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid #3c4452;
  border-radius: 999px;
  background: #12151c;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}

.links a:hover { border-color: var(--accent); color: var(--accent-2); }

.gauge-wrap {
  position: relative;
  max-width: 520px;
  margin: 8px auto 0;
}

.gauge { display: block; width: 100%; height: auto; }
.gauge .bad { fill: var(--bad); }
.gauge .average { fill: var(--average); }
.gauge .great { fill: var(--great); }
.gauge line {
  stroke: #f4f1ea;
  stroke-width: 5;
  stroke-linecap: round;
}
.gauge .off { display: none; }
.gauge .hub { fill: #f4f1ea; }
.gauge .hub-ring { fill: #171a21; }

.readout {
  position: absolute;
  left: 50%;
  top: 64%;
  transform: translate(-50%, -50%);
  text-align: center;
  min-width: 140px;
}

.number {
  margin: 0;
  font-size: clamp(52px, 8vw, 72px);
  line-height: 0.9;
  font-weight: 760;
  letter-spacing: -0.05em;
}

.word {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.number.bad, .word.bad { color: #ff7568; }
.number.average, .word.average { color: #ffd34d; }
.number.great, .word.great { color: #3dde74; }
.number.empty, .word.empty { color: #c5cad3; }

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.legend li { display: flex; align-items: center; gap: 8px; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.bad { background: var(--bad); }
.dot.average { background: var(--average); }
.dot.great { background: var(--great); }

.votes {
  margin: 14px 0 0;
  text-align: center;
  color: var(--muted);
}

.empty-box {
  margin-top: 18px;
  text-align: center;
}

.empty-box p {
  margin: 0 0 14px;
  color: var(--muted);
}

.install {
  margin: 22px 0 48px;
  padding: 16px 18px;
  background: #14171d;
  border: 1px solid #2a303b;
  border-radius: 12px;
  color: var(--muted);
}

.install h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
}

.install ol { margin: 0; padding-left: 20px; }
.install li { margin: 6px 0; }

.path {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  color: #d5dbe6;
  overflow-wrap: anywhere;
  word-break: break-all;
}

@media (max-width: 640px) {
  .top-inner, main { width: min(820px, calc(100% - 24px)); }
  .welcome { padding-top: 24px; }
  .download { font-size: 13px; padding: 8px 10px; }
  .card, .install { padding: 16px 12px; }
  .player { font-size: 24px; }
  .legend { font-size: 13px; }
}
