:root {
  color-scheme: dark;
  --bg: #11141b;
  --panel: #191f29;
  --panel-2: #202633;
  --line: rgba(226, 232, 240, 0.14);
  --text: #f3f6f8;
  --muted: #aeb8c4;
  --teal: #52c7bd;
  --gold: #e8b94f;
  --green: #58d184;
  --red: #ef6b6b;
  --violet: #b995ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 8%, rgba(82, 199, 189, 0.18), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(232, 185, 79, 0.15), transparent 28%),
    linear-gradient(145deg, #11141b 0%, #171820 52%, #221727 100%);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

button,
select,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  box-shadow: 0 10px 28px rgba(82, 199, 189, 0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.language select {
  min-height: 38px;
  padding: 8px 32px 8px 11px;
}

.nav a,
.button,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 9px 13px;
  text-decoration: none;
  cursor: pointer;
}

.nav a:hover,
.button:hover,
button:hover {
  border-color: rgba(82, 199, 189, 0.58);
}

.button.secondary {
  margin-top: 8px;
  background: rgba(82, 199, 189, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 20px;
}

.hero-main,
.panel,
.metric,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 20, 27, 0.74);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.hero-main {
  padding: 28px;
  overflow: visible;
}

.run-hero-layout {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.run-hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.hero-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--muted);
}

.pill.good {
  color: var(--green);
}

.pill.bad {
  color: var(--red);
}

.rating-card {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.skin-bust {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 106px;
  margin: 0 auto 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(82, 199, 189, 0.08);
}

.skin-bust.large {
  width: 130px;
  height: 146px;
  margin-bottom: 14px;
}

.skin-bust.hero {
  width: 168px;
  height: 210px;
  margin: -8px 0 -12px -52px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.skin-bust img {
  position: absolute;
  top: -16px;
  left: 50%;
  height: 162px;
  image-rendering: pixelated;
  transform: translateX(-50%);
}

.skin-bust.large img {
  top: -22px;
  height: 222px;
}

.skin-bust.hero img {
  top: -34px;
  height: 306px;
}

.skin-bust span {
  color: var(--teal);
  font-size: 24px;
  font-weight: 900;
}

.skin-bust.large span {
  font-size: 34px;
}

.skin-bust.hero span {
  font-size: 42px;
}

.skin-bust.loaded span {
  display: none;
}

.skin-bust.missing img {
  display: none;
}

.skin-bust.hero.missing {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(82, 199, 189, 0.08);
}

.rating {
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  background: conic-gradient(from 220deg, var(--teal), var(--gold), var(--violet), var(--teal));
  color: #10131a;
  font-size: 76px;
  font-weight: 900;
}

.score {
  margin-top: 16px;
  font-size: 42px;
  font-weight: 850;
}

.party-score-label {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 14px;
}

.metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 18px 0;
}

.metric {
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel {
  padding: 18px;
  overflow: hidden;
}

.mvp-section {
  margin: 18px 0;
}

.mvp-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.mvp-card {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px;
}

.mvp-card span,
.mvp-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.mvp-card strong {
  display: block;
  margin: 10px 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvp-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.table-wrap.flat {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.s-gates {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 18px 0;
}

.s-gates h2 {
  margin-bottom: 6px;
}

.s-gates p {
  margin-bottom: 0;
}

.gate-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gate {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
}

.gate strong,
.gate small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gate.met small {
  color: var(--green);
}

.gate.missing small {
  color: var(--red);
}

canvas {
  display: block;
  width: 100%;
  height: 260px;
}

.timeline {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

select,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  padding: 10px 12px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero,
  .two,
  .s-gates {
    grid-template-columns: 1fr;
  }

  .mvp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gate-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-main {
    padding: 20px;
  }

  .run-hero-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skin-bust.hero {
    width: 132px;
    height: 158px;
    margin: -18px 0 -12px -22px;
  }

  .skin-bust.hero img {
    top: -28px;
    height: 238px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .gate-list {
    grid-template-columns: 1fr;
  }

  .mvp-grid {
    grid-template-columns: 1fr;
  }
}
