:root {
  --bg: #0a0e1a;
  --surface: #111827;
  --surface-2: #1a2236;
  --surface-3: #222d44;
  --border: #2a3550;
  --text: #e8ecf4;
  --text-muted: #8892a8;
  --text-dim: #7e8ba4;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.15);
  --green: #0cce6b;
  --green-bg: rgba(12, 206, 107, 0.1);
  --yellow: #ffa400;
  --yellow-bg: rgba(255, 164, 0, 0.1);
  --red: #ff4e42;
  --red-bg: rgba(255, 78, 66, 0.1);
  --orange: #ff6f00;
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
.hidden { display: none !important; }
.btn-loading { display: none; }
.btn-loading.active { display: inline-flex; }
.scan-progress { display: none; }
.scan-progress.active { display: block; }
.advanced-options { display: none; }
.advanced-options.open { display: grid; }
#report-container { display: none; }
#report-container.active { display: block; }
#view-history { display: none; }
#view-history.active { display: block; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.logo h1 { font-size: 1.25rem; font-weight: 800; color: var(--text); line-height: 1.2; letter-spacing: -0.02em; }
.logo .subtitle { font-size: 0.7rem; color: var(--text-dim); font-weight: 500; }
.nav { display: flex; gap: 0.25rem; }

.nav-btn {
  background: none; border: none; color: var(--text-muted);
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.875rem; font-weight: 500; transition: all 0.2s;
}
.nav-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-btn.active { color: var(--primary); background: var(--primary-glow); }

/* Main */
.main { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem 2rem; width: 100%; flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #00210e; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-sm {
  padding: 0.4rem 0.8rem; font-size: 0.8rem;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}
.btn-sm:hover { background: var(--surface-3); color: var(--text); }

.btn-outline {
  padding: 0.5rem 1.25rem; font-size: 0.85rem; font-weight: 600;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.btn-outline:hover { background: var(--surface-2); color: var(--text); }
.btn-outline:disabled { opacity: 0.4; cursor: not-allowed; }

/* Spinner */
.spinner { width: 18px; height: 18px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================
   HERO SECTION (Landing Page)
   ======================================== */
.hero-section {
  text-align: center;
  padding: 4.5rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  /* Grid mesh */
  background-image:
    repeating-linear-gradient(0deg, rgba(16, 185, 129, 0.045) 0px, rgba(16, 185, 129, 0.045) 1px, transparent 1px, transparent 60px),
    repeating-linear-gradient(90deg, rgba(16, 185, 129, 0.045) 0px, rgba(16, 185, 129, 0.045) 1px, transparent 1px, transparent 60px),
    /* Diagonal accent lines */
    repeating-linear-gradient(135deg, transparent, transparent 120px, rgba(6, 182, 212, 0.025) 120px, rgba(6, 182, 212, 0.025) 121px),
    /* Central glow */
    radial-gradient(ellipse 55% 55% at 50% 30%, rgba(16, 185, 129, 0.18) 0%, transparent 70%),
    /* Off-center accent */
    radial-gradient(ellipse 30% 45% at 75% 15%, rgba(6, 182, 212, 0.1) 0%, transparent 65%),
    /* Vignette */
    radial-gradient(ellipse 80% 80% at 50% 50%, transparent 30%, var(--bg) 100%);
  background-size: 60px 60px, 60px 60px, 170px 170px, 100% 100%, 100% 100%, 100% 100%;
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 700px; margin: 0 auto;
}

.hero-content h2 {
  font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.15; margin-bottom: 0.75rem;
  color: var(--text);
}

.hero-content h2 em {
  font-style: normal;
  color: var(--primary);
}

.hero-subtitle {
  color: var(--text-muted); font-size: 1rem; line-height: 1.6;
  margin-bottom: 2.5rem; max-width: 520px; margin-left: auto; margin-right: auto;
}

.hero-input-row {
  display: flex; gap: 0.75rem; max-width: 580px; margin: 0 auto;
}

.hero-input-row input[type="url"] {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.9rem 1.25rem;
  color: var(--text); font-size: 1.05rem; outline: none; transition: border-color 0.2s;
}
.hero-input-row input[type="url"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.hero-input-row input[type="url"]::placeholder { color: var(--text-dim); }

.hero-input-row .btn-primary {
  padding: 0.9rem 2rem; font-size: 1rem;
}

.hero-options {
  display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.25rem; flex-wrap: wrap;
}

.hero-advanced {
  display: flex; justify-content: center; margin-top: 0.75rem;
}

/* ========================================
   HOW IT WORKS
   ======================================== */
.how-it-works {
  padding: 2.5rem 0 2rem;
}

.how-it-works h3 {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--primary); margin-bottom: 1.5rem;
}

.steps-grid {
  display: flex; align-items: stretch; gap: 0;
  max-width: 960px;
}

.step-card {
  flex: 1; display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 1.25rem 1.5rem; position: relative;
  border-left: 2px solid var(--border);
}
.step-card:first-child { border-left-color: var(--primary); }

.step-number {
  font-size: 0.75rem; font-weight: 800; color: var(--text-dim);
  min-width: 1.5rem; padding-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.step-body {}
.step-card h4 {
  font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.step-card h4 svg { color: var(--primary); flex-shrink: 0; }
.step-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* ========================================
   FEATURES / CAPABILITIES
   ======================================== */
.features-section {
  padding: 1rem 0 2.5rem;
}

.features-section h3 {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 1.25rem;
}

.features-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  max-width: 960px;
  border-top: 1px solid var(--border);
}

.feature-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem; text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.feature-card:nth-child(odd) { border-right: 1px solid var(--border); }
.feature-card:hover { background: var(--surface); }

.feature-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  color: var(--primary); display: flex; align-items: center; justify-content: center;
}

.feature-text h4 {
  font-size: 0.9rem; font-weight: 600; line-height: 1.3;
}
.feature-text p {
  font-size: 0.8rem; color: var(--text-dim); line-height: 1.4; margin-top: 0.1rem;
}

/* ========================================
   ADVANCED OPTIONS
   ======================================== */
.options-toggle-row { margin-top: 0.75rem; }

.options-toggle-btn {
  background: none; border: none; color: var(--primary); cursor: pointer;
  font-size: 0.82rem; font-weight: 600; padding: 0; display: flex;
  align-items: center; gap: 0.35rem;
}
.options-toggle-btn:hover { text-decoration: underline; }
.options-toggle-btn::after {
  content: "\25BC"; font-size: 0.6rem; transition: transform 0.2s;
}
.options-toggle-btn.open::after { transform: rotate(180deg); }

.advanced-options {
  margin-top: 1rem; padding: 1.25rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  max-width: 580px; margin-left: auto; margin-right: auto;
  text-align: left;
}

.option-group { display: flex; flex-direction: column; gap: 0.35rem; }

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

.option-select, .option-input, .option-textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.5rem 0.75rem; color: var(--text);
  font-size: 0.85rem; outline: none; transition: border-color 0.2s;
  width: 100%;
}
.option-select:focus, .option-input:focus, .option-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow);
}

