/*
 * F7 analytical workbench · 2026-10-16
 * Official local assets and typography; presentation only.
 * Body scope deliberately outranks the late-loaded legacy component sheets.
 * Route visibility, hidden/inert, source states and numerical semantics stay
 * under the existing controllers. Large tables retain their own scroll areas.
 */

/* 01 · Brand, reading scale and shell */
body.sap-sandbox-experience {
  --sidebar-width: 264px;
  --topbar-height: 80px;
  --wb-navy: #141f60;
  --wb-dark: #0f1647;
  --wb-blue: #233cf9;
  --wb-lime: #e9f939;
  --wb-ink: #202842;
  --wb-muted: #596078;
  --wb-line: #dce0ea;
  --wb-soft: #f4f5f8;
  --wb-radius: 7px;
  --wb-shadow: none;
  --wb-space: 24px;
  background: var(--wb-soft);
  color: var(--wb-ink);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body.sap-sandbox-experience .app-shell {
  min-width: 0;
}

body.sap-sandbox-experience .topbar {
  height: var(--topbar-height);
  padding-inline: 24px;
  gap: 24px;
  background: #fff;
  border-bottom-color: var(--wb-line);
  box-shadow: 0 1px 4px rgb(15 22 71 / 2%);
}

body.sap-sandbox-experience .topbar .brand {
  width: 248px;
  gap: 12px;
}

/* Crop only the source image's empty margins, preserving the official logo. */
body.sap-sandbox-experience .topbar .brand-mark {
  width: 152px;
  height: 56px;
}

body.sap-sandbox-experience .topbar .brand .brand-mark img {
  width: 239px;
  height: 88px;
}

body.sap-sandbox-experience .topbar .brand-product {
  padding-left: 12px;
}

body.sap-sandbox-experience .brand-product strong {
  font-size: 12px;
  text-transform: none;
}

body.sap-sandbox-experience .brand-product small {
  font-size: 12px;
  margin-top: 5px;
}

body.sap-sandbox-experience .topbar-context {
  padding-left: 24px;
  gap: 2px;
}

body.sap-sandbox-experience .context-label {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

body.sap-sandbox-experience .topbar-context strong {
  font-size: 12px;
}

body.sap-sandbox-experience .topbar-actions {
  min-width: 0;
  gap: 12px;
}

body.sap-sandbox-experience .topbar .data-badge {
  height: auto;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 4px;
  color: var(--wb-muted);
  background: var(--wb-soft);
  font-size: 12px;
}

body.sap-sandbox-experience .main-content {
  min-width: 0;
  max-width: 1900px;
  margin-left: var(--sidebar-width);
  padding: 32px 36px 48px;
  scroll-margin-top: calc(var(--topbar-height) + 20px);
  transition: margin-left 180ms ease-out;
}

/* 02 · Navigation: readable groups, useful hierarchy and deliberate states */
body.sap-sandbox-experience .sidebar {
  width: var(--sidebar-width);
  top: var(--topbar-height);
  padding: 12px 12px 16px;
  background: var(--wb-dark);
  border-right: 1px solid rgb(255 255 255 / 6%);
  transition: width 180ms ease-out, padding 180ms ease-out;
}

body.sap-sandbox-experience .sidebar-toolbar {
  height: 44px;
  margin-bottom: 8px;
}

body.sap-sandbox-experience .sidebar-collapse {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  border-color: rgb(255 255 255 / 16%);
  color: #c7cde4;
}

body.sap-sandbox-experience .nav-list {
  gap: 14px;
  padding-right: 4px;
  overscroll-behavior-y: contain;
  scrollbar-color: #616a9a transparent;
  scrollbar-gutter: stable;
}

body.sap-sandbox-experience .nav-parent,
body.sap-sandbox-experience .nav-item {
  height: auto;
  min-height: 44px;
  padding: 10px 10px;
  border-radius: 5px;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}

body.sap-sandbox-experience .nav-parent {
  grid-template-columns: 18px minmax(0, 1fr) 14px;
  color: #dce0f2;
  font-weight: 600;
}

body.sap-sandbox-experience .nav-parent > span,
body.sap-sandbox-experience .nav-item > span {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
}

body.sap-sandbox-experience .nav-children {
  gap: 2px;
  margin-top: 4px;
}

body.sap-sandbox-experience .nav-item.nav-child {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 10px 9px 10px 24px;
  font-size: 12px;
  color: #c7cde4;
}

body.sap-sandbox-experience .nav-parent:hover,
body.sap-sandbox-experience .nav-item:hover {
  color: #fff;
  background: rgb(255 255 255 / 8%);
}

body.sap-sandbox-experience .nav-parent.is-current {
  color: #fff;
  background: rgb(255 255 255 / 5%);
}

body.sap-sandbox-experience .nav-item.is-active,
body.sap-sandbox-experience .nav-item[aria-current="page"] {
  color: #fff;
  background: rgb(233 249 57 / 11%);
  border-left-color: var(--wb-lime);
}

body.sap-sandbox-experience .nav-item.is-active > svg,
body.sap-sandbox-experience .nav-item[aria-current="page"] > svg {
  color: var(--wb-lime);
}

body.sap-sandbox-experience .nav-group[data-nav-group="data"] {
  border-top: 1px solid rgb(255 255 255 / 16%);
  margin-top: 6px;
  padding-top: 16px;
}

body.sap-sandbox-experience .sidebar-meta {
  flex: none;
  padding: 14px 2px 0;
  margin-top: auto;
  gap: 10px;
}

body.sap-sandbox-experience .session-card {
  min-height: 64px;
  padding: 10px;
  border-radius: 5px;
  gap: 10px;
}

body.sap-sandbox-experience .sidebar-meta .session-card strong,
body.sap-sandbox-experience .sidebar-meta .session-card small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

body.sap-sandbox-experience .sidebar-meta .session-card strong {
  font-size: 12px;
}

body.sap-sandbox-experience .sidebar-meta .session-card small,
body.sap-sandbox-experience .workspace-version,
body.sap-sandbox-experience .workspace-version span {
  font-size: 12px;
  color: #b6bfdc;
}

body.sap-sandbox-experience .tenant-mark {
  border-radius: 4px;
}

@media (min-width: 821px) {
  body.sap-sandbox-experience .app-shell.is-sidebar-collapsed .sidebar {
    width: 68px;
    padding-inline: 8px;
  }

  body.sap-sandbox-experience .app-shell.is-sidebar-collapsed .main-content {
    margin-left: 68px;
  }

  body.sap-sandbox-experience .app-shell.is-sidebar-collapsed .nav-parent,
  body.sap-sandbox-experience .app-shell.is-sidebar-collapsed .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    padding-inline: 0;
  }

  body.sap-sandbox-experience .app-shell.is-sidebar-collapsed .session-card {
    width: 44px;
    min-height: 44px;
    grid-template-columns: 34px;
    padding: 5px;
    gap: 0;
  }

  body.sap-sandbox-experience .app-shell.is-sidebar-collapsed .nav-item:not(.nav-child) > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* 03 · Analytical titles, actions and private sign-in */
body.sap-sandbox-experience .sap-platform {
  --line: var(--wb-line);
  --muted: var(--wb-muted);
  --canvas: var(--wb-soft);
  color: var(--wb-ink);
  font-size: 14px;
}

body.sap-sandbox-experience .sap-platform :is(h1, h2, h3, h4) {
  font-family: Poppins, "Segoe UI", sans-serif;
  font-weight: 600;
}

body.sap-sandbox-experience .sap-platform .sap-page-header {
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--wb-line);
}

body.sap-sandbox-experience .sap-platform .sap-page-header > div {
  min-width: 0;
}

body.sap-sandbox-experience .sap-platform .sap-page-header h1 {
  color: var(--wb-navy);
  font-size: clamp(28px, 2.3vw, 34px);
  line-height: 1.25;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
}

body.sap-sandbox-experience .sap-platform .sap-page-lead {
  max-width: 76ch;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.75;
}

body.sap-sandbox-experience .sap-platform .eyebrow,
body.sap-sandbox-experience .sap-platform .sa-eyebrow,
body.sap-sandbox-experience .sap-platform .smb-eyebrow {
  color: var(--wb-muted);
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.6;
}

body.sap-sandbox-experience .sap-platform .source-tag {
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  padding: 6px 10px;
}

body.sap-sandbox-experience .sap-platform .material-heading .eyebrow {
  color: #d2d7ee;
}

body.sap-sandbox-experience .sap-platform .sap-analysis-tools {
  gap: 18px;
  margin: 0 0 18px;
  font-size: 12px;
}

body.sap-sandbox-experience .sap-platform :is(.primary, .secondary),
body.sap-sandbox-experience .topbar .button,
body.sap-sandbox-experience .sap-platform :is(.sa-read, .margin-data-link, .smb-data-link) {
  min-height: 44px;
  height: auto;
  border-radius: 5px;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}

body.sap-sandbox-experience .sap-platform :is(.primary, .secondary),
body.sap-sandbox-experience .topbar .button {
  padding: 10px 16px;
}

body.sap-sandbox-experience .topbar .button:hover {
  transform: none;
}

body.sap-sandbox-experience .sap-platform .access {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  max-width: 1000px;
  margin: 32px auto 48px;
  padding: 40px;
  gap: 40px;
  border-left: 4px solid var(--wb-blue);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
}

body.sap-sandbox-experience .sap-platform .access h2 {
  font-size: 28px;
  letter-spacing: -.035em;
}

body.sap-sandbox-experience .sap-platform .access p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.75;
}

