/* ============================================================================
   THE PIPELINE FIXES' STYLES (16 Nov 2026, Cory). Every rule here is scoped to html.pl-v2 — the class
   OiTerms.syncV2() sets where the pipeline fixes are on (lib/pipeline-rollout.js). Other workspaces never
   match a rule in this file. Global tokens first; each fix's rules under its number.
   ========================================================================== */

/* ── #6 Text sizes (Critiquito #6): names 14px, row text 13px, nothing under 12px, secondary #6a6762 ── */
:root {
  --pl-fs-name: var(--fs-base, 14px);
  --pl-fs-row: var(--fs-md, 13px);
  --pl-fs-label: var(--fs-sm, 12px);          /* the floor for any label on the pipeline */
  --pl-text-secondary: #6a6762; /* 5.6:1 on white */
  --tap-min: 44px;              /* #14 — every tappable thing on the phone pipeline */
}
/* AVPL2-1 (17 Nov 2026, Critiquito release review v2): the secondary grey had no dark value, so every rule using it
   (card meta, "Came from", Backup, counts…) read #6a6762 on the dark cards — 2.81:1. One dark value for the token,
   never per rule: #a8a5a0 is 6.4:1 on --surface2 #222320 and 7.0:1 on --surface #1a1b19 (pipeline-dark-secondary.test.js). */