.option-textarea { min-height: 60px; resize: vertical; font-family: monospace; font-size: 0.8rem; }

.option-input-sm {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.5rem 0.5rem; color: var(--text);
  font-size: 0.85rem; outline: none; width: 80px; text-align: center;
}
.option-input-sm:focus { border-color: var(--primary); }

.option-input-dpr { width: 60px; }
.option-inline { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.option-x { color: var(--text-muted); font-size: 0.8rem; }
.option-hint { color: var(--text-muted); font-size: 0.75rem; }
.option-hint-text { color: var(--text-muted); font-size: 0.75rem; margin-left: 0.25rem; }

.option-divider {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0; border-top: 1px solid var(--border); margin-top: 0.25rem;
  font-size: 0.78rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.03em;
}

.premium-badge {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: white; font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.5rem;
  border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em;
}

.premium-locked .option-label { color: var(--text-dim); }
.premium-locked .option-input,
.premium-locked .option-textarea {
  cursor: not-allowed; background: var(--surface-3); opacity: 0.5;
}

.checkbox-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--text-muted); cursor: pointer;
}
.checkbox-label input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }

.scan-options input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }

/* ========================================
   PROGRESS
   ======================================== */
.scan-progress {
  margin-top: 1.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.progress-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1rem;
}

.progress-scanner-vis {
  position: relative;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
}
.progress-orbit {
  width: 100%;
  height: 100%;
}
.orbit-ring {
  animation: orbit-spin 2.5s linear infinite;
  transform-origin: center;
}
.orbit-ring-inner {
  animation: orbit-spin-rev 3.5s linear infinite;
  transform-origin: center;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-spin-rev { to { transform: rotate(-360deg); } }

.progress-pct {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.progress-info {
  flex: 1;
  min-width: 0;
}
.progress-info h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.progress-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.progress-bar {
  height: 5px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #06b6d4);
  border-radius: 3px;
  transition: width 0.6s ease;
  width: 0%;
}
.progress-url {
  font-size: 0.75rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Checklist */
.progress-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.4s, background 0.4s;
}
.check-item.active {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}
.check-item.done {
  border-color: rgba(16, 185, 129, 0.2);
}
.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
  border: 2px solid var(--border);
  position: relative;
  transition: border-color 0.3s, background 0.3s;
}
.check-icon.active {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.15);
}
.check-icon.active::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-dot 1.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.6); }
}
.check-icon.done {
  border-color: var(--green);
  background: var(--green);
}
.check-icon.done::after {
  content: '';
  position: absolute;
  top: 3px; left: 5px;
  width: 6px; height: 10px;
  border: solid #0a0e1a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  animation: none;
}
.check-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.check-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 0.15rem;
}
.check-item.done .check-label { color: var(--text-muted); }

