/**
 * AccessiScan Frontend Styles
 * Premium Design System
 */

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  --font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --primary-50: #f0f4ff;
  --primary-100: #d6e0ff;
  --primary-200: #adc1ff;
  --primary-300: #85a2ff;
  --primary-500: #2f54eb;
  --primary-600: #2445c7;
  --primary-700: #1b379f;
  --primary-900: #0c1a52;

  --neutral-0: #ffffff;
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-150: #e8eef6;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  --success: #16a34a;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --error: #dc2626;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --info: #0284c7;
  --info-bg: #e0f2fe;
  --info-text: #075985;

  --bg: var(--neutral-50);
  --surface: var(--neutral-0);
  --surface-subtle: var(--neutral-100);
  --border: var(--neutral-200);
  --text: var(--neutral-900);
  --muted: var(--neutral-600);
  --focus: rgba(47, 84, 235, 0.32);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm:
    0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 28px 60px rgba(15, 23, 42, 0.18);
  --shadow-blue: 0 18px 40px rgba(47, 84, 235, 0.18);
}

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

/* =========================================================
   FORM STYLES
   ========================================================= */
.accessiscan-form-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.accessiscan-form {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  width: 100%;
  gap: 10px;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px;
}

.accessiscan-input {
  flex: 1;
  min-width: 200px;
  height: 48px;
  padding: 0 16px;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 15px;
  font-family: var(--font-primary);
  color: white;
}

.accessiscan-input::placeholder {
  color: rgba(100, 116, 139, 0.7);
}

.accessiscan-input:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 0;
  border-radius: var(--radius-md);
}

.accessiscan-remaining {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.accessiscan-remaining-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14.5px;
  font-family: var(--font-primary);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn-primary,
.accessiscan-btn {
  background: var(--primary-500);
  color: white;
  box-shadow: 0 10px 20px rgba(47, 84, 235, 0.22);
  border: none;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
}

.btn-primary:hover,
.accessiscan-btn:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(47, 84, 235, 0.3);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
  color: var(--primary-700);
}

.btn-lg {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 15px;
}

.btn-sm {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--radius-md);
}

.btn-premium {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  border: 1px solid #1e293b;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.btn-premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.28);
  background: linear-gradient(135deg, #1e293b, #334155);
}

.btn-premium .sparkle {
  color: #fcd34d;
}

/* Form Button Icon */
.accessiscan-btn svg,
.accessiscan-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* =========================================================
   USAGE PILL
   ========================================================= */
.accessiscan-usage-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--neutral-700);
  white-space: nowrap;
  vertical-align: middle;
}

.accessiscan-usage-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.accessiscan-usage-icon svg {
  width: 100%;
  height: 100%;
}

.accessiscan-usage-spinner {
  animation: accessiscanUsageSpin 1.4s linear infinite;
}

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

.accessiscan-usage-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.accessiscan-usage-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neutral-300);
  transition: background 0.2s ease;
}

/* Normal state — plenty of scans left */
.accessiscan-usage-normal {
  color: #1e3a8a;
  background: #eff6ff;
  border-color: #dbeafe;
}
.accessiscan-usage-normal .accessiscan-usage-icon {
  color: #2563eb;
}
.accessiscan-usage-normal .dot.is-filled {
  background: #2563eb;
}

/* Warning state — last scan remaining */
.accessiscan-usage-warning {
  color: #b45309;
  background: #fffbeb;
  border-color: #fef3c7;
}
.accessiscan-usage-warning .accessiscan-usage-icon {
  color: #d97706;
}
.accessiscan-usage-warning .dot.is-filled {
  background: #d97706;
}

/* Reached state — limit hit */
.accessiscan-usage-reached {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
.accessiscan-usage-reached .accessiscan-usage-icon {
  color: #dc2626;
}
.accessiscan-usage-reached .dot {
  background: #fecaca;
}

/* =========================================================
   LIMIT REACHED — INLINE BANNER
   ========================================================= */
.accessiscan-limit-wrapper {
  width: 100%;
  font-family: var(--font-primary);
}

.accessiscan-limit-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 22px;
  background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.accessiscan-limit-banner-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e0e7ff;
  border-radius: 12px;
  color: #4338ca;
}

.accessiscan-limit-banner-icon svg {
  width: 20px;
  height: 20px;
}

.accessiscan-limit-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.accessiscan-limit-banner-text strong {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}

