/* web/css/rail.css
 *
 * The session rail (web/rail.js) and the pull-request vocabulary its rows
 * share with the rest of the app.
 *
 * Linked from web/index.html in the order the sections had in the old
 * web/styles.css, and concatenated in that order they reproduce it exactly, so
 * the cascade is unchanged. A rule that moves between these files moves in the
 * cascade too: check what it now comes before and after.
 */

/* ── rail ────────────────────────────────────────────────────────────── */

.rail {
    grid-area: rail;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 var(--sp-4) var(--sp-4);
}

.rail-head { display: flex; flex-direction: column; gap: var(--sp-3); padding: 0 var(--sp-2) var(--sp-5); }

/* Secondary to the button above it and drawn that way: the rail's ground rather
   than a raised surface, and a light that says on without competing with New
   session for the eye. Full width because everything in this column is. */
.rail-filter {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    width: 100%;
    height: 30px;
    padding: 0 var(--sp-6);
    background: var(--s2);
    color: var(--text-3);
    font: 500 var(--fs-sm)/var(--lh-none) var(--sans);
    border-radius: var(--pill);
    white-space: nowrap;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.rail-filter:hover { background: var(--s3); color: var(--text); }
.rail-filter svg { flex: none; color: var(--text-4); }
.rail-filter-label { overflow: hidden; text-overflow: ellipsis; }
.rail-filter[aria-pressed="true"] { background: var(--blue-cont); color: var(--on-blue-cont); }
.rail-filter[aria-pressed="true"] svg { color: var(--blue); }

/* How many sessions the button is talking about — the same number whether it is
   on or off, so it reads as "hide those 12" and then as "12 are hidden". */
.rail-filter-count {
    margin-left: auto;
    color: var(--text-4);
    font-variant-numeric: tabular-nums;
}
.rail-filter[aria-pressed="true"] .rail-filter-count { color: var(--on-blue-cont-2); }
.rail-filter-count[hidden] { display: none; }

/* Hide finished and the order button share a row: the filter takes the width,
   the order button is a round pill of the same height at its end. */
.rail-filters { display: flex; gap: var(--sp-3); }
.rail-filters .rail-filter { flex: 1; min-width: 0; }
.rail-sort {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: var(--s2);
    color: var(--text-4);
    border-radius: var(--pill);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.rail-sort:hover,
.rail-sort[aria-expanded="true"] { background: var(--s3); color: var(--text); }
/* Anything but the default order is a choice somebody made, and says so. */
.rail-sort.on { color: var(--blue); }
.sort-row { gap: var(--sp-4); }
.sort-tick { display: inline-grid; place-items: center; width: 12px; flex: none; color: var(--blue); }

/* Two buttons that read as one control: one height, one outer radius, and a
   hairline of the rail showing between them. Each half lights on its own, so the
   thing about to be hit is the thing that highlights. The pair fills the rail —
   at ~200px a content-width split button leaves dead space beside it and forces
   its own menu wider than the thing it came out of. The 1px gap is that
   hairline, not a step on the spacing scale. */
.new-wrap { position: relative; display: flex; gap: 1px; }

.btn-new {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 var(--sp-7);
    background: var(--s3);
    color: var(--text);
    font: 500 var(--fs-base)/var(--lh-none) var(--sans);
    border-radius: var(--r-lg) 0 0 var(--r-lg);
    transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn-new:hover { background: var(--s4); box-shadow: var(--shadow-1); }
.btn-new:active { background: var(--s5); }
.btn-new svg { color: var(--blue); flex: none; }

.btn-new-caret {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 44px;
    background: var(--s3);
    color: var(--text-3);
    border-radius: 0 var(--r-lg) var(--r-lg) 0;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn-new-caret:hover { background: var(--s4); color: var(--text); }
.btn-new-caret:active { background: var(--s5); }
.btn-new-caret[aria-expanded="true"] { background: var(--s4); color: var(--text); }
.btn-new-caret svg { transition: transform var(--t-fast) var(--ease); }
.btn-new-caret[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Anchored to the control, so it is exactly as wide as the thing it came out of.
   --s3 rather than the dialog picker's --bg: a popover has to sit above its rail
   rather than sink into it. .rail-head is a sibling of .rail-scroll, the only
   thing here that clips, so absolute positioning is all this needs. */
.new-menu {
    position: absolute;
    top: calc(100% + var(--sp-4));
    left: 0;
    right: 0;
    z-index: var(--z-pop);
    /* Six rows, a rule and the escape hatch, so nothing that matters sits below
       a fold. It still scrolls on a window too short to hold that. */
    max-height: 420px;
    overflow-y: auto;
    padding: var(--sp-3);
    background: var(--s3);
    border-radius: var(--r);
    box-shadow: var(--shadow-pop);
    transform-origin: top left;
}
.new-menu[hidden] { display: none; }

/* The dialog's row folded onto two lines: the rail cannot hold a name, a count
   and a path side by side, and the path is the half that tells two projects of
   the same name apart. */
.new-menu .picker-row { flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); padding: var(--sp-3) var(--sp-5); }
.new-menu .picker-row:hover { background: var(--s4); }
.new-menu .picker-row .path {
    flex-basis: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.new-menu .sep { height: 1px; margin: var(--sp-2) var(--sp-4); background: var(--outline-soft); }
.new-menu .menu-note {
    padding: var(--sp-4) var(--sp-5);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-4);
}


.rail-scroll { flex: 1; overflow-y: auto; min-height: 0; padding-bottom: var(--sp-6); }
/* The global ring sits outside the element, and a full-width row or card head in
   a scroller has nothing outside it that is not clipped: the ring lost its
   sides. Inside, as .tasks-strip does. */
.rail :is(.strip-main, .group-head):focus-visible { outline-offset: calc(-1 * var(--focus-w) - 1px); }

/* Each group is a card, so where one project ends and the next begins is a
   change of surface rather than something the eye has to infer from spacing.
   One tonal step above the rail, which leaves --s2 free for row hover. */
.rail-group {
    background: var(--s1);
    border-radius: var(--r-lg);
    padding: var(--sp-2);
    margin-bottom: var(--sp-4);
}

/* The heading is the disclosure — clicking it shuts the group.
   Its text starts where the rows' titles do (--sp-6 in from the card's inner
   edge, like .strip-main), whatever kind of card it heads. A project card's
   tinted head adds the accent edge's width to that in colours.css. */
.group-head {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    width: 100%;
    min-height: 36px;
    padding: var(--sp-4) var(--sp-6);
    border-radius: var(--r);
    font: 500 var(--fs-sm)/var(--lh-snug) var(--sans);
    color: var(--text-3);
    transition: background var(--t-fast) var(--ease);
}
.group-head:hover { background: var(--s2); color: var(--text-2); }
/* One line, whatever the name. A long directory name used to wrap into a
   centred block and push "1 live" onto two lines; now the name gives way with an
   ellipsis (full name on hover) and everything around it keeps its size. */
.group-head .group-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    text-transform: capitalize;
}
.group-head > span:not(.group-label) { flex-shrink: 0; white-space: nowrap; }
.group-head .count { margin-left: auto; color: var(--text-4); font-variant-numeric: tabular-nums; }
.group-head .live { color: var(--green); }
.group-head .twist {
    display: grid;
    place-items: center;
    color: var(--text-4);
    transition: transform var(--t-fast) var(--ease);
}
.group-head[aria-expanded="true"] .twist { transform: rotate(90deg); }

/* A group inside a group: the Scheduled runs of one project.
   One more tonal step in, so the nesting is a change of surface like the outer
   card is, rather than an indent the eye has to measure. Everything below is
   consequences of that step: --s2 is now the card, so the row hover that used it
   has to move up to --s3 or a hovered row would be invisible. */
.rail-group.nested {
    background: var(--s2);
    margin: var(--sp-1) 0 var(--sp-2);
}
/* Same padding as every other head, so its label lines up with the titles; a
   step smaller in type and height, because it is inside one. */
.rail-group.nested > .group-head { min-height: 32px; padding: var(--sp-3) var(--sp-6); font-size: var(--fs-xs); }
.rail-group.nested > .group-head:hover { background: var(--s3); }
/* --row-bg is what .strip-actions fades its overlay into. Left at --s1 the
   buttons would sit on a visible seam over a card that is no longer --s1. */
.rail-group.nested .strip { --row-bg: var(--s2); }
.rail-group.nested .strip:hover { background: var(--s3); --row-bg: var(--s3); }

/* An archived row reads as set aside, without being hard to read. */
.strip[data-archived="true"] .strip-title { color: var(--text-3); }

.strip {
    /* --row-bg lets the action overlay fade into whatever the row is sitting on,
       which is now the group card rather than the rail itself. */
    --row-bg: var(--s1);
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    /* A squircle rather than a pill: a two-line row rounded to its full height
       reads as a lozenge floating in the card, and the ends eat into the title. */
    border-radius: var(--r);
    transition: background var(--t-fast) var(--ease);
}
.strip:hover { background: var(--s2); --row-bg: var(--s2); }
.strip[aria-current="true"] { background: var(--blue-cont); --row-bg: var(--blue-cont); }
.strip[aria-current="true"]:hover { background: var(--blue-cont-hover); --row-bg: var(--blue-cont-hover); }

.strip-main {
    flex: 1;
    min-width: 0;
    text-align: left;
    padding: var(--sp-4) var(--sp-6);
    border-radius: var(--r);
}

/* Pin and archive stay out of the way until the row is hovered — except a pin,
   which is a state worth seeing at a glance. They float over the row rather
   than sitting in the flow, so the title and meta keep the full width.
   They sit at the foot of the row, over the meta line, rather than centred:
   centred they covered the end of the title, which is the part that says which
   session this is, while the tail of the meta line is the activity text that is
   allowed to be cut short anyway. */
.strip-actions {
    position: absolute;
    right: var(--sp-3);
    bottom: var(--sp-2);
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    padding-left: var(--sp-9);
    background: linear-gradient(90deg, transparent, var(--row-bg) var(--sp-9));
    border-radius: var(--r);
    opacity: 0;
    transition: opacity var(--t-fast) var(--ease);
}
/* Every row hides its controls until reached for, pinned ones included. They are
   only transparent, never `display: none` — a hidden button is still a button and
   has to stay in the tab order. A pinned row says so with the marker in its meta
   line instead, which costs a glyph rather than a third of the row's width. */
.strip:hover .strip-actions,
.strip:focus-within .strip-actions { opacity: 1; }
/* While a row is being renamed its buttons would sit over the end of the name. */
.strip[data-renaming="true"] .strip-actions { display: none; }

/* `projects.compactActions`: one ⋮ at the row's top-right in place of the four
   buttons, .group-menu-btn's look one size down. Shown the way the buttons were —
   on hover or focus — and held up while its menu is open. The title stops short
   of it; the meta line runs underneath, which is the line that may be cut. */
.strip-menu-btn {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: var(--text-4);
    opacity: 0;
    transition: opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.strip:hover > .strip-menu-btn,
.strip:focus-within > .strip-menu-btn,
.strip-menu-btn[aria-expanded="true"] { opacity: 1; }
.strip-menu-btn:hover { background: var(--s4); color: var(--text); }
.strip-menu-btn[aria-expanded="true"] { background: var(--s4); color: var(--text); }
.strip[aria-current="true"] > .strip-menu-btn:hover,
.strip[aria-current="true"] > .strip-menu-btn[aria-expanded="true"] { background: var(--blue-cont-active); }
.strip:has(> .strip-menu-btn) .strip-title { padding-right: var(--sp-8); }
.strip[data-renaming="true"] > .strip-menu-btn { display: none; }
/* Nothing left in the overlay but a stalled row's Stop, so without one it would
   be an empty gradient patch fading in over the meta line. */
.strip:has(> .strip-menu-btn) .strip-actions:not(:has(.strip-stop)) { display: none; }
.proj-menu .picker-row.danger:hover { color: var(--red); }

/* Sized to the title it stands in for, so the row does not change height. */
.strip-rename {
    display: block;
    width: 100%;
    box-sizing: border-box;
    /* Out by its own border and padding, so the text inside sits where the
       title's did; the 1px is the border. */
    margin: calc(-1 * var(--sp-1)) 0 0 calc(-1 * (var(--sp-2) + 1px));
    padding: 1px var(--sp-2);
    font: inherit;
    font-size: var(--fs-base);
    line-height: var(--lh-snug);
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--blue);
    border-radius: var(--r-xs);
    outline: none;
}

/* Not blue: on this rail blue means the row you are in. A pin is a fact about
   the row, and the glyph alone says it. */
.strip-meta .tag-pin {
    display: grid;
    place-items: center;
    flex: none;
    align-self: center;
    color: var(--text-3);
}
.strip[aria-current="true"] .strip-meta .tag-pin { color: var(--on-blue-cont); }

/* ── one PR vocabulary ──────────────────────────────────────────────────────
   Three surfaces show what has become of a pull request — the rail glyph below,
   the conversation header chip (`.conv-sub .pr`) and the dashboard chip
   (`.sig.pr`), plus the hover card on a `#N` mention (`.pr-pop .pr`) — and
   between them they get one colour table, here, rather than
   three. It used to be two verbatim copies and, on the board, a fourth scheme
   that was not about status at all: it coloured by `draft` alone, so a merged PR,
   one conflicting with its base and one with a failing build were the same blue.

   Colour and glyph say the same thing twice on purpose: two of these states are
   red and two are yellow, so hue alone would not separate them. The word itself
   is in the tooltip.

   The layout of the three is genuinely different — an icon in a grid, an inline
   chip, a pill with a tinted ground — so only the two tokens are shared.
   `--pr-tint` is the hue; `--pr-fade` dims the settled states, which are kept
   because "this landed" is worth a glance but must not compete with the rows that
   still want something. */
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr) {
    --pr-tint: var(--text-3);
    --pr-fade: 1;
}
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="open"] { --pr-tint: var(--blue); }
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="approved"] { --pr-tint: var(--green); }
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="changes"],
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="checks-failed"] { --pr-tint: var(--red); }
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="conflicting"],
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="checks-pending"] { --pr-tint: var(--yellow); }
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="draft"] { --pr-tint: var(--text-3); }
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="merged"] {
    --pr-tint: var(--purple);
    --pr-fade: 0.62;
}
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="closed"] {
    --pr-tint: var(--text-4);
    --pr-fade: 0.62;
}
/* gh could not be reached. Says nothing rather than guessing. */
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="unknown"] { --pr-tint: var(--text-4); }
/* Still moving, so it breathes — the same light every in-flight thing here uses. */
:is(.strip-meta .tag-pr, .lcard-head .tag-pr, .conv-sub .pr, .sig.pr, .pr-pop .pr)[data-status="checks-pending"] svg {
    animation: breathe var(--dur-loop) var(--ease) infinite;
}

