/* AuditPilot styles. One file, no build step. */
:root {
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --brand: #2563eb;
  --brand-ink: #ffffff;
  --good: #15803d;
  --good-bg: #dcfce7;
  --ok: #b45309;
  --ok-bg: #fef3c7;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--primary);
}

code {
  background: #f3f4f6;
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 720px;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.break {
  overflow-wrap: anywhere;
}

.nowrap {
  white-space: nowrap;
}

.push {
  margin-left: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Honeypot field: hidden from people, visible to naive bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------- components ------------------------------- */

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

.card > :last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.grid > .card {
  margin-bottom: 0;
}

.grid.tight {
  gap: 12px;
  margin-bottom: 0;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 480px) and (max-width: 719px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-brand {
  background: var(--brand);
  color: var(--brand-ink);
}

.btn-brand:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-outline {
  background: #fff;
  border-color: #d1d5db;
  color: var(--ink);
}

.btn-outline:hover:not(:disabled) {
  background: #f3f4f6;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--ink);
}

.btn-light {
  background: #fff;
  color: var(--primary-dark);
}

.btn-danger {
  background: var(--bad);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 14px 22px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

label,
.field {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

.field-label {
  display: block;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="file"],
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  resize: vertical;
}

input[type="color"] {
  width: 56px;
  height: 40px;
  padding: 2px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.color-row {
  display: block;
  margin-top: 6px;
}

.hint {
  display: block;
  margin-top: 6px;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}

.stack > * + * {
  margin-top: 16px;
}

.narrow-form {
  max-width: 520px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.input-prefix {
  display: flex;
  align-items: stretch;
  margin-top: 6px;
}

.input-prefix > span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #f3f4f6;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
  white-space: nowrap;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.input-prefix > input {
  margin-top: 0;
  border-radius: 0 8px 8px 0;
  min-width: 0;
}

.notice {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.notice-ok {
  background: var(--good-bg);
  border-color: #86efac;
  color: #14532d;
}

.notice-error,
.form-error {
  background: var(--bad-bg);
  border-color: #fca5a5;
  color: #7f1d1d;
}

.notice-info {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.form-error {
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.pill,
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  white-space: nowrap;
}

.pill-solid {
  background: var(--primary);
  color: #fff;
}

.badge-high {
  background: var(--bad-bg);
  color: var(--bad);
}

.badge-medium {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge-low {
  background: #e5e7eb;
  color: #374151;
}

.pill.tone-good {
  background: var(--good-bg);
  color: var(--good);
}

.pill.tone-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.pill.tone-bad {
  background: var(--bad-bg);
  color: var(--bad);
}

.bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin: 8px 0;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.tone-good .bar-fill {
  background: var(--good);
}

.tone-ok .bar-fill {
  background: #d97706;
}

.tone-bad .bar-fill {
  background: var(--bad);
}

.ticks {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.ticks li {
  position: relative;
  padding: 4px 0 4px 26px;
  font-size: 0.95rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--good);
  border-bottom: 2px solid var(--good);
  transform: rotate(-45deg);
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid #d1d5db;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
  html {
    scroll-behavior: auto;
  }
}

.audit-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.audit-progress[hidden],
.form-error[hidden],
.audit-done[hidden] {
  display: none;
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

/* -------------------------------- marketing -------------------------------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.95rem;
}

.nav nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
}

.nav nav a:not(.btn):hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .nav nav a[href^="/#"] {
    display: none;
  }
}

.hero {
  background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 100%);
  padding: 72px 0 40px;
  text-align: center;
}

.hero-inner {
  max-width: 820px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 16px 0;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.15rem;
  color: #374151;
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section {
  padding: 56px 0;
}

.section h2 {
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.section h2.center + .grid,
.section h2.center + .steps {
  margin-top: 32px;
}

.section-alt {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.demo-card {
  text-align: left;
  margin-top: 24px;
}

.inline-form {
  display: flex;
  gap: 10px;
}

.inline-form input {
  margin-top: 0;
  flex: 1;
  min-width: 0;
}

.demo-form .form-error,
.demo-form .audit-progress {
  margin-top: 12px;
}

@media (max-width: 560px) {
  .inline-form {
    flex-direction: column;
  }
}

.feature h3 {
  margin-bottom: 6px;
}

.feature p {
  margin: 0;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  display: flex;
  gap: 14px;
}

.step-num {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing {
  margin-top: 32px;
  align-items: start;
}

.price-card {
  position: relative;
}

.price-card-featured {
  border: 2px solid var(--primary);
}

.price-card .pill-solid {
  position: absolute;
  top: -12px;
  right: 20px;
}

.price {
  margin: 0 0 6px;
}

.price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-period {
  color: var(--muted);
}

.faq {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 12px;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
}

.faq p {
  margin: 10px 0 0;
}

.cta-band {
  background: var(--primary);
  color: #fff;
}

.cta-band p {
  opacity: 0.9;
}

.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.footer-inner p {
  margin: 0;
  flex: 1 1 280px;
}

.footer-inner nav {
  display: flex;
  gap: 16px;
}

/* ----------------------------------- auth ----------------------------------- */

.auth-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 48px 20px;
}

.auth-wrap > .brandmark {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-card {
  padding: 28px;
}

.auth-card h1 {
  font-size: 1.45rem;
}

.error-code {
  font-size: 3rem;
  font-weight: 800;
  color: #d1d5db;
  margin: 0;
}

/* --------------------------------- dashboard --------------------------------- */

.dash-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.dash-email {
  color: var(--muted);
}

@media (max-width: 640px) {
  .dash-email {
    display: none;
  }
}

.dash-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.dash-nav a {
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.dash-nav a:hover {
  color: var(--ink);
}

.dash-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.dash-main {
  padding-top: 28px;
  padding-bottom: 56px;
}

.dash-main > h1 {
  margin-bottom: 20px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.stat-of {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
}

.stat p:last-child {
  margin: 0;
}

.copy-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.copy-row input,
.copy-row textarea {
  margin-top: 0;
  flex: 1;
  min-width: 0;
}

@media (max-width: 560px) {
  .copy-row {
    flex-wrap: wrap;
  }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.toolbar input,
.toolbar select {
  margin-top: 0;
  width: auto;
  flex: 1 1 220px;
  max-width: 320px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.table tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 24px 0;
  text-align: center;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.brand-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.brand-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.brand-list li:last-child {
  border-bottom: 0;
}

.swatch {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.logo-preview {
  display: block;
  height: 48px;
  width: auto;
  margin-bottom: 8px;
}

.danger {
  border-color: #fca5a5;
}

.cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cat-head h2 {
  margin: 0;
}

/* ------------------------------ brand pages ------------------------------ */

.brand-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px 32px;
}

.brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo {
  height: 48px;
  width: auto;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-card {
  border-top: 4px solid var(--brand);
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 20px 0 0;
}

.chips li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.powered {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 16px;
}

.powered a {
  color: inherit;
  font-weight: 600;
}

.audit-done {
  text-align: center;
}

body.embed {
  background: transparent;
}

.embed-wrap {
  padding: 4px;
  max-width: 560px;
  margin: 0 auto;
}

.embed-title {
  font-size: 1.25rem;
}

/* ---------------------------------- report ---------------------------------- */

.report-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.report-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  border-top: 4px solid var(--brand);
}

.report-hero h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .report-hero {
    flex-direction: column;
    text-align: center;
  }
}

.score-ring {
  flex: none;
}

.ring-track {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 10;
}

.ring-value {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke: var(--primary);
}

.tone-good .ring-value {
  stroke: #16a34a;
}

.tone-ok .ring-value {
  stroke: #d97706;
}

.tone-bad .ring-value {
  stroke: #dc2626;
}

.ring-score {
  font-size: 34px;
  font-weight: 800;
  fill: var(--ink);
}

.ring-label {
  font-size: 11px;
  font-weight: 600;
  fill: var(--muted);
}

.cat-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  padding: 18px;
}

.cat-card:hover {
  border-color: #9ca3af;
}

.cat-label {
  display: block;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}

.cat-score {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tone-good .cat-score,
.metric.tone-good .metric-value,
.metric.check-pass .metric-value {
  color: var(--good);
}

.tone-ok .cat-score,
.metric.tone-ok .metric-value,
.metric.check-warn .metric-value {
  color: var(--ok);
}

.tone-bad .cat-score,
.metric.tone-bad .metric-value,
.metric.check-fail .metric-value {
  color: var(--bad);
}

.fix-list,
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fix-row,
.check {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fix-row:last-child,
.check:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fix-row p,
.check p {
  margin: 0 0 4px;
}

.fix-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f3f4f6;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-title {
  font-weight: 600;
}

.fix {
  font-size: 0.93rem;
}

.status-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 6px;
  background: #9ca3af;
}

.check-pass .status-dot {
  background: #16a34a;
}

.check-warn .status-dot {
  background: #d97706;
}

.check-fail .status-dot {
  background: #dc2626;
}

.status-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 6px;
}

.check-pass .status-text {
  color: var(--good);
}

.check-warn .status-text {
  color: var(--ok);
}

.check-fail .status-text {
  color: var(--bad);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.metric-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
}

.cta-card {
  text-align: center;
  border-top: 4px solid var(--brand);
}

@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .card {
    box-shadow: none;
    break-inside: avoid;
  }
}