body.sap-sandbox-experience .sap-platform .access-action,
body.sap-sandbox-experience .sap-platform .access > div {
  min-width: 0;
}

body.sap-sandbox-experience .sap-platform .access-action .primary {
  min-height: 50px;
}

body.sap-sandbox-experience .sap-platform .google-mark {
  border-radius: 3px;
}

/* 04 · Report surfaces and consistent KPI reading */
body.sap-sandbox-experience .sap-platform :is(.data-card, .evidence, .sa-card, .sa-pending, .smb-card, .bp-report, .bp-config, .margin-business-workbench, .sap-data-source, .sync-panel, .budget-import-card, .finance-import-card, .operational-upload) {
  min-width: 0;
  border-color: var(--wb-line);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
}

body.sap-sandbox-experience .sap-platform :is(.data-card, .sa-card, .sap-data-source) {
  padding: 24px;
}

body.sap-sandbox-experience .sap-platform :is(.sa-grid, .analysis-tables, .data-grid) {
  gap: var(--wb-space);
}

body.sap-sandbox-experience .sap-platform :is(.sa-intro, .smb-heading) {
  margin-bottom: 24px;
}

body.sap-sandbox-experience .sap-platform .sa-intro {
  padding: 4px 0 0;
  background: transparent;
  color: var(--wb-navy);
}

