/* ==========================================================================
   AI SEARCH OS DESIGN SYSTEM (aisearchos.com)
   Generative Engine Optimization (GEO) & AI Shortlist Auditor Stylesheet
   Sharp Scandinavian-Industrial Aesthetic • DM Sans Typography
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..800;1,9..40,300..800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Core AISearchOS Palette */
  --ink: #0f2a2e;
  --ink-2: #3f5558;
  --muted: #627173;
  --subtle: #7f938a;
  --bg: #ecf6f6;
  --surface: #ffffff;
  --surface-alt: #f6faf9;
  --surface-tint: #edf4f4;
  --line: #dde8e8;
  --line-2: #d6e2e2;
  --line-3: #cdd9da;
  
  /* Brand Accent Tokens */
  --accent: #e4572e;
  --accent-text: #ab4122;
  --accent-tint: #fae1d9;
  --accent-faint: #fdf5f2;
  --accent-hover: #cf4821;
  --accent-dark: #8c3116;

  /* Contrast / Dark Theme Highlights */
  --dark-1: #152427;
  --dark-2: #223b3f;
  --dark-3: #2d4c51;
  --on-dark: #bcc3c4;
  --on-dark-light: #e5ecec;

  /* Semantic State Tokens */
  --success: #0d8a56;
  --success-bg: #eaf8f0;
  --success-border: #bce9d1;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --danger: #c53030;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --info: #0284c7;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;

  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

  /* Industrial Geometry Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 42, 46, 0.05), 0 1px 2px rgba(15, 42, 46, 0.03);
  --shadow-md: 0 4px 14px rgba(15, 42, 46, 0.06), 0 1px 3px rgba(15, 42, 46, 0.03);
  --shadow-lg: 0 12px 30px rgba(15, 42, 46, 0.08), 0 4px 10px rgba(15, 42, 46, 0.04);
  --shadow-xl: 0 20px 48px -12px rgba(15, 42, 46, 0.12);
  --shadow-accent: 0 8px 24px -4px rgba(228, 87, 46, 0.28);
  --focus-ring: 0 0 0 3px rgba(228, 87, 46, 0.22);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 240ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font-size: 15px;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Layout Containers & Grid
   ========================================================================== */

.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section-spacing {
  padding: 48px 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(236, 246, 246, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: all var(--transition-fast);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.5px;
  position: relative;
  box-shadow: 0 2px 6px rgba(15, 42, 46, 0.15);
}

.brand-logo-mark::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.brand-title span {
  color: var(--accent);
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-link.active {
  color: var(--ink);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-2);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(13, 138, 86, 0.2);
  animation: pulse-dot 2.4s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 138, 86, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(13, 138, 86, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 138, 86, 0); }
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(228, 87, 46, 0.25);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(228, 87, 46, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--ink);
  border-color: var(--line-3);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--surface-alt);
  border-color: var(--subtle);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-dark {
  background-color: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.btn-dark:hover {
  background-color: var(--dark-2);
  border-color: var(--dark-2);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink-2);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: rgba(15, 42, 46, 0.05);
  color: var(--ink);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-full);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-full);
}

.btn-icon-only {
  padding: 8px;
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
}

/* ==========================================================================
   Pill Badges & Tags
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-neutral {
  background: var(--surface-tint);
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}

.badge-accent {
  background: var(--accent-tint);
  color: var(--accent-text);
  border: 1px solid rgba(228, 87, 46, 0.25);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.badge-dark {
  background: var(--ink);
  color: #fff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.hero-eyebrow .spark-icon {
  color: var(--accent);
}

.hero-title {
  font-size: clamp(34px, 4.8vw, 54px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
  max-width: 900px;
  margin: 0 auto 20px;
}

.hero-title .highlight {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-description {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 720px;
  margin: 0 auto 36px;
}

/* Hero Interactive Form Card */
.audit-input-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: var(--shadow-xl);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.audit-input-card:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-xl), var(--focus-ring);
}

.audit-form-grid {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr auto;
  gap: 12px;
  align-items: center;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 16px;
  color: var(--subtle);
  pointer-events: none;
}

.audit-input {
  width: 100%;
  padding: 15px 16px 15px 46px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: all var(--transition-fast);
}

.audit-input:focus {
  background: #ffffff;
  border-color: var(--subtle);
}

.audit-input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.category-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.category-select {
  width: 100%;
  padding: 15px 40px 15px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all var(--transition-fast);
}

.category-select:focus {
  background: #ffffff;
  border-color: var(--subtle);
}

.select-chevron {
  position: absolute;
  right: 16px;
  pointer-events: none;
  color: var(--muted);
}

