/* Report Tokens */
:root {
  --report-font-body: "Source Sans 3", "Inter", sans-serif;
  --report-font-display: "Fraunces", "Inter", serif;

  --report-indigo-50: #EEF2FF;
  --report-indigo-100: #E0E7FF;
  --report-indigo-500: #6366F1;
  --report-indigo-600: #4F46E5;
  --report-indigo-700: #4338CA;
  --report-indigo-800: #3730A3;
  --report-indigo-900: #312E81;

  --report-slate-50: #F8FAFC;
  --report-slate-100: #F1F5F9;
  --report-slate-200: #E2E8F0;
  --report-slate-300: #CBD5E1;
  --report-slate-400: #94A3B8;
  --report-slate-700: #334155;
  --report-slate-800: #1E293B;
  --report-slate-900: #0F172A;

  --report-risk-low: #22c55e;
  --report-risk-medium: #eab308;
  --report-risk-high: #ef4444;

  --report-risk-low-bg: #ECFDF5;
  --report-risk-low-border: #A7F3D0;
  --report-risk-medium-bg: #FFFBEB;
  --report-risk-medium-border: #FDE68A;
  --report-risk-high-bg: #FEF2F2;
  --report-risk-high-border: #FECACA;
  --report-risk-high-light: #F87171;
}

/* Base */
.report-page {
  font-family: var(--report-font-body);
  /* Professional clinical aesthetic - tabular-nums via font feature if needed */
  color: var(--report-slate-700);
  background-color: var(--report-slate-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.report-header {
  background-color: var(--report-indigo-100);
  padding: 1rem 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--report-indigo-200);
  margin-bottom: 2rem;
}

.report-logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.report-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.report-title-text {
  font-family: var(--report-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--report-indigo-900);
}

.report-subtitle {
  font-size: 0.9rem;
  color: var(--report-indigo-700);
}

.report-header-center {
  display: flex;
  justify-content: center;
  width: 100%;
}

.report-title-group {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-header-title {
  text-align: center;
  font-family: var(--report-font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--report-indigo-800);
  margin: 0;
  white-space: nowrap;
}

/* Patient Info Block */
.report-patient-info-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
  font-size: 0.85rem;
}

.patient-info-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.patient-label {
  color: var(--report-slate-400);
  font-weight: 500;
}

.patient-value {
  color: var(--report-slate-900);
}

/* Executive Summary */
.executive-summary {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--report-slate-200);
}

.summary-title {
  font-family: var(--report-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--report-indigo-900);
  margin: 0 0 1rem 0;
}

.summary-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--report-slate-700);
  margin-bottom: 1.5rem;
}

.summary-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-box {
  flex: 1;
  padding: 1.25rem;
  border-radius: 0.5rem;
  text-align: center;
  border: 1px solid var(--report-slate-200);
}

.stat-box.stat-high {
  background-color: var(--report-risk-high-bg);
  border-color: var(--report-risk-high-border);
}

.stat-box.stat-medium {
  background-color: var(--report-risk-medium-bg);
  border-color: var(--report-risk-medium-border);
}

.stat-box.stat-low {
  background-color: var(--report-risk-low-bg);
  border-color: var(--report-risk-low-border);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-high .stat-number {
  color: var(--report-risk-high);
}

.stat-medium .stat-number {
  color: var(--report-risk-medium);
}

.stat-low .stat-number {
  color: var(--report-risk-low);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--report-slate-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-conditions {
  margin-top: 1.5rem;
}

.conditions-heading {
  font-family: var(--report-font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--report-slate-800);
  margin-bottom: 1rem;
}

.conditions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.conditions-table th,
.conditions-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--report-slate-200);
}

