/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:            #09090b;
  --surface:       #111115;
  --surface-2:     #18181f;
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(255,255,255,0.16);
  --text:          #fafafa;
  --text-muted:    #a1a1aa;
  --text-subtle:   #52525b;
  --primary:       #8b5cf6;
  --primary-dark:  #7c3aed;
  --primary-glow:  rgba(139,92,246,0.18);
  --primary-light: rgba(139,92,246,0.10);
  --teal:          #14b8a6;
  --teal-light:    rgba(20,184,166,0.12);
  --success:       #22c55e;
  --success-light: rgba(34,197,94,0.12);
  --warning:       #f59e0b;
  --warning-light: rgba(245,158,11,0.12);
  --danger:        #ef4444;
  --danger-light:  rgba(239,68,68,0.12);
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Text selection ── */
::selection { background: rgba(139,92,246,0.32); color: #fff; }

/* ── Custom scrollbars ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #2a2a33; }

/* ── Keyboard focus rings (a11y) ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* Don't show the ring for mouse users who don't need it */
:focus:not(:focus-visible) { outline: none; }
/* Inputs keep their own glow treatment; suppress the generic ring on them */
.input:focus-visible { outline: none; }

/* ── Page entrance ── */
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
main { animation: fade 0.24s ease both; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn:hover, .btn:active { transform: none; }
}

/* ── Typography ── */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
p  { color: var(--text-muted); }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}
.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.logo__mark {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.badge-beta {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(139,92,246,0.25);
  padding: 2px 7px;
  border-radius: 999px;
}

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}
.site-footer p { font-size: 0.8rem; color: var(--text-subtle); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:hover  { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { filter: brightness(1); transform: translateY(0); }
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn--primary:hover { box-shadow: 0 6px 24px var(--primary-glow); }
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--border-hover); color: var(--text); }
.btn--lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── Inputs ── */
.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-subtle); }
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ── Error banner ── */
.error-banner {
  background: var(--danger-light);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card--sm { padding: 20px; border-radius: var(--radius); }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--success  { background: var(--success-light); color: var(--success); }
.badge--warning  { background: var(--warning-light); color: var(--warning); }
.badge--danger   { background: var(--danger-light);  color: var(--danger); }
.badge--purple   { background: var(--primary-light); color: var(--primary); }
.badge--teal     { background: var(--teal-light);    color: var(--teal); }
.badge--subtle   { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead th {
  text-align: left;
  color: var(--text-subtle);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.02); }
td.cell--name { color: var(--text); font-weight: 500; }
td.cell--mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8rem; color: var(--text-muted); }

