/* ---------- accessibility ---------- */
.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: #0f172a; color: #fff; padding: 8px 14px; border-radius: 6px;
  font-weight: 600; z-index: 1000;
}
.skip-link:focus { top: 8px; }

/* ---------- reset + base ---------- */
* { box-sizing: border-box; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --ink: #0f172a;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e5e7eb;
  --pass: #15803d;
  --warn: #b45309;
  --fail: #b91c1c;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); }
h1 { font-size: 32px; line-height: 1.2; margin: 24px 0 12px; }
h2 { font-size: 22px; margin: 24px 0 12px; }
h3 { font-size: 17px; margin: 16px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.muted.center, .center { text-align: center; }
.muted.small, .small { font-size: 13px; }
.accent { color: var(--primary); }
code { background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 13px; }
pre code { background: transparent; color: inherit; padding: 0; }

/* ---------- topbar / footer ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: white;
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand { font-weight: 800; font-size: 18px; color: var(--ink); }
.topbar nav a { margin-left: 18px; color: var(--ink); }
.topbar nav a:hover { color: var(--primary); }
.sitefoot {
  border-top: 1px solid var(--border); padding: 24px 32px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted); margin-top: 64px;
}
main { min-height: 60vh; }

/* ---------- buttons ---------- */
.btn-primary, .btn-ghost {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 14px;
  text-align: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-ghost { background: white; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-tiny { padding: 4px 10px; font-size: 12px; }
.big { padding: 14px 26px; font-size: 16px; }
button { font: inherit; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  padding: 64px 32px;
  max-width: 1200px; margin: 0 auto;
  align-items: center;
}
.hero h1 { font-size: 44px; line-height: 1.1; margin: 0 0 16px; }
.hero .lede { font-size: 18px; color: var(--muted); margin-bottom: 24px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { margin-top: 16px; font-size: 13px; color: var(--muted); }
.report-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
  box-shadow: 0 24px 48px -24px rgba(15,23,42,0.25);
  position: relative;
}
.report-card .report-grade {
  position: absolute; top: 18px; right: 22px;
  font-size: 56px; font-weight: 800; color: var(--primary); line-height: 1;
}
.report-card .report-name { font-weight: 700; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.report-card ul { list-style: none; padding: 0; margin: 0; }
.report-card li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.report-card li:last-child { border-bottom: none; }
.report-card .pass, .report-card .warn, .report-card .fail {
  display: inline-block; width: 50px; font-size: 11px; font-weight: 800; margin-right: 8px;
}
.report-card .pass { color: var(--pass); }
.report-card .warn { color: var(--warn); }
.report-card .fail { color: var(--fail); }
.report-foot { margin-top: 16px; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
}

/* ---------- bullets ---------- */
.bullets {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  max-width: 1200px; margin: 32px auto; padding: 32px;
}
.bullet h3 { margin-top: 0; }
.bullet p { color: var(--muted); }
@media (max-width: 900px) { .bullets { grid-template-columns: 1fr; } }

/* ---------- pricing strip ---------- */
.pricing-strip { max-width: 1100px; margin: 64px auto; padding: 32px; text-align: center; }
.pricing-strip h2 { font-size: 28px; margin-bottom: 32px; }
.plan-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: left;
  margin-bottom: 24px;
}
.plan {
  background: white; border: 1px solid var(--border); border-radius: 16px; padding: 32px 24px;
  position: relative; display: flex; flex-direction: column;
}
.plan-featured { border-color: var(--primary); box-shadow: 0 24px 48px -24px rgba(37,99,235,0.4); }
.plan-current { border-color: var(--pass); }
.plan-badge {
  position: absolute; top: -10px; right: 16px;
  background: var(--primary); color: white; padding: 3px 10px;
  border-radius: 12px; font-size: 12px; font-weight: 600;
}
.plan h3 { margin-top: 0; }
.plan-price { font-size: 36px; font-weight: 800; margin: 12px 0; }
.plan-price span { font-size: 16px; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; }
.plan li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.plan li:last-child { border-bottom: none; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } }

/* ---------- big CTA ---------- */
.big-cta {
  text-align: center; padding: 64px 32px; background: var(--bg-soft);
  margin: 64px 0 0; border-top: 1px solid var(--border);
}
.big-cta h2 { font-size: 28px; }
.big-cta p { color: var(--muted); margin-bottom: 24px; }

/* ---------- narrow page (pricing/faq/auth/demo) ---------- */
.page-narrow, .page-auth { max-width: 760px; margin: 32px auto; padding: 0 32px; }
.page-auth { max-width: 460px; }
.page-narrow h1 { margin-top: 32px; }
.page-narrow .lede { font-size: 18px; color: var(--muted); }

/* ---------- compare table ---------- */
.compare {
  width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px;
}
.compare th, .compare td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
.compare thead th { font-size: 16px; }
.compare th.featured, .compare td.featured { background: var(--bg-soft); }
.compare tbody th { font-weight: 500; color: var(--muted); }

/* ---------- forms ---------- */
.audit-form, .auth-form, .settings-form {
  display: flex; flex-direction: column; gap: 12px; margin: 18px 0;
}
.audit-form input[type=text] { flex: 1; }
.audit-form { flex-direction: row; }
@media (max-width: 600px) { .audit-form { flex-direction: column; } }

label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=color], input[type=file], textarea, select {
  font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: white;
}
input[type=color] { padding: 4px; height: 40px; width: 80px; }
input:focus, textarea:focus { outline: none; border-color: var(--primary); }
.error { background: #fef2f2; color: var(--fail); padding: 12px; border-radius: 8px; border: 1px solid #fecaca; margin: 12px 0; }
.success { background: #f0fdf4; color: var(--pass); padding: 12px; border-radius: 8px; border: 1px solid #bbf7d0; margin: 12px 0; }
.info { background: #eff6ff; color: #1e3a8a; padding: 12px; border-radius: 8px; border: 1px solid #bfdbfe; margin: 12px 0; }

.logo-preview { margin-top: 8px; }
.logo-preview img { max-height: 60px; max-width: 200px; }

/* ---------- audit result (demo + dashboard detail) ---------- */
.audit-result { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-top: 24px; }
.audit-result-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 16px; }
.audit-result-head h2 { margin: 0; font-size: 18px; }
.grade-block { text-align: center; padding: 12px 20px; background: var(--bg-soft); border-radius: 12px; }
.grade-letter { font-size: 36px; font-weight: 800; color: var(--primary); line-height: 1; }
.grade-num { font-size: 13px; color: var(--muted); margin-top: 2px; }

.scorebar { display: flex; gap: 12px; margin: 16px 0; }
.scorebar .cell {
  flex: 1; background: var(--bg-soft); border-radius: 10px; padding: 14px; text-align: center;
}
.scorebar .cell .name { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.scorebar .cell .num { font-size: 22px; font-weight: 800; margin-top: 4px; }
.scorebar .cell.good .num { color: var(--pass); }
.scorebar .cell.ok .num { color: var(--warn); }
.scorebar .cell.bad .num { color: var(--fail); }

.findings-list { list-style: none; padding: 0; }
.findings-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.findings-list li.status-pass strong { color: var(--pass); }
.findings-list li.status-warn strong { color: var(--warn); }
.findings-list li.status-fail strong { color: var(--fail); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 16px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

.upgrade-cta {
  margin-top: 24px; padding: 18px 22px; background: var(--bg-soft);
  border-radius: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* ---------- dashboard ---------- */
.dashboard-body main { padding: 0; }
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 60px); }
.sidebar {
  background: var(--bg-soft); border-right: 1px solid var(--border);
  padding: 20px 16px; display: flex; flex-direction: column;
}
.sidebar-org { margin-bottom: 18px; }
.sidebar-logo { max-height: 40px; max-width: 160px; margin-bottom: 8px; }
.sidebar-name { font-weight: 700; }
.sidebar-plan { font-size: 12px; color: var(--muted); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  padding: 8px 10px; border-radius: 6px; color: var(--ink);
  font-size: 14px;
}
.sidebar-nav a:hover { background: white; text-decoration: none; }
.sidebar-foot { margin-top: auto; font-size: 12px; padding-top: 16px; border-top: 1px solid var(--border); }

.dashboard-main { padding: 24px 32px; max-width: 1100px; }
@media (max-width: 800px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--border); }
}

.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0 24px; }
.stat-card {
  background: white; border: 1px solid var(--border); border-radius: 10px; padding: 16px;
}
.stat-num { font-size: 28px; font-weight: 800; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
@media (max-width: 700px) { .dash-stats { grid-template-columns: 1fr; } }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0; }
.dash-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; background: white; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.dash-table th, .dash-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.dash-table thead { background: var(--bg-soft); }

.grade-pill { display: inline-block; padding: 3px 9px; border-radius: 6px; font-weight: 700; font-size: 12px; }
.grade-pill.grade-A { background: #d1fae5; color: var(--pass); }
.grade-pill.grade-B { background: #dbeafe; color: #1e3a8a; }
.grade-pill.grade-C { background: #fef3c7; color: var(--warn); }
.grade-pill.grade-D { background: #fed7aa; color: #9a3412; }
.grade-pill.grade-F { background: #fee2e2; color: var(--fail); }

.empty { background: var(--bg-soft); border: 1px dashed var(--border); border-radius: 10px; padding: 32px; text-align: center; }

.onboarding {
  background: linear-gradient(135deg, var(--primary), #0f172a); color: white;
  padding: 24px 28px; border-radius: 14px; margin-bottom: 24px;
}
.onboarding h2 { color: white; margin-top: 0; }
.onboarding-steps { list-style: none; padding: 0; }
.onboarding-steps li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.2); }
.onboarding-steps li.done::after { content: " ✓"; color: #86efac; font-weight: bold; }
.onboarding-steps p { color: rgba(255,255,255,0.78); }

.filter-row { display: flex; gap: 12px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.filter-row a { padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink); font-size: 13px; }
.filter-row a.active { background: var(--primary); color: white; }
.filter-row a:hover { text-decoration: none; }

.api-key { word-break: break-all; font-size: 12px; }

/* ---------- related-grid (cross-link blocks) ---------- */
.related-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px;
  list-style: none; padding: 0; margin: 12px 0 0;
}
.related-grid li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.related-grid a { color: var(--ink); }
.related-grid a:hover { color: var(--primary); }
@media (max-width: 700px) { .related-grid { grid-template-columns: 1fr; } }
