:root {
  --bg: #0e1014;
  --panel: #161a21;
  --panel-2: #1c212a;
  --line: #262c37;
  --text: #e8ebf0;
  --muted: #8b94a3;
  --accent: #5aa9ff;
  --good: #4ec98a;
  --warn: #e2b04a;
  --bad: #e2685f;
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --panel-2: #f0f2f5;
    --line: #e2e6ec;
    --text: #171a1f;
    --muted: #667085;
    --accent: #1f6fd0;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -.01em;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--accent), #8f6cf5);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}

nav { display: flex; gap: 1.4rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .94rem;
}

nav a:hover { color: var(--text); }

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) 4rem;
}

.hero { margin-bottom: 2rem; }

h1 {
  margin: 0 0 .6rem;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: -.02em;
  font-weight: 680;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .9rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.card.wide { grid-column: span 2; }

@media (max-width: 620px) {
  .card.wide { grid-column: span 1; }
}

.card-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.value {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -.01em;
  word-break: break-all;
}

.value.small { font-size: .98rem; font-weight: 500; line-height: 1.45; }

.hint { font-size: .84rem; color: var(--muted); }

.value.good { color: var(--good); }
.value.warn { color: var(--warn); }
.value.bad  { color: var(--bad); }

.meter {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 2.5rem;
}

.meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: .9rem;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 70px;
  margin-bottom: 1.1rem;
}

.bars i {
  flex: 1;
  background: var(--panel-2);
  border-radius: 4px 4px 2px 2px;
  min-height: 4px;
  transition: height .25s ease, background .25s ease;
}

.bars i.on { background: linear-gradient(180deg, var(--accent), #3d7fd0); }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: .92rem;
  padding: .55rem 1.1rem;
  border-radius: 9px;
  cursor: pointer;
}

.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }

.note h2 {
  font-size: 1.05rem;
  margin: 0 0 .7rem;
  font-weight: 620;
}

.note p {
  margin: 0 0 .7rem;
  color: var(--muted);
  font-size: .94rem;
  max-width: 70ch;
}

.note strong { color: var(--text); font-weight: 600; }

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.1rem; margin: 2rem 0 .6rem; font-weight: 620; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin-bottom: .35rem; }

footer {
  border-top: 1px solid var(--line);
  padding: 1.3rem clamp(1rem, 4vw, 3rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--muted);
}

.center { text-align: center; padding: 4rem 0; }
.center .code { font-size: 3rem; font-weight: 700; letter-spacing: -.03em; }
