/* ============================================================
   TOOLSPOT — DIABETES RISK CALCULATOR STYLESHEET
   ============================================================ */

/* ── MODE & SEX TABS (Glassmorphic) ── */
.mode-toggle {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.mode-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.06) 100%);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 8px;
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), background 0.28s, border-color 0.28s;
  z-index: 0;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Unit Toggle (2 choices) */
#unit-toggle.mode-toggle::before {
  width: calc(50% - 6px);
}
#unit-toggle.mode-toggle.active-metric::before {
  transform: translateX(0);
}
#unit-toggle.mode-toggle.active-imperial::before {
  transform: translateX(calc(100% + 4px));
}

/* Standard Toggle (2 choices) */
#standard-toggle.mode-toggle::before {
  width: calc(50% - 6px);
}
#standard-toggle.mode-toggle.active-ada::before {
  transform: translateX(0);
}
#standard-toggle.mode-toggle.active-findrisc::before {
  transform: translateX(calc(100% + 4px));
}

/* Sex Toggle (2 choices) */
#sex-toggle.mode-toggle::before {
  width: calc(50% - 6px);
}
#sex-toggle.mode-toggle.active-male::before {
  transform: translateX(0);
}
#sex-toggle.mode-toggle.active-female::before {
  transform: translateX(calc(100% + 4px));
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0.06) 100%);
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.mode-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  background: transparent !important;
  border: none;
  padding: 10px 16px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: none !important;
  transition: color 0.28s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mode-btn:hover {
  color: var(--text);
}

.mode-btn.active {
  color: #ff9f43 !important;
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

#sex-toggle.active-female .mode-btn.active {
  color: #f472b6 !important;
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.mode-btn:active {
  transform: scale(0.97);
}

/* Light mode overrides for toggles */
body.light .mode-toggle {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

body.light .mode-toggle::before {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.12) 0%, rgba(234, 88, 12, 0.04) 100%);
  border-color: rgba(234, 88, 12, 0.25);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

body.light #sex-toggle.mode-toggle.active-female::before {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(236, 72, 153, 0.04) 100%);
  border-color: rgba(236, 72, 153, 0.25);
}

body.light .mode-btn {
  color: #556b82;
}

body.light .mode-btn:hover {
  color: #0f172a;
}

body.light .mode-btn.active {
  color: #ea580c !important;
  text-shadow: none;
}

body.light #sex-toggle.active-female .mode-btn.active {
  color: #db2777 !important;
}

/* ── FORM ELEMENTS Refinement ── */
.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.input-header label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.input-header .inp-box {
  width: 110px;
  height: 32px;
  border-radius: 8px;
}

.input-header .inp-box input {
  padding: 6px 10px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
}

.input-header .inp-box .inp-suf {
  padding-right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.slider-wrap {
  width: 100%;
  margin-top: 6px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
}

/* ── CUSTOM SLIDERS ── */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--red) 0%, var(--red) var(--fill, 50%), 
    rgba(255, 255, 255, 0.1) var(--fill, 50%), rgba(255, 255, 255, 0.1) 100%);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 3px solid var(--red);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #fff;
  border: 3px solid var(--red);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

body.light .range-slider {
  background: linear-gradient(to right, #ea580c 0%, #ea580c var(--fill, 50%), 
    rgba(15, 23, 42, 0.08) var(--fill, 50%), rgba(15, 23, 42, 0.08) 100%);
}

body.light .range-slider::-webkit-slider-thumb {
  border-color: #ea580c;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1), 0 2px 6px rgba(0, 0, 0, 0.1);
}

body.light .range-slider::-moz-range-thumb {
  border-color: #ea580c;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1);
}

