/* ═══════════════════════════════════════════
   Product Alt Lab – Design System v2
   Phase A: Cold-blue SaaS palette
   ═══════════════════════════════════════════ */

/* ── CSS Variables ────────────────────── */
:root {
  color-scheme: light;

  /* Brand */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;

  /* Ink / text */
  --ink:       #0f172a;
  --ink-soft:  #334155;
  --muted:     #64748b;

  /* Surfaces */
  --line:      #e2e8f0;
  --paper:     #ffffff;
  --bg-subtle: #f8fafc;

  /* Semantic */
  --success:   #10b981;
  --success-bg:#ecfdf5;
  --warning:   #f59e0b;
  --warning-bg:#fffbeb;
  --error:     #ef4444;
  --error-bg:  #fef2f2;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgb(15 23 42 / 0.04);
  --shadow-sm: 0 1px 3px rgb(15 23 42 / 0.06), 0 1px 2px rgb(15 23 42 / 0.04);
  --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.07), 0 2px 4px -2px rgb(15 23 42 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.04);
  --shadow-xl: 0 24px 40px -8px rgb(15 23 42 / 0.12);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Spacing (8px grid) */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── Reset ────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; max-width: 100vw; overflow-x: hidden; }
body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg-subtle);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

/* ── Typography ────────────────────────── */
h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 750;
  line-height: 1.2;
  color: var(--ink);
}
h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 650;
  color: var(--ink-soft);
}
p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: break-word;
}
.lead {
  max-width: 580px;
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.58;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Layout ───────────────────────────── */
.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.section {
  padding: var(--space-2xl) 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: var(--space-lg);
}
.section-head p {
  max-width: 540px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ── Header ───────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 17px;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--ink-soft);
  transition: color 160ms ease;
}

/* ── Buttons ──────────────────────────── */
.btn, .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.nav-cta { padding: 0 14px; min-height: 36px; font-size: 13px; }

/* btn-primary: brand color */
.btn-primary, .nav-cta {
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover, .nav-cta:hover {
  background: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* btn-secondary: white with border */
.btn-secondary {
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--brand-200);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* btn-ghost: transparent */
.btn-ghost {
  background: transparent;
  color: var(--brand-600);
}
.btn-ghost:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

/* btn-lg */
.btn-lg {
  min-height: 48px;
  padding: 0 24px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

/* btn-sm */
.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Cards ────────────────────────────── */
.panel, .card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}
.panel {
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.card {
  padding: 20px;
  min-width: 0;
  box-shadow: var(--shadow-xs);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
  list-style: none;
}
.card ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 14px;
}
.card ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brand-500);
  font-weight: 700;
}

/* Feature card icon container */
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 22px;
  margin-bottom: 12px;
}

/* ── Pills / Badges ───────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.pill-success {
  background: var(--success-bg);
  color: #059669;
}
.pill-warning {
  background: var(--warning-bg);
  color: #b45309;
}
.pill-error {
  background: var(--error-bg);
  color: #dc2626;
}
.pill-brand {
  background: var(--brand-50);
  color: var(--brand-700);
}
.pill-popular {
  background: var(--brand-600);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
}

/* ── Hero ─────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: center;
  padding: var(--space-3xl) 0 var(--space-xl);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ── Pricing ──────────────────────────── */
.price {
  font-size: 36px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
}
.price-period {
  font-size: 15px;
  font-weight: 450;
  color: var(--muted);
}
.pricing-highlight {
  border-color: var(--brand-500) !important;
  box-shadow: var(--shadow-lg) !important;
  position: relative;
}

