/* ================= Team Board kanban =================
   Lane canvas, lane, header and cards (the base layout; alt-team-kanban-compact.css overrides it, and the board is always compact). CSS/alt/alt-team.css keeps the board chrome.
   Markup is JS/alt/alt-team-board.js's; every selector is `a-tb-`; shared primitives come from
   alt-tasks.css/alt-shell.css. Compact: CSS/alt/alt-team-kanban-compact.css. List rules near the foot are not the kanban. */

/* ================= 4 · the board =================
   `.a-input.sm` and `.a-av.sm` live in CSS/alt/alt-components.css, not here, since other pages
   use them without this sheet. */

/* The centre column is a scroll container: `.a-centre` is a flex column with `overflow:hidden`,
   and `min-height:0` lets this child be shorter than its content so only the board scrolls. */
.alt-app #altTeamView{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
/* ---------- the board frame ----------
   `.a-tb-scroll` is shared by all four views, so the frame is conditional. It is an opt-out,
   `:not(:has(.a-tb-lanes))`, because an engine without `:has()` drops an invalid rule whole;
   inverted, the unsupported case only keeps the frame on list views. The plain declaration ahead of color-mix() is the fallback. */
.alt-app .a-tb-scroll{
  flex:1 1 auto; min-height:0; min-width:0; overflow-y:auto; overflow-x:hidden;
  display:flex; flex-direction:column; gap:var(--a-3);
  background:var(--a-bg);
  background:color-mix(in srgb, var(--a-bg) 55%, var(--a-panel) 45%);
  border:1px solid var(--a-line);
  /* Larger than the lane's radius; the two are not concentric. */
  border-radius:var(--a-r-lg);
  /* Inset on all sides inside the frame; the opt-out below restores bottom-only padding. */
  padding:var(--a-3);
  /* Holds the scrollbar's space so a scrollbar appearing cannot change the width Fit plans from. */
  scrollbar-gutter:stable;
  /* Adds to `.a-centre`'s gap so the frame sits 16px below the toolbar. */
  margin-top:var(--a-1);
}
/* ---------- list views drop the frame ----------
   `.a-tb-lanes` is built only by altTBLanesRow() (board view). Owned/Completed/Archived render
   `.a-tb-list` and the empty states `.a-empty`, so they shed the frame. To drop `:has()`, have
   altTBRenderView() add an `a-tb-board` class and use `:not(.a-tb-board)`. */
.alt-app .a-tb-scroll:not(:has(.a-tb-lanes)){
  background:none; border:0; border-radius:0;
  padding:0 0 var(--a-4); margin-top:0;
}
/* Fold-all toggle slot. It is redrawn each repaint and often empty, so `display:contents` keeps
   an empty slot from leaving a box or a stray gap; it has no semantics to lose. */
.alt-app .a-tb-fold-slot{ display:contents; }

/* ---------- a topic group ---------- */
.alt-app .a-tb-topic{ min-width:0; display:flex; flex-direction:column; gap:var(--a-2); }
.alt-app .a-tb-topic-h{ display:flex; align-items:center; gap:var(--a-2); min-width:0; }
/* `.a-group-h` is full-width on the task list; here it shares a line with the lane toggle. */
.alt-app .a-tb-topic-h .a-group-h{ flex:1 1 auto; width:auto; min-width:0; }
/* Lane controls are secondary: trailing edge, quiet until the group is hovered. */
.alt-app .a-tb-topic-acts{ margin-left:auto; display:inline-flex; gap:var(--a-1); flex:0 0 auto; }
.alt-app .a-tb-topic-acts .a-btn{ opacity:.7; }
.alt-app .a-tb-topic:hover .a-tb-topic-acts .a-btn,
.alt-app .a-tb-topic-acts .a-btn:focus-visible{ opacity:1; }
/* The lit fold-all toggle also reports state (every lane in the band is open), so it stays at
   full opacity; `aria-pressed` carries the same state for screen readers. */
.alt-app .a-tb-topic-acts .a-btn.a-fold-all[aria-pressed="true"]{ opacity:1; }
/* The retired-topics header is the same disclosure as a group's, one level out. */
.alt-app .a-tb-retired-h{
  display:flex; align-items:center; gap:var(--a-2); align-self:flex-start;
  padding:5px 9px; border:1px dashed var(--a-line); border-radius:var(--a-r-sm);
  background:transparent; color:var(--a-dim); cursor:pointer;
  font:600 var(--a-fs-ctl-sm)/var(--a-lh-tight) var(--a-body);
}
.alt-app .a-tb-retired-h:hover{ color:var(--a-text); border-color:var(--a-line-strong); }
.alt-app .a-tb-retired-h:focus-visible{ outline:2px solid var(--a-ring); outline-offset:2px; }
.alt-app .a-tb-retired-h .cv{ display:flex; }
.alt-app .a-tb-retired-h .cv > svg{ width:14px; height:14px; }

