@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap");

body {
  font-family: "Open Sans", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
}

header {
  display: flex;
  align-items: center;
  position: relative;
  padding: 20px;
  background-color: #ffffff;
  color: #1e2a44;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  height: 60px; /* Fixed height to ensure consistency */
}

.logo {
  max-width: 150px;
  height: auto;
  margin-bottom: 10px;
}

header h1 {
  margin: 0;
  font-size: 24px;
  color: #1e2a44;
  font-weight: bold;
}

h1,
h2 {
  margin: 0;
}

.container {
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
}

.agent-input-section {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

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

label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

button {
  background-color: #d32f2f;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}

button:hover {
  background-color: #b71c1c;
}

.client-report-section {
  background-color: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

#clientReportContent {
  line-height: 1.6;
  width: 100%;
}

#clientReportContent h3 {
  color: #1e2a44;
  border-bottom: 2px solid #d32f2f;
  padding-bottom: 5px;
}

#clientReportContent p,
#clientReportContent ul li {
  margin: 10px 0;
}

#clientReportContent ul {
  list-style-type: none;
  padding-left: 0;
}

#clientReportContent ul li:before {
  content: "•";
  color: #d32f2f;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

#printReport {
  background-color: #4caf50;
  margin-top: 20px;
}

#printReport:hover {
  background-color: #45a049;
}

@media (max-width: 600px) {
  .container {
    margin: 10px;
    padding: 10px;
  }
  .form-group {
    margin-bottom: 10px;
  }
}

.date-display {
  font-weight: bold;
  font-size: 1.1em;
  display: inline-block;
  padding: 8px 0;
}

.share-link-container {
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.share-link-box {
  display: flex;
  margin-top: 10px;
}

.share-link-box input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
}

.share-link-box button {
  background-color: #1e2a44;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  padding: 10px 15px;
  cursor: pointer;
  margin-top: 0;
}

.share-link-box button:hover {
  background-color: #2c3e50;
}

.error-message {
  text-align: center;
  padding: 40px 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin: 30px auto;
  max-width: 500px;
}

.error-message h3 {
  color: #d32f2f;
  font-size: 24px;
  margin-bottom: 20px;
}

