:root {
  color-scheme: light dark;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --code-bg: #f3f4f6;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #ef4444;
  --accent: #2563eb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e5e7eb;
    --muted: #9ca3af;
    --border: #374151;
    --bg: #1f2937;
    --code-bg: #111827;
    --ok: #22c55e;
    --warn: #f59e0b;
    --err: #f87171;
    --accent: #60a5fa;
  }
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
  width: 320px;
}

header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
header .title { font-weight: 600; font-size: 14px; }
header .version { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }

section { padding: 14px; }
.row { display: flex; align-items: center; gap: 8px; }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-err { background: var(--err); }

p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 12px; }

pre {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 36px 8px 10px;
  margin: 8px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-x: auto;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
p code { background: var(--code-bg); padding: 1px 4px; border-radius: 3px; }

.copy {
  position: absolute;
  top: 4px;
  right: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
}
.copy:hover { color: var(--fg); }
.copy.copied { color: var(--ok); border-color: var(--ok); }

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}
button#retry {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
button#retry:disabled { opacity: 0.6; cursor: default; }

a#install { color: var(--accent); font-size: 12px; text-decoration: none; }
a#install:hover { text-decoration: underline; }