/* ---------- the row of lanes ----------
   Horizontal scroll; `overscroll-behavior-x:contain` stops a sideways flick navigating back.
   `position:relative` is required: otherwise an absolute `.a-sr` descendant (a completion lane's label)
   takes `main.a-page` as containing block, outside the scroller, and widens the whole page. */
.alt-app .a-tb-lanes{
  display:flex; align-items:flex-start; gap:var(--a-2); min-width:0; position:relative;
  overflow-x:auto; overscroll-behavior-x:contain; padding-bottom:var(--a-1);
}
/* `--a-tb-lane-w`/`--a-tb-card-gap` are declared on the lane so overrides at equal or higher
   specificity win the same cascade, and `.a-tb-cards` (a descendant) inherits the card gap. */
.alt-app .a-tb-lane{
  /* The base layout still scrolls sideways at this width; the compact sheet is what fits a whole board. */
  --a-tb-lane-w:220px; --a-tb-card-gap:6px;
  /* The horizontal inset is read by three rules that must agree (this padding, the `.wide`
     width formula, `.a-tb-lane-hr`'s negative margin). Any sheet narrowing the lane must set
     this variable, never `padding` directly, or the mismatch fails silently. */
  --a-tb-lane-pad:var(--a-2);
  /* One width formula. `--a-tb-cols` is the lane's card columns (`.wide` sets 2; Fit writes 1-3).
     `--a-tb-card` is one card's width: the density's own at rest, the planner's from 1024px up. */
  --a-tb-cols:1;
  --a-tb-card:calc(var(--a-tb-lane-w) - 2 * var(--a-tb-lane-pad) - 2px);
  flex:0 0 auto;
  width:calc(var(--a-tb-cols) * var(--a-tb-card) + (var(--a-tb-cols) - 1) * var(--a-tb-card-gap)
    + 2 * var(--a-tb-lane-pad) + 2px);
  min-width:0; display:flex; flex-direction:column;
  gap:var(--a-2);
  /* No top padding: `.a-tb-lane-hr` is a full-width band that reaches past the horizontal inset
     with a negative margin of the same variable. */
  padding:0 var(--a-tb-lane-pad) var(--a-tb-lane-pad); border-radius:var(--a-r);
  background:var(--a-panel); border:1px solid var(--a-line-soft);
}
/* A wide lane is two columns. Two cards at the default card width come to 428px:
     lane = cols * card + (cols - 1) * card-gap + 2 * lane-pad + 2px (border) */
.alt-app .a-tb-lane.wide{ --a-tb-cols:2; }
/* Fit: `--a-tb-card-w` is written on `.a-tb-scroll` by the board's planner. Below 1024px it is
   ignored, so the tablet and phone widths stay as their own rules set them. */
@media (min-width:1024px){
  .alt-app .a-tb-lane{ --a-tb-card:var(--a-tb-card-w, calc(var(--a-tb-lane-w) - 2 * var(--a-tb-lane-pad) - 2px)); }
}
/* A collapsed lane is a readable strip: the name turns vertical, and the strip stays wide enough
   to click. */
.alt-app .a-tb-lane.collapsed{ width:38px; padding:var(--a-2) 4px; }
.alt-app .a-tb-lane.collapsed .a-tb-lane-h{
  flex-direction:column; height:auto; gap:6px; padding:2px 0; justify-content:flex-start;
}
.alt-app .a-tb-lane.collapsed .a-tb-lane-h .nm{
  writing-mode:vertical-rl; text-orientation:mixed; max-height:220px;
  overflow:hidden; text-overflow:ellipsis;
}
/* Do not hide `.sr-only` spans here: they are already off screen and screen-reader users still
   need the words. */
.alt-app .a-tb-lane.collapsed .a-tb-cards,
.alt-app .a-tb-lane.collapsed .a-tb-add{ display:none; }
/* altTBLaneColumn() never builds this control when collapsed; kept as its own rule because
   alt-team-board-lanes.test.js §14 asserts the selector list above verbatim. */