.audit-btn-submit {
  height: 52px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* Preset Pill Buttons */
.preset-pills-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preset-pill-btn {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preset-pill-btn:hover {
  background: var(--surface-tint);
  border-color: var(--ink-2);
  color: var(--ink);
  transform: translateY(-1px);
}

/* ==========================================================================
   Audit Progress Bar & Scanning State Indicator
   ========================================================================== */

.scan-progress-container {
  max-width: 860px;
  margin: 32px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.scan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.scan-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.scan-percentage {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--line-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff7a55);
  border-radius: var(--radius-full);
  transition: width 0.4s ease-out;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.scan-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.scan-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.scan-step-item.active {
  background: var(--accent-faint);
  border-color: var(--accent-tint);
  color: var(--accent-text);
}

.scan-step-item.completed {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.step-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   Results Dashboard & Overview Section
   ========================================================================== */

.results-dashboard {
  margin-top: 48px;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.report-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.report-meta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.audited-domain-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-timestamp {
  font-size: 13px;
  color: var(--muted);
}

.report-meta-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Score Summary Card & Primary Metric Cards
   ========================================================================== */

.score-overview-grid {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 24px;
  margin-bottom: 32px;
}

.score-card-primary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.score-card-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--dark-2));
}

.score-badge-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Circular SVG Gauge */
.gauge-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  margin-bottom: 20px;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg-ring {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 12;
}

.gauge-progress-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-in-out;
}

.gauge-center-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-number {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}

.gauge-scale-max {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.score-status-tier {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.score-status-sub {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
  max-width: 240px;
}

/* Metric Cards Trio */
.metrics-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-3);
  box-shadow: var(--shadow-md);
}

.metric-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.metric-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.3;
}

.metric-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  flex-shrink: 0;
}

.metric-card-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 8px;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}

.metric-benchmark-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.3;
}

/* ==========================================================================
   Top 3 Gaps Ranked by Deal Value
   ========================================================================== */

.gaps-section {
  margin-bottom: 36px;
}

.section-headline-group {
  margin-bottom: 20px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-headline {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.gaps-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gap-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gap-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Highlighted #1 Gap with Orange Accent */
.gap-card.gap-rank-1 {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-faint) 0%, var(--surface) 28%);
  box-shadow: 0 8px 24px -4px rgba(228, 87, 46, 0.15), var(--shadow-sm);
}

.gap-card.gap-rank-1::after {
  content: 'HIGH REVENUE LEAK';
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

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

.gap-rank-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--ink);
  color: #fff;
}

.gap-card.gap-rank-1 .gap-rank-pill {
  background: var(--accent);
}

.deal-value-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--line-2);
}

.gap-card.gap-rank-1 .deal-value-pill {
  background: var(--accent-tint);
  color: var(--accent-text);
  border-color: rgba(228, 87, 46, 0.3);
}

.gap-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.3;
}

.gap-description {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 18px;
  flex-grow: 1;
}

.gap-fix-recommendation {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.4;
}

.gap-fix-recommendation strong {
  color: var(--accent-text);
  display: block;
  margin-bottom: 3px;
}

/* ==========================================================================
   4 Deep-Dive Tabbed Panels Architecture
   ========================================================================== */

.deep-dive-section {
  margin-bottom: 48px;
}

.tabs-navigation-wrapper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-navigation-wrapper::-webkit-scrollbar {
  display: none;
}

.tab-trigger {
  flex: 1;
  min-width: 180px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-trigger:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.tab-trigger.active {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 42, 46, 0.2);
}

.tab-trigger .tab-count {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(15, 42, 46, 0.08);
  color: var(--ink);
}

.tab-trigger.active .tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.tab-panel-container {
  display: none;
}

.tab-panel-container.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

