/* CSP Step 1: move static inline CSS from index.html into external stylesheet. */

/* Routine workspaces show only the features included with the active plan. */
.pfs-feature-hidden {
  display: none !important;
}

/* Retained for contextual plan-discovery surfaces outside routine work. */
.pfs-feature-locked {
  opacity: 1;
}

.pfs-feature-locked > summary {
  opacity: 0.62;
  filter: grayscale(0.45) saturate(0.4);
  cursor: help;
}

.pfs-feature-locked > summary .collapse-indicator {
  opacity: 0.25;
}

.pfs-feature-menu-locked {
  opacity: 0.62;
  filter: grayscale(0.45) saturate(0.4);
  cursor: help;
}

.pfs-feature-action-locked {
  opacity: 0.62;
  filter: grayscale(0.45) saturate(0.4);
  cursor: help;
}

.pfs-feature-lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 20px;
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #687386;
  background: rgba(100, 116, 139, 0.08);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.pfs-feature-lock-glyph {
  position: relative;
  width: 8px;
  height: 7px;
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.pfs-feature-lock-glyph::before {
  position: absolute;
  left: 1px;
  top: -6px;
  width: 4px;
  height: 5px;
  content: "";
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.pfs-feature-toast {
  display: grid;
  gap: 2px;
  min-width: min(280px, calc(100vw - 32px));
  text-align: left;
  pointer-events: none;
}

.pfs-feature-toast strong {
  font-weight: 900;
}

.pfs-feature-toast span {
  color: rgba(255, 255, 255, 0.78);
}

.pfs-pro-locked [data-pro-gated="1"] a.pfs-link-disabled {
  pointer-events: none;
  opacity: 0.65;
  text-decoration: none;
}

/* Launch lock: Pro-gated cards are not expandable for non-Pro users */
.pfs-pro-locked details[data-pro-gated="1"] > summary {
  cursor: not-allowed;
}

.pfs-pro-locked details[data-pro-gated="1"] > summary .collapse-indicator {
  opacity: 0.25;
}

.opt-usage-note {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.7);
}

.card-title-with-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pro-meta {
  display: inline-flex;
  align-items: center;
}

.pfs-pro-locked .pro-meta {
  display: none;
}

.pill-soon {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

/* Legacy Pro pill/lock markup is hidden; feature gates now use muted states. */
.pfs-pro-lock-icon {
  display: none;
  font-size: 12px;
  line-height: 1;
  opacity: 0.85;
}

.pfs-pro-locked .pfs-pro-lock-icon {
  display: none;
}

/* Plan badge (shows current plan next to the hamburger; demo already has its own badge) */
.pfs-plan-badge {
  margin-left: 0 !important;
  margin-right: 10px;
}

/* Hamburger menu items that are Pro-locked are still visible, but look disabled */
.pfs-pro-menu-locked {
  opacity: 0.65;
}

.pfs-pro-menu-locked::after {
  content: "";
  display: none;
}

.build-cutplan-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.pfs-sunmap-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 247, 237, 0.88));
}

.pfs-sunmap-cta-copy {
  min-width: 0;
}

.pfs-sunmap-cta-title {
  color: #111318;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.pfs-sunmap-cta-text {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.pfs-sunmap-cta .fy-btn {
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .pfs-sunmap-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .pfs-sunmap-cta .fy-btn {
    width: 100%;
  }
}

/* Hide Cut Sheet button (if present now or later) */
#cutSheetBtn,
#btnCutSheet,
.btn-cut-sheet,
.cut-sheet-btn,
[data-action="cut-sheet"] {
  display: none !important;
}

/* Former inline styles from index.html */
#pfsHistoryCard[data-hidden="1"] {
  display: none;
}

.pfs-history-actions {
  padding: 10px 14px 14px;
  display: flex;
  justify-content: flex-end;
}

.fy-check-strong {
  font-weight: 900;
}

.fy-form-grid-mt10 {
  margin-top: 10px;
}

.settings-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-header-row h2 {
  margin: 0;
}

.settings-header-row .fy-mini {
  margin-top: 4px;
}

.jobmgr-backlink {
  margin-left: 12px;
  text-decoration: none;
  font-weight: 900;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Auth gate moved off inline styles */
.pfs-auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.pfs-auth-logout-btn {
  display: none;
}

.pfs-auth-panel-hidden {
  display: none;
}

.pfs-auth-row-mt10 {
  margin-top: 10px;
}

/* Windows summary moved off inline styles */
.pfs-summary-group-wrap {
  position: relative;
}

.pfs-group-rename-btn {
  position: absolute;
  left: -26px;
  top: 22px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

/* Account page moved off inline styles */
.account-msg {
  display: none;
  margin-bottom: 12px;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.account-msg-visible {
  display: block;
}

.account-msg-error {
  color: #ef4444;
}

.account-msg-success {
  color: #22c55e;
}

.account-msg-info {
  color: var(--text);
}

#accountPage .main-content {
  grid-template-columns: 1fr !important;
}

#accountPage .card {
  width: 100%;
}

.account-section-title {
  margin-top: 10px;
  margin-bottom: 10px;
}

.account-section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-section-title-text {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.account-section-sub {
  margin-top: 4px;
}

.account-hr {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.account-main-pane .account-hr {
  margin: 20px 0 18px;
}

.account-tier-badge {
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #f7e6aa, #d8aa4c) !important;
  border-color: rgba(141, 96, 20, 0.34) !important;
  color: #111318 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.62) inset;
}

.account-col {
  min-width: 0;
}

.account-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-row-top {
  margin-top: 12px;
  align-items: center;
}

.account-main-pane > .fy-row:not(.account-row-top) {
  margin-bottom: 10px;
}

.account-main-pane > .fy-field + .fy-row:not(.account-row-top) {
  margin-top: 10px;
}

.account-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 0;
  width: 100%;
  align-items: flex-start;
}

.account-main-pane {
  padding-right: 22px;
}

.account-business-pane {
  border-left: 1px solid rgba(17, 19, 24, 0.10);
  padding-left: 22px;
}

.account-global-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

#accountRoot .account-global-actions .fy-settings-actions-right {
  display: grid;
  grid-template-columns: minmax(72px, 112px);
  justify-content: end;
}

#accountRoot #fyAccountSaveBtn {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px !important;
  font-weight: 950;
  white-space: nowrap;
  background: linear-gradient(135deg, #f5df98, #d8aa4c) !important;
  border-color: rgba(141, 96, 20, 0.22) !important;
  color: #111318 !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.64) inset,
    0 14px 28px rgba(216, 170, 76, 0.22) !important;
}

#accountRoot #fyAccountSaveBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(177, 132, 49, 0.30) !important;
}

.account-company-upgrade {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

#accountCompanyRoot .fy-settings {
  width: 100%;
}

#accountCompanyRoot .fy-settings-actions {
  display: none;
}

#accountCompanyRoot .fy-panel-card {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#accountCompanyRoot .fy-panel-header {
  display: none;
}