.accessiscan-limit-banner-text span {
  font-size: 14px;
  color: #64748b;
  line-height: 1.55;
}

.accessiscan-limit-banner-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #3b4cf0 0%, #2f54eb 100%);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-primary);
  box-shadow: 0 8px 16px rgba(47, 84, 235, 0.25);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.accessiscan-limit-banner-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(47, 84, 235, 0.32);
  color: #fff;
}

.accessiscan-limit-banner-cta svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 640px) {
  .accessiscan-limit-banner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
  }
  .accessiscan-limit-banner-cta {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   UPGRADE MODAL
   ========================================================= */
.accessiscan-upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--font-primary);
}

.accessiscan-upgrade-modal[hidden] {
  display: none;
}

.accessiscan-upgrade-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: accessiscanFadeIn 0.2s ease-out;
}

.accessiscan-upgrade-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  background: #fff;
  border-radius: 24px;
  overflow: hidden auto;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45);
  animation: accessiscanModalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes accessiscanFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes accessiscanModalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.accessiscan-upgrade-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  z-index: 2;
  transition: background 0.18s ease;
}

.accessiscan-upgrade-modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.accessiscan-upgrade-modal-close svg {
  width: 16px;
  height: 16px;
}

.accessiscan-upgrade-modal-head {
  position: relative;
  padding: 32px 32px 28px;
  background: linear-gradient(140deg, #1a1f4f 0%, #2d2566 50%, #3b1f6e 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.accessiscan-upgrade-modal-head::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.4) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.accessiscan-upgrade-head-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.accessiscan-upgrade-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.32);
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
}

.accessiscan-upgrade-badge svg {
  width: 12px;
  height: 12px;
}

.accessiscan-upgrade-spark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
}

.accessiscan-upgrade-spark svg {
  width: 22px;
  height: 22px;
}

.accessiscan-upgrade-title {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.accessiscan-upgrade-desc {
  position: relative;
  margin: 0 auto;
  max-width: 320px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.accessiscan-upgrade-modal-body {
  padding: 24px 32px 28px;
}

.accessiscan-upgrade-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
  border-radius: 14px;
}

.accessiscan-upgrade-price-main {
  display: inline-flex;
  align-items: baseline;
  color: #0f172a;
  line-height: 1;
}

.accessiscan-upgrade-price-main .dollar {
  font-size: 22px;
  font-weight: 700;
  margin-right: 2px;
}

.accessiscan-upgrade-price-main .amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.accessiscan-upgrade-price-main .period {
  margin-left: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.accessiscan-upgrade-price-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.accessiscan-upgrade-price-meta .strike {
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: line-through;
}

.accessiscan-upgrade-price-meta .save {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.accessiscan-upgrade-features {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accessiscan-upgrade-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}

.accessiscan-upgrade-features li svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: #2563eb;
}

.accessiscan-upgrade-features li strong {
  font-weight: 700;
  color: #0f172a;
}

.accessiscan-upgrade-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0;
  margin-bottom: 20px;
  font-size: 13px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.accessiscan-upgrade-social .stars {
  display: inline-flex;
  gap: 1px;
  color: #fbbf24;
}

.accessiscan-upgrade-social .stars svg {
  width: 14px;
  height: 14px;
}

.accessiscan-upgrade-social .rating {
  font-weight: 700;
  color: #0f172a;
}

.accessiscan-upgrade-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #3b4cf0 0%, #2f54eb 100%);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(47, 84, 235, 0.3);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.accessiscan-upgrade-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(47, 84, 235, 0.4);
  color: #fff;
}

.accessiscan-upgrade-cta svg {
  width: 16px;
  height: 16px;
}

.accessiscan-upgrade-sales {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

.accessiscan-upgrade-sales a {
  color: #2f54eb;
  font-weight: 600;
  text-decoration: underline;
}

.accessiscan-upgrade-guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  font-size: 12.5px;
  color: #64748b;
}

.accessiscan-upgrade-guarantee svg {
  width: 16px;
  height: 16px;
  color: #16a34a;
}

body.accessiscan-modal-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .accessiscan-upgrade-modal-head {
    padding: 28px 22px 24px;
  }
  .accessiscan-upgrade-modal-body {
    padding: 22px 22px 24px;
  }
  .accessiscan-upgrade-title {
    font-size: 19px;
  }
  .accessiscan-upgrade-price-main .amount {
    font-size: 36px;
  }
}