.alt-app .a-tb-lane.collapsed .a-tb-lane-more{ display:none; }
/* A folded lane keeps its `wide` class and `--a-tb-cols`; it must still be a 38px strip. */
.alt-app .a-tb-lane.collapsed.wide{ width:38px; }
.alt-app .a-tb-lane.collapsed .a-tb-lane-w{ display:none; }

/* Header row. `.a-tb-lane-h` is a button and the width toggle cannot nest inside it, so this
   wrapper is the lane's first child. */
.alt-app .a-tb-lane-hr{
  display:flex; align-items:center; gap:4px; min-width:0;
  /* `width:auto`: 100% plus the negative margin would overflow. */
  margin:0 calc(-1 * var(--a-tb-lane-pad)); width:auto;
  padding:0 var(--a-2);
  /* DS-49: no fill; the lane keeps its status line (below), the header is the same row as every group header. */
  background:none;
  border-bottom:1px solid var(--a-line-soft);
  /* Outer radius minus the 1px border; concentric with the lane. */
  border-radius:calc(var(--a-r) - 1px) calc(var(--a-r) - 1px) 0 0;
}
/* ---------- lane header colour ----------
   Only two treatments (first, completion). Hooks are not names: `data-lane-completes` is `laneCompletesTasks(lane)` (`is_completion_lane`),
   `data-lane-first` is rendered position; altTBLanesRow() skips a completion lane when picking it.
   Do not use `board_swimlanes`' default-lane column (dead). */

/* Contrast: the lane count and chevron are 11px text, so the 4.5:1 floor applies (measured in
   both themes). The ordinary header clears it by only 0.11, so do not design a band fill near
   the floor without measuring it. */
/* First lane: neutral rule only, no fill (a fill cost the count too much contrast). It is
   `box-shadow:inset` rather than a border so the band is not a pixel taller than its neighbours. */
.alt-app .a-tb-lane[data-lane-first] .a-tb-lane-hr{
  box-shadow:inset 0 -2px 0 var(--a-line-strong);
}
/* Completion lane: green, since it is the only lane that finishes work. Name, count and chevron
   all move to `--a-green` so it reads as the header's own colour. */
.alt-app .a-tb-lane[data-lane-completes] .a-tb-lane-hr{
  box-shadow:inset 0 -2px 0 var(--a-green);
}
.alt-app .a-tb-lane[data-lane-completes] .a-tb-lane-h{ color:var(--a-green); }
/* The count is not quieted by opacity: `opacity:.72` fails contrast on green (3.11 vs 5.00
   without it), and no other colour can recede. It recedes structurally instead (weight 600 vs
   the name's 700, no letter-spacing, `margin-left:auto`). */
.alt-app .a-tb-lane[data-lane-completes] .a-tb-lane-h .cv,
.alt-app .a-tb-lane[data-lane-completes] .a-tb-lane-h .n{ color:var(--a-green); }

/* A folded lane is one strip. This rule must stay after the two treatments above (equal
   specificity) or a folded completion lane would be green end to end; the name stays green. */
.alt-app .a-tb-lane.collapsed .a-tb-lane-hr{
  margin:0; width:100%; padding:0;
  background:transparent; border-bottom:0; border-radius:0; box-shadow:none;
}

.alt-app .a-tb-lane-h{
  display:flex; align-items:center; gap:var(--a-sp-6); min-width:0; width:100%;
  padding:0 var(--a-sp-4); border:0; border-radius:var(--a-r-sm);
  background:transparent; color:var(--a-text); cursor:pointer; text-align:left;
  /* DS-12, DS-49: the group header (Inter 13px/600, sentence case, one ladder row), not the 11px uppercase caption it was. */
  font-family:var(--a-body); font-size:var(--a-fs-ctl); font-weight:var(--a-fw-ctl); line-height:var(--a-lh-ctl);
  min-height:var(--a-ctl);
}
/* Hover tints the header's own text colour so it works on all three treatments (`--a-raised` is
   the band colour itself). `--a-float` is the fallback for engines that drop color-mix(). */
.alt-app .a-tb-lane-h:hover{
  background:var(--a-float);
  background:color-mix(in srgb, currentColor 12%, transparent);
}
.alt-app .a-tb-lane-h:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }
/* The chevron rotates rather than swaps: altTBLaneColumn() (JS/alt/alt-team-board.js) emits one
   glyph with `aria-expanded` on the header. It uses `--a-quick` like other chevrons (reduced
   motion is handled at the token) and rotates in the collapsed strip too. */
