:root {
  --accent: #CC111A;
  --accent-ink: #930C13;
  --ink: #1a1a1a;
  --muted: #666;
  --bg: #fafafa;
  --card: #fff;
  --border: #e5e5e5;
  --critical: #CC111A;
  --warning: #B8860B;
  --notice: #6b7280;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.wrap { max-width: 720px; margin: 0 auto; padding: 32px 16px 80px; }

header.top { text-align: center; margin-bottom: 32px; }
header.top h1 { font-size: 1.9rem; margin: 0 0 8px; }
header.top p { color: var(--muted); margin: 0; }

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

form.audit-form { display: flex; flex-direction: column; gap: 12px; }
form.audit-form label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
form.audit-form input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}
form.audit-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

button.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
button.btn:hover { background: var(--accent-ink); }
button.btn:disabled { opacity: 0.6; cursor: default; }
button.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

.error { color: var(--critical); font-size: 0.9rem; margin-top: 4px; }
.hidden { display: none !important; }

.score-row { display: flex; align-items: center; gap: 20px; }
.score-circle {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: #fff;
  background: conic-gradient(var(--accent) calc(var(--score,0)*1%), #eee 0);
  position: relative;
}
.score-circle span { background: var(--card); width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.score-meta { flex: 1; }
.score-meta .url { color: var(--muted); font-size: 0.85rem; word-break: break-all; }
.score-meta .counts { display: flex; gap: 12px; margin-top: 6px; font-size: 0.85rem; }
.pill { border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.pill.critical { background: #fde2e2; color: var(--critical); }
.pill.warning { background: #fdf1d6; color: var(--warning); }
.pill.notice { background: #eee; color: var(--notice); }

ul.issues { list-style: none; margin: 16px 0 0; padding: 0; }
ul.issues li { padding: 12px 0; border-top: 1px solid var(--border); }
ul.issues li:first-child { border-top: none; }
.issue-title { font-weight: 600; }
.issue-advice { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.badge { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.badge.critical { background: var(--critical); }
.badge.warning { background: var(--warning); }
.badge.notice { background: var(--notice); }

.locked-box {
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-top: 16px;
}
.locked-box p { color: var(--muted); margin: 0 0 14px; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

footer.note { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 24px; }
footer.note a { color: var(--accent); }