@media (max-width: 920px) {
  .account-two-col {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .account-main-pane {
    padding-right: 0;
  }

  .account-business-pane {
    border-left: 0;
    border-top: 1px solid rgba(17, 19, 24, 0.10);
    padding-left: 0;
    padding-top: 18px;
  }
}

/* Settings utility classes moved off inline styles */
.fy-mt12 {
  margin-top: 12px;
}

.fy-mt10 {
  margin-top: 10px;
}

.fy-row-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fy-m14-0 {
  margin: 14px 0;
}

.fy-mt8 {
  margin-top: 8px;
}

.fy-m16-0 {
  margin: 16px 0;
}

.fy-grid-full {
  grid-column: 1 / -1;
}

.fy-spacer-inline-8 {
  width: 8px;
  display: inline-block;
}

/* Optimization page CSP cleanup */
.rollfit-banner-notice-warn {
  background: #fbf3db;
  border: 1px solid rgba(177, 132, 49, 0.26);
  color: #111318;
}

.rollfit-banner-notice-label {
  color: #111318;
}

.rollfit-banner-notice-warn .rollfit-banner-title,
.rollfit-banner-notice-warn .rollfit-banner-title strong,
.rollfit-banner-notice-warn .rollfit-banner-details summary {
  color: #111318;
}

.rollfit-banner-notice-warn .rollfit-banner-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(141, 96, 20, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pfs-gold-2, #f0cd76), var(--pfs-gold, #d8aa4c));
  color: #111318;
  box-shadow: 0 14px 28px rgba(216, 170, 76, 0.2);
  font-family: var(--font-body, inherit);
  font-weight: 900;
  line-height: 1;
  padding: 9px 14px;
}

.rollfit-banner-notice-warn .rollfit-banner-action:hover {
  background: linear-gradient(135deg, var(--pfs-gold-2, #f0cd76), var(--pfs-gold, #d8aa4c));
  border-color: rgba(141, 96, 20, 0.3);
  box-shadow: 0 18px 34px rgba(216, 170, 76, 0.26);
  color: #111318;
  transform: translateY(-1px);
}

.fy-finish-remaining {
  background: #fbf3db;
  border-color: rgba(177, 132, 49, 0.26);
  box-shadow: 0 16px 42px rgba(17, 19, 24, 0.08);
  color: #111318;
}

.fy-finish-remaining .fy-finish-title,
.fy-finish-remaining .fy-finish-label,
.fy-finish-remaining .fy-finish-details summary {
  color: #111318;
}

.fy-finish-remaining .fy-finish-note,
.fy-finish-remaining .fy-finish-sub,
.fy-finish-remaining .fy-finish-collapsed-meta,
.fy-finish-remaining .fy-finish-roll-fit,
.fy-finish-remaining .fy-finish-roll-stats small,
.fy-finish-remaining .fy-finish-absorb-option small,
.fy-finish-remaining .fy-finish-absorb-loading,
.fy-finish-remaining .fy-rem-clean-dim {
  color: #606873 !important;
}

.fy-finish-remaining .fy-finish-details {
  background: #ffffff !important;
  border-color: rgba(177, 132, 49, 0.18) !important;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.fy-finish-remaining .fy-finish-details summary {
  background: linear-gradient(180deg, #ffffff, #f8f6f0) !important;
  border-radius: 12px;
  color: #111318 !important;
}

.fy-finish-remaining .fy-rem-clean-list {
  border-top-color: rgba(177, 132, 49, 0.14) !important;
  background: #fffdf8;
}

.fy-finish-remaining .fy-rem-clean-row {
  border-top-color: rgba(17, 19, 24, 0.08) !important;
  color: #111318 !important;
}

.fy-finish-remaining .fy-rem-clean-main,
.fy-finish-remaining .fy-rem-item strong,
.fy-finish-remaining .fy-rem-dim {
  color: #111318 !important;
}

.fy-finish-remaining .fy-finish-toggle,
.fy-finish-remaining .fy-finish-change {
  background: #ffffff !important;
  border-color: rgba(17, 19, 24, 0.14) !important;
  border-radius: 999px;
  color: #111318 !important;
  box-shadow: 0 10px 22px rgba(17, 19, 24, 0.06);
}

.fy-finish-remaining .fy-finish-toggle:hover,
.fy-finish-remaining .fy-finish-change:hover {
  border-color: rgba(216, 170, 76, 0.42) !important;
  box-shadow: 0 14px 30px rgba(17, 19, 24, 0.08);
}

.fy-finish-remaining .fy-finish-roll-option {
  background: linear-gradient(180deg, #ffffff, #f8f6f0) !important;
  border-color: rgba(17, 19, 24, 0.13) !important;
  color: #111318 !important;
  box-shadow: 0 10px 24px rgba(17, 19, 24, 0.06);
}

.fy-finish-remaining .fy-finish-roll-option:hover {
  border-color: rgba(216, 170, 76, 0.42) !important;
  box-shadow: 0 16px 32px rgba(17, 19, 24, 0.09);
}

.fy-finish-remaining .fy-finish-roll-option.is-selected,
.fy-finish-remaining .fy-finish-roll-option.is-recommended {
  background: linear-gradient(180deg, #fffaf0, #f7f0dc) !important;
  border-color: rgba(177, 132, 49, 0.58) !important;
  box-shadow:
    0 0 0 2px rgba(216, 170, 76, 0.16),
    0 16px 34px rgba(17, 19, 24, 0.08);
}

.fy-finish-remaining .fy-finish-roll-top strong,
.fy-finish-remaining .fy-finish-roll-stats,
.fy-finish-remaining .fy-finish-roll-stats span,
.fy-finish-remaining .fy-finish-roll-stats strong,
.fy-finish-remaining .fy-finish-roll-combo {
  color: #111318 !important;
}

.fy-finish-remaining .fy-finish-roll-top span {
  background: rgba(216, 170, 76, 0.16) !important;
  border-color: rgba(177, 132, 49, 0.34) !important;
  color: #8a5b08 !important;
}

.fy-finish-remaining .fy-finish-roll-combo {
  border-top-color: rgba(17, 19, 24, 0.10) !important;
}

.fy-finish-remaining .fy-finish-roll-combo strong {
  color: #8a5b08 !important;
}

.fy-finish-remaining .fy-finish-actions-row .btn-output-primary {
  background: linear-gradient(135deg, var(--pfs-gold-2, #f0cd76), var(--pfs-gold, #d8aa4c)) !important;
  border-color: rgba(141, 96, 20, 0.24) !important;
  color: #111318 !important;
  box-shadow: 0 14px 28px rgba(216, 170, 76, 0.22) !important;
}

.fy-finish-remaining .fy-finish-actions-row .btn-output-primary:hover {
  border-color: rgba(141, 96, 20, 0.34) !important;
  box-shadow: 0 18px 34px rgba(216, 170, 76, 0.28) !important;
}

.fy-finish-remaining .fy-finish-absorb-option {
  background: #fffdf8 !important;
  border-color: rgba(177, 132, 49, 0.24) !important;
  color: #111318 !important;
}

.fy-finish-remaining .rollfit-banner-details summary {
  color: #111318 !important;
}

#jobOutputsCard .job-output-buttons {
  grid-template-columns: .8fr 1.35fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

#jobOutputsCard .btn-output {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 420px) {
  #jobOutputsCard .job-output-buttons {
    gap: 6px;
  }

  #jobOutputsCard .btn-output {
    font-size: 12px;
    min-height: 38px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

#jobOutputsCard .btn-output:disabled {
  background: #f7f5ef !important;
  border-color: rgba(17,19,24,.12) !important;
  box-shadow: none !important;
  color: #606873 !important;
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

#jobOutputsCard .btn-output:disabled:hover {
  border-color: rgba(17,19,24,.12) !important;
  box-shadow: none !important;
  transform: none;
}

.fy-actions-inline {
  display: flex;
  gap: 10px;
}

.fy-actions-btn {
  flex: 1;
  width: 100%;
}

.pfs-optid-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 900;
}

.pfs-optid-code-medium {
  font-weight: 800;
}

.pfs-copy-optid-btn {
  padding: 0 6px;
  font-size: 12px;
  border: none;
  background: transparent;
  color: var(--primary, #2563eb);
  font-weight: 900;
  cursor: pointer;
}

.pfs-copy-optid-status {
  margin-left: 6px;
  font-weight: 900;
  color: #16a34a;
  opacity: 0;
  transition: opacity 0.2s;
}

.pfs-copy-optid-status-wide {
  margin-left: 8px;
}

.fy-plan-rollcard-dim {
  opacity: 0.7;
}

.fy-plan-unused-mt14 {
  margin-top: 14px;
}

.fy-plan-unused-title {
  font-weight: 900;
  margin: 0 0 8px 2px;
  opacity: 0.8;
}

.fy-hidden {
  display: none;
}

.fy-width-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fy-finish-actions-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.fy-finish-metrics-card {
  flex: 1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.fy-minw-0 {
  min-width: 0;
}

.fy-text-right {
  text-align: right;
}

.fy-metric-label {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.fy-metric-value {
  font-size: 14px;
  font-weight: 900;
}

.fy-width-chip {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.04);
  font-weight: 800;
  cursor: pointer;
}

.fy-width-chip.is-selected {
  border-color: rgba(37, 99, 235, 0.6);
  background: rgba(37, 99, 235, 0.1);
}

.fy-width-chip:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.fy-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 1000;
}

.fy-tab-locked {
  opacity: 0.55;
}

.fy-opt-loading {
  text-align: center;
  padding: 18px;
}

.fy-opt-loading-msg {
  margin-top: 10px;
  font-weight: 900;
}

.fy-opt-loading-sub {
  color: #64748b;
  font-weight: 700;
}

.fy-error-strong {
  font-weight: 900;
}

.fy-hint-tight {
  font-size: 13px;
  line-height: 1.45;
}

.fy-ul-tight {
  margin: 8px 0 0 18px;
  padding: 0;
  line-height: 1.5;
}

.fy-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fy-overall-eff {
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
}

.fy-plan-meta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-weight: 900;
  margin-top: 6px;
}

.fy-eff-green {
  color: #16a34a;
}

.fy-opt-actions-end {
  justify-content: flex-end;
}

.fy-mt6 {
  margin-top: 6px;
}

.fy-roll-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.fy-roll-summary-title {
  font-weight: 900;
}

.fy-roll-summary-meta {
  display: flex;
  gap: 12px;
  font-weight: 800;
  color: #64748b;
}

@media (max-width: 640px) {
  .mobile-optimize-bar {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .mobile-optimize-bar .btn-mobile-optimize {
    width: 100%;
  }

  .mobile-optimize-bar .opt-usage-note-mobile {
    text-align: center;
    margin-top: 0;
  }
}

.mobile-optimize-bar.hidden,
body.pfs-alt-view .mobile-optimize-bar {
  display: none !important;
}

/* Final header alignment override.
   This file loads after base.css and responsive.css, so these rules are the
   browser's last word on the logo/menu positioning. */
:root {
  --pfs-app-shell-max: 1240px;
  --pfs-app-gutter: 16px;
  --pfs-left-pane-card-inset: 14px;
}

.navbar {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

.navbar .nav-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: 16px !important;
  align-items: center !important;
  justify-content: normal !important;
  width: min(var(--pfs-app-shell-max), calc(100vw - (var(--pfs-app-gutter) * 2))) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

.navbar .logo {
  justify-self: start !important;
  min-width: 0 !important;
  margin-left: var(--pfs-left-pane-card-inset) !important;
}

.navbar .nav-actions {
  justify-self: end !important;
  margin-left: auto !important;
}

.navbar .header-menu,
.navbar .menu-btn {
  margin-right: 0 !important;
}

@media (max-width: 720px) {
  .navbar .nav-inner {
    grid-template-columns: minmax(0, 1fr) auto !important;
    column-gap: 10px !important;
  }
}

/* Main-page Sun Map discovery button: scoped to the Customer CTA only. */
.pfs-sunmap-cta #pfsCustomerSunMapBtn {
  background: linear-gradient(180deg, #f4d06f 0%, #d7a83d 52%, #b98522 100%) !important;
  border: 1px solid rgba(121, 82, 18, .38) !important;
  color: #17110a !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.62) inset,
    0 10px 20px rgba(121,82,18,.18) !important;
  font-weight: 950;
}

.pfs-sunmap-cta #pfsCustomerSunMapBtn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

/* Inline grouped window entry */
#windowsCard.pfs-windows-empty > .table-header {
  display: none !important;
}

#windowsCard .pfs-windows-empty-state {
  padding: 18px 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(180deg, #fff, #fbfaf7);
}

#windowsCard .pfs-window-group-section {
  --group-color: #d8aa4c;
  border-top: 1px solid rgba(17,19,24,.10);
  background: #fff;
}

#windowsCard .pfs-window-group-section:first-child {
  border-top: 0;
}

#windowsCard .pfs-window-group-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 13%, transparent) 0%, rgba(255,255,255,.96) 48%),
    linear-gradient(180deg, #ffffff, #faf8f2);
  border-bottom: 1px solid rgba(17,19,24,.08);
}

#windowsCard .pfs-window-group-section.is-ungrouped .pfs-window-group-header {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

#windowsCard .pfs-window-group-section.is-active .pfs-window-group-header {
  box-shadow: inset 3px 0 0 var(--group-color);
}

#windowsCard .pfs-window-group-main,
#windowsCard .pfs-window-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#windowsCard .pfs-window-group-active {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(17,19,24,.18);
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}

#windowsCard .pfs-window-group-dot {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 999px;
  background: transparent;
}

#windowsCard .pfs-window-group-active[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--group-color) 74%, #111318 26%);
}

#windowsCard .pfs-window-group-active[aria-pressed="true"] .pfs-window-group-dot {
  background: var(--group-color);
}