.alt-app .a-tb-lane-h .cv{ display:flex; flex:0 0 auto; color:var(--a-faint);
  transition:transform var(--a-quick) var(--a-ease); }
.alt-app .a-tb-lane-h[aria-expanded="false"] .cv{ transform:rotate(-90deg); }
.alt-app .a-tb-lane-h .cv > svg{ width:15px; height:15px; }
.alt-app .a-tb-lane-h .nm{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* The count is the shared stat chip (CSS/alt/alt-components.css); here it only takes the right edge. */
.alt-app .a-tb-lane-h .n{ margin-left:auto; flex:0 0 auto; }

/* ---------- the lane width toggle ----------
   Secondary to the lane name, so quiet. Mirrors `.a-theme-seg-b`/`.a-search-scope-b`
   (alt-shell.css) geometry without their segmented wrapper. 24x24 meets the §18 floor. */
.alt-app .a-tb-lane-w,
.alt-app .a-tb-lane-acts,
.alt-app .a-tb-lane-arch{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:24px; height:24px; flex:0 0 auto; padding:0; gap:2px;
  border:1px solid transparent; border-radius:var(--a-r-sm);
  background:transparent; color:var(--a-faint); cursor:pointer;
  transition:background var(--a-quick) var(--a-ease), color var(--a-quick) var(--a-ease),
             border-color var(--a-quick) var(--a-ease);
}
.alt-app .a-tb-lane-w .cv,
.alt-app .a-tb-lane-acts .cv,
.alt-app .a-tb-lane-arch .cv{ display:flex; }
.alt-app .a-tb-lane-w .cv > svg,
.alt-app .a-tb-lane-acts .cv > svg,
.alt-app .a-tb-lane-arch .cv > svg{ width:13px; height:13px; }
/* The count Fit planned, or the pinned one: "Auto·3" or "2". Set as `data-cols` by altTBPaintWidthButton(). */
.alt-app .a-tb-lane-w[data-cols]::after{
  content:attr(data-cols); font-size:var(--a-fs-11); font-variant-numeric:tabular-nums;
  line-height:var(--a-lh-ctl); padding-right:4px; white-space:nowrap;
}
.alt-app .a-tb-lane-w:hover,
.alt-app .a-tb-lane-acts:hover,
.alt-app .a-tb-lane-arch:hover{ color:var(--a-text); background:var(--a-raised); }
/* Pressed state matches `.a-theme-seg-b[aria-pressed="true"]` (surface, edge, elevation), so it
   does not rely on colour alone. */
.alt-app .a-tb-lane-w[aria-pressed="true"]{
  background:var(--a-float); color:var(--a-blue-text);
  border-color:var(--a-line-strong); box-shadow:var(--a-shadow-sm);
}
.alt-app .a-tb-lane-following{
  flex:0 0 auto; font-size:var(--a-fs-11); font-weight:600; color:var(--a-faint); white-space:nowrap;
}
.alt-app .a-tb-lane-arch:focus-visible,
.alt-app .a-tb-lane-acts:focus-visible,
.alt-app .a-tb-lane-w:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }

/* The completion-lane flag is a plain `.sr-only` span (altTBLaneColumn()), styled by
   CSS/components.css, so the words survive for readers who cannot see the green. */

/* ---------- the cards in a lane ---------- */
.alt-app .a-tb-cards{
  display:flex; flex-direction:column; gap:var(--a-tb-card-gap); min-height:48px; min-width:0;
  max-height:none; border-radius:var(--a-r-sm);
  /* Drop-target floor: 48px clears the tallest compact row (44px) so an empty lane can still take
     a drop. `.a-tb-lane-empty` sets the empty lane's own height. */
  outline:1px dashed transparent; outline-offset:-1px;
  transition:outline-color var(--a-quick) var(--a-ease), background var(--a-quick) var(--a-ease);
}
/* Where the card will land while dragging. */
.alt-app .a-tb-cards.over{ outline-color:var(--a-blue); background:var(--a-blue-soft); }
/* A shut lane takes the drop on the whole strip (its card list is hidden). */
.alt-app .a-tb-lane.collapsed.over{ outline:2px dashed var(--a-blue); outline-offset:-2px; background:var(--a-blue-soft); }
/* Cards flow into `--a-tb-cols` equal tracks without reordering: DOM order is the only order, since
   drag/drop and keyboard navigation read it. Do not use `order`, `grid-auto-flow:column`, `dense`,
   `direction:rtl`, `row-reverse` or `column-reverse` here. `minmax(0,1fr)` keeps the columns equal. */
