:root {
  --bg: #0e100c;
  --panel: #171b14;
  --ink: #e7ebd9;
  --muted: #8f9778;
  --faint: #5e6650;
  --accent: #c4d36a;
  --accent-dim: #8a9648;
  --line: #2a3122;
  --lotus: #c4d36a;
  --warn: #c9a45a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

body {
  line-height: 1.5;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.hero {
  margin-bottom: 36px;
}

.brand {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.tagline {
  margin: 8px 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-score {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.hero-saved {
  margin: 10px 0 22px;
  font-size: 1.15rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.disclaimer {
  margin: 0;
  max-width: 36rem;
  color: var(--faint);
  font-size: 0.88rem;
}

.disclaimer.warn {
  color: var(--warn);
  margin: 0 0 22px;
}

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

h2 {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px 16px;
}

.stat {
  min-width: 0;
}

.stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.stat-value {
  margin-top: 4px;
  font-size: 1.15rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.stat-value.ok {
  color: var(--accent);
}

.bars {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.bar-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 10px;
  align-items: center;
}

.bar-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.bar-row.is-lotus .bar-label {
  color: var(--ink);
  font-weight: 600;
}

.bar-track {
  height: 8px;
  background: #24291c;
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: #4a5338;
  border-radius: 99px;
}

.bar-row.is-lotus .bar-fill {
  background: var(--accent);
}

.bar-meta {
  font-size: 0.8rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  min-width: 4.5rem;
  text-align: right;
}

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

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

table.compare th,
table.compare td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

table.compare th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

table.compare tr.is-lotus td {
  color: var(--accent);
  font-weight: 600;
}

.rank-score {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.rank-score strong {
  font-variant-numeric: tabular-nums;
}

.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.ladder::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--line);
}

.ladder li {
  position: relative;
  padding: 10px 0 10px 36px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.ladder li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line);
  z-index: 1;
}

.ladder li.reached::before {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.ladder li.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(196 211 106 / 18%);
}

.ladder .rung-name {
  font-weight: 600;
}

.ladder .rung-ratio {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.ladder .here {
  display: block;
  width: 100%;
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.live {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 18px;
  margin: 0;
}

.live div {
  min-width: 0;
}

.live dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.live dd {
  margin: 4px 0 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.about p {
  margin: 0;
  color: var(--ink);
  max-width: 40rem;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  color: var(--faint);
  font-size: 0.88rem;
}

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

footer a:hover {
  text-decoration: underline;
}

.error {
  color: #d36a6a;
}

@media (max-width: 560px) {
  .page {
    padding: 32px 16px 48px;
  }

  .card {
    padding: 18px 16px 20px;
  }

  .bar-row {
    grid-template-columns: 1fr auto;
  }

  .bar-label {
    grid-column: 1 / -1;
  }
}