#windowsCard .pfs-window-group-chip {
  width: 11px;
  height: 28px;
  border-radius: 999px;
  background: var(--group-color);
  box-shadow: 0 0 0 1px rgba(17,19,24,.10) inset;
  flex: 0 0 auto;
}

#windowsCard .pfs-window-group-section.is-ungrouped .pfs-window-group-chip {
  background: #cbd5e1;
}

#windowsCard .pfs-window-group-name,
#windowsCard .pfs-window-group-name-static {
  min-width: 0;
  width: 100%;
  color: #111318;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

#windowsCard .pfs-window-group-name {
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255,255,255,.68);
}

#windowsCard .pfs-window-group-name:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--group-color) 62%, rgba(17,19,24,.22) 38%);
  background: #fff;
}

#windowsCard .pfs-window-group-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

#windowsCard .pfs-window-group-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

#windowsCard .pfs-window-group-done,
#windowsCard .pfs-window-group-remove {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid rgba(17,19,24,.13);
  background: #fff;
  color: #111318;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

#windowsCard .pfs-window-group-done {
  background: linear-gradient(180deg, #f4d06f, #d7a83d);
  border-color: rgba(121,82,18,.28);
}

#windowsCard .pfs-window-group-remove {
  color: #8f332f;
}

#windowsCard .pfs-window-group-empty {
  padding: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

#windowsCard .pfs-window-group-rows .window-row:last-child {
  border-bottom: 0 !important;
}

#windowsCard > .window-controls-bottom .btn-add-window,
#windowsCard > .window-controls-bottom .btn-group-selected,
#windowsCard > .window-controls-bottom .btn-delete-selected {
  min-height: 44px;
  white-space: normal;
  line-height: 1.18;
}

/* Mobile-only placement for cut-plan output actions. Desktop remains unchanged. */
.fy-cut-actions-mobile,
.fy-cut-actions-row-mobile {
  display: none !important;
}

