/* FuelFail — Contamination Incident Log */
:root {
  --amber: #F59E0B;
  --amber-dark: #B45309;
  --amber-light: #FDE68A;
  --red: #DC2626;
  --red-light: #FEE2E2;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: var(--gray-900);
  color: var(--white);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-text {
  color: var(--amber);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--amber);
}

/* App Shell */
.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  flex: 1;
}

@media (min-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr 320px;
    gap: 2rem;
  }
}

.wizard-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.step h2 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
  color: var(--gray-900);
}

.step-hint {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.3rem;
  color: var(--gray-700);
}

.optional-tag {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--gray-500);
  font-style: italic;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}

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

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 140px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: var(--gray-900);
  border-color: var(--amber);
}

.btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-100);
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.step-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Chip group for symptoms */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font);
  transition: all 0.15s;
  user-select: none;
}

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

.chip.selected {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--gray-900);
  font-weight: 600;
}

/* Timeline */
.timeline-events {
  margin-bottom: 1rem;
}

.timeline-event {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.timeline-event:last-child {
  border-bottom: none;
}

.timeline-event .event-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
  margin-top: 0.4rem;
}

.timeline-event .event-content {
  flex: 1;
}

.timeline-event .event-time {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-700);
}

.timeline-event .event-desc {
  font-size: 0.9rem;
  color: var(--gray-800);
}

.timeline-event .event-remove {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.timeline-add-row {
  align-items: flex-end;
}

.timeline-add-row .btn {
  margin-bottom: 1rem;
}

/* Report preview */
.report-preview {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

.report-preview h3 {
  font-size: 1rem;
  margin: 0.75rem 0 0.25rem;
  color: var(--gray-900);
}

.report-preview h3:first-child {
  margin-top: 0;
}

.demand-letter-preview {
  margin-top: 1.5rem;
  background: var(--amber-light);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.demand-letter-preview h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--amber-dark);
}

/* Step indicator */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray-300);
  transition: background 0.2s;
}

.step-dot.active {
  background: var(--amber);
}

/* Sidebar */
.report-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.report-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.sidebar-preview {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--gray-700);
  white-space: pre-wrap;
}

.empty-state {
  color: var(--gray-500);
  font-style: italic;
}

/* Support content */
.support-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.support-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--gray-900);
}

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

@media (min-width: 700px) {
  .support-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

.support-col h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.support-col p,
.support-col li {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.support-col ul {
  padding-left: 1.25rem;
}

/* FAQ */
.faq-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.faq-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  background: var(--white);
}

.faq-item summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--gray-800);
  list-style: none;
}

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

.faq-item summary::before {
  content: "+ ";
  color: var(--amber);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: "− ";
}

.faq-item p {
  padding: 0 1rem 0.75rem;
  font-size: 0.9rem;
  color: var(--gray-700);
}

/* Assumptions */
.assumptions-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.assumptions-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

.assumptions-section ul {
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.assumptions-section li {
  margin-bottom: 0.35rem;
}

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 1.5rem 1rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-inner p {
  font-size: 0.85rem;
}

.footer-inner a {
  color: var(--amber);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--gray-300);
}

.footer-links a:hover {
  color: var(--amber);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: 0.6rem 1.25rem;
  border-radius: 20px;
  font-size: 0.85rem;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .step-actions,
  .step-indicator,
  .report-sidebar,
  .support-content,
  .faq-section,
  .assumptions-section,
  .toast {
    display: none !important;
  }
  .app-shell {
    display: block;
    padding: 0;
  }
  .wizard-panel {
    box-shadow: none;
    border: none;
    padding: 0;
  }
  .step {
    display: none !important;
  }
  #step4 {
    display: block !important;
  }
  .report-preview,
  .demand-letter-preview {
    background: none;
    border: 1px solid #ccc;
    max-height: none;
    overflow: visible;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