/* Generic Panel Frame */
.panel-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title-group h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.panel-title-group p {
  font-size: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Tab 1: AI Crawler Permissions (Robots.txt Table)
   -------------------------------------------------------------------------- */

.crawler-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.crawler-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.crawler-table th {
  background: var(--surface-alt);
  color: var(--ink-2);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.crawler-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  vertical-align: middle;
}

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

.crawler-table tr:hover td {
  background-color: var(--surface-alt);
}

.bot-id-code {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.platform-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.bot-impact-text {
  font-size: 12px;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Tab 2: Semantic & Schema Entity Inspector
   -------------------------------------------------------------------------- */

.entity-inspector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.entity-card {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.entity-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schema-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schema-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.checklist-icon {
  margin-top: 2px;
  flex-shrink: 0;
}

.schema-item-content {
  flex-grow: 1;
}

.schema-item-name {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.schema-item-desc {
  font-size: 12px;
  color: var(--muted);
}

.sameas-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sameas-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Tab 3: Live Buyer Question & Shortlist Simulator
   -------------------------------------------------------------------------- */

.simulator-header-box {
  background: var(--dark-2);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
  margin-bottom: 24px;
}

.simulator-query-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-dark);
  margin-bottom: 8px;
}

.simulator-query-text {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.engine-switcher-bar {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.engine-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-dark-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.engine-btn.active, .engine-btn:hover {
  background: #ffffff;
  color: var(--ink);
  border-color: #ffffff;
}

/* AI Answer Terminal Preview */
.ai-answer-terminal {
  background: #0f1c1e;
  border: 1px solid #223b3f;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}

.terminal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #091315;
  border-bottom: 1px solid #1a2e32;
}

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

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #7f938a;
}

.terminal-body {
  padding: 24px;
  color: #d1dcdd;
  font-size: 14px;
  line-height: 1.65;
}

.terminal-body p {
  margin-bottom: 16px;
}

.ai-recommendation-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.ai-recommendation-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.entity-marker-named {
  background: rgba(13, 138, 86, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.entity-marker-target-omitted {
  background: rgba(228, 87, 46, 0.2);
  color: #ff8c69;
  border: 1px solid rgba(228, 87, 46, 0.5);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.sources-citations-row {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.citation-chip {
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: #a0b2b4;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Decision Matrix Table */
.decision-matrix-card {
  margin-top: 24px;
}

.decision-matrix-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Tab 4: Actionable Fix Kit (llms.txt, Schema, Robots, Comparison)
   -------------------------------------------------------------------------- */

.fixkit-subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.fixkit-subnav-btn {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.fixkit-subnav-btn.active, .fixkit-subnav-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.code-block-wrapper {
  background: #111e21;
  border: 1px solid #233b3f;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #091315;
  border-bottom: 1px solid #1a2e32;
}

.code-filename {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9cb2b4;
  font-weight: 500;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
}

.code-pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #d1dcdd;
}

/* ==========================================================================
   Lead Conversion CTA Banner
   ========================================================================== */

.conversion-cta-banner {
  background: linear-gradient(135deg, var(--ink) 0%, var(--dark-2) 100%);
  border-radius: var(--radius-xl);
  padding: 48px;
  color: #ffffff;
  margin: 48px 0;
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.conversion-cta-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 87, 46, 0.25) 0%, rgba(228, 87, 46, 0) 70%);
  pointer-events: none;
}

.cta-content-left h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.cta-content-left p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-dark);
  max-width: 580px;
}

.cta-perks-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cta-perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--on-dark-light);
  font-weight: 500;
}

.cta-check-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.cta-actions-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.cta-note {
  font-size: 12px;
  color: var(--subtle);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  background-color: var(--surface);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-credits {
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.footer-link {
  font-size: 13px;
  color: var(--ink-2);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--ink);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
  .score-overview-grid {
    grid-template-columns: 1fr;
  }
  
  .gaps-cards-grid {
    grid-template-columns: 1fr;
  }

  .entity-inspector-grid {
    grid-template-columns: 1fr;
  }

  .conversion-cta-banner {
    grid-template-columns: 1fr;
    padding: 36px;
  }

  .cta-actions-right {
    width: 100%;
  }

  .cta-actions-right .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .site-header .header-inner {
    height: 64px;
  }

  .nav-links {
    display: none;
  }

  .hero-section {
    padding: 36px 0 24px;
  }

  .audit-form-grid {
    grid-template-columns: 1fr;
  }

  .metrics-trio-grid {
    grid-template-columns: 1fr;
  }

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

  .tabs-navigation-wrapper {
    flex-wrap: nowrap;
  }

  .tab-trigger {
    min-width: 150px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .panel-frame {
    padding: 20px;
  }

  .panel-header {
    flex-direction: column;
    gap: 12px;
  }
}

/* ==========================================================================
   Print Styles for Executive PDF & Instant Audit Export
   ========================================================================== */

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .site-header,
  .audit-input-card,
  .preset-pills-row,
  .scan-progress-container,
  .tabs-navigation-wrapper,
  .header-actions,
  .report-meta-actions,
  .fixkit-subnav,
  .copy-btn,
  .engine-switcher-bar,
  .conversion-cta-banner,
  .site-footer {
    display: none !important;
  }

  .app-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .results-dashboard {
    margin-top: 0 !important;
  }

  .report-meta-bar {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
  }

  .score-card-primary,
  .metric-card,
  .gap-card,
  .panel-frame {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
    margin-bottom: 16px !important;
  }

  /* Unroll all 4 deep-dive tab panels so entire audit report prints */
  .tab-panel-container {
    display: block !important;
    page-break-before: always;
    margin-top: 24px !important;
  }

  .panel-frame {
    padding: 16px !important;
  }

  .ai-answer-terminal,
  .code-block-wrapper {
    background: #f8f9fa !important;
    color: #212529 !important;
    border: 1px solid #ccc !important;
  }

  .terminal-top-bar,
  .code-block-header {
    background: #e9ecef !important;
    border-bottom: 1px solid #ccc !important;
  }

  .terminal-body,
  .code-pre {
    color: #212529 !important;
  }

  .gap-card.gap-rank-1 {
    border: 2px solid #e4572e !important;
    background: #fff !important;
  }
}