/* ── Score ring ── */
.score-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--border);
  position: relative;
  background: var(--surface-2);
}
.score-ring__number {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.score-ring__label { font-size: 0.7rem; color: var(--text-subtle); font-weight: 500; }
.score-ring--low  { border-color: var(--danger); }
.score-ring--mid  { border-color: var(--warning); }
.score-ring--high { border-color: var(--success); }

/* ── Snippet box ── */
.snippet {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.7;
}
.snippet .kw  { color: var(--primary); }
.snippet .str { color: var(--teal); }
.snippet .key { color: #f8b4d9; }

/* ── Section headers ── */
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

/* ── Hero ── */
.hero {
  padding: 96px 0 72px;
  text-align: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 24px;
  background: var(--primary-light);
  border: 1px solid rgba(139,92,246,0.25);
  padding: 5px 14px;
  border-radius: 999px;
}
.hero__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
}
.hero__title {
  max-width: 720px;
  margin: 0 auto 20px;
}
.hero__title span {
  background: linear-gradient(90deg, var(--primary), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub {
  max-width: 540px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── URL form ── */
.url-form {
  max-width: 560px;
  margin: 0 auto;
}
.url-form__row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.url-form__row .input { flex: 1; min-width: 0; }
.url-form__hint {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-subtle);
  text-align: center;
}

/* ── Feature pills ── */
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 48px;
}
.feature-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.feature-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Teardown report ── */
.container--narrow > .card { animation: fade 0.3s ease both; }
.container--narrow > .card:nth-of-type(2) { animation-delay: 0.04s; }
.container--narrow > .card:nth-of-type(3) { animation-delay: 0.08s; }
.container--narrow > .card:nth-of-type(4) { animation-delay: 0.12s; }
.report-header {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.report-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.report-header__url {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.score-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.score-details { flex: 1; }
.score-details__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.score-details__sub   { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.pending-note {
  background: var(--warning-light);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pending-note__icon { font-size: 1.2rem; flex-shrink: 0; }
.pending-note__text { font-size: 0.875rem; color: var(--warning); line-height: 1.6; }
.pending-note__text strong { font-weight: 600; }

/* ── Schema gap rows ── */
.gap-row__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.gap-row__body { flex: 1; min-width: 0; }
.gap-row__name { font-weight: 600; font-size: 0.9rem; margin-bottom: 3px; }
.gap-row__desc { font-size: 0.8rem; color: var(--text-muted); }
.gap-row__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }

/* ── Prompt coverage table ── */
.prompt-row-covered { color: var(--success); }
.prompt-row-risk    { color: var(--warning); }
.prompt-row-missing { color: var(--danger); }

/* ── Blurred placeholder overlay ── */
.coming-soon {
  position: relative;
}
.coming-soon::after {
  content: 'Live crawl · next release';
  position: absolute;
  inset: 0;
  background: rgba(9,9,11,0.7);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* ── 404 ── */
.notfound {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
}
.notfound__code { font-size: 6rem; font-weight: 800; color: var(--surface-2); letter-spacing: -0.05em; line-height: 1; }
.notfound__msg  { font-size: 1.25rem; font-weight: 600; margin-top: 8px; }
.notfound__sub  { color: var(--text-muted); font-size: 0.9rem; margin: 10px 0 28px; }

/* ── Loading spinner ── */
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Loading steps ── */
.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 300px;
  margin: 0 auto;
  text-align: left;
}
.loading-step {
  font-size: 0.82rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
}
.loading-step::before { content: '○'; font-size: 0.65rem; }
.loading-step--active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 500;
}
.loading-step--active::before { content: '●'; }

/* ── Info note ── */
.info-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.6;
}
.crawled-url {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.74rem;
  color: var(--text-subtle);
  word-break: break-all;
}
.inline-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.74rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text-muted);
  word-break: break-all;
}

/* ── Gap item wrapper ── */
.gap-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.gap-item--last { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.gap-row { display: flex; align-items: flex-start; gap: 14px; }

/* ── Snippet block with copy ── */
.snippet-block {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.snippet-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.74rem;
  color: var(--text-muted);
  gap: 12px;
}
.snippet--sm {
  padding: 12px 14px;
  border: none;
  border-radius: 0;
  font-size: 0.73rem;
  max-height: 240px;
  overflow: auto;
  margin: 0;
  white-space: pre;
}
.btn-copy {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  font-family: var(--font);
}
.btn-copy:hover { border-color: var(--border-hover); color: var(--text); }
.btn-copy--done { color: var(--success); border-color: var(--success); background: var(--success-light); }

/* ── Pages crawled list ── */
.pages-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pages-list__item { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; flex-wrap: wrap; }
.pages-list__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-subtle); flex-shrink: 0;
}
.pages-list__link {
  color: var(--text-muted);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.15s;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
}
.pages-list__link:hover { color: var(--text); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-state__icon { font-size: 2rem; }
.empty-state__text { font-size: 0.9rem; }

/* ── Prompt coverage table ── */
.prompt-category-hd {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 14px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-top: 4px;
}
.prompt-category-hd:first-child { padding-top: 0; }
.prompt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.prompt-item:last-of-type { border-bottom: none; }
.prompt-item__icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.prompt-item__icon--covered { background: var(--success); }
.prompt-item__icon--at_risk { background: var(--warning); }
.prompt-item__icon--missing { background: var(--danger); }
.prompt-item__text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prompt-item__text em {
  font-style: normal;
  color: var(--text-subtle);
  font-size: 0.78rem;
}
.prompt-item__badge {
  flex-shrink: 0;
}

/* Score subscores */
.subscores {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.subscore {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.subscore__val {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.subscore__label { color: var(--text-subtle); font-size: 0.75rem; }

/* Combined score badge in header */
.combined-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.combined-score__num {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.combined-score__denom {
  font-size: 0.7rem;
  color: var(--text-subtle);
  font-weight: 500;
}

/* Enhanced badge */
.badge--ai {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(20,184,166,0.15));
  color: var(--primary);
  border: 1px solid rgba(139,92,246,0.3);
}

/* ── Site nav ── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.site-nav__link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.site-nav__link--settings { gap: 8px; }
.site-nav__avatar {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
}
.site-nav__avatar-placeholder {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: white; flex-shrink: 0;
}
.btn--sm { padding: 6px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }

/* ── Auth pages ── */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-box {
  width: 100%;
  max-width: 400px;
}
.auth-box__header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-box__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-box__sub {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-box__footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-top: 20px;
}
.auth-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

/* ── Form fields ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.field__required { color: var(--danger); }
.field__hint { font-size: 0.75rem; color: var(--text-subtle); margin-top: 4px; }

/* ── Success banner ── */
.success-banner {
  background: var(--success-light);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Welcome banner ── */
.welcome-banner {
  background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(20,184,166,0.08));
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.welcome-banner span { font-size: 1.2rem; flex-shrink: 0; }

/* ── Color picker ── */
.color-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.color-picker-wrap {
  flex-shrink: 0;
}
.color-picker {
  -webkit-appearance: none;
  appearance: none;
  width: 56px;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  padding: 2px;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; border-radius: 6px; }
.color-picker::-webkit-color-swatch { border: none; border-radius: 6px; }
.color-info { flex: 1; min-width: 160px; }
.color-swatch {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

/* ── Upload zone ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone--hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
#upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* ── Logo preview ── */
.logo-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.logo-preview__img {
  max-height: 52px;
  max-width: 160px;
  object-fit: contain;
  border-radius: 4px;
}
.logo-preview__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Agency header (teardown + settings preview) ── */
.agency-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.agency-header__logo-wrap { flex-shrink: 0; }
.agency-header__logo-img { height: 40px; max-width: 120px; object-fit: contain; border-radius: 4px; }
.agency-header__logo-placeholder {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: white; flex-shrink: 0;
}
.agency-header__info { flex: 1; min-width: 0; }
.agency-header__name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agency-header__tagline {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agency-header__contact {
  font-size: 0.78rem;
  color: var(--text-subtle);
  white-space: nowrap;
  margin-left: auto;
  padding-left: 8px;
}

/* ── History page ── */
.history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.history-domain {
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-domain__favicon {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  color: var(--text-subtle); flex-shrink: 0;
  border: 1px solid var(--border);
}
.history-row:hover td { background: rgba(255,255,255,0.02); }

/* ── Score chip (history table) ── */
.score-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.score-chip--high { color: var(--success); background: var(--success-light); }
.score-chip--mid  { color: var(--warning); background: var(--warning-light); }
.score-chip--low  { color: var(--danger);  background: var(--danger-light); }

/* ── Settings page ── */
.logo-preview__remove { cursor: pointer; }

/* ── Plan badge (nav) ── */
.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.15s;
}
.plan-badge--pro {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
}
.plan-badge--free {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.plan-badge--free:hover {
  border-color: var(--primary);
  color: var(--primary);
  opacity: 1;
}

/* ── Upgrade page ── */
.upgrade-page { background: radial-gradient(ellipse 70% 40% at 50% -10%, rgba(139,92,246,0.12) 0%, transparent 70%); }
.upgrade-lock-icon {
  width: 64px;
  height: 64px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--text-muted);
}
.upgrade-usage {
  background: var(--surface);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 40px;
}
.upgrade-usage__bar-wrap {
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.upgrade-usage__bar {
  height: 100%;
  background: var(--danger);
  border-radius: 999px;
}
.upgrade-usage__label {
  font-size: 0.8rem;
  color: var(--danger);
  font-weight: 600;
  text-align: center;
}
.upgrade-card {
  background: var(--surface);
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(139,92,246,0.08);
}
.upgrade-card__header {
  padding: 32px 32px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.upgrade-card__plan {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.upgrade-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.upgrade-card__amount {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}
.upgrade-card__period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}
.upgrade-card__badge {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}
.upgrade-card__divider {
  border-top: 1px solid var(--border);
}
.upgrade-features {
  list-style: none;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.upgrade-features__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.upgrade-features__check { flex-shrink: 0; }
.upgrade-card__cta {
  padding: 24px 32px 32px;
}
.upgrade-cta-btn {
  font-size: 1.05rem;
  padding: 16px 28px;
}
.upgrade-card__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 12px;
}
.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--warning-light);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--warning);
  margin-bottom: 16px;
}
.upgrade-proof {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.upgrade-proof__item {
  flex: 1;
  padding: 24px 20px;
  text-align: center;
}
.upgrade-proof__divider {
  width: 1px;
  background: var(--border);
}
.upgrade-proof__stat {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 4px;
}
.upgrade-proof__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Billing success page ── */
.billing-success-icon {
  width: 80px;
  height: 80px;
  background: rgba(34,197,94,0.1);
  border: 2px solid rgba(34,197,94,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
}

/* ── Upgrade banner (history page) ── */
.upgrade-banner {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(20,184,166,0.06));
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.upgrade-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero { padding: 64px 0 48px; }
  .url-form__row { flex-direction: column; }
  .url-form__row .btn { width: 100%; justify-content: center; }
  .report-grid { grid-template-columns: 1fr; }
  .report-header__top { flex-direction: column; }
  .score-row { flex-direction: column; align-items: flex-start; }
  .gap-row__right { flex-direction: row; align-items: center; }
  thead { display: none; }
  tbody tr { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--border); }
  tbody td { padding: 4px 14px; border-bottom: none; }
  .site-nav .site-nav__link span { display: none; }
  .history-header { flex-direction: column; }
  .agency-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .agency-header__contact { margin-left: 0; padding-left: 0; }
  .color-row { flex-direction: column; }
  .upgrade-card__header { flex-direction: column; }
  .upgrade-proof { flex-direction: column; }
  .upgrade-proof__divider { width: auto; height: 1px; }
  .upgrade-banner__inner { flex-direction: column; align-items: flex-start; }
  /* Landing page responsive */
  .how-steps { flex-direction: column; gap: 16px; }
  .how-step__connector { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-roi { flex-direction: column; }
  .pricing-roi__divider { width: auto; height: 1px; }
  .stats-strip__inner { flex-direction: column; gap: 0; }
  .stats-strip__divider { width: 80%; height: 1px; }
  .stat-item { padding: 14px 16px; }
  .sample-preview__header { gap: 12px; }
  .guest-cta { flex-direction: column; gap: 14px; }
  .guest-cta__actions { width: 100%; }
  .lp-section { padding: 56px 0; }
}

@media (max-width: 375px) {
  .container, .container--narrow { padding: 0 16px; }
  h1 { font-size: 1.75rem; }
}

/* ── Landing page sections ── */
.lp-section { padding: 80px 0; }
.lp-section--surface { background: var(--surface); }
.lp-card-icon { font-size: 1.5rem; margin-bottom: 12px; }

/* ── Stats strip ── */
.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  background: var(--surface);
}
.stats-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1;
  min-width: 160px;
  text-align: center;
  padding: 12px 24px;
}
.stat-item__number {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 5px;
}
.stat-item__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.stats-strip__divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── How it works ── */
.how-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.how-step {
  flex: 1;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.how-step__num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 999px;
  display: inline-flex;
  padding: 3px 10px;
  margin-bottom: 14px;
}
.how-step h3 { font-size: 1rem; margin-bottom: 8px; }
.how-step p  { font-size: 0.85rem; }
.how-step__connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  margin-top: 40px;
  color: var(--text-subtle);
  flex-shrink: 0;
}

/* ── Sample preview card ── */
.sample-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.sample-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.sample-preview__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.sample-preview__score {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.sample-preview__score-num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--danger);
  line-height: 1;
}
.sample-preview__score-denom {
  font-size: 0.7rem;
  color: var(--text-subtle);
}
.sample-preview__body { padding: 16px 24px 0; }
.sample-gap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.sample-gap-row:last-of-type { border-bottom: none; }
.sample-gap-row__icon { flex-shrink: 0; font-size: 1rem; }
.sample-gap-row__name { flex: 1; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample-preview__blur {
  text-align: center;
  padding: 14px 0 18px;
  font-size: 0.8rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
  margin-top: 4px;
  font-style: italic;
}

/* ── Pricing grid ── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.pricing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: relative;
}
.pricing-card--featured {
  border-color: rgba(139,92,246,0.5);
  background: linear-gradient(180deg, rgba(139,92,246,0.04) 0%, var(--surface) 40%);
  box-shadow: 0 0 40px rgba(139,92,246,0.07);
}
.pricing-card__badge {
  position: absolute;
  top: -1px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
}
.pricing-card__plan {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 10px;
}
.pricing-card--featured .pricing-card__plan { color: var(--primary); }
.pricing-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.pricing-card__price {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}
.pricing-card__period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}
.pricing-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.pricing-card__feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.pricing-card__feature svg { flex-shrink: 0; margin-top: 2px; }
.pricing-card__feature--dim { color: var(--text-subtle); }
.pricing-card__feature--accent { color: var(--primary); font-size: 0.82rem; }

/* ── Pricing ROI strip ── */
.pricing-roi {
  display: flex;
  margin-top: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.pricing-roi__item {
  flex: 1;
  padding: 20px 16px;
  text-align: center;
}
.pricing-roi__divider { width: 1px; background: var(--border); flex-shrink: 0; }
.pricing-roi__stat {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 4px;
}
.pricing-roi__label { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

/* ── Final CTA section ── */
.lp-cta-section {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,92,246,0.1) 0%, transparent 70%);
}

/* ── Guest CTA (teardown page) ── */
.guest-cta {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(20,184,166,0.05));
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.guest-cta__icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.guest-cta__body { flex: 1; min-width: 200px; }
.guest-cta__title { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.guest-cta__sub { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.guest-cta__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── Sample notice (sample page) ── */
.sample-notice {
  background: var(--warning-light);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.sample-notice__link { color: var(--warning); font-weight: 600; }
.sample-notice__link:hover { text-decoration: underline; }

/* ── Print / PDF styles ────────────────────────────────────────────────────── */
@media print {
  body { background: #fff; color: #0f172a; font-size: 11pt; }
  .site-header, .site-footer, #pdf-download-btn, .btn, .btn-copy,
  .info-note, meta[http-equiv] { display: none !important; }
  .container--narrow { max-width: 100%; padding: 0 16px; }
  .card { break-inside: avoid; border: 1px solid #e2e8f0; box-shadow: none; margin-bottom: 16pt; }
  .snippet { white-space: pre-wrap; font-size: 8pt; break-inside: avoid; }
  .score-ring { border-width: 3px; }
  .gap-item { break-inside: avoid; }
  a[href]:after { content: none; }
}
