:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --surface: #f5f5f5;
  --ok: #0a7d45;
  --bad: #c62828;
  --info: #8a6d00;
  --button-bg: #0a0a0a;
  --button-fg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #f5f5f5;
    --muted: #9a9a9a;
    --line: #232323;
    --surface: #111111;
    --ok: #3ccf7f;
    --bad: #ff6b6b;
    --info: #e0b84a;
    --button-bg: #f5f5f5;
    --button-fg: #0a0a0a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

h1 { font-size: 32px; line-height: 1.15; margin: 8px 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 20px; margin: 0 0 12px; letter-spacing: -0.01em; }

section { padding: 20px 0; border-top: 1px solid var(--line); }
section:first-of-type { margin-top: 16px; }

.muted { color: var(--muted); margin: 0 0 12px; }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }

.status { margin: 0 0 12px; }
.status.ok { color: var(--ok); }
.status.error { color: var(--bad); }

.buttons { display: flex; flex-wrap: wrap; gap: 8px; }

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  background: var(--button-bg);
  color: var(--button-fg);
  cursor: pointer;
}
button.secondary { background: var(--surface); color: var(--fg); }
button:disabled { opacity: 0.35; cursor: default; }

.steps { list-style: none; padding: 0; margin: 16px 0 0; }
.steps li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.steps .mark { font-weight: 700; }
.steps .ok .mark { color: var(--ok); }
.steps .bad .mark { color: var(--bad); }
.steps .info .mark { color: var(--info); }
.steps .detail { color: var(--muted); font-size: 14px; }
.steps .ms { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.report {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  user-select: text;
  -webkit-user-select: text;
}

.reports { list-style: none; padding: 0; margin: 0 0 12px; }
.reports li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.reports button { padding: 8px 14px; }
