/* ==========================================================================
   Thinkogic Light Theme Design System
   ========================================================================== */
:root {
  /* Color Palette - Brand Colors for Light Theme */
  --bg-base: #f4f6fc;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-elevated: #ffffff;
  --border-color: rgba(14, 27, 86, 0.08);
  --border-hover: rgba(11, 79, 217, 0.3);
  
  --primary: #0E1B56;          /* Thinkogic Brand Navy */
  --primary-glow: rgba(14, 27, 86, 0.06);
  --primary-hover: #172d85;
  --secondary: #0b4fd9;        /* Thinkogic Brand Blue */
  --secondary-glow: rgba(11, 79, 217, 0.1);
  --secondary-hover: #083cb5;
  
  /* Status Colors */
  --score-good: #059669;
  --score-good-glow: rgba(5, 150, 105, 0.1);
  --score-average: #d97706;
  --score-average-glow: rgba(217, 119, 6, 0.1);
  --score-poor: #dc2626;
  --score-poor-glow: rgba(220, 38, 38, 0.1);
  
  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* Layout & Fonts */
  --font-family-body: 'DM Sans', system-ui, sans-serif;
  --font-family-heading: 'Red Hat Display', system-ui, sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --box-shadow-main: 0 10px 30px -10px rgba(14, 27, 86, 0.08);
  --box-shadow-elevation: 0 20px 40px -15px rgba(14, 27, 86, 0.15);
  --max-width: 1280px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Soft light background brand meshes */
body::before {
  content: "";
  position: fixed;
  top: -10%;
  left: 5%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(14, 27, 86, 0.04) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: 10%;
  right: 5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(11, 79, 217, 0.04) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary);
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--primary);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(14, 27, 86, 0.12);
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 27, 86, 0.25);
}

/* Common Components: Buttons & Glass Cards */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow-main);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--box-shadow-elevation);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  font-family: var(--font-family-heading);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 79, 217, 0.3);
}

.secondary-btn {
  background: var(--bg-surface-elevated);
  color: var(--primary);
  border: 1px solid var(--border-color);
  font-family: var(--font-family-heading);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.secondary-btn:hover {
  background: rgba(14, 27, 86, 0.02);
  border-color: var(--primary);
}

/* ==========================================================================
   Header Navigation Layout
   ========================================================================== */
.app-header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 45px;
  width: auto;
  display: block;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--secondary-glow);
  color: var(--secondary);
  border: 1px solid rgba(11, 79, 217, 0.2);
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: var(--secondary);
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family-body);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px rgba(11, 79, 217, 0.25);
  text-decoration: none;
}

.nav-btn:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(11, 79, 217, 0.35);
}

.nav-btn.has-key {
  color: var(--score-good);
}

/* Dropdown Menu Container */
.dropdown-container {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-trigger .chevron-icon {
  transition: transform 0.3s ease;
}

.dropdown-container.open .dropdown-trigger .chevron-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow-elevation);
  padding: 12px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: dropdownSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top right;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.dropdown-item:hover {
  background: rgba(14, 27, 86, 0.03);
  color: var(--primary);
  transform: translateX(2px);
}

.dropdown-item.active {
  background: var(--secondary-glow);
  color: var(--secondary);
  border: 1px solid rgba(11, 79, 217, 0.1);
}

.dropdown-item.active .item-icon-wrapper {
  color: var(--secondary);
}

.item-icon-wrapper {
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.item-text-wrapper h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: inherit;
}

.item-text-wrapper p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ==========================================================================
   Config Drawer Details
   ========================================================================== */
.config-panel {
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 10px 20px -10px rgba(14, 27, 86, 0.05);
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
}

.config-panel.collapsed {
  max-height: 0;
  opacity: 0;
  border-bottom-width: 0;
}

.config-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
}

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

.config-header h3 {
  font-size: 1.15rem;
  color: var(--primary);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.close-btn:hover {
  background: rgba(14, 27, 86, 0.05);
  color: var(--text-primary);
}

.config-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.key-input-wrapper {
  position: relative;
  display: flex;
  margin-bottom: 16px;
}

.key-input-wrapper input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  border-radius: var(--border-radius-sm);
  background: #ffffff;
  border: 1px solid rgba(14, 27, 86, 0.15);
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.key-input-wrapper input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 8px rgba(11, 79, 217, 0.15);
}

