/* Cadence Forms 1.0 component geometry. These tokens are shared by every opted-in app. */
/* Opt-in edge-to-edge work surface. */
html body[data-cadence-ui="1.0"] #view.view:has(> .cad-grid-edge) { padding:0 !important; }
html body[data-cadence-ui="1.0"] #view > .cad-grid-edge { border-radius:0 !important; border:0 !important; }
/* No rail above the headers: the grid's own scrollbar runs along its bottom edge, and a 13px strip that showed even when
   every column fit wasted the space above the grid (Will 2026-10-12). */
html body[data-cadence-ui="1.0"]:has(#view > .cad-grid-edge) #view.view > .grid-hscroll { display:none !important; height:0 !important; margin:0 !important; }
html body[data-cadence-ui="1.0"] #view:has(> .cad-grid-edge) > .cad-foot { padding-top:0 !important; padding-bottom:0 !important; margin:0 !important; }
/* Optional compact shell and grid density. Default Forms geometry stays unchanged. */
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] :is(th.num,td.num) { padding-left:var(--sp-1) !important; padding-right:var(--sp-1) !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] td input.rwm-edit { width:40px !important; max-width:100% !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] th .cad-sort-btn { position:absolute; right:8px; top:12px; margin:0; background:#2b2134; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] th:has(.cad-sort-btn):is(:hover,:has(.cad-sort-btn.on)) { padding-right:26px !important; }
body[data-cadence-ui="1.0"] {
  --cad-toolbar-height:52px;
  --cad-control-height:32px;
  --cad-row-height:38px;
  --cad-header-height:34px;
  --cad-icon-size:15px;
  --cad-icon-gap:6px;
  --cad-ink:#262626;
  --cad-plum:#2b2134;
  --cad-row-alt:#f7f7f7;
  --cad-row-selected:#f0f0f0;
}
.cad-results-updating [data-cadence-component="grid"] { opacity:.65; transition:opacity 120ms ease; }
@media (prefers-reduced-motion:reduce) { .cad-results-updating [data-cadence-component="grid"] { transition:none; } }
html body[data-cadence-ui="1.0"] #shell-context-nav[data-cadence-component="toolbar"] {
  height:var(--cad-toolbar-height) !important; min-height:var(--cad-toolbar-height) !important;
  gap:12px !important;
}
html body[data-cadence-ui="1.0"] #shell-context-nav [data-cadence-component="filters"] {
  display:flex; align-items:center; flex-wrap:nowrap; gap:4px !important;
}
/* Opt-in dense forms save width through spacing, preserving the shared control geometry. */
html body[data-cadence-ui="1.0"] #shell-context-nav[data-cadence-density="compact"] {
  gap:var(--sp-2) !important;
}
html body[data-cadence-ui="1.0"] #shell-context-nav[data-cadence-density="compact"] [data-cadence-component="filters"] {
  gap:0 !important;
}
/* Reuse the existing title/menu in the top navigation, without adding a heading row. */
html body[data-cadence-ui="1.0"] #shell > .sidebar > .cad-navigation-title {
  position:relative; flex:none; margin:0 var(--sp-2); height:var(--cad-control-height);
}
html body[data-cadence-ui="1.0"] .cad-navigation-title > .shell-context-trigger {
  display:inline-flex; align-items:center; gap:var(--sp-1); height:var(--cad-control-height);
  padding:0 var(--sp-2); border:0; background:transparent; color:#efedf1 !important;
  font-size:15px; font-weight:600; white-space:nowrap;
}
html body[data-cadence-ui="1.0"] .cad-navigation-title > .shell-context-trigger strong { color:inherit !important; font:inherit; }
/* Plain titles have no menu; do not inherit the top navigation's dropdown affordance. */
html body[data-cadence-ui="1.0"] .cad-navigation-title:not(:has(> .shell-context-menu)) > span.shell-context-trigger::after {
  content:none !important; display:none !important;
}
html body[data-cadence-ui="1.0"] .cad-navigation-title > .shell-context-trigger:focus-visible { outline:2px solid #efedf1; outline-offset:2px; }
html body[data-cadence-ui="1.0"] .cad-navigation-title > .shell-context-menu { left:auto; right:0; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] > tbody > tr:not(.rwm-exp-row):not(.cad-section) > :is(td,th):not([rowspan]) {
  box-sizing:border-box !important; height:var(--cad-row-height) !important;
  padding-top:0 !important; padding-bottom:0 !important; line-height:18px !important;
}
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] > tbody > tr > td :is(.link-btn,.rwm-why-btn) {
  min-height:0 !important; height:auto !important; line-height:18px !important;
}
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] > tbody > tr > td :is(input,select,button.cad-rg-btn) {
  max-height:28px; box-sizing:border-box;
}
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] .cad-rown {
  font-variant-numeric:tabular-nums;
}
html body[data-cadence-ui="1.0"] #view [data-cadence-component="footer"] {
  font-size:12.5px; font-variant-numeric:tabular-nums;
}
html body[data-cadence-ui="1.0"] #shell-context-nav .cad-bar .pv > .cad-sel,
html body[data-cadence-ui="1.0"] #shell-context-nav .cad-bar .pv > .cad-sel > .cad-rg-btn {
  width:auto !important; min-width:0 !important; max-width:180px !important; flex:none !important;
}
html body[data-cadence-ui="1.0"] #view .cad-foot .im-readyline {
  display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin:0; padding:0;
  border:0; background:transparent; font-size:12.5px;
}

