:root {
  --ink: #1d2b23;
  --muted: #4c5f54;
  --accent: #1f6f4a;
  --accent-dark: #155c3c;
  --paper: #ffffff;
  --wash: #eef4ef;
  --line: #d9e2db;
  --warn: #8a5a00;
  --warn-bg: #fdf3dd;
  --fail: #a83232;
  --fail-bg: #fbe9e9;
  --pass: #1f6f4a;
  --pass-bg: #e3f1e8;
  --info: #37587a;
  --info-bg: #e6eff7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

.topbar { background: var(--ink); color: #fff; padding: 14px 0; }
.topbar .wrap { display: flex; align-items: baseline; gap: 12px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.tagline { color: #bcd2c4; font-size: 0.9rem; }

.hero { padding: 36px 0 10px; }
.hero h1 { font-size: 2rem; margin: 0 0 10px; letter-spacing: -0.01em; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

.audit-form { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.audit-form input {
  flex: 1 1 280px;
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid var(--line);
  border-radius: 8px;
}
.audit-form input:focus { outline: 3px solid #bfe0cc; border-color: var(--accent); }
button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--accent-dark); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hint { color: var(--muted); font-size: 0.9rem; }
.alert {
  background: var(--fail-bg);
  border: 1px solid var(--fail);
  border-radius: 8px;
  padding: 10px 14px;
}

.explain h2 { margin-top: 34px; border-bottom: 2px solid var(--wash); padding-bottom: 6px; }
.score-list { padding-left: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--wash); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }

.result-head { padding: 26px 0 6px; }
.back a { color: var(--accent); text-decoration: none; font-weight: 600; }
.audited { color: var(--muted); }
.audited a { color: var(--accent); }
.score-row { display: flex; gap: 22px; align-items: center; margin: 10px 0 20px; }
.score-big {
  min-width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 800;
  background: var(--ink); color: #fff; border-radius: 18px;
}
.score-ring {
  width: 124px; height: 124px; flex: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.score-inner {
  width: 96px; height: 96px; border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800; color: var(--ink);
}
.cache-note {
  display: inline-block;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 0;
}
.cat-explain { color: var(--muted); font-size: 0.92rem; margin: 6px 0 0; }
.issue div { min-width: 0; flex: 1; }
.issue pre {
  background: #0f1a14; color: #d7e5dc;
  border-radius: 8px; padding: 12px 14px;
  overflow-x: auto; font-size: 0.82rem; line-height: 1.5;
  margin: 8px 0 0;
}
.issue pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.steps { padding-left: 24px; margin: 10px 0; }
.steps li { margin: 10px 0; }
.steps li strong { display: block; }
.steps li span { color: var(--muted); }
.faq h3 { margin: 18px 0 4px; font-size: 1.02rem; }
.faq p { margin: 0 0 6px; color: var(--muted); }
.notify {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin: 20px 0;
}.notify h2 { margin: 0 0 10px; font-size: 1.1rem; }
.notify-form { display: flex; gap: 10px; flex-wrap: wrap; }
.notify-form input[type="email"] {
  flex: 1 1 240px; padding: 10px 12px; font-size: 1rem;
  border: 2px solid var(--line); border-radius: 8px;
}
.notify-msg { font-weight: 600; margin: 8px 0 0; }
.score-label { font-size: 1.15rem; font-weight: 600; margin: 0 0 6px; }
.score-meta { color: var(--muted); margin: 0; font-size: 0.92rem; }

.cat { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 14px 0; }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cat-head h3 { margin: 0; }
.cat-score { font-weight: 700; white-space: nowrap; }
.bar { background: var(--wash); border-radius: 6px; height: 10px; margin: 10px 0 4px; overflow: hidden; }
.fill { background: var(--accent); height: 100%; border-radius: 6px; }
.weight { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; }
.checks, .issues { list-style: none; padding: 0; margin: 10px 0 0; }
.check, .issue { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.check strong, .issue strong { display: block; }
.check p, .issue p { margin: 4px 0 0; color: var(--muted); font-size: 0.94rem; }
.fix-label { font-weight: 700; color: var(--ink); }
.none { color: var(--muted); }

.pill {
  flex: none; align-self: flex-start;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: 20px; padding: 3px 10px; margin-top: 2px;
}
.pill-pass, .pill-high { background: var(--pass-bg); color: var(--pass); }
.pill-warn, .pill-medium { background: var(--warn-bg); color: var(--warn); }
.pill-fail { background: var(--fail-bg); color: var(--fail); }
.pill-low, .pill-info { background: var(--info-bg); color: var(--info); }
.pill-na { background: var(--wash); color: var(--muted); }

.recheck { margin: 24px 0; }
.foot { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); margin-top: 40px; padding: 16px 20px 30px; }

.notice-info {
  background: var(--info-bg);
  border: 1px solid var(--info);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--info);
  overflow-wrap: anywhere;
}

.grade { font-size: 1.4rem; font-weight: 800; margin: 0 0 4px; }

.fix-first {
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0;
}
.fix-first h2 { margin: 0 0 6px; }
.fix-first-list { list-style: none; padding: 0; margin: 10px 0 0; }
.fix-first-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.fix-first-item:first-child { border-top: none; }
.fix-first-item div { min-width: 0; flex: 1; }
.fix-first-item p { margin: 4px 0 0; color: var(--muted); font-size: 0.94rem; overflow-wrap: anywhere; }
.revenue-headline { display: block; font-size: 1.02rem; }
.fix-first-title { display: block; color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }

.job-steps { list-style: none; padding: 0; margin: 18px 0; }
.job-step {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line);
  color: var(--muted);
}
.job-step:first-child { border-top: none; }
.job-step.active { color: var(--ink); font-weight: 700; }
.job-step.done { color: var(--pass); }
.job-step .step-check { display: none; font-weight: 800; }
.job-step.done .step-check { display: inline; }
.job-step.done .step-check::before { content: "\2713"; }
.job-step .spinner { display: none; }
.job-step.active .spinner { display: inline-block; }
.job-step.done .spinner { display: none; }
.spinner {
  width: 18px; height: 18px; flex: none;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.example-form { margin-top: 12px; }

.brand-logo { height: 28px; width: auto; max-width: 140px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px 6px; }
.report-logo { display: block; max-height: 56px; max-width: 240px; margin: 10px 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.prepared { font-weight: 700; margin: 6px 0 0; }
.powered { font-size: 0.8rem; color: var(--muted); }
.agencies-teaser { margin-top: 30px; border-top: 2px solid var(--wash); padding-top: 10px; }
.agencies-teaser p { color: var(--muted); }
.brand-example { display: inline-block; background: var(--wash); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 0.85rem; overflow-wrap: anywhere; }

.check div { min-width: 0; flex: 1; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.5rem; }
  .score-big { min-width: 96px; height: 96px; font-size: 2.2rem; }
  .score-ring { width: 104px; height: 104px; }
  .score-inner { width: 80px; height: 80px; font-size: 1.9rem; }
}

@media (max-width: 480px) {
  .audit-form { flex-direction: column; }
  .audit-form input, .audit-form button { width: 100%; flex: 1 1 auto; }
  .notify-form { flex-direction: column; }
  .notify-form input, .notify-form button { width: 100%; flex: 1 1 auto; }
  .score-row { flex-direction: column; align-items: flex-start; }
  .cat-head { flex-wrap: wrap; }
  .audited a, .issue pre, .fix-first-item p, .fix-first-title,
  .check div, .issue div, .notice-info, .job-step { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none; animation: none; }
}

/* Account page */
.account-hero { padding-bottom: 0; }
.plan-card { max-width: 620px; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-head h2 { margin: 0; }
.tier-badge {
  flex: none; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--pass-bg); color: var(--pass); border-radius: 20px; padding: 4px 12px;
}
.plan-email { color: var(--muted); margin: 6px 0; overflow-wrap: anywhere; }
.plan-status { margin: 8px 0; font-weight: 600; }
.plan-status.warn { color: var(--warn); font-weight: 600; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 6px; }
.site-cards { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 12px; }
.site-card { background: var(--wash); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.site-main { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; }
.site-url { font-weight: 700; overflow-wrap: anywhere; }
.site-latest { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.site-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.site-msg { margin: 8px 0 0; min-height: 1.2em; }
.btn-small { padding: 8px 14px; font-size: 0.9rem; }
.btn-quiet { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn-quiet:hover { background: var(--wash); }
button:disabled { opacity: 0.6; cursor: wait; }
.site-add-form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.site-add-form input[type="url"] { flex: 1 1 240px; min-width: 0; }