/* Tips */
.progress-tips {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--primary);
}
.tip-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.tip-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  transition: opacity 0.3s;
}

@media (max-width: 768px) {
  .progress-hero { flex-direction: column; gap: 1rem; text-align: center; }
  .progress-scanner-vis { width: 100px; height: 100px; }
  .progress-checklist { grid-template-columns: 1fr; }
}

/* ========================================
   REPORT
   ======================================== */
.report { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }

/* Score Hero */
.score-hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  display: flex; align-items: center; gap: 2rem;
}

.score-hero-gauge {
  flex-shrink: 0;
}

.score-hero-info {
  flex: 1; min-width: 0;
}

.score-hero-info h3 {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem;
  overflow-wrap: break-word; word-break: break-all;
}

.score-hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 0.75rem;
}

.score-hero-actions {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}

/* Score Ring */
.score-ring { position: relative; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.score-ring .ring-bg { stroke: var(--surface-3); }
.score-ring .ring-fill { transition: stroke-dashoffset 1s ease; }

.score-ring .score-value {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-ring .grade { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.score-ring .pct { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

.score-ring-lg { width: 140px; height: 140px; }
.score-ring-lg .grade { font-size: 2.2rem; }
.score-ring-lg .pct { font-size: 0.85rem; }

.score-ring-sm { width: 90px; height: 90px; }

/* Vitals Pills */
.vitals-pills {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
}

.vital-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem; border-radius: 20px;
  font-size: 0.85rem; font-weight: 600;
}
.vital-pill.good { background: var(--green-bg); color: var(--green); }
.vital-pill.needs-improvement { background: var(--yellow-bg); color: var(--yellow); }
.vital-pill.poor { background: var(--red-bg); color: var(--red); }

/* Two Column Report */
.report-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}

/* CWV Summary Gauges */
.cwv-summary-grid {
  display: flex; flex-direction: column; gap: 1rem;
}

.cwv-gauge {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 0;
}

.cwv-gauge-ring { width: 70px; height: 70px; flex-shrink: 0; position: relative; }
.cwv-gauge-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cwv-gauge-ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.cwv-gauge-ring .ring-bg { stroke: var(--surface-3); }
.cwv-gauge-ring .ring-fill { transition: stroke-dashoffset 1s ease; }

.cwv-gauge-ring .score-value {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}

.cwv-gauge-info { flex: 1; }
.cwv-gauge-abbr { font-size: 0.85rem; font-weight: 700; }
.cwv-gauge-name { font-size: 0.75rem; color: var(--text-dim); }
.cwv-gauge-value { font-size: 0.9rem; font-weight: 700; margin-top: 0.15rem; }

/* Score Overview (secondary row) */
.score-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }

.score-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.score-card.primary { border-color: var(--primary); background: linear-gradient(135deg, var(--surface), var(--primary-glow)); }
.score-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* Vitals Grid (fallback) */
.vitals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }

.vital-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
}
.vital-name { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.vital-value { font-size: 1.2rem; font-weight: 700; }
.vital-value.good { color: var(--green); }
.vital-value.needs-improvement { color: var(--yellow); }
.vital-value.poor { color: var(--red); }

/* Report Section */
.report-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  overflow: hidden;
}
.report-section h3 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}

/* Audit list */
.audit-list { display: flex; flex-direction: column; gap: 0.35rem; }

.audit-item {
  background: var(--surface-2); border-radius: var(--radius-sm);
  border: 1px solid transparent; transition: border-color 0.2s;
}
.audit-item:hover { border-color: var(--border); }

.audit-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; cursor: pointer; user-select: none;
}

.audit-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.audit-dot.high { background: var(--red); }
.audit-dot.medium { background: var(--yellow); }
.audit-dot.low { background: var(--green); }
.audit-dot.pass { background: var(--green); }

.audit-title { flex: 1; font-size: 0.9rem; font-weight: 500; }

.audit-meta {
  display: flex; gap: 0.75rem; align-items: center;
  font-size: 0.78rem; color: var(--text-dim); white-space: normal; flex-wrap: wrap;
}

.audit-chevron {
  width: 16px; height: 16px; color: var(--text-dim);
  transition: transform 0.2s; flex-shrink: 0;
}
.audit-item.open .audit-chevron { transform: rotate(180deg); }

.audit-body {
  display: none; padding: 0.25rem 1rem 1.25rem;
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.65;
  overflow-x: auto; overflow-wrap: break-word; word-break: break-word;
}
.audit-item.open .audit-body { display: block; }

.audit-description { margin-bottom: 0.75rem; overflow-wrap: break-word; word-break: break-word; }

/* Audit savings inline */
.audit-inline-savings {
  font-size: 0.75rem; color: var(--yellow); font-weight: 500;
}

/* Audit detail tables */
.audit-table-wrap {
  overflow-x: auto; max-width: 100%;
}
.audit-table {
  width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.78rem;
}
.audit-table th {
  text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border);
  color: var(--text-dim); font-weight: 600; text-transform: uppercase; font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.audit-table td {
  padding: 0.4rem 0.6rem; border-bottom: 1px solid rgba(42, 53, 80, 0.4);
  vertical-align: top;
}
.audit-table tr:last-child td { border-bottom: none; }

.audit-url {
  max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-muted); font-family: monospace; font-size: 0.75rem;
}

.audit-savings { color: var(--yellow); font-weight: 600; white-space: normal; word-break: break-word; }
.audit-size { color: var(--text-dim); }

/* Passed audits */
.passed-summary {
  margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border);
}
.passed-toggle {
  background: none; border: none; color: var(--green);
  cursor: pointer; font-size: 0.82rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.4rem;
}
.passed-toggle:hover { text-decoration: underline; }
.passed-list { display: none; margin-top: 0.5rem; }
.passed-list.open { display: block; }

.passed-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0; font-size: 0.82rem; color: var(--text-muted);
}
.passed-check { color: var(--green); font-size: 0.9rem; }

/* ========================================
   HISTORY TABLE VIEW
   ======================================== */
.history-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; flex-wrap: wrap; gap: 0.75rem;
}

.history-header h2 { font-size: 1.35rem; font-weight: 700; }

.history-nav {
  display: flex; gap: 0.5rem;
}

.history-filters {
  display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center;
}

.filter-group {
  display: flex; align-items: center; gap: 0.35rem;
}

.filter-group label {
  font-size: 0.78rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.03em;
}

.filter-group select {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.4rem 0.6rem; color: var(--text);
  font-size: 0.82rem; outline: none;
}

.history-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}

