/* Desktop review surfaces. Screen-specific tables and editable grids keep their own layout. */
@media screen and (min-width: 761px) {
  html body.ui-refresh.brand-workbench .workspace {
    --body-panel-gap: 16px;
    --body-panel-inset: 18px;
    --body-panel-radius: 10px;
  }

  .brand-workbench .overview-dashboard .overview-workspace {
    gap: 0;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
  }

  html body.ui-refresh.brand-workbench .workspace.overview-dashboard .overview-workspace .overview-panel {
    padding: 14px var(--body-panel-inset);
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  html body.ui-refresh.brand-workbench .workspace.overview-dashboard .overview-workspace .overview-quick-panel {
    align-self: stretch;
    border-block-start: 1px solid var(--border);
    border-radius: 0 0 var(--body-panel-radius) var(--body-panel-radius);
    background: var(--surface-subtle);
  }

  .brand-workbench .overview-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
  }

  .brand-workbench .overview-panel-heading > h2 {
    margin: 0;
    font-size: 17px;
  }

  .brand-workbench .overview-panel-heading > a {
    flex: none;
    padding: 5px 0;
    font-size: 13px;
    font-weight: 600;
  }

  html body.ui-refresh.brand-workbench .workspace.overview-dashboard .overview-profile .project-header-meta {
    grid-template-columns: repeat(auto-fit, minmax(min(116px, 100%), 1fr));
    gap: 10px 16px;
    padding: 4px 0 12px;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-profile .project-header-meta .profile-unset {
    color: var(--text-muted);
    font-weight: 400;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-quick-panel > h2 {
    margin-bottom: 6px;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-quick-actions > a {
    min-height: 36px;
    padding: 3px 8px;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-quick-actions > a:hover {
    background: var(--selection);
  }

  .brand-workbench .overview-quick-actions .ui-icon {
    width: 16px;
    height: 16px;
    padding: 5px;
  }

  html body.ui-refresh.brand-workbench .workspace.overview-dashboard .overview-financial-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
    padding: 14px var(--body-panel-inset) 8px;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details > :not(.project-cash-disclosure) {
    grid-column: 1 / -1;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details > h2 {
    margin: 0 0 2px;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details > .project-cash-disclosure {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-subtle);
  }

  html body.ui-refresh.brand-workbench .workspace.overview-dashboard .overview-financial-details > details > summary {
    display: grid;
    justify-content: stretch;
    gap: 10px;
    padding: 9px 12px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details > .project-cash-disclosure:not([open]) > summary {
    min-height: 108px;
    align-content: start;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details > details > summary::after {
    content: none;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details > details > summary:hover {
    background: var(--selection);
    text-decoration: none;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details > details > summary:focus-visible {
    outline-offset: -2px;
  }

  .brand-workbench .overview-disclosure-label {
    display: flex;
    align-items: center;
    justify-self: start;
    gap: 8px;
    line-height: 1.4;
  }

  .brand-workbench .overview-disclosure-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--selection);
    color: var(--action);
  }

  .brand-workbench .overview-disclosure-label .ui-icon {
    flex: none;
    width: 16px;
    height: 16px;
  }

  .brand-workbench .overview-disclosure-label > .ui-icon {
    color: var(--action);
  }

  .brand-workbench .overview-financial-details > details[open] > summary .overview-disclosure-label > .ui-icon {
    transform: rotate(180deg);
  }

  .brand-workbench .overview-disclosure-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr));
    max-inline-size: 420px;
    gap: 6px 16px;
    padding-inline-start: 36px;
  }

  .brand-workbench .overview-preview-label {
    display: block;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
  }

  .brand-workbench .overview-disclosure-preview strong {
    display: block;
    color: var(--heading);
    font-size: clamp(18px, 1.35vw, 24px);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .brand-workbench .overview-disclosure-preview small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
  }

  .brand-workbench .overview-disclosure-preview .overview-preview-pending {
    color: var(--text-muted);
    font-size: 16px;
  }

  .brand-workbench .overview-financial-details details[open] > summary .overview-disclosure-preview {
    display: none;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details:has(> .project-cash-disclosure) > .overview-business {
    border-top: 1px solid var(--border);
    padding-top: 4px;
  }

  html body.ui-refresh.brand-workbench .workspace.overview-dashboard .overview-financial-details > .overview-business > summary {
    display: inline-grid;
  }

  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details .project-cash-disclosure > .project-headline {
    grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr));
    margin: 0 12px;
    border-bottom: 0;
    column-gap: 8px;
  }

  .brand-workbench .overview-financial-details .project-cash-disclosure > .project-headline > div {
    padding: 10px 8px 10px 0;
  }

  .brand-workbench .overview-financial-details .project-cash-disclosure > .project-headline dd {
    margin-top: 3px;
    font-size: 18px;
  }

  .brand-workbench .overview-dashboard .overview-financial-details > .overview-business > .summary-grid {
    margin: 2px 12px 12px;
  }

  html body.ui-refresh.brand-workbench .workspace :is(.business-table, .adaptive-table, .directory-table) {
    font-variant-numeric: tabular-nums;
  }

  html body.ui-refresh.brand-workbench .workspace :is(.business-table, .adaptive-table, .directory-table) > thead > tr > th {
    padding: 10px 14px;
    background: var(--surface-subtle);
    color: var(--heading);
    font-weight: 650;
  }

  html body.ui-refresh.brand-workbench .workspace :is(.business-table, .adaptive-table, .directory-table) > tbody > tr > td {
    padding: 11px 14px;
    line-height: 1.5;
  }

  html body.ui-refresh.brand-workbench .workspace :is(.business-table, .adaptive-table, .directory-table) > tbody > tr:focus-within > td,
  html body.ui-refresh.brand-workbench .workspace :is(.business-table, .adaptive-table, .directory-table) > tbody > tr:hover > td {
    background: var(--surface-subtle);
  }

  html body.ui-refresh.brand-workbench .workspace :is(p.work-empty, .empty-state) {
    min-height: 0;
    padding: 18px var(--body-panel-inset);
    border: 1px dashed var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
    color: var(--text-muted);
    text-align: start;
  }

  html body.ui-refresh.brand-workbench .workspace :is(p.work-empty, .empty-state) > :is(h3, p) {
    margin: 0;
  }

  html body.ui-refresh.brand-workbench .workspace .empty-state > h3 + p {
    margin-top: 4px;
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .business-record {
    padding: 14px var(--body-panel-inset);
    margin-block: 0 12px;
    border-radius: var(--body-panel-radius);
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .business-record > .heading-row {
    margin-bottom: 8px;
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .business-record .heading-row > div > h2,
  html body.ui-refresh.brand-workbench .workspace.purchase-page .purchase-card-head h3 {
    margin: 0 0 4px;
    font-size: 17px;
    line-height: 1.4;
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .business-record > details {
    margin-top: 9px;
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .business-record > details > summary {
    min-height: 36px;
  }

  html body.ui-refresh.brand-workbench .workspace.purchase-page .purchase-card .purchase-facts {
    grid-template-columns: repeat(auto-fit, minmax(106px, 1fr));
    margin: 9px 0;
    padding: 10px 12px;
    gap: 7px 14px;
    border-color: var(--border);
    background: var(--surface-subtle);
  }

  html body.ui-refresh.brand-workbench .workspace.purchase-page .purchase-card .purchase-amount strong {
    font-size: 22px;
  }

  html body.ui-refresh.brand-workbench .workspace.purchase-page .purchase-card .purchase-order-actions {
    margin: 6px 0;
  }

  html body.ui-refresh.brand-workbench .workspace.purchase-page .purchase-delivery-cta { margin-bottom: 7px; }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .project-form > :is(.form-section, .registration-section),
  html body.ui-refresh.brand-workbench .workspace .commercial-form > :is(.form-section, .registration-section) {
    margin: 0 0 16px;
    padding: 0 0 16px;
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .project-form > :is(.form-section, .registration-section) > legend,
  html body.ui-refresh.brand-workbench .workspace .commercial-form > :is(.form-section, .registration-section) > legend {
    margin-bottom: 9px;
  }

  html body.ui-refresh.brand-workbench .workspace.commercial-editor.refresh-flow > .project-form {
    max-width: 1060px;
  }

  html body.ui-refresh.brand-workbench .workspace :is(.cost-summary, .overview-totals, .invoice-core-summary, .report-module-stack) {
    border: 1px solid var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
  }

  html body.ui-refresh.brand-workbench .workspace.concise-cash .overview-totals,
  html body.ui-refresh.brand-workbench .workspace .invoice-core-summary {
    gap: 0;
    padding: 0;
  }

  html body.ui-refresh.brand-workbench .workspace.concise-cash .overview-totals > div,
  html body.ui-refresh.brand-workbench .workspace .invoice-core-summary > div {
    border: 0;
    border-radius: 0;
    padding: 12px var(--body-panel-inset);
    background: transparent;
  }

  html body.ui-refresh.brand-workbench .workspace.concise-cash .overview-totals > div + div,
  html body.ui-refresh.brand-workbench .workspace .invoice-core-summary > div + div {
    border-inline-start: 1px solid var(--border);
  }

  html body.ui-refresh.brand-workbench .workspace.concise-cash .overview-totals > div:last-child {
    color: var(--heading);
    background: var(--surface-subtle);
    border-radius: 0 var(--body-panel-radius) var(--body-panel-radius) 0;
  }

  html body.ui-refresh.brand-workbench .workspace.concise-cash .overview-totals dd {
    margin-top: 4px;
    font-size: 23px;
  }

  html body.ui-refresh.brand-workbench .workspace.costs-page .cost-summary-group {
    padding: 14px var(--body-panel-inset);
  }

  html body.ui-refresh.brand-workbench .workspace.costs-page .cost-summary h3 { margin-bottom: 9px; }
  html body.ui-refresh.brand-workbench .workspace.costs-page .cost-summary dl > div { margin-top: 7px; }

  html body.ui-refresh.brand-workbench .workspace.schedule-portfolio [data-record-list]:has(> article:not([hidden])) {
    border: 1px solid var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
  }

  html body.ui-refresh.brand-workbench .workspace.schedule-portfolio [data-record-list] > .business-record {
    margin: 0;
    padding: 9px var(--body-panel-inset);
    border: 0;
    border-radius: var(--body-panel-radius);
    box-shadow: none;
  }

  html body.ui-refresh.brand-workbench .workspace.schedule-portfolio [data-record-list] > article:not([hidden]) ~ article:not([hidden]) {
    border-top: 1px solid var(--border);
    border-radius: 0;
  }

  html body.ui-refresh.brand-workbench .workspace.project-report-page :is(#report-open, .report-health-disclosure) {
    margin-block: 12px;
    padding: 12px var(--body-panel-inset);
    border: 1px solid var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
  }

  html body.ui-refresh.brand-workbench .workspace.project-report-page .report-module-section:first-child { border-top: 0; }
  html body.ui-refresh.brand-workbench .workspace.project-report-page .report-module > summary {
    min-height: 49px;
    padding: 8px var(--body-panel-inset);
  }

  html body.ui-refresh.brand-workbench .workspace.project-report-page .report-module > summary:hover,
  html body.ui-refresh.brand-workbench .workspace.project-report-page .report-module[open] > summary {
    background: var(--surface-subtle);
  }

  .brand-workbench .project-report-page .report-module-body {
    padding: 8px var(--body-panel-inset) 14px;
  }

  .brand-workbench .project-report-page .report-module-section > .heading-row {
    margin: 0;
    padding: 12px var(--body-panel-inset);
  }

  .brand-workbench .project-report-page .report-module-section > .heading-row h2 {
    margin: 0;
    font-size: 16px;
  }

  .brand-workbench .project-report-page .report-expand { display: none; }
}

@media screen and (min-width: 1000px) {
  html body.ui-refresh.brand-workbench .overview-dashboard .overview-financial-details:has(> .project-cost-disclosure + .project-cash-disclosure) {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }

  html body.ui-refresh.brand-workbench .workspace.overview-dashboard .overview-workspace .overview-quick-panel {
    border-block-start: 0;
    border-inline-start: 1px solid var(--border);
    border-radius: 0 var(--body-panel-radius) var(--body-panel-radius) 0;
  }
}


@media screen and (min-width: 761px) {
  html body.ui-refresh.brand-workbench .workspace.commercial-editor .commercial-form-context {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 14px;
    max-width: 1060px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13px;
  }

  html body.ui-refresh.brand-workbench .workspace.commercial-editor .commercial-form-context > p {
    margin: 0;
  }

  html body.ui-refresh.brand-workbench .workspace.commercial-editor .commercial-form-context > p > a {
    min-height: 30px;
    padding-block: 0;
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .commercial-record-heading h3 {
    margin: 0;
    color: var(--heading);
    font-size: 17px;
    line-height: 1.4;
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .commercial-record-value {
    text-align: end;
  }

  html body.ui-refresh.brand-workbench .workspace.refresh-flow .commercial-record-value > strong.amount {
    font-size: 22px;
    line-height: 1.3;
  }

  html body.ui-refresh.brand-workbench .workspace.purchase-page .purchase-record-top > nav:not(:has(a)) {
    display: none;
  }

  html body.ui-refresh.brand-workbench .workspace.purchase-page .purchase-record-top > nav {
    padding-block: 5px;
    border: 0;
  }

  html body.ui-refresh.brand-workbench .workspace.concise-cash .project-cash-table > tbody > tr > td {
    padding-block: 8px;
  }

  html body.ui-refresh.brand-workbench .workspace.concise-cash .project-cash-table .project-name {
    font-size: 15px;
  }

  html body.ui-refresh.brand-workbench .workspace.schedule-portfolio .schedule-totals {
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
  }

  html body.ui-refresh.brand-workbench .workspace.schedule-portfolio .schedule-totals > div {
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 12px var(--body-panel-inset);
    background: transparent;
  }

  html body.ui-refresh.brand-workbench .workspace.schedule-portfolio .schedule-totals > div + div {
    border-inline-start: 1px solid var(--border);
  }
}

@media screen and (min-width: 1250px) {
  .brand-workbench .purchase-record-top {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto minmax(155px, 1fr);
    gap: 8px 16px;
    align-items: center;
    margin-bottom: 8px;
  }

  .brand-workbench .purchase-record-top .purchase-card-head { display: contents; }
  .brand-workbench .purchase-record-top .purchase-amount { grid-column: 3; grid-row: 1; }

  html body.ui-refresh.brand-workbench .workspace.purchase-page .purchase-record-top > nav {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 0;
    justify-content: center;
  }
}


@media screen and (min-width: 761px) {
  html body.ui-refresh.brand-workbench .workspace .invoice-core-summary:has(> [data-in-headline]):not(:has(> div:not([data-in-headline]))) {
    display: none;
  }

  html body.ui-refresh.brand-workbench .workspace .invoice-source-stack:has(> .invoice-source-group) {
    margin-block: var(--body-panel-gap);
    border: 1px solid var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
  }

  html body.ui-refresh.brand-workbench .workspace .invoice-source-stack > .invoice-source-group {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  html body.ui-refresh.brand-workbench .workspace .invoice-source-stack > .invoice-source-group + .invoice-source-group {
    border-top: 1px solid var(--border);
  }

  html body.ui-refresh.brand-workbench .workspace .invoice-source-stack > .invoice-source-group > summary {
    min-height: 46px;
    font-weight: 650;
  }

  html body.ui-refresh.brand-workbench .workspace .invoice-source-stack > .invoice-source-group > summary:hover,
  html body.ui-refresh.brand-workbench .workspace .invoice-source-stack > .invoice-source-group[open] > summary {
    background: var(--surface-subtle);
  }

  html body.ui-refresh.brand-workbench .workspace.commercial-editor .project-form > .form-section:has(+ .version-footer) {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 8px;
  }
}


@media screen and (min-width: 761px) {
  html body.ui-refresh.brand-workbench .workspace.access-page .access-list:has(> article:not([hidden])) {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--body-panel-radius);
    background: var(--surface);
  }

  html body.ui-refresh.brand-workbench .workspace.access-page .access-row {
    margin: 0;
    padding: 8px var(--body-panel-inset);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  html body.ui-refresh.brand-workbench .workspace.access-page .access-row:not([hidden]) ~ .access-row:not([hidden]) {
    border-top: 1px solid var(--border);
  }

  html body.ui-refresh.brand-workbench .workspace.access-page .access-row > div {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(70px, 30%);
    gap: 8px;
    align-items: baseline;
  }

  html body.ui-refresh.brand-workbench .workspace.access-page .access-row :is(h2, p) {
    margin: 0;
  }

  html body.ui-refresh.brand-workbench .workspace.access-page .access-row > a {
    min-height: 36px;
  }

  html body.ui-refresh.brand-workbench .workspace.supplier-profile .supplier-profile-details {
    padding: 14px var(--body-panel-inset);
    margin-bottom: 12px;
  }

  html body.ui-refresh.brand-workbench .workspace.supplier-profile .business-section .business-table {
    background: var(--surface);
  }

  .brand-workbench .supplier-profile-details .supplier-profile-contact {
    min-width: 0;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }

  .brand-workbench .supplier-profile-contact > h3 {
    margin-top: 0;
  }

  .brand-workbench .supplier-profile-contact > ul {
    margin-block: 3px;
  }
}

@media screen and (min-width: 1100px) {
  .brand-workbench .supplier-profile-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, .38fr);
    gap: 9px 20px;
    align-items: start;
  }

  .brand-workbench .supplier-profile-details > h2 {
    grid-column: 1 / -1;
    margin: 0;
  }

  html body.ui-refresh.brand-workbench .workspace.supplier-profile .supplier-profile-details dl {
    margin: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr));
  }

  .brand-workbench .supplier-profile-details .supplier-profile-contact {
    border-top: 0;
    border-inline-start: 1px solid var(--border);
    padding: 0 0 0 17px;
  }
}