/* What the session left on GitHub, at its worst.

   `flex: none` is load-bearing. `.strip-meta` is nowrap with overflow hidden, and
   the worktree name and the activity line are the two things meant to give way; a
   status that vanished on a narrow rail would be worse than none, because its
   absence means "no pull requests". */
.strip-meta .tag-pr {
    display: grid;
    place-items: center;
    flex: none;
    align-self: center;
    color: var(--pr-tint);
    opacity: var(--pr-fade);
}
/* The selected row recolours everything in its meta line, and this is the one
   thing on it that carries meaning in the hue — so only the greys are lifted, to
   where they can still be seen against --blue-cont. Red, yellow, green and purple
   are left exactly as they are. */
.strip[aria-current="true"] .strip-meta .tag-pr[data-status="draft"],
.strip[aria-current="true"] .strip-meta .tag-pr[data-status="unknown"],
.strip[aria-current="true"] .strip-meta .tag-pr[data-status="closed"] { color: var(--on-blue-cont-2); }

.mini {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    color: var(--text-4);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.mini:hover { background: var(--s4); color: var(--text); }
.mini.on { color: var(--blue); }
.strip[aria-current="true"] .mini:hover { background: var(--blue-cont-active); }
/* Destructive controls stay the same weight as their neighbours until reached
   for — colouring one red at rest would make every row look like a warning. */
.mini.danger:hover { background: var(--red-cont); color: var(--red); }
.strip[aria-current="true"] .mini.danger:hover { background: var(--red-cont-hover); }

/* Only a development bridge lists these at all; the tag says why a row is here
   in a window where it might otherwise look like real work. */
/* The three small labels a row can carry — test, orch, bg — share one shape:
   16px tall, mono 10, centred on the meta line rather than sat on its baseline
   (a chip on the baseline floats above the words beside it). */
:is(.tag-test, .tag-orch, .tag-bg, .tag-runtime) {
    flex: none;
    display: inline-flex;
    align-items: center;
    align-self: center;
    height: 16px;
    padding: 0 var(--sp-3);
    border-radius: var(--r-xs);
    font: 500 var(--fs-2xs)/var(--lh-none) var(--mono);
}
.tag-test {
    background: var(--s4);
    color: var(--text-3);
}
/* A session this bridge reads but cannot run — a Codex thread, for now. Named by
   its CLI, outlined rather than filled: it is real work, just not work you can
   continue from this window. */
.tag-runtime {
    border: 1px solid var(--outline);
    color: var(--text-3);
}

/* An orchestrator, with its unread inbox count — and, in the orchestrator
   dock, the "worker" chip on a session one started. Blue rather than the test
   tag's grey because it is real work, on the faint blue ground the palette
   keeps for exactly this; amber when the usage cutoff has paused it. */
.tag-orch {
    background: var(--blue-tint);
    color: var(--blue);
}
.tag-orch.paused {
    background: var(--yellow-cont);
    color: var(--yellow);
}

/* One line. Every row is then the same three lines — title, where it stands,
   meta — so the rail scans as a list rather than a column of blocks of
   whatever height their titles happened to wrap to. The whole title is in the
   tooltip (rail.js) and at the top of the conversation it opens. */
.strip-title {
    display: block;
    font-size: var(--fs-base);
    line-height: var(--lh-snug);
    color: var(--text-2);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.strip[aria-current="true"] .strip-title { color: var(--on-blue-cont); font-weight: 500; }

/* Unread: a turn finished since you last looked (bridge/attention.js). A dot in
   the title's own line, so it costs no height, and the title brightens — the two
   things the eye reads first when scanning down for what is new. */
.unread-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--blue);
    vertical-align: 1px;
}
.strip[data-unread="true"] .strip-title { color: var(--text); font-weight: 600; }