.conditions-table th {
  background-color: var(--report-slate-50);
  font-weight: 600;
  color: var(--report-slate-700);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.conditions-table tbody tr:hover {
  background-color: var(--report-slate-50);
}

.risk-value {
  font-weight: 600;
  font-feature-settings: 'tnum' 1;
}

.risk-value.high {
  color: var(--report-risk-high);
}

.risk-value.medium {
  color: var(--report-risk-medium);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.high {
  background-color: var(--report-risk-high-bg);
  color: var(--report-risk-high);
}

.status-badge.medium {
  background-color: var(--report-risk-medium-bg);
  color: var(--report-risk-medium);
}

.status-badge.low {
  background-color: var(--report-risk-low-bg);
  color: var(--report-risk-low);
}

/* Disclaimer Section */
.report-disclaimer {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--report-slate-50);
  border-radius: 0.5rem;
  border: 1px solid var(--report-slate-200);
  margin-bottom: 4rem;
}

.disclaimer-heading {
  font-family: var(--report-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--report-slate-800);
  margin: 0 0 0.75rem 0;
}

.disclaimer-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--report-slate-600);
  margin: 0 0 0.75rem 0;
}

.disclaimer-text:last-child {
  margin-bottom: 0;
}

.btn-download-pdf {
  background-color: transparent;
  color: var(--report-indigo-500);
  border: 1px solid var(--report-indigo-200);
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-download-pdf:hover {
  background-color: var(--report-indigo-50);
  border-color: var(--report-indigo-500);
  color: var(--report-indigo-600);
}

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

/* Layout */
.report-container {
  display: flex;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.report-main {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}


.report-dashboard-spacer {
  margin: 1.5rem 0;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--report-indigo-700);
  margin-bottom: 0.35rem;
}

.hero-title {
  margin: 0;
  font-family: var(--report-font-display);
  font-size: 2rem;
  color: var(--report-indigo-900);
}

.hero-subtitle {
  margin: 0.5rem 0 0;
  color: var(--report-slate-700);
}


/* Dashboard */
.dashboard-grid {
  display: grid;
  gap: 2rem;
}

.risk-priority-section {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.section-header {
  font-family: var(--report-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--report-slate-800);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.risk-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.risk-badge.high {
  background-color: var(--report-risk-high-bg);
  color: var(--report-risk-high);
  border: 1px solid var(--report-risk-high-border);
}

.risk-badge.medium {
  background-color: var(--report-risk-medium-bg);
  color: var(--report-risk-medium);
  border: 1px solid var(--report-risk-medium-border);
}

.risk-badge.low {
  background-color: var(--report-risk-low-bg);
  color: var(--report-risk-low);
  border: 1px solid var(--report-risk-low-border);
}

.disease-card {
  display: grid;
  /* fr units share remaining space, auto sizes to content */
  grid-template-columns: 2fr 1.5fr minmax(70px, 1fr) minmax(70px, 1fr) minmax(80px, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--report-slate-100);
  transition: all 0.2s ease;
  cursor: pointer;

  /* Soft UI */
  background-color: white;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
}

.disease-card:hover {
  background-color: var(--report-slate-50);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--report-slate-200);
  transform: translateY(-1px);
}

.disease-name {
  font-weight: 600;
  color: var(--report-slate-800);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--report-slate-500);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.view-details-link {
  margin-left: auto;
  color: var(--report-indigo-500);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

.metric-column {
  text-align: center;
  justify-self: center;
}

.metric-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.metric-value-small {
  font-size: 0.9rem;
}

.metric-value.high {
  color: var(--report-risk-high);
}

.metric-value.medium {
  color: var(--report-risk-medium);
}

.metric-value.low {
  color: var(--report-risk-low);
}

.metric-value.neutral {
  color: var(--report-slate-500);
}

/* Updated Sparkline Styles */
.sparkline-container {
  height: 14px;
  background-color: var(--report-slate-100);
  /* Lighter track */
  border-radius: 4px;
  position: relative;
  width: 100%;
  /* overflow: hidden; - Removed to allow marker to stick out if needed, but safer to keep if marker is inside */
  overflow: visible;
}

.sparkline-bar {
  height: 100%;
  border-radius: 4px;
  position: absolute;
  left: 0;
  top: 0;
}

.sparkline-bar.protective {
  background-color: var(--report-risk-low);
}

.sparkline-bar.high {
  background-color: var(--report-risk-high);
}

.sparkline-bar.medium {
  background-color: var(--report-risk-medium);
}

.sparkline-bar.low,
.sparkline-bar.neutral {
  background-color: var(--report-indigo-500);
}

.sparkline-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background-color: var(--report-slate-900);
  z-index: 10;
  /* Force on top */
  box-shadow: 0 0 0 1px white;
  /* White outline to separate from bar */
}

/* Detail View */
.detail-header {
  margin-bottom: 2rem;
}

.detail-title {
  font-family: var(--report-font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--report-slate-900);
  margin-bottom: 0.5rem;
}

.risk-comparison-container {
  display: flex;
  gap: 2rem;
  /* Reduced gap slightly */
  margin-bottom: 3rem;
  align-items: flex-end;
  justify-content: space-between;
  /* Space out the columns and the grid */
}

.risk-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100px;
}


.risk-bar-track {
  width: 60px;
  height: 200px;
  position: relative;
  background: none;
  border: none;
  overflow: visible;
}

.risk-bar-track::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--report-slate-50);
  border: 1px solid var(--report-slate-200);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.risk-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--report-slate-400);
  min-height: 6px;
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px 12px 0 0;
  z-index: 1;
}

