@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-primary: hsl(210, 40%, 98%);
  --bg-secondary: hsl(210, 40%, 96%);
  --primary: #162E51;
  --primary-light: #2c4a75;
  --accent: #FFBE2F;
  --accent-hover: #e5ab2a;
  --accent-light: #fffcf4;
  --accent-light-border: rgba(255, 190, 47, 0.25);
  --success: hsl(150, 60%, 35%);
  --success-light: hsl(150, 60%, 95%);
  --error: hsl(0, 75%, 45%);
  --error-light: hsl(0, 75%, 95%);
  --text-main: hsl(222, 47%, 15%);
  --text-muted: hsl(215, 16%, 47%);
  --border-color: rgba(226, 232, 240, 0.8);
  --border-focus: hsl(205, 95%, 50%);
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.65);
  
  /* Layout & Sizing */
  --max-width: 1200px;
  --header-height: 120px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px -1px rgba(15, 23, 42, 0.03), 0 1px 3px -1px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 10px 30px -5px rgba(15, 23, 42, 0.04), 0 4px 12px -5px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.08), 0 8px 16px -8px rgba(15, 23, 42, 0.05);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-muted);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-img {
  width: 325px;
  height: 100px;
  display: block;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.hero-section {
  width: 100%;
  max-width: 1440px;
  height: 633px;
  margin: 0 auto 3.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background-image: linear-gradient(135deg, rgba(22, 46, 81, 0.88), rgba(22, 46, 81, 0.94)), url('hero-bg.jpg');
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
  color: white;
}

.hero-section h1 {
  font-size: 3rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: white;
  background: linear-gradient(135deg, #ffffff 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  font-size: 1.2rem;
  max-width: 950px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.desktop-br {
  display: block;
  content: "";
  margin-top: 0.25rem;
}

@media (max-width: 820px) {
  .desktop-br {
    display: none;
  }
}

/* Custom Hero Button Styling for legible overlay contrast */
.hero-section .btn-primary {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

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

.hero-section .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-section .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
}

.hero-ctas {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  min-height: 48px;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 14px rgba(22, 46, 81, 0.15);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 190, 47, 0.3);
}

.btn-sm {
  min-height: 38px;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

#save-progress-btn {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--border-color);
}

#save-progress-btn:hover {
  background: var(--bg-secondary);
  color: var(--primary);
  border-color: hsl(215, 16%, 70%);
}

#nav-start-report-btn {
  background: var(--primary);
  color: white;
  border: 1.5px solid var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(22, 46, 81, 0.15);
}

#nav-start-report-btn:hover {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: hsl(215, 16%, 75%);
  color: var(--primary-light);
}

.btn-text {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem 1rem;
}

.btn-text:hover {
  color: var(--accent-hover);
  background: var(--accent-light);
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(185, 28, 28, 0.2);
}

