/* ============================================================================
   JAG Pulse — PULSE MOBILE: the phone application layer (iPhone / Android,
   ≤767px). Loaded LAST on every page so its rules win at equal specificity
   without !important fights.

   What this is. On a phone, Pulse is a different application built on the
   same engine: an app bar that names the screen, a five-tab bottom bar, sheets
   instead of windows, segmented controls instead of tab strips, and lists and
   grids laid out for a thumb and a 390px screen — dense where the data is
   dense, roomy where it is a form. The desktop page is not "squeezed": its
   chrome (page headings, eyebrows, descriptions, strips) is hidden and
   replaced, its cards become rows, its boards become stacked sections, its
   grids keep every column and scroll sideways under a frozen label column.
   mobile.js supplies the few behaviours CSS cannot (the app-bar title, the
   More sheet, folding rows open, the fold buttons).

   RULES OF THE ROAD
   • DESKTOP, LAPTOP AND TABLET ARE UNTOUCHED. Every rule is inside
     `@media (max-width:767px)`; the only things outside it are the
     display:none defaults of elements that exist only for the phone.
   • THE STAFF PORTAL IS UNTOUCHED (owner decision): `#tab-staff-portal` may
     appear only together with the Meeting Tracker family (`#page-mt`,
     `#mt-…`, `.mt-…`, `.rf-…`), which the owner asked to include.
   • INTERFACES ONLY. The same buttons call the same functions; nothing here
     decides access or changes what is saved.
   • DENSE DATA STAYS DENSE (owner rule): a wide table is a wide table that
     scrolls sideways with its first column and header frozen — never a stack
     of cards that hides the other columns.
   • THE BOTTOM BAR SITS UNDER EVERY WINDOW: z-index 300, below `.overlay`
     (900) and every other dialog, so a window's buttons are never covered.
   ============================================================================ */

/* Elements that exist only on a phone (hidden everywhere else). */
.jp-topbar-search, .jp-fold-btn, .m-title { display:none; }

