/* CEO round 4 (owner Nov 3 10:45): "keep the glass, make it more elegant; no empty space inside a panel; every panel
   perfectly symmetrical and uniform". Loaded LAST. One rhythm for the whole page:
   panel padding 14, panel title 18 (one size), header icon chip 28, list rows equal inside a panel, numbers right-aligned. */
:root { --r4-pad: 20px; --r4-title: 18px; --r4-chip: 28px; --r4-row-gap: 5px; }

@media (min-width: 1280px) {
  /* ---- 1. Pipeline River: the old flowing river (curve, filaments, packets) inside the glass band ---- */
  html body #main .card.river { padding: 10px var(--r4-pad) 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
  html body #main .river .ch { margin: 0; padding: 0; min-height: var(--r4-chip); align-items: center; gap: 14px; }
  html body #main .river .rv { margin: 0; }
  html body #main .river .rv-water { height: 48px; }
  html body #main .river .rv-water .flag { top: 0; transform: translate(-50%, 0); height: 20px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; font-size: 11px; line-height: 1; }
  html body #main .river .rv-water .flag .ic { width: 13px; height: 13px; }
  html body #main .river .stages { margin: 0; padding: 0; background: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  html body #main .river .stages li + li::before { top: 4px; bottom: 4px; }
  html body #main .river .stages > li { justify-content: flex-start; }
  /* Every stage column has the same three rows, so numbers, labels and "waiting" sit on common lines. */
  html body #main .river .stages button { display: grid; grid-template-columns: auto auto; grid-template-rows: 24px 30px 16px; column-gap: 8px; row-gap: 0; justify-content: center; align-content: start; justify-items: center; padding: 0 6px; }
  html body #main .river .stages button .num { grid-row: 1; grid-column: 1; margin: 0; justify-self: end; }
  html body #main .river .stages button .sn { grid-row: 1; grid-column: 2; justify-self: start; align-self: center; font-size: 14px; line-height: 1; }
  html body #main .river .stages button .sv { grid-row: 2; grid-column: 1 / -1; align-self: center; font-size: 24px; line-height: 1; }
  html body #main .river .stages button .sl.queue-label, html body #main .river .stages button .sf { grid-row: 3; grid-column: 1 / -1; margin: 0; font-size: 12px; font-weight: 600; line-height: 16px; color: var(--platform-muted); align-self: center; }
  html body #main .river .stages button .sa { grid-row: 3; grid-column: 1; margin: 0; font-size: 12px; line-height: 16px; justify-self: end; }
  html body #main .river .stages button .sl:not(.queue-label) { grid-row: 3; grid-column: 2; margin: 0; font-size: 11px; line-height: 16px; justify-self: start; }
}

/* ---- 2. KPI row: four equal cards, one identical centered layout (label, figure, one small note) ---- */
html body #main .kband .kpi.pv { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; padding: 8px var(--r4-pad); position: relative; }
html body #main .kband .kpi.pv .lab { display: flex; align-items: center; justify-content: center; width: 100%; gap: 8px; font-size: 14px; }
html body #main .kband .kpi.pv .chev { position: absolute; right: var(--r4-pad); top: 10px; margin: 0; }
html body #main .kband .kpi.pv > div:nth-child(2) { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%; min-width: 0; }
html body #main .kband .kpi.pv .v, html body #main .kband .kpi.pv .v.none { display: block; flex: none; font-size: 27px; line-height: 1.1; font-weight: 780; text-align: center; white-space: nowrap; }
html body #main .kband .kpi.pv .v.none { color: var(--platform-muted); font-weight: 500; letter-spacing: 0; }
html body #main .kband .kpi.pv .d { display: block; flex: none; width: 100%; font-size: 11.5px; line-height: 1.25; margin: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-line-clamp: unset; }
html body #main .kband .kpi.pv .d > span { white-space: nowrap; }
@media (min-width: 1280px) {
  html body #main .kband .kpis { grid-auto-rows: 1fr; }
  html body #main .kband .kpi.pv { height: 84px; min-height: 84px; }
}

/* ---- watch list: an unconnected source keeps its place as a calm dash, with no "Not connected" wording on the row ---- */
html body #main .decide .decision.idle b { color: var(--platform-muted); opacity: .8; }