/* =========================================================
   RESULTS WRAPPER
   ========================================================= */
.accessiscan-results {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.accessiscan-container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

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

/* =========================================================
   HERO SECTION
   ========================================================= */
.accessiscan-hero {
  position: relative;
  padding: clamp(32px, 5vw, 64px) 0 clamp(28px, 3.5vw, 40px);
}

.accessiscan-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      820px 440px at 92% -12%,
      rgba(47, 84, 235, 0.14),
      transparent 60%
    ),
    radial-gradient(
      640px 420px at -10% 110%,
      rgba(133, 162, 255, 0.16),
      transparent 65%
    );
}

.accessiscan-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(
    circle,
    rgba(47, 84, 235, 0.1) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  mask-image: radial-gradient(
    ellipse 70% 65% at 50% 35%,
    black,
    transparent 80%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 70% 65% at 50% 35%,
    black,
    transparent 80%
  );
  opacity: 0.55;
}

.scan-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, white, var(--primary-50));
  color: var(--primary-700);
  font-size: 11.5px;
  font-weight: 800;
  border: 1px solid var(--primary-100);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.scan-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-500);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 84, 235, 0.5);
  }
  80% {
    box-shadow: 0 0 0 8px rgba(47, 84, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 84, 235, 0);
  }
}

.hero-title {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 14px;
  max-width: 780px;
}

.hero-title .accent {
  background: linear-gradient(
    120deg,
    var(--primary-500) 0%,
    var(--primary-700) 60%,
    var(--primary-900) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--neutral-600);
  max-width: 660px;
  margin: 0 0 32px;
  line-height: 1.6;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: stretch;
}

/* =========================================================
   SITE CARD (Browser Frame)
   ========================================================= */
.hero-card {
  background: linear-gradient(180deg, white 0%, #fcfdff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.04),
    0 24px 60px -24px rgba(47, 84, 235, 0.14);
  position: relative;
  overflow: hidden;
}

.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.55);
  backdrop-filter: blur(8px);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.browser-dots span:nth-child(1) {
  background: #fca5a5;
}
.browser-dots span:nth-child(2) {
  background: #fcd34d;
}
.browser-dots span:nth-child(3) {
  background: #86efac;
}

.browser-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--neutral-700);
  min-width: 0;
}

.browser-url .lock {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--success);
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
}

.browser-url .url-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-url .url-text strong {
  font-weight: 700;
  color: var(--text);
}

.browser-url .ext-link {
  color: var(--muted);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 6px;
  text-decoration: none;
}

.browser-url .ext-link:hover {
  background: var(--neutral-100);
  color: var(--primary-700);
}

.browser-url .ext-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.browser-fresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--success-text);
  background: var(--success-bg);
  border: 1px solid #86efac;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.browser-fresh .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: greenpulse 2.4s ease-out infinite;
}

@keyframes greenpulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
  }
  80% {
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

.hero-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.site-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-mark {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  color: var(--primary-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  border: 1px solid var(--primary-200);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 6px 14px rgba(47, 84, 235, 0.1);
}

.site-name .small {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.site-name .big {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

/* Meta List */
.meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.meta-cell {
  background: #fcfdff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-cell .ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-50);
  color: var(--primary-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--primary-100);
}

.meta-cell .ic svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.meta-cell .lbl {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.meta-cell .val {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

/* =========================================================
   SCORE PANEL
   ========================================================= */
.score-panel {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.65),
      rgba(248, 250, 252, 0.5)
    ),
    linear-gradient(135deg, #eef2ff, #f5f7ff);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-2xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.04),
    0 24px 60px -24px rgba(47, 84, 235, 0.22);
  position: relative;
  overflow: hidden;
}

.score-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(
      420px 240px at 100% 0%,
      rgba(47, 84, 235, 0.1),
      transparent 60%
    ),
    radial-gradient(
      300px 200px at -10% 100%,
      rgba(133, 162, 255, 0.14),
      transparent 65%
    );
  pointer-events: none;
}

.score-panel > * {
  position: relative;
  z-index: 1;
}

.score-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.score-panel-head h3 {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--neutral-700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.score-panel-head h3 svg {
  width: 14px;
  height: 14px;
  color: var(--primary-600);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.score-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.score-rating.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid #fcd34d;
}

.score-rating.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #86efac;
}

.score-rating.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid #fca5a5;
}

.score-rating svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
}

/* Score Display / Gauge */
.score-display {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 6px 0 4px;
}

.gauge {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 300/180;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.06));
}