/* ── CUSTOM CHECKBOXES ── */
.checkbox-container {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-checkmark {
  position: absolute;
  top: 2px;
  left: 0;
  height: 18px;
  width: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkbox-checkmark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.checkbox-container input:checked ~ .checkbox-checkmark {
  background: var(--red-soft);
  border-color: var(--red);
}

.checkbox-checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkbox-checkmark::after {
  display: block;
}

/* Custom checkbox focus states for A11y */
.checkbox-container input:focus-visible ~ .checkbox-checkmark {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Pink theme checkboxes for Gestational Diabetes panel */
#gestational-panel input:checked ~ .checkbox-checkmark {
  background: rgba(244, 114, 182, 0.15);
  border-color: #f472b6;
}

#gestational-panel input:focus-visible ~ .checkbox-checkmark {
  outline-color: #f472b6;
}

/* Blue theme checkboxes for Type 1 / LADA panel */
.lifestyle-options input[id^="t1-"]:checked ~ .checkbox-checkmark {
  background: rgba(96, 165, 250, 0.15);
  border-color: #60a5fa;
}

.lifestyle-options input[id^="t1-"]:focus-visible ~ .checkbox-checkmark {
  outline-color: #60a5fa;
}
/* Disabled checkbox styles */
.checkbox-container:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkbox-container:has(input:disabled) .checkbox-checkmark {
  cursor: not-allowed;
}

/* Light mode overrides for checkboxes */
body.light .checkbox-checkmark {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.25);
}

body.light .checkbox-container {
  color: #334155;
}

body.light .checkbox-container:hover input ~ .checkbox-checkmark {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.45);
}

body.light .checkbox-container input:checked ~ .checkbox-checkmark {
  background: #ea580c;
  border-color: #ea580c;
}

body.light #gestational-panel input:checked ~ .checkbox-checkmark {
  background: #db2777;
  border-color: #db2777;
}

body.light .lifestyle-options input[id^="t1-"]:checked ~ .checkbox-checkmark {
  background: #2563eb;
  border-color: #2563eb;
}

/* ── ANALYSIS & OUTCOME HERO ── */
.result-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.result-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

