/* lore-phone-board.css — the look of public/lore-phone-board.js (27 Nov 2026, rebuilt 28 Nov 2026): on a phone the board's lanes are in
   the page, and the page is the one scroller. The board still pages sideways between lanes. A computer never gets .pl-flow.
   The board's height is its content (auto): the lane you are on shows all its cards, every other lane only its first 12 (all a peek or a
   swipe ever shows of it), so the height is the lane you are on and the phone lays out that lane, not every card of every lane (28 Nov: with
   all 1,800 cards of a company board laid out, Cory's iPhone stalled and went blank). Nothing here changes while the page scrolls. */
@media (max-width: 767px) {
  .board.pl-flow { height: auto !important; max-height: none !important; overflow-y: hidden; align-items: flex-start; overscroll-behavior-y: auto; background-color: var(--bg); }
  .board.pl-flow > .column { max-height: none; height: auto; }
  /* ONE LANE PER SCREEN (28 Nov 2026, Cory: each stage takes the full width, no peek of the next one): a lane is the board's whole width
     (its 12px sides and the 12px gap put the next lane exactly at the screen's edge), and a swipe stops on the next lane, never two —
     the way Trello's and Linear's phone boards page. The doubled class wins over every lane width the looks set (strips included). */
  .board.pl-flow.pl-flow { scroll-snap-type: x mandatory; scroll-padding-left: 12px; padding-left: 12px; padding-right: 12px; column-gap: 12px; gap: 12px; }
  .board.pl-flow.pl-flow > .column { flex: 0 0 100% !important; width: 100% !important; min-width: 100% !important; max-width: 100% !important; scroll-snap-align: start; scroll-snap-stop: always; }
  /* a lane folded away (Not now, Lost…) is a whole lane too: its name across the top and a button to show its leads */
  .board.pl-flow.pl-flow > .column.col-collapsed .col-header { height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: var(--space-2, 8px) var(--space-3, 12px); }
  .board.pl-flow.pl-flow > .column.col-collapsed .col-title { flex: 1 1 auto; flex-direction: row; align-items: center; justify-content: space-between; height: auto; gap: var(--space-2, 8px); }
  .board.pl-flow.pl-flow > .column.col-collapsed .col-stage-label { writing-mode: horizontal-tb; padding: 0; }
  .board.pl-flow.pl-flow > .column.col-collapsed .col-actions { flex-direction: row; }
  .board.pl-flow.pl-flow > .column.col-collapsed .col-cards { display: block; }
  .board.pl-flow .pl-lane-folded { padding: var(--space-4, 16px) var(--space-3, 12px); text-align: center; }
  .board.pl-flow .pl-lane-folded .pt-btn { min-height: var(--tap, 44px); }
  .board.pl-flow > .column > .col-cards { overflow: visible; flex: none; height: auto; max-height: none; }
  /* the room under the last card is the bottom bar's FULL height, never its live one: the old look slides its bar away while a page scrolls
     down (--oi-bbar-h goes to 0, nav-drawer.js), and a room that followed it changed the page's length mid-swipe (28 Nov 2026: 55px) */
  .board.pl-flow > .column > .col-cards { padding-bottom: calc(8px + var(--oi-fab-room, 0px) + var(--oi-bbar-full, var(--oi-bbar-h, 0px))); }
  .board.pl-flow > .column:not(.pl-on) > .col-cards > :nth-child(n+14) { display: none; }
  /* every card is drawn on the phone board: a card skipped by content-visibility shows as an empty white box on an iPhone, and changes the
     page's length as it is drawn (pipeline.html keeps skipping cards everywhere else) */
  .board.pl-flow .card { content-visibility: visible; contain-intrinsic-size: none; }
  /* the stage chips scroll away with the page (Cory: "the whole screen up") and come back at the top */
  html.pl-phone-flow.pl-phone-flow #pl-stagebar { position: static; }   /* the class twice: wins over lore-pipeline-v2.css (loaded later, sticky) */
}
/* the bars overlay the page while they hide on scroll (lore-hide-on-scroll.js, mode 'flow'): a spacer reserves their space at the page's start */
@media (max-width: 768px) and (pointer: coarse) {
  html[data-hos="flow"] #oi-content::before { content: ""; display: block; height: var(--hos-top, 0px); }
}
/* the page's bottom space is the FULL pill's on the phone board: the pill shrinks while a page scrolls with the bars kept on, and a bottom
   padding that shrank with it changed the page's length mid-swipe (the rest of Lore keeps look-2-nav.css's rule) */