body.sap-sandbox-experience .sap-platform :is(.sa-intro h2, .smb-heading h2, .sap-data-heading h2) {
  color: var(--wb-navy);
  font-size: 26px;
  letter-spacing: -.03em;
}

body.sap-sandbox-experience .sap-platform :is(.sa-lead, .smb-subtitle, .analysis-intro, .sap-data-intro) {
  color: var(--wb-muted);
  font-size: 13px;
  line-height: 1.75;
}

body.sap-sandbox-experience .sap-platform :is(.sa-card > h3, .smb-section-head h3, .margin-business-heading h3, .bp-report-heading h3, .section-heading h3) {
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -.025em;
}

body.sap-sandbox-experience .sap-platform :is(.sa-kpis, .smb-kpis, .margin-summary, .bp-kpis, .finance-summary, .analysis-summary, .v06-kpi-strip) {
  gap: 0;
  background: #fff;
  color: var(--wb-navy);
  border: 1px solid var(--wb-line);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
  margin-bottom: 24px;
}

body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article) {
  min-width: 0;
  padding: 20px 22px;
  border: 0;
  border-right: 1px solid var(--wb-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article):last-child {
  border-right: 0;
}

body.sap-sandbox-experience .sap-platform .smb-kpi::before,
body.sap-sandbox-experience .sap-platform .margin-summary > div::before {
  content: none;
}

body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis, .finance-summary, .analysis-summary, .v06-kpi-strip) span {
  color: var(--wb-muted);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis, .finance-summary, .analysis-summary, .v06-kpi-strip) strong {
  color: var(--wb-navy);
  font-family: Poppins, "Segoe UI", sans-serif;
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums lining-nums;
  overflow-wrap: anywhere;
}