/* ── Table ────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
}
.table th, .table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}
.table th {
  background: var(--bg-subtle);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tr:hover td {
  background: var(--brand-50);
}

/* ── Scanner Console ──────────────────── */
.console {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}
.console-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.console-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  transition: background 300ms ease;
}
.console-dot.active { background: var(--success); }
.console-dot.error { background: var(--error); }
.status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.console-url {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.console-url input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-subtle);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.console-url input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
  outline: 0;
  background: var(--paper);
}
.console-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.console-metric {
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.console-metric:last-child { border-right: 0; }
.console-metric .value {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.console-metric .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.console-results {
  padding: 14px 18px;
  max-height: 300px;
  overflow-y: auto;
}
.issue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.issue-row:last-child { border-bottom: 0; }
.issue-row .img-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-weight: 500;
}
.issue-row .issue-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.connector-actions {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-subtle);
}
.scan-note {
  padding: 12px 18px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.scan-note.success { color: #059669; }
.scan-note.error { color: #dc2626; }

/* ── Footer ───────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: var(--space-2xl);
}

/* ── Trust Bar ────────────────────────── */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: var(--space-xl) 0;
}
.trust-item {
  text-align: center;
}
.trust-item .num {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.trust-item .lbl {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── How-it-works ─────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  counter-reset: step;
}
.step {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}
.step h3 { margin-bottom: 6px; }

/* ── Modal / Upgrade ──────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--paper);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  text-align: center;
  position: relative;
}
.modal-box h2 { margin-bottom: 8px; }
.modal-box p { margin-bottom: 20px; }
.modal-box .actions { justify-content: center; }
/* Close button — floating circle */
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms, color 160ms;
}
.modal-close:hover { background: var(--line); color: var(--ink); }

/* ── Misc ─────────────────────────────── */
.link {
  color: var(--brand-600);
  font-weight: 500;
  transition: color 160ms ease;
}
.link:hover { color: var(--brand-700); text-decoration: underline; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ── Scan Console — scrollable results + sticky bottom buttons ── */
.console-body {
  max-height: 580px;
  display: flex;
  flex-direction: column;
}
.console-body > div:first-child {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
.console-body .scan-note {
  flex-shrink: 0;
  margin-top: 8px;
}
.console-body .hero-actions {
  flex-shrink: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.scan-form input {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result .suggestion {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.scan-note { word-break: break-word; }
.ai-limit-note { word-break: break-word; }

/* ── Dashboard Plan Features Fix ───────── */
.plan-features {
  grid-template-columns: 1fr !important;
}
.plan-features li {
  white-space: normal;
  word-break: break-word;
}

/* ── Generator Output + Copy ───────────── */
.output-wrap { position: relative; }
.output-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.7);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 160ms;
}
.output-copy:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── Pricing Teaser Panel ───────────────── */
.tiny-card.pricing-teaser {
  background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
  border-color: #c7d2fe;
}
.tiny-card.pricing-teaser h3 { color: var(--brand-700); }
.tiny-card.pricing-teaser p { line-height: 1.6; }

/* ── Responsive ───────────────────────── */
@media (max-width: 900px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .hero, .grid, .grid.two, .steps, .trust-bar, .feature-grid, .quick-actions, .step-flow, .contact-grid {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 34px; line-height: 1.1; overflow-wrap: anywhere; }
  .lead { font-size: 16px; }
  .section-head { display: grid; }
  .hero { gap: 24px; padding: var(--space-xl) 0; }
  .console-metrics { grid-template-columns: repeat(3, 1fr); }
  .trust-bar { gap: var(--space-md); }
  .faq-list { max-width: 100%; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 1120px); }
  .actions .btn { width: 100%; }
  .footer { display: grid; gap: var(--space-sm); }
  .trust-bar { flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── FAQ Accordion ────────────────────── */
.faq-list {
  display: grid;
  gap: var(--space-xs);
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  overflow: hidden;
  transition: box-shadow 200ms ease;
}
.faq-item:hover {
  box-shadow: var(--shadow-sm);
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease;
}
.faq-q:hover { color: var(--brand-600); }
.faq-q::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 240ms ease;
  line-height: 1;
}
.faq-item.open .faq-q::after {
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 300ms ease;
}
.faq-item.open .faq-a {
  max-height: 300px;
}
.faq-a-inner {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Progress Bar ─────────────────────── */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-600));
  transition: width 500ms ease;
}
.progress-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ── Green Checkmark List ─────────────── */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--success-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ── Feature Grid (homepage) ──────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
.feature-card {
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.feature-card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 18px;
  margin-bottom: 12px;
}
.feature-card h3 {
  margin-bottom: 6px;
  font-size: 17px;
}
.feature-card p {
  font-size: 14px;
  line-height: 1.55;
}

/* ── Quick Action Cards ───────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}
.quick-action {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-lg);
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  text-align: center;
  align-items: center;
  transition: border-color 200ms ease, background 200ms ease;
}
.quick-action:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
}
.quick-action .icon {
  font-size: 28px;
}
.quick-action span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.quick-action .hint {
  font-size: 12px;
  color: var(--muted);
}

/* ── Scan History List ────────────────── */
.history-list {
  display: grid;
  gap: 4px;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 160ms ease;
}
.history-item:hover { background: var(--bg-subtle); }
.history-item .url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.history-item .date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Empty State ──────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--muted);
}
.empty-state .icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.4;
}
.empty-state p {
  font-size: 14px;
}

/* ── Strong Card (promo / upgrade) ────── */
.card-promo {
  border: 2px solid var(--brand-500);
  background: linear-gradient(135deg, var(--brand-50), var(--paper));
  box-shadow: var(--shadow-lg);
}

/* ── CTA Banner ───────────────────────── */
.cta-banner {
  text-align: center;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #fff;
}
.cta-banner h2 {
  color: #fff;
  margin-bottom: 8px;
}
.cta-banner p {
  color: rgb(255 255 255 / 0.8);
  max-width: 500px;
  margin: 0 auto 20px;
}
.cta-banner .btn {
  background: #fff;
  color: var(--brand-700);
  box-shadow: var(--shadow-md);
}
.cta-banner .btn:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