@media (max-width: 767px) {
  html.look-2.pl-phone-flow.lk-pill-mini { --lk-pill-space: calc(60px + var(--lk-pill-gap, 10px) * 2 + env(safe-area-inset-bottom, 0px)); }
}
/* THE OLD LOOK's bottom bar (nav-drawer.js) slides away while a page scrolls down by shrinking the page's frame, so the page's scroll range
   changed by the bar's height mid-swipe (28 Nov 2026: 55px, a pull-back at the end of a lane). On the phone board it stays put: the board
   is one long page, and a bar that comes and goes under the thumb is not worth a page that changes length. The new look's bars overlay
   the page instead (lore-hide-on-scroll.js) and are not touched. */
@media (max-width: 767px) {
  html.pl-phone-flow.oi-bbar.oi-bbar-hid { --oi-bbar-h: var(--oi-bbar-full); }
  html.pl-phone-flow.oi-bbar-hid .oi-bbar { margin-bottom: 0 !important; opacity: 1 !important; pointer-events: auto !important; }
}
/* a lane with no switch and no counts row keeps no empty control row on the phone board (28 Nov 2026: a 50px blank band under "close
   rate"); a computer keeps the fixed row so every lane's first card lines up */
@media (max-width: 767px) {
  .board.pl-flow .col-header .col-ctl:empty { display: none !important; }
}
/* THE LANE'S HEADER ON A PHONE (28 Nov 2026, Cory: the lane's choice looked unlike All · Selling · Booked, square and cut off at the
   right; "Agreement & payment" wrapped beside its count). The choice is the same shared .oi-seg as the tabs above, at the tabs' phone size:
   rounded, 44px, the picked one raised. It fills the lane: equal parts when they fit, each as wide as its words when they do not, and then
   the row scrolls inside itself (never the page). The lane's name is one line, cut with an ellipsis, its count after it.
   The same rules dress the lane's header pinned under the chips (.pl-pin-lane, lore-phone-board.js). */
@media (max-width: 767px) {
  .board.pl-flow .col-header .col-ctl { height: auto !important; overflow: visible !important; }
  .board.pl-flow .col-header .pl-fold-row, .pl-pin-lane .pl-fold-row { display: block; width: 100%; margin: 0; }
  .board.pl-flow .pl-fold-row .oi-seg, .pl-pin-lane .pl-fold-row .oi-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .board.pl-flow .pl-fold-row .oi-seg-btn, .pl-pin-lane .pl-fold-row .oi-seg-btn { min-height: var(--tap, 44px); padding: 0 var(--space-3, 12px); font-size: var(--fs-md, 13px); font-weight: 600; gap: var(--space-1, 4px); }
  .board.pl-flow .pl-fold-row .oi-seg-btn.active, .pl-pin-lane .pl-fold-row .oi-seg-btn.active { font-weight: 700; }
  .board.pl-flow .pl-fold-row .oi-seg-count, .pl-pin-lane .pl-fold-row .oi-seg-count { font-size: var(--fs-xs, 11px); }
  .board.pl-flow .col-header .col-title, .pl-pin-lane .col-title { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-2, 8px); min-width: 0; }
  .board.pl-flow .col-header .col-stage-label, .pl-pin-lane .col-stage-label { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .board.pl-flow .col-header .col-actions, .pl-pin-lane .col-actions { flex: none; }
}
/* INSTAGRAM'S HEADER (28 Nov 2026): reading down a lane, the bars slide away; scroll back up even a little and the stage chips come back
   pinned under the top bar, with the lane's name and its choice under them once the lane's own header has gone by. Only the bars' one
   class (oi-hos-off, lore-hide-on-scroll.js) and one class for "past the lane's header" (pl-lane-past, set when the line is crossed) move
   them: nothing is written while the page scrolls. The new look only; the old look's chips stay in the page. */
@media (max-width: 768px) and (pointer: coarse) {
  html.pl-phone-flow[data-hos="flow"] #pl-stagebar { position: sticky !important; top: var(--hos-top, 0px); z-index: 6; background: var(--bg); transition: transform var(--t-base, 200ms) var(--ease, ease); }
  html.pl-phone-flow[data-hos="flow"].oi-hos-off #pl-stagebar { transform: translateY(calc(-100% - var(--hos-top, 0px) - 240px));   /* 240px: the pinned lane header hanging under it goes too */ }
  .pl-pin-lane { display: none; }
  html.pl-phone-flow[data-hos="flow"].pl-lane-past .pl-pin-lane { display: block; position: absolute; top: 100%; left: 0; right: 0; padding: var(--space-2, 8px) var(--space-3, 12px); background: var(--bg); border-bottom: 1px solid var(--border); }
  html.pl-phone-flow[data-hos="flow"].pl-lane-past .pl-pin-lane .col-title { margin-bottom: var(--space-2, 8px); }
}
@media (prefers-reduced-motion: reduce) { html.pl-phone-flow #pl-stagebar { transition: none !important; } }