.visibility-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.config-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.help-link {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Hero & URL Entry Layout
   ========================================================================== */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  flex: 1;
  width: 100%;
}

.hero-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 56px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--secondary-glow);
  color: var(--secondary);
  border: 1px solid rgba(11, 79, 217, 0.15);
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

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

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 36px;
}

/* Search card control board */
.search-card-wrapper {
  width: 100%;
  padding: 8px;
  border-radius: var(--border-radius-lg);
  background: #ffffff;
  box-shadow: 0 10px 40px -10px rgba(14, 27, 86, 0.06);
}

.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.url-input-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.url-input-container input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid rgba(14, 27, 86, 0.05);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  font-size: 1.05rem;
  padding: 16px 20px 16px 54px;
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
}

.url-input-container input:focus {
  outline: none;
  border-color: rgba(14, 27, 86, 0.2);
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(14, 27, 86, 0.03);
}

/* Strategy toggle tabs in Results Summary Bar */
.strategy-toggle-tabs {
  display: flex;
  background: #f1f5f9;
  border: 1px solid rgba(14, 27, 86, 0.05);
  padding: 4px;
  border-radius: var(--border-radius-md);
  gap: 4px;
}

.strategy-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  font-family: var(--font-family-heading);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.strategy-tab:hover {
  background: rgba(14, 27, 86, 0.04);
  color: var(--primary);
}

.strategy-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(14, 27, 86, 0.06);
}

.strategy-score-badge {
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(14, 27, 86, 0.05);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.strategy-tab.active[data-score-category="good"] .strategy-score-badge {
  background: var(--score-good-glow);
  color: var(--score-good);
}

.strategy-tab.active[data-score-category="average"] .strategy-score-badge {
  background: var(--score-average-glow);
  color: var(--score-average);
}

.strategy-tab.active[data-score-category="poor"] .strategy-score-badge {
  background: var(--score-poor-glow);
  color: var(--score-poor);
}

.analyze-submit-btn {
  background: var(--secondary);
  color: #ffffff;
  border: none;
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(11, 79, 217, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
}

.analyze-submit-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(14, 27, 86, 0.25);
}

.analyze-submit-btn:active {
  transform: translateY(1px);
}

.analyze-submit-btn:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.8;
  transform: none !important;
  box-shadow: none !important;
}

.url-input-container input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.8;
}

.validation-message {
  color: var(--score-poor);
  font-size: 0.85rem;
  padding: 8px 16px 4px 16px;
  text-align: left;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Progress Loader Section
   ========================================================================== */
.loader-view {
  max-width: 500px;
  margin: 0 auto;
}

.loader-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
}

.loading-spinner-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 24px;
}

.outer-ring {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(14, 27, 86, 0.05);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 1.8s linear infinite;
}

.inner-ring {
  position: absolute;
  inset: 12px;
  border: 4px solid rgba(14, 27, 86, 0.05);
  border-bottom-color: var(--primary);
  border-radius: 50%;
  animation: spin-reverse 1.2s linear infinite;
}

.percent-display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.loader-info h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
  font-weight: 700;
}

.loader-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 32px;
  min-height: 48px;
}

.loader-target-url {
  display: inline-block;
  font-size: 0.85rem;
  background-color: rgba(11, 79, 217, 0.08);
  color: #0b4fd9;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: monospace;
  margin-bottom: 12px;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress Stepper nodes */
.progress-stepper {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  position: relative;
}

.step-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid rgba(14, 27, 86, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition-smooth);
}