/* Where the last turn left things — bridge/standing.js. One line, cut rather
   than wrapped: the rail is narrow and the full line is in the tooltip. */
.strip-standing {
    display: block;
    margin-top: var(--sp-1);
    font: 400 var(--fs-sm)/var(--lh-snug) var(--sans);
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.strip-standing[data-source="extract"] { font-style: italic; }
.strip[aria-current="true"] .strip-standing { color: var(--on-blue-cont-2); }

/* Mono 11 for the worktree name, sans 12 for the rest, on one baseline — the
   two sizes centred on each other read as a line that wobbles. What has no
   text of its own (the status dot, the glyphs, the chips) centres instead. */
.strip-meta {
    display: flex;
    align-items: baseline;
    gap: var(--sp-3);
    margin-top: var(--sp-1);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-4);
    white-space: nowrap;
    overflow: hidden;
}
.strip[aria-current="true"] .strip-meta { color: var(--on-blue-cont-3); }
.strip-meta .wt {
    color: var(--text-3);
    font-family: var(--mono);
    font-size: var(--fs-xs);
    /* Gave up none of its width before, so on a pinned or labelled row it took
       what the activity line needed. It is the longest thing on the line and the
       least urgent, so it is the one that abbreviates. */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.strip[aria-current="true"] .strip-meta .wt { color: var(--on-blue-cont-2); }
.strip-meta .dot { flex: none; color: var(--text-4); opacity: 0.6; }

.strip-meta .pulse {
    display: inline-flex;
    align-items: center;
    /* Squeezed to nothing on a narrow rail, and that is allowed: the dot at the
       head of the line is what says the session is working. */
    min-width: 0;
    align-self: center;
    color: var(--yellow);
}
.strip-meta .pulse-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Messages you queued and then walked away from. Ahead of the activity, which is
   what gives way when the row runs out of room. The 1px above and below (here,
   on .due and on .tag-stalled) is optical: a pill of 11px text wants a hair of
   ground over its letters, and the scale's smallest step is a fat one there. */
.strip-meta .wait {
    flex: none;
    padding: 1px var(--sp-3);
    border-radius: var(--pill);
    background: var(--blue-tint);
    color: var(--blue);
    font-size: var(--fs-xs);
}

/* Messages waiting on a clock rather than on a turn. The same badge in the amber
   of a schedule, because the two facts are different in the one way that matters:
   a queued message goes as soon as the turn ends, and this one goes at 2am. */
.strip-meta .due {
    flex: none;
    padding: 1px var(--sp-3);
    border-radius: var(--pill);
    background: var(--yellow-cont-hover);
    color: var(--yellow);
    font-size: var(--fs-xs);
}

/* Whether a session is doing anything, at the head of the line.
   It used to be green-for-active only, standing down for running rows on the
   grounds that the activity line said it better. But the activity line is last on
   a row that does not wrap, so a row carrying a pin, a test label or a worktree
   name pushed it off the end — a pinned session that was thinking looked exactly
   like one that was idle. The words can still be cut; this cannot. */
.strip[data-state="active"] .strip-meta::before,
.strip[data-state="running"] .strip-meta::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
    flex: none;
    align-self: center;
}
.strip[data-state="running"] .strip-meta::before {
    background: var(--yellow);
    animation: breathe var(--dur-loop) var(--ease) infinite;
}
/* Running, but not by us — a terminal, VS Code, a background agent. Hollow to
   the filled dot of a session this window is driving, because the difference
   decides whether you can send into it. */