/* Cell editors read as cells until engaged, with an explicit keyboard focus state. */
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] .cad-sel { width:auto !important; min-width:0 !important; max-width:100% !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] .cad-sel > .cad-rg-btn {
  min-width:0 !important; min-height:26px !important; height:26px !important; padding:0 4px !important;
  border:1px solid transparent !important; background:transparent !important; box-shadow:none !important;
  font:inherit !important; gap:4px !important; border-radius:3px !important;
}
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] .cad-sel .cad-sel-caret { opacity:0; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] .cad-sel:is(:hover,:focus-within) .cad-sel-caret { opacity:1; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] .cad-sel > .cad-rg-btn:hover { background:#eee !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] .cad-sel > .cad-rg-btn:focus-visible { outline:2px solid #76528e !important; outline-offset:0; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid :is(.rwm-adj-input,.rwm-adj-note) {
  width:100% !important; max-width:100% !important; height:28px !important; padding:0 4px !important;
  border:1px solid transparent !important; border-radius:3px !important; background:transparent !important; box-shadow:none !important;
  color:var(--cad-ink) !important; font:inherit !important;
}
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid input:focus { outline:2px solid #76528e !important; outline-offset:0; background:white !important; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid input[type=number] { appearance:textfield; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid input::-webkit-inner-spin-button { appearance:none; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid tbody :is(th,td) { font-size:13px !important; color:var(--cad-ink) !important; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid tbody .rwm-adj-account { font-weight:400 !important; background:#fafafa !important; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid tbody .rwm-adj-item-col { background:#fafafa !important; color:var(--cad-ink) !important; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid :is(.rwm-adj-consensus-row,.rwm-adj-total-row) > :is(th,td) {
  background:#f3f0f5 !important; color:var(--cad-ink) !important; border-top:1px solid #d8cfdf !important; border-bottom:1px solid #d8cfdf !important; font-weight:600 !important;
}
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid td.rwm-adj-closed { background:transparent !important; color:#777 !important; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid td.dirty { background:#f3edf8 !important; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid .cad-cell-select { width:100% !important; }
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid .cad-cell-select > .cad-rg-btn { width:100% !important; justify-content:space-between; }
html body[data-cadence-ui="1.0"] #view .cad-foot .cad-pagination { margin-left:auto; display:flex; align-items:center; gap:10px; }

html body[data-cadence-ui="1.0"] #view table[data-cadence-render="direct"] td[data-column="item"] strong { font-weight:600 !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"].rwm-adj-grid :is(input.rwm-adj-input,input.rwm-adj-note) { border:1px solid transparent !important; background:transparent !important; }

/* A label inside summary is interactive HTML and swallows the native details toggle. */
html body[data-cadence-ui="1.0"] #shell-context-nav details.facet-dd > summary > label { pointer-events:none; }

/* Values use one cell treatment across forms; action buttons keep their own affordance. */
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] td :is(input[type="number"],input[type="text"],input:not([type]),select) {
  border:1px solid transparent !important; border-radius:3px !important;
  background:transparent !important; box-shadow:none !important; font:inherit !important;
}
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] td :is(input[type="number"],input[type="text"],input:not([type]),select):hover { background:#eee !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] td :is(input[type="number"],input[type="text"],input:not([type]),select):focus {
  outline:2px solid #76528e !important; outline-offset:0; background:white !important;
}
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] td input[type="number"] { appearance:textfield; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] td input::-webkit-inner-spin-button { appearance:none; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] td span.src {
  background:transparent !important; border:0 !important; padding:0 !important; font:inherit !important;
}

