/* ==========================================================================
   Main Stylesheet - Code Quality Check
   Combines shared and page-specific styles for landing and results pages
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties (Theme)
   ========================================================================== */

:root {
  --bg-deep: #000000;
  --bg-surface: #111111;
  --bg-elevated: #1a1a1a;
  --border-subtle: #2a2a2a;
  --border-hover: #3a3a3a;
  --text-primary: #e5e5e5;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --accent-hover: #34d399;
  --critical: #ef4444;
  --high: #f97316;
  --medium: #eab308;
  --low: #3b82f6;
  --info: #6b7280;
  --passed: #10b981;
  --warning: #f59e0b;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', Georgia, serif;
}

[data-theme="light"] {
  --bg-deep: #e8e8e8;
  --bg-surface: #dedede;
  --bg-elevated: #d4d4d4;
  --border-subtle: #c0c0c0;
  --border-hover: #a0a0a0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6a6a6a;
  --accent: #059669;
  --accent-glow: rgba(5, 150, 105, 0.1);
  --accent-hover: #047857;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

/* Gradient orb (landing page) */
body.landing::after {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

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

@media (min-width: 1200px) {
  .container {
    max-width: 1100px;
  }
}

/* ==========================================================================
   Theme Toggle
   ========================================================================== */

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.theme-toggle button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 8px;
  line-height: 1;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.theme-toggle button:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h2 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

h2::before {
  content: '// ';
  color: var(--accent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.hero-cta {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg-deep);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary {
  padding: 12px 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--bg-deep);
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--accent-glow);
}

.btn-success {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}

.copy-btn {
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: 8px;
}

.copy-btn:hover {
  background: var(--accent-glow);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

label .optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
}

input[type='text'],
input[type='email'],
input[type='url'],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all 0.2s ease;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-hover);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button[type='submit'] {
  width: 100%;
  padding: 16px 32px;
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

button[type='submit']:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

button[type='submit']:active {
  transform: translateY(0);
}

/* Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.checkbox-wrapper:hover {
  background: var(--bg-deep);
}

.checkbox-wrapper input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-deep);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.checkbox-wrapper input[type='checkbox']:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-wrapper input[type='checkbox']::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid var(--bg-deep);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

.checkbox-wrapper input[type='checkbox']:checked::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-wrapper span {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Inline checkbox */
.inline-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.inline-checkbox input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* ==========================================================================
   Severity Badges
   ========================================================================== */

.severity-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-critical { background: var(--critical); color: white; }
.severity-high { background: var(--high); color: white; }
.severity-medium { background: var(--medium); color: #1a1a1a; }
.severity-low { background: var(--low); color: white; }
.severity-info { background: var(--info); color: white; }
.severity-passed { background: var(--passed); color: white; }

/* ==========================================================================
   Animations
   ========================================================================== */

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

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

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

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

/* ==========================================================================
   Loading States
   ========================================================================== */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--bg-deep);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

.loading-container {
  text-align: center;
  padding: 60px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 32px;
}

.loading-container h3 {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.loading-container p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
}

.scan-loading {
  text-align: center;
  padding: 48px;
  background: var(--bg-surface);
  border-radius: 12px;
}

.scan-loading p {
  color: var(--text-primary);
  margin: 0 0 8px;
  font-size: 16px;
}

/* ==========================================================================
   Error Messages
   ========================================================================== */

.error-message {
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--critical);
  border-radius: 8px;
  color: var(--critical);
  margin-bottom: 20px;
  font-size: 14px;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Landing Page - Header
   ========================================================================== */

.landing header {
  padding: 80px 0 60px;
  text-align: center;
  animation: fadeInDown 0.8s ease-out;
}

.landing header h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 20px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.landing header p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

/* ==========================================================================
   Landing Page - Main Content
   ========================================================================== */

.landing main {
  padding-bottom: 100px;
}

.landing section {
  animation: fadeInUp 0.6s ease-out backwards;
}

.landing section:nth-child(1) { animation-delay: 0.1s; }
.landing section:nth-child(2) { animation-delay: 0.2s; }
.landing section:nth-child(3) { animation-delay: 0.3s; }

/* ==========================================================================
   Landing Page - Form
   ========================================================================== */

#audit-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 48px;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 32px;
}

fieldset:last-of-type {
  margin-bottom: 0;
}

legend {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  padding: 6px 12px;
  background: var(--accent-glow);
  border-radius: 4px;
}

legend.optional-legend {
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.form-group {
  margin-bottom: 20px;
}

.under-button-info {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-elevated);
  border-radius: 8px;
}

.under-button-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.under-button-info li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.under-button-info li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.privacy-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Inline scan form */
.scan-form-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
}