.step-node::after {
  content: attr(data-label);
  position: absolute;
  top: 40px;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.step-node.active {
  background: rgba(14, 27, 86, 0.05);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 10px rgba(14, 27, 86, 0.1);
}

.step-node.active::after {
  color: var(--primary);
  font-weight: 700;
}

.step-node.complete {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(14, 27, 86, 0.08);
  transition: var(--transition-smooth);
}

.step-line.active {
  background: var(--primary);
}

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

/* ==========================================================================
   Skeleton Loading Screen
   ========================================================================== */
.skeleton-pulse {
  background: linear-gradient(90deg, rgba(14, 27, 86, 0.02) 25%, rgba(14, 27, 86, 0.06) 50%, rgba(14, 27, 86, 0.02) 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-scores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.skeleton-circle-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: #ffffff;
}

.circle-skeleton {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.text-skeleton {
  height: 14px;
  border-radius: 4px;
  width: 80%;
}

.text-skeleton.short {
  width: 50%;
}

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

.skeleton-metrics-grid .skeleton-card {
  height: 120px;
  border-radius: var(--border-radius-md);
  background: #ffffff;
}

/* ==========================================================================
   Results Dashboard Details
   ========================================================================== */
.results-view {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Results header bar */
.results-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 65px;
  z-index: 90;
  box-shadow: 0 10px 30px -10px rgba(14, 27, 86, 0.08);
}

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

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-url-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.summary-url-badge a {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px dashed var(--text-muted);
}

.summary-url-badge a:hover {
  color: var(--secondary);
  border-color: var(--secondary);
}

.summary-meta {
  display: flex;
  gap: 16px;
  align-items: center;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.strategy-badge {
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-weight: 700;
  color: var(--primary);
}

/* Gauges Overview layout */
.scores-container-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.score-card-gauge {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: var(--box-shadow-main);
}

.score-card-gauge:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-elevation);
}

.score-card-gauge.active {
  background: #ffffff;
  border-color: var(--secondary);
  box-shadow: 0 10px 25px rgba(11, 79, 217, 0.12);
}

.svg-gauge-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 12px;
}

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

.score-circle-bg {
  fill: none;
  stroke: rgba(14, 27, 86, 0.04);
  stroke-width: 8px;
}

.score-circle-value {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 8px;
  stroke-linecap: round;
  stroke-dasharray: 314.16; /* 2 * PI * r where r=50 */
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
}

.score-number-display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-heading);
  font-size: 1.85rem;
  font-weight: 800;
}

/* Color definitions for score ranks */
.score-card-gauge[data-score-category="good"] .score-circle-value {
  stroke: var(--score-good);
}
.score-card-gauge[data-score-category="good"] .score-number-display {
  color: var(--score-good);
}

.score-card-gauge[data-score-category="average"] .score-circle-value {
  stroke: var(--score-average);
}
.score-card-gauge[data-score-category="average"] .score-number-display {
  color: var(--score-average);
}

.score-card-gauge[data-score-category="poor"] .score-circle-value {
  stroke: var(--score-poor);
}
.score-card-gauge[data-score-category="poor"] .score-number-display {
  color: var(--score-poor);
}

.gauge-label {
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

/* Score legends style */
.rating-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 48px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

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

.rating-poor .legend-dot { background-color: var(--score-poor); }
.rating-average .legend-dot { background-color: var(--score-average); }
.rating-good .legend-dot { background-color: var(--score-good); }

/* Main dashboard body */
.dashboard-body-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  margin-bottom: 48px;
}

.panel-section-title {
  margin-bottom: 20px;
}

.panel-section-title h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary);
}

.panel-section-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Core Vitals cards grid */
.metrics-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.metric-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  cursor: pointer;
  background: #ffffff;
}

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

.metric-title {
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px dashed rgba(14, 27, 86, 0.2);
}

.metric-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 12px 0 8px 0;
}

.metric-val {
  font-family: var(--font-family-heading);
  font-size: 1.85rem;
  font-weight: 800;
}