.alt-app .a-tb-cards{
  display:grid; grid-template-columns:repeat(var(--a-tb-cols), minmax(0,1fr)); align-content:start;
}
/* ---------- empty lane ----------
   A flex column so the two children (title + hint spans, contract §7.1) read as headline and
   hint. No decorative icon on purpose. 88px min-height reads as a deliberate region while staying
   well shorter than a full card. */
.alt-app .a-tb-lane-empty{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  min-height:88px; padding:var(--a-3) var(--a-2);
  text-align:center; color:var(--a-faint); font-size:var(--a-fs-11);
  border:1px dashed var(--a-line-soft); border-radius:var(--a-r-sm);
}
/* Title carries the weight, hint the instruction; `--a-dim` so the lane header stays brightest. */
.alt-app .a-tb-lane-empty-title{ font-size:var(--a-fs-ctl-sm); font-weight:600; color:var(--a-dim); }
/* `22ch` keeps the hint from filling the box edge to edge; `ch` follows the reader's font. */
.alt-app .a-tb-lane-empty-hint{ font-size:var(--a-fs-11); line-height:var(--a-lh-ui); max-width:22ch; }
/* The empty state spans every track. */
.alt-app .a-tb-cards > .a-tb-lane-empty{ grid-column:1 / -1; }

/* "View all N tasks +M more" / "Show less": copied from the OKR Kanban's `.okr-area-more`
   (CSS/okr.css); full width at the foot so it reads as the end of the list. */
.alt-app .a-tb-lane-more{
  width:100%; margin:0; padding:7px 8px; font:inherit; font-size:var(--a-fs-11); cursor:pointer;
  background:var(--a-raised); border:1px solid var(--a-line-soft); border-radius:var(--a-r-sm);
  color:var(--a-faint);
}
.alt-app .a-tb-lane-more:hover{ border-color:var(--a-blue); color:var(--a-text); }
.alt-app .a-tb-lane-more:focus-visible{ outline:2px solid var(--a-ring); outline-offset:2px; }
/* How many more tasks are hidden. */
.alt-app .a-tb-lane-more-n{ color:var(--a-blue-text); font-weight:600; }

/* ---------- the card ----------
   Drawn by the shared taskCardEl() and styled by CSS/alt/alt-task-card.css: the board uses its 'card' (compact) density. These rules are only the board's own parts: tags, the foot, the date,
   the watch eye and the lane chip. The card in flight and the cursor are the shared sheet's. */
/* ---------- newly created card ----------
   A single pulse, not a selected state. Creating a task rebuilds the board and restores scroll,
   so altTBApplyFlash() scrolls to the card and adds this. `--dur-flash` (CSS/tokens.css) is the
   shared token; the ring is `box-shadow` so the card does not change size mid-animation. */
@keyframes altTbNewCard{
  0%   { box-shadow:0 0 0 2px var(--a-blue); background:var(--a-blue-soft); }
  70%  { box-shadow:0 0 0 2px var(--a-blue); background:var(--a-blue-soft); }
  100% { box-shadow:0 0 0 2px transparent;   background:var(--a-raised); }
}
.alt-app .a-tb-card.is-new,
.alt-app .a-tb-row.is-new,
.alt-app .a-tb-topic.is-new > .a-tb-topic-h{ animation:altTbNewCard var(--dur-flash,1.1s) var(--ease-out,ease-out) 1; }
/* Reduced motion: the scroll still happens; the pulse becomes a static ring. */
@media (prefers-reduced-motion: reduce){
  .alt-app .a-tb-card.is-new,
  .alt-app .a-tb-row.is-new,
  .alt-app .a-tb-topic.is-new > .a-tb-topic-h{ animation:none; box-shadow:0 0 0 2px var(--a-blue); }
}
/* A topic band a clone just made (JS/features/board-clone-dialog.js) pulses once the same way: the band's header, so the new topic is found. */
/* The foot is the shared card's second meta row: the date (a fact) pinned left and the chips
   (controls) at the right. The auto margin is on the date, not the first chip, because the chips are optional. */