@media (min-width: 769px) {
  .results-section .fy-cut-actions:not(.fy-cut-actions-mobile) [data-opt-action="open-cut-diagram"].btn-output,
  .results-section .fy-cut-actions:not(.fy-cut-actions-mobile) [data-opt-action="open-window-list"].btn-output,
  .results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="view-plan-roll"][data-view="diagram"].btn-output,
  .results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="view-plan-roll"][data-view="windows"].btn-output,
  .results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="finish-open-view"][data-view="diagram"].btn-output,
  .results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="finish-open-view"][data-view="windows"].btn-output {
    background:
      linear-gradient(135deg, var(--pfs-app-gold-2, #f0cd76), var(--pfs-app-gold, #d8aa4c)) !important;
    border-color: rgba(141, 96, 20, 0.24) !important;
    color: #111318 !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.55) inset,
      0 14px 28px rgba(216, 170, 76, 0.22) !important;
  }

  .results-section .fy-cut-actions:not(.fy-cut-actions-mobile) [data-opt-action="open-cut-diagram"].btn-output:hover,
  .results-section .fy-cut-actions:not(.fy-cut-actions-mobile) [data-opt-action="open-window-list"].btn-output:hover,
  .results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="view-plan-roll"][data-view="diagram"].btn-output:hover,
  .results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="view-plan-roll"][data-view="windows"].btn-output:hover,
  .results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="finish-open-view"][data-view="diagram"].btn-output:hover,
  .results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="finish-open-view"][data-view="windows"].btn-output:hover {
    background:
      linear-gradient(135deg, #f4d98f, var(--pfs-app-gold, #d8aa4c)) !important;
    border-color: rgba(141, 96, 20, 0.34) !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.62) inset,
      0 18px 34px rgba(216, 170, 76, 0.28) !important;
  }
}

@media (max-width: 768px) {
  .fy-plan-rollcard > .fy-cut-actions-row-mobile {
    display: grid !important;
    margin: 0 0 10px;
  }

  .fy-plan-rollcard > .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) {
    display: none !important;
  }

  .fy-plan-rollcard-single > .fy-cut-actions-mobile {
    display: block !important;
    margin: 0 0 10px;
  }

  .results-section .fy-cut-actions-mobile [data-opt-action].btn-output,
  .results-section .fy-cut-actions-row-mobile [data-opt-action].btn-output {
    background:
      linear-gradient(135deg, var(--pfs-app-gold-2, #f0cd76), var(--pfs-app-gold, #d8aa4c)) !important;
    border-color: rgba(141, 96, 20, 0.24) !important;
    color: #111318 !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.55) inset,
      0 14px 28px rgba(216, 170, 76, 0.22) !important;
  }

  .results-section .fy-cut-actions-mobile [data-opt-action].btn-output:hover,
  .results-section .fy-cut-actions-row-mobile [data-opt-action].btn-output:hover {
    background:
      linear-gradient(135deg, #f4d98f, var(--pfs-app-gold, #d8aa4c)) !important;
    border-color: rgba(141, 96, 20, 0.34) !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.62) inset,
      0 18px 34px rgba(216, 170, 76, 0.28) !important;
    color: #111318 !important;
  }

  .fy-plan-rollcard-single > .fy-cut-actions:not(.fy-cut-actions-mobile) {
    display: none !important;
  }

  #windowsCard .pfs-window-group-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  #windowsCard .pfs-window-group-actions {
    justify-content: flex-start;
  }
}

/* Windows card redesign: labels, removal, accordions, and mobile row cards. */
#windowsCard {
  --window-cols: 32px minmax(116px, 1.35fr) 86px 54px minmax(72px, .9fr) minmax(72px, .9fr);
  --window-gap: 8px;
  --pfs-window-rail: 12px;
}

#windowsCard > .pfs-window-settings-strip,
#windowsCard > .table-header,
#windowsCard > .windows-list,
#windowsCard > .windows-inline-notice,
#windowsCard > .window-controls-bottom {
  width: auto !important;
  max-width: none !important;
  margin-left: var(--pfs-window-rail) !important;
  margin-right: var(--pfs-window-rail) !important;
  box-sizing: border-box;
}

#windowsCard > .pfs-window-settings-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px !important;
  margin-bottom: 10px !important;
}

#windowsCard > .pfs-window-settings-strip .pfs-rot-toggle {
  margin: 0 !important;
  padding: 10px 11px;
  border-radius: 10px;
  min-width: 0;
  background: #f8f7f2 !important;
}

#windowsCard > .pfs-window-settings-strip .pfs-rot-label {
  font-size: 13px;
}

#windowsCard > .pfs-window-settings-strip .pfs-rot-help {
  font-size: 11px;
}

#windowsCard > .table-header,
#windowsCard .window-row {
  grid-template-columns: var(--window-cols) !important;
  gap: var(--window-gap) !important;
}

#windowsCard > .table-header {
  padding: 9px 12px !important;
}

#windowsCard > .windows-list {
  border-radius: 0 0 12px 12px !important;
  overflow: hidden !important;
}

#windowsCard .pfs-window-group-section {
  --group-color: #d8aa4c;
  border-top: 1px solid rgba(17,19,24,.10);
  background: #fff;
}

#windowsCard .pfs-window-group-section:first-child {
  border-top: 0;
}

#windowsCard .pfs-window-group-section > summary {
  list-style: none;
}

#windowsCard .pfs-window-group-section > summary::-webkit-details-marker {
  display: none;
}

#windowsCard .pfs-window-group-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto 18px;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  padding: 9px 12px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 10%, transparent) 0%, rgba(255,255,255,.96) 46%),
    linear-gradient(180deg, #ffffff, #faf9f4);
  border-bottom: 1px solid rgba(17,19,24,.08);
}

#windowsCard .pfs-window-group-section:not([open]) .pfs-window-group-header {
  border-bottom: 0;
}

#windowsCard .pfs-window-group-chevron {
  color: #64748b;
  font-size: 13px;
  transition: transform .14s ease;
}

#windowsCard .pfs-window-group-section[open] .pfs-window-group-chevron {
  transform: rotate(180deg);
}

#windowsCard .pfs-window-group-meta {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

#windowsCard .pfs-window-group-actions {
  gap: 5px;
}

#windowsCard .pfs-window-group-done,
#windowsCard .pfs-window-group-remove {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: none;
}

#windowsCard .window-row {
  position: relative;
  padding: 8px 12px !important;
  background: #fff;
  box-shadow: inset 0 -1px 0 rgba(17,19,24,.07);
}

#windowsCard .window-row.has-group-color {
  box-shadow:
    inset 3px 0 0 var(--group-color),
    inset 0 -1px 0 rgba(17,19,24,.07);
}

#windowsCard .window-row.has-removal {
  background:
    linear-gradient(90deg, rgba(245,158,11,.10), transparent 42%),
    #fff;
}

#windowsCard .window-row.has-removal.has-group-color {
  box-shadow:
    inset 3px 0 0 var(--group-color),
    inset 0 -1px 0 rgba(17,19,24,.07);
}

#windowsCard .pfs-window-label-cell,
#windowsCard .pfs-window-measure {
  min-width: 0;
}

#windowsCard .pfs-window-label,
#windowsCard .window-input,
#windowsCard .window-quantity-input {
  width: 100%;
  max-width: none !important;
  min-height: 32px;
  border-radius: 8px !important;
  border-color: rgba(17,19,24,.13) !important;
  background: linear-gradient(180deg, #ffffff, #fbfaf7) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.74) inset;
  font-size: 12px;
}

#windowsCard .pfs-window-label {
  padding: 6px 8px;
  font-family: inherit;
  font-weight: 850;
  text-align: left;
}

#windowsCard .pfs-window-measure > span {
  display: none;
}

#windowsCard .pfs-window-removal-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  color: #5f6872;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

#windowsCard .pfs-window-removal-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #d8aa4c;
}

#summaryCard .summary-pill-removal {
  color: #8a5b08;
  background: rgba(245,158,11,.12);
  border-color: rgba(180,83,9,.20);
}

#summaryCard .summary-row,
#summaryCard .summary-row.summary-head {
  grid-template-columns: 44px 86px 64px 84px 84px;
}