.cvw-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(14, 27, 86, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-gauge-bar {
  width: 100%;
  height: 4px;
  background: #f1f5f9;
  border-radius: 20px;
  overflow: hidden;
}

.gauge-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 20px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Metric status styling */
.metric-card[data-status="good"] .metric-indicator-dot,
.metric-card[data-status="good"] .gauge-bar-fill {
  background-color: var(--score-good);
}
.metric-card[data-status="good"] .metric-val {
  color: var(--score-good);
}

.metric-card[data-status="average"] .metric-indicator-dot,
.metric-card[data-status="average"] .gauge-bar-fill {
  background-color: var(--score-average);
}
.metric-card[data-status="average"] .metric-val {
  color: var(--score-average);
}

.metric-card[data-status="poor"] .metric-indicator-dot,
.metric-card[data-status="poor"] .gauge-bar-fill {
  background-color: var(--score-poor);
}
.metric-card[data-status="poor"] .metric-val {
  color: var(--score-poor);
}

/* ==========================================================================
   Simulated Device Frames
   ========================================================================== */
.device-mockup-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

/* Silver Laptop Bezel style */
.device-desktop {
  width: 100%;
  background: #cbd5e1;
  border: 10px solid #cbd5e1;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 15px 40px rgba(14, 27, 86, 0.1);
  position: relative;
}

.device-desktop .device-header-frame {
  height: 30px;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(14, 27, 86, 0.05);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
}

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

.header-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

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

.header-address-bar {
  flex: 1;
  background: #ffffff;
  border: 1px solid rgba(14, 27, 86, 0.08);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 2px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.device-screen {
  background: #ffffff;
  height: 250px;
  overflow-y: auto;
  position: relative;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.device-screen::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.screenshot-content {
  width: 100%;
  display: block;
  height: auto;
}

.screenshot-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.device-desktop .device-stand-base {
  content: "";
  height: 10px;
  background: #94a3b8;
  width: 106%;
  margin-left: -3%;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  position: relative;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
}

/* Mobile Frame Bezel Override */
.device-mobile {
  width: 250px;
  border: 12px solid #cbd5e1;
  border-radius: 36px;
  box-shadow: 0 15px 40px rgba(14, 27, 86, 0.12);
  background: #cbd5e1;
  position: relative;
  margin: 0 auto;
}

.device-mobile .device-header-frame {
  height: 36px;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(14, 27, 86, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.device-mobile .header-dots,
.device-mobile .device-stand-base {
  display: none !important;
}

.device-mobile .header-address-bar {
  width: 80%;
  background: #ffffff;
}

.device-mobile .device-screen {
  height: 380px;
  border-radius: 0 0 24px 24px;
}

/* ==========================================================================
   Audit Explorer Layout
   ========================================================================== */
.audits-explorer {
  padding: 32px;
  background: #ffffff;
}

.explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.explorer-heading h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--primary);
}

.explorer-heading p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.explorer-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.audit-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.audit-search-wrapper input {
  padding: 10px 16px 10px 38px;
  background: #f8fafc;
  border: 1px solid rgba(14, 27, 86, 0.1);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.audit-search-wrapper input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 8px rgba(11, 79, 217, 0.15);
}

.audit-search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.audit-status-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(14, 27, 86, 0.05);
}

.status-tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.status-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 5px rgba(14, 27, 86, 0.05);
}

/* Category Badge pills */
.explorer-category-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.category-badge {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(14, 27, 86, 0.1);
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.category-badge:hover {
  background: rgba(14, 27, 86, 0.02);
  color: var(--primary);
}

.category-badge.active {
  background: var(--secondary-glow);
  color: var(--secondary);
  border-color: var(--secondary);
}

/* Audits Listing Accordions */
.audits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-audits-message {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.audit-accordion-item {
  background: #f8fafc;
  border: 1px solid rgba(14, 27, 86, 0.05);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.audit-accordion-item:hover {
  border-color: rgba(14, 27, 86, 0.15);
}

.audit-accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.audit-status-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bullet-good { background-color: var(--score-good); }
.bullet-average { background-color: var(--score-average); }
.bullet-poor { background-color: var(--score-poor); }

.audit-accordion-title {
  font-family: var(--font-family-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.audit-display-value {
  font-family: var(--font-family-heading);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  margin-right: 8px;
}

.audit-display-value.val-poor {
  color: var(--score-poor);
  background: var(--score-poor-glow);
}
.audit-display-value.val-average {
  color: var(--score-average);
  background: var(--score-average-glow);
}

.audit-chevron-icon {
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.audit-accordion-item.expanded .audit-chevron-icon {
  transform: rotate(180deg);
}

.audit-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
}

.audit-accordion-item.expanded .audit-accordion-content {
  max-height: 2000px;
}

.audit-content-inner {
  padding: 20px;
  border-top: 1px solid rgba(14, 27, 86, 0.05);
  font-size: 0.9rem;
}

.audit-description {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.audit-learn-link {
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Audits detailed tables */
.audit-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(14, 27, 86, 0.08);
  border-radius: var(--border-radius-sm);
  background: #f8fafc;
}

.audit-details-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.audit-details-table th,
.audit-details-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(14, 27, 86, 0.05);
}

.audit-details-table th {
  background: rgba(14, 27, 86, 0.02);
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-family-heading);
}

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

.cell-url {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

.cell-numeric {
  font-family: var(--font-family-heading);
  font-weight: 700;
  text-align: right;
}

.audit-node {
  display: inline-block;
  font-family: monospace;
  font-size: 0.8rem;
  background-color: rgba(14, 27, 86, 0.05);
  color: #0b4fd9;
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  cursor: help;
}

.audit-source-link {
  color: #0b4fd9;
  text-decoration: none;
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 500;
}

.audit-source-link:hover {
  text-decoration: underline;
}

.audit-details-table code {
  font-family: monospace;
  background-color: rgba(14, 27, 86, 0.04);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* ==========================================================================
   Sidebar Drawer: Audit History
   ========================================================================== */
.history-sidebar {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100%;
  background: #ffffff;
  border-left: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(14, 27, 86, 0.08);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-sidebar.expanded {
  right: 0;
}

.history-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-sidebar-header h3 {
  font-size: 1.15rem;
  color: var(--primary);
}

.history-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.history-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-history-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 40px;
}

/* History list cards */
.history-item-card {
  background: #f8fafc;
  border: 1px solid rgba(14, 27, 86, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.history-item-card:hover {
  background: #ffffff;
  border-color: var(--secondary);
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(14, 27, 86, 0.04);
}

.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.history-item-url {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  color: var(--text-primary);
}

.history-item-strategy {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(14, 27, 86, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.history-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-item-score-pill {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 0.85rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-item-score-pill.score-good {
  background-color: var(--score-good-glow);
  color: var(--score-good);
}
.history-item-score-pill.score-average {
  background-color: var(--score-average-glow);
  color: var(--score-average);
}
.history-item-score-pill.score-poor {
  background-color: var(--score-poor-glow);
  color: var(--score-poor);
}

.history-sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
}

.clear-history-action-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(14, 27, 86, 0.1);
  background: transparent;
  color: var(--score-poor);
  font-family: var(--font-family-heading);
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.clear-history-action-btn:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: var(--score-poor);
}

/* Sidebar dim background overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 27, 86, 0.4);
  backdrop-filter: blur(4px);
  z-index: 990;
}

/* ==========================================================================
   Toasts & Modals
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.toast {
  background: #ffffff;
  border: 1px solid rgba(14, 27, 86, 0.08);
  border-left: 4px solid var(--secondary);
  border-radius: var(--border-radius-sm);
  padding: 12px 20px;
  box-shadow: 0 10px 25px rgba(14, 27, 86, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  min-width: 250px;
  animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-error { border-left-color: var(--score-poor); }
.toast-success { border-left-color: var(--score-good); }

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modal Dialog Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 27, 86, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  padding: 28px;
  position: relative;
  background: #ffffff;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 50px rgba(14, 27, 86, 0.15);
}

@keyframes modalScaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.modal-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.score-brackets h4 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.score-brackets ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-brackets li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-green { background-color: var(--score-good); }
.dot-yellow { background-color: var(--score-average); }
.dot-red { background-color: var(--score-poor); }

/* ==========================================================================
   SEO / AEO / GEO Educational Content and FAQs
   ========================================================================== */
.seo-education-container {
  width: 100%;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.edu-card {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  transition: var(--transition-smooth);
}

.edu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(14, 27, 86, 0.06);
  border-color: rgba(11, 79, 217, 0.15);
}

.edu-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(14, 27, 86, 0.05);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.edu-card h3 {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.3;
}

.edu-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.edu-card p strong {
  color: var(--primary);
}

/* FAQ Accordions Section */
.faq-container-box {
  padding: 48px;
  text-align: left;
}

.faq-section-title {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 8px;
  text-align: center;
}

.faq-section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid rgba(14, 27, 86, 0.06);
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item[open] {
  background: #ffffff;
  border-color: rgba(14, 27, 86, 0.1);
  box-shadow: 0 4px 20px rgba(14, 27, 86, 0.03);
}

.faq-question {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: var(--transition-smooth);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  background: rgba(14, 27, 86, 0.02);
  color: var(--secondary);
}

.faq-icon-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.3s ease;
}

.faq-item[open] .faq-icon-arrow {
  transform: rotate(180deg);
  color: var(--secondary);
}

.faq-answer {
  padding: 0 24px 20px 24px;
  border-top: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
  animation: slideDown 0.3s ease-out;
}

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

/* Tablet & Mobile Grid adjustments for Education Grid */
@media (max-width: 1024px) {
  .edu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .edu-grid {
    grid-template-columns: 1fr;
  }
  .faq-container-box {
    padding: 24px;
  }
  .faq-question {
    padding: 16px;
    font-size: 0.98rem;
  }
  .faq-answer {
    padding: 0 16px 16px 16px;
  }
}

/* ==========================================================================
   Footer Details
   ========================================================================== */
.app-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
  background: #ffffff;
}

.footer-disclaimer {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */

/* Tablet & Mobile Grid Breaks */
@media (max-width: 1024px) {
  .dashboard-body-grid {
    grid-template-columns: 1fr;
  }
  .device-mockup-wrapper {
    order: -1;
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.3rem;
  }
  .search-form {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
  .strategy-selector {
    justify-content: center;
  }
  .scores-container-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .score-card-gauge {
    padding: 12px 4px;
  }
  .svg-gauge-wrapper {
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
  }
  .score-circle-bg,
  .score-circle-value {
    stroke-width: 6px;
  }
  .score-number-display {
    font-size: 1rem;
  }
  .gauge-label {
    font-size: 0.7rem;
  }
  .metrics-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .skeleton-scores-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .skeleton-metrics-grid {
    grid-template-columns: 1fr;
  }
  .results-summary-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .summary-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .summary-actions button {
    width: 100%;
    justify-content: center;
  }
  .explorer-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .explorer-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .audit-search-wrapper input {
    width: 100%;
  }
  .status-tab {
    flex: 1;
  }
}

/* ==========================================================================
   Print Styles (PDF Export Optimization)
   ========================================================================== */
@media print {
  /* --- Base Reset --- */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    animation: none !important;
  }

  body {
    background: #fff !important;
    color: #1a1a1a !important;
    font-size: 10px !important;
    line-height: 1.45 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* --- Hide non-report elements --- */
  .app-header,
  .config-panel,
  .hero-section,
  .loader-view,
  .explorer-controls,
  .explorer-category-badge-row,
  .app-footer,
  .modal-overlay,
  .sidebar-overlay,
  .toast-container,
  .strategy-toggle-tabs,
  .summary-actions,
  .device-mockup-wrapper,
  .rating-legend,
  .faq-icon-arrow,
  #print-report-btn,
  .status-tabs-bar,
  .audit-search-wrapper {
    display: none !important;
  }

  /* --- Page layout --- */
  .main-content {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .results-view {
    padding: 0 !important;
    gap: 8px !important;
  }

  /* --- Results summary bar --- */
  .results-summary-bar {
    position: static !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #fff !important;
    border: none !important;
    border-bottom: 1.5px solid #333 !important;
    padding: 8px 0 !important;
    margin-bottom: 6px !important;
  }

  .summary-details {
    gap: 4px !important;
  }

  .summary-url-badge {
    gap: 4px !important;
  }

  .summary-label {
    font-size: 8px !important;
  }

  #result-url-display {
    font-size: 11px !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
  }

  .summary-meta {
    gap: 6px !important;
  }

  .meta-item {
    font-size: 8px !important;
  }

  /* --- Score gauges (compact row) --- */
  .scores-container-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .score-card-gauge {
    padding: 8px 4px !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
    border-radius: 6px !important;
  }

  .svg-gauge-wrapper {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 4px !important;
  }

  .score-circle-bg {
    stroke: #e0e0e0 !important;
    stroke-width: 5px !important;
  }

  .score-circle-value {
    stroke-width: 5px !important;
  }

  .score-number-display {
    font-size: 0.85rem !important;
  }

  .gauge-label {
    font-size: 8px !important;
    margin-top: 2px !important;
  }

  /* --- Metrics dashboard (compact grid) --- */
  .metrics-dashboard-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  .metric-tile {
    padding: 8px !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    border-radius: 4px !important;
  }

  .metric-tile-header {
    margin-bottom: 2px !important;
  }

  .metric-name {
    font-size: 8px !important;
  }

  .metric-big-value {
    font-size: 14px !important;
  }

  .metric-progress-bar {
    height: 3px !important;
    margin-top: 4px !important;
  }

  .metric-threshold-labels {
    font-size: 7px !important;
  }

  /* --- Glass cards --- */
  .glass-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    padding: 10px !important;
    margin-bottom: 6px !important;
    border-radius: 4px !important;
    page-break-inside: avoid;
  }

  /* --- Dashboard grid --- */
  .dashboard-body-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* --- Audit explorer --- */
  .explorer-header {
    padding: 6px 0 !important;
    margin-bottom: 4px !important;
  }

  .explorer-header h2 {
    font-size: 12px !important;
  }

  .audit-category-title {
    font-size: 11px !important;
    padding: 4px 0 !important;
  }

  /* --- Audit accordion items --- */
  .audit-accordion-item {
    border: 1px solid #e0e0e0 !important;
    margin-bottom: 3px !important;
    page-break-inside: avoid;
  }

  .audit-accordion-header {
    padding: 5px 8px !important;
    min-height: auto !important;
    gap: 6px !important;
  }

  .audit-score-chip {
    width: 18px !important;
    height: 18px !important;
    font-size: 7px !important;
  }

  .audit-title-text {
    font-size: 9px !important;
  }

  .audit-display-value {
    font-size: 8px !important;
  }

  .audit-accordion-content {
    max-height: none !important;
    display: block !important;
    background: #fff !important;
    padding: 6px 8px !important;
    font-size: 9px !important;
  }

  .audit-description {
    font-size: 9px !important;
    line-height: 1.4 !important;
    margin-bottom: 4px !important;
  }

  /* --- Audit detail tables --- */
  .audit-details-table {
    font-size: 8px !important;
    margin-top: 4px !important;
  }

  .audit-details-table th {
    padding: 3px 5px !important;
    font-size: 7.5px !important;
  }

  .audit-details-table td {
    padding: 3px 5px !important;
    font-size: 8px !important;
    word-break: break-all;
  }

  .audit-node code {
    font-size: 7px !important;
    padding: 1px 3px !important;
  }

  /* --- FAQ & Guide sections --- */
  .faq-container-box,
  .guide-cards-grid {
    page-break-before: always;
  }

  .faq-section-title {
    font-size: 13px !important;
  }

  .faq-section-subtitle {
    font-size: 9px !important;
  }

  .faq-item {
    border: 1px solid #e0e0e0 !important;
    margin-bottom: 3px !important;
    page-break-inside: avoid;
  }

  .faq-question {
    padding: 5px 8px !important;
    font-size: 9px !important;
  }

  .faq-answer {
    padding: 4px 8px !important;
    font-size: 8.5px !important;
  }

  .faq-item[open] .faq-answer {
    display: block !important;
  }

  .guide-card {
    padding: 8px !important;
    page-break-inside: avoid;
  }

  .guide-card h3 {
    font-size: 10px !important;
  }

  .guide-card p {
    font-size: 8.5px !important;
    line-height: 1.4 !important;
  }

  .guide-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .guide-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .guide-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* --- Footer disclaimer (show in print) --- */
  .footer-disclaimer {
    display: block !important;
    text-align: center;
    font-size: 7px !important;
    color: #888 !important;
    margin-top: 12px;
    padding-top: 6px;
    border-top: 1px solid #ddd;
  }
}