/* ======================= 3-5. Panels: one rhythm (padding, header, title, chip, equal rows, right-aligned numbers) ======================= */
@media (min-width: 1280px) {
  /* Headers: one title size, one 28 px icon chip, in every panel. */
  html body #main .card .ch > .ico, html body #main .ach > .ic-badge { width: var(--r4-chip); height: var(--r4-chip); margin: 0; border-radius: 9px; flex: none; }
  html body #main .card .ch > .ico .ic, html body #main .ach > .ic-badge .ic { --ic-size: 18px; width: 18px; height: 18px; }
  html body #main :is(.river .ch h2, .ach h2, .verify .ch h3, .decide .ch h3, .bottom .ch h3) { font-size: var(--r4-title); line-height: var(--r4-chip); font-weight: 600; margin: 0; letter-spacing: -.2px; }
  html body #main .ach { padding: var(--r4-pad) 0 var(--r4-pad) var(--r4-pad); }
  html body #main .ach > .map-ico { position: absolute; left: var(--r4-pad); top: var(--r4-pad); }
  html body #main .ach h2 { padding-left: 36px; }
  html body #main .river .ch .eyebrow { align-self: center; line-height: var(--r4-chip); }

  /* Mid row: Live AI verification and Watch list. */
  html body #main .cols > .card { padding: var(--r4-pad); gap: 8px; box-sizing: border-box; }
  html body #main .cols > .card > .ch { margin: 0; min-height: var(--r4-chip); flex: none; gap: 8px; align-items: center; }
  html body #main .cols > .card > .ch .lnk { margin-left: auto; }
  html body #main .verify.pv { gap: 6px; }
  html body #main .verify.pv > .sub, html body #main .verify.pv > .meta { margin: 0; flex: none; font-size: 12px; line-height: 1.3; }
  html body #main .verify.pv > .calls { flex: 3 1 0; max-height: none; grid-auto-rows: minmax(0, 1fr); gap: 6px; }
  html body #main .verify.pv > .calls > .call { margin: 0; width: 100%; padding: 0 12px; height: 100%; }
  html body #main .verify.pv > .ti { margin: 0; flex: none; font-size: 13px; }
  html body #main .verify.pv > .ti-empty { flex: 1 1 0; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--platform-row-line); background: var(--platform-row); font-size: 14px; }
  html body #main .verify.pv > .ti-empty b { font-weight: 600; }
  html body #main .verify.pv > .ti-empty span { color: var(--platform-muted); font-size: 12.5px; }
  html body #main .verify.pv > .bar { margin: 0; flex: none; }

  html body #main .decide > .decisions { flex: 1 1 0; display: grid; gap: 6px; grid-auto-rows: calc((100% - 24px) / 5); align-content: start; }
  html body #main .decide .decision { height: 100%; min-height: 0; padding: 0 12px; display: grid; grid-template-columns: 28px 44px minmax(0, 1fr) 18px; align-items: center; column-gap: 10px; text-align: left; }
  html body #main .decide .decision .dico { width: 28px; height: 28px; }
  html body #main .decide .decision .dt { display: contents; }
  html body #main .decide .decision .dt > b { grid-column: 2; text-align: right; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
  html body #main .decide .decision .dt > span:not(.sr) { grid-column: 3; font-size: 14px; line-height: 1.25; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html body #main .decide .decision .dt > small { display: none; }
  html body #main .decide .decision .chev { grid-column: 4; justify-self: end; }
  html body #main .decide .decision .dico { grid-column: 1; }

  /* Bottom row: four equal panels, header + five equal rows each. */
  html body #main .bottom > .card { display: grid; grid-template-rows: var(--r4-chip) minmax(0, 1fr); row-gap: 8px; padding: var(--r4-pad); box-sizing: border-box; align-content: stretch; overflow: hidden; }
  html body #main .bottom > .card > .ch { margin: 0; min-height: var(--r4-chip); gap: 8px; align-items: center; }
  html body #main .bottom > .card > .ch h3 { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body #main .bottom > .card > .ch .rep-all { margin-left: auto; }
  /* The summary figure is a pill at the right end of the header. */
  html body #main .bottom .ch .dept-big.pill { flex: none; width: auto; height: 24px; margin: 0; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 999px; }
  html body #main .bottom .ch .dept-big.pill .ml { display: none; }
  html body #main .bottom .ch .dept-big.pill .ring { all: unset; display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
  html body #main .bottom .ch .dept-big.pill .ring b { font-size: 13px; line-height: 24px; font-weight: 700; }
  html body #main .bottom .ch .dept-big.pill .ring small { font-size: 10.5px; line-height: 24px; max-width: none; color: var(--platform-muted); }
  html body #main .bottom .ch .dept-pill { flex: none; height: 24px; padding: 0 10px; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-size: 10.5px; white-space: nowrap; border: 1px solid var(--platform-row-line); background: var(--platform-row); }
  html body #main .bottom .ch .dept-pill b { font-size: 13px; }
  html body #main .bottom .ch .dept-pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
  html body #main .bottom .ch .dept-big.pill, html body #main .bottom .ch .rep-all { background: var(--platform-row) !important; border: 1px solid var(--platform-row-line) !important; box-shadow: none !important; }
  /* Equal rows: five rows fill the body exactly; any more scroll inside. */
  html body #main .bottom .reps .tiles, html body #main .bottom .dbody > .rows, html body #main .bottom .inv-products, html body #main .bottom > .card > .card-scroll {
    display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: calc((100% - 16px) / 5); gap: 4px; align-content: start; margin: 0; padding: 0; height: 100%; min-height: 0; box-sizing: border-box; }
  html body #main .bottom .reps .tiles { flex: none; }
  html body #main .bottom > .card > .dbody { display: block; min-height: 0; height: 100%; padding: 0; margin: 0; overflow: hidden; }
  html body #main .bottom .reps .tiles .metric-row.rep, html body #main .bottom .dbody .rows > .metric-row { height: 100%; min-height: 0; }
  html body #main .bottom .reps .tiles .metric-row.rep button, html body #main .bottom .dbody .metric-row button { height: 100%; min-height: 0; padding: 0 10px; }
  html body #main .bottom .dbody .rows > .dept-flags { height: 100%; min-height: 0; margin: 0; padding: 0 10px; display: flex; align-items: center; border: 1px solid var(--platform-row-line); border-radius: 12px; background: var(--platform-row); }
  html body #main .bottom .dbody .rows > .dept-flags > .dept-flag { display: flex; flex-direction: row-reverse; justify-content: space-between; width: 100%; max-height: none; padding: 0; background: none !important; border: 0 !important; box-shadow: none !important; font-size: inherit; color: var(--warn); }
  html body #main .bottom .dbody .rows > .dept-flags > .dept-flag > b { font-size: inherit; font-variant-numeric: tabular-nums; }
  html body #main .bottom .inv-tile, html body #main .bottom .inv-more { height: 100%; min-height: 0; }
  html body #main .bottom .inv-tile { padding: 0 10px 0 3px; }
  html body #main .bottom .inv-tile__stage { width: 24px; height: 24px; }
  html body #main .bottom .inv-tile .inv-tile__stage { background: none; }
  html body #main .bottom .inv-tile.has-photo .inv-tile__stage { width: 30px; height: 30px; margin-block: -3px; overflow: visible; }
  html body #main .bottom .inv-tile__photo { filter: drop-shadow(0 2px 3px rgba(0,0,0,.28)); }
  html body #main .bottom .inv-tile__meta { display: flex; align-items: center; gap: 8px; }
  html body #main .bottom .inv-tile__meta > b { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; -webkit-line-clamp: unset; font-size: 12px; }
  html body #main .bottom .inv-tile__meta > .inv-chip { order: 2; flex: none; }
  html body #main .bottom .inv-tile__meta > .inv-tile__units { order: 3; flex: none; min-width: 64px; text-align: right; font-size: 12px; }
  /* Right-aligned numbers in every list. */
  html body #main .bottom :is(.mv, .inv-tile__units, .rep .mv) { text-align: right; font-variant-numeric: tabular-nums; margin-left: auto; }

  /* People: five equal rows. */
  html body #main .bottom .card-scroll > * { min-width: 0; margin: 0; padding: 0 10px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; border: 1px solid var(--platform-row-line); border-radius: 12px; background: var(--platform-row); font-size: 12px; white-space: nowrap; overflow: hidden; height: 100%; }
  html body #main .bottom .card-scroll > .people-extra { display: contents; border: 0; background: none; }
  html body #main .bottom .card-scroll .people-extra > * { min-width: 0; margin: 0; padding: 0 10px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; border: 1px solid var(--platform-row-line); border-radius: 12px; background: var(--platform-row); height: 100%; white-space: nowrap; overflow: hidden; }
  html body #main .bottom .card-scroll .people-extra > .ppl-h { order: 3; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--platform-ink); }
  html body #main .bottom .card-scroll .people-extra > .ppl-top { order: 4; justify-content: space-between; }
  html body #main .bottom .card-scroll .people-extra > .ppl-lead { order: 5; font-size: 12px; margin: 0; color: var(--platform-ink); }
  html body #main .bottom .card-scroll > .ppl-af { order: 1; grid-column: auto; grid-row: auto; justify-content: space-between; }
  html body #main .bottom .card-scroll > .act-strip { order: 2; grid-column: auto; padding: 0 6px; }
  html body #main .bottom .card-scroll .ppl-top .ppl-h { margin: 0; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--platform-ink); }
  html body #main .bottom .card-scroll .ppl-stack__av { width: 22px; height: 22px; font-size: 9px; margin-left: -6px; }
  html body #main .bottom .card-scroll .ppl-stack { padding-left: 6px; }
  html body #main .bottom .card-scroll .act-chip { height: 22px; min-height: 0; }
}

