/* QA1125: one information hierarchy for every Home Repair service rail.
   Painting reuses these canonical sections through its embedded adapter; Roofing keeps its approved rail. */
.premium-app .hgc-root .hgc-shared-service-rail {
  display: grid !important;
  align-content: start;
  gap: 0 !important;
  border: 1px solid #31495b !important;
  border-radius: 9px;
  background: #06131f !important;
  color: #f5f8fa;
}

.premium-app .hgc-root .hgc-shared-service-rail * {
  box-sizing: border-box;
}

.premium-app .hgc-root .hgc-shared-service-rail details,
.premium-app .hgc-root .hgc-shared-service-rail section {
  min-width: 0;
}

.premium-app .hgc-root .hgc-shared-rail-section {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #2b4355;
  border-radius: 0;
  background: #071522;
}

.premium-app .hgc-root .hgc-shared-rail-section > summary,
.premium-app .hgc-root .hgc-shared-budget-health > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 11px 14px;
  color: #ff8b20;
  cursor: pointer;
  list-style: none;
}

.premium-app .hgc-root .hgc-shared-rail-section > summary::-webkit-details-marker,
.premium-app .hgc-root .hgc-shared-budget-health > summary::-webkit-details-marker {
  display: none;
}

.premium-app .hgc-root .hgc-shared-rail-section > summary span {
  font-size: 13px !important;
  font-weight: 900;
  letter-spacing: .04em;
}

.premium-app .hgc-root .hgc-shared-rail-section > summary svg {
  width: 18px;
  height: 18px;
  color: #eaf1f6;
  transition: transform .16s ease;
}

.premium-app .hgc-root .hgc-shared-rail-section[open] > summary > svg:last-child,
.premium-app .hgc-root .hgc-shared-budget-health[open] > summary > svg:last-child {
  transform: rotate(180deg);
}

.premium-app .hgc-root .hgc-shared-current-item-body {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 4px 14px 14px;
}

.premium-app .hgc-root .hgc-shared-current-item-body > span,
.premium-app .hgc-root .hgc-shared-current-service > header > span {
  --tone: #ff8418;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--tone);
  border-radius: 50%;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 7%, #06131f);
}