.alt-app .a-tb-card-foot{ gap:5px; }
.alt-app .a-tb-card-foot > .a-tb-due{ margin-right:auto; }
.alt-app .a-tb-due{
  font-size:var(--a-fs-11); color:var(--a-faint); font-variant-numeric:tabular-nums; white-space:nowrap;
}
/* Late is the only urgent fact on a card, so it is the only red. */
.alt-app .a-tb-due.late,.alt-app .a-row-due.late{ color:var(--a-red); font-weight:600; }
.alt-app .a-tb-card-foot .a-chip{ height:var(--a-chip-h); padding:0 6px; font-size:var(--a-fs-11); }
.alt-app .a-tb-card-foot .a-chip > svg{ width:12px; height:12px; }
/* DS-26: a card-foot chip is the one chip height (--a-chip-h); the narrow-width step comes from alt-responsive.css's `button.a-chip` floor. */

/* ---------- watching badge ----------
   A status, not a control (no focus; watching toggles on the task). Named with `.a-sr` text and
   blue, the suite's "concerns you" colour. `.noglyph` draws a CSS ring because altIcon() returns
   an empty <svg> for an unknown name, until `eye` exists in JS/components/alt-icons.js. */
.alt-app .a-tb-watch{
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
  width:16px; height:16px; color:var(--a-blue-text);
  /* Required: a clipped `.a-sr` still adds to its containing block's scrollable overflow, so
     without a positioned ancestor it widens the whole page. Any `.a-sr` inside an unpositioned
     inline box has the same trap. */
  position:relative;
}
.alt-app .a-tb-watch > svg{ width:14px; height:14px; }
.alt-app .a-tb-watch.noglyph{ width:12px; height:12px; }
.alt-app .a-tb-watch.noglyph::before{
  content:''; width:11px; height:8px; border:1.6px solid currentColor;
  border-radius:60% 60% 60% 60% / 80% 80% 80% 80%;
}
/* ---------- the card's lane chip (also how it moves) ----------
   One chip is both the statement and the control (moves via altTBMoveTask()). `.a-chip.a-chip-st`
   (alt-components.css) gives cursor, hover, focus ring and status colour (`--a-st-line`/`--a-st-text`
   from altStatusKind()). No z-index: altMenuOpen() places the menu through layerNextZ(). */

/* `align-self:center` and `max-width` keep a long stranded lane name inside the foot. */
.alt-app .a-tb-card .a-tb-lane-btn,
.alt-app .a-tb-card .a-chip-st{ align-self:center; max-width:100%; }
/* ---------- the chip does not print the lane name ----------
   The column header already names it; the lane still reaches the card via the chip's `aria-label`/`title`,
   the card's accessible name and this colour (sys_product-rules.md). `m`/Enter/Space open the menu.
   `min-width` meets the §18 floor; `button.a-chip` (alt-responsive.css) owns height. */
.alt-app .a-tb-card .a-chip-st.mini{
  gap:3px; padding:0 5px; min-width:24px; justify-content:center; flex:0 0 auto;
}
.alt-app .a-tb-card .a-chip-st.mini > svg{ width:11px; height:11px; }
/* A read-only chip is not pressable, so it is just the dot (§18 floor applies to targets). */
.alt-app .a-tb-card span.a-chip-st.mini{
  min-width:0; width:14px; height:14px; padding:0; border-radius:50%;
  position:relative;                 /* it holds an `.a-sr` too — see .a-tb-watch above */
}
/* While its menu is open the chip keeps a pressed look. */
.alt-app .a-tb-lane-btn[aria-expanded="true"]{
  border-color:var(--a-st-line); color:var(--a-text); background:var(--a-float);
}
/* A lane no longer on this board (renamed or removed): dashed rather than red, since it is a
   fact, not an error; the menu is the way out. */
.alt-app .a-tb-lane-btn.off-board{ border-style:dashed; }
/* Destinations menu; the completion lane's `completes` shows in the menu's `.k` hint slot. */
.alt-app .a-tb-lane-menu{ min-width:190px; }

/* ---------- adding a task in the lane ----------
   `.a-add-row` is the shared dashed "add here" control. alt-tasks.css sizes its icon with a
   nested-button selector that does not match here (the glyph is a direct child), and an <svg>
   with a viewBox and no size fills its box, so the icon is sized explicitly below. */