.gauge-track {
  stroke: #e5eaf3;
  stroke-width: 14;
  fill: none;
  stroke-linecap: round;
}

.gauge-fill {
  stroke: url(#gauge-grad);
  stroke-width: 14;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  animation: gaugeFill 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s forwards;
}

.gauge-marker {
  fill: white;
  stroke: var(--warning);
  stroke-width: 4;
  filter: drop-shadow(0 4px 10px rgba(217, 119, 6, 0.45));
  opacity: 0;
  animation: markerIn 1s cubic-bezier(0.2, 0.7, 0.2, 1) 1.2s forwards;
}

@keyframes gaugeFill {
  to {
    stroke-dashoffset: var(--gauge-offset, 69.12);
  }
}

@keyframes markerIn {
  to {
    opacity: 1;
  }
}

.score-readout {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  pointer-events: none;
  width: max-content;
  max-width: 64%;
}

.score-readout .num {
  font-size: clamp(40px, 5.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.score-readout .num small {
  font-size: 0.3em;
  color: var(--muted);
  font-weight: 600;
}

.score-readout .label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.score-narrative {
  font-size: 14.5px;
  color: var(--neutral-700);
  line-height: 1.55;
  text-align: center;
  padding: 0 8px;
  margin: 4px 0 0;
}

.score-narrative strong {
  color: var(--text);
  font-weight: 700;
}

/* Score Level Chips */
.score-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-top: 2px;
}

.lvl-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: white;
  border: 1px solid var(--border);
  color: var(--neutral-700);
  white-space: nowrap;
  min-height: 32px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.lvl-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lvl-chip.crit .dot {
  background: var(--error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.lvl-chip.risk .dot {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}
.lvl-chip.work .dot {
  background: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.12);
}
.lvl-chip.strong .dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.lvl-chip.is-active {
  background: linear-gradient(180deg, #fffbeb, #fef3c7);
  color: var(--text);
  border-color: var(--warning);
  box-shadow:
    0 6px 16px rgba(217, 119, 6, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding-right: 6px;
}

.lvl-chip.is-active .badge {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 800;
  color: white;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--warning);
  letter-spacing: 0.06em;
  margin-left: 2px;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
}

/* =========================================================
   METRIC CARDS
   ========================================================= */
.accessiscan-section {
  padding: clamp(28px, 4vw, 40px) 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-card {
  --card-accent: var(--primary-500);
  --card-accent-tint: rgba(47, 84, 235, 0.05);
  --card-accent-border: var(--primary-200);
  --card-icon-from: var(--primary-100);
  --card-icon-to: var(--primary-200);
  --card-icon-color: var(--primary-700);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  box-shadow:
    var(--shadow-xs),
    0 4px 12px rgba(15, 23, 42, 0.025);
  transition:
    transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.3s ease,
    border-color 0.25s ease;
  overflow: hidden;
  font-family: inherit;
  color: inherit;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      420px 220px at 100% 0%,
      var(--card-accent-tint),
      transparent 60%
    ),
    radial-gradient(
      260px 180px at 0% 100%,
      var(--card-accent-tint),
      transparent 65%
    );
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  border-radius: 0 0 6px 6px;
  background: var(--card-accent);
  opacity: 0.9;
  transition:
    height 0.25s ease,
    opacity 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.04);
  border-color: var(--card-accent-border);
}

.metric-card:hover::after {
  height: 5px;
  left: 14px;
  right: 14px;
}

.metric-card.crit {
  --card-accent: var(--error);
  --card-accent-tint: rgba(220, 38, 38, 0.055);
  --card-accent-border: #fca5a5;
  --card-icon-from: #fee2e2;
  --card-icon-to: #fecaca;
  --card-icon-color: var(--error);
}

.metric-card.pass {
  --card-accent: var(--success);
  --card-accent-tint: rgba(22, 163, 74, 0.055);
  --card-accent-border: #86efac;
  --card-icon-from: #dcfce7;
  --card-icon-to: #bbf7d0;
  --card-icon-color: var(--success);
}

.metric-card.man {
  --card-accent: var(--info);
  --card-accent-tint: rgba(2, 132, 199, 0.055);
  --card-accent-border: #7dd3fc;
  --card-icon-from: #e0f2fe;
  --card-icon-to: #bae6fd;
  --card-icon-color: var(--info);
}

.metric-card.na {
  --card-accent: var(--neutral-400);
  --card-accent-tint: rgba(148, 163, 184, 0.06);
  --card-accent-border: var(--neutral-300);
  --card-icon-from: var(--neutral-100);
  --card-icon-to: var(--neutral-200);
  --card-icon-color: var(--neutral-600);
}

.metric-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.metric-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(
    160deg,
    var(--card-icon-from),
    var(--card-icon-to)
  );
  color: var(--card-icon-color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 2px rgba(15, 23, 42, 0.06);
}

.metric-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--neutral-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metric-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-accent);
}

.metric-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-number {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.metric-number .total {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.metric-label {
  font-size: 14.5px;
  color: var(--neutral-700);
  font-weight: 600;
}

.metric-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-bar {
  position: relative;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--neutral-100);
  overflow: hidden;
}

.metric-bar > span {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: var(--radius-full);
  background: var(--card-accent);
  opacity: 0.92;
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.metric-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.metric-bar-meta strong {
  color: var(--neutral-800);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.metric-foot .lbl {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--neutral-800);
}

.metric-foot .arrow {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  color: var(--neutral-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.metric-foot .arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
}

.metric-card:hover .metric-foot .arrow {
  background: var(--card-accent);
  color: white;
  transform: translateX(4px);
}

/* =========================================================
   TAB NAVIGATION
   ========================================================= */
.tabnav-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0 8px;
  background: linear-gradient(180deg, var(--bg) 85%, rgba(248, 250, 252, 0));
}

.tabnav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px;
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabnav::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1;
  min-width: 140px;
  min-height: 44px;
  padding: 9px 18px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-primary);
  color: var(--neutral-700);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
  white-space: nowrap;
}

.tab svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  color: var(--neutral-700);
  font-size: 12px;
  font-weight: 700;
}

