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

:root {
  --font: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --surface: #f5f5f7;
  --surface-hover: #ededf0;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e0e0e0;
  --border-light: #d0d0d0;
  --primary: #0d7d7d;
  --primary-dark: #0a6767;
  --primary-glow: rgba(26, 170, 170, 0.25);
  --primary-subtle: rgba(26, 170, 170, 0.1);
  --critical: #ef4444;
  --serious: #f97316;
  --moderate: #eab308;
  --minor: #60a5fa;
  --pass: #1AAAAA;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(.216, .62, .356, 1);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── View visibility ──────────────────────────────── */
.hero, .loading, .results { display: none; }
.hero.active { display: flex; }
.loading.active { display: flex; }
.results.active { display: block; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}


.hero-content {
  max-width: 800px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}


.hero h1 {
  color: var(--text);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  margin-bottom: 40px;
  line-height: 1.7;
  font-weight: 400;
}

/* ── Scan form ────────────────────────────────────── */
.scan-form { width: 100%; }

.input-group {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-group input {
  flex: 1;
  border: none;
  padding: 20px 24px;
  font-size: 16px;
  font-family: var(--font);
  font-weight: 500;
  outline: none;
  color: var(--text);
  background: transparent;
  min-width: 0;
}
.input-group input::placeholder { color: #999; }

.input-group button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 20px 36px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform 0.15s;
  white-space: nowrap;
  text-transform: uppercase;
}
.input-group button:hover { background: var(--primary-dark); transform: scale(1.02); }
.input-group button:active { transform: scale(0.97); }
.input-group button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.form-error {
  color: var(--critical);
  font-size: 14px;
  margin-top: 12px;
  font-weight: 500;
}

/* ── Features ─────────────────────────────────────── */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 48px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.feature svg { stroke: var(--primary); }

/* ── History ──────────────────────────────────────── */
.history-section {
  margin-top: 56px;
  text-align: left;
}
.history-section h2 {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 18px;
  text-align: left;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text);
  text-decoration: none;
}
.history-item:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.history-item-url {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.history-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.history-score {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.history-date {
  font-size: 11px;
  color: #999;
}
.history-clear {
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  margin-top: 10px;
  text-align: center;
  display: block;
  width: 100%;
  font-family: var(--font);
  font-weight: 500;
  transition: color var(--transition);
}
.history-clear:hover { color: var(--primary); }

/* ── Loading ──────────────────────────────────────── */
.loading {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 40px 24px;
}

.loading-content { text-align: center; }

.progress-ring-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 28px;
}
.progress-ring { width: 100%; height: 100%; }
.progress-ring circle:first-child { stroke: #e0e0e0; }
.progress-ring circle:last-child { stroke: var(--primary); }
.progress-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
}

.loading-text {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.loading-url {
  color: #999;
  font-size: 14px;
  word-break: break-all;
  margin-bottom: 28px;
  font-weight: 500;
}

.cancel-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.cancel-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Results ──────────────────────────────────────── */
.results { min-height: 100vh; background: var(--bg); }

/* Top bar */
.results-topbar {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.back-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.back-btn:hover { border-color: var(--primary); color: var(--primary); }

.topbar-scan-form {
  display: flex;
  flex: 1;
  max-width: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--transition);
}
.topbar-scan-form:focus-within { border-color: var(--primary); }

.topbar-url-input {
  flex: 1;
  border: none;
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  outline: none;
  color: var(--text);
  background: transparent;
  min-width: 0;
}
.topbar-url-input::placeholder { color: #999; }

.topbar-scan-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background var(--transition);
}
.topbar-scan-btn:hover { background: var(--primary-dark); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.scan-time {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  font-weight: 500;
}

.topbar-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.topbar-action-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Results header */
.results-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.score-section {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

/* Screenshot */
.screenshot-wrap {
  width: 220px;
  height: 124px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.screenshot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Score circle */
.score-wrap {
  text-align: center;
  flex-shrink: 0;
}

.score-circle {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 4px;
}
.score-circle svg { width: 100%; height: 100%; }
.score-circle svg circle:first-child { stroke: var(--border); }

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
}

.score-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 60%);
  font-size: 12px;
  color: #999;
  font-weight: 600;
}

.score-grade {
  font-size: 13px;
  font-weight: 800;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Scanned info */
.scanned-info {
  flex: 1;
  min-width: 0;
}
.scanned-url {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.scanned-date {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

/* Summary chips */
.summary-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.summary-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.summary-chip .chip-count {
  font-size: 17px;
  font-weight: 900;
}

/* ── Toolbar ──────────────────────────────────────── */
.toolbar {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.toolbar-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar-right {
  display: flex;
  gap: 6px;
  align-items: center;
}

.filter-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-light); }
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.tool-btn:hover { background: var(--surface-hover); color: var(--text); }
.tool-btn.active { background: var(--primary-subtle); color: var(--primary); border-color: var(--primary); }

/* Issues list */
.issues-list {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px 40px;
}

/* Category group header */
.category-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  margin-bottom: 12px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.category-group-header:first-child { margin-top: 0; }
.category-group-count {
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
}

.issue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all var(--transition);
}
.issue-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.issue-header {
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sev-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 6px currentColor;
}

.issue-meta {
  flex: 1;
  min-width: 0;
}

.issue-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-sev { color: #fff; }
.tag-wcag { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.tag-cat { background: var(--primary-subtle); color: var(--primary); }

.issue-desc {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.issue-toggle {
  color: #999;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(.216, .62, .356, 1);
  margin-top: 4px;
}
.issue-card.expanded .issue-toggle { transform: rotate(180deg); }

/* Issue details (collapsed by default) */
.issue-details {
  display: none;
  padding: 0 18px 16px;
  border-top: 1px solid var(--border);
}
.issue-card.expanded .issue-details { display: block; }

.issue-help {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0;
  line-height: 1.7;
  font-weight: 500;
}

.issue-help a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.issue-help a:hover { text-decoration: underline; }

.node-count {
  font-size: 12px;
  color: #999;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.node-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.node-html {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 11px;
  color: var(--primary);
  background: rgba(26, 170, 170, 0.08);
  padding: 8px 10px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 8px;
  border: 1px solid rgba(26, 170, 170, 0.15);
}

.node-selector {
  font-size: 11px;
  color: #999;
  font-family: monospace;
  margin-bottom: 6px;
}

.node-fix {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  white-space: pre-wrap;
  font-weight: 500;
}

/* No issues */
.no-issues {
  text-align: center;
  padding: 60px 20px;
}
.no-issues svg { margin-bottom: 16px; stroke: var(--primary); }
.no-issues h3 { font-size: 20px; margin-bottom: 8px; color: var(--primary); font-weight: 800; }
.no-issues p { color: var(--text-muted); }

/* Error result */
.error-result {
  text-align: center;
  padding: 60px 20px;
}
.error-result h3 { font-size: 20px; margin-bottom: 8px; color: var(--critical); font-weight: 800; }
.error-result p { color: var(--text-muted); max-width: 480px; margin: 0 auto; }

/* Footer */
.results-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: #999;
  border-top: 1px solid var(--border);
  font-weight: 500;
}

/* ── Email Gate ──────────────────────────────────── */
.gate-section {
  position: relative;
  margin: 20px 0;
}

.gate-blur {
  display: flex;
  flex-direction: column;
  gap: 10px;
  filter: blur(6px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

.gate-fake-card {
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.gate-lock {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.gate-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.gate-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.gate-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  width: 100%;
}

.gate-input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color var(--transition);
}
.gate-input:focus { border-color: var(--primary); }
.gate-input::placeholder { color: #999; }

.gate-btn {
  padding: 14px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
.gate-btn:hover { background: var(--primary-dark); }
.gate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gate-fine {
  font-size: 11px;
  color: #999;
  margin-top: 8px;
}

/* ── Risk CTA + Pricing ─────────────────────────── */
.risk-cta {
  margin: 32px 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
}

.risk-cta.cta-urgent { border-color: #fca5a5; }
.risk-cta.cta-warning { border-color: #fdba74; }
.risk-cta.cta-good { border-color: #99f6e4; }

.risk-cta-left {
  flex: 1;
  padding: 32px;
  background: var(--bg);
}

.risk-headline {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.3;
}

.risk-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.risk-stat {
  display: flex;
  flex-direction: column;
}

.risk-stat-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
}

.cta-urgent .risk-stat-value { color: #dc2626; }
.cta-warning .risk-stat-value { color: #ea580c; }

.risk-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

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

.risk-bullets li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
  margin-bottom: 4px;
}

.risk-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.risk-cta-right {
  width: 340px;
  flex-shrink: 0;
  padding: 32px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pricing-card {
  text-align: center;
  margin-bottom: 20px;
}

.pricing-tier {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 4px;
}

.pricing-price {
  font-size: 36px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}

.pricing-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 12px;
}

.pricing-includes {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pricing-includes div::before {
  content: "✓ ";
  color: var(--primary);
  font-weight: 700;
}

.fix-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fix-input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color var(--transition);
}
.fix-input:focus { border-color: var(--primary); }
.fix-input::placeholder { color: #999; }

.fix-btn {
  padding: 14px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--transition), transform 0.15s;
}
.fix-btn:hover { background: var(--primary-dark); transform: scale(1.02); }
.fix-btn:active { transform: scale(0.98); }
.fix-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.fix-disclaimer {
  font-size: 11px;
  color: #999;
  margin-top: 8px;
  text-align: center;
}

.cta-success-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
}

.cta-success-title {
  font-size: 16px;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 2px;
}

.cta-success-text {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .risk-cta { flex-direction: column; }
  .risk-cta-left, .risk-cta-right { padding: 24px; }
  .risk-cta-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .risk-stats { flex-direction: column; gap: 12px; }
  .gate-form { flex-direction: column; }
  .fix-input-optional { display: none; }
}

/* ── Print / Export ───────────────────────────────── */
@media print {
  :root {
    --bg: #fff;
    --bg-elevated: #fff;
    --surface: #fff;
    --text: #1D1D1D;
    --text-muted: #555;
    --border: #ddd;
  }

  .results-topbar, .toolbar, .cancel-btn, .back-btn,
  .topbar-scan-form, .topbar-action-btn, .tool-btn,
  .filter-btn, .history-section { display: none !important; }

  .results { display: block !important; }
  .hero, .loading { display: none !important; }

  .results-header { padding-top: 0; }
  .score-section { page-break-inside: avoid; }
  .issue-card { page-break-inside: avoid; break-inside: avoid; border: 1px solid #ddd; }
  .issue-details { display: block !important; }

  .results-footer { border-top: 1px solid #ddd; }
  body { background: #fff; color: #1D1D1D; }

  .print-header {
    display: block !important;
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #1D1D1D;
    margin-bottom: 20px;
  }
  .print-header h1 { font-size: 22px; margin-bottom: 4px; color: #1D1D1D; }
  .print-header p { font-size: 13px; color: #555; }
}

.print-header { display: none; }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 700px) {
  .score-section { flex-direction: column; align-items: stretch; gap: 16px; }
  .score-section > * { width: 100%; }
  .screenshot-wrap { width: 100%; max-width: 100%; height: auto; aspect-ratio: 16/9; }
  .score-wrap { display: flex; align-items: center; gap: 16px; justify-content: center; }
  .score-circle { margin: 0; }
  .scanned-info { text-align: center; }

  .input-group { flex-direction: column; }
  .input-group input { padding: 18px 20px; }
  .input-group button { justify-content: center; padding: 18px; }

  .results-topbar { padding: 10px 12px; }
  .topbar-scan-form { display: none; }
  .results-header { padding: 16px 12px 0; }
  .toolbar { padding: 10px 12px; flex-direction: column; align-items: stretch; }
  .toolbar-left { flex-direction: column; }
  .toolbar-right { justify-content: flex-end; }
  .issues-list { padding: 10px 12px 32px; }

  .summary-chips { gap: 6px; }
  .summary-chip { padding: 4px 10px; font-size: 12px; }
  .summary-chip .chip-count { font-size: 14px; }

  .issue-header { padding: 12px; gap: 8px; }
  .issue-details { padding: 0 12px 12px; }

  .history-item { padding: 10px 14px; }
  .history-item-url { font-size: 13px; }
}

@media (max-width: 420px) {
  .hero { padding: 32px 16px; }
  .hero h1 { font-size: 1.8rem; }
  .features { gap: 16px; }
  .feature { font-size: 11px; }

  .topbar-right span.scan-time { display: none; }
  .topbar-action-btn span { display: none; }
}