/* Compact reason cells reserve space for the label without widening period columns. */
html body[data-cadence-ui="1.0"] #view .rwm-adj-grid td:has(> .cad-cell-select) { padding-left:4px !important; padding-right:4px !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"].rwm-adj-grid .cad-cell-select > .cad-rg-btn { padding:0 2px !important; gap:2px !important; font-weight:400 !important; }

/* Preserve the approved fitted desktop grid; below its readable width use the
   native table's intrinsic numeric widths and the existing shared scroll rails.
   A container query also covers zoom, side panels and an already mounted grid. */
html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid { container-type:inline-size; }
@container (max-width:1349px) {
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default {
    table-layout:auto !important; width:max-content !important; min-width:100% !important;
  }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-fit-default td input.rwm-edit { field-sizing:content; width:auto !important; min-width:52px; max-width:none; }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-fit-default col { width:auto !important; }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td) {
    min-width:72px !important; text-overflow:clip;
  }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td)[data-column="rown"] { min-width:38px !important; }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td)[data-column="select"] { min-width:32px !important; }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td)[data-column="item"] { min-width:150px !important; }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td)[data-column="desc"] {
    width:220px !important; min-width:220px !important; max-width:220px !important; text-overflow:ellipsis;
  }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td):is([data-column="vendor"],[data-column="constraint"]) {
    width:180px !important; max-width:180px !important; text-overflow:ellipsis;
  }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td)[data-column="dest"] {
    width:240px !important; max-width:240px !important; text-overflow:ellipsis;
  }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td)[data-column="recQty"] { min-width:90px !important; }
  html body[data-cadence-ui="1.0"] #view .rwm-workbench-grid table.rwm-tbl.rwm-fit-default :is(th,td)[data-column="why"] { min-width:50px !important; }
}


/* Secondary business sections follow the same typography as grid chrome. */
html body[data-cadence-ui="1.0"] #view .cad-section-title {
  margin:16px 0 8px; font-size:13px; font-weight:600; color:var(--cad-ink);
}
html body[data-cadence-ui="1.0"] #view table[data-cadence-render="direct"] :is(.lr-flag,.lr-urg,.tpm-status,.ctp-stat,.cbmf-conf) {
  background:transparent !important; border:0 !important; padding:0 !important; font:inherit !important;
}

/* Reports retain chart/card composition while nested grids can scroll independently. */
html body[data-cadence-ui="1.0"] #view .cad-report-table { margin-top:12px; }
html body[data-cadence-ui="1.0"] #view .cad-report-section { margin-top:16px; }
html body[data-cadence-ui="1.0"] #view .cad-report-section > h3 { font-size:13px; margin:0 0 8px; }

html body[data-cadence-ui="1.0"] #view .cad-report-columns > * { min-width:0; }

/* The expanded search wrapper supplies the icon; the input must not draw it again. */
html body[data-cadence-ui="1.0"] #shell-context-nav .cad-filters.cad-bar.cad-bar .scope-select.cad-search.open input {
  background-image:none !important; padding:0 4px !important;
}

/* Canvas drawing dimensions update asynchronously after a viewport change. Keep
   the visible chart inside its current card during that resize as well. */
html body[data-cadence-ui="1.0"] #view .da-canvas-wrap { min-width:0; }
html body[data-cadence-ui="1.0"] #view .da-canvas-wrap > canvas {
  display:block; width:100% !important; height:100% !important; max-width:100%;
}