.tab:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.tab[aria-selected="true"],
.tab.is-active {
  background: var(--primary-500);
  color: white;
  box-shadow: 0 6px 14px rgba(47, 84, 235, 0.3);
}

.tab[aria-selected="true"] .count,
.tab.is-active .count {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* Section Head */
.section-head {
  max-width: 760px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 6px;
}

.section-head p {
  color: var(--neutral-600);
  font-size: 15px;
  max-width: 640px;
  margin: 0;
  line-height: 1.5;
}

/* =========================================================
   PANEL & ACCORDION
   ========================================================= */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  margin-bottom: 20px;
}

.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-head h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.panel-head .helper {
  color: var(--neutral-500);
  font-size: 13.5px;
}

.accordion {
  list-style: none !important;
  padding: 0;
  margin: 0;
}

.acc-item {
  border-bottom: 1px solid var(--border);
}

.acc-item:last-child {
  border-bottom: 0;
}

.acc-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  transition: background 0.18s;
  font-family: inherit;
}

.acc-trigger:hover {
  background: var(--neutral-50);
}

.acc-trigger[aria-expanded="true"] {
  background: var(--primary-50);
}

.acc-num {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: var(--surface-subtle);
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.acc-trigger[aria-expanded="true"] .acc-num {
  background: var(--primary-500);
  color: white;
}

.acc-title {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.acc-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.acc-chev {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-subtle);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition:
    transform 0.25s ease,
    background 0.18s;
}

.acc-chev svg {
  width: 16px;
  height: 16px;
  stroke: var(--neutral-700);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.acc-trigger[aria-expanded="true"] .acc-chev {
  background: var(--primary-100);
  transform: rotate(180deg);
}

/* Severity Pills */
.sev-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.sev-pill svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
}

.sev-pill.critical {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #fca5a5;
}

.sev-pill.serious,
.sev-pill.high {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: #fcd34d;
}

.sev-pill.moderate,
.sev-pill.medium {
  background: var(--info-bg);
  color: var(--info-text);
  border-color: #bae6fd;
}

.sev-pill.minor,
.sev-pill.low {
  background: var(--neutral-100);
  color: var(--neutral-700);
  border-color: var(--neutral-300);
}

.level-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--neutral-700);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--border);
}

/* Accordion Content */
.acc-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.acc-trigger[aria-expanded="true"] + .acc-content {
  max-height: 2000px;
}

.acc-inner {
  padding: 0 22px 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.acc-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acc-body h4 {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}

.acc-body p {
  font-size: 14.5px;
  color: var(--neutral-800);
  line-height: 1.65;
  margin: 0;
}

.acc-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
  align-items: flex-start;
}