.risk-bar-fill.your-risk {
  background: linear-gradient(to top, var(--report-indigo-600), var(--report-indigo-500));
}

.risk-bar-fill.your-risk.high {
  background: linear-gradient(to top, var(--report-risk-high), var(--report-risk-high-light));
}

.risk-bar-label {
  text-align: center;
  font-weight: 600;
  color: var(--report-slate-700);
}

.risk-bar-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

/* Connector Badge */
.risk-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  /* Align to bottom where bars start? Or middle? Using flex-end to sit near bars */
  height: 200px;
  /* Match bar track height approx */
  padding-bottom: 50px;
  /* Offset from bottom */
  width: 60px;
}

.connector-line {
  width: 2px;
  height: 40px;
  background-color: var(--report-slate-300);
  margin-bottom: 0.5rem;
  display: none;
  /* Hide line for now, just show badge */
}

.connector-badge {
  background-color: var(--report-slate-100);
  color: var(--report-slate-700);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.connector-badge.high {
  background-color: var(--report-risk-high-bg);
  color: var(--report-risk-high);
}

.connector-badge.low {
  background-color: var(--report-risk-low-bg);
  color: var(--report-risk-low);
}

/* Updated Isotype Grid */
.isotype-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  /* 10x10 */
  gap: 6px;
  /* Breathable space */
  max-width: 300px;
  /* Constrain width */
  margin: 0 auto;
}

.person-icon {
  width: 100%;
  aspect-ratio: 1/1;
  background-color: var(--report-slate-200);
  border-radius: 50%;
  transition: all 0.3s ease;
  /* Animate dots */
}

.person-icon.active {
  background-color: var(--report-indigo-600);
}

.person-icon.active.high {
  background-color: var(--report-risk-high);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-icon {
  width: 12px;
  height: 12px;
  min-width: 12px;
  border-radius: 50%;
}

.isotype-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  margin-top: 1rem;
  color: var(--report-slate-500);
}

.isotype-side {
  margin-left: auto;
}

.isotype-heading {
  margin-bottom: 1rem;
  font-family: var(--report-font-display);
  font-weight: 600;
}

.comparison-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.detail-text-content {
  margin-top: 2.5rem;
  max-width: 800px;
}

.detail-text-content h3 {
  font-family: var(--report-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--report-indigo-900);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-text-content p {
  color: var(--report-slate-700);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.recommendations-heading {
  margin-top: 2rem;
  font-family: var(--report-font-display);
  color: var(--report-indigo-900);
}

/* Detail View Styling */
.detail-view-container {
  padding-bottom: 6rem;
}

.recommendation-list {
  list-style: none !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.recommendation-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: transparent;
  /* Cleaner look */
  padding: 0;
  border: none;
  box-shadow: none;
}

/* Add specific styling for the icon container if needed */
.recommendation-icon-wrapper {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  /* Align with text baseline */
}

.check-circle {
  /* Replaced with SVG in rust, but keeping class for reference if needed */
  display: none;
}

/* Ensure badges don't wrap */
.risk-badge,
.status-badge,
.connector-badge {
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--report-indigo-600);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1rem;
  background: none;
  border: none;
  font-size: 1rem;
}

.btn-back:hover {
  text-decoration: underline;
}

.age-slider-container {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--report-slate-50);
  border-radius: 0.5rem;
}