body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis, .finance-summary, .v06-kpi-strip) small {
  color: var(--wb-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* The final CO-PA metric is an existing pending classification, not a value. */
body.sap-sandbox-experience .sap-platform .margin-summary > div:last-child strong {
  font-size: 22px;
  color: var(--amber);
}

body.sap-sandbox-experience .sap-platform :is(.smb-section-head, .margin-business-heading) {
  padding: 24px 24px 16px;
  background: #fff;
  border-color: var(--wb-line);
}

body.sap-sandbox-experience .sap-platform .bp-report-heading {
  padding: 24px 24px 10px;
}

body.sap-sandbox-experience .sap-platform :is(.smb-source-time, .smb-note, .bp-note, .margin-explorer-context, .margin-explorer-caveat, .margin-explorer-pending, .table-note, .sa-boundary, .sa-bar-note, .sa-context, .sa-stages small, .smb-empty) {
  font-size: 12px;
  line-height: 1.7;
}

body.sap-sandbox-experience .sap-platform :is(.smb-source-time, .smb-note, .bp-note, .margin-explorer-context, .margin-explorer-caveat, .table-note, .sa-boundary, .sa-bar-note, .sa-stages small, .smb-empty) {
  color: var(--wb-muted);
}

body.sap-sandbox-experience .sap-platform :is(.smb-source-time, .smb-note) {
  background: #fff;
}

body.sap-sandbox-experience .sap-platform .bp-demo-intro {
  background: #eff1f8;
  border-left-color: var(--wb-blue);
  border-radius: 0 var(--wb-radius) var(--wb-radius) 0;
}

body.sap-sandbox-experience .sap-platform .bp-demo-reading h3 {
  color: #fff;
}

body.sap-sandbox-experience .sap-platform .sap-business-rules {
  --sbr-ink: var(--wb-navy);
  --sbr-muted: var(--wb-muted);
  --sbr-border: var(--wb-line);
}

body.sap-sandbox-experience .sap-platform :is(.sbr-rule-list, .sbr-editor, .sbr-results, .sbr-summary article) {
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
}

body.sap-sandbox-experience .sap-platform .sbr-rule {
  border-radius: 5px;
}

body.sap-sandbox-experience .sap-platform :is(.sbr-rule p, .sbr-rule small, .sbr-summary span, .sbr-field label, .sbr-output details, .sbr-output small, .sbr-output caption) {
  font-size: 12px;
  line-height: 1.65;
}

body.sap-sandbox-experience .sap-platform .sbr-summary strong {
  font-family: Poppins, "Segoe UI", sans-serif;
  font-weight: 600;
}

body.sap-sandbox-experience .sap-platform .sap-business-rules button,
body.sap-sandbox-experience .sap-platform .sbr-field :is(input:not([type="checkbox"]), select) {
  min-height: 44px;
  font-size: 13px;
}

body.sap-sandbox-experience .sap-platform :is(.bp-badge, .bp-demo-meta span, .analysis-status, .readiness-status, .finance-status, .cache-badge, .record-count) {
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
}

/* 05 · Filters and forms: a coherent control rail across modules */
body.sap-sandbox-experience .sap-platform :is(.bp-toolbar, .margin-scope-control) {
  min-width: 0;
  padding: 20px 24px;
  gap: 16px;
  border: 1px solid var(--wb-line);
  border-radius: var(--wb-radius);
  background: #fff;
  box-shadow: var(--wb-shadow);
}

body.sap-sandbox-experience .sap-platform :is(.bp-toolbar label, .bp-config label, .margin-filter label, .sa-scope label, .smb-stock-bar-heading, .sap-planning-selector) {
  color: var(--wb-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

body.sap-sandbox-experience .sap-platform :is(.bp-toolbar, .bp-config, .margin-filter, .margin-scope-control, .sa-scope, .account-selection, .sap-planning-selector, .budget-comparison-control) :is(input, select) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid #c8cedd;
  border-radius: 5px;
  background: #fff;
  color: var(--wb-navy);
  padding: 10px 12px;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

body.sap-sandbox-experience .sap-platform .margin-scope-control select {
  min-width: 0;
}

body.sap-sandbox-experience .sap-platform :is(.margin-source-controls, .margin-explorer-filters) {
  gap: 16px;
  padding-inline: 24px;
}

body.sap-sandbox-experience .sap-platform :is(.margin-explorer-actions, .smb-actions) .secondary {
  min-height: 44px;
  font-size: 12px;
}

body.sap-sandbox-experience .sap-platform :is(.bp-toolbar > label, .bp-config > label, .margin-source-controls > *, .margin-explorer-actions > *, .sync-status, .sync-actions) {
  min-width: 0;
}

body.sap-sandbox-experience .sap-platform :is(.sync-actions, .smb-actions) {
  flex-wrap: wrap;
}

body.sap-sandbox-experience .sap-platform :is(.bp-save-status, .margin-selection, .margin-posting-totals, .smb-pending, .smb-detail, .margin-group-drilldown) {
  font-size: 12px;
}

/* 06 · Financial sheets: scroll within the report, never crop the numbers */
body.sap-sandbox-experience .sap-platform :is(.table-scroll, .bp-table-scroll, .smb-table-scroll, .margin-explorer-grid) {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #a4adc6 #f4f5f8;
}

body.sap-sandbox-experience .sap-platform table,
body.sap-sandbox-experience .sap-platform .smb-table,
body.sap-sandbox-experience .sap-platform .margin-business-grid {
  font-size: 13px;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.6;
}

body.sap-sandbox-experience .sap-platform th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body.sap-sandbox-experience .sap-platform :is(th, td) {
  padding: 13px 14px;
}

body.sap-sandbox-experience .sap-platform :is(.smb-table, .margin-business-grid, .bp-statement) th {
  color: var(--wb-muted);
  background: #f4f5f8;
  border-color: var(--wb-line);
  font-size: 12px;
}

body.sap-sandbox-experience .sap-platform :is(.smb-table, .margin-business-grid, .bp-statement) td {
  border-color: #e8ebf2;
}

body.sap-sandbox-experience .sap-platform :is(.smb-table, .margin-business-grid) td {
  color: var(--wb-ink);
}

body.sap-sandbox-experience .sap-platform .bp-group {
  background: #eff1f8;
  color: var(--wb-navy);
}

body.sap-sandbox-experience .sap-platform .bp-group th {
  background: #eff1f8;
  color: var(--wb-navy);
}

body.sap-sandbox-experience .sap-platform :is(.smb-table, .margin-business-grid) caption,
body.sap-sandbox-experience .sap-platform :is(.margin-business-description, .margin-group-drilldown p, .margin-group-drilldown .margin-detail, .smb-detail dl, .smb-detail summary, .bp-line, .row-details, .trace-document-note) {
  color: var(--wb-muted);
  font-size: 12px;
  line-height: 1.65;
}

body.sap-sandbox-experience .sap-platform :is(.smb-detail summary, .margin-group-drilldown > summary, .bp-account summary, .row-details summary) {
  color: var(--wb-navy);
  min-height: 44px;
  padding-block: 8px;
}

body.sap-sandbox-experience .sap-platform :is(.bp-number, .numeric) {
  font-variant-numeric: tabular-nums lining-nums;
}

/* 07 · Charts, evidence and source management */
body.sap-sandbox-experience .sap-platform :is(.sa-bar-heading, .margin-account-bar-heading, .smb-stock-bar-heading strong) {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

body.sap-sandbox-experience .sap-platform :is(.sa-bar-track, .smb-stock-track, .margin-account-bar-track) {
  height: 7px;
  border-radius: 2px;
  background: #e9ecf4;
}

body.sap-sandbox-experience .sap-platform :is(.sa-bar-fill, .smb-stock-fill, .margin-account-bar-fill) {
  border-radius: 2px;
  background: var(--wb-blue);
}

body.sap-sandbox-experience .sap-platform .sa-bar-fill.is-credit {
  background: #56619a;
}

body.sap-sandbox-experience .sap-platform .smb-stock-fill.is-negative {
  background: #a67745;
}

body.sap-sandbox-experience .sap-platform .margin-explorer-chart {
  background: #f8f9fc;
}

body.sap-sandbox-experience .sap-platform :is(.margin-account-bar small, .margin-account-bar-heading > span, .margin-explorer-chart .table-note, .margin-explorer-chart .eyebrow) {
  color: var(--wb-muted);
  font-size: 12px;
}

body.sap-sandbox-experience .sap-platform :is(.evidence > summary, .analysis-trace > summary, .smb-movement-detail > summary, .sap-data-evidence > summary) {
  min-height: 44px;
  padding-block: 10px;
  font-size: 13px;
  line-height: 1.65;
}

body.sap-sandbox-experience .sap-platform :is(.metadata dt, .sap-data-meta-row dt) {
  color: var(--wb-muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

body.sap-sandbox-experience .sap-platform :is(.metadata dd, .sap-data-meta-row dd, .sap-data-coverage li, .sap-data-group-help, .sap-data-source-date) {
  font-size: 13px;
  line-height: 1.7;
}

body.sap-sandbox-experience .sap-platform .sap-data-policy {
  background: #eff1f8;
  border-left-color: var(--wb-blue);
  border-radius: 0 5px 5px 0;
}

body.sap-sandbox-experience .sap-platform .sap-data-source h4 {
  font-size: 17px;
  line-height: 1.5;
}

body.sap-sandbox-experience .sap-platform :is(.sap-data-needs-list article, .sap-data-controls-list article, .operational-flow li, .operational-saved, .operational-summary p) {
  border-radius: 5px;
  border-color: var(--wb-line);
}

body.sap-sandbox-experience .sap-platform :is(.notice, .budget-source-label, .finance-boundary, .margin-attribution, .operational-provenance, .sa-pending, .analysis-missing) {
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.75;
}

body.sap-sandbox-experience .sap-platform .sap-platform-footer {
  font-size: 12px;
  line-height: 1.7;
}

/* 08 · Keyboard and motion: explicit interactions, no continuous decoration */
body.sap-sandbox-experience :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--wb-blue);
  outline-offset: 3px;
}

body.sap-sandbox-experience .sidebar :focus-visible {
  outline-color: var(--wb-lime);
  outline-offset: -3px;
}

body.sap-sandbox-experience .topbar :focus-visible {
  outline-color: var(--wb-blue);
  outline-offset: 3px;
}

body.sap-sandbox-experience .sap-platform :is(input, select, textarea) {
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}

body.sap-sandbox-experience :is(.loading-logo, .context-live span),
body.sap-sandbox-experience .sap-platform .primary[aria-busy="true"] {
  animation: none;
}

body.sap-sandbox-experience .sap-platform .primary[aria-busy="true"] {
  background-image: none;
}

/* 09 · Tablet layout retains the same drawer boundary as the controller */
@media (min-width: 821px) and (max-width: 1180px) {
  body.sap-sandbox-experience .main-content {
    padding: 28px 24px 40px;
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-grid, .analysis-tables, .data-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sap-sandbox-experience .sap-platform :is(.smb-heading, .margin-scope-control) {
    flex-wrap: wrap;
  }
}

@media (max-width: 1100px) {
  body.sap-sandbox-experience .sap-platform :is(.sa-kpis, .smb-kpis, .margin-summary, .bp-kpis, .finance-summary, .analysis-summary, .v06-kpi-strip),
  body.sap-sandbox-experience .sap-platform .account-workspace .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article) {
    border-bottom: 1px solid var(--wb-line);
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article):nth-child(even) {
    border-right: 0;
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article):last-child {
    border-bottom: 0;
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article):nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
  }

  body.sap-sandbox-experience .sap-platform .access {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
    gap: 24px;
  }
}

@media (max-width: 820px) {
  body.sap-sandbox-experience {
    --topbar-height: 72px;
    --wb-space: 20px;
  }

  body.sap-sandbox-experience .topbar {
    padding-inline: 16px;
    gap: 12px;
  }

  body.sap-sandbox-experience .topbar .brand {
    width: auto;
    gap: 0;
  }

  body.sap-sandbox-experience .topbar .brand-mark {
    width: 120px;
    height: 48px;
  }

  body.sap-sandbox-experience .topbar .brand .brand-mark img {
    width: 189px;
    height: 70px;
  }

  body.sap-sandbox-experience .topbar-actions {
    gap: 8px;
  }

  body.sap-sandbox-experience .icon-button.mobile-menu {
    width: 44px;
    height: 44px;
    border-radius: 5px;
  }

  body.sap-sandbox-experience .topbar-actions .button {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 12px;
  }

  body.sap-sandbox-experience .sidebar {
    width: min(300px, calc(100vw - 48px));
    top: var(--topbar-height);
    padding: 16px 12px;
    transition: transform 180ms ease-out;
  }

  body.sap-sandbox-experience .sidebar-overlay {
    inset: var(--topbar-height) 0 0;
    background: rgb(15 22 71 / 48%);
    transition: opacity 180ms ease-out;
  }

  body.sap-sandbox-experience .main-content {
    margin-left: 0;
    padding: 24px 24px 36px;
  }

  body.sap-sandbox-experience .sap-platform .sap-page-header {
    padding-bottom: 20px;
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-grid, .analysis-tables, .data-grid, .bp-demo-layout) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sap-sandbox-experience .sap-platform .bp-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.sap-sandbox-experience .sap-platform .margin-scope-control {
    align-items: stretch;
    flex-direction: column;
  }

  body.sap-sandbox-experience .sap-platform .margin-scope-control select {
    max-width: 100%;
  }
}

/* 10 · Small screens: labels wrap; report data remains horizontally scrollable */
@media (max-width: 620px) {
  body.sap-sandbox-experience {
    --wb-space: 16px;
  }

  body.sap-sandbox-experience .main-content {
    padding: 24px 16px 32px;
  }

  body.sap-sandbox-experience .sap-platform .sap-page-header {
    flex-direction: column;
    gap: 12px;
  }

  body.sap-sandbox-experience .sap-platform .sap-page-header h1 {
    font-size: 28px;
  }

  body.sap-sandbox-experience .sap-platform .sap-page-lead {
    font-size: 13px;
    line-height: 1.7;
  }

  body.sap-sandbox-experience .sap-platform .access {
    margin-top: 24px;
    padding: 24px 20px;
  }

  body.sap-sandbox-experience .sap-platform .access h2 {
    font-size: 25px;
  }

  body.sap-sandbox-experience .sap-platform :is(.data-card, .sa-card, .sap-data-source, .sync-panel, .bp-toolbar, .margin-scope-control) {
    padding: 20px 16px;
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article) {
    padding: 16px;
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis, .finance-summary, .analysis-summary, .v06-kpi-strip) strong {
    font-size: 24px;
  }

  body.sap-sandbox-experience .sap-platform :is(.smb-section-head, .margin-business-heading, .bp-report-heading) {
    padding: 20px 16px 12px;
    flex-wrap: wrap;
  }

  body.sap-sandbox-experience .sap-platform :is(.margin-explorer-filters, .margin-source-controls, .margin-explorer-actions) {
    padding-inline: 16px;
  }

  body.sap-sandbox-experience .sap-platform :is(.bp-toolbar, .bp-assignments, .bp-group-edit) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sap-sandbox-experience .sap-platform :is(.smb-heading, .section-heading, .sap-data-heading) {
    flex-wrap: wrap;
    gap: 12px;
  }

  body.sap-sandbox-experience .sap-platform :is(.smb-actions, .smb-actions .secondary) {
    max-width: 100%;
  }

  body.sap-sandbox-experience .sap-platform :is(.smb-stock-chart, .margin-explorer-chart) {
    padding: 20px 16px;
    grid-template-columns: minmax(0, 1fr);
  }

  body.sap-sandbox-experience .sap-platform :is(.sap-platform-footer, .operational-saved) {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  body.sap-sandbox-experience .topbar {
    padding-inline: 12px;
    gap: 8px;
  }

  body.sap-sandbox-experience .topbar .brand-mark {
    width: 104px;
    height: 44px;
  }

  body.sap-sandbox-experience .topbar .brand .brand-mark img {
    width: 164px;
    height: 61px;
  }

  body.sap-sandbox-experience .main-content {
    padding-inline: 12px;
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpis, .smb-kpis, .margin-summary, .bp-kpis, .finance-summary, .analysis-summary, .v06-kpi-strip),
  body.sap-sandbox-experience .sap-platform .account-workspace .finance-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article) {
    border-right: 0;
    border-bottom: 1px solid var(--wb-line);
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article):nth-last-child(2):nth-child(odd) {
    border-bottom: 1px solid var(--wb-line);
  }

  body.sap-sandbox-experience .sap-platform :is(.sa-kpi, .smb-kpi, .margin-summary > div, .bp-kpis > article, .finance-summary > div, .analysis-summary > div, .v06-kpi-strip > article):last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sap-sandbox-experience,
  body.sap-sandbox-experience *,
  body.sap-sandbox-experience *::before,
  body.sap-sandbox-experience *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Editorial report hierarchy: whitespace carries panels; rules guide the figures. */
body.sap-sandbox-experience .sap-platform :is(.sa-card, .smb-card, .bp-report, .margin-business-workbench) {
  border-color: transparent;
  box-shadow: none;
}
body.sap-sandbox-experience .sap-platform :is(.sa-kpis, .smb-kpis, .margin-summary, .bp-kpis, .finance-summary, .analysis-summary, .v06-kpi-strip) {
  background: transparent;
  border-inline-color: transparent;
  border-top-color: transparent;
  border-radius: 0;
  box-shadow: none;
}
body.sap-sandbox-experience .sap-platform :is(.bp-toolbar, .margin-scope-control) {
  background: #eff1f8;
  border-color: transparent;
  box-shadow: none;
}
body.sap-sandbox-experience .sap-platform .bp-demo-intro {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--wb-line);
  border-radius: 0;
  padding: 0 0 24px;
}
body.sap-sandbox-experience .sap-platform .bp-demo-reading {
  background: #eff1f8;
  color: var(--wb-navy);
  border-radius: 5px;
  border-top: 2px solid var(--wb-line);
}
body.sap-sandbox-experience .sap-platform .bp-demo-reading h3 {
  color: var(--wb-navy);
  font-size: 20px;
}
body.sap-sandbox-experience .sap-platform .bp-demo-reading :is(p, .bp-demo-eyebrow) {
  color: var(--wb-muted);
  font-size: 12px;
}
body.sap-sandbox-experience .sap-platform .bp-demo-pending {
  border-top-color: #d5dbea;
  font-size: 12px;
}
body.sap-sandbox-experience .sap-platform .bp-demo-pending strong {
  color: #785000;
  font-size: 12px;
}

/* Keep account context while comparing columns in a long financial sheet. */
body.sap-sandbox-experience .sap-platform .bp-table-scroll {
  max-height: min(72vh, 760px);
  isolation: isolate;
}
body.sap-sandbox-experience .sap-platform .bp-statement thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f5f8;
}
body.sap-sandbox-experience .sap-platform .bp-statement :is(th, td):first-child:not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 1px 0 0 #e1e4ee;
}
body.sap-sandbox-experience .sap-platform .bp-statement .bp-group th:first-child {
  background: #eff1f8;
}
body.sap-sandbox-experience .sap-platform .bp-statement thead th:first-child {
  z-index: 3;
  background: #f4f5f8;
}
@media (max-width: 620px) {
  body.sap-sandbox-experience .sap-platform .bp-statement {
    min-width: 580px;
  }
  body.sap-sandbox-experience .sap-platform .bp-statement :is(th, td):first-child:not([colspan]) {
    position: static;
    min-width: 180px;
    width: 180px;
    max-width: 180px;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: none;
  }
  body.sap-sandbox-experience .sap-platform .bp-statement thead th:first-child:not([colspan]) {
    position: sticky;
    left: auto;
  }
}

/* Route focus remains available to keyboard users without a mouse-only frame. */
body.sap-sandbox-experience #sapPageTitle:focus:not(:focus-visible) {
  outline: none;
}
body.sap-sandbox-experience .sap-pending-badge {
  font-size: 12px !important;
}