@media (max-width: 768px) {
  #windowsCard {
    --pfs-window-rail: 10px;
  }

  #windowsCard > .pfs-window-settings-strip {
    grid-template-columns: 1fr;
  }

  #windowsCard > .table-header {
    display: none !important;
  }

  #windowsCard > .windows-list {
    border-top: 1px solid rgba(17,19,24,.10) !important;
    border-radius: 12px !important;
  }

  #windowsCard .pfs-window-group-header {
    grid-template-columns: minmax(0, 1fr) auto 18px;
  }

  #windowsCard .pfs-window-group-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  #windowsCard .window-row {
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
    grid-template-areas:
      "select label removal"
      ". qty qty"
      ". width height";
    gap: 8px !important;
    padding: 10px 12px !important;
    align-items: center;
  }

  #windowsCard .window-checkbox-cell { grid-area: select; }
  #windowsCard .pfs-window-label-cell { grid-area: label; }
  #windowsCard .pfs-window-removal-cell { grid-area: removal; justify-content: flex-end; }
  #windowsCard .pfs-window-qty { grid-area: qty; }
  #windowsCard .pfs-window-width-field { grid-area: width; }
  #windowsCard .pfs-window-height-field { grid-area: height; }

  #windowsCard .pfs-window-measure {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
  }

  #windowsCard .pfs-window-measure > span {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  #windowsCard .pfs-window-label,
  #windowsCard .window-input,
  #windowsCard .window-quantity-input {
    min-height: 34px;
    font-size: 16px;
  }

  #windowsCard .pfs-window-removal-cell span {
    font-size: 10px;
  }

  #windowsCard > .window-controls-bottom {
    grid-template-columns: 1fr !important;
  }

  #summaryCard .summary-table {
    overflow-x: auto;
  }

  #summaryCard .summary-row,
  #summaryCard .summary-row.summary-head {
    min-width: 430px;
  }
}

/* Windows card cleanup pass: reduce click targets and give mobile rows real space. */
#windowsCard {
  --window-cols: 30px minmax(130px, 1.45fr) 74px 46px minmax(62px, .72fr) minmax(62px, .72fr);
  --window-gap: 6px;
}

#windowsCard .pfs-window-group-header {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  min-height: 34px;
  padding: 6px 10px !important;
  cursor: default;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 13%, transparent) 0%, rgba(255,255,255,.96) 54%),
    linear-gradient(180deg, #ffffff, #f7f6f0) !important;
}

#windowsCard .pfs-window-group-chevron {
  display: none !important;
}

#windowsCard .pfs-window-group-section.is-ungrouped .pfs-window-group-header {
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
}

#windowsCard .pfs-window-group-main,
#windowsCard .pfs-window-group-title {
  gap: 7px;
}

#windowsCard .pfs-window-group-active {
  width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--group-color) 55%, rgba(17,19,24,.25) 45%) !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.75) inset !important;
}

#windowsCard .pfs-window-group-dot {
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  border-radius: 999px !important;
  background: var(--group-color) !important;
}

#windowsCard .pfs-window-group-active[aria-pressed="true"] {
  background: var(--group-color) !important;
}

#windowsCard .pfs-window-group-active[aria-pressed="true"] .pfs-window-group-dot {
  background: #fff !important;
}

#windowsCard .pfs-window-group-chip {
  width: 8px !important;
  height: 24px !important;
}

#windowsCard .pfs-window-group-main > .pfs-window-group-chip {
  display: none !important;
}

#windowsCard .pfs-window-group-section.is-ungrouped .pfs-window-group-chip {
  display: inline-block !important;
}

#windowsCard .pfs-window-group-name,
#windowsCard .pfs-window-group-name-static {
  min-height: 26px;
  padding: 4px 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

#windowsCard .pfs-window-group-name:focus {
  padding: 4px 7px !important;
  border: 1px solid rgba(17,19,24,.18) !important;
  background: #fff !important;
}

#windowsCard .pfs-window-group-meta {
  font-size: 11px !important;
}

#windowsCard .pfs-window-group-actions {
  display: flex !important;
  align-items: center;
  gap: 5px;
}

#windowsCard .pfs-window-group-done {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 26px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(121,82,18,.26) !important;
  background: linear-gradient(180deg, #f4d06f, #d8aa4c) !important;
  color: #17110a !important;
  font-size: 11px !important;
  font-weight: 950 !important;
}

#windowsCard .window-row {
  padding: 7px 10px !important;
}

#windowsCard .pfs-window-label,
#windowsCard .window-input,
#windowsCard .window-quantity-input {
  min-height: 30px;
  border-radius: 7px !important;
}

#windowsCard .pfs-window-label {
  font-weight: 800;
}

#windowsCard .pfs-window-removal-cell {
  justify-content: center;
}

#windowsCard .pfs-window-removal-cell span {
  display: none;
}

@media (max-width: 768px) {
  #windowsCard {
    --pfs-window-rail: 8px;
    --window-gap: 7px;
  }

  #windowsCard > .pfs-window-settings-strip {
    gap: 7px;
    margin-top: 10px !important;
    margin-bottom: 8px !important;
  }

  #windowsCard > .pfs-window-settings-strip .pfs-rot-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 9px !important;
  }

  #windowsCard > .pfs-window-settings-strip .pfs-rot-left {
    min-width: 0;
  }

  #windowsCard > .pfs-window-settings-strip .pfs-rot-label {
    font-size: 12px;
    line-height: 1.15;
  }

  #windowsCard > .pfs-window-settings-strip .pfs-rot-help {
    font-size: 10px;
    line-height: 1.25;
  }

  #windowsCard .pfs-window-group-header {
    grid-template-columns: minmax(0, 1fr) auto auto 14px !important;
    min-height: 40px;
    padding: 8px 10px !important;
    cursor: pointer;
  }

  #windowsCard .pfs-window-group-chevron {
    display: inline-block !important;
    font-size: 11px;
  }

  #windowsCard .pfs-window-group-name,
  #windowsCard .pfs-window-group-name-static {
    font-size: 13px !important;
  }

  #windowsCard .pfs-window-group-done {
    min-height: 24px !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
  }

  #windowsCard > .table-header {
    display: grid !important;
    grid-template-columns: 18px minmax(80px, 1fr) 18px 36px 40px 40px !important;
    gap: 5px !important;
    padding: 5px 8px !important;
    align-items: center;
    font-size: 9px !important;
    line-height: 1;
    letter-spacing: 0 !important;
    border-radius: 10px 10px 0 0 !important;
  }

  #windowsCard > .table-header > div {
    min-width: 0;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
  }

  #windowsCard > .table-header .header-label {
    text-align: left;
  }

  #windowsCard > .table-header .header-removal,
  #windowsCard > .table-header .header-width,
  #windowsCard > .table-header .header-height {
    font-size: 0 !important;
  }

  #windowsCard > .table-header .header-removal::after {
    content: "REM";
    font-size: 9px;
  }

  #windowsCard > .table-header .header-width::after {
    content: "W";
    font-size: 9px;
  }

  #windowsCard > .table-header .header-height::after {
    content: "H";
    font-size: 9px;
  }

  #windowsCard .window-row {
    grid-template-columns: 18px minmax(80px, 1fr) 18px 36px 40px 40px !important;
    grid-template-areas: "select label removal qty width height" !important;
    gap: 5px !important;
    padding: 6px 8px !important;
    align-items: center;
    min-height: 40px;
  }

  #windowsCard .window-checkbox-cell {
    grid-area: select;
    align-self: center;
  }

  #windowsCard .window-checkbox,
  #windowsCard .select-all-checkbox {
    width: 14px;
    height: 14px;
    margin: 0;
  }

  #windowsCard .pfs-window-label-cell {
    grid-area: label;
    min-width: 0;
  }

  #windowsCard .pfs-window-removal-cell {
    grid-area: removal;
    justify-content: center !important;
    min-height: 0;
    padding: 0;
    white-space: nowrap;
  }

  #windowsCard .pfs-window-removal-cell span {
    display: none !important;
  }

  #windowsCard .pfs-window-removal-checkbox {
    width: 14px;
    height: 14px;
  }

  #windowsCard .pfs-window-qty {
    grid-area: qty;
  }

  #windowsCard .pfs-window-width-field {
    grid-area: width;
  }

  #windowsCard .pfs-window-height-field {
    grid-area: height;
  }

  #windowsCard .pfs-window-measure {
    display: block !important;
    min-width: 0;
  }

  #windowsCard .pfs-window-width-field,
  #windowsCard .pfs-window-height-field {
    display: block !important;
  }

  #windowsCard .pfs-window-measure > span {
    display: none !important;
  }

  #windowsCard .pfs-window-label,
  #windowsCard .window-input,
  #windowsCard .window-quantity-input {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    box-sizing: border-box;
    font-size: 14px !important;
    line-height: 1;
  }

  #windowsCard .pfs-window-label {
    padding: 4px 6px !important;
  }

  #windowsCard .window-input,
  #windowsCard .window-quantity-input {
    max-width: none !important;
    padding: 3px 2px !important;
    text-align: center;
  }

  #windowsCard > .window-controls-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  #windowsCard > .window-controls-bottom .btn-delete-selected {
    grid-column: 1 / -1;
  }

  #windowsCard > .window-controls-bottom .btn-delete-selected:disabled {
    display: none !important;
  }
}