.error-message p {
  color: #555;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.error-logo {
  max-width: 120px;
  margin-bottom: 20px;
  opacity: 0.8;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.secondary-button {
  background-color: #6c757d;
}

.secondary-button:hover {
  background-color: #5a6268;
}

.report-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.loading {
  text-align: center;
  padding: 30px;
  font-size: 18px;
}

.loading:after {
  content: ".";
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    color: rgba(0, 0, 0, 0);
    text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  40% {
    color: #333;
    text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  60% {
    text-shadow: 0.25em 0 0 #333, 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  80%,
  100% {
    text-shadow: 0.25em 0 0 #333, 0.5em 0 0 #333;
  }
}

body.client-view .container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

body.client-view .client-report-section {
  max-width: 1100px;
  width: 100%;
  padding: 25px;
  display: block !important;
}

/* Enhanced Report Styling */
.report-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(to right, #f8f9fa, #ffffff, #f8f9fa);
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.report-header h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  color: #1e2a44;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  font-weight: 600;
}

/* Logo container */
.report-logo-container {
  text-align: center;
  margin-bottom: 20px;
  padding: 10px;
}

.report-logo {
  max-width: 180px;
  height: auto;
  display: inline-block;
}

/* Report metadata */
.report-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 20px;
  gap: 15px;
}

.report-meta-item {
  flex: 1;
  min-width: 150px;
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.report-meta-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.report-meta-value {
  font-size: 16px;
  font-weight: 600;
  color: #1e2a44;
}

.report-meta-contact {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
}

.report-meta-contact div {
  margin-top: 3px;
}

/* Report sections */
.report-section {
  background-color: white;
  padding: 20px;
  margin-bottom: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.report-section h3 {
  color: #1e2a44;
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.report-section h4 {
  color: #1e2a44;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 15px;
}

/* Metrics */
.metric-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-label {
  flex: 3;
  font-weight: 600;
  color: #333;
}

.metric-value {
  flex: 1;
  text-align: right;
  font-weight: 700;
  color: #1e2a44;
  padding-right: 15px;
  white-space: nowrap;
}

.metric-row.highlight {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
  border-left: 3px solid #4caf50;
}

.metric-row.highlight .metric-label {
  color: #2e7d32;
}

.metric-row.highlight .metric-value {
  color: #2e7d32;
  font-weight: 700;
}

/* Rating colors */
.rating-excellent {
  background-color: #2e7d32;
}

.rating-good {
  background-color: #689f38;
}

.rating-fair {
  background-color: #ef6c00;
}

.rating-poor {
  background-color: #d84315;
}

.rating-very-poor {
  background-color: #c62828;
}

/* Comparison tables */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 15px;
}

.comparison-table th {
  background-color: #f5f5f5;
  color: #333;
  font-weight: 600;
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid #ddd;
}

.comparison-table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.comparison-table tr.better-option {
  background-color: #e8f5e9;
}

.comparison-table tr.better-option td {
  font-weight: 600;
  color: #2e7d32;
}

/* Savings highlight */
.savings-highlight {
  background-color: #e8f5e9;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  border-left: 5px solid #4caf50;
}

.savings-highlight h4 {
  color: #2e7d32;
  margin-top: 0;
  margin-bottom: 15px;
}

.savings-highlight .metric-row {
  border-bottom-color: #c8e6c9;
}

.savings-highlight .metric-label {
  color: #2e7d32;
}

.savings-highlight .metric-value {
  color: #2e7d32;
  font-weight: 700;
}

/* Program steps */
.program-steps {
  counter-reset: step-counter;
  list-style-type: none;
  padding-left: 0;
}

.program-steps li {
  position: relative;
  padding: 25px 20px 25px 70px;
  margin-bottom: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.program-steps li:before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-color: #1e2a44;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 36px;
  font-weight: bold;
}

.program-steps li strong {
  display: block;
  color: #1e2a44;
  font-size: 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 5px;
}

.program-steps li p {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

/* Success tips */
.success-tips {
  background-color: #fff9c4;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  border-left: 5px solid #fbc02d;
}

.success-tips h4 {
  color: #f57f17;
  margin-top: 0;
}

.success-tips ul {
  padding-left: 20px;
}

.success-tips li {
  margin-bottom: 8px;
}

/* Share link container */
.share-link-container {
  background-color: #e3f2fd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 25px;
  border-left: 4px solid #2196f3;
}

.share-link-container h4 {
  color: #0d47a1;
  margin-top: 0;
  margin-bottom: 10px;
  font-family: "Montserrat", sans-serif;
}

.share-link-box {
  display: flex;
  margin: 15px 0;
}

.share-link-box input {
  flex: 1;
  padding: 10px;
  border: 1px solid #bbdefb;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
}

.share-link-box button {
  background-color: #2196f3;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 14px;
}

.share-link-box button:hover {
  background-color: #1976d2;
}

.share-link-note {
  font-size: 13px;
  color: #555;
  margin-top: 5px;
}

/* Client view specific styles */
.client-view .client-report-section {
  background-color: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
  display: block !important;
}

/* Loading indicator */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
}

/* Logo fallback */
.logo-fallback {
  display: none;
  font-weight: bold;
  font-size: 24px;
  color: #1e2a44;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Further refined print styles to fix page breaks and spacing */
@media print {
  /* Basic page setup */
  @page {
    margin: 0.75cm;
    size: portrait;
  }

  body {
    background-color: white;
    margin: 0;
    padding: 0;
    font-size: 11pt;
    line-height: 1.3;
  }

  /* Container spacing */
  .container,
  .client-report-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px;
    box-shadow: none;
  }

  /* Report header spacing */
  .report-header {
    margin-bottom: 15px;
    padding: 10px;
    box-shadow: none;
    border: none;
    background: none;
  }

  .report-logo {
    max-width: 120px;
  }

  /* Section spacing */
  .report-section {
    margin-bottom: 15px;
    padding: 10px;
    border: none;
    border-left: 2px solid #1e2a44;
    border-radius: 0;
    box-shadow: none;
    page-break-inside: auto; /* Allow content to break across pages */
  }

  .report-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14pt;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
  }

  .subsection {
    margin-bottom: 15px;
  }

  .subsection h4 {
    font-size: 12pt;
    margin-bottom: 8px;
  }

  /* Compact tables */
  .table-container {
    margin: 10px 0;
  }

  table {
    margin-bottom: 8px;
    font-size: 10pt;
  }

  th,
  td {
    padding: 4px 6px;
  }

  /* FICO gauge spacing */
  .fico-gauge-wrapper {
    margin: 15px 0;
  }

  .fico-score {
    margin: 15px auto;
    width: 100px;
    height: 100px;
  }

  .score-number {
    font-size: 28px;
  }

  /* Timeline graph spacing */
  .credit-score-timeline {
    margin: 15px 0;
    padding: 10px;
    border: none;
    background-color: white;
    box-shadow: none;
  }

  .timeline-container {
    margin-top: 15px;
  }

  .timeline-graph {
    height: 200px !important;
    margin-bottom: 50px;
  }

  /* Timeline phases spacing */
  .timeline-phases {
    display: flex !important;
    flex-wrap: wrap;
    margin-top: 20px;
    gap: 5px;
  }

  .timeline-phase {
    flex: 1 1 150px;
    padding: 5px;
    border: none;
    margin-bottom: 5px;
  }

  .timeline-phase h5 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 11pt;
  }

  .timeline-phase p {
    margin: 0;
    font-size: 9pt;
    line-height: 1.2;
  }

  /* Comparison container spacing */
  .comparison-container {
    margin: 10px 0;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
  }

  .comparison-section {
    flex: 1 1 150px;
    margin-bottom: 10px;
  }

  .comparison-section h4 {
    font-size: 11pt;
    margin-bottom: 5px;
  }

  /* Program steps spacing */
  .program-steps-container {
    margin: 10px 0;
  }

  .program-steps {
    padding-left: 20px;
  }

  .program-steps li {
    margin-bottom: 8px;
    font-size: 10pt;
  }

  /* Success tips spacing */
  .success-tips {
    margin-top: 15px;
    padding: 10px;
    border: none;
    border-left: 2px solid #ddd;
  }

  .success-tips h4 {
    font-size: 12pt;
    margin-bottom: 8px;
  }

  .success-tips ol {
    padding-left: 20px;
    margin: 5px 0;
  }

  .success-tips ol li {
    margin-bottom: 5px;
    font-size: 10pt;
  }

  /* Ensure all elements are visible with proper colors */
  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Ensure SVG and markers print properly */
  svg.score-curve {
    height: 200px !important;
  }

  .marker-dot {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Hide elements not needed for print */
  .report-buttons,
  button,
  .share-link-container {
    display: none !important;
  }

  /* Fix for utilization display */
  .utilization-display {
    margin: 10px 0;
  }

  .utilization-scale,
  .utilization-legend {
    font-size: 9pt;
  }

  /* Fix for credit metrics */
  .credit-metrics {
    margin: 10px 0;
  }

  .metric-row {
    padding: 5px 0;
    font-size: 10pt;
  }

  /* Reduce paragraph spacing */
  p {
    margin: 5px 0;
  }

  /* Ensure content flows across pages */
  .report-section,
  .subsection,
  .credit-score-timeline,
  .success-tips {
    page-break-inside: auto;
  }

  /* Prevent orphaned headings */
  h3,
  h4,
  h5 {
    page-break-after: avoid;
  }

  /* Keep small elements together */
  .fico-score,
  .utilization-score,
  .comparison-row {
    page-break-inside: avoid;
  }
}

/* Client view specific styles */
body.client-view header h1 {
  content: "Financial Profile Report";
}

/* Add responsive adjustments */
@media (min-width: 768px) {
  .client-report-section,
  body.client-view .client-report-section {
    padding: 30px;
  }
}

@media (min-width: 992px) {
  .client-report-section,
  body.client-view .client-report-section {
    padding: 35px 40px;
  }
}

@media (min-width: 1200px) {
  body.client-view .container {
    max-width: 1300px;
  }

  .client-report-section,
  body.client-view .client-report-section {
    max-width: 1200px;
  }
}

/* Improve spacing between sections */
#clientReportContent > div:not(:last-child) {
  margin-bottom: 20px;
}

/* Hide the Client Financial Report heading when in client view */
body.client-view .client-report-section h2 {
  display: none;
}

/* Also adjust spacing when the heading is hidden */
body.client-view .client-report-section {
  padding-top: 15px;
}

/* Add Font Awesome for icons */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css");

/* Add these new styles for the enhanced report */

/* Debt summary table */
.debt-summary-table {
  width: 100%;
  margin-bottom: 20px;
  overflow-x: hidden;
}

.debt-summary-table .desktop-table {
  width: 100%;
  border-collapse: collapse;
}

.debt-summary-table th,
.debt-summary-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.debt-summary-table th {
  background-color: #f5f8fa;
  font-weight: 600;
  color: #1e2a44;
}

.debt-summary-table tr:hover {
  background-color: #f9fbfd;
}

/* Mobile Cards */
.mobile-cards {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.mobile-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  width: 100%;
}

.card-label {
  font-size: 12px;
  text-transform: uppercase;
  color: #566573;
  margin-bottom: 4px;
  font-weight: 600;
}

.card-value {
  font-size: 18px;
  color: #1e2a44;
  font-weight: 600;
}

/* Media Query for Mobile */
@media (max-width: 768px) {
  .debt-summary-table .desktop-table {
    display: none;
  }

  .mobile-cards {
    display: flex;
  }
}

.table-note {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-top: 10px;
}

/* Budget grid */
.budget-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}

.budget-item {
  flex: 1;
  min-width: 200px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.budget-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.budget-value {
  font-size: 22px;
  font-weight: 600;
  color: #1e2a44;
}

/* Utilization display */
.utilization-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px 0;
  padding: 25px;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.utilization-score {
  text-align: center;
  margin-bottom: 25px;
  padding: 15px 25px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.score-value {
  font-size: 36px;
  font-weight: 700;
  color: #d32f2f;
}

.score-label {
  font-size: 18px;
  color: #d32f2f;
  font-weight: 600;
}

.utilization-scale {
  display: flex;
  width: 100%;
  max-width: 600px;
  justify-content: space-between;
  margin-top: 10px;
  position: relative;
  height: 50px;
}

.scale-item {
  flex: 1;
  text-align: center;
  padding: 10px 5px;
  font-size: 12px;
  position: relative;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 500;
  transition: all 0.2s ease;
}

.scale-item:first-child {
  border-radius: 4px 0 0 4px;
  background-color: #d32f2f;
}

.scale-item:nth-child(2) {
  background-color: #ff5722;
}

.scale-item:nth-child(3) {
  background-color: #ff9800;
}

.scale-item:nth-child(4) {
  background-color: #8bc34a;
}

.scale-item:last-child {
  border-radius: 0 4px 4px 0;
  background-color: #4caf50;
}

.scale-item.active {
  box-shadow: 0 0 0 3px #1e2a44;
  z-index: 2;
  transform: scale(1.05);
}

/* Credit metrics with improved rating indicators */
.credit-metrics {
  width: 100%;
  margin-top: 30px;
  border-top: 1px solid #e0e0e0;
  padding-top: 20px;
}

.metric-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.metric-label {
  flex: 3;
  font-weight: 600;
  color: #333;
}

.metric-value {
  flex: 1;
  text-align: right;
  font-weight: 700;
  color: #1e2a44;
  padding-right: 15px;
  white-space: nowrap;
}

.metric-rating {
  flex: 0 0 auto;
  text-align: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 80px;
  max-width: 100px;
  color: white;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-left: 10px;
}

.rating-excellent {
  background-color: #2e7d32;
}

.rating-good {
  background-color: #689f38;
}

.rating-fair {
  background-color: #ef6c00;
}

.rating-poor {
  background-color: #d84315;
}

.rating-very-poor {
  background-color: #c62828;
}

/* Add a legend for the utilization scale */
.utilization-legend {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  margin-top: 5px;
}

.legend-item {
  font-size: 11px;
  color: #666;
  text-align: center;
  width: 20%;
}

.legend-item:first-child {
  text-align: left;
}

.legend-item:last-child {
  text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .utilization-scale {
    height: auto;
  }

  .scale-item {
    padding: 8px 4px;
    font-size: 10px;
  }

  .metric-rating {
    font-size: 11px;
    padding: 3px 8px;
    min-width: 60px;
    margin-left: 5px;
  }

  .metric-label {
    flex: 2;
  }
}

/* Comparison container styling */
.comparison-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 25px 0;
}

.comparison-section {
  width: 100%;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.comparison-section h4 {
  color: #1e2a44;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 16px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
}

.comparison-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 4px;
}

.comparison-row.highlight {
  background-color: #e8f5e9;
  border-left: 3px solid #4caf50;
}

.comparison-label {
  flex: 2;
  font-weight: 600;
  color: #333;
}

.comparison-value {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #1e2a44;
  text-align: right;
  margin-right: 5px;
}

.comparison-unit {
  flex: 1;
  color: #666;
  font-size: 14px;
}

.comparison-note {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-top: 20px;
}

/* Savings highlight section */
.savings-highlight {
  background-color: #e8f5e9;
  border-left: 4px solid #4caf50;
  padding: 25px;
  margin: 30px 0;
}

.savings-highlight h3 {
  color: #2e7d32;
  margin-top: 0;
  border-bottom: 1px solid #c8e6c9;
  padding-bottom: 10px;
}

.savings-highlight .metric-row {
  border-bottom: 1px solid #c8e6c9;
}

.savings-highlight .metric-value {
  color: #2e7d32;
  font-size: 24px;
}

/* Program steps styling */
.program-steps-container {
  margin: 25px 0;
}

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

.program-steps li {
  position: relative;
  padding: 20px 20px 20px 70px;
  margin-bottom: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.program-steps li::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-color: #1e2a44;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.program-steps li strong {
  display: block;
  color: #1e2a44;
  font-size: 18px;
  margin-bottom: 5px;
}

.program-steps li p {
  margin: 0;
  color: #555;
}

/* Success tips styling */
.success-tips {
  margin-top: 30px;
  padding: 25px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.success-tips h4 {
  color: #1e2a44;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

.success-tips ol {
  padding-left: 20px;
  margin-bottom: 0;
}

.success-tips li {
  margin-bottom: 10px;
  color: #333;
}

.success-tips li:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments for these sections */
@media (max-width: 768px) {
  .comparison-unit {
    font-size: 12px;
  }

  .savings-highlight .metric-value {
    font-size: 20px;
  }

  .program-steps li {
    padding: 15px 15px 15px 60px;
  }
}

/* FICO Score Gauge */
.fico-score-container {
  margin: 30px 0;
  text-align: center;
}

.fico-score-container h4 {
  margin-bottom: 20px;
}

.fico-gauge-wrapper {
  margin: 20px 0;
}

.fico-scale {
  display: flex;
  width: 100%;
  margin-bottom: 10px;
}

.fico-scale-item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  background-color: #f0f0f0;
  border-right: 1px solid #fff;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  transition: all 0.3s ease;
}

.fico-scale-item:first-child {
  border-radius: 4px 0 0 4px;
}

.fico-scale-item:last-child {
  border-radius: 0 4px 4px 0;
  border-right: none;
}

.fico-scale-item.active {
  background-color: #1e2a44;
  color: white;
}

.fico-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.fico-legend-item {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #666;
}

/* Updated FICO score styling */
.fico-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 0 20px;
}

.score-number {
  font-size: 48px;
  font-weight: 700;
  color: #1e2a44;
  line-height: 1;
  margin-bottom: 5px;
}

/* Print styles for FICO score */
@media print {
  .fico-score {
    margin: 0 0 15px;
  }

  .score-number {
    font-size: 36px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Enhanced Credit Score Timeline styling */
.timeline-graph {
  position: relative;
  height: 300px;
  margin-bottom: 70px;
  margin-left: 35px;
  margin-right: 20px;
  border-left: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

.timeline-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #e0e0e0;
}

.timeline-marker {
  position: absolute;
  transform: translateX(-50%);
  text-align: center;
  width: 80px;
  z-index: 3;
}

.marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #1e2a44;
  margin: 0;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #1e2a44;
  position: absolute;
  left: 50%;
  transform: translate(-50%, 50%);
  bottom: 0;
  z-index: 3;
}

/* Color coding for the marker dots */
.timeline-marker.start .marker-dot {
  background-color: #4caf50;
}

.timeline-marker.dip .marker-dot {
  background-color: #d32f2f;
}

.timeline-marker.recovery .marker-dot {
  background-color: #ff9800;
}

.timeline-marker.completion .marker-dot {
  background-color: #4caf50;
}

.marker-label {
  font-size: 12px;
  font-weight: 600;
  color: #1e2a44;
  margin-top: 30px;
  position: relative;
}

.fico-score-value-chart {
  font-size: 14px;
  font-weight: 700;
  color: #1e2a44;
  margin-top: 2px;
  padding-bottom: 15px;
}

/* Add a container for the labels to help with positioning */
.marker-text {
  position: relative;
  top: 12px;
  padding-bottom: 15px;
}

/* Update the score axis styling to show just a label */
.score-axis {
  position: absolute;
  left: -35px;
  bottom: 0;
  height: 100%;
  width: 30px;
}

/* Remove the existing score-axis-label class and add a new vertical label */
.score-axis-vertical-label {
  display: none;
}

/* Remove the grid lines since we're simplifying */
.timeline-graph::before,
.timeline-graph::after,
.grid-line-60,
.grid-line-80 {
  display: none;
}

/* Month axis styling */
.month-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -40px;
  height: 30px;
}

.month-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  color: #666;
}

.month-axis-label {
  position: absolute;
  bottom: -20px;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 10px;
}

.score-curve {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
}

/* Fix for the score curve positioning */
.score-curve {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
}

/* Add debug grid lines to help visualize the Y-axis positions */
.timeline-graph::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20%;
  height: 1px;
  background-color: rgba(200, 200, 200, 0.3);
  z-index: 1;
}