input[type=range] {
  width: 100%;
}


/* Percentage utility classes to avoid inline styles */
.pct-h,
.pct-w,
.pct-left {
  --pct-tens: 0%;
  --pct-ones: 0%;
  --pct-tenth: 0%;
}

.pct-h {
  height: calc(var(--pct-tens) + var(--pct-ones) + var(--pct-tenth));
}

.pct-w {
  width: calc(var(--pct-tens) + var(--pct-ones) + var(--pct-tenth));
}

.pct-left {
  left: calc(var(--pct-tens) + var(--pct-ones) + var(--pct-tenth));
}

.pct-h.pct-100 {
  height: 100%;
}

.pct-w.pct-100 {
  width: 100%;
}

.pct-left.pct-100 {
  left: 100%;
}

.pct-tens-0 {
  --pct-tens: 0%;
}

.pct-tens-10 {
  --pct-tens: 10%;
}

.pct-tens-20 {
  --pct-tens: 20%;
}

.pct-tens-30 {
  --pct-tens: 30%;
}

.pct-tens-40 {
  --pct-tens: 40%;
}

.pct-tens-50 {
  --pct-tens: 50%;
}

.pct-tens-60 {
  --pct-tens: 60%;
}

.pct-tens-70 {
  --pct-tens: 70%;
}

.pct-tens-80 {
  --pct-tens: 80%;
}

.pct-tens-90 {
  --pct-tens: 90%;
}

.pct-ones-0 {
  --pct-ones: 0%;
}

.pct-ones-1 {
  --pct-ones: 1%;
}

.pct-ones-2 {
  --pct-ones: 2%;
}

.pct-ones-3 {
  --pct-ones: 3%;
}

.pct-ones-4 {
  --pct-ones: 4%;
}

.pct-ones-5 {
  --pct-ones: 5%;
}

.pct-ones-6 {
  --pct-ones: 6%;
}

.pct-ones-7 {
  --pct-ones: 7%;
}

.pct-ones-8 {
  --pct-ones: 8%;
}

.pct-ones-9 {
  --pct-ones: 9%;
}

.pct-tenth-0 {
  --pct-tenth: 0%;
}

.pct-tenth-1 {
  --pct-tenth: 0.1%;
}

.pct-tenth-2 {
  --pct-tenth: 0.2%;
}

.pct-tenth-3 {
  --pct-tenth: 0.3%;
}

.pct-tenth-4 {
  --pct-tenth: 0.4%;
}

.pct-tenth-5 {
  --pct-tenth: 0.5%;
}

.pct-tenth-6 {
  --pct-tenth: 0.6%;
}

.pct-tenth-7 {
  --pct-tenth: 0.7%;
}

.pct-tenth-8 {
  --pct-tenth: 0.8%;
}

.pct-tenth-9 {
  --pct-tenth: 0.9%;
}

