:root {
  --bg: #07080c;
  --panel: #0b0e13;
  --panel-2: #14181f;
  --line: #23272f;
  --line-soft: #1a1e26;
  --line-faint: #16191f;

  --ink: #f2f4f8;
  --ink-mid: #c3c9d6;
  --ink-dim: #98a0b1;
  --ink-faint: #5a6173;

  --accent: #ff8a3d;
  --accent-hi: #ffa062;

  --good: #5fe39a;
  --bad: #f87171;
  --wait: #ff8a3d;
  --unknown: #9aa6bb;
  --neutral: #6b7385;

  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --r: 0px;
  --r-sm: 0px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; }

.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;
}

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ================= top bar ================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 8, 12, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-faint);
}

.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; color: inherit; flex: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: var(--accent);
  color: #0a0b0f;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}

.brand-text { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -0.015em; }

.nav { display: flex; gap: 4px; margin-left: 8px; }

.nav-item {
  border: 0;
  background: none;
  color: var(--ink-dim);
  border-radius: 0;
  padding: 8px 13px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.nav-item:hover { color: var(--ink); background: #10141a; }
.nav-item.is-active { background: var(--panel-2); color: var(--ink); font-weight: 600; }

.topbar-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ================= shell ================= */

.main { flex: 1; display: flex; flex-direction: column; }

.view { display: none; }
.view.is-active { display: block; }

.col { max-width: 1140px; margin: 0 auto; padding: 40px 24px 60px; }

/* ================= hero ================= */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-faint);
}

/* Drop key art in here: background-image on .hero-art. */
.hero-art {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  background: #0a0c11 center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1100px 420px at 50% -8%, rgba(255, 138, 61, 0.2), transparent 70%);
}

.hero-inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 84px 24px 64px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #2a2f39;
  border-radius: 0;
  padding: 5px 13px;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #b6bdcc;
  margin-bottom: 26px;
}

.hero-badge i {
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--accent);
  animation: pulseline 2.4s ease-in-out infinite;
}

@keyframes pulseline {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.hero-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(40px, 7.4vw, 86px);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.hero-title span { color: var(--accent); }

.lede {
  margin: 22px auto 0;
  max-width: 56ch;
  color: var(--ink-dim);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.55;
}

.page-head { padding-bottom: 8px; }
.page-head h1 { margin: 0; font-weight: 700; font-size: clamp(32px, 4.6vw, 48px); line-height: 1.04; letter-spacing: -0.03em; }
.page-head .lede { margin-left: 0; max-width: 62ch; text-align: left; font-size: 16.5px; }

/* ================= search ================= */

.search {
  margin: 34px auto 0;
  max-width: 660px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px;
}

.search select, .search input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  padding: 13px 14px;
  font: inherit;
  font-size: 14px;
  min-width: 0;
}

.search select { flex: 0 0 78px; padding-inline: 10px; }
.search input { flex: 1 1 130px; }
.search input::placeholder { color: #4a5165; }

.search select:focus, .search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}

