/* ==========================================
   REBUILDLY AI - PROFESSIONAL SAAS STYLESHEET
   Clean, Minimalist Zinc Design System
   ========================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-sans); /* Fallback for existing classes */
  --font-mono: 'JetBrains Mono', monospace;

  /* Page background vs Card background — now DIFFERENT shades */
  --bg-app: #f8f9fa;       /* page background */
  --bg-surface: #ffffff;   /* card/box background — lighter than page */
  --bg-muted: #eef0f2;     /* subtle inner elements (badges, headers) */
  --bg-input: #ffffff;
  --bg-glow: rgba(0, 0, 0, 0.04);

  --border-default: #d9dade;
  --border-hover: #c7c9ce;
  --border-focus: #4b5563;

  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;

  --primary: #374151;
  --primary-hover: #4b5563;
  --primary-text: #ffffff;

  --green: #0d9488;
  --orange: #d97706;
  --red: #dc2626;

  --green-bg: #f0fdfa;
  --orange-bg: #fffbeb;
  --red-bg: #fef2f2;

  --green-border: #ccfbf1;
  --orange-border: #fef3c7;
  --red-border: #fee2e2;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-app: #09090b;
  --bg-surface: #18181b;
  --bg-muted: #27272a;
  --bg-input: #27272a;
  --bg-glow: rgba(255, 255, 255, 0.015);
  
  --border-default: #27272a;
  --border-hover: #3f3f46;
  --border-focus: #f4f4f5;
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --primary: #fafafa;
  --primary-hover: #f4f4f5;
  --primary-text: #09090b;
  
  --green: #34d399;
  --orange: #fbbf24;
  --red: #f87171;

  --green-bg: rgba(52, 211, 153, 0.06);
  --orange-bg: rgba(251, 191, 36, 0.06);
  --red-bg: rgba(248, 113, 113, 0.06);

  --green-border: rgba(52, 211, 153, 0.2);
  --orange-border: rgba(251, 191, 36, 0.2);
  --red-border: rgba(248, 113, 113, 0.2);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.25);
}