html.pl-v2:not([data-theme="light"]) { --pl-text-secondary: #a8a5a0; }
html.pl-v2 .card-name,
html.pl-v2 .card-title-line,
html.pl-v2 .pl-name { font-size: var(--pl-fs-name) !important; }
html.pl-v2 .card-meta,
html.pl-v2 .card-bottom,
html.pl-v2 .card-contact-link,
html.pl-v2 .pl-sub { font-size: var(--pl-fs-row); }
html.pl-v2 .pl-bn,
html.pl-v2 .pl-date,
html.pl-v2 .pl-stage-badge,
html.pl-v2 .card-qual-chip,
html.pl-v2 .card-consultant { font-size: var(--pl-fs-label) !important; }
html.pl-v2 .pl-sub,
html.pl-v2 .pl-bn,
html.pl-v2 .pl-date,
html.pl-v2 .card-bottom,
html.pl-v2 .card-meta { color: var(--pl-text-secondary); }

/* ── #18 The primary button (Critiquito #15): ONE shared style, defined only in polish.css ("THE primary button") —
   html.pl-v2 .qa-btn.primary and Branding's .lore-btn-primary are one selector list there (v3, 16 Nov 2026). ── */

/* ── #27 Possible duplicate (Critiquito #24): neutral, not an error; stays in view; 44px ── */
html.pl-v2 .pl-dup-btn { display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 14px; border: 1px solid #c9d3e0; border-radius: 22px; background: #eef2f7; color: #1f3d65; font-size: var(--fs-md, 13px); font-weight: 600; cursor: pointer; }
html.pl-v2 .pl-dup-btn:hover { background: #e1e8f1; }
html.pl-v2 .pl-dup-btn:focus-visible { outline: 2px solid #1f3d65; outline-offset: 2px; }

/* ── #28 Test lead tag (Critiquito #25): neutral pill, no amber dashed border. #403e3a on #f1f1ee = 9.6:1 ── */
html.pl-v2 .pl-test-tag { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 8px; border: 1px solid #e0dfda; border-radius: 10px; background: #f1f1ee; color: #403e3a; font-size: var(--fs-sm, 12px); font-weight: 600; line-height: 18px; white-space: nowrap; vertical-align: middle; }

/* ── #24 Empty Assign column (Critiquito #21) — shared empty-state parts ── */
html.pl-v2 .pl-empty-assign { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
html.pl-v2 .pl-empty-title { font-size: var(--fs-base, 14px); font-weight: 600; color: var(--text, #181715); }
html.pl-v2 .pl-empty-sub { font-size: var(--fs-md, 13px); color: var(--pl-text-secondary); }
html.pl-v2 .pl-empty-action { min-height: var(--tap-min); padding: 0 16px; border: 1px solid #2b7230; border-radius: 8px; background: #ffffff; color: #2b7230; font-size: var(--fs-md, 13px); font-weight: 600; cursor: pointer; }
html.pl-v2 .pl-empty-action:focus-visible { outline: 2px solid #1f3d65; outline-offset: 2px; }

/* ── #20 One lead title (Critiquito #20): "name, trip" on the open lead, the team's codes on a small Ref line ── */
html.pl-v2 .pl-lead-title { font-size: var(--fs-lg, 16px); font-weight: 700; color: var(--text, #181715); line-height: 1.3; margin: 4px 0 2px; overflow-wrap: anywhere; }
html.pl-v2 .pl-lead-ref { font-size: var(--fs-sm, 12px); color: var(--pl-text-secondary); margin: 0 0 4px; }
/* The simple lead already has a display title (.sl-title, tap to edit) — it shows the same words, so no second heading. */
html.pl-v2.pl-simple #ov-lead-rail .pl-lead-title { display: none; }

/* ── #7 The row line (Critiquito #7): "Came from: X · Next: Y", 12px, secondary grey; overdue next step in --danger ── */
html.pl-v2 .pl-leadline { font-size: var(--pl-fs-label); color: var(--pl-text-secondary); line-height: 1.45; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
html.pl-v2 .pl-leadline .pl-k { color: var(--pl-text-secondary); font-weight: 600; }
html.pl-v2 .pl-leadline .pl-next-due { color: var(--danger, #b42318); } /* 6.3:1 on white — red means overdue only (#5) */
/* AVPL3-3 (17 Nov 2026): in dark, THE dark danger (--danger, lore-tokens.css #ff9b8f): 8.51:1 on the row #1a1b19 (the light
   #b42318 was 2.63:1). The fallback is the same value — pipeline.html does not link lore-tokens.css. */
html.pl-v2:not([data-theme="light"]) .pl-leadline .pl-next-due { color: var(--danger, #ff9b8f); }
html.pl-v2 .pl-leadline-col { flex: 1 1 30%; min-width: 0; border-left: 1px solid var(--border-2); padding-left: 12px; font-size: var(--pl-fs-label); color: var(--pl-text-secondary); }
html.pl-v2 .pl-leadline-col .pl-leadline { white-space: normal; margin-top: 0; }

/* ── #27 The text glyphs as drawings (Critiquito #27): OiIcons.glyph() — one icon set; sits on the text line ── */
html.pl-v2 .oi-glyph { display: inline-flex; align-items: center; vertical-align: -0.15em; line-height: 1; }
html.pl-v2 .oi-glyph svg { display: block; }
html.pl-v2 .pl-stat { color: var(--pl-text-secondary); font-weight: 500; cursor: help; }

/* ── B2 The board fits at 1280 (board review B2, W7, M1): flexible columns 216–300px, one gap, empty and collapsed
   columns as narrow strips with a level title and count (never hidden), a visible 12px scroll bar (#8a8782 thumb,
   3.5:1 on white), and 44px edge chevrons only while columns are hidden that way (_plBoardFit in pipeline.html).
   The 320px sidebar stays: it holds the schedule and messages, and has no icon-rail form to collapse to. ── */
html.pl-v2 .board { gap: 8px; padding-left: 12px; padding-right: 12px; }
/* min-width is 216px from 768px up and today's 270px on a phone — a breakpoint without @media, so the rule stays
   one gated selector: (768px - 100vw) is negative on a desktop (clamps to 216) and large on a phone (clamps to 270). */
html.pl-v2 .board > .column { flex: 1 1 216px; min-width: clamp(216px, calc((768px - 100vw) * 1000), 270px); max-width: 300px; }
/* v3: Chrome 121+ ignores the ::-webkit-scrollbar rules below once scrollbar-color is set, so the 12px bar never drew
   (Critiquito v2 B2(d)). The colour line is now only for browsers without them (Firefox). */
@supports not selector(::-webkit-scrollbar) { html.pl-v2 .board { scrollbar-color: #8a8782 transparent; } }
html.pl-v2 .board::-webkit-scrollbar { height: 12px; }
html.pl-v2 .board::-webkit-scrollbar-thumb { background: #8a8782; border: 2px solid var(--bg, #fff); border-radius: 6px; }
html.pl-v2 .board::-webkit-scrollbar-thumb:hover { background: #6a6762; }
/* Strips: empty stages and collapsed ones. 72px so "Qualifying" sits level at 12px and the count pill fits. */
html.pl-v2 .board > .column.pl-strip { flex: 0 0 72px; min-width: 72px !important; max-width: 72px !important; cursor: pointer; }
html.pl-v2 .column.pl-strip .col-header { height: 100%; padding: 12px 4px; border-bottom: none; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
html.pl-v2 .column.pl-strip .col-title { flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; height: auto; }
html.pl-v2 .column.pl-strip .col-stage-label { writing-mode: horizontal-tb; white-space: normal; overflow-wrap: anywhere; hyphens: auto; text-align: center; font-size: var(--fs-sm, 12px); line-height: 1.25; letter-spacing: 0; padding: 0; }
html.pl-v2 .column.pl-strip .col-actions { flex-direction: column; }
html.pl-v2 .column.pl-strip .col-count { padding: 2px 8px; }
html.pl-v2 .column.pl-strip .col-collapse-btn,
html.pl-v2 .column.pl-strip .col-meta,
html.pl-v2 .column.pl-strip .ua-queue-toggle,
html.pl-v2 .column.pl-empty-strip .col-cards { display: none; }
html.pl-v2 .column.pl-empty-strip { opacity: .85; cursor: default; }
/* A drag widens an empty strip so a card can be dropped there (as hidden empty columns re-appear today). */
html.pl-v2 body.pipeline-dragging .board > .column.pl-empty-strip { flex: 1 1 216px; min-width: 216px !important; max-width: 300px !important; border-style: dashed; }
html.pl-v2 body.pipeline-dragging .column.pl-empty-strip .col-cards { display: block; min-height: 120px; }
/* Edge chevrons — 44px round, only while columns are hidden that way. */
html.pl-v2 .board-wrap .board-scroll-btn.pl-on { display: inline-flex !important; width: 44px; height: 44px; border-radius: 50%; padding: 0; opacity: 1; background: #ffffff; color: #1f3d65; border: 1px solid #c9c7c2; box-shadow: var(--shadow-2); }
html.pl-v2 .board-wrap .board-scroll-btn.pl-on:hover { background: #eef2f7; }
html.pl-v2 .board-wrap .board-scroll-btn.pl-on:focus-visible { outline: 2px solid #1f3d65; outline-offset: 2px; }

/* ── #9 Cards don't overlap (Critiquito #9, board review W5): the select circle has its own 24px slot and the
   name starts 32px in; the name stops short of the menu and the star (ellipsis); the owner's name stops short
   of the snooze/handled icons; 88px under the last card so the bottom-right Ask Lore button never covers it.
   Same on desktop and phone. ── */
html.pl-v2 .card .card-sel { top: 9px; left: 8px; width: 20px; height: 20px; }
html.pl-v2 .card > .card-top { padding-left: 22px; padding-right: 28px; min-width: 0; }
html.pl-v2 .card:has(> .lead-menu-btn) > .card-top { padding-right: 60px; }
html.pl-v2 .card > .card-bk-idrow { padding-left: 22px; }   /* P7-1 (v8): a booking's number row starts after the select circle too, as .card-top does */
html.pl-v2 .card > .card-top > .ov-name-span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.pl-v2 .card-meta-row { padding-right: 44px; min-width: 0; }
html.pl-v2 .card-meta-row .card-activity { white-space: nowrap; flex: 0 0 auto; }
html.pl-v2 .card-meta-row .card-consultant { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.pl-v2 .col-cards { padding-bottom: 88px; }
html.pl-v2 #pipeline-list { padding-bottom: 88px; }

/* ── #10 44px tap targets on a phone (Critiquito #10): small icons keep their size; an invisible ::after makes
   each one a 44×44 target, spaced so two targets never share a spot. A phone card keeps only call and text —
   email and Lore DM are on the open lead. The menu (⋯) already has its 44px target (lore-move-lead.js). ── */
@media (max-width: 767px) {
  html.pl-v2 .card .card-sel::after,
  html.pl-v2 .pl-row .row-sel::after,
  html.pl-v2 .card .card-star::after,
  html.pl-v2 .card .card-mark-btn::after,
  html.pl-v2 .card .card-contact-link::after { content: ""; position: absolute; top: -12px; right: -12px; bottom: -12px; left: -12px; }
  html.pl-v2 .pl-row .row-sel { position: relative; width: 20px; height: 20px; opacity: .45; margin: 0 12px 0 10px; }
  html.pl-v2 .card .card-star { width: 20px; height: 20px; top: 10px; right: 10px; display: flex; align-items: center; justify-content: center; }
  html.pl-v2 .card > .lead-menu-btn { right: 48px; top: 4px; }   /* v3: 2px clear of the star's 44px target */
  html.pl-v2 .card:has(> .lead-menu-btn) > .card-top { padding-right: 84px; }
  html.pl-v2 .card:has(> .lead-menu-btn) > .card-bk-idrow { padding-right: 84px; }   /* P6-1 (v7): a booking's number row stops short of the menu too */
  html.pl-v2 .card .card-contact > [data-ic="mail"],
  html.pl-v2 .card .card-contact > [data-ic="chat"] { display: none !important; }
  html.pl-v2 .card .card-contact-link { position: relative; width: 20px; height: 20px; justify-content: center; margin: 4px 26px 4px 0; }
  html.pl-v2 .card .card-mark-ctrls { gap: 26px; right: 12px; bottom: 12px; }
  html.pl-v2 .card .card-mark-btn { position: relative; width: 20px; height: 20px; justify-content: center; }
  html.pl-v2 .card-meta-row { padding-right: 78px; }
  /* The open lead's email / text / call icons (where email and DM now live on a phone): 44px targets, spaced. */
  html.pl-v2 #ov-lead-rail .qc-icon-row { gap: 22px !important; padding-right: 11px; }
  html.pl-v2 #ov-lead-rail .qc-icon { position: relative; }
  html.pl-v2 #ov-lead-rail .qc-icon::after { content: ""; position: absolute; top: -11px; right: -11px; bottom: -11px; left: -11px; }
}

/* ── B1 / B2 step 5: THE stage chips (public/lore-stage-chips.js) — one row, three homes: the phone's one-stage
   list, the phone board (follows the swipe) and the desktop jump bar above the board. Each chip is 36px to look
   at inside a 44px tap area; active = Lore green #2b7230, white text (5.9:1); the rest white, 1px border. ── */
html.pl-v2 .lore-stage-chips { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 16px; scroll-padding: 0 16px; }
html.pl-v2 .lore-stage-chips::-webkit-scrollbar { display: none; }
html.pl-v2 .lore-stage-chip { flex: 0 0 auto; position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 4px 0; padding: 0 12px; border: 1px solid #c9c7c2; border-radius: 18px; background: #ffffff; color: #181715; font: inherit; font-size: var(--fs-md, 13px); font-weight: 600; white-space: nowrap; cursor: pointer; }
html.pl-v2 .lore-stage-chip::after { content: ""; position: absolute; top: -4px; right: -4px; bottom: -4px; left: -4px; }
html.pl-v2 .lore-stage-chip-count { color: #6a6762; font-weight: 600; }
html.pl-v2 .lore-stage-chip.is-active { background: #2b7230; border-color: #2b7230; color: #ffffff; }
html.pl-v2 .lore-stage-chip.is-active .lore-stage-chip-count { color: #ffffff; }
html.pl-v2 .lore-stage-chip:focus-visible { outline: 2px solid #1f3d65; outline-offset: 2px; }
html.pl-v2 .lore-stage-chip.is-side { border-style: dashed; }
/* The bar above the board (desktop jump bar / phone board): sticky, 48px. */
html.pl-v2 #pl-stagebar { position: sticky; top: 0; z-index: 5; background: var(--bg, #ffffff); border-bottom: 1px solid var(--border, #e0dfda); }
html.pl-v2 #pl-stagebar[hidden] { display: none; }
/* The phone's one-stage list: chips sticky at the top, a count/sort line, full-width rows ≥72px, one scroller. */
html.pl-v2 #pipeline-list.pl-stage-list { flex-direction: column; gap: 0; padding-left: 0; padding-right: 0; }
html.pl-v2 .pl-sl-chips { position: sticky; top: 0; z-index: 5; background: var(--bg, #ffffff); border-bottom: 1px solid var(--border, #e0dfda); }
html.pl-v2 .pl-sl-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 16px; font-size: var(--fs-md, 13px); color: var(--pl-text-secondary); }
html.pl-v2 .pl-sl-sort { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px; border: none; background: transparent; color: #1f3d65; font: inherit; font-size: var(--fs-md, 13px); font-weight: 600; cursor: pointer; }
/* AVPL3-2 (17 Nov 2026): the one focus ring (3px, 2px clear; #1f3d65 light, #9ec5ff dark — as lore-notify's buttons), and
   in dark the words take the navy pair's dark half #9ec5ff: 10.6:1 on the page #111210 (#1f3d65 there was 1.71:1). */
html.pl-v2 .pl-sl-sort:focus-visible { outline: 3px solid #1f3d65; outline-offset: 2px; box-shadow: none; }
html.pl-v2:not([data-theme="light"]) .pl-sl-sort { color: #9ec5ff; }
html.pl-v2:not([data-theme="light"]) .pl-sl-sort:focus-visible { outline-color: #9ec5ff; }
html.pl-v2 .pl-srow { position: relative; display: flex; align-items: center; gap: 8px; min-height: 72px; padding: 10px 52px 10px 16px; border-bottom: 1px solid var(--border, #e0dfda); background: var(--bg-card, #ffffff); cursor: pointer; }
html.pl-v2 .pl-srow.overdue-row { box-shadow: inset 3px 0 0 var(--danger, #b42318); }
html.pl-v2:not([data-theme="light"]) .pl-srow.overdue-row { box-shadow: inset 3px 0 0 var(--danger, #ff9b8f); } /* AVPL3-3: 8.51:1 edge */
html.pl-v2 .pl-srow-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
html.pl-v2 .pl-srow-name { font-size: var(--fs-base, 14px); font-weight: 600; color: var(--text, #181715); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.pl-v2 .pl-srow-trip { font-size: var(--fs-md, 13px); color: var(--text, #181715); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.pl-v2 .pl-srow .lead-menu-btn { top: 50%; bottom: auto; right: 8px; transform: translateY(-50%); }
html.pl-v2 .pl-srow .pl-leadline { white-space: normal; overflow: visible; text-overflow: clip; }
html.pl-v2 .pl-sl-empty { padding: 32px 16px; font-size: var(--fs-base, 14px); color: var(--pl-text-secondary); text-align: center; }
/* The phone board: whole columns snap into place (a peek of the next one shows), the chips follow the swipe. */
@media (max-width: 767px) {
  html.pl-v2 .board { scroll-snap-type: x mandatory; scroll-padding-left: 12px; }
  html.pl-v2 .board > .column { scroll-snap-align: start; flex: 0 0 calc(100vw - 56px); min-width: calc(100vw - 56px); max-width: calc(100vw - 56px); }
  html.pl-v2 .board > .column.pl-strip { scroll-snap-align: start; }
}

/* ── #16 The phone toolbar (Critiquito #16): the tabs get their own line with the active tab always in view; the
   line under it is List · Board · More (Ops, Priority, Flagged, On hold, Text size live in More), every control 44px
   with a visible word. The stage chips (B1) sit under it, never on it. Desktop: the words stay for screen readers. ── */
html.pl-v2 .pl-tb-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.pl-v2 .pl-tb-more { display: none; }
@media (max-width: 767px) {
  html.pl-v2 .toolbar-filters { flex-wrap: wrap; overflow-x: visible; row-gap: 8px; }
  html.pl-v2 .toolbar-filters .tf-left { flex: 1 1 100%; min-width: 0; display: flex; }
  html.pl-v2 .toolbar-filters .phase-toggle { flex: 1 1 auto; min-width: 0; height: auto; padding: 2px; }
  html.pl-v2 .toolbar-filters .phase-toggle .ph-btn { min-height: 44px; height: 44px; padding: 0 14px; font-size: var(--fs-base, 14px); }
  html.pl-v2 .toolbar-filters .phase-toggle .ph-plus { min-width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  html.pl-v2 .toolbar-filters #ph-ops,
  html.pl-v2 .toolbar-filters .tf-icongroup { display: none !important; }
  html.pl-v2 .toolbar-filters .tf-right { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; margin-left: 0; }
  html.pl-v2 .toolbar-filters .view-toggle { gap: 8px; }
  html.pl-v2 .toolbar-filters .view-toggle-btn,
  html.pl-v2 .toolbar-filters .pl-tb-more { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid #c9c7c2; border-radius: 8px; background: #ffffff; color: #181715; font: inherit; font-size: var(--fs-md, 13px); font-weight: 600; cursor: pointer; }
  html.pl-v2 .toolbar-filters .view-toggle-btn.active { background: #2b7230; border-color: #2b7230; color: #ffffff; }
  html.pl-v2 .toolbar-filters .pl-tb-more { margin-left: auto; }
  html.pl-v2 .toolbar-filters .pl-tb-lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  html.pl-v2 .toolbar-filters .view-toggle-btn:focus-visible,
  html.pl-v2 .toolbar-filters .pl-tb-more:focus-visible { outline: 2px solid #1f3d65; outline-offset: 2px; }
}

/* ── #11 The open lead in the phone's order (Critiquito #11): title, step line, summary, the next step
   (Draft a text · Draft an email · Move to… · More…), then the money row (moved below the lead's own block,
   pipeline.html, class pl-fin-after) and the rest. Nothing removed. Move to… shows on a desktop too. The
   classic open lead keeps ONE title: the edit box (stored title, codes and all) folds under the heading and
   opens from "Edit title" (LoreLeadTitle.openEditor). The simple lead has its own tap-to-edit title. ── */
@media (min-width: 769px) {
  html.pl-v2 .sl-movebtn { display: block; }
  html.pl-v2 #overlay-card .sl-row .sl-movebtn { flex: 0 0 auto; min-height: var(--tap-min); padding: 10px 16px; }
}
html.pl-v2 #ov-fin-row.pl-fin-after { margin: var(--space-3, 12px) 14px 0; border: 1px solid var(--border, #e0dfda); border-radius: var(--radius, 8px); }
html.pl-v2:not(.pl-simple) .ov-ctx-title-row.pl-lt-fold:not(.pl-lt-open) { display: none; }
html.pl-v2 .pl-lead-title-edit { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min); padding: 0 12px; margin: 0 0 2px -12px; border: none; border-radius: var(--radius, 8px); background: transparent; color: var(--pl-text-secondary); font: inherit; font-size: var(--fs-md, 13px); font-weight: 600; cursor: pointer; }
html.pl-v2 .pl-lead-title-edit:hover { background: var(--bg-hover, #f1f1ee); color: var(--text, #181715); }
html.pl-v2 .pl-lead-title-edit:focus-visible { outline: 2px solid #1f3d65; outline-offset: 2px; }
html.pl-v2 .pl-lead-title-edit[aria-expanded="true"] { display: none; }
html.pl-v2.pl-simple .pl-lead-title-edit { display: none; }
/* The open lead's small targets on a phone (listed by #10's audit): the same invisible 44px ::after, or a
   44px minimum height where the control is text. Left as they are (named in the notes): the group-message
   checkbox (an input carries no ::after) and two unnamed buttons. */
@media (max-width: 767px) {
  html.pl-v2 #ov-lead-rail .qc-invite,
  html.pl-v2 #ov-lead-rail .oi-add-sq,
  html.pl-v2 #ov-lead-rail .oit-add-hdr,
  html.pl-v2 #ov-lead-rail .sl-sum-add,
  html.pl-v2 #ov-lead-rail .sl-sum-link,
  html.pl-v2 #ov-lead-rail .ov-client-hero { position: relative; }
  html.pl-v2 #ov-lead-rail .qc-invite::after { content: ""; position: absolute; top: -11px; right: 0; bottom: -11px; left: 0; }
  html.pl-v2 #ov-lead-rail .oi-add-sq::after,
  html.pl-v2 #ov-lead-rail .oit-add-hdr::after { content: ""; position: absolute; top: -12px; right: -12px; bottom: -12px; left: -12px; }
  html.pl-v2 #ov-lead-rail .sl-sum-add::after { content: ""; position: absolute; top: -5px; right: 0; bottom: -5px; left: 0; }
  html.pl-v2 #ov-lead-rail .sl-sum-link::after { content: ""; position: absolute; top: -12px; right: 0; bottom: -12px; left: 0; }
  html.pl-v2 #ov-lead-rail .ov-client-hero::after { content: ""; position: absolute; top: -14px; right: 0; bottom: -14px; left: 0; }
  html.pl-v2 #ov-lead-rail .sl-title { min-height: var(--tap-min); }
}

/* ── #12 The page behind an open lead (Critiquito #12, board review W4): it keeps its layout and is only
   dimmed, with the ONE scrim token (polish.css --scrim). The broken backdrop Critiquito photographed was the
   viewport-switch glitch, fixed where the layout is decided (nav.js: the page is rebuilt when a window
   crosses 768px, now also after a touch emulator is switched off). On a laptop the lead fills the space
   beside the sidebar, so there is nothing behind it to dim. ── */
html.pl-v2 .overlay { background: var(--scrim, rgba(0,0,0,.40)); }
html.pl-v2.oi-desk-drawer .overlay { background: transparent !important; }

/* ── #19 Temperature is a badge, not a stage (Critiquito #19): Warm navy, Hot ember (Lore's palette, AA on their wash:
   #1f3d65 on #eef2f7 9.8:1, #945a2b on #fbf1e8 5.0:1) ── */
html.pl-v2 .pl-temp { display: inline-flex; align-items: center; margin-top: 4px; padding: 1px 8px; border-radius: 10px; font-size: var(--fs-sm, 12px); font-weight: 600; line-height: 18px; white-space: nowrap; }
html.pl-v2 .pl-temp-warm { background: #eef2f7; color: #1f3d65; border: 1px solid #c9d3e0; }
html.pl-v2 .pl-temp-hot { background: #fbf1e8; color: #945a2b; border: 1px solid #e8cdb4; }

/* ── #22 Lore suggests one person + a backup, in one sentence (public/lore-assign.js) ── */
html.pl-v2 .pl-assign-suggest { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: var(--fs-md, 13px); line-height: 1.4; color: var(--text, #181715); }
html.pl-v2 .pl-assign-how { margin-top: 6px; font-size: var(--fs-sm, 12px); color: var(--pl-text-secondary); }
html.pl-v2 .pl-assign-backup { margin-top: 4px; font-size: var(--fs-md, 13px); color: var(--pl-text-secondary); }

/* ── #26 Company view (Critiquito #26) ──
   The stage badge is a neutral chip: near-black text on a light neutral (#403e3a on #f1f1ee = 9.6:1), the stage's
   own colour (#5's role colour, via --pl-dot) as a small dot. So "Trial" (the Lore workspace's name for LEAD HOT)
   is no longer a red alarm. One contact's open leads list under one entry (.pl-sibs), each a 44px button. */
html.pl-v2 .pl-stage-badge { display: inline-flex; align-items: center; background: #f1f1ee !important; color: #403e3a; border: 1px solid #e0dfda; text-transform: none; letter-spacing: 0; font-size: var(--fs-sm, 12px) !important; font-weight: 600; }
html.pl-v2 .pl-stage-badge::before { content: ''; display: inline-block; vertical-align: middle; margin: 0 5px 1px 0; width: 7px; height: 7px; border-radius: 50%; background: var(--pl-dot, #66635d); flex: 0 0 auto; }
html.pl-v2 .pl-group-n { font-weight: 600; color: var(--pl-text-secondary); }
html.pl-v2 .pl-sibs { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
html.pl-v2 .pl-sib { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--tap-min); width: 100%; padding: 0 10px; border: 1px solid #e0dfda; border-radius: 8px; background: #ffffff; color: var(--text, #181715); font-size: var(--fs-md, 13px); text-align: left; cursor: pointer; }
html.pl-v2 .pl-sib:hover { background: #f7f7f5; }
html.pl-v2 .pl-sib:focus-visible { outline: 2px solid #1f3d65; outline-offset: 2px; }
html.pl-v2 .pl-sib-trip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* #16(b) v3: the add tab's word shows at every width ("+ New"). */
html.pl-v2 .pl-tb-lbl.pl-tb-lbl-on { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
html.pl-v2 .ph-btn.ph-plus { gap: 4px; padding: 0 10px; }
html.pl-v2 .ph-btn.ph-plus svg { flex: none; }

/* #16(a) v3: on a phone the directory line (Companies · Products · Contacts · Documents) moves into More, so the first
   lead sits about 40px higher. The buttons stay in the page (More presses them); only this line is hidden. */
@media (max-width: 767px) {
  html.pl-v2 .tb-row1 .tb-dir-btn,
  html.pl-v2 .tb-row1 .tb-divider { display: none !important; }
}
/* Wording v3: the open lead's money labels read in sentence case ("House commission"). */
html.pl-v2 .ov-fin-label { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm, 12px); }

/* B2(a) v3: the board's chevrons live in 52px gutters outside the columns (never on a card). */
@media (min-width: 768px) {
  html.pl-v2 .board-wrap.pl-gutters { padding-left: 52px; padding-right: 52px; }
  html.pl-v2 .board-wrap.pl-gutters .board-scroll-left { left: 4px; }
  html.pl-v2 .board-wrap.pl-gutters .board-scroll-right { right: 4px; }
}
/* #38 v3: an empty stage's strip reads at full strength (#66635d, about 6:1 on white), whole words, no mid-word break. */
html.pl-v2 .column.pl-empty-strip { opacity: 1; }
html.pl-v2 .column.pl-empty-strip .col-stage-label { color: #66635d !important; overflow-wrap: normal; word-break: normal; hyphens: manual; }
html.pl-v2 .column.pl-empty-strip .col-count { color: #66635d; }

/* #9 v3: on the pipeline the Ask Lore button folds to its flame-only circle once the page (or the board, or a column)
   scrolls — the word stays its aria-label ("Ask Lore", lore-dock.js). */
html.pl-v2.pl-scrolled .oi-lore-fab .lb { max-width: 0 !important; padding: 0 !important; }
/* NO RIGHT LANE ON A PHONE (28 Nov 2026, good-app batch 1, Cory "yes batch 1"). Phone lists and the open lead used to keep
   a 60px lane down the right for the flame (AVPL3-4, P3-9). The flame lives beside the menu pill at the foot now, so the
   lane was a dead strip: rows run to 16px from the edge like any phone app's list, and the page reserves room at the
   BOTTOM instead (--oi-fab-room under the last row, lore-dock.js), so nothing ends up under the flame at the end of a page.
   The open lead's content sits on 16px side edges (it started 6px from the left). */
@media (max-width: 767px) {
  html.pl-v2 #overlay-card.oi-phone-sheet .ov-lead-rail { margin-left: 0 !important; margin-right: 0 !important; padding-left: var(--space-4, 16px) !important; padding-right: var(--space-4, 16px) !important; box-sizing: border-box; }
  html.pl-v2 #overlay-card.oi-phone-sheet #ov-advisor-tasks-row-restored { padding-left: 0 !important; padding-right: 0 !important; }
  html.pl-v2 #overlay-card.oi-phone-sheet .ov-body .ov-section,
  html.pl-v2 #overlay-card.oi-phone-sheet .ov-body .ov-roster { padding-left: var(--space-4, 16px); padding-right: var(--space-4, 16px); }
  html.pl-v2 #pipeline-list { padding-bottom: var(--oi-fab-room, 76px); }
}

/* #10 v3: the call / text row starts 12px lower on a phone card, so the select circle's 44px target and the call
   icon's never overlap (the harness checks every pair of targets on a card). */
@media (max-width: 767px) {
  html.pl-v2 .card .card-contact { margin-top: 20px !important; }
}

/* #20 / #11(b) v3: the simpler lead's stored title folds behind a 44px "Edit title"; opened, the box is 44px tall with
   8px below it, so it never sits on the next row. */
html.pl-v2 .pl-title-fold-btn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min, 44px); padding: 0 12px; margin-left: -12px; border: none; border-radius: var(--radius, 8px); background: transparent; color: var(--pl-text-secondary, #403e3a); font: inherit; font-size: var(--fs-md, 13px); font-weight: 600; cursor: pointer; }
html.pl-v2 .pl-title-fold-btn:hover { background: var(--bg-hover, #f1f1ee); }
html.pl-v2 .pl-title-fold-btn[hidden], html.pl-v2 .pl-title-fold-inp[hidden] { display: none; }
html.pl-v2 .pl-title-fold-inp { min-height: var(--tap-min, 44px); margin-bottom: 8px; box-sizing: border-box; }

/* #7 v3: on a board card "Next: …" gets its own line (it was cut to "Next: Mak…" after Came from). */
html.pl-v2 .card .pl-leadline { white-space: normal; }
html.pl-v2 .card .pl-leadline .pl-dot { display: none; }
html.pl-v2 .card .pl-leadline .pl-came,
html.pl-v2 .card .pl-leadline .pl-next { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* NB2 v3: the follow-up chip carries the full due-date words ("Follow-up: Due Fri, Nov 20 · in 4 days"); on a card it
   wraps rather than being cut off. */
/* P3-3: the follow-up chip's wrap now lives in the shared .card-followup rule (pipeline.html), not here. */

/* P3-12 (16 Nov 2026): a column cut at the board's edge fades out over 48px rather than ending mid-word (set by
   _plBoardFit in pipeline.html only when no column edge could be landed on). */
html.pl-v2 .board.pl-fade-l { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px); mask-image: linear-gradient(to right, transparent 0, #000 56px); }
html.pl-v2 .board.pl-fade-r { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 56px); mask-image: linear-gradient(to left, transparent 0, #000 56px); }
html.pl-v2 .board.pl-fade-l.pl-fade-r { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%); }

/* P4-1 (v5, 17 Nov 2026): "+ New" takes THE primary button's colours (polish.css); inside the desktop tab strip it keeps
   the strip's height rather than the primary's 44px (on a phone the strip's buttons are 44px anyway). */
@media (min-width: 768px) {
  html.pl-v2 .toolbar-filters .phase-toggle .ph-btn.ph-plus { min-height: 0; padding: 0 12px; margin: 0 3px 0 4px; }
}

/* ── THE DARK THEME (v5, 17 Nov 2026; Critiquito pipeline v4 P4-2 / P4-3 / P4-4) ──
   P4-2: the stage chips, the phone's List / More buttons follow the theme — the dark raised surface, the theme's text,
   a border edge — instead of white pills. The selected chip / view stays Lore green (#2b7230, white text).
   P4-3: a column heading takes its stage colour's dark-theme twin (--st-dk, lib/brand-theme.js roleColors().dark,
   ≥4.5:1 on the dark surfaces), so "Hot" is #c97a3a, not #945a2b (~3.1:1).
   P4-4: the empty-stage line reads in --text3, not the light theme's #6a6762 (~3.3:1 on the dark page). */
html.pl-v2:not([data-theme="light"]) .lore-stage-chip:not(.is-active) { background: var(--surface2, #18181f); border-color: var(--border-2, #3f4147); color: var(--text, #e6edf3); }
html.pl-v2:not([data-theme="light"]) .lore-stage-chip:not(.is-active) .lore-stage-chip-count { color: var(--text3, #97948e); }
html.pl-v2:not([data-theme="light"]) .lore-stage-chip:focus-visible { outline-color: #9ec5ff; }
@media (max-width: 767px) {
  html.pl-v2:not([data-theme="light"]) .toolbar-filters .view-toggle-btn:not(.active),
  html.pl-v2:not([data-theme="light"]) .toolbar-filters .pl-tb-more { background: var(--surface2, #18181f); border-color: var(--border-2, #3f4147); color: var(--text, #e6edf3); }
  html.pl-v2:not([data-theme="light"]) .toolbar-filters .view-toggle-btn:focus-visible,
  html.pl-v2:not([data-theme="light"]) .toolbar-filters .pl-tb-more:focus-visible { outline-color: #9ec5ff; }
}
html.pl-v2:not([data-theme="light"]) .col-stage-label[style*="--st-dk"] { color: var(--st-dk) !important; }
html.pl-v2:not([data-theme="light"]) .column.pl-empty-strip .col-count { color: var(--text3, #97948e); }
html.pl-v2:not([data-theme="light"]) .pl-sl-empty { color: var(--text3, #97948e); }
/* P5-6 (v6, 17 Nov 2026; Critiquito pipeline v5): the last light pills on the dark theme — the "Test lead" tag and the
   board's scroll chevron (a white circle) — take the same dark raised surface, the theme's text and a border edge. The
   open lead's stage badge is the same #f1f1ee neutral chip, so it follows too. The chevron keeps its navy family (#9ec5ff). */
html.pl-v2:not([data-theme="light"]) .pl-test-tag,
html.pl-v2:not([data-theme="light"]) .pl-stage-badge { background: var(--surface2, #18181f) !important; border-color: var(--border-2, #3f4147); color: var(--text, #e6edf3); }
html.pl-v2:not([data-theme="light"]) .board-wrap .board-scroll-btn.pl-on { background: var(--surface2, #18181f); border-color: var(--border-2, #3f4147); color: #9ec5ff; }
html.pl-v2:not([data-theme="light"]) .board-wrap .board-scroll-btn.pl-on:hover { background: var(--bg-hover, #2a2b28); }
html.pl-v2:not([data-theme="light"]) .board-wrap .board-scroll-btn.pl-on:focus-visible { outline-color: #9ec5ff; }

/* P4-6 (v5, 17 Nov 2026): on a phone the open lead's contact rows (Quick comms, .qc-2col) keep the whole name — the
   flame's 60px lane left it "QA Te…". The name takes its own line (wrapping if it must); the email / text / call /
   Invite buttons sit on the line under it, starting under the name. Desktop rows are unchanged (one line). */
@media (max-width: 767px) {
  html.pl-v2 .qc-2col { flex-wrap: wrap; row-gap: 2px; }
  html.pl-v2 .qc-2col > .qc-name { flex: 1 1 calc(100% - 32px); white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  html.pl-v2 .qc-2col > .qc-icon-row { margin-left: 21px; justify-content: flex-start !important; }
}

/* P4-9 (v5, 17 Nov 2026; Critiquito pipeline v4): a phone turned sideways (landscape, under 500px tall — about 355px
   of page once the layout is pinned) showed no board: Your Day and Needs attention filled the height and the tabs sat
   under the bottom bar. There it is laid out as the upright phone already is — no Overview strip (Cory 7/8: "Phones
   don't need the Overview strip"; the Dashboard still has it), no Follow-up / year dropdowns (the upright phone drops
   them too, Cory 7/9) — and the two toolbar lines become one (Leads · Bookings · Inventory · + New, then List · Board ·
   More), so the tabs sit above the bottom bar and the board starts on the first screen. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {
  html.pl-v2:not(.pl-dash) #overview-bar { display: none !important; }
  html.pl-v2 .toolbar-filters { flex-wrap: nowrap; row-gap: 0; }
  html.pl-v2 .toolbar-filters .tf-left { flex: 0 1 auto; }
  html.pl-v2 .toolbar-filters .tf-right { flex: 1 1 auto; min-width: 0; }
  html.pl-v2 .toolbar-filters .filter-select,
  html.pl-v2 .toolbar-filters select { display: none !important; }
}

/* P5-7 (v6, 17 Nov 2026; Critiquito pipeline v5): sideways, P4-9 still showed no whole card or row — the board ended at
   the column heading, the list at its month line. Nothing is hidden (folding the count cards is Cory's question); the
   space comes from three things, sideways only:
   1. the search and the toolbar share ONE line: List / Board / More show their icons (44px squares) and keep their
      words as their aria-labels (_plPhoneToolbar); "+ New" keeps its word;
   2. the column heading is one compact line (name, count and the Assign chip side by side);
   3. the list's count cards take the upright phone's slim strip (Cory 7/9, pipeline.html's ≤520px rules: small type,
      no trend line), with the number beside its label so the strip is one line. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {
  html.pl-v2:not(.pl-dash) .page-toolbar { flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 8px; padding-top: 6px; padding-bottom: 6px; }
  html.pl-v2:not(.pl-dash) .page-toolbar .tb-row1 { flex: 1 1 0; min-width: 140px; width: auto !important; }
  html.pl-v2:not(.pl-dash) .page-toolbar #oi-omnibox-host { max-width: none !important; }
  html.pl-v2:not(.pl-dash) .page-toolbar .toolbar-filters { flex: 0 0 auto; margin: 0; }
  html.pl-v2 .toolbar-filters .tf-right { flex: 0 0 auto; }
  html.pl-v2 .toolbar-filters .view-toggle-btn .pl-tb-lbl,
  html.pl-v2 .toolbar-filters .pl-tb-more .pl-tb-lbl { display: none; }
  html.pl-v2 .toolbar-filters .view-toggle-btn,
  html.pl-v2 .toolbar-filters .pl-tb-more { min-width: 44px; width: 44px; padding: 0; justify-content: center; }
  html.pl-v2 .board .column:not(.pl-strip):not(.col-collapsed) .col-header { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; padding: 6px 12px; }
  html.pl-v2 .board .column:not(.pl-strip):not(.col-collapsed) .col-header .col-title { flex: 1 1 auto; min-width: 0; }
  html.pl-v2 .board .column:not(.pl-strip):not(.col-collapsed) .col-header .col-meta:empty { display: none; }
  html.pl-v2 .board .column:not(.pl-strip):not(.col-collapsed) .col-header .ua-queue-toggle { margin-top: 0; flex: none; }
  html.pl-v2 .intake-stats-row { flex-wrap: nowrap !important; gap: 4px !important; padding: 6px 0 8px !important; }
  html.pl-v2 .intake-stat-pill { min-width: 0 !important; padding: 4px 2px !important; border-radius: 8px !important; display: flex; align-items: baseline; justify-content: center; gap: 5px; }
  html.pl-v2 .intake-stat-pill .isp-n { font-size: var(--fs-base, 14px) !important; }
  html.pl-v2 .intake-stat-pill .isp-l { font-size: var(--fs-sm, 12px) !important; letter-spacing: .02em !important; white-space: nowrap; }
  html.pl-v2 .intake-stat-pill .isp-sub { display: none !important; }
}
/* A folded stage's choice under the phone's stage chips (20 Nov 2026; the control is the shared .oi-seg). */
html.pl-v2 .pl-sl-fold { padding: 4px 16px 0; }
html.pl-v2 .pl-sl-fold .pl-fold-row { margin-top: 0; }
html.pl-v2 .pl-srow-name .lore-fold-tag, html.pl-v2 .pl-srow-name .pl-temp { margin-top: 0; vertical-align: 1px; }
/* the Snoozed / Handled tag on a phone row's name line (26 Nov 2026): it stays whole, the name gives way */
html.pl-v2 .pl-srow-name .card-mark-chip { flex: none; margin-left: var(--space-2, 8px); min-height: 24px; vertical-align: 1px; }
/* A column header with a folded choice gives the choice its own line (the header is one row on landscape phones). */
html.pl-v2 .board .column .col-header.has-fold { flex-wrap: wrap; }
html.pl-v2 .pl-sl-fold .pl-fold-note { display: none; } /* the meta line under it already says "31 leads in Warm" */
/* A long name truncates; its tags (Test lead, Warm) always show beside it. */
html.pl-v2 .pl-srow-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
html.pl-v2 .pl-srow-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.pl-v2 .pl-srow-name > :not(.pl-srow-nm) { flex: none; }