@media (max-width:767px) {
  :root {
    --jp-top: 52px;        /* the app bar */
    --jp-chrome: 52px;     /* where sticky sub-bars start */
    --jp-nav: 84px;        /* bottom tab bar clearance (bar + safe area) */
    --jp-tap: 44px;        /* minimum touch target */
    --m-gutter: 12px;
    --m-radius: 12px;
    --m-line: rgba(255,255,255,.09);
    --m-line-2: rgba(255,255,255,.16);
    --m-surface: rgba(255,255,255,.045);
    --m-surface-2: rgba(255,255,255,.08);
    --m-ink: #edf1ff;
    --m-ink-2: rgba(237,241,255,.72);
    --m-ink-3: rgba(237,241,255,.5);
  }
  html[data-theme="light"] {
    --m-line: rgba(0,0,0,.09);
    --m-line-2: rgba(0,0,0,.16);
    --m-surface: rgba(0,0,0,.035);
    --m-surface-2: rgba(0,0,0,.06);
    --m-ink: #1a2744;
    --m-ink-2: rgba(26,39,68,.72);
    --m-ink-3: rgba(26,39,68,.5);
  }
  html { -webkit-text-size-adjust:100%; }
  body { overscroll-behavior-y:none; }

  /* ══ 1. APP BAR ═══════════════════════════════════════════════════════════
     [‹ back | brand] [screen title · subtitle] [search] [user]. The title is
     written by mobile.js from the active tab; the Back control is the page's
     own (dashboard.js shows it off Home), restyled as a chevron. */
  .topbar { border-bottom:1px solid rgba(217,183,95,.4); }
  .topbar-inner { display:flex; align-items:center; gap:6px; padding:0 8px 0 6px; min-height:var(--jp-top); }
  .topbar-brand { gap:6px; min-width:0; flex:0 1 auto; }
  .topbar-logo { height:24px; }
  .pulse-brand-mark { width:70px !important; }
  body:not([data-active-tab="cover"]) .topbar-brand { display:none; }
  .m-title { display:flex; flex-direction:column; justify-content:center; flex:1 1 auto; min-width:0; padding:0 2px; }
  body[data-active-tab="cover"] .m-title { display:none; }
  .m-title-main { font-family:Manrope, Inter, sans-serif; font-size:16.5px; font-weight:800; color:#fff; letter-spacing:-.01em; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .m-title-sub { font-family:'DM Mono', monospace; font-size:9px; letter-spacing:.14em; text-transform:uppercase; color:rgba(255,255,255,.55); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
  .m-title-sub:empty { display:none; }
  .topbar-chips { order:5; gap:4px; flex:0 0 auto; }
  .topbar-home-btn { order:-1; width:40px; height:40px; padding:0; justify-content:center; font-size:0; gap:0; border-radius:999px; border-color:rgba(255,255,255,.14); background:rgba(255,255,255,.06); color:#fff; margin-right:2px; }
  .topbar-home-btn svg { width:18px; height:18px; }
  .topbar-home-btn:hover { transform:none; }
  .topbar-inner { position:relative; }
  /* The Back control lives inside .topbar-chips in the markup; on a phone it
     is pulled to the far left of the bar. */
  .topbar-chips { display:contents; }
  .user-menu-wrap { order:6; }
  .user-menu-btn { width:40px; height:40px; padding:0; justify-content:center; border-radius:999px; }
  .user-menu-label, .user-menu-caret { display:none; }
  .user-menu-avatar { font-size:18px; }
  .jp-topbar-search { order:4; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:999px; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06); color:rgba(255,255,255,.9); font-size:16px; cursor:pointer; flex:0 0 auto; }
  .tab-nav-search { display:none !important; }
  .mobile-nav-toggle { order:7; width:40px; height:40px; margin-left:0; font-size:16px; border-radius:999px; }
  .settings-dropdown { position:fixed; top:calc(var(--jp-top) + 4px); right:8px; left:auto; min-width:240px; max-width:calc(100vw - 16px); }
  .settings-dd-item { min-height:var(--jp-tap); font-size:14px; }
  .theme-btn { min-height:40px; }

  /* The desktop tab strip and its dropdowns are gone on phones: the bottom
     bar + the More sheet carry every destination they did. */
  .tab-nav { display:none; }
  #ws-dd-portal { display:none !important; }

  /* ══ 2. BOTTOM TAB BAR + MORE SHEET ═══════════════════════════════════════ */
  #jag-mobile-bottom-nav { z-index:300; gap:0; padding:4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); background:rgba(12,18,34,.97); border-top:1px solid rgba(255,255,255,.1); box-shadow:0 -8px 24px rgba(0,0,0,.35); }
  html[data-theme="light"] #jag-mobile-bottom-nav { background:rgba(246,243,236,.98); border-top-color:rgba(0,0,0,.12); }
  .jmb-btn { flex:1 1 0; min-width:0; min-height:54px; padding:6px 2px 4px; gap:3px; font-size:10px; font-weight:600; letter-spacing:0; border:0; border-radius:12px; background:transparent; color:rgba(237,241,255,.62); }
  html[data-theme="light"] .jmb-btn { color:rgba(26,39,68,.62); }
  .jmb-btn .jmb-ico { font-size:22px; line-height:1; filter:grayscale(.35) opacity(.8); }
  .jmb-btn .jmb-lbl { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
  .jmb-btn.jmb-primary { flex:1 1 0; font-size:10px; font-weight:600; background:transparent; border:0; color:rgba(237,241,255,.62); }
  html[data-theme="light"] .jmb-btn.jmb-primary { color:rgba(26,39,68,.62); }
  .jmb-btn.active, .jmb-btn.jmb-primary.active { background:rgba(217,183,95,.14); color:#f4e6bf; border:0; font-weight:800; }
  html[data-theme="light"] .jmb-btn.active, html[data-theme="light"] .jmb-btn.jmb-primary.active { color:#7a5a12; }
  .jmb-btn.active .jmb-ico { filter:none; }
  .jmb-btn:active { transform:scale(.96); }
  body[data-active-tab="team-clients"] #jag-mobile-bottom-nav { display:flex; }
  .jp-more { position:fixed; inset:0; z-index:1250; }
  .jp-more[hidden] { display:none; }
  .jp-more-backdrop { position:absolute; inset:0; background:rgba(5,8,18,.6); }
  .jp-more-sheet { position:absolute; left:0; right:0; bottom:0; max-height:86dvh; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
    background:#121a2e; color:#edf1ff; border-radius:18px 18px 0 0; border-top:1px solid rgba(255,255,255,.12); box-shadow:0 -12px 40px rgba(0,0,0,.5);
    padding:4px 8px calc(12px + env(safe-area-inset-bottom, 0px)); }
  html[data-theme="light"] .jp-more-sheet { background:#f6f3ec; color:#1a2744; border-top-color:rgba(0,0,0,.1); }
  .jp-more-grip { width:36px; height:4px; border-radius:2px; background:rgba(255,255,255,.25); margin:6px auto 4px; }
  html[data-theme="light"] .jp-more-grip { background:rgba(0,0,0,.2); }
  .jp-more-hd { font-family:'DM Mono', monospace; font-size:9px; letter-spacing:.2em; text-transform:uppercase; color:var(--gold, #d9b75f); font-weight:700; padding:12px 12px 4px; }
  .jp-more-item { display:flex; align-items:center; gap:12px; width:100%; min-height:var(--jp-tap); padding:6px 12px; border:0; border-radius:10px; background:transparent; color:inherit; font:inherit; font-size:15px; font-weight:600; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
  .jp-more-item:active { background:rgba(255,255,255,.08); }
  .jp-more-item.active { background:rgba(217,183,95,.12); }
  .jp-more-item.danger { color:#ff8e8e; }
  .jp-more-ico { width:26px; text-align:center; font-size:18px; flex:0 0 auto; }
  .jp-more-lbl { flex:1; min-width:0; }
  .jp-more-check { visibility:hidden; color:var(--gold, #d9b75f); font-weight:700; }
  .jp-more-item.active .jp-more-check { visibility:visible; }
  body.jp-more-open { overflow:hidden; }

  /* Pages reserve room for the bar; fixed helpers sit above it. */
  #tab-response-tracker, #tab-proposal-workshop .pw-main, #tab-feedback, #tab-agents .ag-shell,
  #tab-news .news-main-content, #tab-ndaa, #cover-screen, .main-content, .sol-tab-shell { padding-bottom:calc(var(--jp-nav) + env(safe-area-inset-bottom, 0px)) !important; }
  .mnb-selbar { bottom:calc(var(--jp-nav) + env(safe-area-inset-bottom, 0px)); }
  #jag-toast-host { bottom:calc(var(--jp-nav) + env(safe-area-inset-bottom, 0px)); }
  body[data-active-tab="staff-portal"] #jag-toast-host { bottom:max(14px, env(safe-area-inset-bottom)); }

  /* ══ 3. SHARED PRIMITIVES ═════════════════════════════════════════════════ */
  /* iOS zooms the page on any input under 16px. */
  body:not([data-active-tab="staff-portal"]) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size:16px !important; }
  /* Sticky sub-bars start under the app bar. */
  .sol-subtab-bar, .queue-topbar, .rt-topbar { top:var(--jp-chrome); }
  .left-nav { top:auto; }
  /* Windows are sheets: full width, bottom-anchored, header and footer pinned. */
  .overlay { align-items:flex-end; padding:0; }
  .modal { width:100%; max-width:100% !important; max-height:100vh; max-height:100dvh; border-radius:18px 18px 0 0; }
  .modal-hd { padding:12px 14px 10px; }
  .modal-hd h2 { font-size:1rem; }
  .modal-bd { padding:14px; }
  .modal-ft { padding:10px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .modal-ft button, .modal-ft .btn-p, .modal-ft .btn-s, .modal-ft .btn-d { min-height:var(--jp-tap); }
  .close-btn { width:40px; height:40px; }
  .fg { gap:10px; }
  .fld input, .fld select, .fld textarea { min-height:var(--jp-tap); padding:8px 12px; }
  .fld label { font-size:9px; }
  .add-sol-add-client-btn { min-height:36px; }
  .ja-log-overlay { padding:0; }
  .ja-log-panel { width:100%; height:100%; max-height:100%; border-radius:0; }
  .ja-log-close { width:40px; height:40px; }
  .ja-log-btn, .ja-log-in, .ja-log-search { min-height:40px; }
  .jn-card { width:100%; max-width:100%; max-height:100dvh; }
  .jag-cp { width:100%; border-radius:14px; }
  .jag-cp-item { min-height:var(--jp-tap); }
  /* The fold button (markup per surface; mobile.js jpToggleFold toggles jp-open). */
  .jp-fold-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:0 14px; border:1px solid rgba(255,255,255,.2); border-radius:10px; background:rgba(255,255,255,.08); color:#fff; font:inherit; font-size:12.5px; font-weight:600; cursor:pointer; flex:0 0 auto; }
  .jp-fold-btn[aria-expanded="true"] { background:rgba(217,183,95,.18); border-color:rgba(217,183,95,.5); color:var(--gold, #d9b75f); }
  /* A segmented control: the house pattern for sub-navigation on phones. */
  .sol-subtab-bar, .rt-nav-tabs, .sol-inner-tab-bar, #tab-operations-dashboard .od-views { display:flex; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .sol-subtab-bar::-webkit-scrollbar, .rt-nav-tabs::-webkit-scrollbar, .sol-inner-tab-bar::-webkit-scrollbar { display:none; }

  /* ══ 4. HOME ══════════════════════════════════════════════════════════════ */
  #cover-screen .cover-inner { padding:12px var(--m-gutter) 24px; }
  .cover-header { gap:10px; margin-bottom:4px; }
  .cover-welcome-line { font-size:9px; }
  .cover-user-name { font-size:26px; }
  .cover-tagline { font-size:9px; }
  .cover-header-actions, .cover-header-launchers { width:100%; }
  .aircrm-launch { width:100%; min-height:54px; border-radius:14px; }
  .cover-grid { display:block; }
  .cover-section { margin-bottom:14px; }
  .cover-section-header { margin:12px 0 8px; }
  .cover-section-title { font-size:11px; }
  .cover-section-grid, .cover-admin-row-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
  .cover-card { min-height:0; padding:14px 12px 12px; gap:4px; border-radius:14px; border-top-width:2px; }
  .cover-card:hover, .cover-card:focus { transform:none; box-shadow:none; }
  .cover-card:active { transform:scale(.98); }
  .cover-card-icon { font-size:26px; margin-bottom:2px; }
  .cover-card-eyebrow { font-size:7.5px; letter-spacing:.16em; }
  .cover-card-title { font-size:.95rem; }
  .cover-card-desc, .cover-card-cta { display:none; }
  .cover-card-newtab { width:36px; height:36px; }

  /* ══ 5. SOLICITATIONS · QUEUE · HISTORY ═══════════════════════════════════
     The page is a LIST. Every solicitation is one row — title, the facts
     that decide a bid (deadline · value · set-aside) and its Yes / No — and a
     tap on the row opens it in place (chips, summary, attachments). The
     sector blocks become slim section headers; the colour legend becomes one
     small line. mobile.js writes each row's fact line (data-m-sub) from the
     card's own chips and toggles m-open on tap. ── */
  .sol-subtab-bar { padding:0 6px; gap:2px; height:46px; background:rgba(10,16,31,.96); }
  .sol-subtab { height:46px; padding:0 12px; font-size:10.5px; flex-shrink:0; }
  .sol-subtab-add-btn, .sol-admin-send-btn { height:36px; width:36px; padding:0; margin-left:auto; flex-shrink:0; border-radius:10px; font-size:0; justify-content:center; }
  .sol-admin-send-btn { margin-left:4px; }
  .sol-subtab-add-btn::before { content:'+'; font-size:20px; line-height:1; }
  .sol-admin-send-btn::before { content:'✉'; font-size:16px; line-height:1; }
  .sol-inner-tab-bar { padding:8px var(--m-gutter); gap:6px; }
  .sol-inner-tab { height:36px; padding:0 12px; flex-shrink:0; white-space:nowrap; border-radius:999px; }
  .sol-left-col { padding:0; }
  .sol-search-bar { padding:8px var(--m-gutter) 6px; }
  .sol-search-box { height:42px; border-radius:12px; }
  .sol-search-count { margin:6px 2px 0; }
  .left-nav { padding:4px var(--m-gutter) 8px !important; gap:6px !important; }
  .sector-nav-item { min-height:34px !important; padding:4px 12px !important; }
  .sector-nav-item .nav-label { font-size:12px !important; }
  .main-content { padding:4px var(--m-gutter) 80px; }
  /* The colour key is one scrolling line of pills, not three rows of prose. */
  .sol-color-legend { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; gap:10px; padding:2px 0 8px; margin:0; font-size:10px; }
  .sol-color-legend::-webkit-scrollbar { display:none; }
  .sol-color-legend .legend-item { font-size:10px; white-space:nowrap; flex:0 0 auto; }
  .sol-sector-section { margin:0 0 6px; }
  .sector-page-header { padding:12px 2px 6px; gap:8px; align-items:center; margin:0; border:0; background:none; }
  .sector-page-icon { width:26px; height:26px; border-radius:7px; }
  .sector-page-icon svg { width:13px; height:13px; }
  .sector-page-title { font-size:13px; }
  .sector-page-badge { margin-left:auto; display:flex; align-items:baseline; gap:4px; }
  .sector-page-badge-count { font-size:16px; line-height:1; }
  .sector-page-badge-label { font-size:8px; }
  .sol-grid { gap:6px; }
  .sol-card { border-radius:12px; border-left-width:3px; }
  .sol-card:hover { transform:none; box-shadow:none; }
  .sol-card-header { padding:10px 10px 10px 12px; gap:10px; flex-wrap:nowrap; align-items:center; cursor:pointer; background:none; border-bottom:0; }
  .sol-title-group { flex:1 1 auto; min-width:0; }
  .sol-title { font-size:13.5px; line-height:1.3; letter-spacing:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .sol-card.m-open .sol-title { -webkit-line-clamp:unset; display:block; }
  .sol-card:not(.m-open) .sol-type-tag { display:none; }
  .sol-title-group[data-m-sub]::after { content:attr(data-m-sub); display:block; font-size:11px; color:var(--muted); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .sol-card.m-open .sol-title-group[data-m-sub]::after { display:none; }
  .sol-actions { flex:0 0 auto; flex-direction:row; gap:6px; width:auto; padding:0; justify-content:flex-end; }
  .sol-actions .bid-btn, .sol-actions .nobid-btn { min-height:36px; min-width:44px; padding:0 10px; font-size:9.5px; flex:0 0 auto; border-radius:8px; }
  .sol-actions .add-to-rt-btn, .sol-actions .sol-sent-btn { min-height:36px; padding:0 10px; font-size:9.5px; }
  .sol-card:not(.m-open) > :not(.sol-card-header) { display:none; }
  .sol-card.m-open .sol-card-header { border-bottom:1px solid var(--line); }
  .tech-meta-strip { padding:10px 12px 4px; gap:6px; }
  .tm-chip { max-width:100%; white-space:normal; }
  .sol-body { padding:8px 12px 10px; }
  .sol-summary { font-size:.86rem; line-height:1.55; }
  .sol-attach-bar { padding:6px 12px 10px; }
  .sol-attach-btn { min-height:36px; }
  .sol-flagged-strip { padding:6px 12px 0; }
  /* My History */
  .hist-hero { padding:12px; gap:10px; margin-bottom:8px; }
  .hist-hero-icon { display:none; }
  .hist-hero-title { font-size:1.05rem; }
  .hist-stats { margin-left:0; width:100%; }
  .hist-stat { flex:1 1 0; min-width:0; padding:6px 8px; }
  .hist-filter-bar { padding:10px; margin-bottom:10px; gap:8px; }
  .hist-filter-chip, .hist-clear-filters-btn { min-height:34px; padding:5px 12px; }
  .hist-select { min-height:40px; flex:1 1 calc(50% - 8px); min-width:0; }
  .hist-card { padding:12px; }
  /* Queue */
  .queue-topbar { padding:8px var(--m-gutter) 0; }
  .queue-topbar-inner { gap:8px; padding-bottom:8px; }
  .queue-topbar-inner > div:first-child { display:none; }
  .queue-controls { width:100%; display:grid; grid-template-columns:1fr 1fr; gap:6px; }
  .queue-controls .rt-ctrl-input, .queue-controls select { min-height:40px; width:100%; }
  .queue-controls #queue-search { grid-column:1 / -1; }
  #queue-stat-strip { padding:0 0 6px; }
  .queue-card { padding:10px 12px; margin-bottom:8px; border-radius:12px; }
  .queue-card:hover { transform:none; box-shadow:none; }
  .queue-card-title, .queue-card-title-link { font-size:13.5px; }
  .queue-undo-btn { min-height:36px; }
  .queue-card-actions button, .queue-reply-toggle { min-height:36px; }
  .queue-card-actions { flex-wrap:wrap; }

  /* ══ 6. OPPORTUNITY TRACKER ═══════════════════════════════════════════════
     One screen: segmented tabs, scope + search, a fold for the rest, KPI
     chips in a row. The Action Board is a STACK of sections (lanes), each a
     list of compact cards — the desktop's side-by-side columns waste a phone
     screen on one card. Sent to Client and Past Due stack the same way. The
     List view and the Leaderboard are dense grids with the first column
     frozen. The desktop heading is hidden: the app bar names the screen. ── */
  .rt-topbar { padding:6px var(--m-gutter) 6px; }
  .rt-topbar-row1 { flex-direction:column; align-items:stretch; gap:8px; margin-bottom:6px; }
  .rt-topbar-row1 > div:first-child { display:none; }
  .rt-nav-tabs { margin:0 calc(-1 * var(--m-gutter)); padding:0 var(--m-gutter) 2px; gap:6px; }
  .rt-nav-tab { flex-shrink:0; min-height:36px; display:inline-flex; align-items:center; padding:0 12px; font-size:12px; white-space:nowrap; border-radius:999px; }
  .rt-topbar-controls { margin-left:0; width:100%; gap:6px; }
  .rt-ctrl-filters { width:100%; gap:6px; }
  .rt-ctrl-input, .rt-ctrl-select { height:40px; min-width:0; flex:1 1 45%; font-size:16px; border-radius:10px; }
  #rt-searchQ { flex:1 1 60%; }
  .rt-ctrl-filters:not(.jp-open) > :is(#rt-fClientF, .rt-chips, #rt-sortF, .rt-density-btn, .rt-mode-seg) { display:none; }
  .rt-ctrl-filters:not(.jp-open) ~ .rt-summary-btn { display:none; }
  .rt-topbar-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:'filters add' 'summary summary'; align-items:start; }
  .rt-ctrl-filters { grid-area:filters; }
  .rt-add-btn { grid-area:add; width:44px; height:40px; padding:0; font-size:0; border-radius:12px; align-self:end; }
  .rt-add-btn::before { content:'+'; font-size:24px; font-weight:800; line-height:1; }
  .rt-summary-btn { grid-area:summary; }
  .rt-ctrl-filters .rt-chips { width:100%; display:flex; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; gap:6px; padding-bottom:2px; }
  .rt-ctrl-filters .rt-chips::-webkit-scrollbar { display:none; }
  .rt-chip { flex-shrink:0; min-height:36px; }
  .rt-ctrl-toggle, .rt-mode-btn, .rt-summary-btn, .rt-add-btn { min-height:40px; border-radius:10px; }
  .rt-mode-seg { display:inline-flex; }
  .rt-summary-btn { width:100%; }
  .rt-stat-strip.rt-kpis { flex-wrap:nowrap; gap:6px; padding:2px 0 6px; overflow-x:auto; scrollbar-width:none; margin:0 calc(-1 * var(--m-gutter)); padding-left:var(--m-gutter); padding-right:var(--m-gutter); }
  .rt-stat-strip.rt-kpis > .rt-kpi { flex:0 0 auto; min-width:0; display:flex; flex-direction:row; align-items:center; gap:6px; padding:6px 10px; min-height:36px; border-radius:999px; }
  .rt-kpi .rt-kpi-v { font-size:14px; }
  .rt-kpi .rt-kpi-l { font-size:9px; }
  .rt-kpi .rt-kpi-s { display:none; }
  .rt-count { width:100%; text-align:right; margin-top:2px; }
  /* Boards as stacked sections. */
  #rt-board { padding:8px var(--m-gutter) 8px; gap:10px; }
  .rt-lanes { flex-direction:column; gap:10px; overflow:visible; }
  .rt-lanes .rt-col, #rt-board .rt-col, .rt-board-cols .rt-col, html.device-phone .rt-col { min-width:0; flex:0 0 auto; width:100%; }
  .rt-board-cols { flex-direction:column; gap:10px; padding:8px var(--m-gutter) 24px; overflow:visible; }
  .rt-col { border-radius:12px; }
  .rt-col-head { padding:8px 12px 7px; }
  .rt-cards-zone { min-height:0; padding:8px; gap:8px; }
  .rt-drop-hint { padding:12px; font-size:12px; }
  .rt-drawer-body .rt-cards-zone { flex-direction:column; }
  .rt-drawer-body .rt-cards-zone .rt-opp-card { width:100%; }
  .rt-opp-card { border-radius:10px; }
  .rt-opp-card:hover { transform:none; box-shadow:none; }
  .rt-opp-header { padding:8px 10px 6px; }
  .rt-opp-title { font-size:13px; line-height:1.3; margin-bottom:4px; }
  .rt-opp-meta { gap:4px; margin-bottom:4px; }
  .rt-desc { display:none; }
  .rt-client-rows { padding:6px 8px; gap:4px; }
  .rt-client-row { min-height:34px; }
  .rt-opp-foot, .rt-card-quick-actions { padding:6px 10px 8px; }
  .rt-card-quick-actions button, .rt-card-chev, .rt-desc-more { min-height:34px; }
  .rt-subbar { padding:8px var(--m-gutter); gap:6px; }
  .rt-subbar .rt-ctrl-input, .rt-subbar .rt-ctrl-select { flex:1 1 45%; }
  .rt-subbar .rt-count { font-size:10px; }
  .rt-menu { max-width:calc(100vw - 16px); max-height:min(70vh, 70dvh); overflow-y:auto; border-radius:14px; }
  .rt-menu-item { min-height:var(--jp-tap); padding:8px 12px; font-size:13.5px; }
  /* List view and Leaderboard: dense grids, label column frozen. */
  .rt-list-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 var(--m-gutter); border-radius:10px; }
  .rt-list { min-width:860px; font-size:12px; }
  .rt-list th, .rt-list td { padding:7px 8px; }
  .rt-list thead th { position:sticky; top:0; z-index:3; background:#162035; }
  .rt-list th:first-child, .rt-list td:first-child { position:sticky; left:0; z-index:2; background:#131c31; width:10px; min-width:10px; padding:0; }
  .rt-list th:nth-child(2), .rt-list td:nth-child(2) { position:sticky; left:10px; z-index:2; background:#131c31; min-width:180px; max-width:200px; box-shadow:1px 0 0 rgba(255,255,255,.12); }
  .rt-list thead th:first-child, .rt-list thead th:nth-child(2) { z-index:4; background:#162035; }
  html[data-theme="light"] .rt-list thead th { background:#eef1f6; }
  html[data-theme="light"] .rt-list th:first-child, html[data-theme="light"] .rt-list td:first-child, html[data-theme="light"] .rt-list th:nth-child(2), html[data-theme="light"] .rt-list td:nth-child(2) { background:#f7f8fa; box-shadow:1px 0 0 rgba(0,0,0,.12); }
  html[data-theme="light"] .rt-list thead th:first-child, html[data-theme="light"] .rt-list thead th:nth-child(2) { background:#eef1f6; }
  #rt-view-leaderboard { padding:10px var(--m-gutter) 100px; }
  .lb-head { gap:8px; margin-bottom:10px; }
  .lb-head h2 { font-size:1.05rem; }
  .lb-sub { font-size:11.5px; }
  .lb-head .sec-filter { margin-left:0; width:100%; }
  .lb-head select, #rt-lbRole { min-height:40px; width:100%; }
  .lb-kpis { grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px; margin-bottom:10px; }
  .lb-kpi { padding:8px 10px; }
  .lb-kpi-v { font-size:18px; }
  .lb-podium { display:flex; overflow-x:auto; gap:8px; scroll-snap-type:x proximity; scrollbar-width:none; margin-bottom:12px; }
  .lb-podium .lb-pod { flex:0 0 66vw; scroll-snap-align:start; }
  .lb-tbl-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:10px; }
  .lb-tbl { min-width:900px; }
  .lb-tbl th, .lb-tbl td { padding:8px 10px; font-size:12px; }
  .lb-tbl th:first-child, .lb-tbl td:first-child { position:sticky; left:0; z-index:2; background:#131c31; box-shadow:1px 0 0 rgba(255,255,255,.12); }
  html[data-theme="light"] .lb-tbl th:first-child, html[data-theme="light"] .lb-tbl td:first-child { background:#f7f8fa; box-shadow:1px 0 0 rgba(0,0,0,.12); }
  #rt-modal .pw-tabs { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  #rt-modal .pw-tab { flex-shrink:0; min-height:40px; display:inline-flex; align-items:center; white-space:nowrap; }
  #rt-modal .detail-grid { grid-template-columns:1fr 1fr; gap:8px; }

  /* ══ 7. PROPOSAL WORKSHOP · AGENTS · FEEDBACK · NEWS ══════════════════════ */
  .pw-sidebar { top:0 !important; height:100vh !important; height:100dvh !important; }
  .pw-main { min-height:calc(100dvh - var(--jp-chrome)); }
  .pw-tabs { overflow-x:auto; scrollbar-width:none; }
  .pw-tab { flex-shrink:0; white-space:nowrap; min-height:40px; display:inline-flex; align-items:center; }
  #tab-agents .ag-shell { padding:12px var(--m-gutter) 110px; }
  #tab-agents .ag-header { gap:8px; }
  #tab-agents .ag-header > div:first-child .ag-eyebrow, #tab-agents .ag-header > div:first-child h1 { display:none; }
  #tab-agents .ag-tabs { overflow-x:auto; gap:16px; scrollbar-width:none; margin:10px 0 14px; }
  #tab-agents .ag-tabs button { flex-shrink:0; white-space:nowrap; min-height:44px; }
  #tab-agents .ag-btn { min-height:40px; }
  /* The welcome prose ("A clearer path from question to insight") is a desktop
     hero; on a phone the work starts at the first card. */
  #tab-agents .fm-welcome { display:none; }
  #tab-feedback { padding:14px var(--m-gutter) 110px; }
  .fb-section-check { width:18px; height:18px; }

  /* ══ 8. TEAM CLIENTS ══════════════════════════════════════════════════════
     A bounded app screen: title row, tracking numbers as one line of chips,
     search + actions, then the board — the ONE scroll box, every column,
     client frozen, 36px rows — so the bottom bar never covers a row. ── */
  #tab-team-clients .tc2-page.mnb-board { display:flex; flex-direction:column; height:calc(100dvh - var(--jp-chrome)); min-height:0; width:100%; padding:6px 0 calc(var(--jp-nav) + env(safe-area-inset-bottom, 0px)); box-sizing:border-box; --mn-row-h:36px; }
  #tab-team-clients .tc2-page.mnb-board > .mnb-head { flex:0 0 auto; margin:0 8px; padding:6px 10px; }
  #tab-team-clients .mnb-board .tch-row { gap:6px; }
  #tab-team-clients .mnb-board .tch-board-btn { font-size:17px; min-height:40px; }
  #tab-team-clients .mnb-board .mnb-kpis { order:3; flex:1 1 100%; display:flex; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; gap:6px; padding:0; border:0; }
  #tab-team-clients .mnb-board .mnb-kpi { flex:0 0 auto; min-height:32px; height:32px; padding:0 10px; border-radius:999px; }
  #tab-team-clients .mnb-board .mnb-kpi-v { font-size:14px; }
  #tab-team-clients .mnb-board .mnb-kpi-n { font-size:11px; }
  #tab-team-clients .tc2-page.mnb-board > .tc2-panel { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
  #tab-team-clients .tc2-page.mnb-board > .tc2-panel[style*="display: none"], #tab-team-clients .tc2-page.mnb-board > .tc2-panel[style*="display:none"] { display:none; }
  #tab-team-clients .tc2-page.mnb-board > .tc2-panel > .mnb-toolbar { flex:0 0 auto; padding:6px 10px; gap:6px; }
  #tab-team-clients .mnb-board .mnb-toolbar .mnb-search-wrap { height:40px; }
  #tab-team-clients .mnb-board :is(.mnb-tb,.mnb-new-main,.mnb-new-caret,.mnb-sel,.mnb-search,.tch-btn,.tch-item,.tch-fp-tab,.mnb-head-toggle) { min-height:40px; }
  @media (max-width:374px) {
    #tab-team-clients .mnb-board .mnb-toolbar .tch-btn { padding:0 9px; }
    #tab-team-clients .mnb-board .mnb-toolbar .mnb-new-main { padding:0 10px; }
  }
  #tab-team-clients .mnb-board .mnb-scroll { flex:1 1 auto; min-height:0; max-height:none; overflow:auto; -webkit-overflow-scrolling:touch; margin-inline:8px; }
  #tab-team-clients .tc2-page.mnb-board > .tc2-panel > :is(.nc-wrap, .cr-page, .tc2-tbl-wrap) { flex:1 1 auto; min-height:0; overflow:auto; -webkit-overflow-scrolling:touch; }
  #tab-team-clients .mnb-board .mnb-group-head { min-height:34px; }
  #tab-team-clients .mnb-board .mnb-name { font-size:12.5px; line-height:1.3; }
  #tab-team-clients .mnb-board .mnb-tbl td, #tab-team-clients .mnb-board .mnb-tbl th { font-size:12px; }
  #tab-team-clients .mnb-board :is(.mnb-name,.mnb-bubble,.mnb-expand,.mnb-abtn) { min-height:34px; }
  #tab-team-clients .mnb-board :is(.mnb-bubble,.mnb-expand,.mnb-abtn) { min-width:32px; }
  #tab-team-clients .mnb-board .mnb-status-btn { min-height:30px; font-size:11.5px; }
  #tab-team-clients #tc2-panel-incoming .tc2-tbl-wrap { overflow:auto; -webkit-overflow-scrolling:touch; max-height:none; }
  #tab-team-clients #tc2-panel-incoming .tc2-tbl { min-width:1400px; }
  #tab-team-clients #tc2-panel-incoming .tc2-tbl th:first-child, #tab-team-clients #tc2-panel-incoming .tc2-tbl td:first-child { position:sticky; left:0; z-index:2; background:var(--tc-surface, #fff); box-shadow:1px 0 0 var(--tc-bdr2, #e5e7eb); }
  #tab-team-clients #tc2-panel-incoming .tc2-tbl thead th:first-child { z-index:4; }
  #tab-team-clients .tc2-tbl th, #tab-team-clients .tc2-tbl td { padding:7px 8px; }
  #tab-team-clients .nc-wrap { margin-left:0; margin-right:0; }

  /* ══ 9. OPERATIONS DASHBOARD ══════════════════════════════════════════════ */
  #tab-operations-dashboard .od-page { padding:8px 8px 110px; }
  #tab-operations-dashboard .od-pghead { display:none; }
  #tab-operations-dashboard .ops-toolbar { margin-bottom:8px; }
  #tab-operations-dashboard .od-bar { flex-direction:column; align-items:stretch; gap:8px; }
  #tab-operations-dashboard .od-views { min-width:0; max-width:100%; gap:8px; padding-bottom:2px; }
  #tab-operations-dashboard .od-views::-webkit-scrollbar { display:none; }
  #tab-operations-dashboard .od-seg { flex:0 0 auto; }
  #tab-operations-dashboard .od-seg-btn.ops-filter-btn { min-height:38px; white-space:nowrap; }
  #tab-operations-dashboard .ops-toolbar-actions { margin-left:0; flex-wrap:wrap; }
  #tab-operations-dashboard .od-btn { min-height:40px; }
  #tab-operations-dashboard .od-filterbar { padding:6px 8px; gap:6px; }
  #tab-operations-dashboard .od-filters { width:100%; }
  #tab-operations-dashboard .od-filters .od-menu { flex:1 1 0; min-width:0; }
  #tab-operations-dashboard .od-filters .od-btn { width:100%; justify-content:space-between; }
  #tab-operations-dashboard .od-menu-panel, #tab-operations-dashboard .od-menu-right .od-menu-panel { position:fixed; left:8px; right:8px; top:auto; bottom:calc(var(--jp-nav) + 8px + env(safe-area-inset-bottom, 0px)); min-width:0; max-width:none; max-height:60dvh; overflow:auto; z-index:1300; border-radius:14px; box-shadow:0 -8px 32px rgba(0,0,0,.25); }
  #tab-operations-dashboard .od-menu-item, #tab-operations-dashboard .od-menu-panel #ops-type-filters .ops-filter-btn { min-height:var(--jp-tap); display:flex; align-items:center; }
  #tab-operations-dashboard .ops-table-wrap { overflow:auto; -webkit-overflow-scrolling:touch; }
  #tab-operations-dashboard .ops-table { min-width:760px; font-size:12.5px; }
  #tab-operations-dashboard .ops-table td { padding:8px 10px; }
  #tab-operations-dashboard .ops-table thead th { padding:8px 10px; white-space:nowrap; }
  #tab-operations-dashboard .ops-table th:first-child, #tab-operations-dashboard .ops-table td:first-child { position:sticky; left:0; z-index:2; background:#fff; box-shadow:1px 0 0 var(--border, #d1d1d1); }
  #tab-operations-dashboard .ops-table thead th:first-child { z-index:4; background:#eef1f6; }
  #tab-operations-dashboard .od-modal { padding:0; align-items:flex-end; }
  #tab-operations-dashboard .od-modal-box { max-height:100dvh; border-radius:14px 14px 0 0; }
  #tab-operations-dashboard .od-cal-toolbar { gap:6px; }
  #tab-operations-dashboard .od-cal-nav-btn { white-space:nowrap; min-height:40px; }
  #tab-operations-dashboard .od-cal-label { min-width:0; flex:1 1 auto; }
  #tab-operations-dashboard .od-cal-toolbar .od-seg { max-width:100%; overflow-x:auto; }
  #tab-operations-dashboard .od-cal-person { width:100%; }
  #tab-operations-dashboard .od-cal-body { overflow-x:auto; }
  #tab-operations-dashboard .od-cal-month, #tab-operations-dashboard .od-cal-week-grid { min-width:700px; }

  /* ══ 10. MEETING TRACKER FAMILY ═══════════════════════════════════════════
     The real grid, every column, frozen Meeting column, 34px rows, 12.5px
     text; a compact two-row header; the grid gets the screen. staff-portal.css
     turns EVERY portal table into stacked cards below 600px (display:block /
     thead hidden / td as blocks, all !important) — right for the portal's own
     short lists, wrong for a 48-column grid the owner reads sideways. Same
     specificity trick, one id deeper. ── */
  #tab-staff-portal #page-mt { --mn-row-h:34px; }
  #tab-staff-portal #page-mt.active { height:calc(100dvh - var(--jp-chrome) - 2px); }
  #page-mt .mt-shell { padding:4px 0 8px; }
  #page-mt .mt-topbar { padding:4px 10px 4px; gap:6px; }
  #page-mt .mt-topbar-r { flex:1 1 100%; justify-content:space-between; }
  #page-mt .mt-topbar-l h2, #page-mt .mt-section-title { font-size:17px; }
  #page-mt .mt-headbar-eyebrow { display:none; }
  #page-mt .mt-topbar-r { gap:6px; }
  #page-mt .mt-topbar-sep { display:none; }
  #page-mt .mt-topbar-r .mt-live-status, #page-mt .mt-topbar-r .mt-headbar-meta { font-size:10.5px; }
  #page-mt .mt-fy-pill, #page-mt .mt-menu-btn { min-height:36px; }
  #page-mt .mt-controlbar { padding:4px 10px 6px; gap:6px; }
  #page-mt .mt-controlbar .mt-controlbar-right { display:none; }
  #page-mt .mt-search-wrap { height:40px; }
  #page-mt .mt-add-btn { height:40px; }
  #page-mt .mt-group-head { margin:0 10px; min-height:28px; padding-block:2px; }
  #page-mt .mt-table-wrap { margin:0 8px; width:calc(100% - 16px); max-width:calc(100% - 16px); min-height:160px; scrollbar-width:thin; border-radius:8px; }
  #page-mt .mt-table-wrap::-webkit-scrollbar { width:8px; height:8px; }
  #page-mt .mt-table-wrap::-webkit-scrollbar-thumb { border-width:2px; }
  #tab-staff-portal #page-mt #mt-table { display:table !important; min-width:2307px !important; table-layout:fixed; }
  #tab-staff-portal #page-mt #mt-table thead { display:table-header-group !important; }
  #tab-staff-portal #page-mt #mt-table tbody { display:table-row-group !important; gap:0; }
  #tab-staff-portal #page-mt #mt-table tbody tr { display:table-row !important; padding:0; border:0; border-radius:0; box-shadow:none; }
  #tab-staff-portal #page-mt #mt-table tbody tr.js-hidden { display:none !important; }
  #tab-staff-portal #page-mt #mt-table td { display:table-cell !important; padding:0 5px; border-right:1px solid var(--mn-line, #e6e9ef); border-bottom:1px solid var(--mn-line, #e6e9ef); line-height:normal; }
  #tab-staff-portal #page-mt #mt-table td + td { margin-top:0; }
  #tab-staff-portal #page-mt #mt-table td[data-label]::before { content:none; display:none; }
  #tab-staff-portal #page-mt #mt-table td:has(>.mt-cell-select) { padding:0; }
  #tab-staff-portal #page-mt #mt-table th.mt-c-bar, #tab-staff-portal #page-mt #mt-table td.mt-c-bar { padding:0; border-right:0; }
  #tab-staff-portal #page-mt #mt-table th.mt-c-check, #tab-staff-portal #page-mt #mt-table td.mt-c-check { padding:0; border-right:0; }
  #tab-staff-portal #page-mt .mt-table { min-width:2307px !important; table-layout:fixed; }
  #tab-staff-portal #page-mt .mt-table colgroup { display:table-column-group; }
  #tab-staff-portal #page-mt #mt-colgroup col:nth-child(3) { width:150px !important; }
  #tab-staff-portal #page-mt[data-mt-mobile-summary] .mt-table tbody tr[data-mt-row]>td[data-mt-cell] { display:table-cell !important; }
  #tab-staff-portal #page-mt .mt-table tbody tr[data-mt-row] { height:var(--mn-row-h) !important; contain-intrinsic-size:auto var(--mn-row-h); }
  #tab-staff-portal #page-mt .mt-table tbody tr[data-mt-row]>td { height:var(--mn-row-h) !important; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  #tab-staff-portal #page-mt #mt-table td[data-mt-cell="name"],
  #tab-staff-portal #page-mt #mt-table td[data-mt-cell="client"],
  #tab-staff-portal #page-mt #mt-table td[data-mt-cell="issue"],
  #tab-staff-portal #page-mt #mt-table td[data-mt-cell="member"] { grid-column:auto; }
  #tab-staff-portal #mt-table .mt-name-chat .mtx-cell { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #page-mt #mt-table .mtx-cell { min-height:0; height:var(--mn-row-h); line-height:var(--mn-row-h); padding:0; white-space:nowrap; overflow-wrap:normal; font-size:12.5px; }
  #page-mt #mt-table td[data-mt-cell="name"] .mtx-cell { font-size:13px; font-weight:600; }
  #tab-staff-portal #page-mt #mt-table .mt-combo-cell { min-height:0; height:var(--mn-row-h); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12.5px; line-height:var(--mn-row-h); padding:0; }
  #tab-staff-portal #page-mt #mt-table tr.mt-vpad { display:table-row !important; }
  #tab-staff-portal #page-mt #mt-table .mt-detail-btn { font-size:15px; width:36px; height:30px; }
  #page-mt #mt-table .mt-detail-btn::after { content:none; }
  #page-mt[data-mt-mobile-summary] #mt-view-summary { font-size:11px; }
  #page-mt[data-mt-mobile-summary] #mt-view-summary::after { content:none; }
  #tab-staff-portal #page-mt #mt-table :is(.mt-status-button,.mt-people-button,.mt-date-button,.mt-chat-button) { min-height:30px; height:30px; }
  #tab-staff-portal #page-mt #mt-table .mt-mp-btn { min-height:30px; }
  #mt-table .mt-name-chat { width:100%; }
  #mt-table .mt-chat-button { flex-basis:34px; min-width:34px; }
  #page-mt .mt-board-footer { padding:4px 10px; flex-wrap:nowrap; gap:8px; min-height:0; }
  #page-mt .mt-board-footer #mt-view-summary { display:none; }
  #page-mt .mt-board-footer label { display:flex; margin-left:0; flex:1 1 auto; min-width:0; }
  #page-mt .mt-board-footer select { min-height:36px; flex:1 1 auto; min-width:0; }
  #page-mt .mt-board-footer button { margin-left:auto; flex:0 0 auto; white-space:nowrap; min-height:36px; }
  #page-mt .mt-stats { grid-template-columns:repeat(2, minmax(0,1fr)); gap:6px; margin:0 10px 6px; }
  #page-mt .mt-menu-item { min-height:var(--jp-tap); }
  #tab-staff-portal #page-mt.active #mt-rf-body { overflow:auto; -webkit-overflow-scrolling:touch; padding:0 8px; }
  #tab-staff-portal #mt-rf-body .rf-layout { flex-direction:column; }
  #tab-staff-portal #mt-rf-body .rf-side { flex:none; margin:0 8px 8px; max-height:34vh; }
  #tab-staff-portal #mt-rf-body .rf-side.is-collapsed { max-height:40px; }
  #tab-staff-portal #mt-rf-body .rf-main { padding:0 8px; }
  #tab-staff-portal #mt-rf-body .rf-toolbar :is(button, input, select) { min-height:40px; }
  #mt-rf-body table { min-width:900px; }
  #mt-rf-body thead th { position:sticky; top:0; z-index:3; }
  #tab-staff-portal #page-mt.active #mt-mm-body, #tab-staff-portal #page-mt.active #mt-cap-body { overflow:auto; -webkit-overflow-scrolling:touch; }
}