/* Windows card correction: per-group headers, far-right removal, square selectors. */
#windowsCard {
  --window-cols: 30px minmax(128px, 1.35fr) 46px minmax(60px, .62fr) minmax(60px, .62fr) 84px;
  --window-gap: 6px;
}

#windowsCard > .table-header {
  display: none !important;
}

#windowsCard .pfs-window-group-header {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 16%, transparent) 0%, rgba(255,255,255,.94) 62%),
    linear-gradient(180deg, #ffffff, #f6f5ef) !important;
}

#windowsCard .pfs-window-group-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

#windowsCard .pfs-window-group-active,
#windowsCard .pfs-window-group-done,
#windowsCard .pfs-window-group-remove {
  width: auto !important;
  height: auto !important;
  min-height: 26px !important;
  padding: 4px 9px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(17,19,24,.14) !important;
  background: rgba(255,255,255,.78) !important;
  color: #111318 !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

#windowsCard .pfs-window-group-active[aria-pressed="true"],
#windowsCard .pfs-window-group-done {
  border-color: rgba(121,82,18,.28) !important;
  background: linear-gradient(180deg, #f4d06f, #d8aa4c) !important;
  color: #17110a !important;
}

#windowsCard .pfs-window-group-remove {
  color: #8f332f !important;
}

#windowsCard .pfs-window-group-dot,
#windowsCard .pfs-window-group-chip {
  display: none !important;
}

#windowsCard .pfs-window-group-table-header,
#windowsCard .window-row {
  display: grid !important;
  grid-template-columns: var(--window-cols) !important;
  gap: var(--window-gap) !important;
  align-items: center;
}

#windowsCard .pfs-window-group-table-header {
  padding: 6px 10px;
  background: rgba(248,250,252,.86);
  border-bottom: 1px solid rgba(17,19,24,.08);
  color: #65717e;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

#windowsCard .pfs-window-group-table-header > div {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

#windowsCard .pfs-window-group-table-header > div:nth-child(2) {
  text-align: left;
}

#windowsCard .window-row {
  grid-template-areas: "select label qty width height removal" !important;
}

#windowsCard .window-checkbox-cell { grid-area: select !important; }
#windowsCard .pfs-window-label-cell { grid-area: label !important; }
#windowsCard .pfs-window-qty { grid-area: qty !important; }
#windowsCard .pfs-window-width-field { grid-area: width !important; }
#windowsCard .pfs-window-height-field { grid-area: height !important; }
#windowsCard .pfs-window-removal-cell { grid-area: removal !important; }

#windowsCard .window-checkbox,
#windowsCard .select-all-checkbox,
#windowsCard .pfs-window-removal-checkbox {
  border-radius: 2px !important;
}

#windowsCard .pfs-window-removal-cell {
  justify-content: center !important;
  gap: 5px;
}

#windowsCard .pfs-window-removal-cell span {
  display: inline !important;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 768px) {
  #windowsCard {
    --window-cols: 16px minmax(70px, 1fr) 34px 38px 38px 66px;
    --window-gap: 5px;
  }

  #windowsCard .pfs-window-group-header {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 6px;
  }

  #windowsCard .pfs-window-group-chevron {
    display: none !important;
  }

  #windowsCard .pfs-window-group-actions {
    grid-column: auto !important;
    grid-row: auto !important;
    gap: 4px;
    flex-wrap: nowrap;
  }

  #windowsCard .pfs-window-group-active,
  #windowsCard .pfs-window-group-done,
  #windowsCard .pfs-window-group-remove {
    min-height: 24px !important;
    padding: 3px 6px !important;
    font-size: 10px !important;
  }

  #windowsCard .pfs-window-group-table-header,
  #windowsCard .window-row {
    grid-template-columns: var(--window-cols) !important;
    gap: var(--window-gap) !important;
  }

  #windowsCard .pfs-window-group-table-header {
    display: grid !important;
    padding: 5px 8px;
    font-size: 9px;
  }

  #windowsCard .pfs-window-group-table-header > div:nth-child(4) {
    font-size: 0;
  }

  #windowsCard .pfs-window-group-table-header > div:nth-child(4)::after {
    content: "W";
    font-size: 9px;
  }

  #windowsCard .pfs-window-group-table-header > div:nth-child(5) {
    font-size: 0;
  }

  #windowsCard .pfs-window-group-table-header > div:nth-child(5)::after {
    content: "H";
    font-size: 9px;
  }

  #windowsCard .window-row {
    grid-template-areas: "select label qty width height removal" !important;
    min-height: 40px;
    padding: 6px 8px !important;
  }

  #windowsCard .window-checkbox,
  #windowsCard .pfs-window-removal-checkbox {
    width: 14px;
    height: 14px;
  }

  #windowsCard .pfs-window-removal-cell {
    gap: 3px;
  }

  #windowsCard .pfs-window-removal-cell span {
    font-size: 9px;
  }

  #windowsCard .window-input,
  #windowsCard .window-quantity-input {
    max-width: none !important;
    padding: 3px 2px !important;
    text-align: center;
  }
}

/* Windows card final group-flow polish. */
#windowsCard .pfs-window-group-header {
  grid-template-columns: minmax(0, 1fr) auto auto 12px !important;
}

#windowsCard .pfs-window-group-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

#windowsCard .pfs-window-group-destination-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(17,19,24,.14);
  border-radius: 7px;
  background: rgba(255,255,255,.78);
  box-shadow: none;
  cursor: pointer;
}

#windowsCard .pfs-window-group-destination {
  width: 14px;
  height: 14px;
  margin: 0;
  border-radius: 2px !important;
  accent-color: #d8aa4c;
  cursor: pointer;
}

#windowsCard .pfs-window-group-active,
#windowsCard .pfs-window-group-done {
  display: none !important;
}

#windowsCard .pfs-window-removal-cell {
  justify-content: center !important;
  gap: 0 !important;
}

#windowsCard .pfs-window-removal-cell span {
  display: none !important;
}

#windowsCard .pfs-window-group-section:not(.is-ungrouped) .pfs-window-group-table-header {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 12%, transparent) 0%, rgba(248,250,252,.92) 72%),
    rgba(248,250,252,.86) !important;
}