.history-table thead th {
  text-align: left; padding: 0.75rem 1rem;
  font-size: 0.75rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}

.history-table tbody tr {
  transition: background 0.15s;
}
.history-table tbody tr:nth-child(even) { background: var(--surface-2); }
.history-table tbody tr:hover { background: var(--surface-3); }

.history-table tbody td {
  padding: 0.75rem 1rem; font-size: 0.88rem;
  border-bottom: 1px solid rgba(42, 53, 80, 0.3);
  vertical-align: middle;
}
.history-table tbody tr:last-child td { border-bottom: none; }

.history-table .history-url-cell {
  max-width: 350px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 500;
}

.history-table .history-date-cell {
  color: var(--text-muted); font-size: 0.82rem; white-space: nowrap;
}

.history-table .history-actions-cell {
  display: flex; gap: 0.5rem; align-items: center;
}

/* Score Badge */
.score-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.6rem; border-radius: 6px;
  font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}
.score-badge.grade-a { background: rgba(12, 206, 107, 0.15); color: #0cce6b; }
.score-badge.grade-b { background: rgba(77, 184, 77, 0.15); color: #4db84d; }
.score-badge.grade-c { background: rgba(255, 164, 0, 0.15); color: #ffa400; }
.score-badge.grade-d { background: rgba(255, 111, 0, 0.15); color: #ff6f00; }
.score-badge.grade-e { background: rgba(255, 78, 66, 0.15); color: #ff4e42; }
.score-badge.grade-f { background: rgba(204, 0, 0, 0.15); color: #cc0000; }
.score-badge.grade-na { background: var(--surface-3); color: var(--text-dim); }

/* View Report Button */
.btn-view-report {
  padding: 0.35rem 0.75rem; border: none; border-radius: 6px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
  color: white;
}
.btn-view-report.grade-a { background: #0cce6b; }
.btn-view-report.grade-a:hover { background: #0ab85f; }
.btn-view-report.grade-b { background: #4db84d; }
.btn-view-report.grade-b:hover { background: #45a645; }
.btn-view-report.grade-c { background: #ffa400; }
.btn-view-report.grade-c:hover { background: #e69500; }
.btn-view-report.grade-d { background: #ff6f00; }
.btn-view-report.grade-d:hover { background: #e66300; }
.btn-view-report.grade-e { background: #ff4e42; }
.btn-view-report.grade-e:hover { background: #e6453b; }
.btn-view-report.grade-f { background: #cc0000; }
.btn-view-report.grade-f:hover { background: #b30000; }
.btn-view-report.grade-na { background: var(--surface-3); color: var(--text-muted); }

.btn-delete-scan {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; padding: 0.3rem; border-radius: 4px; font-size: 0.85rem;
  transition: all 0.15s;
}
.btn-delete-scan:hover { color: var(--red); background: var(--red-bg); }

/* Status badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600;
}
.status-running { background: var(--primary-glow); color: var(--primary); }
.status-complete { background: var(--green-bg); color: var(--green); }
.status-error { background: var(--red-bg); color: var(--red); }

/* Error / empty */
.error-msg {
  background: var(--red-bg); border: 1px solid rgba(255, 78, 66, 0.3);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem; color: var(--red); font-size: 0.9rem; margin-top: 1rem;
}
.empty-state { text-align: center; color: var(--text-dim); padding: 3rem; font-size: 0.9rem; }

/* Blocked Warning */
.blocked-warning {
  background: var(--yellow-bg); border: 1px solid rgba(255, 164, 0, 0.3);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin-top: 1rem;
}
.blocked-warning h4 { color: var(--yellow); margin-bottom: 0.25rem; }
.blocked-warning p { color: var(--text-muted); font-size: 0.85rem; }

/* ========================================
   AUTH HEADER
   ======================================== */
.header-auth { display: flex; align-items: center; gap: 0.5rem; }
.auth-buttons { display: flex; align-items: center; gap: 0.5rem; }

.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.35rem 0.6rem; cursor: pointer;
  color: var(--text-muted); transition: all 0.15s;
}
.user-menu-btn:hover { background: var(--surface-3); color: var(--text); }

.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #00210e;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}

.user-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); min-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4); z-index: 200;
  overflow: hidden;
}
.user-dropdown.open { display: block; }

.dropdown-header { padding: 0.75rem 1rem; }
.dropdown-name { font-size: 0.9rem; font-weight: 600; }
.dropdown-email { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.1rem; }
.dropdown-plan {
  display: inline-block; margin-top: 0.35rem;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  padding: 0.1rem 0.45rem; border-radius: 4px;
  background: var(--primary-glow); color: var(--primary);
}
.dropdown-divider { height: 1px; background: var(--border); }
.dropdown-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text-muted);
  padding: 0.55rem 1rem; font-size: 0.82rem; cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }

/* ========================================
   AUTH MODAL
   ======================================== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  width: 90%; max-width: 400px; position: relative;
}
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: none; border: none; color: var(--text-dim);
  font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0.25rem;
}
.modal-close:hover { color: var(--text); }

.auth-form h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.25rem; text-align: center; }
.auth-form form { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-form input {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem 1rem; color: var(--text);
  font-size: 0.9rem; outline: none; transition: border-color 0.2s;
}
.auth-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow); }
.auth-form input::placeholder { color: var(--text-dim); }

.auth-submit { margin-top: 0.5rem; width: 100%; justify-content: center; position: relative; }
.auth-submit .spinner { display: none; width: 16px; height: 16px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; animation: spin 0.6s linear infinite; }
.auth-submit.loading .spinner { display: inline-block; }
.auth-submit.loading .btn-label { opacity: 0.5; }
@keyframes spin { to { transform: rotate(360deg); } }

.pw-toggle {
  position: relative; width: 100%;
}
.pw-toggle input { padding-right: 2.5rem; width: 100%; box-sizing: border-box; }
.pw-toggle-btn {
  position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-dim); font-size: 0.75rem;
  cursor: pointer; padding: 0.2rem 0.3rem; user-select: none;
}
.pw-toggle-btn:hover { color: var(--text); }

.toast {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 2000;
  padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500; max-width: 400px;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.toast-success { background: var(--green-bg); border: 1px solid rgba(12,206,107,0.3); color: var(--green); }
.toast-error { background: var(--red-bg); border: 1px solid rgba(255,78,66,0.3); color: var(--red); }
.toast-info { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.auth-error {
  background: var(--red-bg); border: 1px solid rgba(255,78,66,0.3);
  border-radius: 6px; padding: 0.6rem 0.8rem; color: var(--red);
  font-size: 0.82rem; margin-bottom: 0.5rem;
}
.auth-success {
  background: var(--green-bg); border: 1px solid rgba(12,206,107,0.3);
  border-radius: 6px; padding: 0.6rem 0.8rem; color: var(--green);
  font-size: 0.82rem; margin-bottom: 0.5rem;
}

.pw-requirements {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1rem;
  font-size: 0.78rem; color: var(--text-dim); margin: -0.25rem 0 0.25rem;
}
.pw-req { display: flex; align-items: center; gap: 0.35rem; transition: color 0.2s; }
.pw-req .pw-req-icon::before { content: "\u25CB"; font-size: 0.7rem; }
.pw-req.met { color: var(--green); }
.pw-req.met .pw-req-icon::before { content: "\u25CF"; }
.auth-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.auth-links { text-align: center; margin-top: 1rem; }
.auth-link {
  background: none; border: none; color: var(--primary);
  cursor: pointer; font-size: 0.82rem; padding: 0.25rem;
  display: block; margin: 0.25rem auto;
}
.auth-link:hover { text-decoration: underline; }

/* ========================================
   SCAN USAGE METER
   ======================================== */
.scan-usage-meter {
  max-width: 580px; margin: 0.75rem auto 0;
  display: flex; align-items: center; gap: 0.75rem;
}
.usage-bar {
  flex: 1; height: 6px; background: var(--surface-3);
  border-radius: 3px; overflow: hidden;
}
.usage-fill {
  height: 100%; border-radius: 3px;
  background: var(--primary); transition: width 0.4s;
}
.usage-text { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }

/* ========================================
   PRICING
   ======================================== */
#view-pricing { display: none; }
#view-pricing.active { display: block; }

.pricing-section { padding: 2rem 0; text-align: center; }
.pricing-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; }
.pricing-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 2.5rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; max-width: 1100px; margin: 0 auto; }

.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem; text-align: left;
  display: flex; flex-direction: column; position: relative;
}
.pricing-card.featured { border-color: var(--primary); }
.pricing-popular {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #00210e;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  padding: 0.2rem 0.8rem; border-radius: 12px; letter-spacing: 0.04em;
}

.pricing-card-header { margin-bottom: 1.25rem; }
.pricing-card-header h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.pricing-price { display: flex; align-items: baseline; gap: 0.15rem; }
.price-amount { font-size: 2rem; font-weight: 800; }
.price-period { font-size: 0.85rem; color: var(--text-muted); }
.pricing-annual { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

.pricing-features {
  list-style: none; flex: 1; margin-bottom: 1.5rem;
}
.pricing-features li {
  padding: 0.35rem 0; font-size: 0.85rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.5rem;
}
.pricing-features li::before {
  content: "\2713"; color: var(--primary); font-weight: 700; font-size: 0.9rem;
}

.pricing-cta { width: 100%; justify-content: center; }

/* ========================================
   TEAM VIEW
   ======================================== */
#view-team { display: none; }
#view-team.active { display: block; }

.team-section { max-width: 700px; }
.team-section h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.25rem; }

.team-info-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem;
}

.team-members-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 1.25rem;
}
.team-members-table th {
  text-align: left; padding: 0.6rem 1rem;
  font-size: 0.72rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.team-members-table td {
  padding: 0.6rem 1rem; font-size: 0.85rem;
  border-bottom: 1px solid rgba(42,53,80,0.3);
}
.team-members-table tr:last-child td { border-bottom: none; }

.invite-form {
  display: flex; gap: 0.5rem; margin-bottom: 1rem;
}
.invite-form input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.5rem 0.75rem; color: var(--text);
  font-size: 0.85rem; outline: none;
}
.invite-form input:focus { border-color: var(--primary); }

/* ========================================
   BILLING VIEW
   ======================================== */
#view-billing { display: none; }
#view-billing.active { display: block; }

.billing-section { max-width: 700px; }
.billing-section h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.25rem; }

.billing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem;
}
.billing-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }

.billing-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; border-bottom: 1px solid rgba(42,53,80,0.3);
}
.billing-stat:last-child { border-bottom: none; }
.billing-stat-label { font-size: 0.85rem; color: var(--text-muted); }
.billing-stat-value { font-size: 0.9rem; font-weight: 600; }

.billing-actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }

/* Email verification banner */
.verify-banner {
  background: var(--yellow-bg); border: 1px solid rgba(255,164,0,0.3);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; font-size: 0.85rem; color: var(--yellow);
}
.verify-banner button {
  background: var(--yellow); color: #000; border: none;
  border-radius: 6px; padding: 0.35rem 0.75rem;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}

/* Notification badges */
.badge-pro, .badge-biz {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  padding: 0.1rem 0.4rem; border-radius: 3px; letter-spacing: 0.04em;
  margin-left: 0.35rem;
}
.badge-pro {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: white;
}
.badge-biz {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  color: white;
}

.notify-check {
  margin-top: 0.25rem;
}

/* Scheduled Scans & Branding Views */
#view-schedules { display: none; }
#view-schedules.active { display: block; }
#view-branding { display: none; }
#view-branding.active { display: block; }

.schedules-section, .branding-section { max-width: 700px; }
.schedules-section h2, .branding-section h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.25rem; }

/* Plan change banner */
.plan-change-banner {
  background: var(--yellow-bg); border: 1px solid rgba(255, 164, 0, 0.3);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  margin-bottom: 1rem; color: var(--yellow); font-size: 0.9rem;
}
.plan-change-banner ul { color: var(--text-muted); }

/* Footer */
.footer {
  text-align: center; padding: 2rem; color: var(--text-dim);
  font-size: 0.8rem; border-top: 1px solid var(--border); margin-top: auto;
}

/* Page meta */
.page-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 0; }
.page-meta-item { display: flex; flex-direction: column; gap: 0.15rem; }
.page-meta-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.page-meta-value { font-size: 0.88rem; font-weight: 600; }