.risk-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Risk badge levels color presets */
.risk-low { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399; }
.risk-elevated { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: #fbbf24; }
.risk-moderate { background: rgba(249, 115, 22, 0.15); border: 1px solid rgba(249, 115, 22, 0.3); color: #fb923c; }
.risk-high { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; }
.risk-veryhigh { background: rgba(220, 38, 38, 0.2); border: 1px solid rgba(220, 38, 38, 0.4); color: #f87171; text-shadow: 0 0 8px rgba(220, 38, 38, 0.4); }

body.light .risk-low { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: #059669; }
body.light .risk-elevated { background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.2); color: #b45309; }
body.light .risk-moderate { background: rgba(234, 88, 12, 0.1); border-color: rgba(234, 88, 12, 0.2); color: #c2410c; }
body.light .risk-high { background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.2); color: #b91c1c; }
body.light .risk-veryhigh { background: rgba(185, 28, 28, 0.1); border-color: rgba(185, 28, 28, 0.25); color: #7f1d1d; }

.result-val {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  margin: 6px 0;
  letter-spacing: -0.5px;
}

.sys-dia-unit {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 500;
}

.result-subtitle {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ── SVG RISK CHART SPEEDOMETER ── */
.zone-map-wrap {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.zone-map-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.chart-container {
  width: 100%;
}

#risk-svg-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

#pointer-group {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#scale-axis-ticks text {
  fill: var(--text-3);
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
}

body.light .zone-map-wrap {
  background: rgba(15, 23, 42, 0.01);
  border-color: rgba(15, 23, 42, 0.05);
  box-shadow: none;
}

body.light #scale-axis-ticks text {
  fill: #64748b;
}

/* ── DYNAMIC OUTCOME SUB-PANELS ── */

/* Gestational panel (GDM) */
.gdm-outcome-box {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.08) 0%, rgba(244, 114, 182, 0.02) 100%);
  border: 1px solid rgba(244, 114, 182, 0.15);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
}

.gdm-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gdm-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #f472b6;
  letter-spacing: 0.5px;
}

.gdm-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gdm-badge.gdm-low { background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399; }
.gdm-badge.gdm-moderate { background: rgba(249, 115, 22, 0.2); border: 1px solid rgba(249, 115, 22, 0.3); color: #fb923c; }
.gdm-badge.gdm-high { background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.4); color: #f87171; }

.gdm-score-text {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.gdm-desc-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}

body.light .gdm-outcome-box {
  background: rgba(219, 39, 119, 0.03);
  border-color: rgba(219, 39, 119, 0.15);
}

body.light .gdm-badge.gdm-low { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.15); color: #059669; }
body.light .gdm-badge.gdm-moderate { background: rgba(234, 88, 12, 0.08); border-color: rgba(234, 88, 12, 0.15); color: #c2410c; }
body.light .gdm-badge.gdm-high { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.2); color: #b91c1c; }

/* Autoimmune Alert panel (T1 / LADA) */
.t1-alert-box {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08) 0%, rgba(96, 165, 250, 0.02) 100%);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.t1-alert-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.t1-alert-header svg {
  flex-shrink: 0;
}

.t1-alert-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}

body.light .t1-alert-box {
  background: rgba(37, 99, 235, 0.03);
  border-color: rgba(37, 99, 235, 0.15);
}

body.light .t1-alert-header {
  color: #2563eb;
}

/* ── HISTORY LOGS & EXPORTS ── */
.history-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
}

.history-average-card {
  font-size: 13px;
  color: var(--text-2);
}

.history-average-card b {
  color: var(--text);
}

.history-actions {
  display: flex;
  gap: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.history-table th, 
.history-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-table th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 700;
  color: var(--text-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.history-table td {
  color: var(--text-2);
}

.history-table td strong {
  color: var(--text);
}

.cell-val {
  line-height: 1.4;
}

.cell-val span {
  display: block;
  font-size: 11px;
  color: var(--text-3);
}

.delete-entry-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.delete-entry-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

body.light .table-wrap {
  border-color: rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

body.light .history-table th {
  background: rgba(15, 23, 42, 0.02);
  color: #64748b;
}

body.light .history-table td {
  border-bottom-color: rgba(15, 23, 42, 0.06);
  color: #475569;
}

body.light .history-table td strong {
  color: #0f172a;
}

body.light .history-average-card b {
  color: #0f172a;
}

/* ── MOBILE CARD COLLAPSE FOR LOG TABLE ── */
@media (max-width: 768px) {
  .table-wrap {
    background: transparent !important;
    border: none !important;
    overflow-x: visible !important;
  }
  
  .history-table, 
  .history-table tbody, 
  .history-table tr, 
  .history-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  .history-table thead {
    display: none !important;
  }
  
  .history-table tr {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  body.light .history-table tr {
    background: rgba(0, 0, 0, 0.015) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
  }
  
  .history-table td {
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: right !important;
  }
  
  .history-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    margin-right: 12px;
  }
  
  .cell-val {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    text-align: right !important;
    gap: 2px !important;
  }
  
  .history-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .history-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .history-actions button {
    flex: 1;
    text-align: center;
  }
}
/* Screen default for print-only header */
.print-only-header {
  display: none !important;
}

/* Increase Patient Parameters panel width on desktop screens */
@media (min-width: 1025px) {
  .tool-layout {
    grid-template-columns: 1fr 540px;
  }
}

/* ════════ MEDIA PRINT (PDF EXPORTS) ════════ */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  .bg-scene, 
  nav, 
  footer, 
  .cookie-banner, 
  .share-pill, 
  #toast-container, 
  .tool-left, 
  .history-actions, 
  .delete-entry-btn,
  #tool-faq,
  .explanatory-content,
  .breadcrumb,
  .tool-header,
  #add-log-btn,
  .history-log-panel .panel-title,
  .history-table th:last-child,
  .history-table td:last-child,
  .simulator-panel {
    display: none !important;
  }
  
  /* Show print-only header */
  .print-only-header {
    display: block !important;
    margin-bottom: 16px;
  }
  .print-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    border-bottom: 1.5px solid #000000;
    padding-bottom: 4px;
  }
  .print-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #000000 !important;
  }
  .print-logo-text span {
    color: #f97316 !important;
  }
  .print-report-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555555 !important;
    letter-spacing: 0.5px;
  }
  .print-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #000000 !important;
    margin: 10px 0 8px;
    letter-spacing: -0.5px;
  }
  .print-meta-grid {
    display: flex;
    gap: 20px;
    font-size: 11px;
    color: #222222 !important;
    background: #f8f9fa !important;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 12px;
  }
  .print-divider {
    height: 1px;
    background: #e9ecef;
    margin-bottom: 16px;
  }

  .container {
    max-width: 100% !important;
    padding: 24px !important;
    margin: 0 auto !important;
  }
  .tool-layout {
    display: block !important;
  }
  .tool-right {
    width: 100% !important;
  }
  
  .panel {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
    box-shadow: none !important;
  }

  /* Grid layout for single-page print layout */
  .result-panel {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }
  .panel-title {
    display: none !important;
  }

  /* Staging Hero Card Print Style - Clean card with colored left indicator bar */
  .result-hero {
    grid-column: 1 / -1 !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-left: 6px solid #cccccc !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .result-hero.risk-low { border-left-color: #10b981 !important; }
  .result-hero.risk-elevated { border-left-color: #f59e0b !important; }
  .result-hero.risk-moderate { border-left-color: #f97316 !important; }
  .result-hero.risk-high { border-left-color: #ef4444 !important; }
  .result-hero.risk-veryhigh { border-left-color: #dc2626 !important; }

  .result-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }
  .result-label {
    color: #555555 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }
  
  /* Risk staging badges in print */
  .risk-badge {
    color: #ffffff !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    border: none !important;
    text-shadow: none !important;
  }
  .risk-badge.risk-low { background-color: #10b981 !important; }
  .risk-badge.risk-elevated { background-color: #f59e0b !important; }
  .risk-badge.risk-moderate { background-color: #f97316 !important; }
  .risk-badge.risk-high { background-color: #ef4444 !important; }
  .risk-badge.risk-veryhigh { background-color: #dc2626 !important; }

  .result-val {
    color: #000000 !important;
    font-size: 30px !important;
    font-weight: 800 !important;
    margin: 4px 0 !important;
    font-family: 'Outfit', sans-serif !important;
  }
  .sys-dia-unit {
    color: #555555 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
  }
  .result-subtitle {
    color: #333333 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
  
  /* Left column: SVG training zone map */
  .zone-map-wrap {
    grid-column: 1 / -1 !important;
    border: 1px solid #dee2e6 !important;
    background: #ffffff !important;
    padding: 14px !important;
    margin-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    border-radius: 12px !important;
    page-break-inside: avoid;
  }
  .result-panel.has-gdm .zone-map-wrap {
    grid-column: 1 !important;
  }

  .gdm-outcome-box {
    grid-column: 2 !important;
    border: 1px solid #f472b6 !important;
    background: #fff5f7 !important;
    padding: 14px !important;
    margin-bottom: 0 !important;
    border-radius: 12px !important;
    page-break-inside: avoid;
  }

  .gdm-label {
    color: #db2777 !important;
  }

  .gdm-desc-text {
    color: #333333 !important;
  }

  .t1-alert-box {
    grid-column: 1 / -1 !important;
    border: 1.5px solid #2563eb !important;
    background: #eff6ff !important;
    color: #1e3a8a !important;
    padding: 14px !important;
    border-radius: 12px !important;
    page-break-inside: avoid;
  }

  .t1-alert-header {
    color: #1d4ed8 !important;
  }

  .t1-alert-desc {
    color: #1e293b !important;
  }

  /* History Log table print formatting */
  .history-log-panel {
    margin-top: 24px !important;
    page-break-before: auto !important;
  }

  .table-wrap {
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
  }

  .history-table th {
    background: #f1f3f5 !important;
    color: #000000 !important;
    border-bottom: 2px solid #dee2e6 !important;
  }

  .history-table td {
    color: #222222 !important;
    border-bottom: 1px solid #dee2e6 !important;
  }

  .history-table td strong {
    color: #000000 !important;
  }

  /* Print formatting for WHtR */
  .whtr-outcome-box {
    grid-column: 1 / -1 !important;
    border: 1px solid #dee2e6 !important;
    background: #f8f9fa !important;
    padding: 14px !important;
    margin-bottom: 0 !important;
    border-radius: 12px !important;
    page-break-inside: avoid;
  }
  .whtr-label {
    color: #059669 !important;
  }
  .whtr-desc-text {
    color: #333333 !important;
  }
  .whtr-badge {
    color: #ffffff !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    border: none !important;
  }
  .whtr-badge.whtr-healthy { background-color: #10b981 !important; }
  .whtr-badge.whtr-slim { background-color: #3b82f6 !important; }
  .whtr-badge.whtr-overweight { background-color: #f59e0b !important; }
  .whtr-badge.whtr-obese { background-color: #ef4444 !important; }

  /* SVG Axis scale tick text and pointer styles */
  .zone-map-title {
    color: #555555 !important;
  }
  #scale-axis-ticks text {
    fill: #555555 !important;
  }
  #pointer-group polygon {
    fill: #000000 !important;
  }
  #pointer-group circle {
    stroke: #000000 !important;
  }
  #pointer-label {
    fill: #000000 !important;
  }

  /* Visceral fat ratio value */
  .whtr-val-text {
    color: #000000 !important;
  }

  /* Gestational diabetes outcome value and badge */
  .gdm-score-text {
    color: #000000 !important;
  }
  .gdm-badge {
    color: #ffffff !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    border: none !important;
  }
  .gdm-badge.gdm-low { background-color: #10b981 !important; }
  .gdm-badge.gdm-moderate { background-color: #f59e0b !important; }
  .gdm-badge.gdm-high { background-color: #ef4444 !important; }

  /* History average card print formatting */
  .history-average-card {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-left: 4px solid #f97316 !important;
    border-radius: 10px !important;
    color: #222222 !important;
    padding: 8px 14px !important;
    margin-bottom: 12px !important;
  }
  .history-average-card b {
    color: #000000 !important;
  }

  /* BMI category/index text in history table */
  .cell-val span {
    color: #555555 !important;
  }

  /* Medical Disclaimer Print Styling */
  #tool-disclaimer {
    display: block !important;
    margin-bottom: 16px !important;
    page-break-inside: avoid !important;
  }
  #tool-disclaimer .sec-banner {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-left: 4px solid #ef4444 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    color: #333333 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    box-shadow: none !important;
    animation: none !important;
    text-shadow: none !important;
  }
  #tool-disclaimer .sec-banner svg {
    stroke: #ef4444 !important;
    fill: none !important;
    flex-shrink: 0 !important;
    margin-top: 1px !important;
    width: 14px !important;
    height: 14px !important;
  }
  #tool-disclaimer .sec-banner span {
    color: #333333 !important;
  }
  #tool-disclaimer .sec-banner strong {
    color: #dc2626 !important;
    font-weight: 700 !important;
  }
}

/* ── WHtR OUTCOME BOX ── */
.whtr-outcome-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.01) 100%);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
}

.whtr-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.whtr-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #10b981;
  letter-spacing: 0.5px;
}

.whtr-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.whtr-badge.whtr-healthy { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399; }
.whtr-badge.whtr-slim { background: rgba(96, 165, 250, 0.15); border: 1px solid rgba(96, 165, 250, 0.3); color: #60a5fa; }
.whtr-badge.whtr-overweight { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: #fbbf24; }
.whtr-badge.whtr-obese { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; }

.whtr-val-text {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.whtr-desc-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}

body.light .whtr-outcome-box {
  background: rgba(16, 185, 129, 0.02);
  border-color: rgba(16, 185, 129, 0.15);
}

body.light .whtr-badge.whtr-healthy { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.15); color: #059669; }
body.light .whtr-badge.whtr-slim { background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.15); color: #1d4ed8; }
body.light .whtr-badge.whtr-overweight { background: rgba(217, 119, 6, 0.08); border-color: rgba(217, 119, 6, 0.15); color: #b45309; }
body.light .whtr-badge.whtr-obese { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.2); color: #b91c1c; }

/* ── RISK SIMULATOR PANEL ── */
.simulator-panel .panel-title {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}

.sim-slider {
  background: linear-gradient(to right, #10b981 0%, #10b981 var(--fill, 0%), 
    rgba(255, 255, 255, 0.1) var(--fill, 0%), rgba(255, 255, 255, 0.1) 100%) !important;
}

.sim-slider::-webkit-slider-thumb {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.sim-slider::-moz-range-thumb {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15) !important;
}

body.light .sim-slider {
  background: linear-gradient(to right, #10b981 0%, #10b981 var(--fill, 0%), 
    rgba(15, 23, 42, 0.08) var(--fill, 0%), rgba(15, 23, 42, 0.08) 100%) !important;
}

body.light .sim-slider::-webkit-slider-thumb {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

body.light .sim-slider::-moz-range-thumb {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1) !important;
}

.sim-checkmark {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sim-checkbox-container input:checked ~ .sim-checkmark {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
}

.sim-checkbox-container input:focus-visible ~ .sim-checkmark {
  outline-color: #10b981 !important;
}

body.light .sim-checkbox-container input:checked ~ .sim-checkmark {
  background: #10b981 !important;
  border-color: #10b981 !important;
}

/* ── SIM PROJECTION CARD ── */
.sim-projection-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.sim-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-proj-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

.sim-score-val {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 2px 0;
}

.sim-desc-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}

body.light .sim-projection-card {
  background: rgba(15, 23, 42, 0.015);
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: none;
}
