/* SPC layout only: preserve the existing form controls and chart calculations. */
body #spc.page > .box > .form {
  grid-template-columns: minmax(100px,.85fr) minmax(180px,1.6fr) minmax(70px,.55fr) minmax(130px,1.05fr) minmax(100px,.8fr) minmax(135px,1fr) minmax(135px,1fr) max-content !important;
  gap: 8px 10px;
  align-items: end;
}
body #spc.page > .box > .form > div:last-child { display: contents; }
body #spc.page > .box > .form > div:last-child > div { min-width: 0; }
body #spc.page > .box > .form > div:last-child > .btn {
  margin: 0;
  white-space: nowrap;
  align-self: end;
  width: 100%;
}
body #spc .spc-layout {
  grid-template-columns: minmax(0,1fr) clamp(380px,29%,430px);
  gap: 14px;
}
body #spc .chart-wrap,
body #spc .spc-summary { min-width: 0; max-width: 100%; }
body #spc #chart { display: block; width: 100%; max-width: 100%; height: auto; }
body #spc .spc-summary table { width: 100%; }
body #spc .spc-summary .note { overflow-wrap: anywhere; }
body #spc .spc-capability-hold > td {
  background: #fff8e8;
  color: #744719;
  padding: 10px 12px;
  line-height: 1.6;
  white-space: normal;
}
body #spc .spc-capability-hold :is(strong,span,small) { display: block; }
body #spc .spc-capability-hold strong { margin-bottom: 3px; font-size: 12px; }
body #spc .spc-capability-hold span { font-size: 12px; }
body #spc .spc-capability-hold small { margin-top: 5px; color: #79664a; font-size: 11px; }
body #spc .spc-layout:has(#spcSummary > .note) { grid-template-columns: minmax(0,1fr); }
body #spc .spc-layout:has(#spcSummary > .note) > .chart-wrap { display: none; }
body #spc .spc-layout:has(#spcSummary > .note) > #spcSummary {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  background: #f8fafc;
}
body #spc .spc-layout:has(#spcSummary > .note) > #spcSummary > .note { font-size: 13px; }
@media (max-width: 1360px) {
  body #spc.page > .box > .form {
    grid-template-columns: minmax(100px,.9fr) minmax(180px,1.7fr) minmax(70px,.6fr) minmax(130px,1.2fr) minmax(100px,.9fr) !important;
  }
  body #spc.page > .box > .form > div:last-child > div:first-child { grid-column: 1 / span 2; }
  body #spc.page > .box > .form > div:last-child > div:nth-child(2) { grid-column: 3 / span 2; }
}
@media (max-width: 1100px) {
  body #spc .spc-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 850px) {
  body #spc.page > .box > .form { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body #spc.page > .box > .form > div:last-child > div:first-child,
  body #spc.page > .box > .form > div:last-child > div:nth-child(2) { grid-column: auto; }
}

