
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --secondary: #0ea5e9;
  --accent: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(226, 232, 240, 0.8);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

.mobile-menu-toggle {
  display: none;
}

/* Nav */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.btn-nav {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-nav:hover {
  background: var(--primary-hover);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Hero */
.hero-section {
  text-align: center;
  padding: 3rem 1rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-strapline {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-thesis-short {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.75rem;
  background: rgba(255, 255, 255, 0.7);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.thesis-callout {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.5rem;
}

/* Glass Card */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.glass-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Sections */
.section-header {
  margin-bottom: 1.75rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 800px;
}

/* Thesis Medium Grid */
.thesis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.thesis-text p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.7;
}

.network-diagram-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.network-diagram-title {
  font-size: 1rem;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.network-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #38bdf8;
}

.network-icon {
  font-size: 1.4rem;
}

.network-text strong {
  display: block;
  font-size: 0.95rem;
  color: #f1f5f9;
}

.network-text span {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* 8 Dimensions Grid */
.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.dim-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

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

.dim-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  width: fit-content;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.dim-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.dim-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

/* Tool Sections Container (Crawler & Ingestion) */
.tools-tabs-container {
  margin-top: 2rem;
}

.tab-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(226, 232, 240, 0.8);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  position: relative;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Crawler Form */
.crawler-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.url-input {
  flex-grow: 1;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.url-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.35);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chip-btn {
  background: white;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  color: var(--dark);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.chip-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Ingestion Form (Intentional.bot style) */
.ingest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.file-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.dropzone-text strong {
  display: block;
  font-size: 1rem;
  color: var(--dark);
}

.dropzone-text span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: white;
  outline: none;
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Scan / Loading Progress */
.progress-card {
  display: none;
  background: white;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(79, 70, 229, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.75rem;
}

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

.progress-steps {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.step-item.active {
  color: var(--primary);
  font-weight: 600;
}

.step-item.completed {
  color: var(--accent);
}

/* Report View */
.report-view {
  display: none;
  margin-top: 2rem;
}

.report-header-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.report-entity-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.report-industry-badge {
  display: inline-block;
  font-size: 0.85rem;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
}

.report-metrics {
  display: flex;
  gap: 1.5rem;
}

.metric-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  text-align: center;
}

.metric-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: #38bdf8;
}

.metric-lbl {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Crucial Highlight: Key Elements of Trust */
.key-success-box {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.key-success-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.key-success-subtitle {
  font-size: 0.95rem;
  color: #15803d;
  margin-bottom: 1.5rem;
}

.success-elements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.element-card {
  background: white;
  border: 1px solid #dcfce7;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.element-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.element-name {
  font-weight: 700;
  color: #14532d;
  font-size: 1.05rem;
}

.element-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.element-why {
  font-size: 0.875rem;
  color: #1e293b;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.element-forum-quote {
  font-size: 0.8rem;
  font-style: italic;
  color: #475569;
  border-left: 2px solid #86efac;
  padding-left: 0.5rem;
}

/* Comparison Matrix (Marketing vs Reality) */
.gap-analysis-card {
  background: #fffbeb;
  border: 2px solid #fde68a;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.gap-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 1rem;
}

.gap-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.gap-col {
  background: white;
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid #fef3c7;
}

.gap-col-header {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.gap-col-marketing .gap-col-header {
  color: #b45309;
}

.gap-col-forum .gap-col-header {
  color: #0369a1;
}

.gap-col p {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

.gap-insight-box {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #78350f;
}

/* Radar & Dimensions Layout */
.report-details-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.radar-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.radar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

.dimension-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dimension-report-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.dim-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.dim-report-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.dim-scores {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.score-tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.dim-report-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.dim-must-trust {
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.dim-question {
  background: #fdf2f8;
  padding: 0.75rem;
  border-radius: 8px;
  border-left: 3px solid #ec4899;
  color: #831843;
  font-style: italic;
}

/* Post Analysis - Humans in Loop */
.human-loop-section {
  background: linear-gradient(135deg, #fdf4ff, #fae8ff);
  border: 2px solid #f5d0fe;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.human-loop-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #86198f;
  margin-bottom: 0.5rem;
}

.human-loop-quote {
  font-size: 1rem;
  font-style: italic;
  color: #701a75;
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid #d946ef;
}

.topics-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.topic-item {
  background: white;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.topic-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: #a21caf;
  text-transform: uppercase;
}

.topic-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
}

/* Mandatory Disclaimer */
.disclaimer-banner {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 2rem;
}

.disclaimer-banner strong {
  color: var(--dark);
}

/* Footer */
.footer {
  border-top: 1px solid var(--card-border);
  background: white;
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-disclaimer {
  max-width: 700px;
  margin: 0.75rem auto;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* ==========================================================================
   Responsive Mobile & Tablet Design
   ========================================================================== */

/* Tablet & Mobile Screens (<= 850px) */
@media (max-width: 850px) {
  .thesis-grid, .gap-columns, .ingest-grid, .report-details-grid {
    grid-template-columns: 1fr;
  }
  
  .navbar {
    padding: 0.85rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .brand-tag {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s;
  }

  .mobile-menu-toggle:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.5rem;
    gap: 0.85rem;
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 14px 28px -5px rgba(0, 0, 0, 0.12);
  }

  .nav-links.mobile-open {
    display: flex;
    animation: menuSlideDown 0.2s ease-out;
  }

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

  .nav-link {
    padding: 0.6rem 0.25rem;
    font-size: 1rem;
    border-bottom: 1px solid #f1f5f9;
  }

  #auth-nav-container {
    margin-left: 0 !important;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: flex-start;
  }

  #btn-login-nav {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    justify-content: center;
  }

  .radar-card {
    padding: 1rem;
    overflow: hidden;
  }

  .radar-svg {
    max-width: 100%;
    height: auto;
  }
}

/* Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .container {
    padding: 1.25rem 0.85rem;
  }

  .hero-section {
    padding: 1.75rem 0.25rem 2rem;
  }

  .hero-strapline {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
  }

  .hero-title {
    font-size: clamp(1.65rem, 6vw, 2.1rem);
    line-height: 1.25;
    margin-bottom: 1rem;
  }

  .hero-thesis-short {
    font-size: 0.98rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 0 8px 8px 0;
  }

  .thesis-callout {
    font-size: 0.9rem;
  }

  .glass-card {
    padding: 1.25rem 0.9rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-subtitle {
    font-size: 0.92rem;
  }

  /* Crawler Form full width & touch-friendly */
  .crawler-form {
    flex-direction: column;
    gap: 0.65rem;
  }

  .url-input {
    width: 100%;
    font-size: 16px; /* Essential: Prevents iOS auto-zoom */
    padding: 0.8rem 1rem;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  /* Tool Tabs scrollable */
  .tab-nav {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .tab-btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
  }

  .preset-chips {
    gap: 0.4rem;
    margin-bottom: 1rem;
  }

  .chip-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    min-height: 36px;
  }

  /* Report View on Mobile */
  .report-header-banner {
    padding: 1.25rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .report-entity-title {
    font-size: 1.45rem;
  }

  .report-metrics {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .metric-box {
    padding: 0.6rem 0.5rem;
  }

  .metric-val {
    font-size: 1.45rem;
  }

  .metric-lbl {
    font-size: 0.68rem;
  }

  /* Key Success Box & Gap Analysis */
  .key-success-box, .gap-analysis-card, .human-loop-section, .pdf-capture-card, .consulting-contact-area, .data-volume-section {
    padding: 1.25rem 0.9rem;
    border-radius: 12px;
  }

  .key-success-title, .gap-title, .human-loop-title, .pdf-capture-title, .contact-header-title {
    font-size: 1.15rem;
  }

  .success-elements-grid {
    grid-template-columns: 1fr;
  }

  .gap-columns {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gap-col {
    padding: 1rem;
  }

  /* Data Volume Stats */
  .data-volume-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .volume-stat-card {
    padding: 10px 6px;
  }

  .volume-stat-num {
    font-size: 1.25rem;
  }

  .volume-stat-label {
    font-size: 0.68rem;
  }

  .dimensions-grid {
    grid-template-columns: 1fr;
  }

  .levels-container {
    grid-template-columns: 1fr;
  }

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

  /* Executive Scorecard & Modal */
  .scorecard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .btn-expand-modal {
    width: 100%;
    justify-content: center;
  }

  .modal-card {
    padding: 1.25rem 1rem;
    width: 95%;
    max-width: 95%;
  }

  .modal-card-large {
    width: 96%;
    max-height: 92vh;
  }

  .modal-body-scrollable {
    padding: 1rem 0.75rem;
  }

  .dim-modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .dim-modal-meta {
    width: 100%;
  }

  .pdf-capture-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pdf-icon-badge {
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
  }

  .btn-submit-contact {
    width: 100%;
    justify-content: center;
  }

  .btn-social {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Data Volume & Scanned Trust Sources Metrics Section
   ========================================================================== */
.data-volume-section {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.data-volume-header {
  margin-bottom: 18px;
}

.data-volume-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-volume-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.data-volume-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.volume-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.volume-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.volume-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scanned-sources-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

.source-pill-count {
  background: #3b82f6;
  color: white;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Progress Bar & Animated Stepper
   ========================================================================== */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  margin: 16px 0 6px 0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #06b6d4);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-percent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-align: right;
  margin-bottom: 12px;
}

.footer-copyright {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 6px;
}

/* Disclaimer Strip */
.disclaimer-strip {
  background: #f1f5f9;
  border-bottom: 1px solid var(--card-border);
  padding: 0.65rem 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.disclaimer-strip strong {
  color: var(--dark);
}

/* Radar SVG Chart Styling */
.radar-svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  overflow: visible;
  margin: 0 auto;
  display: block;
}

.radar-grid {
  fill: #f8fafc;
  stroke: #e2e8f0;
  stroke-width: 1.5;
}

.radar-axis {
  stroke: #cbd5e1;
  stroke-width: 1;
  stroke-dasharray: 2 2;
}

.radar-polygon {
  fill: rgba(79, 70, 229, 0.22);
  stroke: #4f46e5;
  stroke-width: 2.5;
}

.radar-point {
  fill: #4f46e5;
  stroke: white;
  stroke-width: 2;
}

.radar-label {
  font-size: 11px;
  font-weight: 600;
  fill: #475569;
  font-family: var(--font-sans);
}

/* ==========================================================================
   Phase 2 Styles: Auth, Gated Ingestion, PDF Consent, Levels 2 & 3, Alt Uses
   ========================================================================== */

/* Social Auth & Nav Profile */
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

.btn-logout-small {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout-small:hover {
  background: #f1f5f9;
  color: #ef4444;
  border-color: #ef4444;
}

/* Modal Backdrop & Card */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--dark);
}

/* Social Buttons */
.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
}

.btn-social:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.btn-google:hover {
  box-shadow: 0 4px 6px -1px rgba(66, 133, 244, 0.15);
}

.btn-linkedin:hover {
  box-shadow: 0 4px 6px -1px rgba(10, 102, 194, 0.15);
}

/* Auth Gate Card */
.auth-gate-card {
  text-align: center;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  margin: 1rem 0;
}

.auth-gate-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.auth-gate-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.auth-gate-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 1.25rem auto;
  line-height: 1.55;
}

/* PDF Generator Card & Consent Opt-ins */
.pdf-capture-card {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.pdf-capture-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.25rem;
}

.pdf-icon-badge {
  font-size: 2.2rem;
  background: #e0e7ff;
  border-radius: 10px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-capture-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.pdf-capture-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.consent-group {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.consent-label-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin-bottom: 0.65rem;
}

.consent-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.consent-option:last-child {
  margin-bottom: 0;
}

.consent-option input[type="radio"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.consent-text {
  font-size: 0.92rem;
  color: #1e293b;
  font-weight: 500;
}

/* Going Deeper: Levels 2 & 3 */
.levels-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.level-box {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.level-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 0.85rem;
}

.level-box p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Consulting Contact Area */
.consulting-contact-area {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.75rem;
}

.contact-header-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* Alt Uses & Highlights */
.alt-uses-content {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
}

.thesis-highlight-paragraph {
  font-size: 1.08rem;
  font-weight: 600;
  color: #1e293b;
  background: #eef2ff;
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin-top: 1rem;
}

/* ==========================================================================
   Executive Dimension Scorecard & Modal Matrix (User Tweak #3)
   ========================================================================== */
.dimension-scorecard-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.scorecard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

.btn-expand-modal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-expand-modal:hover {
  background: var(--primary);
  color: white;
}

.scorecard-table-wrapper {
  overflow-x: auto;
  flex: 1;
}

.scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.scorecard-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 2px solid #e2e8f0;
}

.scorecard-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: var(--text-main);
}

.scorecard-table tr:hover td {
  background: #f8fafc;
}

.score-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-progress-bar {
  width: 48px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.score-progress-fill {
  height: 100%;
  border-radius: 3px;
}

/* Modal Large for 9 Dimensions */
.modal-card-large {
  max-width: 960px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}

.modal-card-large .modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
  background: white;
}

.modal-body-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #f8fafc;
}

.dimensions-modal-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dim-modal-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dim-modal-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.dim-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.dim-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.dim-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-score {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-weight {
  background: #f1f5f9;
  color: #475569;
}

.badge-critical {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-core {
  background: #dcfce7;
  color: #166534;
}

.badge-low {
  background: #f3f4f6;
  color: #4b5563;
}

.dim-modal-section {
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-main);
}

.dim-modal-obs {
  background: #f8fafc;
  border-left: 3px solid #3b82f6;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin: 6px 0;
}

.dim-modal-reasoning {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin: 6px 0;
}

.dim-modal-q {
  background: #eef2ff;
  border: 1px dashed #6366f1;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 8px;
  font-style: italic;
  color: #3730a3;
  font-size: 0.88rem;
}

/* Consulting Textarea (User Tweak #7) */
.consulting-textarea {
  min-height: 110px;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
}