.acc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 280px;
  align-content: flex-start;
}

.acc-stat {
  flex: 1 1 calc(50% - 5px);
  min-width: 100px;
  padding: 14px 16px;
  background: var(--neutral-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.acc-stat .lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.acc-stat .val {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Element Code Block */
.element-code {
  background: var(--neutral-900);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 10px 0;
}

.element-code code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Elements Pill (count badge) */
.elements-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.elements-pill.critical {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.elements-pill.serious {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.elements-pill.moderate {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.elements-pill.minor {
  background: var(--neutral-100);
  color: var(--neutral-700);
  border: 1px solid var(--border);
}

/* Failing Elements List */
.failing-elements {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fe-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.fe-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--neutral-100);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--neutral-600);
}

.fe-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fe-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.fe-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fe-selector {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary-700);
  background: var(--primary-50);
  padding: 2px 8px;
  border-radius: 4px;
  word-break: break-all;
}

.fe-html {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  padding: 8px 12px;
  border-radius: 6px;
  width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* =========================================================
   FLOATING CTA BUTTON
   ========================================================= */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: white;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(47, 84, 235, 0.35);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  text-decoration: none;
}

.floating-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(47, 84, 235, 0.45);
  color: white;
}

.floating-cta svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.floating-cta .sparkle {
  width: 18px;
  height: 18px;
  fill: #fcd34d;
  stroke: none;
}

/* =========================================================
   PREMIUM LOCKED PANEL
   ========================================================= */
.locked {
  position: relative;
  background: linear-gradient(180deg, var(--neutral-900), #0b1336);
  border: 1px solid #1e293b;
  border-radius: var(--radius-xl);
  padding: 22px;
  overflow: hidden;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 280px;
  align-self: flex-start;
}

.locked::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      500px 200px at 100% 0%,
      rgba(47, 84, 235, 0.35),
      transparent 65%
    ),
    radial-gradient(
      380px 200px at 0% 100%,
      rgba(124, 58, 237, 0.2),
      transparent 60%
    );
  pointer-events: none;
}

.locked > * {
  position: relative;
  z-index: 1;
}

.locked-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.locked-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.locked-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fcd34d;
  fill: none;
  stroke-width: 2;
}

.locked-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.locked .copy {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  margin: 0;
}

.locked .copy strong {
  color: white;
}

.locked-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.locked-actions .btn-light {
  background: white;
  color: var(--primary-700);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  border: none;
}

.locked-actions .btn-light:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.locked-actions .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: white;
}

.locked-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* =========================================================
   NO ISSUES / SUCCESS STATE
   ========================================================= */
.accessiscan-success {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  border-radius: var(--radius-2xl);
  margin-bottom: 24px;
}

.accessiscan-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.25);
}

.accessiscan-success-icon svg {
  width: 36px;
  height: 36px;
  stroke: white;
  fill: none;
  stroke-width: 3;
}

.accessiscan-success h3 {
  font-size: 24px;
  font-weight: 800;
  color: #166534;
  margin: 0 0 8px;
}

.accessiscan-success p {
  font-size: 16px;
  color: #15803d;
  margin: 0;
  max-width: 480px;
  margin-inline: auto;
}

.accessiscan-success .passes-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 16px;
  background: white;
  border: 1px solid #86efac;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: #166534;
}

.no-passes {
  text-align: center;
  padding: 48px 32px;
  color: var(--neutral-600);
  font-size: 15px;
  background: var(--neutral-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

/* =========================================================
   PASSED AUDITS LIST
   ========================================================= */
.passed-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.passed-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}

.passed-row:last-child {
  border-bottom: 0;
}

.passed-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary-50);
  color: var(--primary-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--primary-100);
}

.passed-mark svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.passed-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}

.passed-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.pass-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  color: var(--neutral-700);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pass-tag.passed {
  background: #eef8f1;
  color: #15803d;
  border-color: #a7f3d0;
}

.pass-tag svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   MANUAL AUDITS
   ========================================================= */
.manual-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--info-bg);
  border: 1px solid #7dd3fc;
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
}

.manual-banner > svg {
  width: 24px;
  height: 24px;
  stroke: var(--info);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 2px;
}

.manual-banner strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--info-text);
  margin-bottom: 4px;
}

.manual-banner p {
  font-size: 14px;
  color: var(--info-text);
  line-height: 1.55;
  margin: 0;
  opacity: 0.85;
}

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