/* CDN Badge */
.cdn-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border-radius: 6px; font-size: 0.82rem; font-weight: 600;
}
.cdn-detected { background: var(--green-bg); color: var(--green); }
.cdn-none { background: var(--red-bg); color: var(--red); }
.cdn-providers { font-weight: 400; color: var(--text-muted); margin-left: 0.25rem; }

/* Device Tabs */
.device-tabs {
  display: flex; gap: 0; margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
}
.device-tab {
  background: none; border: none; color: var(--text-muted);
  padding: 0.6rem 1.25rem; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.device-tab:hover { color: var(--text); }
.device-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.device-panel { display: none; }
.device-panel.active { display: block; }

/* Node/element snippets */
.audit-node {
  background: var(--surface-3); border: 1px solid var(--border); border-radius: 4px;
  padding: 0.35rem 0.6rem; font-family: monospace; font-size: 0.75rem;
  color: var(--text-muted); overflow-x: auto; white-space: nowrap; display: block;
  max-width: 500px;
}
.audit-node .selector { display: block; font-size: 0.7rem; color: var(--text-dim); margin-top: 0.15rem; }

/* Nested list detail sections */
.audit-nested-section { margin-top: 0.75rem; }
.audit-nested-section + .audit-nested-section { margin-top: 0.5rem; }

/* Filmstrip */
.final-screenshot {
  max-width: 600px;
  margin: 0.5rem 0;
}
.final-screenshot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: block;
}