.timeline-graph::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40%;
  height: 1px;
  background-color: rgba(200, 200, 200, 0.3);
  z-index: 1;
}

/* Add additional grid lines */
.grid-line-60 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 60%;
  height: 1px;
  background-color: rgba(200, 200, 200, 0.3);
  z-index: 1;
}

.grid-line-80 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 80%;
  height: 1px;
  background-color: rgba(200, 200, 200, 0.3);
  z-index: 1;
}

/* Adjust the credit score timeline container to accommodate the taller graph */
.credit-score-timeline {
  margin: 40px 0;
  padding: 25px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.credit-score-timeline h4 {
  color: #1e2a44;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

.timeline-container {
  margin-top: 30px;
}

/* Adjust the timeline phases to align with the taller graph */
.timeline-phases {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}

.timeline-phase {
  flex: 1;
  padding: 0 10px;
  text-align: center;
}

.timeline-phase h5 {
  font-size: 16px;
  color: #1e2a44;
  margin-top: 0;
  margin-bottom: 10px;
}

.timeline-phase p {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.timeline-note {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-top: 20px;
  text-align: center;
}

/* Print-specific fix for FICO gauge marker */
@media print {
  .fico-gauge-marker {
    position: absolute !important;
    display: block !important;
    visibility: visible !important;
    top: -10px !important;
    height: 60px !important;
    width: 20px !important;
    background-color: white !important;
    border: 2px solid #1e2a44 !important;
    z-index: 10 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .fico-gauge {
    position: relative !important;
    display: block !important;
    visibility: visible !important;
    height: 40px !important;
    background: linear-gradient(
      to right,
      #d32f2f 0%,
      /* Very Poor: 300-579 */ #d32f2f 33.3%,
      #ff9800 33.3%,
      /* Fair: 580-669 */ #ff9800 50%,
      #8bc34a 50%,
      /* Good: 670-739 */ #8bc34a 66.7%,
      #4caf50 66.7%,
      /* Very Good: 740-799 */ #4caf50 83.3%,
      #1e88e5 83.3%,
      /* Exceptional: 800-850 */ #1e88e5 100%
    ) !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    margin: 30px 0 40px !important;
    overflow: visible !important;
  }

  .fico-gauge-wrapper {
    position: relative !important;
    display: block !important;
    visibility: visible !important;
    margin: 30px 0 !important;
    page-break-inside: avoid !important;
  }
}

/* Fix for the color-adjust property error */
@media print {
  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .fico-scale-item.active {
    background-color: #1e2a44 !important;
    color: white !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