.btn-danger:hover {
  background: var(--error-light);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Results Section */
.results-section {
  background-color: #0b1528;
  color: white;
  padding: 5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4rem;
  width: 100%;
  box-sizing: border-box;
}

.results-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.results-section h2 {
  color: white;
  font-size: 2.25rem;
  margin-top: 0;
  margin-bottom: 4.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.results-tag {
  display: inline-block;
  color: var(--accent);
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  padding: 0.4rem 1.25rem;
  position: relative;
  margin-bottom: 1.5rem;
}

.results-tag::before, .results-tag::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 100%;
  border-color: var(--accent);
  border-style: solid;
  top: 0;
}

.results-tag::before {
  left: 0;
  border-width: 1.5px 0 1.5px 1.5px;
}

.results-tag::after {
  right: 0;
  border-width: 1.5px 1.5px 1.5px 0;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.results-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.results-icon-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  color: white;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.results-card:hover .results-icon-circle {
  transform: scale(1.05);
  border-color: var(--accent);
  color: var(--accent);
}

.results-icon-circle svg {
  width: 44px;
  height: 44px;
}

.results-stat {
  font-family: 'Outfit', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.results-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.5;
  text-align: center;
}

/* Section: How It Works */
.how-it-works {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4rem;
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: transparent;
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  border: 1.5px solid var(--accent-light-border);
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9rem;
}

/* Wizard Flow Container */
.wizard-container {
  max-width: 850px;
  margin: 0 auto;
}

/* Progress Tracker */
.progress-nav {
  margin-bottom: 2.5rem;
  position: relative;
}

.progress-bar-container {
  position: absolute;
  top: 25px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  z-index: 1;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transition: width var(--transition-normal);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  list-style: none;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex: 1;
  position: relative;
}

.step-bubble {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
  display: block; /* Shown by default, hidden on small screens for inactive steps */
}

/* State styling for tracker bubbles */
.progress-step.active .step-bubble {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(14, 116, 144, 0.15);
  background: var(--accent-light);
}

.progress-step.active .step-label {
  color: var(--accent);
  font-weight: 700;
}

.progress-step.completed .step-bubble {
  border-color: var(--success);
  background: var(--success-light);
  color: var(--success);
}

.progress-step.completed .step-label {
  color: var(--success);
}

/* Form Panel Transitions */
.wizard-form {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.form-step-panel {
  display: none;
  opacity: 0;
  transform: translateX(15px);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.form-step-panel.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* Card titles and descriptions */
.card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.card-header h2 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.card-header p {
  font-size: 0.95rem;
}

/* Grid Layouts inside Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-grid-full {
  grid-column: span 2;
}

/* Inputs and Labels */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Gestalt proximity rule */
.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
  display: inline-block;
  padding: 2px 0;
  margin-bottom: -2px; /* Proximity closer to input than neighboring forms */
}

.required-dot {
  color: var(--error);
  margin-left: 2px;
}

.input-control {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  min-height: 48px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: white;
  color: var(--text-main);
  transition: all var(--transition-fast);
  width: 100%;
}

.input-control::placeholder {
  color: hsl(215, 16%, 75%);
}

.input-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

/* Native constraints style fallback */
.input-control.has-error {
  border-color: var(--error);
  background-color: var(--error-light);
}

.error-message {
  font-size: 0.8rem;
  color: var(--error);
  font-weight: 500;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.input-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Radio & Checkbox Styles */
.choices-container {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.choice-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  user-select: none;
}

.choice-label input[type="radio"],
.choice-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Toggle Switch */
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: hsl(215, 16%, 75%);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--accent);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Accordion sections (Reporting on behalf / conditional forms) */
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out, padding var(--transition-normal);
  padding: 0 1.5rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 0 solid var(--border-color);
}

.accordion-panel.open {
  max-height: 500px;
  padding: 1.5rem;
  border-width: 1px;
  margin-bottom: 1.5rem;
}

.accordion-title-box {
  margin-bottom: 1rem;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.accordion-title-box h3 {
  font-size: 1.1rem;
}

/* Dynamic Transaction Section */
.transaction-section {
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.4);
}

.transaction-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: white;
}

.transaction-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.transaction-table th, .transaction-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.transaction-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--primary-light);
}

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

.transaction-table input {
  font-size: 0.9rem;
  min-height: 38px;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}

.transaction-table select {
  font-size: 0.9rem;
  min-height: 38px;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
}

/* Known details section spacing */
.details-headline {
  grid-column: span 2;
  font-size: 1.15rem;
  margin-top: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Drag-and-drop simulated upload area */
.upload-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.upload-drop-zone.dragover {
  border-color: var(--accent);
  background-color: var(--accent-light);
}

.upload-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
}