@media (min-width: 1280px) {
  html body #main .ch > .ico.is-attn.a-halo::after { display: none; }
  html body #main .ch > .ico.is-attn.a-halo { animation: none; }
  /* Pills: the earlier circle rules are !important, so the pill resets them the same way. */
  html body #main .bottom .ch .dept-big.pill .ring, html body #main .bottom .ch .dept-big.pill .ring.none { width: auto !important; height: auto !important; padding: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; display: inline-flex !important; align-items: center !important; gap: 5px; }
  html body #main .bottom .ch .dept-big.pill .ring b, html body #main .bottom .ch .dept-big.pill .ring small { line-height: 1 !important; font-size: 13px; }
  html body #main .bottom .ch .dept-big.pill .ring small { font-size: 10.5px !important; }
  html body #main .bottom .ch .dept-big.pill .ring .ic { width: 16px; height: 16px; }
  html body #main .bottom .inv-tile__meta { flex-direction: row !important; }
  html body #main .bottom .dbody .rows > .dept-flags > .dept-flag > span { display: block; }
  html body #main .bottom .dbody .rows > .dept-flags > .dept-flag > span::first-letter { text-transform: uppercase; }
  html body #main .bottom .dbody .rows > .dept-flags > .dept-flag > span:first-child { margin-left: 0; }
}
@media (min-width: 1280px) {
  html body #main .bottom > .card > .ch { grid-row: 1; }
  html body #main .bottom > .card > :is(.inv-products, .dbody, .tiles, .card-scroll) { grid-row: 2; }
  html body #main .bottom > .card:has(> .inv-products) { row-gap: 8px; padding: var(--r4-pad); }
}