.category-score-inline {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.filmstrip {
  display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.5rem 0;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.filmstrip-frame { flex-shrink: 0; text-align: center; }
.filmstrip-frame img {
  width: 120px; height: auto; border: 1px solid var(--border);
  border-radius: 4px; display: block;
}
.filmstrip-time {
  font-size: 0.7rem; color: var(--text-dim); margin-top: 0.25rem;
  display: block;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .header-inner { padding: 0 1rem; }
  .main { padding: 0 1rem 1.5rem; }
  .hero-section { padding: 2.5rem 1rem 2rem; }
  .hero-content h2 { font-size: 1.6rem; }
  .hero-input-row { flex-direction: column; }
  .hero-input-row .btn-primary { width: 100%; justify-content: center; }
  .steps-grid { flex-direction: column; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card:nth-child(odd) { border-right: none; }
  .score-hero { flex-direction: column; text-align: center; padding: 1.25rem; gap: 1rem; }
  .score-hero-meta { justify-content: center; }
  .score-hero-actions { justify-content: center; }
  .report-two-col { grid-template-columns: 1fr; }
  .score-overview { grid-template-columns: repeat(2, 1fr); }
  .vitals-grid { grid-template-columns: 1fr; }
  .vitals-pills { flex-direction: column; }
  .report-section { padding: 1rem; }
  .audit-header { padding: 0.6rem 0.75rem; gap: 0.5rem; }
  .audit-body { padding: 0.25rem 0.75rem 1rem; }
  .audit-meta { font-size: 0.72rem; }
  .audit-table { font-size: 0.72rem; }
  .audit-table th, .audit-table td { padding: 0.35rem 0.4rem; }
  .audit-url { max-width: 200px; font-size: 0.68rem; }
  .final-screenshot { max-width: 100%; }
  .history-table { font-size: 0.8rem; }
  .history-table thead th { padding: 0.5rem 0.6rem; }
  .history-table tbody td { padding: 0.5rem 0.6rem; }
  .advanced-options { grid-template-columns: 1fr; }
  .cwv-gauge-ring { width: 55px; height: 55px; }
  .page-meta { gap: 0.75rem; }
  .audit-url { max-width: 200px; }
}

@media (max-width: 960px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
}
@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 360px; }
  .invite-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .history-table .history-date-cell { display: none; }
  .hero-content h2 { font-size: 1.35rem; }
  .auth-buttons .btn-sm:first-child { display: none; }
}