.alt-app .a-tb-add{ min-width:0; }
.alt-app .a-tb-add > .a-add-row{
  margin-bottom:0; justify-content:center; gap:var(--a-sp-6);
}
.alt-app .a-tb-add > .a-add-row > svg{ width:14px; height:14px; flex:0 0 auto; }
.alt-app .a-tb-add .a-add-live{ margin-bottom:0; flex-wrap:wrap; gap:5px; }
.alt-app .a-tb-add-input{ flex:1 1 100%; width:100%; }
.alt-app .a-tb-add-more{ flex:0 0 auto; }

/* ---------- the sectioned lists: Owned, Completed, Archived ---------- */
.alt-app .a-tb-list{ display:flex; flex-direction:column; gap:var(--a-2); min-width:0; }
/* Rows here are one line, so centre-align (the shared `.a-row` assumes a two-line block). */
.alt-app .a-tb-list .a-tb-row{ align-items:center; }
.alt-app .a-tb-row{ min-width:0; }
/* Row actions sit at the end and stay quiet until hovered or focused. */
.alt-app .a-tb-row-acts{ display:inline-flex; align-items:center; gap:var(--a-1); flex:0 0 auto; }
.alt-app .a-tb-row-acts .a-btn{ opacity:.6; }
.alt-app .a-tb-row:hover .a-tb-row-acts .a-btn,
.alt-app .a-tb-row:focus-within .a-tb-row-acts .a-btn{ opacity:1; }
/* Completed rows stay legible: dimmed, not struck through; the tick and date already say done. */
.alt-app .a-tb-row.done .a-row-t{ color:var(--a-dim); }

/* ================= the board at every width =================
   These breakpoints live here, not in alt-team.css (loaded first): a media query adds no
   specificity, so a plain rule here would beat an override there on source order. The board stays
   horizontal at every width; only the number of visible lanes changes (sideways scroll). */
@media (max-width:1023px){
  .alt-app .a-tb-lane{ --a-tb-lane-w:250px; }
}
@media (max-width:479px){
  /* On a phone one lane fills the width so a swipe moves lane to lane. */
  .alt-app .a-tb-lane{ --a-tb-lane-w:calc(100% - 8px); min-width:220px; }
  .alt-app .a-tb-lane.collapsed{ width:38px; min-width:38px; }
  /* The page is already inset 12px a side (alt-responsive.css), so shrink the frame padding to
     `--a-2` to give the lane back width, and step the radius down with it. */
  .alt-app .a-tb-scroll:has(.a-tb-lanes){ padding:var(--a-2); border-radius:var(--a-r); }
}

/* ================= pinned, or the whole page scrolls =================
   Pinned is the default: above 1024px alt-shell.css fixes the frame (`.alt-app{height:100vh; overflow:hidden}`)
   and the board scrolls inside it. Unpinned adopts the below-1024px arrangement (page scrolls); the
   overrides win on specificity, not source order. `.a-tb-unpinned` is set on <body> by altTBApplyHeaderPin(). */
/* Reserve the scrollbar gutter in both states so toggling the pin does not shift the page
   sideways. This sheet loads on team_board.html alone, so the `html` rule reaches no other page. */
html{ scrollbar-gutter:stable; }
.alt-app.a-tb-unpinned{ height:auto; min-height:100vh; overflow:visible; }
/* The centre column clips by default so its own child can be the scroller; unpinned there is no
   inner scroller to clip for. */
.alt-app.a-tb-unpinned .a-centre{ overflow:visible; }
/* `flex:1 0 auto` (not `0 0 auto`, which collapses the frame to its content on a tall window):
   grow fills a short board's window, no-shrink lets a tall board exceed it, and `min-height:auto`
   allows that. */
.alt-app.a-tb-unpinned #altTeamView{ flex:1 0 auto; min-height:auto; }
/* The board stops being a scroller. Both axes must be released: `overflow-y:visible` alone does
   nothing beside `overflow-x:hidden` (the other axis computes to `auto`). `.a-tb-lanes` keeps its
   own horizontal scroll. */
.alt-app.a-tb-unpinned .a-tb-scroll{ flex:1 0 auto; min-height:0; overflow:visible; }
/* The utility rail grows with the page instead of scrolling inside a frame. */
.alt-app.a-tb-unpinned .a-right{ overflow-y:visible; }

/* ================= 5 · topics on the board =================
   A topic band paints its colour from `--a-topic`, set inline by JS through safeCssColor(). No topic
   gets a dashed neutral rail. Chips, the strip and the ⋯ button are the same geometry as `.a-chip`. */