/* ======================= Short screens (1366x768, 1440x900): same panels, tighter rhythm, still no empty band and no cut row ======================= */

@media (min-width: 1280px) and (max-height: 940px) {
  :root { --r4-pad: 16px; --r4-chip: 24px; --r4-title: 16px; --r4-row-gap: 4px; }
  html body #main .card .ch > .ico .ic, html body #main .ach > .ic-badge .ic { --ic-size: 16px; width: 16px; height: 16px; }
  /* KPI */
  html body #main .kband .kpi.pv { height: 68px; min-height: 68px; padding: 7px var(--r4-pad) 6px; gap: 2px; }
  html body #main .kband .kpi.pv .lab { font-size: 13px; }
  html body #main .kband .kpi.pv .kic { width: 22px; height: 22px; }
  html body #main .kband .kpi.pv .v, html body #main .kband .kpi.pv .v.none { font-size: 22px; }
  html body #main .kband .kpi.pv .d { font-size: 11px; }
  html body #main .kband .kpi.pv .chev { top: 8px; }
  /* River */
  html body #main .card.river { padding: 6px var(--r4-pad) 6px; gap: 2px; }
  html body #main .river .rv-water { height: 38px; }
  html body #main .river .rv-water .flag { height: 17px; font-size: 10.5px; padding: 0 8px; }
  html body #main .river .stages button { grid-template-rows: 22px 26px 14px; }
  html body #main .river .stages button .sn { font-size: 13px; }
  html body #main .river .stages button .sv { font-size: 21px; }
  html body #main .river .stages button .sl.queue-label, html body #main .river .stages button .sf { font-size: 11.5px; line-height: 14px; }
  html body #main .river .stages .num { width: 22px; height: 22px; font-size: 12px; }
  /* Mid row */
  html body #main .cols > .card { gap: 5px; }
  html body #main .verify.pv { gap: 4px; }
  html body #main .verify.pv > .sub, html body #main .verify.pv > .meta { font-size: 11.5px; line-height: 1.2; }
  html body #main .verify.pv > .calls { gap: 4px; }
  html body #main .verify.pv > .calls > .call { grid-template-columns: 24px minmax(0, 1fr) 72px auto; gap: 8px; padding: 0 10px; }
  html body #main .verify.pv .call .ini { width: 24px; height: 24px; }
  html body #main .verify.pv .call .wave { height: 18px; }
  html body #main .verify.pv .call .cwho { font-size: 12px; line-height: 1.15; }
  html body #main .verify.pv .call .cwho span { font-size: 11px; }
  html body #main .verify.pv > .ti-empty { min-height: 0; font-size: 13px; }
  html body #main .decide > .decisions { gap: 4px; grid-auto-rows: calc((100% - 16px) / 5); }
  html body #main .decide .decision .dt > b { font-size: 18px; }
  html body #main .decide .decision .dt > span:not(.sr) { font-size: 13px; }
  html body #main .decide .decision { grid-template-columns: 24px 36px minmax(0, 1fr) 16px; column-gap: 8px; }
  html body #main .decide .decision .dico { width: 24px; height: 24px; }
  html body #main .decide .decision .dico .ic { width: 16px; height: 16px; --ic-size: 16px; }
  html body #main .ach .sub > span:nth-of-type(n+4) { display: none; }
  /* Bottom row */
  html body #main .bottom > .card { row-gap: 6px; }
  html body #main .bottom .reps .tiles, html body #main .bottom .dbody > .rows, html body #main .bottom .inv-products, html body #main .bottom > .card > .card-scroll { grid-auto-rows: calc((100% - 12px) / 5); gap: 3px; }
  html body #main .bottom .reps .rk { width: 18px; height: 18px; font-size: 8.5px; }
  html body #main .bottom .inv-tile__stage { width: 18px; height: 18px; }
  html body #main .bottom .inv-tile { gap: 6px; padding-left: 4px; }
  html body #main .bottom .ch .dept-big.pill, html body #main .bottom .ch .dept-pill { height: 22px; padding: 0 8px; }
  html body #main .bottom .card-scroll > *, html body #main .bottom .card-scroll .people-extra > * { padding: 0 8px; font-size: 11.5px; }
  html body #main .bottom .card-scroll .ppl-stack__av { width: 18px; height: 18px; }
  html body #main .bottom .card-scroll .act-chip { height: 18px; font-size: 11px; }
}
@media (min-width: 1280px) and (max-width: 1599px) {
  :root { --r4-title: 15px; --r4-pad: 16px; }
  html body #main .bottom .ch .dept-pill { display: none; }
  html body #main .bottom .card-scroll .ppl-af .af-off { display: none; }
  html body #main .bottom .card-scroll .people-extra > .ppl-h { overflow: hidden; text-overflow: ellipsis; display: block; line-height: 1; padding-top: 0; }
  html body #main .river .ch .eyebrow { letter-spacing: .14em; }
}
@media (min-width: 1280px) and (max-width: 1599px) {
  html body #main .bottom .ppl-long { display: none; }
  html body #main .bottom .card-scroll .ppl-stack__av { margin-left: -5px; }
  html body #main .bottom .card-scroll .ppl-stack__av:nth-child(n+4) { display: none; }
  html body #main .bottom .card-scroll .ppl-stack__av b { font-size: 8px; }
}
@media (min-width: 1280px) and (max-height: 940px) {
  html body #main .verify.pv > .ti-empty { flex: 0 0 42px; }
}