.upload-drop-zone:hover .upload-icon {
  background: var(--accent-light);
  color: var(--accent);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-name {
  font-weight: 500;
  color: var(--primary-light);
}

.file-size {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.file-progress {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin: 0 1rem;
  overflow: hidden;
  max-width: 150px;
}

.file-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.8s ease-in-out;
}

/* Canvas Signature Pad */
.signature-container {
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.signature-canvas {
  width: 100%;
  height: 180px;
  display: block;
  cursor: crosshair;
  background: #fafcfd;
}

.signature-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.signature-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Navigation controls for Wizard */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Success Card */
.success-card {
  text-align: center;
  padding: 4rem 2.5rem;
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.case-ref-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  max-width: 350px;
  margin: 1.5rem auto 2.5rem;
}

.case-ref-num {
  font-family: monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.25rem;
}

.checklist-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: left;
}

.success-checklist {
  text-align: left;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.success-checklist li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.success-checklist li svg {
  flex-shrink: 0;
  color: var(--success);
  margin-top: 2px;
}

/* FAQ Accordion Section */
.faq-section {
  padding: 4rem 0 2rem;
}

.faq-title {
  text-align: center;
  margin-bottom: 3rem;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background: white;
  transition: all var(--transition-fast);
}

.faq-item:hover {
  border-color: hsl(215, 16%, 80%);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question svg {
  transition: transform var(--transition-normal);
  color: var(--text-muted);
}

.faq-item.active {
  box-shadow: var(--shadow-sm);
  border-color: rgba(14, 116, 144, 0.2);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  font-size: 0.95rem;
}

/* Security Banner */
.security-alert-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-md);
}

.security-alert-banner svg {
  color: var(--accent);
  flex-shrink: 0;
}

.security-alert-text h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.security-alert-text p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* Toast Notification (Save progress feedback) */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: white;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast svg {
  color: var(--accent);
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Site Footer */
.site-footer {
  background: var(--primary);
  color: white;
  padding: 4rem 2rem 2rem;
  margin-top: auto;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 320px;
}

.footer-links-col h4 {
  color: white;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: white;
}

@media (max-width: 820px) {
  .hero-section {
    height: auto;
    min-height: 480px;
    padding: 4rem 1.5rem;
  }

  .hero-section h1 {
    font-size: 2.25rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .form-grid-full {
    grid-column: span 1;
  }
  
  .details-headline {
    grid-column: span 1;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-brand p {
    max-width: 100%;
  }
  
  .progress-step:not(.active) .step-label {
    display: none;
  }
  
  .progress-step.active .step-label {
    display: block;
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }
  
  .progress-nav {
    margin-bottom: 4rem;
  }
  
  .glass-card {
    padding: 1.75rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 580px) {
  .hero-ctas {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn {
    width: 100%;
  }
  
  .step-bubble {
    width: 44px;
    height: 44px;
    font-size: 0.95rem;
    border-width: 2px;
  }
  
  .progress-bar-container {
    top: 20px;
  }
  
  .choices-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .site-header {
    height: 80px;
  }
  
  .brand-logo-img {
    width: 227px;
    height: 70px;
  }

  .header-container {
    padding: 0 1rem;
  }

  .site-header .btn {
    width: auto; /* Prevent header buttons from stretching to 100% width on mobile */
  }

  #save-progress-btn span {
    display: none; /* Hide button text to save space */
  }

  #save-progress-btn {
    padding: 0;
    width: 38px;
    height: 38px;
    min-height: 38px;
    justify-content: center;
    border-radius: 50%;
  }

  #nav-start-report-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
  }

  /* Responsive Transaction Grid Card layout on mobile */
  .transaction-table-wrapper {
    border: none;
    background: transparent;
    margin-bottom: 1rem;
  }

  .transaction-table,
  .transaction-table tbody,
  .transaction-table tr,
  .transaction-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .transaction-table thead {
    display: none; /* Hide standard desktop header rows */
  }

  .transaction-table tr {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
  }

  .transaction-table td {
    border-bottom: none;
    padding: 0.4rem 0;
  }

  .transaction-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 0.25rem;
  }

  .transaction-table td.txn-actions-cell {
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    justify-content: flex-end;
  }

  /* Align checkbox items nicely to the top for wrapped lines */
  .choice-label {
    align-items: flex-start;
  }

  .choice-label input[type="radio"],
  .choice-label input[type="checkbox"] {
    margin-top: 3px;
  }

  /* Prevent toggle switches from shrinking */
  .toggle-switch {
    flex-shrink: 0;
  }

  /* Tighter conditional panels for mobile screens */
  .accordion-panel {
    padding: 0 1rem;
  }

  .accordion-panel.open {
    padding: 1rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 420px) {
  .site-header {
    height: 64px;
  }
  
  .brand-logo-img {
    max-width: 150px;
    height: auto;
  }

  #save-progress-btn {
    display: none !important; /* Hide secondary save progress button on tiny screens */
  }

  #nav-start-report-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    min-height: 32px;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  .site-header, .hero-section, .results-section, .how-it-works, .progress-nav, .wizard-actions, .faq-section, .site-footer {
    display: none !important;
  }
  .glass-card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
  .form-step-panel {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    page-break-after: always;
  }
}