/* Print Styles */
@media print {
  @page {
    size: A4;
    margin: 1.5cm 1.5cm 2cm 1.5cm;
  }

  /* Global Print Resets */
  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background-color: white !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  /* Hide Navigation and Footer explicitly */
  nav,
  .nav-custom,
  footer,
  .footer,
  .btn-download-pdf,
  .btn-back,
  .view-details-link {
    display: none !important;
  }

  .report-page {
    background-color: white !important;
    min-height: auto;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    font-size: 11pt;
  }

  /* Header for print */
  .report-header {
    background-color: white !important;
    border-bottom: 2px solid var(--report-indigo-600);
    padding: 0.75rem 0 1rem 0;
    margin-bottom: 1.5rem;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-start;
    position: static;
    width: 100%;
    box-sizing: border-box;
  }

  .report-logo-area {
    justify-self: start;
  }

  .report-header-center {
    justify-self: center;
    text-align: center;
  }

  .report-patient-info-block {
    justify-self: end;
  }

  .report-patient-info-block {
    font-size: 9pt;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    justify-content: flex-end;
  }

  .patient-info-row {
    display: inline-flex;
    white-space: nowrap;
  }

  /* Executive Summary for print */
  .executive-summary {
    box-shadow: none;
    border: 2px solid var(--report-indigo-200);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .summary-title {
    font-size: 14pt;
    margin-bottom: 0.75rem;
  }

  .summary-intro {
    font-size: 10pt;
    margin-bottom: 1rem;
  }

  .summary-stats {
    gap: 1rem;
    margin-bottom: 1.25rem;
  }

  .stat-box {
    padding: 0.75rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 8pt;
  }

  .conditions-table {
    font-size: 9pt;
  }

  .conditions-table th,
  .conditions-table td {
    padding: 0.5rem 0.75rem;
  }

  .conditions-table tbody tr:hover {
    background-color: transparent;
  }



  /* Ensure sparklines don't overflow */
  .sparkline-container {
    width: 100%;
    max-width: 100%;
  }

  /* Force logo circle to print nicely */
  .report-logo-circle {
    box-shadow: none;
    border: 1px solid var(--report-indigo-300);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-container {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  .report-main {
    padding: 0 !important;
    overflow-y: visible;
  }

  /* Adjustments for print layout */
  .dashboard-grid {
    gap: 2rem;
    display: block;
  }

  .risk-priority-section {
    box-shadow: none;
    border: 1px solid var(--report-slate-200);
    break-inside: avoid;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: transparent;
  }

  .disease-card {
    border-bottom: 1px solid var(--report-slate-200);
    padding: 0.75rem 0.5rem;
    margin-bottom: 0;
    background-color: transparent;
    box-shadow: none;
    break-inside: avoid;
    /* Print grid: 5 columns (link hidden), fixed percentages */
    grid-template-columns: 35% 25% 13% 13% 14%;
  }

  /* Hide the action link in print */
  .view-details-link {
    display: none !important;
  }

  .disease-card:hover {
    background-color: transparent;
    box-shadow: none;
    transform: none;
  }

  /* Reset other container widths */
  .report-container,
  .report-main,
  .dashboard-grid,
  .risk-priority-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .risk-priority-section {
    margin-bottom: 2rem !important;
    border: 1px solid #e2e8f0 !important;
    /* Restore border for sections */
    padding: 1.5rem !important;
    border-radius: 8px !important;
  }

  /* Adjust internal elements */
  .metric-column,
  .sparkline-container {
    width: 100% !important;
  }

  .metric-value,
  .risk-badge {
    white-space: nowrap;
  }

  .report-logo-circle {
    box-shadow: none;
    border: 1px solid var(--report-indigo-300);
  }

  /* Ensure detail view prints nicely */
  .detail-header {
    margin-bottom: 1.5rem;
    break-after: avoid;
  }

  .comparison-card {
    box-shadow: none;
    border: 1px solid var(--report-slate-200);
    padding: 1.5rem;
    break-inside: avoid;
  }

  .detail-text-content {
    margin-top: 1.5rem;
  }

  h3 {
    break-after: avoid;
  }

  p {
    break-inside: avoid;
  }

  /* Dashboard grid spacing */
  .dashboard-grid {
    margin-top: 2rem !important;
  }

  /* Disclaimer for print */
  .report-disclaimer {
    margin-top: 2rem !important;
    padding: 1rem !important;
    border: 1px solid var(--report-slate-200) !important;
    background-color: var(--report-slate-50) !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .disclaimer-heading {
    font-size: 10pt;
    margin-bottom: 0.5rem;
  }

  .recommendation-item {
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
    break-inside: avoid;
  }

  .detail-view-container {
    padding-bottom: 0;
  }

  .disclaimer-text {
    font-size: 9pt;
    margin-bottom: 0.5rem;
  }
}