.strip[data-state="elsewhere"] .strip-meta::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--yellow);
    flex: none;
    align-self: center;
}

/* A background agent: nobody is sitting in front of this one. Shaped like the
   test label beside it, in the quieter colour — it is a fact about the session,
   not a warning. */
.tag-bg {
    background: var(--s3);
    color: var(--text-4);
}

.rail-empty {
    padding: var(--sp-10) var(--sp-8);
    color: var(--text-3);
    font-size: var(--fs-base);
    text-align: center;
    line-height: var(--lh-prose);
}


/* A busy turn that has said nothing past the threshold — bridge/runner.js. The
   badge stands in for the pulse, and the dot stops breathing: both of those say
   "working", and the point of this row is that nothing is. Red rather than the
   amber of `.due`, because this one is asking you to do something. The badge
   is web/boards/parts.js's, so the boards' cards wear it too. */
.tag-stalled {
    flex: none;
    padding: 1px var(--sp-3);
    border-radius: var(--pill);
    background: var(--red-cont);
    color: var(--red);
    font-size: var(--fs-xs);
}
/* Blocked on you: a permission, a plan, a question. The stalled badge's shape in
   the amber the app uses for "your turn" (the approval card, the plan bar), so
   the two read as one family: one says nothing is happening, this one says what
   is needed to make it happen. */