#windowsCard .window-row.has-group-color {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 13%, transparent) 0%, rgba(255,255,255,.97) 72%),
    #fff !important;
  box-shadow: inset 0 -1px 0 rgba(17,19,24,.07) !important;
}

#windowsCard .window-row.has-removal.has-group-color {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 13%, rgba(245,158,11,.09)) 0%, rgba(255,255,255,.97) 72%),
    #fff !important;
}

@media (max-width: 768px) {
  #windowsCard {
    --window-cols: 16px minmax(96px, 1fr) 30px 36px 36px 44px;
    --window-gap: 5px;
  }

  #windowsCard .pfs-window-group-header {
    grid-template-columns: minmax(0, 1fr) auto auto 12px !important;
  }

  #windowsCard .pfs-window-group-destination-control {
    width: 24px;
    height: 24px;
  }

  #windowsCard .pfs-window-group-destination {
    width: 14px;
    height: 14px;
  }

  #windowsCard input.pfs-window-group-name {
    font-size: 16px !important;
    line-height: 1 !important;
    min-height: 24px;
    padding: 1px 0 !important;
  }

  #windowsCard input.pfs-window-group-name:focus {
    padding: 1px 6px !important;
  }

  #windowsCard .pfs-window-label,
  #windowsCard .window-input,
  #windowsCard .window-quantity-input {
    font-size: 16px !important;
    line-height: 1 !important;
    min-height: 24px !important;
    padding: 1px 2px !important;
  }

  #windowsCard .pfs-window-label {
    padding-left: 5px !important;
    text-align: left;
  }

  #windowsCard .pfs-window-group-table-header {
    font-size: 8px;
  }

  #windowsCard .pfs-window-group-table-header > div:nth-child(6) {
    transform: scale(.86);
  }

  #windowsCard > .window-controls-bottom {
    grid-template-columns: repeat(2, minmax(0, 146px)) !important;
    justify-content: center;
    gap: 9px;
    margin-top: 14px !important;
    padding-top: 4px !important;
  }

  #windowsCard > .window-controls-bottom .btn-add-window,
  #windowsCard > .window-controls-bottom .btn-group-selected {
    min-height: 36px !important;
    padding: 7px 10px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
  }

  #windowsCard > .window-controls-bottom .btn-delete-selected {
    min-height: 34px !important;
    padding: 7px 10px !important;
    grid-column: 1 / -1;
    justify-self: center;
    width: min(146px, 100%) !important;
  }
}

#windowsCard .pfs-window-group-chevron {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 12px;
  color: #64748b;
  font-size: 10px;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform .14s ease;
}

#windowsCard .pfs-window-group-section[open] .pfs-window-group-chevron {
  transform: rotate(0deg);
}

/* Windows card name/edit hit-area polish. */
#windowsCard .pfs-window-group-main {
  justify-self: stretch;
}

#windowsCard .pfs-window-group-name {
  width: auto !important;
  max-width: min(100%, 28ch) !important;
  min-width: 0 !important;
  field-sizing: content;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

#windowsCard .pfs-window-group-name:focus {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

#windowsCard .pfs-window-group-table-header > div:nth-child(2) {
  text-align: center !important;
}

#windowsCard .pfs-window-label {
  font-weight: 500 !important;
}

@media (max-width: 768px) {
  #windowsCard .pfs-window-group-name,
  #windowsCard input.pfs-window-group-name,
  #windowsCard input.pfs-window-group-name:focus {
    width: auto !important;
    max-width: min(100%, 22ch) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #windowsCard .pfs-window-label {
    font-weight: 500 !important;
  }
}

/* Windows card final polish: group selection/removal, non-pastel color wash, and clearer chevrons. */
#windowsCard .pfs-window-group-header {
  grid-template-columns: minmax(0, 1fr) auto 18px !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 15%, #f6f1e7 85%) 0%, #fbfaf7 62%),
    linear-gradient(180deg, #ffffff, #f7f5ef) !important;
}

#windowsCard .pfs-window-group-section.is-ungrouped .pfs-window-group-header {
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
}

#windowsCard .pfs-window-group-section:not(.is-ungrouped) .pfs-window-group-table-header {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 11%, #f3f1ea 89%) 0%, #f8fafc 72%),
    #f8fafc !important;
}

#windowsCard .window-row.has-group-color {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 12%, #fbfaf7 88%) 0%, #ffffff 72%),
    #ffffff !important;
  box-shadow: inset 0 -1px 0 rgba(17,19,24,.07) !important;
}

#windowsCard .window-row.has-removal.has-group-color {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 10%, #fbf3e3 90%) 0%, #ffffff 72%),
    #ffffff !important;
}

#windowsCard .pfs-window-group-chevron {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 18px !important;
  height: 18px !important;
  color: #606873 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  transform: rotate(-90deg);
  transition: transform .14s ease;
}

#windowsCard .pfs-window-group-section[open] .pfs-window-group-chevron {
  transform: rotate(0deg);
}

#windowsCard .pfs-window-group-actions,
#windowsCard .pfs-window-group-remove {
  display: none !important;
}

#windowsCard > .window-controls-bottom:not(.pfs-has-danger-action) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#windowsCard > .window-controls-bottom.pfs-has-danger-action {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#windowsCard > .window-controls-bottom .pfs-window-action-hidden {
  display: none !important;
}

#windowsCard > .window-controls-bottom.pfs-has-group-removal .btn-delete-selected {
  opacity: 1 !important;
  border-color: rgba(143, 51, 47, .36) !important;
  background:
    linear-gradient(180deg, #fffdfb, #f7f1ed) !important;
  color: #8f332f !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.84) inset,
    0 10px 22px rgba(143,51,47,.09) !important;
  filter: none !important;
}

#windowsCard > .window-controls-bottom.pfs-has-group-removal .btn-delete-selected:hover {
  border-color: rgba(143, 51, 47, .48) !important;
  background:
    linear-gradient(180deg, #ffffff, #f4eae6) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.88) inset,
    0 12px 24px rgba(143,51,47,.12) !important;
}

#windowsCard > .window-controls-bottom.pfs-has-multi-group-removal .btn-add-window,
#windowsCard > .window-controls-bottom.pfs-has-multi-group-removal .btn-group-selected {
  opacity: .48;
}

@media (max-width: 768px) {
  #windowsCard .pfs-window-group-header {
    grid-template-columns: minmax(0, 1fr) auto 18px !important;
  }

  #windowsCard .pfs-window-group-chevron {
    width: 18px !important;
    height: 18px !important;
    font-size: 16px !important;
  }

  #windowsCard > .window-controls-bottom.pfs-has-danger-action,
  #windowsCard > .window-controls-bottom:not(.pfs-has-danger-action) {
    grid-template-columns: repeat(2, minmax(0, 146px)) !important;
  }

  #windowsCard > .window-controls-bottom.pfs-has-danger-action .btn-delete-selected {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(146px, 100%) !important;
  }
}

/* Groups card overview: read-only group accordions matching the Windows card. */
#summaryCard {
  --summary-cols: minmax(104px, 1fr) 34px minmax(64px, .58fr) 74px 82px 54px;
  --summary-gap: 5px;
}

#summaryCard .summary-groups {
  padding: 12px 14px 14px !important;
  display: grid !important;
  gap: 10px !important;
  min-width: 0;
}

#summaryCard .pfs-summary-group-wrap,
#summaryCard .summary-group,
#summaryCard .summary-group-body {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#summaryCard .pfs-summary-group-wrap {
  --group-color: transparent;
}

#summaryCard .summary-group {
  overflow: hidden !important;
  border: 1px solid rgba(17,19,24,.10) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.78) inset,
    0 10px 24px rgba(17,19,24,.055) !important;
}

#summaryCard .summary-group > summary {
  list-style: none;
}

#summaryCard .summary-group > summary::-webkit-details-marker {
  display: none;
}