.inline-scan-form {
  text-align: left;
}

.inline-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.inline-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.inline-form-group input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: border-color 0.2s;
}

.inline-form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ==========================================================================
   Landing Page - Deliverables
   ========================================================================== */

.deliverables {
  margin: 48px 0;
  padding: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.deliverables ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.deliverables li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 15px;
}

.deliverables li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.deliverables li:first-child {
  padding-top: 0;
}

.deliverables li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}

/* ==========================================================================
   Landing Page - Content Sections
   ========================================================================== */

.section-intro {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.content-section {
  margin: 48px 0;
}

.content-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.content-section ul li {
  font-size: 15px;
  color: var(--text-secondary);
  padding: 12px 0;
  padding-left: 28px;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.content-section ul li:last-child {
  border-bottom: none;
}

.content-section ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* ==========================================================================
   Landing Page - Example Findings
   ========================================================================== */

.example-findings {
  margin: 48px 0;
  padding: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.example-findings ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.example-findings li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px 0;
  padding-left: 24px;
  position: relative;
}

.example-findings li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  color: var(--warning);
}

/* ==========================================================================
   Landing Page - How It Works Steps
   ========================================================================== */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15px;
  color: var(--text-secondary);
}

.steps li:last-child {
  border-bottom: none;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ==========================================================================
   Landing Page - FAQ
   ========================================================================== */

.faq {
  margin-top: 48px;
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.faq-item p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Landing Page - Success Message
   ========================================================================== */

.success-message {
  text-align: center;
  padding: 48px 32px;
  animation: fadeInUp 0.5s ease-out;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
  color: var(--accent);
  animation: scaleIn 0.4s ease-out 0.2s backwards;
}

.success-message h3 {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.success-message p {
  color: var(--text-secondary);
  margin: 0 0 24px;
}

/* ==========================================================================
   Landing Page - Alternative Contact
   ========================================================================== */

.alt-contact {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.alt-contact a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: border-color 0.2s;
}

.alt-contact a:hover {
  border-bottom-style: solid;
}

/* ==========================================================================
   Landing Page - Footer
   ========================================================================== */

.landing footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.landing footer small {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Results Page - Header
   ========================================================================== */

.results header {
  padding: 60px 0 40px;
}

.results header h1 {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.brand-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.brand-link:hover {
  opacity: 0.8;
}

.title-sep {
  color: var(--text-muted);
  margin: 0 4px;
}

.scan-url {
  font-size: 14px;
  color: var(--text-muted);
  word-break: break-all;
  margin: 0 0 8px;
}

.scan-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Results Page - Summary
   ========================================================================== */

.summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-surface);
  border-radius: 8px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

/* ==========================================================================
   Results Page - Triage Score
   ========================================================================== */

.triage-score {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 4px solid var(--accent);
  box-shadow: 0 0 24px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.score-value {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   Results Page - Checks Section
   ========================================================================== */

.checks-section {
  margin-bottom: 32px;
}

.checks-section h3 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.checks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .checks-list {
    grid-template-columns: 1fr;
  }
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.check-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.check-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  font-weight: 600;
}

.check-icon.passed {
  background: var(--accent-glow);
  color: var(--accent);
}

.check-icon.failed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--critical);
}

.check-name {
  color: var(--text-primary);
  font-weight: 500;
}

.check-status {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.check-status.has-issues {
  color: var(--critical);
  font-weight: 500;
}

.check-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.check-item.expandable {
  cursor: pointer;
  flex-direction: column;
  align-items: stretch;
}

.check-item.expandable .check-header {
  flex: 1;
}

.check-expand {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.check-item.expanded .check-expand {
  transform: rotate(180deg);
}

.check-details {
  display: none;
  list-style: none;
  padding: 12px 0 0 40px;
  margin: 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 12px;
}

.check-item.expanded .check-details {
  display: block;
}

.check-details li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.severity-dot.severity-critical {
  background: var(--critical);
}

.severity-dot.severity-high {
  background: var(--high);
}

.severity-dot.severity-medium {
  background: var(--medium);
}

.severity-dot.severity-low {
  background: var(--low);
}

.severity-dot.severity-info {
  background: var(--text-muted);
}

.severity-dot.severity-passed {
  background: var(--accent);
}

.check-pass-detail {
  color: var(--text-muted);
}

/* ==========================================================================
   Results Page - Technologies Section
   ========================================================================== */

.tech-section {
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.tech-section h3 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tech-tag:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ==========================================================================
   Results Page - Findings
   ========================================================================== */

.findings-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.finding {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.finding-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.finding-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.finding-location {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.finding-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.finding-remediation {
  font-size: 13px;
  color: var(--accent);
  padding: 12px;
  background: var(--accent-glow);
  border-radius: 6px;
}

.finding-remediation strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
}

/* Fix first badge */
.finding.fix-first {
  border-left: 3px solid var(--accent);
}

.fix-first-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--accent);
  color: white;
}

.no-findings {
  text-align: center;
  padding: 40px;
  background: var(--bg-surface);
  border-radius: 8px;
}

.no-findings h3,
.no-findings h4 {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--accent);
  margin: 0 0 12px;
}

.no-findings p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
}

/* ==========================================================================
   Results Page - Upsells
   ========================================================================== */

.upsells {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.upsells h3 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.upsell-options {
  display: grid;
  gap: 12px;
}

.upsell-btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s;
}

.upsell-btn:hover {
  border-color: var(--accent);
}

.upsell-btn strong {
  color: var(--accent);
}

.upsell-btn .upsell-desc {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.more-report-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px 20px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.more-report-btn:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

.more-report-btn.hidden {
  display: none;
}

/* ==========================================================================
   Results Page - Details Form
   ========================================================================== */

.details-section {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.details-section.hidden {
  display: none;
}

.details-section h4 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.details-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.details-form {
  display: grid;
  gap: 16px;
}

.details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.details-field {
  margin-bottom: 12px;
}

.details-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.details-field input,
.details-field select,
.details-field textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: border-color 0.2s;
}

.details-field input:focus,
.details-field select:focus,
.details-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.details-field textarea {
  resize: vertical;
  min-height: 60px;
}

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

.form-status {
  font-size: 13px;
  color: var(--accent);
}

/* ==========================================================================
   Results Page - Badge Section
   ========================================================================== */

.badge-section {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.badge-section h3 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.badge-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
}

.badge-preview {
  margin-bottom: 12px;
}

.badge-styles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.badge-style-option {
  cursor: pointer;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.badge-style-option:hover {
  border-color: var(--accent);
}

.badge-style-option img {
  flex-shrink: 0;
}

.badge-style-option span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Badge dialog */
.badge-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.badge-dialog.open {
  display: flex;
}

.badge-dialog-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
}

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

.badge-dialog-header h4 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}

.badge-dialog-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.badge-dialog-close:hover {
  color: var(--text-primary);
}

.embed-code {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}

.embed-code label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.embed-code code {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  white-space: pre-wrap;
}

/* ==========================================================================
   Results Page - New Scan Section
   ========================================================================== */

.new-scan-section {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.new-scan-section.hidden {
  display: none;
}

.new-scan-section h4 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.new-scan-form {
  display: grid;
  gap: 12px;
}

.new-scan-form input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.new-scan-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.consent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.consent-row input[type="checkbox"] {
  width: auto;
}

/* ==========================================================================
   Results Page - Footer
   ========================================================================== */

.results footer {
  padding: 40px 0;
  text-align: center;
}

.footer-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.results footer a {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  margin: 0 8px;
}

.results footer a:hover {
  background: var(--accent-glow);
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */

@media (max-width: 600px) {
  .landing header {
    padding: 60px 0 40px;
  }

  #audit-form {
    padding: 24px;
  }

  .deliverables {
    padding: 24px;
  }

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

  .details-row {
    grid-template-columns: 1fr;
  }

  .summary {
    flex-direction: column;
  }
}

@media (max-width: 500px) {
  .details-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