.tag-ask {
    flex: none;
    padding: 1px var(--sp-3);
    border-radius: var(--pill);
    background: var(--yellow-cont);
    color: var(--yellow);
    font-size: var(--fs-xs);
}
.strip[data-stalled="true"] .strip-meta::before {
    background: var(--red);
    animation: none;
}
/* Its Stop is the one control a row shows without being reached for, since the
   row is already telling you to reach for it. The rest are out of the layout
   until the row is hovered or focused — merely invisible, they still took their
   width and the Stop sat over the badge it belongs to. Tabbing still reaches
   them: Stop comes first, and focusing it is focus-within. */
.strip[data-stalled="true"] .strip-actions { opacity: 1; }
.strip[data-stalled="true"]:not(:hover):not(:focus-within) .strip-actions .mini:not(.stop) {
    display: none;
}
.strip-stop { display: contents; }
.mini.stop {
    width: auto;
    padding: 0 var(--sp-5);
    border-radius: var(--pill);
    font-size: var(--fs-xs);
    color: var(--red);
    background: var(--red-cont);
}
.mini.stop:hover { background: var(--red-cont-hover); color: var(--red); }
.mini.stop:disabled { opacity: .6; cursor: default; }

/* ── snooze (bridge/settle.js) ───────────────────────────────────────────────
   The tag says when it comes back; the glyph alone means "until something
   happens". Muted, like the pin: a fact about the row, not an alarm. */
.strip-meta .tag-snooze {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: none;
    color: var(--text-3);
}
.strip[aria-current="true"] .strip-meta .tag-snooze { color: var(--on-blue-cont); }
/* Held up while its menu is open, the way the compact ⋮ is. */
.strip-actions:has(.mini[aria-expanded="true"]) { opacity: 1; }