.alt-app .a-tb-topic{ border-left:4px solid var(--a-topic, var(--a-faint)); border-radius:var(--a-r-sm); }
.alt-app .a-tb-topic.a-tb-topic-none{ border-left-style:dashed; border-left-color:var(--a-line-strong); }
.alt-app .a-tb-topic-h{ min-width:0; }
.alt-app .a-tb-topic-dot{
  display:inline-block; width:9px; height:9px; border-radius:50%; flex:0 0 auto;
  background:var(--a-topic, var(--a-faint));
}
.alt-app .a-tb-topic-cnt{ color:var(--a-dim); font-size:var(--a-fs-ctl-sm); white-space:nowrap; min-width:0; }
.alt-app .a-tb-topic-cnt b{ font-weight:600; color:var(--a-text); }
/* Completion meter: done / (open + done). The fill is the one green in the header. */
.alt-app .a-tb-topic-meter{
  display:inline-block; vertical-align:middle; width:70px; max-width:100%; height:5px;
  border-radius:3px; background:var(--a-raised); overflow:hidden; flex:0 1 70px;
}
.alt-app .a-tb-topic-meter > i{ display:block; height:100%; background:var(--a-green); }
.alt-app .a-tb-topic-acts .a-btn.a-tb-topic-more{ min-width:var(--a-ctl-sm); padding:0 7px; }
/* Topics strip: one toggle per topic, writing the same filter the Filter menu writes. */
.alt-app .a-tb-topic-strip{
  display:flex; flex-wrap:wrap; gap:6px; align-items:center;
  padding:4px 0 8px; min-width:0; position:relative;
}
.alt-app .a-tb-topic-strip-lb{
  font-size:var(--a-fs-11); letter-spacing:.06em; text-transform:uppercase; color:var(--a-faint);
  margin-right:2px; flex:0 0 auto;
}
.alt-app .a-tb-topic-chip{
  display:inline-flex; align-items:center; gap:5px; flex:0 0 auto; max-width:100%;
  padding:2px 9px; border:1px solid var(--a-line); border-radius:999px;
  font-size:var(--a-fs-ctl-sm); background:var(--a-panel, var(--a-raised)); color:var(--a-text); cursor:pointer;
}
.alt-app .a-tb-topic-chip:hover{ border-color:var(--a-line-strong); }
.alt-app .a-tb-topic-chip:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }
.alt-app .a-tb-topic-chip-n{ color:var(--a-dim); font-size:var(--a-fs-11); font-variant-numeric:tabular-nums; }
.alt-app .a-tb-topic-chip[aria-pressed="true"]{
  background:var(--a-blue-soft); border-color:var(--a-blue); color:var(--a-blue-text); font-weight:600;
}
.alt-app .a-tb-topic-chip .a-tb-topic-dot{ width:7px; height:7px; }
/* Touch: the chips and reach 40px and the ⋯ button 44px. */
@media (pointer:coarse){
  .alt-app .a-tb-topic-chip{ min-height:40px; padding:0 12px; }
  .alt-app .a-tb-topic-acts .a-btn.a-tb-topic-more{ min-height:44px; min-width:44px; }
}
/* Narrow: the strip keeps wrapping onto more rows, never scrolls; the header wraps too. */
@media (max-width:479px){
  .alt-app .a-tb-topic-h{ flex-wrap:wrap; }
}
/* Below 520px the meter is dropped; the count says the same thing. */
@media (max-width:519px){ .alt-app .a-tb-topic-meter{ display:none; } }
/* Archived-topic section header: heading, then the archive action and its caption. */
.alt-app .a-tb-sec-h{ display:flex; align-items:center; gap:var(--a-2); min-width:0; }
.alt-app .a-tb-sec-h .a-group-h{ flex:1 1 auto; min-width:0; }
.alt-app .a-tb-sec-act{ display:inline-flex; align-items:center; gap:var(--a-2); flex:0 0 auto; }
.alt-app .a-tb-sec-cap{ color:var(--a-dim); font-size:var(--a-fs-ctl-sm); }
@media (max-width:479px){ .alt-app .a-tb-sec-cap{ display:none; } }

/* Archive-topic dialog tiles are figures, not controls; 4 tiles wrap to 2x2 when narrow. */
.alt-app #altTaCard .a-stats{ grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); }
.alt-app #altTaCard .a-stat{ cursor:default; }
.alt-app #altTaCard .a-stat:hover{ border-color:var(--a-line-soft); }
