/* Break-even adjustment references — always visible; inner content by displayState */
.s03v2-region-be-adj {
  border-left: 3px solid #b45309;
}

.s03v2-region-be-adj .qhc-region-title {
  background: rgba(180, 83, 9, 0.1);
  color: #9a3412;
}

.s03v2-be-adj-explainer {
  color: #3f3f46;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

.s03v2-be-adj-footer {
  color: #57534e;
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 10px 0 0;
}

.s03v2-be-adj-status,
.s03v2-be-adj-incomplete-lead {
  color: #3f3f46;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

.s03v2-be-adj-missing-list {
  color: #57534e;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.s03v2-be-adj-missing-list li {
  margin: 0 0 4px;
}

.s03v2-be-adj-results {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.s03v2-be-adj-row {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(180, 83, 9, 0.16);
  border-radius: 6px;
  box-sizing: border-box;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.s03v2-be-adj-card-title {
  color: #57534e;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.s03v2-be-adj-result {
  color: #1c1917;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.4;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Tip / lead / secondary lines share daily-card note typography (not amount style). */
.s03v2-be-adj-result-note,
.s03v2-be-adj-result-secondary {
  color: #57534e;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.s03v2-be-adj-result--reason,
.s03v2-be-adj-result--pending {
  color: #78716c;
  font-weight: 500;
}

@media (min-width: 900px) {
  .s03v2-be-adj-results {
    align-items: start;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .s03v2-be-adj-results {
    grid-template-columns: 1fr;
  }

  .s03v2-be-adj-result,
  .s03v2-be-adj-result-note,
  .s03v2-be-adj-result-secondary {
    overflow-wrap: anywhere;
  }
}

.s03v2-module {
  display: grid;
  gap: 0.7rem;
}

.s03v2-date-panel h3,
.s03v2-control-block h4,
.s03v2-currency-heading {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.s03v2-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.s03v2-presets button {
  border: 1px solid #d8d0c4;
  background: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.s03v2-presets button[aria-pressed="true"] {
  background: #2f5d50;
  border-color: #2f5d50;
  color: #fff;
}

/*
 * mobile-three-layout-breakages-fix-001 (supplement):
 * Analysis period presets — equal 2-col grid on narrow screens.
 * Custom dates stays one cell (last row, left); never spans both columns.
 * Desktop (≥700) keeps content-sized flex wrap pills unchanged.
 */
@media (max-width: 699px) {
  .s03v2-presets {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  .s03v2-presets button {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    height: auto;
    justify-content: center;
    justify-self: stretch;
    max-width: 100%;
    min-height: 44px;
    min-width: 0;
    overflow: visible;
    overflow-wrap: break-word;
    padding: 0.45rem 0.55rem;
    text-align: center;
    text-overflow: clip;
    white-space: normal;
    width: 100%;
  }

  .s03v2-presets button[data-s03v2-preset="custom"] {
    grid-column: auto;
  }

  .s03v2-presets button[aria-pressed="true"] {
    /* Selection is color-only — same box size as unselected. */
    padding: 0.45rem 0.55rem;
  }
}

.s03v2-custom-dates {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.55rem;
  min-width: 0;
}

.s03v2-custom-dates label {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.s03v2-date-incomplete-hint,
.s03v2-date-panel > .s03v2-state-guide {
  background: #f2f7f4;
  border: 1px solid #d7e3de;
  border-radius: 8px;
  box-sizing: border-box;
  color: #5b6b66;
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.45;
  margin: 0.55rem 0 0;
  padding: 8px 10px;
}

@media (max-width: 699px) {
  .s03v2-date-incomplete-hint,
  .s03v2-date-panel > .s03v2-state-guide {
    font-size: 0.84rem;
    margin-top: 0.5rem;
    padding: 8px 10px;
    width: 100%;
  }

  .s03v2-custom-dates {
    column-gap: 0.45rem;
  }
}

.s03v2-control-panel {
  padding: 0.7rem 0.85rem;
}

.s03v2-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.s03v2-control-label {
  display: block;
  font-size: 0.78rem;
  color: #6a6358;
}

.s03v2-completeness-main {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.s03v2-completeness-missing-line {
  margin: 0;
  color: #6a6358;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.s03v2-completeness-missing-line span {
  font-weight: 800;
}

.s03v2-empty-results {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #ddd4c1;
  border-radius: 16px;
  background: #fffdfa;
}

.s03v2-action-guide {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
  padding: 14px 16px;
  border: 1px solid #c9ddd2;
  border-radius: 16px;
  background: #f1f7f3;
}

.s03v2-action-guide-note {
  margin: 0;
  color: #2f4a40;
  font-size: 0.95rem;
  line-height: 1.4;
}

.s03v2-action-guide .primary-action {
  justify-self: start;
  min-height: 44px;
}

.s03v2-sale-cost-guide {
  display: grid;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 14px 16px;
  border: 1px solid #e2d4b8;
  border-radius: 16px;
  background: #fffaf0;
}

.s03v2-sale-cost-guide h4 {
  margin: 0;
  font-size: 1rem;
  color: #5c4a1f;
}

.s03v2-sale-cost-guide h5 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: #3f3f46;
}

.s03v2-sale-cost-s01s03 {
  margin: 0;
  color: #57534e;
  font-size: 0.9rem;
  line-height: 1.45;
}

.s03v2-sale-cost-block {
  display: grid;
  gap: 8px;
}

.s03v2-sale-cost-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.s03v2-sale-cost-item {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e8dfc8;
  border-radius: 12px;
  background: #fff;
}

.s03v2-sale-cost-item-main {
  display: grid;
  gap: 6px;
}

.s03v2-sale-cost-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.s03v2-sale-cost-match-row select {
  width: 100%;
  min-height: 44px;
}

.s03v2-sale-cost-match-hint,
.s03v2-sale-cost-suggest {
  margin: 0;
  color: #78716c;
  font-size: 0.85rem;
  line-height: 1.35;
}

.s03v2-sale-cost-guide .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 699px) {
  .s03v2-sale-cost-match-row {
    grid-template-columns: 1fr;
  }

  .s03v2-sale-cost-match-row .primary-action,
  .s03v2-sale-cost-item .primary-action,
  .s03v2-sale-cost-item .secondary-action {
    width: 100%;
  }
}

.s03v2-profit-hero {
  margin: 0 0 12px;
}

.s03v2-profit-hero .qhc-metric--primary {
  padding: 14px 16px;
  border-radius: 14px;
  background: #eef6f1;
  border: 1px solid #c9ddd2;
}

.s03v2-profit-hero .qhc-metric-value {
  font-size: 1.35rem;
}

.s03v2-profit-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.s03v2-tool {
  margin: 10px 0 0;
  border: 1px solid #ddd4c1;
  border-radius: 14px;
  background: #fffdfa;
}

.s03v2-tool-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 750;
  color: #193c31;
}

.s03v2-tool-summary-heading {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-weight: inherit;
  color: inherit;
}

.s03v2-tool-summary::-webkit-details-marker {
  display: none;
}

/* section-expand-collapse-control-visibility-001:
   section-level tool disclosure control only (Break-Even Targets, etc.).
   Visible circle ~36px; arrow ~19px / stroke ~2.75; hit pad ≥44×44 via ::before.
   Collapsed = down; expanded = up. Does not target More details / select carets. */
.s03v2-tool-chevron {
  align-items: center;
  background: #edf4ef;
  border: 1px solid #b4c8bd;
  border-radius: 999px;
  box-sizing: border-box;
  color: #214f3e;
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  width: 36px;
}

.s03v2-tool-chevron::before {
  content: "";
  height: 44px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
}

.s03v2-tool-chevron::after {
  border-bottom: 2.75px solid currentColor;
  border-right: 2.75px solid currentColor;
  box-sizing: border-box;
  content: "";
  height: 0.62rem;
  margin-top: -0.18rem;
  position: relative;
  transform: rotate(45deg);
  transition: transform 0.16s ease, margin-top 0.16s ease;
  width: 0.62rem;
}

.s03v2-tool-summary:hover .s03v2-tool-chevron {
  background: #e0eee6;
  border-color: #9bb5a8;
  box-shadow: 0 0 0 2px rgba(33, 79, 62, 0.08);
}

.s03v2-tool-summary:focus-visible {
  border-radius: 10px;
  outline: 2px solid #214f3e;
  outline-offset: 2px;
}

.s03v2-tool-summary:focus-visible .s03v2-tool-chevron {
  background: #d8eae0;
  border-color: #7fa093;
  box-shadow: 0 0 0 2px rgba(33, 79, 62, 0.16);
}

.s03v2-tool-summary:active .s03v2-tool-chevron {
  background: #d2e6da;
  transform: scale(0.96);
}

.s03v2-tool[open] > .s03v2-tool-summary .s03v2-tool-chevron::after {
  margin-top: 0.18rem;
  transform: rotate(225deg);
}

.s03v2-tool-body {
  padding: 0 14px 14px;
}

.s03v2-state-guide,
.s03v2-multi-currency,
.s03v2-date-error {
  margin: 0;
}

.s03v2-date-error {
  color: #9b2c2c;
}

@media (max-width: 720px) {
  .s03v2-profit-secondary {
    grid-template-columns: 1fr;
  }

  .s03v2-action-guide .primary-action {
    width: 100%;
    justify-self: stretch;
  }
}

.s03v2-future {
  padding: 0.7rem 0.85rem;
}

.s03v2-settlement-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}

.s03v2-settlement-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.s03v2-settlement-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.s03v2-settlement-block li,
.s03v2-settlement-block p {
  margin: 0;
  overflow-wrap: anywhere;
}

.s03v2-module .qhc-results {
  gap: 0.75rem;
}

.s03v2-module .qhc-result-region {
  margin: 0;
}

.s03v2-module .qhc-efficiency-grid {
  align-items: stretch;
}

.s03v2-module .qhc-eff-group {
  align-content: start;
  grid-auto-rows: min-content;
  height: auto;
}

.s03v2-module .qhc-region-title {
  margin-bottom: 0.4rem;
}

.s03v2-efficiency-short-hint,
.s03v2-efficiency-basis {
  margin: 0 0 0.45rem;
  color: #6a6358;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.s03v2-module .qhc-eff-title {
  align-content: start;
  min-height: 0;
}

.s03v2-module .qhc-region-be-payback.qhc-region--empty .qhc-be-payback-grid {
  display: none;
}

@media (max-width: 700px) {
  .s03v2-control-grid {
    grid-template-columns: 1fr;
  }

  .s03v2-settlement-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .s03v2-control-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.s03v2-inventory {
  padding: 0.75rem 0.85rem;
}

.s03v2-inventory-summary {
  margin: 0.45rem 0 0.55rem;
}

.s03v2-inventory-used-label,
.s03v2-inventory-asof,
.s03v2-inventory-missing,
.s03v2-inventory-error,
.s03v2-inventory-message,
.s03v2-inventory-field-hint {
  margin: 0.15rem 0;
  color: #6a6358;
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.s03v2-inventory-amount {
  margin: 0.2rem 0;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  word-break: normal;
}

.s03v2-inventory-amount strong {
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}

.s03v2-inventory-message[data-kind="success"] {
  color: #2f5d50;
  font-weight: 700;
}

.s03v2-inventory-message[data-kind="error"],
.s03v2-inventory-error {
  color: #8a3b2d;
  font-weight: 700;
}

.s03v2-inventory-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  align-items: end;
  margin-top: 0.55rem;
}

.s03v2-inventory-field {
  display: grid;
  gap: 0.25rem;
  min-width: 9rem;
}

.s03v2-inventory-amount-field {
  min-width: 14rem;
  flex: 1 1 14rem;
}

.s03v2-inventory-amount-input-wrap {
  align-items: center;
  display: flex;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
}

.s03v2-inventory-currency-affix,
.s03v2-inventory-currency-code {
  color: #5c564c;
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.s03v2-inventory-amount-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
}

.s03v2-inventory-field input,
.s03v2-inventory-field select {
  min-height: 2.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #d8d0c4;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
  max-width: 100%;
}

.s03v2-inventory-field input:focus,
.s03v2-inventory-field select:focus {
  border-color: #0f766e;
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: 1px;
}

.s03v2-inventory-amount-field input {
  min-width: 12rem;
  width: 100%;
  font-variant-numeric: tabular-nums;
  padding-inline: 0.7rem;
}

.s03v2-inventory-save-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  flex: 0 0 auto;
}

.s03v2-inventory-save-wrap .primary-action,
.s03v2-inventory-actions .primary-action,
.s03v2-inventory-actions .secondary-action {
  justify-content: center;
  min-width: 8.5rem;
  text-align: center;
  white-space: nowrap;
}

.s03v2-inventory-actions {
  margin-top: 0.55rem;
}

@media (max-width: 1024px) {
  .s03v2-inventory-save-wrap {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  .s03v2-inventory-fields {
    display: grid;
    grid-template-columns: 1fr;
  }

  .s03v2-inventory-amount-field,
  .s03v2-inventory-amount-field input {
    min-width: 0;
  }
}

/* FND-405 — Current Working Capital Position */
.s03v2-wc {
  padding: 0.75rem 0.85rem;
  margin-top: 0.65rem;
}

.s03v2-wc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.55rem;
  table-layout: fixed;
}

.s03v2-wc-table .visually-hidden,
.s03v2-wc .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.s03v2-wc-symbol {
  width: 1.6rem;
  vertical-align: top;
  padding: 0.35rem 0.25rem 0.35rem 0;
  color: #5c564c;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.s03v2-wc-label {
  vertical-align: top;
  padding: 0.35rem 0.5rem 0.35rem 0;
  min-width: 0;
}

.s03v2-wc-name {
  display: block;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.s03v2-wc-meta {
  display: block;
  margin-top: 0.15rem;
  color: #6a6358;
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.35;
}

.s03v2-wc-amount {
  /* td must stay table-cell — .smp-money's inline-block would collapse the column. */
  box-sizing: border-box;
  color: #2f2a24;
  display: table-cell;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  max-width: none;
  min-width: 11.75rem; /* fits −999,999,999.99 without internal scroll */
  overflow: visible;
  overflow-wrap: normal;
  padding: 0.35rem 0;
  text-align: right;
  text-overflow: clip;
  vertical-align: top;
  white-space: nowrap;
  width: 46%;
  word-break: normal;
}

/* Sign + digits stay one unbreakable amount (WC card only). */
.s03v2-wc-amount-value {
  display: inline-block;
  max-width: none;
  overflow: visible;
  white-space: nowrap;
}

.s03v2-wc-amount-value.smp-money {
  display: inline-block;
  max-width: none;
  min-width: 0;
  overflow: visible;
  overflow-x: visible;
}

.s03v2-wc-amount--dash {
  font-weight: 650;
  color: #6a6358;
}

.s03v2-wc-amount--negative {
  color: #9b2c2c;
}

.s03v2-wc-row--total {
  border-top: 1px solid #d9d2c6;
}

.s03v2-wc-row--total .s03v2-wc-name,
.s03v2-wc-row--total .s03v2-wc-amount {
  padding-top: 0.55rem;
  font-size: 1.02em;
}

.s03v2-wc-status {
  margin: 0.45rem 0 0;
  color: #6a6358;
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.s03v2-wc-status--error,
.s03v2-wc-status--negative {
  color: #9b2c2c;
}

.s03v2-wc-inventory-action {
  margin-top: 0.55rem;
}

.s03v2-wc-edit-inventory {
  appearance: none;
  border: 1px solid #cfc6b6;
  background: #fff;
  color: #2f2a24;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

/* FND-406 — Working Capital Metrics (inventory-to-sales ratio)
 * restaurant-desktop-working-capital-metrics-open-fix-001:
 * WCM is a shared <details.s03v2-tool> on every viewport. Keep display:block —
 * never inherit `.qhc-card { display:grid }`, which breaks native details open/close. */
.s03v2-wcm {
  box-sizing: border-box;
  display: block;
  padding: 0.75rem 0.85rem;
  min-width: 0;
}

.s03v2-wcm.s03v2-tool > .s03v2-tool-summary {
  padding: 0;
  min-height: 44px;
}

.s03v2-wcm.s03v2-tool > .s03v2-tool-body {
  padding: 0.35rem 0 0;
}

.s03v2-wcm.s03v2-tool:not([open]) > .s03v2-tool-body {
  display: none;
}

.s03v2-wcm-block + .s03v2-wcm-block {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e6e0d6;
}

.s03v2-wcm-label {
  margin: 0.4rem 0 0;
  font-weight: 650;
  color: #2f2a24;
  overflow-wrap: anywhere;
}

.s03v2-wcm-value {
  margin: 0.2rem 0 0;
  font-size: 1.6rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #2f2a24;
  line-height: 1.2;
}

.s03v2-wcm-value--dash {
  font-size: 1.3rem;
  font-weight: 650;
  color: #6a6358;
}

.s03v2-wcm-description {
  margin: 0.3rem 0 0;
  color: #4d473e;
  font-size: 0.92rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.s03v2-wcm-meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.4rem;
}

.s03v2-wcm-meta {
  display: block;
  color: #6a6358;
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.s03v2-wcm-status {
  margin: 0.45rem 0 0;
  color: #6a6358;
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.s03v2-wcm-status--error {
  color: #9b2c2c;
}

.s03v2-wcm-reminder {
  margin: 0.4rem 0 0;
  color: #5a544a;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.s03v2-wcm-reminder-line {
  margin: 0.25rem 0 0;
}

.s03v2-wcm-reminder-line:first-child {
  margin-top: 0;
}

@media (max-width: 700px) {
  .s03v2-wcm-value {
    font-size: 1.4rem;
  }
}

@media (max-width: 700px) {
  .s03v2-wc-table,
  .s03v2-wc-table tbody,
  .s03v2-wc-table tfoot,
  .s03v2-wc-row {
    display: block;
    width: 100%;
  }

  .s03v2-wc-row {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr);
    grid-template-areas:
      "symbol label"
      "amount amount";
    gap: 0.15rem 0.35rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #ece7de;
  }

  .s03v2-wc-row--total {
    border-top: 1px solid #d9d2c6;
    border-bottom: 0;
    margin-top: 0.2rem;
  }

  .s03v2-wc-symbol { grid-area: symbol; padding: 0; }
  .s03v2-wc-label { grid-area: label; padding: 0; }
  .s03v2-wc-amount {
    grid-area: amount;
    box-sizing: border-box;
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    overflow-wrap: normal;
    word-break: normal;
    padding: 0.15rem 0 0;
    text-align: right;
    text-overflow: clip;
    white-space: nowrap;
    width: 100%;
  }

  .s03v2-inventory-amount {
    display: block;
    text-align: right;
    width: 100%;
  }

  .s03v2-inventory-amount strong {
    display: block;
    max-width: none;
    overflow: visible;
    text-align: right;
    white-space: nowrap;
    width: 100%;
  }

  .s03v2-inventory-actions,
  .s03v2-inventory-save-wrap,
  .s03v2-wc-inventory-action {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
  }

  .s03v2-inventory-save-wrap .primary-action,
  .s03v2-inventory-actions .primary-action,
  .s03v2-inventory-actions .secondary-action,
  .s03v2-wc-edit-inventory {
    width: 100%;
  }

  /* Section 03 / QHC shared result metrics inside S03 module */
  .s03v2-module .qhc-metric-value,
  .s03v2-module .qhc-be-period-value,
  .s03v2-module .qhc-eff-amount-value,
  .s03v2-module .qhc-payback-line-value {
    display: block;
    font-variant-numeric: tabular-nums;
    overflow: visible;
    overflow-wrap: normal;
    text-align: right;
    white-space: nowrap;
    width: 100%;
  }

  .s03v2-module .qhc-be-period-row,
  .s03v2-module .qhc-payback-line {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .s03v2-module .qhc-money-nowrap {
    display: block;
    max-width: none;
    overflow: visible;
    text-align: right;
    width: 100%;
  }
}

/* ==========================================================================
   general-detailed-calculator-button-hierarchy-batch-001
   Detailed Calculator Section 03 (#operating-results) — color/border/shadow/state only.
   Layout tokens above (width/height/gap/padding/font-size) remain locked.
   ========================================================================== */

/* Inventory save + empty/guidance CTAs — solid Primary. */
#operating-results .s03v2-inventory-save-wrap .primary-action:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-inventory-actions .primary-action:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-action-guide .primary-action:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-item .primary-action:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-match-row .primary-action:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-action].primary-action:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-confirm-match].primary-action:not(:disabled):not([aria-disabled="true"]) {
  background: linear-gradient(180deg, #17352b 0%, #10231d 100%);
  border-color: rgba(199, 161, 90, 0.62);
  box-shadow: 0 2px 8px rgba(16, 35, 29, 0.22);
  color: #fffdf8;
}

#operating-results .s03v2-inventory-save-wrap .primary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-inventory-save-wrap .primary-action:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-inventory-actions .primary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-inventory-actions .primary-action:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-action-guide .primary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-action-guide .primary-action:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-item .primary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-item .primary-action:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-match-row .primary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-match-row .primary-action:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-action].primary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-action].primary-action:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-confirm-match].primary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-confirm-match].primary-action:focus-visible:not(:disabled):not([aria-disabled="true"]) {
  box-shadow: 0 3px 10px rgba(16, 35, 29, 0.3);
}

#operating-results .s03v2-inventory-save-wrap .primary-action:active:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-inventory-actions .primary-action:active:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-action-guide .primary-action:active:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-item .primary-action:active:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-match-row .primary-action:active:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-action].primary-action:active:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-confirm-match].primary-action:active:not(:disabled):not([aria-disabled="true"]) {
  box-shadow: 0 1px 4px rgba(16, 35, 29, 0.18);
}

#operating-results .s03v2-inventory-save-wrap .primary-action:disabled,
#operating-results .s03v2-inventory-save-wrap .primary-action[aria-disabled="true"],
#operating-results .s03v2-inventory-actions .primary-action:disabled,
#operating-results .s03v2-inventory-actions .primary-action[aria-disabled="true"],
#operating-results .s03v2-action-guide .primary-action:disabled,
#operating-results .s03v2-action-guide .primary-action[aria-disabled="true"],
#operating-results [data-s03v2-action].primary-action:disabled,
#operating-results [data-s03v2-action].primary-action[aria-disabled="true"] {
  background: #d9dfdc;
  border-color: #c4ccc8;
  box-shadow: none;
  color: #68736e;
}

/* Edit / cancel / open-sale — Neutral／Secondary soft surface. */
#operating-results [data-s03v2-inventory-action="edit"],
#operating-results [data-s03v2-inventory-action="cancel"],
#operating-results .s03v2-inventory-actions .secondary-action,
#operating-results .s03v2-sale-cost-item .secondary-action,
#operating-results .s03v2-wc-edit-inventory {
  background: var(--surface-soft, #f3eee3);
  border-color: rgba(23, 33, 29, 0.14);
  box-shadow: none;
  color: var(--ink, #17211d);
}

#operating-results [data-s03v2-inventory-action="edit"]:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-inventory-action="edit"]:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-inventory-action="cancel"]:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results [data-s03v2-inventory-action="cancel"]:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-inventory-actions .secondary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-inventory-actions .secondary-action:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-item .secondary-action:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-sale-cost-item .secondary-action:focus-visible:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-wc-edit-inventory:hover:not(:disabled):not([aria-disabled="true"]),
#operating-results .s03v2-wc-edit-inventory:focus-visible:not(:disabled):not([aria-disabled="true"]) {
  background: #ebe4d6;
  border-color: rgba(23, 33, 29, 0.22);
  box-shadow: none;
}

/*
 * section03-mobile-result-padding-and-value-row-alignment-001
 * Shared 03 labour / wages rows (General + Restaurant + Services host).
 * UA `dd { margin-inline-start }` was parking amounts in the middle.
 * Reuse WC-style label | amount: minmax(0,1fr) + auto; do not restyle WC itself.
 */
.s03v2-module .service-workforce-s03 {
  box-sizing: border-box;
  min-width: 0;
}

.s03v2-module .service-workforce-s03__hint {
  margin: 0 0 0.55rem;
  overflow-wrap: anywhere;
}

.s03v2-module .service-workforce-s03__grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.s03v2-module .service-workforce-s03__group h3 {
  margin: 0 0 0.4rem;
}

.s03v2-module .service-workforce-s03__total,
.s03v2-module .service-workforce-s03__dl > div {
  align-items: start;
  display: grid;
  gap: 0.35rem 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.s03v2-module .service-workforce-s03__dl {
  margin: 0;
}

.s03v2-module .service-workforce-s03__dl dt,
.s03v2-module .service-workforce-s03__total span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.s03v2-module .service-workforce-s03__dl dd,
.s03v2-module .service-workforce-s03__total strong {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .s03v2-module {
    box-sizing: border-box;
    padding-inline: 12px;
  }
}