.btn-go {
  flex: 1 1 110px;
  background: var(--accent);
  color: #0a0b0f;
  border: 0;
  border-radius: 0;
  padding: 13px 22px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn-go:hover { background: var(--accent-hi); }
.btn-go[disabled] { opacity: 0.5; cursor: wait; }

/* ================= hero cutoff strip ================= */

.cutoff-strip {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 0;
  overflow: hidden;
  text-align: left;
}

.cutoff-cell { background: var(--panel); padding: 14px 16px; }

.cutoff-cell .r {
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.cutoff-cell .v { font-family: var(--mono); font-size: 19px; font-weight: 500; }
.cutoff-cell .d { font-family: var(--mono); font-size: 11.5px; margin-top: 3px; color: var(--accent); }
.cutoff-cell .d.flat { color: var(--neutral); }

.hero-note { margin: 12px 0 0; font-size: 12px; color: var(--ink-faint); }

/* ================= status / empty ================= */

.status {
  padding: 14px 18px;
  border-radius: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  color: var(--ink-dim);
}

.status.error { color: var(--bad); border-color: #4a2427; background: #1e1214; }

.empty {
  border: 1px dashed var(--line);
  border-radius: 0;
  padding: 56px 24px;
  text-align: center;
}

.empty-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.empty p { margin: 10px auto 0; max-width: 44ch; color: var(--ink-dim); font-size: 15px; }

/* ================= cards ================= */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.card-flush { padding: 0; overflow: hidden; }

.fineprint { margin: 20px 0 0; max-width: 70ch; color: var(--neutral); font-size: 13.5px; }

/* ================= character header ================= */

.who { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

.who img {
  width: 56px;
  height: 56px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--panel-2);
  object-fit: cover;
  flex: none;
}

.who-name { margin: 0; font-size: 22px; }
.who-meta { color: var(--ink-dim); font-size: 13px; margin-top: 3px; }

.score-pill { margin-left: auto; text-align: right; }

.score-pill .n {
  display: block;
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.score-pill .l {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  margin-top: 6px;
  display: block;
}

/* ================= verdict ================= */

.verdict {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  overflow: hidden;
  margin-bottom: 16px;
}

.verdict-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 22px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-soft);
}

.verdict-head h3 { margin: 0; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--unknown); }

.verdict.good .verdict-head { background: rgba(95, 227, 154, 0.1); border-bottom-color: rgba(95, 227, 154, 0.22); }
.verdict.good .verdict-head h3 { color: var(--good); }
.verdict.bad .verdict-head { background: rgba(248, 113, 113, 0.1); border-bottom-color: rgba(248, 113, 113, 0.22); }
.verdict.bad .verdict-head h3 { color: var(--bad); }
.verdict.wait .verdict-head { background: rgba(255, 138, 61, 0.1); border-bottom-color: rgba(255, 138, 61, 0.22); }
.verdict.wait .verdict-head h3 { color: var(--accent); }
.verdict.neutral .verdict-head h3 { color: var(--neutral); }

.tier-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #b6bdcc;
  border: 1px solid #2a2f39;
  border-radius: 0;
  padding: 4px 11px;
  white-space: nowrap;
}

.verdict > p { margin: 0; padding: 18px 22px 0; color: var(--ink-mid); font-size: 14.5px; max-width: 70ch; }

.band-note {
  margin: 14px 22px 0;
  padding: 12px 14px;
  border-radius: 0;
  background: rgba(255, 138, 61, 0.08);
  border: 1px solid rgba(255, 138, 61, 0.24);
  font-size: 13.5px;
  color: #f0cba7;
  max-width: 82ch;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 18px 22px 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 14px;
}

.facts span {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 5px;
}

/* ================= table ================= */

.table-wrap { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 520px; }

th, td {
  text-align: right;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-faint);
  font-family: var(--mono);
  white-space: nowrap;
}

th:first-child, td:first-child { text-align: left; }

th {
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-faint);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #0d1015; }

td.delta-pos { color: var(--accent); }
td.na { color: var(--neutral); }

.tier-row td {
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
}

/* ================= foot ================= */

.foot {
  border-top: 1px solid var(--line-faint);
  margin-top: auto;
}

.foot {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1140px;
  margin-inline: auto;
  padding: 22px 24px;
  color: var(--ink-faint);
  font-size: 12.5px;
}

.foot-right { margin-left: auto; }

/* ================= responsive ================= */

@media (max-width: 820px) {
  .topbar-inner { padding: 12px 16px; gap: 12px; }
  .nav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .nav-item { white-space: nowrap; }
  .topbar-tag { margin-left: auto; }

  .hero-inner { padding: 52px 18px 44px; }
  .col { padding: 28px 18px 48px; }

  .search { flex-direction: column; align-items: stretch; margin-top: 26px; }
  .search select, .search input, .btn-go { flex: none; width: 100%; }

  .verdict-head, .verdict > p, .band-note, .facts { padding-inline: 18px; }
  .band-note, .facts { margin-inline: 18px; }

  .score-pill { margin-left: 0; text-align: left; width: 100%; }
  .foot-right { margin-left: 0; }
}
