.calculator-page {
  padding-top: 1px;
  padding-bottom: 64px;
}

.calculator-navigation {
  padding-top: 24px;
}

.calculator-navigation .back-link {
  display: inline-block;
  color: #c8d5ea;
  text-decoration: none;
}

.calculator-page .calcul {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.calculator-page #matrix-svg-container:empty {
  display: none;
}

/* Give the diagram priority and keep the supporting table compact. */
#calculator .calculator-wrapper { padding:28px; }
#calculator .matrix-layout-pro { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:24px; align-items:start; }
#calculator .matrix-left-col,#calculator .matrix-right-col { min-width:0; width:100%; }
#calculator .matrix-left-col svg { width:100%; max-width:none; height:auto; }
#calculator .health-title { margin:4px 0 16px; font-size:22px; line-height:1.25; letter-spacing:.02em; }
#calculator .health-table-pro { display:table; width:100%; table-layout:fixed; border-spacing:3px; padding:0; }
#calculator .health-table-pro th:nth-child(-n+3),#calculator .health-table-pro td:nth-child(-n+3) { width:16%; }
#calculator .health-table-pro th:nth-child(4),#calculator .health-table-pro td:nth-child(4) { width:52%; }
#calculator .health-table-pro th { padding:9px 3px; font-size:11px; line-height:1.35; white-space:normal; overflow-wrap:anywhere; }
#calculator .health-table-pro .h-box { min-width:0; height:36px; font-size:15px; border-width:1px; }
#calculator .health-table-pro .h-desc { min-width:0; padding:8px; font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
#calculator .health-table-pro .h-desc strong { font-size:11px; line-height:1.35; margin-bottom:5px; }
#calculator .health-table-pro .h-desc br { display:none; }

@media(min-width:1051px) {
  #calculator .matrix-right-col { aspect-ratio:20 / 27; display:grid; grid-template-rows:auto minmax(0,1fr); }
  #calculator .health-table-pro { height:100%; }
  #calculator .health-table-pro th { font-size:12px; }
  #calculator .health-table-pro .h-desc { font-size:12px; padding:9px; }
  #calculator .health-table-pro .h-desc strong { font-size:12px; }
  #calculator .health-table-pro .h-box { height:39px; font-size:16px; }
}

@media(max-width:1050px) {
  #calculator .matrix-layout-pro { grid-template-columns:minmax(0,1fr); gap:32px; }
  #calculator .matrix-left-col,#calculator .matrix-right-col { max-width:680px; margin-inline:auto; }
}
@media(max-width:600px) {
  #calculator .calculator-wrapper { padding:20px 10px; }
  #calculator .health-title { font-size:20px; }
  #calculator .health-table-pro th { font-size:10px; }
  #calculator .health-table-pro .h-desc { padding:7px 6px; }
}

@media (max-width: 760px) {
  .calculator-page {
    padding-bottom: 40px;
  }

  .calculator-wrapper {
    padding: 24px 14px;
  }
}