/* ── Enhanced Table ───────────────────── */
.compare-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
}
.compare-table table { width: 100%; border-collapse: collapse; }
.compare-table th,
.compare-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-align: left;
}
.compare-table th {
  background: var(--bg-subtle);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table td:first-child {
  font-weight: 500;
  color: var(--ink-soft);
}
.compare-table td:not(:first-child) {
  text-align: center;
}
.compare-table .check-cell {
  color: var(--success);
  font-size: 16px;
}
.compare-table .cross-cell {
  color: var(--muted);
  font-size: 16px;
}

/* ── Skip link (a11y) ─────────────────── */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-600);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
}
.skip-link:focus {
  top: 0;
}

/* ── Scan Recovery (U-3) ──────────────── */
.scan-recovery {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--background);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.recovery-reasons-head {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-soft);
}
.recovery-reasons {
  list-style: disc;
  padding-left: 20px;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}
.recovery-reasons li { margin-bottom: 4px; }
.recovery-btn { align-self: flex-start; }

/* ── Quota Banner (付费微调) ──────────────── */
.quota-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  background: var(--background);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--ink-soft);
}
.quota-banner-warn {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.25);
  color: var(--ink);
}
.quota-banner-warn strong { color: var(--warning, #d97706); }

/* ── Enhanced A11y Focus (A11y-2) ──────── */
.modal-close:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 50%;
}
.faq-q:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.plan-card a.btn:focus-visible,
.pricing-grid a:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Multi-Column Footer ──────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--line);
  margin-top: var(--space-2xl);
}
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-col a {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
  transition: color 160ms ease;
}
.footer-col a:hover { color: var(--ink-soft); }
.footer-brand p {
  font-size: 13px;
  margin-top: 8px;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: var(--space-md) 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Blog Card List ───────────────────── */
.blog-list {
  display: grid;
  gap: var(--space-md);
  max-width: 720px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.blog-card .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
}
.blog-card .tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 650;
  font-size: 11px;
}
.blog-card .date, .blog-card .read {
  color: var(--muted);
}
.blog-card h3 {
  font-size: 19px;
  margin-bottom: 6px;
}
.blog-card p {
  flex: 1;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.blog-card .read-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-600);
}

/* ── Blog Post Content ────────────────── */
.post-body {
  line-height: 1.75;
  color: var(--ink);
}
.post-body h2 {
  font-size: 22px;
  margin-top: var(--space-xl);
}
.post-body h3 {
  font-size: 18px;
  margin-top: var(--space-lg);
}
.post-body p {
  margin-top: 12px;
  color: var(--ink-soft);
}
.post-body ul, .post-body ol {
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.post-body ul li, .post-body ol li {
  margin-bottom: 6px;
}
.post-body code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--brand-700);
  border: 1px solid var(--line);
}

/* Callouts in blog posts */
.callout {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
  font-size: 14px;
  line-height: 1.6;
  border-left: 3px solid;
}
.callout-tip {
  background: var(--brand-50);
  border-color: var(--brand-500);
  color: var(--ink-soft);
}
.callout-warn {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: #92400e;
}
.callout strong {
  color: var(--ink);
}

/* ── Support Search ───────────────────── */
.search-box {
  display: flex;
  gap: 8px;
  max-width: 520px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.search-box input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
  outline: 0;
}

/* ── Contact Cards ────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
.contact-card {
  text-align: center;
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.contact-card .icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.contact-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.contact-card p {
  font-size: 13px;
  margin-bottom: 10px;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ── Step Flow (for landing pages) ────── */
.step-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
.step-flow-item {
  display: flex;
  gap: 14px;
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}
.step-flow-item .num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 16px;
  font-weight: 750;
  flex-shrink: 0;
}
.step-flow-item h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink-soft);
}
.step-flow-item p {
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .step-flow { grid-template-columns: 1fr; }
}

/* ── Landing Demo Card ────────────────── */
.demo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.demo-card .demo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.demo-card .demo-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}
.demo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: 13px;
}
.demo-row .label { color: var(--muted); }
.demo-row .value { color: var(--ink-soft); font-weight: 500; }

/* ── Scroll Fade Animation ────────────── */
/* Default: visible (safe fallback for no-JS, search crawlers, and before IO fires) */
.fade-up {
  opacity: 1;
  transform: none;
}
/* Only animate when user has NOT requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms ease;
  }
  .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Delay helpers for staggered animations */
  .fade-up.delay-1 { transition-delay: 100ms; }
  .fade-up.delay-2 { transition-delay: 200ms; }
  .fade-up.delay-3 { transition-delay: 300ms; }
  .fade-up.delay-4 { transition-delay: 400ms; }
  .fade-up.delay-5 { transition-delay: 500ms; }
  .fade-up.delay-6 { transition-delay: 600ms; }
}

/* ── Shopify / Platform Badge ─────────── */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.platform-badge svg {
  width: 16px;
  height: 16px;
}

/* ── No Install Badge ─────────────────── */
.info-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  color: #059669;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: var(--space-md);
}