.premium-app .hgc-root .hgc-shared-service-rail :is(.orange) { --tone: #ff8418; }
.premium-app .hgc-root .hgc-shared-service-rail :is(.green) { --tone: #33dc78; }
.premium-app .hgc-root .hgc-shared-service-rail :is(.gold) { --tone: #dce731; }
.premium-app .hgc-root .hgc-shared-service-rail :is(.purple) { --tone: #c368ef; }
.premium-app .hgc-root .hgc-shared-service-rail :is(.cyan) { --tone: #25dce8; }
.premium-app .hgc-root .hgc-shared-service-rail :is(.blue) { --tone: #59aaff; }
.premium-app .hgc-root .hgc-shared-service-rail :is(.pink) { --tone: #ff5a9b; }

.premium-app .hgc-root .hgc-shared-current-item-body > span {
  width: 56px;
  height: 56px;
}

.premium-app .hgc-root .hgc-shared-current-item-body > span svg {
  width: 27px;
  height: 27px;
}

.premium-app .hgc-root .hgc-shared-current-item-body > div {
  display: grid;
  gap: 5px;
}

.premium-app .hgc-root .hgc-shared-current-item-body > div > strong {
  color: #fff;
  font-size: 16px !important;
  line-height: 1.25;
}

.premium-app .hgc-root .hgc-shared-current-item-body > div > small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #37e780;
  font-size: 13px !important;
  font-weight: 750;
}

.premium-app .hgc-root .hgc-shared-current-item-body > div > small.needs-attention {
  color: #ffc149;
}

.premium-app .hgc-root .hgc-shared-current-item-body > div > small svg {
  width: 17px;
  height: 17px;
}

.premium-app .hgc-root .hgc-shared-current-item-body > b {
  color: #ff8618;
  font-size: 22px !important;
}

.premium-app .hgc-root .hgc-shared-current-action {
  width: calc(100% - 28px) !important;
  min-height: 42px;
  margin: 0 14px 14px;
  border-color: #ff8618 !important;
  color: #ffad61 !important;
  font-size: 13px !important;
}

.premium-app .hgc-root .hgc-shared-current-service > header {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 0 !important;
  padding: 3px 14px 12px !important;
  border: 0 !important;
  background: transparent !important;
}

.premium-app .hgc-root .hgc-shared-current-service > header > span {
  width: 52px;
  height: 52px;
}

.premium-app .hgc-root .hgc-shared-current-service > header > span svg {
  width: 25px;
  height: 25px;
}

.premium-app .hgc-root .hgc-shared-current-service > header > div {
  display: grid;
  gap: 3px;
}

.premium-app .hgc-root .hgc-shared-current-service > header > div strong {
  color: #fff;
  font-size: 16px !important;
}

.premium-app .hgc-root .hgc-shared-current-service > header > div small {
  color: var(--tone, #bf70eb);
  font-size: 12px !important;
  font-weight: 800;
}

.premium-app .hgc-root .hgc-shared-current-service > header > b {
  color: var(--tone, #c96cf0);
  font-size: 22px !important;
}

.premium-app .hgc-root .hgc-shared-current-service > dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 14px 12px;
  border: 1px solid #344b5e;
  border-radius: 6px;
}

.premium-app .hgc-root .hgc-shared-current-service > dl > div {
  display: grid;
  gap: 4px;
  padding: 9px 6px;
  border-right: 1px solid #344b5e;
  text-align: center;
}

.premium-app .hgc-root .hgc-shared-current-service > dl > div:last-child {
  border-right: 0;
}

.premium-app .hgc-root .hgc-shared-current-service dt {
  color: #aebdca;
  font-size: 12px !important;
}

.premium-app .hgc-root .hgc-shared-current-service dd {
  margin: 0;
  color: #fff;
  font-size: 14px !important;
  font-weight: 800;
}

.premium-app .hgc-root .hgc-shared-current-service > dl > div:last-child dd {
  color: #67e844;
}

.premium-app .hgc-root .hgc-shared-current-service > section {
  padding: 0 14px 13px;
}

.premium-app .hgc-root .hgc-shared-current-service > section h4 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 14px !important;
}

.premium-app .hgc-root .hgc-shared-current-service > section > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  border-bottom: 1px solid #213746;
  font-size: 12px !important;
}

.premium-app .hgc-root .hgc-shared-current-service > section > div span {
  display: flex;
  align-items: center;
  min-width: 0;
}

.premium-app .hgc-root .hgc-shared-current-service > section > div i {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--tone, #ff8618);
}

.premium-app .hgc-root .hgc-shared-current-service > section > p {
  margin: 8px 0 0;
  color: #b7c5cf;
  font-size: 12px !important;
}

.premium-app .hgc-root .hgc-shared-whole-proposal > header {
  min-height: 0 !important;
  padding: 0 14px 9px !important;
  border: 0 !important;
  background: transparent !important;
}

.premium-app .hgc-root .hgc-shared-whole-proposal > header strong {
  color: #35dfea;
  font-size: 15px !important;
}

.premium-app .hgc-root .hgc-shared-proposal-table {
  margin: 0 14px 12px;
  border: 1px solid #334a5c;
  border-radius: 6px;
  overflow: hidden;
}

.premium-app .hgc-root .hgc-shared-proposal-table .head,
.premium-app .hgc-root .hgc-shared-proposal-table > button {
  display: grid;
  grid-template-columns: 22px minmax(55px, 1fr) 40px 50px 54px;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.premium-app .hgc-root .hgc-shared-proposal-table .head {
  grid-template-columns: 22px minmax(55px, 1fr) 40px 50px 54px;
  padding: 7px 8px;
  color: #9eafbc;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: .04em;
}

.premium-app .hgc-root .hgc-shared-proposal-table > button {
  width: 100%;
  min-height: 38px;
  padding: 5px 8px;
  border: 0;
  border-top: 1px solid #2d4354;
  border-radius: 0;
  background: #071522;
  color: #f2f6f9;
  text-align: left;
}

.premium-app .hgc-root .hgc-shared-proposal-table > button:hover,
.premium-app .hgc-root .hgc-shared-proposal-table > button:focus-visible {
  outline: 0;
  background: color-mix(in srgb, var(--tone, #25dce8) 8%, #071522);
}

.premium-app .hgc-root .hgc-shared-proposal-table > button > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--tone, #25dce8);
  border-radius: 50%;
  color: var(--tone, #25dce8);
}

.premium-app .hgc-root .hgc-shared-proposal-table > button > span svg {
  width: 14px;
  height: 14px;
}

.premium-app .hgc-root .hgc-shared-proposal-table > button strong,
.premium-app .hgc-root .hgc-shared-proposal-table > button b {
  overflow: hidden;
  font-size: 11.5px !important;
  line-height: 1.15;
  text-overflow: clip;
  white-space: normal;
}

.premium-app .hgc-root .hgc-shared-proposal-table > button em,
.premium-app .hgc-root .hgc-shared-proposal-table > button small {
  color: #c1cdd5;
  font-size: 10.5px !important;
  font-style: normal;
  text-align: right;
}

.premium-app .hgc-root .hgc-shared-proposal-table > button b {
  color: #fff;
  text-align: right;
}

.premium-app .hgc-root .hgc-shared-whole-proposal > dl {
  margin: 0 14px 12px;
}

.premium-app .hgc-root .hgc-shared-whole-proposal > dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 31px;
  font-size: 12px !important;
}

.premium-app .hgc-root .hgc-shared-whole-proposal > dl > .hgc-shared-financial-start {
  min-height: 39px;
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px solid #2d4354;
}

.premium-app .hgc-root .hgc-shared-whole-proposal > dl dt {
  color: #c1ccd4;
}

.premium-app .hgc-root .hgc-shared-whole-proposal > dl dd {
  margin: 0;
  color: #fff;
  font-weight: 800;
  text-align: right;
}

.premium-app .hgc-root .hgc-shared-customer-total {
  display: grid;
  gap: 2px;
  margin: 0 14px 9px;
  padding: 10px 12px;
  border: 1px solid #19d5df;
  border-radius: 6px;
  background: #08202a;
}

.premium-app .hgc-root .hgc-shared-customer-total small,
.premium-app .hgc-root .hgc-shared-customer-total span {
  color: #35e0e8;
  font-size: 12px !important;
}

.premium-app .hgc-root .hgc-shared-customer-total strong {
  color: #fff;
  font-size: 26px !important;
  line-height: 1.05;
}

.premium-app .hgc-root .hgc-shared-deposit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  margin: 0 14px 9px;
  padding: 9px 11px;
  border: 1px solid #14c7d3;
  border-radius: 6px;
  color: #36dde7;
}

.premium-app .hgc-root .hgc-shared-deposit > span:first-child {
  display: grid;
  gap: 2px;
  font-size: 14px !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.premium-app .hgc-root .hgc-shared-deposit small {
  color: #9eb0bd;
  font-size: 14px !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.premium-app .hgc-root .hgc-shared-deposit > strong {
  color: #fff;
  font-size: 15px !important;
}

.premium-app .hgc-root .hgc-shared-deposit .edit {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #28dfea;
}

.premium-app .hgc-root .hgc-shared-deposit .edit svg {
  width: 14px;
  height: 14px;
}

.premium-app .hgc-root .hgc-shared-deposit input {
  width: 39px;
  min-height: 30px;
  padding: 4px;
  border: 1px solid #40596c;
  border-radius: 4px;
  background: #05111b;
  color: #fff;
  font: inherit;
  font-size: 12px !important;
  text-align: right;
}

.premium-app .hgc-root .hgc-shared-deposit em {
  font-size: 11px;
  font-style: normal;
}

.premium-app .hgc-root .hgc-shared-back-services {
  width: calc(100% - 28px) !important;
  min-height: 40px;
  margin: 0 14px 14px;
  border: 1px solid #18cbd7 !important;
  border-radius: 6px;
  background: #071522 !important;
  color: #36e1e8 !important;
  font-size: 13px !important;
}

.premium-app .hgc-root .hgc-shared-rail-field-tools {
  padding: 11px 14px;
  border-bottom: 1px solid #2b4355;
  background: #071522;
}

.premium-app .hgc-root .hgc-shared-rail-field-tools > button {
  width: 100%;
  min-height: 42px;
  border-color: #3c5568 !important;
  color: #f2f7fa !important;
  font-size: 14px !important;
}

.premium-app .hgc-root .hgc-shared-rail-field-tools > button svg {
  color: #35e682;
}

.premium-app .hgc-root .hgc-shared-rail-approval {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border-bottom: 1px solid #2b4355;
  background: #071522;
}

.premium-app .hgc-root .hgc-shared-customer-display {
  display: grid;
  gap: 6px;
  color: #e8eef2;
  font-size: 13px !important;
  font-weight: 800;
}

.premium-app .hgc-root .hgc-shared-customer-display select {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #426078;
  border-radius: 6px;
  background: #06131f;
  color: #fff;
  font: inherit;
  font-size: 13px !important;
}

.premium-app .hgc-root .hgc-shared-rail-approval > .hgc-home-repair-approval-rail {
  width: 100% !important;
  margin: 0 !important;
  padding: 10px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid #294356 !important;
  background: transparent !important;
}

.premium-app .hgc-root .hgc-shared-rail-approval > .if-measure-launch {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  justify-content: flex-start !important;
  border-color: #ff8418 !important;
  background: rgba(255, 132, 24, .08) !important;
  color: #fff !important;
  font-size: 14px !important;
}

.premium-app .hgc-root .hgc-shared-budget-health {
  border: 1px solid #31594d;
  border-radius: 6px;
  background: #071a1a;
}

.premium-app .hgc-root .hgc-shared-budget-health > summary {
  justify-content: flex-start;
  min-height: 40px;
  padding: 8px 10px;
  color: #37e782;
}

.premium-app .hgc-root .hgc-shared-budget-health > summary > svg:first-child {
  width: 17px;
  height: 17px;
}

.premium-app .hgc-root .hgc-shared-budget-health > summary strong,
.premium-app .hgc-root .hgc-shared-budget-health > summary span {
  font-size: 12px !important;
}

.premium-app .hgc-root .hgc-shared-budget-health > summary span {
  margin-left: auto;
}

.premium-app .hgc-root .hgc-shared-budget-health > summary > svg:last-child {
  width: 16px;
  height: 16px;
  color: #9eb2c0;
}

.premium-app .hgc-root .hgc-shared-budget-health > p {
  margin: 0;
  padding: 0 10px 9px;
  color: #9eb2c0;
  font-size: 10px !important;
  line-height: 1.4;
}

.premium-app .hgc-root .hgc-shared-service-rail > .hgc-shared-rail-work-order {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 0 0 8px 8px;
  background: #071522;
}

.premium-app .hgc-root .hgc-shared-rail-work-order > header {
  display: grid;
  gap: 3px;
}

.premium-app .hgc-root .hgc-shared-rail-work-order > header small {
  color: #ff8a20;
  font-size: 11px !important;
  font-weight: 900;
}

.premium-app .hgc-root .hgc-shared-rail-work-order > header strong {
  color: #fff;
  font-size: 14px !important;
}

.premium-app .hgc-root .hgc-shared-rail-work-order > header p {
  margin: 0;
  color: #a9bac6;
  font-size: 12px !important;
}

.premium-app .hgc-root .hgc-shared-rail-work-order .hgc-work-order-menu,
.premium-app .hgc-root .hgc-shared-rail-work-order .hgc-work-order-menu > summary {
  width: 100%;
}

.premium-app .hgc-root .hgc-shared-rail-work-order .hgc-work-order-menu-panel {
  position: static;
  width: 100%;
  margin-top: 7px;
  box-shadow: none;
}

.premium-app .hgc-root .hgc-gr-main > .hgc-gr-save-update {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid #2c465a;
  border-radius: 7px;
  background: #071522;
}

.premium-app .hgc-root .hgc-gr-save-update > p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.premium-app .hgc-root .hgc-gr-save-update > p strong {
  color: #fff;
  font-size: 15px !important;
}

.premium-app .hgc-root .hgc-gr-save-update > p small {
  color: #a9bac6;
  font-size: 13px !important;
  line-height: 1.35;
}

.premium-app .hgc-root .hgc-gr-save-update > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid #ff8418;
  border-radius: 6px;
  background: rgba(255, 132, 24, .08);
  color: #ffb064;
  font-size: 14px !important;
  font-weight: 850;
}

.premium-app .hgc-root .hgc-gr-save-update > button:hover:not(:disabled),
.premium-app .hgc-root .hgc-gr-save-update > button:focus-visible {
  border-color: #ff9d43;
  background: rgba(255, 132, 24, .14);
  color: #fff;
}

.premium-app .hgc-root .hgc-gr-save-update > button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.premium-app .hgc-root .hgc-gr-save-update > button svg {
  width: 18px;
  height: 18px;
}

@media (min-width: 981px) and (max-width: 1350px) {
  .premium-app .hgc-root .hgc-estimator-page:not(.hgc-proposal-hub-page):has(> .hgc-shared-service-rail) {
    padding-right: 320px !important;
  }

  .premium-app .hgc-root .hgc-estimator-page:not(.hgc-proposal-hub-page) > .hgc-shared-service-rail,
  .premium-app .hgc-root .hgc-fi-body > .hgc-shared-service-rail {
    width: 300px !important;
  }
}

@media (max-width: 980px) {
  .premium-app .hgc-root .hgc-shared-service-rail {
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .premium-app .hgc-root .hgc-shared-proposal-table > button {
    grid-template-columns: 22px minmax(55px, 1fr) 40px 50px 54px;
  }

  .premium-app .hgc-root .hgc-gr-main > .hgc-gr-save-update {
    grid-template-columns: 1fr;
  }

  .premium-app .hgc-root .hgc-gr-save-update > button {
    width: 100%;
  }
}

/* QA1125 readability pass: keep every canonical service rail legible while
   preserving the compact five-column Whole Proposal table. */
.premium-app .hgc-root .hgc-shared-rail-section > summary span,
.premium-app .hgc-root .hgc-shared-current-item-body > div > small,
.premium-app .hgc-root .hgc-shared-current-action,
.premium-app .hgc-root .hgc-shared-current-service > header > div small,
.premium-app .hgc-root .hgc-shared-current-service dt,
.premium-app .hgc-root .hgc-shared-current-service > section > div,
.premium-app .hgc-root .hgc-shared-current-service > section > p,
.premium-app .hgc-root .hgc-shared-whole-proposal > dl > div,
.premium-app .hgc-root .hgc-shared-customer-total small,
.premium-app .hgc-root .hgc-shared-customer-total span,
.premium-app .hgc-root .hgc-shared-deposit input,
.premium-app .hgc-root .hgc-shared-deposit em,
.premium-app .hgc-root .hgc-shared-back-services,
.premium-app .hgc-root .hgc-shared-customer-display,
.premium-app .hgc-root .hgc-shared-customer-display select,
.premium-app .hgc-root .hgc-shared-budget-health > summary strong,
.premium-app .hgc-root .hgc-shared-budget-health > summary span,
.premium-app .hgc-root .hgc-shared-rail-work-order > header p {
  font-size: 14px !important;
}

.premium-app .hgc-root .hgc-shared-proposal-table > button strong,
.premium-app .hgc-root .hgc-shared-proposal-table > button b,
.premium-app .hgc-root .hgc-shared-budget-health > p,
.premium-app .hgc-root .hgc-shared-rail-work-order > header small {
  font-size: 13px !important;
}

.premium-app .hgc-root .hgc-shared-proposal-table .head,
.premium-app .hgc-root .hgc-shared-proposal-table > button em,
.premium-app .hgc-root .hgc-shared-proposal-table > button small {
  font-size: 12px !important;
}

/* Canonical proposal rail disclosures start compact and reveal content on demand. */
.premium-app .hgc-root .hgc-shared-service-rail > .hgc-shared-rail-section:not([open]) > :not(summary),
.premium-app .hgc-root .hgc-shared-service-rail .hgc-shared-budget-health:not([open]) > :not(summary),
.premium-app .hgc-root .hgc-shared-service-rail .hgc-work-order-menu:not([open]) > .hgc-work-order-menu-panel {
  display: none !important;
}