#summaryCard .summary-group-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  min-height: 38px !important;
  padding: 7px 10px !important;
  cursor: pointer;
  color: #111318 !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 15%, #f6f1e7 85%) 0%, #fbfaf7 62%),
    linear-gradient(180deg, #ffffff, #f7f5ef) !important;
  border-bottom: 1px solid rgba(17,19,24,.08) !important;
}

#summaryCard .summary-group.is-ungrouped .summary-group-summary {
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
}

#summaryCard .summary-group:not([open]) .summary-group-summary {
  border-bottom: 0 !important;
}

#summaryCard .summary-group-left {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#summaryCard .summary-group-dot {
  display: none !important;
}

#summaryCard .summary-group-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111318 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: 0;
}

#summaryCard .summary-group-right {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

#summaryCard .summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 8px !important;
  border: 1px solid rgba(17,19,24,.10) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.74) !important;
  color: #606873 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

#summaryCard .summary-pill-area {
  color: #17110a !important;
  border-color: color-mix(in srgb, var(--group-color) 34%, rgba(17,19,24,.10)) !important;
  background: color-mix(in srgb, var(--group-color) 14%, #ffffff 86%) !important;
}

#summaryCard .summary-pill-removal {
  color: #8a5b08 !important;
  background: rgba(245,158,11,.12) !important;
  border-color: rgba(180,83,9,.20) !important;
}

#summaryCard .summary-chevron {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 18px !important;
  height: 18px !important;
  color: #606873 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  transform: rotate(-90deg);
  transition: transform .14s ease;
}

#summaryCard .summary-group[open] .summary-chevron {
  transform: rotate(0deg);
}

#summaryCard .summary-group-body {
  padding: 0 !important;
  border-top: 0 !important;
  background: #fff !important;
  color: #111318 !important;
}

#summaryCard .summary-table {
  display: block !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

#summaryCard .summary-group-table-header,
#summaryCard .summary-row {
  display: grid !important;
  grid-template-columns: var(--summary-cols) !important;
  gap: var(--summary-gap) !important;
  align-items: center;
}

#summaryCard .summary-group-table-header {
  padding: 6px 10px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 11%, #f3f1ea 89%) 0%, #f8fafc 72%),
    #f8fafc !important;
  border-bottom: 1px solid rgba(17,19,24,.08);
  color: #65717e;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

#summaryCard .summary-group.is-ungrouped .summary-group-table-header {
  background: rgba(248,250,252,.92) !important;
}

#summaryCard .summary-group-table-header > div,
#summaryCard .summary-row > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

#summaryCard .summary-group-table-header > div:first-child,
#summaryCard .summary-row > div:first-child {
  text-align: left;
}

#summaryCard .summary-row {
  min-height: 38px;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 9%, #fbfaf7 91%) 0%, #ffffff 72%),
    #fff !important;
  box-shadow: inset 0 -1px 0 rgba(17,19,24,.07) !important;
  color: #111318 !important;
  font-size: 12px !important;
}

#summaryCard .summary-row:last-child {
  box-shadow: none !important;
}

#summaryCard .summary-row.has-removal {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--group-color) 8%, #fbf3e3 92%) 0%, #ffffff 72%),
    #fff !important;
}

#summaryCard .summary-window-name {
  font-weight: 800;
}

#summaryCard .summary-removal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid rgba(17,19,24,.10);
  border-radius: 999px;
  background: rgba(248,250,252,.86);
  color: #65717e;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

#summaryCard .summary-removal-badge.is-required {
  color: #8a5b08;
  background: rgba(245,158,11,.12);
  border-color: rgba(180,83,9,.20);
}

#summaryCard .group-rename-btn {
  display: none !important;
}

@media (max-width: 768px) {
  #summaryCard {
    --summary-cols: 88px 30px 58px 66px 78px 54px;
    --summary-gap: 4px;
  }

  #summaryCard .summary-groups {
    padding: 10px !important;
  }

  #summaryCard .summary-group-summary {
    grid-template-columns: minmax(0, 1fr) auto 18px;
    gap: 6px;
    padding: 7px 9px !important;
  }

  #summaryCard .summary-group-right {
    flex-wrap: wrap;
    gap: 5px;
  }

  #summaryCard .summary-pill {
    min-height: 22px;
    padding: 5px 7px !important;
    font-size: 10px !important;
  }

  #summaryCard .summary-group-table-header,
  #summaryCard .summary-row {
    min-width: 394px;
  }

  #summaryCard .summary-group-table-header {
    padding: 6px 8px;
    font-size: 9px;
  }

  #summaryCard .summary-row {
    min-height: 36px;
    padding: 7px 8px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 520px) {
  #summaryCard .summary-group-summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  #summaryCard .summary-group-right {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  #summaryCard .summary-chevron {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Keep late cut/output action overrides on the shared modern gold recipe. */
.rollfit-banner-notice-warn .rollfit-banner-action,
.pfs-auth-btn-primary,
#accountRoot #fyAccountSaveBtn,
#settingsRoot .fy-settings-actions-right-pricing #fySettingsSaveBtn,
.pfs-sunmap-cta #pfsCustomerSunMapBtn,
#fySunPreviewOpen,
.fy-finish-remaining .fy-finish-actions-row .btn-output-primary,
.results-section .fy-cut-actions:not(.fy-cut-actions-mobile) [data-opt-action="open-cut-diagram"].btn-output,
.results-section .fy-cut-actions:not(.fy-cut-actions-mobile) [data-opt-action="open-window-list"].btn-output,
.results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="view-plan-roll"][data-view="diagram"].btn-output,
.results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="view-plan-roll"][data-view="windows"].btn-output,
.results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="finish-open-view"][data-view="diagram"].btn-output,
.results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="finish-open-view"][data-view="windows"].btn-output,
.results-section .fy-cut-actions-mobile [data-opt-action].btn-output,
.results-section .fy-cut-actions-row-mobile [data-opt-action].btn-output{
  background:var(--pfs-gold-button-bg) !important;
  border-color:var(--pfs-gold-button-border, #8c641b) !important;
  color:var(--pfs-gold-button-text, #241f15) !important;
  box-shadow:var(--pfs-gold-button-shadow) !important;
  text-shadow:none !important;
}

.rollfit-banner-notice-warn .rollfit-banner-action:hover,
.pfs-auth-btn-primary:hover,
#accountRoot #fyAccountSaveBtn:hover,
#settingsRoot .fy-settings-actions-right-pricing #fySettingsSaveBtn:hover,
.pfs-sunmap-cta #pfsCustomerSunMapBtn:hover,
#fySunPreviewOpen:hover,
.fy-finish-remaining .fy-finish-actions-row .btn-output-primary:hover,
.results-section .fy-cut-actions:not(.fy-cut-actions-mobile) [data-opt-action="open-cut-diagram"].btn-output:hover,
.results-section .fy-cut-actions:not(.fy-cut-actions-mobile) [data-opt-action="open-window-list"].btn-output:hover,
.results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="view-plan-roll"][data-view="diagram"].btn-output:hover,
.results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="view-plan-roll"][data-view="windows"].btn-output:hover,
.results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="finish-open-view"][data-view="diagram"].btn-output:hover,
.results-section .fy-cut-actions-row:not(.fy-cut-actions-row-mobile) [data-opt-action="finish-open-view"][data-view="windows"].btn-output:hover,
.results-section .fy-cut-actions-mobile [data-opt-action].btn-output:hover,
.results-section .fy-cut-actions-row-mobile [data-opt-action].btn-output:hover{
  background:var(--pfs-gold-button-bg-hover) !important;
  border-color:var(--pfs-gold-button-border-hover, #7b5515) !important;
  box-shadow:var(--pfs-gold-button-shadow-hover) !important;
  color:var(--pfs-gold-button-text, #241f15) !important;
}
