/* C&P hub only: keep the live totals and existing actions readable at any zoom. */
.cp-sticky {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  background: #112b36;
  border-top: 2px solid var(--gold);
  box-shadow: 0 -4px 18px #00121e26;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cp-sticky[hidden] { display: none; }
.cp-sticky-inner {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: center;
}
.cp-sticky-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 700px;
}
.cp-sticky-main > div { min-width: 0; }
.cp-sticky-label {
  display: block;
  font: 600 12px/1.4 var(--font-body);
  color: #c9dbdf;
}
.cp-sticky-pct, .cp-sticky-exact, .cp-sticky-pay {
  display: block;
  color: #fff;
  font: 750 22px/1.4 var(--font-display);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.cp-sticky-pct { color: #f4ce7d; }
.cp-sticky-pay { font-size: 20px; }
.cp-sticky a.cp-sticky-link {
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.cp-sticky a:focus-visible { outline: 3px solid #f4ce7d; outline-offset: 3px; }
.cp-estimate-change {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #e0ebee;
}
.cp-sticky .cp-estimate-change { margin: 0; min-height: 21px; }
.cp-sticky-note { margin: 0; color: #c9dbdf; font-size: 12px; line-height: 1.4; }
body.cp-has-sticky { padding-bottom: calc(var(--cp-summary-height, 130px) + 90px); }
body.cp-has-sticky .cp-action-dock { bottom: calc(var(--cp-summary-height, 130px) + 10px); }
body.cp-has-sticky .dbq-row { scroll-margin-bottom: calc(var(--cp-summary-height, 130px) + 90px); }
body.cp-has-sticky .dbq-check { scroll-margin-block: 120px calc(var(--cp-summary-height, 130px) + 110px); }
@media (max-width: 620px) {
  .cp-sticky-inner { width: calc(100% - 24px); column-gap: 10px; }
  .cp-sticky-main { grid-column: 1 / -1; gap: 10px; }
  .cp-sticky .cp-estimate-change { grid-row: 2; grid-column: 1; font-size: 12px; }
  .cp-sticky a.cp-sticky-link { grid-row: 2; grid-column: 2; font-size: 12px; }
  .cp-sticky-note { grid-column: 1 / -1; }
  .cp-sticky-label { font-size: 11px; }
  .cp-sticky-pct, .cp-sticky-exact { font-size: 20px; }
  .cp-sticky-pay { font-size: 18px; }
}

@media (max-height: 540px) {
  .cp-sticky-inner { width: calc(100% - 24px); padding: 4px 0; gap: 2px 10px; }
  .cp-sticky-main { grid-column: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cp-sticky-label { font-size: 11px; }
  .cp-sticky-pct, .cp-sticky-exact { font-size: 18px; }
  .cp-sticky-main > div:nth-child(3), .cp-sticky .cp-estimate-change { display: none; }
  .cp-sticky a.cp-sticky-link { grid-column: 2; grid-row: 1; font-size: 12px; }
  .cp-sticky-note { grid-column: 1 / -1; }
  body.cp-has-sticky { padding-bottom: calc(var(--cp-summary-height, 80px) + 16px); }
}