/* Lists as flex columns: five rows share the body exactly; a list with fewer rows grows its rows to fill (never an empty band);
   a longer list keeps five whole rows in view and scrolls the rest inside. */
:root { --r4-gap: 4px; --r4-rows: 5; }
@media (min-width: 1280px) and (max-height: 940px) { :root { --r4-gap: 3px; } }
@media (min-width: 1280px) {
  html body #main .bottom .reps .tiles, html body #main .bottom .dbody > .rows, html body #main .bottom .inv-products, html body #main .bottom > .card > .card-scroll, html body #main .decide > .decisions {
    display: flex; flex-direction: column; gap: var(--r4-gap); overflow-x: hidden; overflow-y: auto; grid-auto-rows: unset; }
  html body #main .bottom .reps .tiles > *, html body #main .bottom .dbody > .rows > *, html body #main .bottom .inv-products > *, html body #main .bottom > .card > .card-scroll > :not(.people-extra), html body #main .bottom .card-scroll .people-extra > *, html body #main .decide > .decisions > * {
    flex: 1 0 calc((100% - (var(--r4-rows) - 1) * var(--r4-gap)) / var(--r4-rows)); min-height: 0; height: auto; box-sizing: border-box; }
  html body #main .decide > .decisions { gap: var(--r4-gap); }
  html body #main .bottom .reps .tiles .metric-row.rep, html body #main .bottom .dbody .rows > .metric-row { height: auto; }
  html body #main .bottom .reps .tiles .metric-row.rep > button, html body #main .bottom .dbody .metric-row > button { height: 100%; }
}
@media (min-width: 1280px) { html body #main .bottom .card-scroll > .people-extra { overflow: visible; padding: 0; } }
@media (min-width: 1280px) {
  /* Product names wrap to two lines instead of being cut. */
  html body #main .bottom .inv-tile__meta > b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.08; overflow: hidden; }
}
@media (min-width: 1280px) and (max-height: 940px) {
  html body #main .bottom .inv-tile__meta > b { font-size: 10.5px; }
  html body #main .bottom .inv-tile__units { min-width: 54px; font-size: 11px; }
}
@media (min-width: 1280px) and (max-width: 1599px) {
  /* Narrow tile: the low-stock chip becomes a warning dot (full word in its tooltip and for screen readers). */
  html body #main .bottom .inv-tile__meta > .inv-chip { width: 8px; height: 8px; padding: 0; border-radius: 50%; background: var(--warn); border: 0; font-size: 0; box-shadow: 0 0 6px color-mix(in srgb, var(--warn) 70%, transparent); overflow: hidden; }
  html body #main .bottom .inv-tile__meta > .inv-chip > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (min-width: 1280px) {
  html body #main .bottom .card-scroll > * { align-self: stretch; }
  html body #main .bottom .card-scroll > .ppl-af, html body #main .bottom .card-scroll > .act-strip { width: 100%; margin: 0; }
  html body #main .bottom .ppl-h .ppl-txt { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
html body #main .kband .kpi.pv .lab { position: static; }
@media (min-width: 1280px) {
  /* Service: the body is the one scroller (frame script marks it); the rows inside simply overflow it. */
  html body #main .bottom > .card > .dbody { overflow-x: hidden; overflow-y: auto; }
  html body #main .bottom .dbody > .rows { overflow: visible; }
}
@media (min-width: 1280px) {
  /* A department with only its summary (no product lines yet, or no source): the summary row fills the whole body. */
  html body #main .bottom > .card > .dbody > .dept-big:not(.pill) { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; height: 100%; padding: 0 16px; box-sizing: border-box; text-align: left; }
  html body #main .bottom > .card > .dbody > .dept-big:not(.pill) .ring { flex: none; width: 64px !important; height: 64px !important; padding: 0 4px !important; }
  html body #main .bottom > .card > .dbody > .dept-big:not(.pill) .ring b { font-size: 17px; }
  html body #main .bottom > .card > .dbody > .dept-big:not(.pill) .ml { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  html body #main .bottom > .card > .dbody > .dept-big:not(.pill) .ml > span { font-size: 15px; font-weight: 600; }
  html body #main .bottom > .card > .dbody > .dept-big:not(.pill) .ml > small { font-size: 12px; line-height: 1.3; white-space: normal; }
}
/* A warehouse panel opened on the map always wins over the map legend and figures beneath it. */
html body #main .atlas:has(.map-quick:not([hidden])) .ach :is(.alegend, .sub) { pointer-events: none; }
html body #main .atlas .map-quick:not([hidden]) { z-index: 8; }
@media (min-width: 1280px) {
  /* An expanded ranking row owns its intrinsic height (its profile action must stay clickable); the list scrolls. */
  html body #main .bottom .reps .tiles:has(.rep-quick:not([hidden])) > * { flex: 0 0 auto; height: auto; min-height: 30px; }
  html body #main .bottom .reps .tiles:has(.rep-quick:not([hidden])) .metric-row.rep > button { height: auto; min-height: 30px; }
}
