:root {
  color-scheme: dark;
  --bg: #070809;
  --panel: #131517;
  --panel-2: #191c1f;
  --stroke: #272c31;
  --text: #f2f4f5;
  --muted: #90989f;
  --subtle: #626a72;
  --good: #5be49b;
  --warn: #f0c65f;
  --accent-openai: #7ce8d4;
  --accent-anthropic: #d7b98f;
  --accent-minimax: #f0a55c;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  align-content: center;
  gap: 24px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.98;
  letter-spacing: 0;
}

.refresh-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(19, 21, 23, 0.74);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 18px rgba(240, 198, 95, 0.45);
}

.dot.is-ok {
  background: var(--good);
  box-shadow: 0 0 18px rgba(91, 228, 155, 0.45);
}

.dot.is-error {
  background: #ff6b6b;
  box-shadow: 0 0 18px rgba(255, 107, 107, 0.45);
}

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

.usage-card {
  min-height: 464px;
  padding: 22px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 38%),
    var(--panel);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
  display: grid;
  grid-template-rows: auto 1fr 1fr;
  gap: 14px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.provider-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #07100d;
}

.provider-mark-openai {
  background: var(--accent-openai);
}

.provider-mark-anthropic {
  background: var(--accent-anthropic);
}

.provider-mark-minimax {
  background: var(--accent-minimax);
  color: #1c0d00;
}

.card-header h2 {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.card-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.usage-row {
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background: var(--panel-2);
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.row-label {
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
}

.metric {
  min-width: 0;
  text-align: right;
}

.percent {
  font-size: clamp(54px, 8vw, 92px);
  line-height: 0.88;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.percent.is-na {
  color: var(--subtle);
  font-size: clamp(42px, 6vw, 66px);
}

.reset {
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.2;
}

.usage-card[data-provider="codex"] .reset strong {
  color: var(--accent-openai);
}

.usage-card[data-provider="claude"] .reset strong {
  color: var(--accent-anthropic);
}

.usage-card[data-provider="minimax"] .reset strong {
  color: var(--accent-minimax);
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 520px);
    padding: 24px 0;
    align-content: start;
  }

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

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

  .usage-card {
    min-height: 0;
    padding: 16px;
  }

  .usage-row {
    min-height: 136px;
    grid-template-columns: 78px minmax(0, 1fr);
    padding: 18px;
  }

  .row-label {
    font-size: 17px;
  }

  .reset {
    font-size: 15px;
  }
}