.manual-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}

.manual-row:last-child {
  border-bottom: 0;
}

.manual-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--warning-bg);
  color: var(--warning);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #fcd34d;
}

.manual-mark svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.manual-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manual-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.4;
}

.manual-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.manual-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-start;
  flex-shrink: 0;
}

.manual-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid #fcd34d;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.manual-tag svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   NOT APPLICABLE
   ========================================================= */
.na-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--neutral-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
}

.na-summary .info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.na-summary .info svg {
  width: 20px;
  height: 20px;
  stroke: var(--neutral-500);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.na-summary .info p {
  font-size: 14.5px;
  color: var(--neutral-700);
  margin: 0;
}

.na-summary .info strong {
  color: var(--text);
}

.na-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.na-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--neutral-700);
}

.na-row:last-child {
  border-bottom: 0;
}

.na-row .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neutral-400);
  flex-shrink: 0;
}

.na-row .level-tag {
  margin-left: auto;
}

/* =========================================================
   FOOTER ACTIONS
   ========================================================= */
.accessiscan-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 0;
  text-align: center;
}

.accessiscan-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.accessiscan-disclaimer {
  font-size: 13px;
  color: var(--neutral-500);
  max-width: 600px;
  line-height: 1.55;
}

.accessiscan-disclaimer p {
  margin: 0;
}

.accessiscan-footer > p {
  color: var(--neutral-600);
  font-size: 14px;
  margin: 0;
}

/* =========================================================
   ERROR STATE
   ========================================================= */
.accessiscan-error {
  max-width: 500px;
  margin: 32px auto;
  padding: 32px;
  text-align: center;
  background: var(--error-bg);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-xl);
}

.accessiscan-error-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--error);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.accessiscan-error-icon svg {
  width: 28px;
  height: 28px;
  stroke: white;
  fill: none;
  stroke-width: 2.5;
}

.accessiscan-error p {
  color: var(--error-text);
  font-size: 15px;
  margin: 0 0 20px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .acc-grid {
    flex-direction: column;
  }

  .acc-stats,
  .locked {
    flex: 1 1 100%;
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }

  .tabnav {
    padding: 4px;
  }

  .tab {
    min-width: 110px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .tab svg {
    display: none;
  }

  .acc-trigger {
    padding: 16px;
  }

  .acc-inner {
    padding: 0 16px 16px;
  }

  .acc-grid {
    flex-direction: column;
  }

  .acc-stat {
    flex: 1 1 100%;
  }

  .acc-meta .level-tag {
    display: none;
  }

  .panel-head {
    padding: 16px;
  }

  .accessiscan-form {
    flex-direction: column;
  }

  .accessiscan-input {
    min-width: 100%;
  }

  .accessiscan-btn,
  .btn {
    width: 100%;
  }

  .score-levels {
    gap: 6px;
  }

  .lvl-chip {
    padding: 5px 10px;
    font-size: 11px;
  }

  .passed-row,
  .manual-row {
    padding: 14px 16px;
  }

  .passed-meta .level-tag,
  .manual-meta .level-tag {
    display: none;
  }

  .na-row {
    padding: 10px 16px;
    font-size: 13px;
  }

  .na-row .level-tag {
    display: none;
  }

  .floating-cta {
    bottom: 16px;
    right: 16px;
    left: 16px;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
  }
}

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

/* =========================================================
   PRINT STYLES
   ========================================================= */
@media print {
  .hero-actions,
  .accessiscan-footer-actions,
  .locked,
  .tabnav-wrap,
  .floating-cta {
    display: none !important;
  }

  .accessiscan-results {
    background: white;
  }

  .panel,
  .metric-card,
  .acc-item {
    break-inside: avoid;
  }

  /* Show all tab panels */
  .tab-panel {
    display: block !important;
  }

  /* Expand all accordions */
  .acc-content {
    display: block !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .acc-trigger[aria-expanded="false"] + .acc-content {
    display: block !important;
  }

  .acc-chev {
    display: none;
  }

  /* Better print styling */
  .accessiscan-hero {
    background: white !important;
    padding: 20px 0 !important;
  }

  .hero-card,
  .score-panel,
  .metric-card,
  .panel {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  .gauge {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Section headers for print */
  .section-head {
    margin-top: 30px;
  }

  .section-head h2::before {
    content: "Section: ";
    font-weight: normal;
    color: #666;
  }
}