/* Period transitions remain visible without assigning colors to time fences. */
html body[data-cadence-ui="1.0"] #view table[data-cadence-component="grid"] > thead > tr > th[data-period-boundary="planning"] {
  border-left:2px dotted #938c81 !important;
}

/* Approved Cadence 1.0 header (2026-09-23). PACE colors belong to the shell,
   not tenant data/status colors. One owner across all opted-in applications. */
body[data-cadence-ui="1.0"] {
  --cad-pace-plan:#58c69f; --cad-pace-act:#69adf0;
  --cad-pace-coordinate:#b69ae8; --cad-pace-evaluate:#ea948f;
}
html body[data-cadence-ui="1.0"][data-layout="topbar"] #shell > .sidebar {
  --cad-brand-gap:32px; --cad-nav-pad:10px; --cad-nav-font:16px;
  display:flex !important; align-items:center !important; flex-wrap:nowrap;
  height:56px !important; min-height:56px !important; padding:0 24px !important;
  gap:0 !important; background:#2c2336 !important; border:0 !important;
}
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-brand {
  flex:0 0 auto !important; height:auto !important; padding:0 !important;
  margin:0 var(--cad-brand-gap) 0 0 !important; border:0 !important;
}
html body[data-cadence-ui="1.0"] #shell > .sidebar .cp-lockup { column-gap:10px !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .cp-lockup-mark { width:34px !important; height:36px !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .cp-lockup-wm { font-size:24px !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav {
  flex:0 0 auto !important; width:auto !important; height:56px !important;
  min-width:0 !important; margin:0 !important; padding:0 !important; gap:0 !important;
  justify-content:flex-start !important; align-items:stretch !important;
}
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav > .nav-group { flex:0 0 auto; height:100%; margin:0 !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav > .nav-group > :is(.nav-item-top,.nav-group-label) {
  height:100% !important; padding:0 var(--cad-nav-pad) !important; gap:7px !important;
  font-size:var(--cad-nav-font) !important; font-weight:400 !important;
  color:var(--nav-accent,#ccc8d0) !important; border-bottom:3px solid transparent !important;
  background:transparent !important; filter:none !important;
}
html body[data-cadence-ui="1.0"] #shell > .sidebar .nav-group[data-group="plan"] { --nav-accent:var(--cad-pace-plan) !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .nav-group[data-group="act"] { --nav-accent:var(--cad-pace-act) !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .nav-group[data-group="coordinate"] { --nav-accent:var(--cad-pace-coordinate) !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .nav-group[data-group="evaluate"] { --nav-accent:var(--cad-pace-evaluate) !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav > .nav-group > .nav-item-top.active,
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav > .nav-group:has(.nav-item.active) > .nav-group-label {
  color:var(--nav-accent,#fff) !important; border-bottom-color:var(--nav-accent,#fff) !important; font-weight:700 !important;
}
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav > .nav-group:is(:hover,.open) > :is(.nav-item-top,.nav-group-label) { background:#ffffff09 !important; }
/* The free space sits after the nav, so the account menu is anchored far right whether or not the tenant shows
   the action group (Ask / modes). With the auto margin on the action group, a tenant without one left the avatar
   floating next to the nav. */
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav { margin-right:auto !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .shell-actions {
  flex:0 0 auto !important; height:auto !important; margin:0 !important;
  padding:0 0 0 24px !important; gap:16px !important; align-items:center !important;
}
/* Demo mode switch (tenant "modes"): the kit menu select, sat in the top bar. Only the trigger is recoloured for the
   dark 1.0 bar; the listbox is the kit's own. */
#shell > .sidebar .cad-mode { flex:0 0 auto; display:flex; align-items:center; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .cad-mode .cad-rg-btn { height:32px; background:transparent; border:1px solid #746b7e; color:#efedf1; font-size:13px; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .cad-mode .cad-rg-btn:hover, html body[data-cadence-ui="1.0"] #shell > .sidebar .cad-mode .cad-rg-btn[aria-expanded="true"] { background:#ffffff12; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .shell-client {
  display:inline-block !important; font-size:13px !important; margin:0 !important; color:#b5afbd !important;
}
html body[data-cadence-ui="1.0"] #shell > .sidebar .shell-ask {
  height:32px !important; padding:0 12px !important; border:1px solid #746b7e !important;
  border-radius:6px !important; font-size:13px !important; font-weight:400 !important; color:#efedf1 !important;
}
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-footer {
  flex:0 0 auto !important; height:auto !important; padding:0 !important; margin:0 0 0 16px !important;
}
html body[data-cadence-ui="1.0"] #shell > .sidebar .user-card { padding:0 !important; width:32px !important; height:32px !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .user-card > span { width:32px !important; height:32px !important; font-size:13px !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .usr-menu { top:calc(100% + 4px); }
/* Keep tenant identity available on the account tooltip as its visible label gives
   room to the full navigation. All menu destinations retain their existing handlers. */
@media(max-width:1380px) {
  html body[data-cadence-ui="1.0"][data-layout="topbar"] #shell > .sidebar { --cad-brand-gap:28px; --cad-nav-pad:8px; padding:0 20px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .shell-client { display:none !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .shell-actions { gap:12px !important; padding-left:20px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-footer { margin-left:12px !important; }
}
@media(max-width:1080px) {
  html body[data-cadence-ui="1.0"][data-layout="topbar"] #shell > .sidebar { --cad-brand-gap:22px; --cad-nav-pad:7px; --cad-nav-font:14px; padding:0 16px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .cp-lockup { column-gap:8px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .cp-lockup-mark { width:30px !important; height:32px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .cp-lockup-wm { font-size:22px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .shell-actions { padding-left:16px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .shell-ask { padding:0 10px !important; font-size:12px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav > .nav-group > :is(.nav-item-top,.nav-group-label) { gap:6px !important; }
}
@media(max-width:940px) {
  html body[data-cadence-ui="1.0"][data-layout="topbar"] #shell > .sidebar { flex-wrap:wrap; height:auto !important; min-height:96px !important; padding-top:10px !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav { order:3; flex:0 0 100% !important; height:44px !important; overflow-x:auto; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-brand { margin-right:auto !important; }
  html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav .nav-group-items { position:fixed !important; top:96px !important; left:16px !important; right:auto !important; max-width:calc(100vw - 32px); }
}

html body[data-cadence-ui="1.0"][data-layout="topbar"] #shell > .sidebar.cad-header-wrap { flex-wrap:wrap; height:auto !important; min-height:96px !important; padding-top:10px !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar.cad-header-wrap .sidebar-nav { order:3; flex:0 0 100% !important; height:44px !important; overflow-x:auto; }
html body[data-cadence-ui="1.0"] #shell > .sidebar.cad-header-wrap .sidebar-brand { margin-right:auto !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar.cad-header-wrap .nav-group-items { position:fixed !important; top:96px !important; left:16px !important; right:auto !important; max-width:calc(100vw - 32px); }
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav > .nav-group:not(.open) > .nav-group-items { visibility:hidden !important; opacity:0 !important; pointer-events:none !important; }
html body[data-cadence-ui="1.0"] #shell > .sidebar .sidebar-nav > .nav-group.open > .nav-group-items { visibility:visible !important; opacity:1 !important; pointer-events:auto !important; }

html body[data-cadence-ui="1.0"] #shell > .sidebar .shell-ask[hidden] { display:none !important; }

/* Contextual grid frames keep their rows when several grids share the kit drawer body. */
html body[data-cadence-ui="1.0"] .rwm-why-drawer .bd > .table-wrap {
  flex:0 0 auto;
  max-height:55vh;
  overflow:auto;
}

/* At 140% zoom the plan-save chip keeps its status dot; the 'Saved · time' text moves to its tooltip so the toolbar stays one row. */
@media (max-width:1100px){ html body[data-cadence-ui="1.0"] .plan-save.ok .plan-save-txt { display:none; } }

/* Cadence Plan 1.0 is sans-serif throughout (Will, 2026-09-25: "get rid of all the serif fonts"). The editorial layers
   set display serifs (Newsreader, Instrument Serif, Iowan) on headings and hero numbers; on 1.0 every one of them takes
   the kit face. The serif variables are remapped, and the rules that name a serif directly are listed. The wordmark
   (.cp-lockup) is untouched. Found by scanning every demo route in all three modes plus the sign-in card. */
html body[data-cadence-ui="1.0"] { --font-serif:"Instrument Sans", Inter, Arial, sans-serif; --serif:"Instrument Sans", Inter, Arial, sans-serif; --cad-font-display:"Instrument Sans", Inter, Arial, sans-serif; --fpa-serif:"Instrument Sans", Inter, Arial, sans-serif; --font-display:"Instrument Sans", Inter, Arial, sans-serif; }
html body[data-cadence-ui="1.0"] :is(.auth-intro h1, .help-head h3, .rwm-why-drawer .hd h3, .cp-exec-hero h1, .cp-cadence-read h2, .cp-proof > strong, .mfp-kpi strong, .mfp-fx, .mfp-page-head h2, .mfp-command-orientation b, .mfp-mlabel, .mfp-module-switch select, .cp-insight-ribbon strong, .cp-plan-metric > strong, .cp-performance-evidence h2, .cp-hierarchy h2, .cp-hierarchy-empty strong, .page-head h1, .page-head h2, .afa-im-ledger .stat strong, .afa-im-thumb i, .afa-im-drawer-head h3, .afa-im-identity h3, .afa-im-section-head h4, .afa-im-metric strong, .otb-dc-gap, .otb-split-head b, .otb-slim-cover strong, .otb-grid-head strong, .otb-group-row span, .otb-action-head h3, .otb-action-callout strong, .otb-action-metrics strong, .cp-deep-nav h1, .cp-deep-metric > strong, .cp-section-head h2, .cp-daily-insight strong, .cp-daily-hero strong, .cp-daily-metric strong, .sev-today h2, .sev-ops-tile strong, .sev-wq-tile strong, .sev-wq-card-head h2, .fvrep-h3, .cadchat-title, .adm-head-title, .adm-dr-asof, .usr-modal-h, .rwm-scen-kick, .uat-d-head h3, .uat-empty h3) { font-family:"Instrument Sans", Inter, Arial, sans-serif !important; }

/* Compact opt-in follows the default shell and responsive geometry. */
html body[data-cadence-ui="1.0"][data-layout="topbar"][data-cadence-chrome="compact"] #shell > .sidebar {
  display:flex !important; flex-direction:row !important; flex-wrap:nowrap !important;
  --cad-nav-pad:6px; --cad-nav-font:14px; height:44px !important; min-height:44px !important; padding:0 var(--sp-4) !important; gap:var(--sp-3) !important;
}
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .sidebar-brand {
  flex:none !important; padding:0 !important; margin:0 !important; border:0 !important;
}
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .sidebar-brand .cp-lockup .cp-lockup-mark { width:19px !important; height:20px !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .sidebar-brand strong.cp-lockup-wm { font-size:16px !important; line-height:20px !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .sidebar-brand .cp-lockup-sub { display:none !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar > .shell-context-picker { flex:none !important; margin:0 !important; position:relative; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .shell-context-trigger { padding:0 !important; min-height:32px !important; color:#fff !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .shell-context-trigger strong { font-size:14px !important; font-weight:600 !important; color:#fff !important; }
html body[data-cadence-ui="1.0"][data-layout="topbar"][data-cadence-chrome="compact"] #shell > .sidebar .sidebar-nav { flex:1 1 auto !important; min-width:0 !important; width:auto !important; height:44px !important; order:0 !important; overflow:visible !important; margin:0 !important; gap:var(--sp-1) !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .shell-actions { flex:none !important; margin:0 0 0 auto !important; padding:0 !important; gap:var(--sp-2) !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell #shell-context-nav[data-cadence-component="toolbar"] { --cad-toolbar-height:44px; height:44px !important; min-height:44px !important; padding:0 var(--sp-4) !important; gap:var(--sp-2) !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .cp-lockup { column-gap:var(--sp-1) !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .sidebar-footer { margin-left:0 !important; }
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .sidebar-nav .nav-group-items { position:absolute !important; top:100% !important; left:0 !important; right:auto !important; }

/* Passive context titles must not inherit the product navigation menu affordance. */
html body[data-cadence-ui="1.0"][data-cadence-chrome="compact"] #shell > .sidebar .shell-context-trigger:not(button)::after { content:none !important; display:none !important; }

/* Optional view menu that also names its form, without duplicating the selected view in the trigger. */
html body[data-cadence-ui="1.0"] #shell-context-nav .cad-filters.cad-bar.cad-bar .cad-lanes-dd.cad-lanes-title > summary,
html body[data-cadence-ui="1.0"] #shell-context-nav .cad-filters.cad-bar.cad-bar .cad-lanes-dd.cad-lanes-title > summary .lbl { font-size:12px !important; }
html body[data-cadence-ui="1.0"] #shell-context-nav .cad-filters.cad-bar.cad-bar .cad-lanes-dd.cad-lanes-title > summary .lbl::after { content:none !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] :is(td.cad-status,td.cad-icon-cell) { padding-left:var(--sp-2) !important; padding-right:var(--sp-2) !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] td.cad-status .rwm-chip { padding-left:var(--sp-1) !important; padding-right:var(--sp-1) !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] td.cad-icon-cell { text-align:center !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] td .rwm-why-btn.cad-icon-only { width:32px !important; padding:0 !important; justify-content:center !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] td .cad-icon-only svg { display:block; width:16px; height:16px; stroke:currentColor; stroke-width:1.8; fill:none; stroke-linecap:round; stroke-linejoin:round; }

html body[data-cadence-ui="1.0"] #shell-context-nav .cad-filters.cad-bar.cad-bar .cad-lanes-dd.cad-lanes-title > summary .cad-caret { display:inline-block !important; font-size:10px !important; margin-left:4px !important; }

/* Keep short status badges close to the quantities in compact grids. */
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] td.cad-status { text-align:right !important; padding-left:var(--sp-1) !important; padding-right:var(--sp-1) !important; }
html body[data-cadence-ui="1.0"] #view table[data-cadence-density="compact"] th abbr { text-decoration:none; cursor:help; }

/* A phone (docs/design/decisions/2026-10-18-phone-check-screens.md): the toolbar keeps one row, so its spacing tightens
   (12px side padding, 10px between filters, never wider than the phone), and the screen title gives way with an ellipsis before anything spills. */
@media (max-width: 700px) {
  html body[data-cadence-ui="1.0"][data-cadence-chrome] #shell #shell-context-nav[data-cadence-component="toolbar"] { padding: 0 12px !important; gap: 6px !important; max-width: 100vw !important; min-width: 0 !important; box-sizing: border-box !important; }
  html body[data-cadence-ui="1.0"] #shell-context-nav .cad-filters.cad-bar { gap: 0 10px !important; margin-left: 6px !important; }
  /* "More filters" reads "Filters" on a phone, so a screen title has room ("Backorders" read "Backorde…") */
  html body[data-cadence-ui="1.0"][data-cadence-chrome] #shell #shell-context-nav[data-cadence-component="toolbar"] .cad-filters-more-btn .lbl { font-size: 0 !important; }
  html body[data-cadence-ui="1.0"][data-cadence-chrome] #shell #shell-context-nav[data-cadence-component="toolbar"] .cad-filters-more-btn .lbl::after { content: "Filters"; font-size: 13px !important; }
  html body[data-cadence-ui="1.0"][data-cadence-chrome] #shell #shell-context-nav[data-cadence-component="toolbar"] > .shell-context-picker { min-width: 0 !important; flex: 0 1 auto !important; overflow: hidden; }
  html body[data-cadence-ui="1.0"][data-cadence-chrome] #shell #shell-context-nav[data-cadence-component="toolbar"] > .shell-context-picker * { min-width: 0 !important; max-width: 100% !important; }
  html body[data-cadence-ui="1.0"][data-cadence-chrome] #shell #shell-context-nav[data-cadence-component="toolbar"] > .shell-context-picker strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