/* ==========================================
   RESET & SYSTEM BASE
   ========================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  transition: background-color var(--transition), color var(--transition);
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -0.03em;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.8;
}

/* ==========================================
   ATOMIC COMPONENT STANDARDS
   ========================================== */

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff !important;
  border: 1px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.25);
  border-bottom-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.15rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1.5px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  color: #ffffff !important;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ghost:hover {
  background-color: var(--bg-surface);
  border-color: var(--border-default);
  color: var(--text-primary);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-ghost:hover {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ==========================================
   NAVBAR HEADER
   ========================================== */

.header {
  background-color: rgba(231, 231, 231, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
  position: sticky;
  top: 0;
  z-index: 100;
}

[data-theme="dark"] .header {
  background-color: rgba(24, 24, 27, 0.5);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-icon {
  flex-shrink: 0;
  color: var(--text-primary);
  transition: transform var(--transition);
}

.logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: transparent;
  color: var(--text-primary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border-default);
  transition: var(--transition);
}

.header-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.dot-live {
  width: 6px;
  height: 6px;
  background-color: var(--green);
  border-radius: var(--radius-full);
}

/* Theme Pill Switch Slider */
.theme-pill-toggle {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1.5px solid #eab308; /* Yellow border in light mode */
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: border-color 0.3s ease;
  padding: 0;
  outline: none;
}

[data-theme="dark"] .theme-pill-toggle {
  border-color: var(--text-muted); /* Gray border in dark mode */
}

.theme-pill-thumb {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 2px;
  color: #eab308; /* Yellow sun */
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

[data-theme="dark"] .theme-pill-thumb {
  transform: translateX(20px);
  color: var(--text-muted); /* Gray moon */
}

/* Morphing Icon Transitions */
.theme-pill-thumb svg {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sun-icon { opacity: 1; transform: rotate(0) scale(1); }
.moon-icon { opacity: 0; transform: rotate(90deg) scale(0.5); }

[data-theme="dark"] .sun-icon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .moon-icon { opacity: 1; transform: rotate(0) scale(1); }
/* ==========================================
   MAIN WRAPPER & SWITCHER
   ========================================== */

.main {
  flex-grow: 1;
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.footer {
  text-align: center;
  padding: 1.75rem 1.25rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

/* ==========================================
   DASHBOARD INPUT HOMEPAGE
   ========================================== */

.input-page {
  max-width: 620px;
  margin: 4.5rem auto;
  text-align: center;
}

.input-hero {
  margin-bottom: 2rem;
}

.chip {
  display: inline-block;
  background-color: var(--bg-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.input-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
  line-height: 1.15;
}

.input-hero p {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 450;
}

.input-box {
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  text-align: left;
}

[data-theme="dark"] .input-box {
  background-color: rgba(24, 24, 27, 0.65);
}

.input-box label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.input-row {
  display: flex;
  gap: 0.5rem;
}

.input-wrapper {
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.input-wrapper input[type="url"] {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 0.9rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.input-wrapper input[type="url"]:focus {
  border-color: var(--border-focus);
}

.clear-input-btn {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.clear-input-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.input-wrapper.has-text .clear-input-btn {
  opacity: 1;
  pointer-events: auto;
}

.input-note {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ==========================================
   LOADING VIEW
   ========================================== */

.loader-box {
  text-align: center;
  max-width: 400px;
  margin: 8rem auto;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-muted);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  margin: 0 auto 1.5rem auto;
  animation: spin 0.8s linear infinite;
}

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

#loader-title {
  font-size: 1.25rem;
  font-weight: 750;
  margin-bottom: 0.5rem;
}

#loader-message {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ==========================================
   RESULTS OVERVIEW VIEW
   ========================================== */

.results-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.report-domain-url {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Generic Card Component */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

/* Consolidated Hero Block */
.report-hero-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 2rem;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.hero-score-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-right: 2rem;
  border-right: 1px solid var(--border-default);
  min-height: 140px;
}

.score-ring-wrap {
  position: relative;
  width: 100px;
  height: 100px;
}

.score-ring-svg {
  width: 100px;
  height: 100px;
  transform: rotate(-90deg);
}

.ring-bg {
  stroke: var(--bg-muted);
  fill: none;
  stroke-width: 8;
}

.ring-fg {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 0.8s ease-in-out, stroke var(--transition);
}

.score-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-center-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.score-num {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.score-max {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 1px;
}

.score-caption {
  margin-top: 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* Info Details section */
.hero-details-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-top-row {
  display: flex;
  align-items: center;
}

.hero-meta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.badge-archetype {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

[data-theme="dark"] .badge-archetype {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
}

.badge-tech {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meta-dot {
  color: var(--border-default);
  user-select: none;
}

.meta-item span {
  font-weight: 700;
  color: var(--text-primary);
}

/* Description Bubble styling */
.hero-description-bubble {
  display: flex;
  gap: 0.75rem;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-default);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  align-items: flex-start;
}

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

.hero-desc {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-primary);
  font-weight: 500;
}

/* Grid Details for score cards */
.hero-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.confidence-label, .stats-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}

.confidence-track-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.confidence-track {
  flex-grow: 1;
  height: 6px;
  background-color: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.8s ease-in-out;
}

.confidence-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 28px;
  text-align: right;
}

.confidence-note {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Switch Panel Tabs */
.tab-bar {
  display: flex;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 0.1rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

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

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
}

.tab-pane {
  display: none;
}

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

/* ==========================================
   TAB 1: SCORES GRID
   ========================================== */

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

.category-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem !important;
  min-height: 190px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.category-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1.5px);
}

.category-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.category-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.category-card-score {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.metric-bar-track {
  height: 2px !important;
  background-color: var(--border-default) !important;
  border-radius: var(--radius-full) !important;
  overflow: hidden;
  margin: 8px 0 12px 0 !important;
}

.metric-bar-fill {
  height: 100%;
  border-radius: var(--radius-full) !important;
}

.category-card-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  font-weight: 400;
}

.category-card-status {
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: transparent !important;
  border: 1px solid var(--border-default) !important;
  color: var(--text-primary) !important;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.category-card-status.status-clean svg {
  color: var(--green);
}

.category-card-status.status-flagged svg {
  color: var(--red);
}

/* ==========================================
   TAB 2: SUGGESTIONS GRID Layout
   ========================================== */

.report-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.75rem;
}

.report-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#diagnostics-by-category {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cat-block {
  border: 1px solid var(--border-default);
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.cat-header {
  padding: 1rem 1.25rem;
  background-color: var(--bg-muted);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-title-text {
  font-size: 0.95rem;
  font-weight: 700;
}

.cat-issue-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background-color: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cat-issue-count::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.cat-issue-count.count-clean::before {
  background-color: var(--green);
}

.cat-issue-count.count-flagged::before {
  background-color: var(--red);
}

/* Diagnostics Clean State */
.cat-clean-card {
  display: flex;
  padding: 1.5rem;
  gap: 0.75rem;
  align-items: flex-start;
}

.clean-icon-box {
  color: var(--green);
  flex-shrink: 0;
  margin-top: 1px;
}

.clean-text-box h6 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.clean-text-box p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Diagnostics Issue State */
.issue-card {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-default);
}

.issue-card:last-child {
  border-bottom: none;
}

.issue-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.issue-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.issue-status-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.dot-high { background-color: var(--red); }
.dot-medium { background-color: var(--orange); }
.dot-low { background-color: var(--green); }

.issue-title {
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
}

.pills {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background-color: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

.pill-effort-low::before, .pill-impact-low::before { background-color: var(--green); }
.pill-effort-medium::before, .pill-impact-medium::before { background-color: var(--orange); }
.pill-effort-high::before, .pill-impact-high::before { background-color: var(--red); }

/* Details row styling */
.issue-grid-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.issue-row-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: flex-start;
}

.issue-item-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1.4;
}

.issue-item-value {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.code-wrap code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-default);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  word-break: break-all;
  color: var(--text-primary);
  display: inline-block;
  max-width: 100%;
}

/* Highlighted suggestion box */
.highlight-suggestion {
  background-color: var(--green-bg);
  border: 1px solid var(--green-border);
  border-left: 3px solid var(--green);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 0.35rem;
}

.highlight-suggestion .issue-item-label {
  color: var(--green);
}

.highlight-suggestion .suggestion-text {
  color: var(--text-primary);
  font-weight: 600;
}

/* Priority Card Side Column */
.priority-card {
  position: sticky;
  top: 80px;
}

.card-title {
  font-size: 1rem;
  font-weight: 750;
  margin-bottom: 0.5rem;
}

.priority-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.priority-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.priority-list li {
  position: relative;
  padding-left: 1.5rem;
}

.priority-list li::before {
  content: counter(item);
  counter-increment: item;
  position: absolute;
  left: 0;
  top: 1px;
  width: 16px;
  height: 16px;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.priority-list {
  counter-reset: item;
}

.priority-list li strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.priority-list li span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.25;
}

/* ==========================================
   MEDIA INQUIRIES Standard SaaS
   ========================================== */

@media (max-width: 960px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
  .priority-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .input-hero h1 {
    font-size: 2rem;
  }
  .input-row {
    flex-direction: column;
  }
  .report-hero-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
  }
  .hero-score-section {
    border-right: none;
    border-bottom: 1px solid var(--border-default);
    padding-right: 0;
    padding-bottom: 1.25rem;
    min-height: auto;
  }
  .hero-bottom-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .issue-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .pills {
    align-self: flex-start;
  }
  .issue-row-item, .highlight-suggestion {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* ==========================================
   PREMIUM LANDING PAGE UPGRADES (stripe/linear style)
   ========================================== */

/* Premium Toast Notification */
.toast-pop {
  position: fixed;
  top: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px) scale(0.95);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-pop.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

.toast-icon {
  font-size: 1.1rem;
}

/* Fading Grid Background Canvas */
.main-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-image: 
    radial-gradient(rgba(0, 0, 0, 0.08) 1.2px, transparent 1.2px),
    radial-gradient(circle at 50% 30%, var(--bg-glow) 0%, transparent 80%);
  background-size: 24px 24px, 100% 100%;
  background-position: center top;
  opacity: 1;
}

[data-theme="dark"] .main-grid-bg {
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px),
    radial-gradient(circle at 50% 30%, var(--bg-glow) 0%, transparent 80%);
}

/* Premium Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(128, 128, 128, 0.04);
  border: 1px solid var(--border-default);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--green);
  border-radius: var(--radius-full);
}

.badge-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Hero Typography Text Gradient */
.hero-title {
  font-family: var(--font-display);
  font-size: 2.85rem;
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Floating Input Search Container */
.input-page {
  position: relative;
  z-index: 1;
}

/* Glassmorphic Category Icons */
.glass-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  flex-shrink: 0;
}

[data-theme="light"] .glass-icon,
:root .glass-icon {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.03);
}
