/* Alert console (/ui/console.html) - PG-CON, ported from mockups/console.css */
@layer page {
  .con { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--rx-surface-0); }
  .con [hidden], .rx-drawer [hidden], .rx-menu [hidden] { display: none !important; }
  .rx-i.up { transform: rotate(-90deg); } .rx-i.down { transform: rotate(90deg); }

  /* severity tiles */
  .sev-tiles { display: flex; align-items: stretch; gap: 8px; padding: 12px 16px 10px; overflow-x: auto; flex: none; }
  .sev-tile { flex: 1 1 0; min-width: 104px; max-width: 168px; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 8px; position: relative; overflow: hidden; }
  .sev-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--sev, var(--rx-border-subtle)); }
  .sev-tile .rx-sev { font-size: var(--rx-text-xs); }
  .sev-tile .v { font-size: 22px; font-weight: 650; line-height: 1.15; }
  .sev-tile.zero .v { color: var(--rx-text-disabled); }
  .sev-tile.zero::before { opacity: .35; }
  .sev-tile.ack-tile { --sev: var(--rx-border-control); }
  .sev-tile .rx-status { align-self: flex-start; }
  .sev-critical { --sev: var(--rx-sev-critical-fg); } .sev-major { --sev: var(--rx-sev-major-fg); } .sev-minor { --sev: var(--rx-sev-minor-fg); }
  .sev-warning { --sev: var(--rx-sev-warning-fg); } .sev-info { --sev: var(--rx-sev-info-fg); } .sev-clear { --sev: var(--rx-sev-clear-fg); } .sev-unknown { --sev: var(--rx-sev-unknown-fg); }
  .tile-sep { width: 1px; background: var(--rx-border-subtle); margin: 4px 4px; flex: none; }
  .fb-count { font-size: var(--rx-text-xs); white-space: nowrap; margin-right: 4px; }
  @media (max-width: 1280px) {
    .sev-tile { min-width: 0; padding: 7px 10px; }
    .sev-tile .rx-sev { font-size: 11.5px; gap: 5px; }
    .sev-tile .v { font-size: 20px; }
  }

  /* view bar */
  .viewbar { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--rx-surface-1); border-top: 1px solid var(--rx-border-subtle); border-bottom: 1px solid var(--rx-border-subtle); flex: none; flex-wrap: wrap; min-width: 0; }
  .view-pick { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 10px; border: 1px solid var(--rx-border-subtle); border-radius: var(--rx-radius); background: var(--rx-surface-0); cursor: pointer; font-size: var(--rx-text-md); max-width: 320px; }
  .view-pick:hover { border-color: var(--rx-border-control); }
  .view-pick b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .vp-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--rx-text-2); font-weight: 600; }
  .dirty { font-size: 11px; font-weight: 600; color: var(--rx-text); background: var(--rx-surface-3); border-radius: 999px; padding: 0 7px; line-height: 18px; white-space: nowrap; }
  .dirty::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--rx-interactive); margin-right: 5px; vertical-align: 1px; }
  .view-meta { font-size: var(--rx-text-xs); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
  .view-meta svg { width: 14px; height: 14px; }
  .view-meta .def { color: var(--rx-interactive); font-weight: 600; }
  .stamp { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rx-text-xs); color: var(--rx-text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .stamp.is-stale { color: var(--rx-sev-warning-fg); font-weight: 600; }
  .stamp svg { width: 14px; height: 14px; }
  .rx-dot.live { box-shadow: 0 0 0 3px color-mix(in oklab, var(--rx-sev-clear-fg) 25%, transparent); }
  .view-menu { min-width: 300px; }
  .rx-menu .danger-item { color: var(--rx-sev-critical-fg); }
  .rx-menu [role^="menuitem"]:disabled { opacity: .5; cursor: not-allowed; }
  .rx-menu [role="menuitemradio"] { display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 10px; border: 0; background: none; border-radius: var(--rx-radius); color: var(--rx-text); font-size: var(--rx-text-sm); cursor: pointer; text-align: left; white-space: nowrap; }
  .rx-menu [role="menuitemradio"]:hover, .rx-menu [role="menuitemradio"]:focus { background: var(--rx-surface-2); outline: none; }
  .rx-menu [role="menuitemradio"] .rx-muted { font-size: var(--rx-text-xs); margin-left: 12px; }
  .rx-menu [role="menuitemradio"][aria-checked="true"] { color: var(--rx-interactive); font-weight: 600; }

  /* action / context menu (row "..." and right-click share one builder), flyout, column menu */
  .row-menu, .col-menu { min-width: 272px; max-width: min(380px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; }
  .row-sub { min-width: 240px; max-width: min(360px, calc(100vw - 16px)); }
  .row-menu [role^="menuitem"], .row-sub [role^="menuitem"], .col-menu [role^="menuitem"] { padding: 6px 10px; white-space: nowrap; }
  .rx-menu .mi-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .rx-menu .mi-l b { font-weight: 600; }
  .rx-menu [role^="menuitem"] kbd { flex: none; margin-left: 14px; font-size: 11px; line-height: 16px; background: var(--rx-surface-0); }
  .rx-menu .mi-sub { margin-left: 10px; display: inline-flex; color: var(--rx-text-2); }
  .rx-menu .mi-sub svg { width: 14px; height: 14px; }
  .rx-menu [aria-expanded="true"] { background: var(--rx-surface-2); }
  .rx-menu [role^="menuitem"] > svg { flex: none; color: var(--rx-text-2); }
  .rx-menu .danger-item, .rx-menu .danger-item > svg { color: var(--rx-sev-critical-fg); }
  .rx-menu .danger-item:hover, .rx-menu .danger-item:focus { background: color-mix(in oklab, var(--rx-sev-critical-fg) 12%, var(--rx-surface-1)); }
  .col-menu [role="menuitemradio"][aria-checked="true"]::after { margin-left: auto; }
  .ctx-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 8px; margin: -4px -4px 4px; padding: 8px 12px; background: var(--rx-surface-2); border-bottom: 1px solid var(--rx-border-subtle); border-radius: var(--rx-radius-lg) var(--rx-radius-lg) 0 0; font-size: var(--rx-text-sm); }
  .ctx-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ctx-head .rx-sev { font-size: var(--rx-text-xs); }
  .ctx-head > span:last-child { grid-column: 1 / -1; font-size: var(--rx-text-xs); color: var(--rx-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .con-table tr.row, .con-table th { -webkit-touch-callout: none; }

  /* filter bar */
  .rx-filterbar { flex: none; padding: 6px 16px; }
  .fb-icon { color: var(--rx-text-2); display: inline-flex; }
  .chips { display: contents; }
  .chips[hidden] { display: none; }
  .rx-chip { padding: 0 2px 0 0; }
  .rx-chip .chip-edit { border: 0; background: none; cursor: pointer; height: 100%; padding: 0 2px 0 10px; font-size: var(--rx-text-xs); color: var(--rx-text); border-radius: 999px 0 0 999px; }
  .rx-chip .chip-edit:hover { color: var(--rx-interactive); }
  .rx-chip .op { color: var(--rx-text-2); }
  .rx-chip.neg { border-style: dashed; }
  .rx-chip.neg .op { color: var(--rx-sev-major-fg); font-weight: 600; }
  .rx-chip.raw { padding-left: 8px; max-width: 520px; overflow: hidden; text-overflow: ellipsis; font-family: var(--rx-font-mono); }
  .rx-chip .x { display: inline-grid; place-items: center; padding: 0; }
  .rx-chip .x svg { width: 12px; height: 12px; }
  .rx-chip.add { height: 26px; display: inline-flex; gap: 4px; background: none; }
  .rx-chip.add svg { width: 14px; height: 14px; }
  .rx-filterbar .q { height: 28px; flex: 4 1 260px; }
  .rx-filterbar .range { width: auto; height: 28px; font-size: var(--rx-text-xs); }
  .query-hint { font-size: var(--rx-text-xs); padding: 4px 16px; background: var(--rx-surface-1); border-bottom: 1px solid var(--rx-border-subtle); }
  .chip-pop { width: 300px; padding: 12px; }
  .chip-pop .rx-field { margin-bottom: 10px; }

  /* banners */
  .con-banners { flex: none; }
  .con-banners .rx-banner svg { color: var(--rx-sev-warning-fg); }
  .new-banner { display: none; justify-content: center; padding: 6px 0; background: var(--rx-surface-0); }
  .new-banner.on { display: flex; }
  .new-btn { border: 1px solid var(--rx-interactive); background: var(--rx-interactive); color: var(--rx-on-interactive); border-radius: 999px; padding: 3px 14px; font-weight: 600; font-size: var(--rx-text-xs); cursor: pointer; box-shadow: var(--rx-shadow-1); }

  /* grid */
  .grid-wrap { flex: 1; min-height: 0; overflow: auto; background: var(--rx-surface-1); }
  .con-table th { background: var(--rx-surface-1); }
  .con-table th.cb, .con-table td.cb { width: 34px; padding: 0 0 0 12px; }
  .con-table td.cb input, .con-table th.cb input { accent-color: var(--rx-interactive); width: 15px; height: 15px; vertical-align: middle; }
  .con-table th .th-sort { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
  .con-table th .th-sort:hover { color: var(--rx-text); }
  .con-table th[aria-sort="ascending"], .con-table th[aria-sort="descending"] { color: var(--rx-text); }
  .con-table .arr { font-size: 9px; color: var(--rx-interactive); }
  .con-table th.num .th-sort { justify-content: flex-end; }
  .con-table tr.row { cursor: pointer; }
  .con-table tr.row td { transition: background .3s; }
  .con-table tr.row:focus { outline: none; }
  .con-table tr.row:focus-visible td, .con-table tr.row.cursor td { box-shadow: inset 0 1px 0 var(--rx-focus), inset 0 -1px 0 var(--rx-focus); }
  .con-table tr.row:focus-visible td.cb, .con-table tr.row.cursor td.cb { box-shadow: inset 4px 0 0 var(--sev), inset 0 1px 0 var(--rx-focus), inset 0 -1px 0 var(--rx-focus); }
  .con-table.tint tr.row td { background: color-mix(in oklab, var(--sev) 8%, var(--rx-surface-1)); }
  .con-table.comfy td, .con-table.comfy th { height: 40px; }
  .con-table .desc-w { display: flex; align-items: center; gap: 6px; max-width: 380px; min-width: 0; }
  .con-table .desc-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .con-table .desc-w .rx-badge, .con-table .desc-w .impact { flex: none; line-height: 18px; }
  .con-table .impact { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 8px 0 4px; border: 1px solid var(--rx-border-subtle); border-radius: 999px; background: var(--rx-surface-2); color: var(--rx-text); font-size: 11.5px; font-weight: 600; cursor: pointer; vertical-align: 1px; }
  .con-table .impact:hover { border-color: var(--rx-interactive); }
  .con-table .impact svg { width: 13px; height: 13px; }
  .con-table .c-age, .con-table .c-first, .con-table .c-last { font-variant-numeric: tabular-nums; }
  .con-table .c-first, .con-table .c-last { color: var(--rx-text-2); font-size: var(--rx-text-xs); }
  .con-table .c-device .dev { color: var(--rx-text); font-weight: 600; }
  .con-table .c-device .dev:hover { color: var(--rx-interactive); }
  .con-table .cat { color: var(--rx-text-2); }
  /* State: shape + text, coloured by the alert's severity token (Down) or the clear token (Up) */
  .st { color: var(--rx-text-2); font-size: var(--rx-text-xs); font-weight: 600; white-space: nowrap; }
  .st.down { color: var(--sev); }
  .st.up { color: var(--rx-sev-clear-fg); }
  .st.down::before { content: "\25BC  "; font-size: 9px; }
  .st.up::before { content: "\25B2  "; font-size: 9px; }

  /* correlation tree (PG-CON-05): 22 px per level; guides sit at the centre of the parent's toggle */
  .con-table tr.child td { background: color-mix(in oklab, var(--rx-surface-0) 55%, var(--rx-surface-1)); }
  .con-table td.c-sev.tree { position: relative; }
  .con-table td.c-sev.d1 { padding-left: 32px; } .con-table td.c-sev.d2 { padding-left: 54px; } .con-table td.c-sev.d3 { padding-left: 76px; }
  .con-table td.c-sev.d4 { padding-left: 98px; } .con-table td.c-sev.d5 { padding-left: 120px; } .con-table td.c-sev.d6 { padding-left: 142px; }
  .con-table .sev-w { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
  .con-table .tw, .con-table .tw-slot { flex: none; width: 22px; }
  .con-table .tw { display: inline-flex; align-items: center; justify-content: center; gap: 0; height: 22px; width: auto; min-width: 22px; padding: 0 5px 0 1px; margin-right: 2px; border: 1px solid var(--rx-border-control); border-radius: 999px; background: var(--rx-surface-2); color: var(--rx-text); font-size: 11px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
  .con-table .tw:hover { border-color: var(--rx-interactive); color: var(--rx-interactive); }
  .con-table .tw:focus-visible { outline: 2px solid var(--rx-focus); outline-offset: 1px; }
  .con-table .tw svg { width: 14px; height: 14px; }
  .con-table .tw[aria-expanded="true"] { background: var(--rx-interactive-soft); border-color: var(--rx-interactive); }
  .con-table .g { position: absolute; top: 0; bottom: 0; width: 11px; pointer-events: none; }
  .con-table .g.v { border-left: 2px solid var(--rx-border-control); }
  .con-table .g.el { bottom: 50%; border-left: 2px solid var(--rx-border-control); border-bottom: 2px solid var(--rx-border-control); border-bottom-left-radius: 6px; }
  .con-table .g.el:not(.last)::after { content: ""; position: absolute; left: -2px; top: 100%; height: calc(var(--rx-row-height) / 2 + 2px); border-left: 2px solid var(--rx-border-control); }
  .con-table.comfy .g.el:not(.last)::after { height: 22px; }
  .con-table .g0 { left: 21px; } .con-table .g1 { left: 43px; } .con-table .g2 { left: 65px; } .con-table .g3 { left: 87px; } .con-table .g4 { left: 109px; } .con-table .g5 { left: 131px; }
  /* an expanded parent: the guide runs from its toggle down to the first child */
  .con-table td.c-sev.open::after { content: ""; position: absolute; top: calc(50% + 11px); bottom: 0; border-left: 2px solid var(--rx-border-control); }
  .con-table td.c-sev.open.d0::after { left: 21px; } .con-table td.c-sev.open.d1::after { left: 43px; } .con-table td.c-sev.open.d2::after { left: 65px; }
  .con-table td.c-sev.open.d3::after { left: 87px; } .con-table td.c-sev.open.d4::after { left: 109px; } .con-table td.c-sev.open.d5::after { left: 131px; }
  .con-table tr.parent .c-device .dev { font-weight: 700; }
  .con-table .child-of { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 20px; max-width: 260px; padding: 0 8px 0 6px; border: 1px dashed var(--rx-border-control); border-radius: 999px; background: none; color: var(--rx-text-2); font-size: 11.5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .con-table button.child-of:hover { color: var(--rx-interactive); border-color: var(--rx-interactive); }
  .con-table .child-of b { color: var(--rx-text); font-weight: 600; }
  .con-table .child-of svg { width: 12px; height: 12px; flex: none; }
  .con-table .child-of.gone { cursor: help; }
  .con-table .impact { cursor: default; }
  .con-table .c-owner .own { display: inline-flex; align-items: center; gap: 4px; }
  .con-table .c-owner .own svg { width: 12px; height: 12px; color: var(--rx-text-2); }
  .con-table .c-owner .own.me { color: var(--rx-interactive); font-weight: 600; }
  .con-table .c-owner .own.me svg { color: inherit; }
  .con-table tr.acked .c-desc .desc-t { color: var(--rx-text-2); }
  .con-table tr.is-new td { background: color-mix(in oklab, var(--rx-interactive) 12%, var(--rx-surface-1)); }
  .con-table td.act, .con-table th.act { width: 40px; padding: 0 6px; text-align: right; position: sticky; right: 0; background: inherit; }
  .con-table td.act { background: var(--rx-surface-1); }
  .con-table tr.row:hover td.act { background: var(--rx-surface-2); }
  .con-table tr.grp td { background: var(--rx-surface-2); height: 30px; padding: 0 12px; }
  .grp-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 0; font-size: var(--rx-text-sm); }
  .grp-btn .rx-sev { font-size: var(--rx-text-xs); }
  #grid-empty { background: var(--rx-surface-1); }
  #grid-empty .rx-btn { margin-top: 10px; }

  /* bulk bar */
  .bulkbar { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--rx-surface-2); border-top: 1px solid var(--rx-border-control); box-shadow: 0 -6px 16px rgba(0, 0, 0, .18); flex-wrap: wrap; }
  .bulkbar[hidden] { display: none; }
  .bulkbar b { margin-right: 2px; font-size: var(--rx-text-sm); }
  .bulkbar .bulk-hidden { font-size: var(--rx-text-xs); margin-right: 8px; }
  .bulkbar .bulk-esc { font-size: var(--rx-text-xs); margin-right: 6px; }
  .bulkbar .bulk-esc kbd { font-size: 10.5px; }
  @media (max-width: 1100px) { .bulkbar .bulk-esc { display: none; } }
  .own-tile .own-l { display: inline-flex; align-items: center; gap: 5px; font-size: var(--rx-text-xs); font-weight: 600; color: var(--rx-text-2); white-space: nowrap; }
  .own-tile .own-l svg { width: 13px; height: 13px; }
  .sev-tile.own-tile { --sev: var(--rx-interactive); min-width: 136px; max-width: 176px; }
  .con-table td.c-sev.tree:not(.d0) .tw-slot { width: 2px; }
  .as-err { margin-top: 4px; font-size: var(--rx-text-xs); color: var(--rx-sev-critical-fg); font-weight: 600; }
  #assign-modal .rx-row { gap: 8px; }
  /* drawer correlation tree: parent -> this alert -> children */
  .corr-tree, .corr-tree ul { list-style: none; margin: 0; padding: 0; }
  .corr-tree > li { position: relative; padding: 4px 0 4px 0; display: grid; gap: 4px; font-size: var(--rx-text-sm); }
  .corr-tree.has-parent > li.ct-self, .corr-tree.has-parent > li.ct-kids { margin-left: 18px; padding-left: 14px; border-left: 2px solid var(--rx-border-control); }
  .corr-tree.has-parent > li.ct-kids ul, .corr-tree > li.ct-kids ul { margin-left: 18px; padding-left: 12px; border-left: 2px solid var(--rx-border-control); display: grid; gap: 4px; }
  .corr-tree .ct-l { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--rx-text-2); font-weight: 600; }
  .corr-tree .ct-self > span:last-child { display: inline-flex; gap: 6px; align-items: center; padding: 4px 8px; border-radius: var(--rx-radius); background: var(--rx-interactive-soft); }
  .corr-tree .linkish { color: var(--rx-text); gap: 6px; }
  .corr-tree .linkish .ct-d { color: var(--rx-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
  .corr-tree .linkish:hover b { color: var(--rx-interactive); }
  .corr-tree .rx-sev { font-size: var(--rx-text-xs); }
  /* service impact (drawer): the service, its root-cause alerts / the service this alert impacts */
  .svc-imp { display: grid; gap: 6px; font-size: var(--rx-text-sm); }
  .svc-imp p { margin: 0; }
  .svc-imp .si-svc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .svc-imp .si-svc > span:first-of-type { color: var(--rx-text-2); }
  .svc-imp .ct-l { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--rx-text-2); font-weight: 600; margin-top: 4px; }
  .svc-imp .si-list { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--rx-border-control); display: grid; gap: 4px; }
  .svc-imp .linkish, .svc-imp .si-out { color: var(--rx-text); gap: 6px; display: inline-flex; align-items: center; flex-wrap: wrap; }
  .svc-imp .si-out { opacity: .75; }
  .svc-imp .linkish:hover b { color: var(--rx-interactive); }
  .svc-imp .ct-d { color: var(--rx-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
  .svc-imp .rx-sev { font-size: var(--rx-text-xs); }
  .svc-imp > .rx-btn { justify-self: start; margin-top: 2px; }

  /* drawers */
  .con-drawer { width: min(600px, 100vw); }
  .con-drawer > header { align-items: flex-start; }
  .con-drawer > header h2 { font-size: var(--rx-text-md); line-height: 1.35; }
  .dr-actions { margin-bottom: 14px; }
  .dr-h { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--rx-text-2); margin: 18px 0 8px; }
  .corr-note { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .linkish { border: 0; background: none; padding: 0; color: var(--rx-interactive); cursor: pointer; text-align: left; font: inherit; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .linkish:hover { text-decoration: underline; }
  .dr-kids { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .dr-kids .linkish { color: var(--rx-text); }
  .timeline { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--rx-border-subtle); }
  .timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 8px; padding: 4px 0 8px 12px; position: relative; font-size: var(--rx-text-sm); }
  .timeline li::before { content: ""; position: absolute; left: -6px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--rx-surface-1); border: 2px solid var(--rx-border-control); }
  .timeline time { color: var(--rx-text-2); font-variant-numeric: tabular-nums; font-size: var(--rx-text-xs); padding-top: 1px; }
  .timeline b { display: block; font-weight: 600; }
  .note { border: 1px solid var(--rx-border-subtle); border-radius: var(--rx-radius); padding: 8px 10px; margin-bottom: 8px; background: var(--rx-surface-0); font-size: var(--rx-text-sm); }
  .note p { margin: 4px 0 0; }

  .settings-drawer { width: min(420px, 100vw); }
  .settings-drawer section { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rx-border-subtle); }
  .settings-drawer section:last-child { border-bottom: 0; }
  .settings-drawer h3 { font-size: var(--rx-text-sm); margin-bottom: 8px; }
  .small { font-size: var(--rx-text-xs); margin: 4px 0 8px; }
  .col-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rx-border-subtle); border-radius: var(--rx-radius); }
  .col-list li { display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; border-bottom: 1px solid var(--rx-border-subtle); background: var(--rx-surface-1); }
  .col-list li:last-child { border-bottom: 0; }
  .col-list li.locked { background: var(--rx-surface-2); }
  .col-list li.over { box-shadow: inset 0 2px 0 var(--rx-interactive); }
  .col-list li.dragging { opacity: .5; }
  .col-list .grip { color: var(--rx-text-2); cursor: grab; display: inline-flex; }
  .col-list .grip svg { width: 14px; height: 14px; }
  .col-list li.locked .grip { cursor: default; }
  .st-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .st-row select { width: auto; flex: 1; min-width: 140px; }
  .st-row .rx-label { min-width: 0; }
  .st-switch { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: var(--rx-text-sm); }
  .st-switch small, .scope-opt small { display: block; color: var(--rx-text-2); font-size: var(--rx-text-xs); }
  .scope-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--rx-border-subtle); border-radius: var(--rx-radius); margin-bottom: 6px; cursor: pointer; font-size: var(--rx-text-sm); }
  .scope-opt:has(input:checked) { border-color: var(--rx-interactive); background: var(--rx-interactive-soft); }
  .scope-opt input { accent-color: var(--rx-interactive); margin-top: 3px; }
  .scope-opt svg { margin-top: 2px; color: var(--rx-text-2); }
  .scope-opt > span { flex: 1; min-width: 0; }
  .scope-opt.locked { cursor: not-allowed; opacity: .7; }
  .scope-opt .soc-pick { margin-top: 6px; max-width: 200px; }
  .view-menu .vm-note { font-weight: 400; text-transform: none; letter-spacing: 0; }
  .scope-set { border: 0; padding: 0; margin: 0; }
  .scope-set legend { margin-bottom: 6px; }
  .st-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--rx-border-subtle); background: var(--rx-surface-1); }
  .st-foot select { width: auto; max-width: 200px; height: 28px; font-size: var(--rx-text-xs); }
  .keys { grid-template-columns: 130px 1fr; }
  .spaced { margin-top: 12px; }

  @media (max-width: 1320px) { .view-meta { display: none; } }
  @media (max-width: 1100px) {
    .vp-label, #v-settings .lbl { display: none; }
    #v-settings { width: 30px; padding: 0; }
  }
  @media (max-width: 1024px) {
    .view-meta { display: none; }
    .con-table .desc-w { max-width: 280px; }
  }
  @media (max-width: 680px) {
    .sev-tiles { padding: 10px 12px; }
    .sev-tile { min-width: 92px; }
    .fb-count { display: none; }
    .viewbar, .rx-filterbar { padding: 6px 12px; }
    .stamp { order: 10; width: 100%; }
    .con-table td.act { width: 48px; }
  }
  /* locked SOC filter (owner decision): first in the filter bar, not removable, read-only prefix in query mode */
  .rx-chip.soc-lock { gap: 5px; padding: 0 10px 0 8px; background: var(--rx-surface-2); border-color: var(--rx-border-subtle); color: var(--rx-text-2); cursor: help; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
  .rx-chip.soc-lock b { color: var(--rx-text); }
  .rx-chip.soc-lock svg { width: 13px; height: 13px; flex: none; }
  .rx-chip.soc-lock:focus-visible { outline: 2px solid var(--rx-focus); outline-offset: 1px; }
  .soc-lock[hidden], .q-lock[hidden] { display: none; }
  .q-lock { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--rx-font-mono); font-size: var(--rx-text-xs); color: var(--rx-text-2); padding: 4px 8px; border-radius: var(--rx-radius); background: var(--rx-surface-2); cursor: help; user-select: none; }
  .ext-ref { display: block; margin-top: 4px; font-size: var(--rx-text-xs); line-height: 1.5; }
  .ext-ref svg { width: 12px; height: 12px; vertical-align: -1px; }
  @media (max-width: 680px) { .rx-chip.soc-lock { max-width: 100%; } .q-lock { max-width: 100%; } }

  /* production additions */
  .grid-more { display: flex; justify-content: center; padding: 10px; background: var(--rx-surface-1); }
  /* select-all banner (Gmail style): "All N shown are selected. Select all M matching" */
  .sel-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; padding: 7px 16px; font-size: var(--rx-text-sm); background: var(--rx-interactive-soft); border-bottom: 1px solid var(--rx-border-subtle); text-align: center; }
  .sel-banner[hidden] { display: none; }
  .sel-banner .sb-note { font-size: var(--rx-text-xs); color: var(--rx-text-2); }
  .sel-banner .rx-btn { font-weight: 600; }
  .con-banners .rx-banner { display: flex; align-items: center; gap: 8px; }
  .rx-chip.soc-lock .rx-mono { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
  .as-me { margin-top: 4px; }
  #nt-text { min-height: 120px; resize: vertical; }
  .con-table .c-owner { color: var(--rx-text-2); }
  .con-table .inc-st { color: var(--rx-text-2); font-size: var(--rx-text-xs); margin-left: 4px; }
  .dr-actions .rx-btn[aria-disabled="true"], .bulkbar .rx-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
  .rx-menu .mi-note { display: block; padding: 2px 10px 6px 34px; font-size: var(--rx-text-xs); color: var(--rx-text-2); white-space: normal; }
  .rx-empty .rx-btn { margin-top: 10px; }
  .note p { white-space: pre-wrap; overflow-wrap: anywhere; }
  .maint-note { display: flex; gap: 6px; align-items: center; }

  /* the detail drawer pushes the grid instead of covering it on wide screens (plan section 1) */
  .con { transition: padding-right .18s; }
  @media (min-width: 1440px) {
    .con-drawer { top: var(--rx-header-h); box-shadow: none; width: 560px; }
    .con.push { padding-right: 560px; }
  }
}
