/* web/css/transcript.css
 *
 * The main pane and the conversation in it (web/transcript/): the header,
 * the log, the loading skeleton, suggested follow-ups, what this session
 * changed, the session's task list, the turn rail and find in conversation.
 *
 * 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.
 */

/* ── main ────────────────────────────────────────────────────────────── */

.main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--s1);
    border-radius: var(--r-lg) 0 0 0;
    overflow: hidden;
}

.conv {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.conv[hidden] { display: none; }

.conv-head {
    flex: none;
    padding: var(--sp-8) var(--pane-x) var(--sp-2);
}

/* The transcript, the question dock and the composer, as one box. It exists to
   be a containing block: a plan lays itself over exactly this, which is why the
   head above it and the terminal below it stay reachable while one is up. The
   subagent pills live in the head, so "below the pills" needs no measuring. */
.conv-main {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;

    /* How much of this box the side columns are using, so the composer and the
       ask dock can sit over the transcript rather than over the whole pane.
       Written by `syncPaneInsets` in app.js, which sums each column's own
       `--pane-w`; these are the values for a conversation with none of them
       open, so the layout is right before that has run and right if it never
       does.

       The transcript, the ask dock and the composer are all a 1000px box centred
       in their container, and until this existed they had *different*
       containers: the log is centred in `#scroll`, which the side panels squeeze,
       while the two below it were centred in the whole of `.conv-main`. Opening
       the task list therefore moved the transcript 300px and left the composer
       where it was, which read as the composer being crooked. */
    --pane-left: 0px;
    --pane-right: var(--turns);

    /* How wide the transcript lays itself out, in pixels, written by
       `syncLogWidth` in app.js. `100%` is what `.log` did before it existed, and
       is what it does until the first write and if there is never one. */
    --log-w: 100%;
}

/* Wraps, so that when the commands and the icons take most of the row the
   title keeps a readable measure and the actions drop under it, right-aligned,
   rather than the title folding into a column one word wide. */
.conv-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--sp-2) var(--sp-7);
}

/* The same size and weight as a board's title (.tb-title): a conversation is a
   page like those are, and the two used to disagree by a pixel and a weight. */
.conv-title {
    flex: 1 1 320px;
    min-width: 0;
    margin: 0;
    font: 400 var(--fs-2xl)/var(--lh-tight) var(--sans);
    color: var(--text);
    letter-spacing: -0.01em;
    text-wrap: pretty;
}

/* Pulled up so the 36px buttons centre on the title's first line (21px at
   1.3 is 27px tall) rather than hanging below it. */
.conv-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex: none;
    margin-top: calc(-1 * var(--sp-2));
    margin-left: auto;
}

/* What the session is · what is open beside it · getting rid of it. A rule
   between groups rather than more space: at 36px a wider gap reads as a
   missing button. */
.conv-act-group { display: flex; align-items: center; gap: var(--sp-1); }
/* Hidden in Settings › Conversation toolbar — on top of `hidden`, which the
   painters that decide whether a button applies keep to themselves. */
.conv-act-group > [data-bar-hidden] { display: none; }
/* A run with nothing showing goes, divider and all, and a divider is drawn only
   between two runs that both show something: `~` rather than `+`, so a run
   gone from the middle or the front leaves neither a double nor a leading rule.
   :has() rather than a class, because Restart and the orchestrator button come
   and go with the session and nothing here would hear about it. */
.conv-act-group:not(:has(> :not([hidden], [data-bar-hidden]))) { display: none; }
.conv-act-group:has(> :not([hidden], [data-bar-hidden]))
    ~ .conv-act-group:has(> :not([hidden], [data-bar-hidden]))::before {
    content: "";
    width: 1px;
    height: 16px;
    margin: 0 var(--sp-3);
    background: var(--outline-soft);
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: var(--text-3);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--s2); color: var(--text); }
.icon-btn.on { color: var(--blue); }
.icon-btn:disabled { opacity: 0.4; cursor: default; background: none; }
.icon-btn.danger:hover { background: var(--red-cont); color: var(--red); }
/* `display: grid` above beats the browser's own `[hidden]`, and two of these are
   hidden by state: Orchestrator on a worker, Restart process with no process. */
.icon-btn[hidden] { display: none; }

/* What the project declares in .tgxcode/ — a button each, words rather than an
   icon, because "Dev server" is not a thing anybody draws. */
.cmds {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-right: var(--sp-3);
}
.cmds:empty { display: none; }
/* A config file with a typo in it should be findable, not shouty: the row picks
   up a hairline and carries the parser's message in its tooltip. */
.cmds.has-problems { border-bottom: 1px dotted var(--yellow); }

.cmd-btn {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-5);
    border-radius: var(--pill);
    font: 400 var(--fs-md)/var(--lh-snug) var(--sans);
    color: var(--text-3);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.cmd-btn:hover { background: var(--s2); color: var(--text); }

.cmd-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-4);
    transition: background var(--t-fast) var(--ease);
}
/* Green is reserved in this UI for something actually running, so `starting`
   does not get it — it pulses in the colour it is about to leave. */
.cmd-btn.pending .cmd-dot { background: var(--yellow); --pulse-dim: 0.35; animation: pulse var(--dur-loop) var(--ease-standard) infinite; }
.cmd-btn.on { color: var(--text); }
.cmd-btn.on .cmd-dot { background: var(--green); }
.cmd-btn.failed .cmd-dot { background: var(--red); }

.cmd-port { font: 400 var(--fs-xs)/var(--lh-snug) var(--mono); color: var(--text-4); }
.cmd-btn.on .cmd-port { color: var(--green); }


/* Sans 13 with the branch in mono 12 and the path in mono 11 — mono a step
   under the sans beside it — on one baseline, so three sizes read as one line.
   Chips and glyphs with no text of their own centre instead. */
.conv-sub {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--sp-1) var(--sp-3);
    margin-top: var(--sp-2);
    font: 400 var(--fs-md)/var(--lh-base) var(--sans);
    color: var(--text-3);
}
.conv-sub > :is(svg, .pulse, .agent-state) { align-self: center; }
.conv-sub .sep { color: var(--text-4); opacity: 0.7; }
.conv-sub .branch { font-family: var(--mono); font-size: var(--fs-sm); color: var(--text-2); }
.conv-sub .cwd { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-4); }

/* Breadcrumb back to the session a subagent was spawned by. */
.crumb {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    height: 24px;
    margin: 0 0 var(--sp-3) calc(-1 * var(--sp-3));
    padding: 0 var(--sp-5) 0 var(--sp-3);
    border-radius: var(--pill);
    font: 400 var(--fs-sm)/var(--lh-none) var(--sans);
    color: var(--text-3);
    max-width: 100%;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.crumb:hover { background: var(--s3); color: var(--text); }
.crumb[hidden] { display: none; }
.crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Subagents: a row of chips, each one a switch into that agent's transcript.
   Same shape as the dev-server chips below — both answer "what else is going on
   in this session, and can I go look at it". */
.agents {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin-top: var(--sp-6);
    padding-bottom: var(--sp-6);
    overflow-x: auto;
    scrollbar-width: none;
}
.agents::-webkit-scrollbar { display: none; }
.agents:empty { display: none; }
/* Whichever strip comes last carries the gap down to the transcript, so a
   session with only one of them is spaced like a session with the other. */
.agents:not(:empty) + .channels:not(:empty) { margin-top: 0; }

.agent-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-4);
    flex: none;
    height: 34px;
    padding: 0 var(--sp-3) 0 var(--sp-6);
    background: var(--s2);
    border-radius: var(--pill);
    white-space: nowrap;
    transition: background var(--t-fast) var(--ease);
}
.agent-chip:hover { background: var(--s3); }
.agent-chip[aria-current="true"] { background: var(--blue-deep); }
.agent-chip[data-status="done"] { opacity: 0.62; }
.agent-chip[data-status="done"]:hover { opacity: 1; }

.agent-chip .led {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--text-4);
    flex: none;
}
.agent-chip[data-status="running"] .led {
    background: var(--yellow);
    animation: breathe var(--dur-loop) var(--ease) infinite;
}
/* Running, but nothing has written to it in 90 seconds: the session that owned
   this agent went away. A steady grey light, not a hopeful pulse. */
.agent-chip[data-status="running"][data-stalled="true"] .led {
    background: var(--text-4);
    animation: none;
}
.agent-chip[data-status="done"] .led { background: var(--green); }
.agent-chip[data-status="failed"] .led { background: var(--red); }

.agent-chip .depth { color: var(--text-4); font: 400 var(--fs-sm)/var(--lh-none) var(--mono); }
.agent-chip .name {
    font: 400 var(--fs-md)/var(--lh-none) var(--sans);
    color: var(--text);
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agent-chip .trail {
    font: 400 var(--fs-xs)/var(--lh-none) var(--mono);
    color: var(--text-3);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agent-chip[data-status="running"]:not([data-stalled="true"]) .trail { color: var(--yellow); }
.agent-chip .go {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 var(--sp-5);
    border-radius: var(--pill);
    font: 500 var(--fs-sm)/var(--lh-none) var(--sans);
    color: var(--text-3);
    background: transparent;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.agent-chip:hover .go { background: var(--blue-deep); color: var(--on-blue-deep); }
.agent-chip[aria-current="true"] .go { color: var(--on-blue-deep); }

/* The subagent's own status, where the session's project/branch line usually is. */
.conv-sub .agent-state {
    font: 500 var(--fs-sm)/var(--lh-none) var(--sans);
    text-transform: lowercase;
}
.conv-sub .agent-state.running { color: var(--yellow); }
.conv-sub .agent-state.done { color: var(--green); }
.conv-sub .agent-state.failed { color: var(--red); }
.conv-sub .pulse { color: var(--yellow); }

/* A pull request the session raised, and what has become of it. Colours come from
   the shared table above.

   `flex: none` because .conv-sub wraps: the icon and the number are one thing and
   must not be broken across lines. The svg takes its colour from currentColor, so
   this sets it on the anchor and never touches the svg. */
.conv-sub .pr {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    flex: none;
    font: 500 var(--fs-sm)/var(--lh-none) var(--sans);
    text-decoration: none;
    color: var(--pr-tint);
    opacity: var(--pr-fade);
    transition: color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
/* Lifts the dimming off a settled PR without taking its colour away: the status is
   the point, and losing it on the way to clicking the link would be a poor trade. */
.conv-sub .pr:hover { opacity: 1; text-decoration: none; }

/* Dev servers: a row of chips, each one a switch into DevBrowser. */
.channels {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin-top: var(--sp-6);
    padding-bottom: var(--sp-6);
    overflow-x: auto;
    scrollbar-width: none;
}
.channels::-webkit-scrollbar { display: none; }
.channels:empty { display: none; }

.channel {
    display: inline-flex;
    align-items: center;
    flex: none;
    height: 34px;
    padding-right: var(--sp-2);
    background: var(--s2);
    border-radius: var(--pill);
    white-space: nowrap;
    transition: background var(--t-fast) var(--ease);
}
.channel:hover { background: var(--s3); }
/* A dead port has nothing to stop, so its chip is all switch and keeps no room
   on the end for a button that is not there. */
.channel[data-live="false"] { opacity: 0.55; padding-right: var(--sp-3); }
.channel[data-live="false"]:hover { opacity: 0.85; }

.chan-open {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-4);
    height: 34px;
    padding-left: var(--sp-6);
    border-radius: var(--pill);
}

.channel .led {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--text-4);
    flex: none;
}
.channel[data-live="true"] .led { background: var(--green); }

.channel .port {
    font: 500 var(--fs-sm)/var(--lh-none) var(--mono);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.channel .name {
    font: 400 var(--fs-md)/var(--lh-none) var(--sans);
    color: var(--text-3);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.channel .go {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 var(--sp-5);
    border-radius: var(--pill);
    font: 500 var(--fs-sm)/var(--lh-none) var(--sans);
    color: var(--text-3);
    background: transparent;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
/* Lit by hovering the switch itself, not the chip: reaching for the stop button
   should not first promise to open a tab. */
.chan-open:hover .go { background: var(--blue-deep); color: var(--on-blue-deep); }
.channel[data-live="false"] .chan-open:hover .go { background: var(--s5); color: var(--text-2); }
/* Shown on this session's own word rather than the kernel's: nothing on the
   Linux side holds the port, which here means a server on the Windows side of
   the WSL mirror. Dashed, because the claim is weaker than the others. */
.channel.unverified .led {
    background: none;
    border: 1px dashed var(--text-4);
}
.channel[data-live="true"].unverified .led { border-color: var(--green); }

/* "3 elsewhere" — ports this session named that another workspace is holding.
   Says why the strip is shorter than the transcript suggests. */
.chan-note {
    align-self: center;
    padding: 0 var(--sp-2);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-4);
    white-space: nowrap;
    cursor: help;
}

.channel.busy { opacity: 0.7; }
.channel.busy .chan-stop { pointer-events: none; }

/* Shut the server down. Quiet until hovered, because the chip's own job is to
   open a tab and this one is destructive — a red button sitting on every live
   port would read as a warning about the port. */
.chan-stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px; height: 25px;
    flex: none;
    border-radius: 50%;
    color: var(--text-4);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chan-stop:hover { background: var(--red-cont); color: var(--red); }

/* Armed: one more click ends it. The chip says so where it said "Open", so the
   confirmation is on the thing being confirmed and not in a dialog. */
.channel[data-arm="true"] .chan-stop { background: var(--red-cont); color: var(--red); }
.channel[data-arm="true"] .go,
.channel[data-arm="true"] .chan-open:hover .go { background: var(--red-cont); color: var(--red); }

/* ── transcript ──────────────────────────────────────────────────────── */

.conv-body { display: flex; flex: 1; min-height: 0; }

.scroll { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
/* Where the log meets the header. Without it a scrolled line was cut off flush
   against the breadcrumb, which read as the transcript sliding *under* the
   header — most of all with the orchestrator dock open, when the log is a
   200px slot and every line in it is near an edge. A fade in the pane's own
   ground, held at the top of the scroller and taking no room (the negative
   margin), so a line dissolves into the header's space instead of meeting it.
   At the top of the log it lies over the log's own padding and hides nothing. */
.scroll::before {
    content: "";
    position: sticky;
    top: 0;
    z-index: 1;
    display: block;
    height: var(--sp-6);
    margin-bottom: calc(-1 * var(--sp-6));
    background: linear-gradient(var(--s1), transparent);
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .scroll { scroll-behavior: auto; } }

/* The width is a number this file does not know, written by `syncLogWidth` in
   app.js, and the long comment there is why. Short version: an automatic width
   depends on the pane around it, so every column that slides in and every window
   that changes size re-laid-out every row in here, once per animation frame.
   `margin: 0 auto` is untouched — the log is still centred in the real pane, it
   just no longer resizes with it.

   `100%` stays in the `min()` as a floor the variable cannot overhang: if it is
   ever stale — not written yet, or a column still halfway out — the log narrows
   to the pane rather than off the end of it, which is the behaviour this rule
   had before. That is what lets every rule in app.js be a performance decision
   and none of them a correctness one.

   The 1000px is the same 1000px as `.composer-inner` and `.ask-dock-inner`, and
   those two deliberately do *not* read the variable. Their containers are
   already inset by 28px a side, so `100%` resolves 56px below what this does and
   binds first — and 56 is more than LOG_STEP, so a quantized log mid-drag is
   still the wider box and the order of the two cannot invert. Giving them
   `--log-w` as well would read as the three being kept in step and would in fact
   change nothing. */
.log {
    width: min(1000px, 100%, var(--log-w, 100%));
    margin: 0 auto;
    padding: var(--sp-6) var(--pane-x) calc(var(--sp-10) + var(--sp-7));
}

/* ── loading skeleton ────────────────────────────────────────────────── */
/* Shown in place of a transcript while its events are still on the wire, laid
   out on the same grid as .ev so the pane does not jump when they arrive.
   The pulse is shadcn/ui's Skeleton — a slow fade to half opacity over a muted
   surface, with its 6px radius landing on our --r-xs — on our loop's timing
   rather than its 2s, so it breathes with the status dots. */

.skel {
    background: var(--s3);
    border-radius: var(--r-xs);
    --pulse-dim: 0.5;
    animation: pulse var(--dur-loop) var(--ease-standard) infinite;
}
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* Blocks have no baseline to share, so the skeleton's rows go back to the top. */
.skeleton .ev { align-items: start; }
.skel-time { width: 34px; height: 10px; margin: var(--sp-3) 0 0 auto; }
.skel-name { width: 46px; height: 11px; margin-bottom: var(--sp-4); }
/* 11px on a 23px pitch, near the 22.4px line of the 14px/1.6 prose it stands in for. */
.skel-line { height: 11px; margin: var(--sp-3) 0; }
/* The collapsed tool row: 13px/1.5 text in 8px padding, inside .tool's radius. */
.skel-tool { height: 36px; border-radius: var(--r); margin: var(--sp-2) 0; }

/* The top of a long conversation opened from its end — see earlier.js. It
   loads on its own as it scrolls into view; the button is for a pane short
   enough that it never leaves it. */
.load-earlier {
    display: flex;
    justify-content: center;
    padding: var(--sp-5) 0 var(--sp-7);
}

.load-failed {
    max-width: 560px;
    margin: var(--sp-10) auto;
    text-align: center;
    color: var(--text-3);
    font-size: var(--fs-base);
}

/* `content-visibility: auto` was tried here and removed. Once tool bodies are
   built lazily an event is a single light row, and the cost of the browser
   skipping and unskipping 1700 of them measured ~40% *slower* to scroll than
   simply laying them out (p50 22.8ms vs 16.8ms over the same sweep), with no
   gain on open. It is worth revisiting only if rows get heavy again.

   Measured again for transcript/window.js, on a real 3 400-event session fully
   loaded: the median frame improved (30ms to 21ms) but p95 went from 40ms to
   57ms, with 1.3s of long tasks per sweep against none — unskipping a row is
   a hitch taken mid-scroll. What replaced it is that module's chunks. */

/* A stretch of settled rows that window.js may take out of the document. Only
   a wrapper: `flow-root` so a child's margin cannot collapse through it and
   make the height it is held at short. */
.vchunk { display: flow-root; }

/* The time sits on the first line of what it stamps — the "You" or "Claude"
   label, a tool's name — by baseline rather than by a padding guessed for one
   kind of row. A padding-top on the gutter was right for one row height and
   off by up to 14px on the rest, which put a tool's time beside the gap above
   it and a message's time over the top of its bubble. */
.ev {
    display: grid;
    grid-template-columns: var(--gutter) 1fr;
    column-gap: var(--sp-7);
    align-items: baseline;
    padding: var(--sp-1) 0;
}

.ev-time {
    font: 400 var(--fs-xs)/var(--lh-base) var(--mono);
    color: var(--text-4);
    text-align: right;
    user-select: none;
    white-space: nowrap;
    opacity: 0.65;
    font-variant-numeric: tabular-nums;
}

/* The date above the clock, on a message old enough that the clock alone does
   not place it — see dateOf in app.js. Smaller than the clock and dimmer again on
   top of the gutter's own fade: the clock is what you read, the date is what stops
   you misreading it. Font, colour, right-alignment and tabular-nums all come from
   .ev-time.

   It pushes the clock down a line, so on a dated row the date sits beside the
   'You'/'Claude' label and the clock beside the first line of the message. That
   is the better of the two: the clock ends up next to the text it stamps. */
/* A call's or a thought's clock only under the pointer or the keyboard: a column
   of near-identical seconds beside every Read said nothing the message clocks
   around them do not. `visibility`, so nothing moves when it shows. The date
   stays — it is the line that says a new day started. */
:is(.ev-tool, .ev-thinking) .ev-clock { visibility: hidden; }
:is(.ev-tool, .ev-thinking):is(:hover, :focus-within) .ev-clock { visibility: visible; }

.ev-date {
    display: block;
    font-size: var(--fs-xs);
    line-height: var(--lh-base);
    opacity: 0.8;
}

.ev-body { min-width: 0; }

.ev-label {
    font: 500 var(--fs-sm)/var(--lh-snug) var(--sans);
    color: var(--text-3);
    margin-bottom: var(--sp-2);
    letter-spacing: 0.01em;
}

/* A message's header line: who said it, and the button that copies it.

   Copy sits in the flow here rather than floating over the message. The label
   line is the one part of a row that is reliably empty, so a control in it
   cannot land on top of the first word of a long turn — and it is in the same
   place whether the message is two lines or two hundred.

   Not in the time gutter, which would have suited a grey control among grey
   furniture: under 980px the gutter collapses to 0 and .ev-time goes to
   display:none, so the button would have nowhere left to sit. */
.ev-head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-2);
}
/* The gap under the label belongs to the line now. Every other kind of row still
   takes it from .ev-label itself, which is why that rule is left alone. */
.ev-head .ev-label { margin-bottom: 0; }

.ev-copy {
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    /* Taller than the 12px label beside it, pulled back so the header line keeps
       the height it had before there was a button on it. */
    margin: calc(-1 * var(--sp-2)) 0;
    border-radius: var(--r-xs);
    color: var(--text-4);
    /* The glyph is an svg and never a '✓' character: rangesIn walks every text
       node under a row, so a text tick would be indexed by find, and a
       drag-selection of the message would pick it up and paste it. */
    user-select: none;
    /* Only transparent, never `display: none` — a hidden button is still a button
       and has to stay in the tab order. See .strip-actions for the same call. */
    opacity: 0;
    transition: opacity var(--t-fast) var(--ease),
        background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ev:hover .ev-copy,
.ev:focus-within .ev-copy { opacity: 1; }
.ev-copy:hover { background: var(--s4); color: var(--text); }
/* A third way to be visible, because the tick has to outlive the pointer leaving
   the row. The always-on Copy on a code block never had to arrange that. */
.ev-copy.done { opacity: 1; color: var(--green); }
/* Your own turn sits in a container that is already --s3, and --s4 on top of it
   is one tonal step at 22px, which reads as nothing. Same lift .rail-group.nested
   gives a strip sitting on a card. */
.ev-user .ev-copy:hover { background: var(--s5); }

/* human turn — a tonal container, the way Google renders the person's side */
.ev-user .ev-body {
    background: var(--s3);
    border-radius: var(--r-lg);
    padding: var(--sp-6) var(--sp-7);
    margin: var(--sp-4) 0 var(--sp-6);
}
.ev-user .ev-label { color: var(--peach); }
.ev-user .prose { color: var(--text); }

/* A turn drawn at Send, before the transcript has it. Full strength, because the
   message is real and on its way — what is missing is only the time it was
   recorded at, so the gutter that will hold it says so and then fills in. */
.ev-user[data-pending] .ev-time::after { content: '·'; }

/* assistant turn */
.ev-assistant .ev-body { padding: var(--sp-1) 0 var(--sp-5); }
.ev-assistant .ev-label { color: var(--blue); }

/* reasoning — quieter than a tool call, and never coloured as a status */
.ev-thinking .ev-body { padding: var(--sp-1) 0 var(--sp-2); }
.tool.thinking { background: transparent; }
.tool.thinking > summary::before { background: var(--purple); opacity: 0.7; }
.tool.thinking > summary { color: var(--text-4); }
.tool.thinking > summary:hover { background: var(--s2); }
.tool.thinking .tname { color: var(--purple); font-family: var(--sans); font-size: var(--fs-md); }
/* Open, the thought is right underneath, so its first line in the summary is
   the same words twice. Hidden rather than removed, so the word count keeps its
   place at the right edge. */
.tool.thinking[open] > summary .targ { visibility: hidden; }
.tool.thinking .prose { color: var(--text-3); font-size: var(--fs-base); }

/* a background task reporting back — adjacent to a tool call, not to your turn */
.ev-agent-done .ev-body { padding: var(--sp-2) 0 var(--sp-5); }
.ev-agent-done .ev-label { color: var(--purple); }
.ev-agent-done .agent-done-sum {
    font: 400 var(--fs-base)/var(--lh-prose) var(--sans);
    color: var(--text-2);
}
.ev-agent-done .agent-done-meta {
    margin-top: var(--sp-1);
    font: 400 var(--fs-xs)/var(--lh-prose) var(--mono);
    color: var(--text-4);
}
.ev-agent-done .subagent-btns { margin-top: var(--sp-1); }

/* ── suggested follow-ups ─────────────────────────────────────────────────
   An aside beside the transcript, not part of it: the log is a record of what
   happened, and these are the one thing in the pane that has not happened yet.
   Collapses to a strip so a session with six offers is not permanently narrower
   than one with none. */

/* `--pane-w` is the width, and `width` only reads it, so a state that changes
   how wide this column is has one number rather than two that can disagree.
   `syncPaneInsets` in app.js sums it across the row to inset the composer.
   Reading the variable rather than measuring the box is what makes that exact
   during the transition below: a custom property is not animated, so it is the
   width this column is heading for while `width` is still on its way there. */
.tasks {
    --pane-w: 300px;
    flex: none;
    width: var(--pane-w);
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid var(--outline-soft);
    /* Only the width animates. Animating the whole box makes the transcript
       reflow twice as the text inside re-wraps mid-transition. */
    transition: width var(--t-fast) var(--ease);
}
.tasks.shut { --pane-w: 34px; }

/* On its way in or out. `display` cannot be animated, so a column that simply
   stopped being `display: none` would appear at its full width and shove the
   transcript across in one frame — which is what switching between two
   conversations used to look like, four times over. This is the same column at
   zero width, still in the layout, so the width transition above has something
   to move: `slidePane` in app.js adds the class to send it out and takes it off
   to bring it back, and only sets `hidden` once it has finished leaving.

   Selected through the row it sits in, which is where these columns always are:
   `.tasks:not(.shut)` in the media query below is as specific as a bare
   `.tasks.gone` and comes later, so it would hold a column open at 240px while
   it tried to leave. One more element in the selector settles it without an
   `!important`.

   `overflow` and `min-width` are both load-bearing rather than tidiness. A flex
   item's automatic minimum size floors it at its content's width, so `width: 0`
   alone would leave a column as wide as its widest task; `overflow: hidden`
   makes that minimum zero, and `min-width` says so outright. The border goes too,
   or a column that has left keeps a 1px line down the edge of the transcript. */
.conv-body > .tasks.gone {
    --pane-w: 0px;
    min-width: 0;
    border-left-width: 0;
    border-right-width: 0;
    overflow: hidden;
}
/* Once it has left: out of the tab order and out of the a11y tree, rather than
   a zero-width box that is still both. */
.tasks[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tasks { transition: none; } }

/* Narrow windows have no room for a third column, and the transcript is the
   one that matters. The panel is still reachable — it becomes the strip. */
@media (max-width: 1100px) { .tasks:not(.shut) { --pane-w: 240px; } }
@media (max-width: 900px) { .tasks { display: none; } }

.tasks-open { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tasks-open[hidden] { display: none; }

.tasks-head {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex: none;
    padding: var(--sp-5) var(--sp-6) var(--sp-4);
}
.tasks-title {
    font: 500 var(--fs-xs)/var(--lh-snug) var(--sans);
    color: var(--text-4);
}
.tasks-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 var(--sp-2);
    border-radius: var(--pill);
    background: var(--blue-cont);
    color: var(--blue);
    font: 500 var(--fs-xs)/var(--lh-none) var(--sans);
    font-variant-numeric: tabular-nums;
}
.tasks-collapse {
    margin-left: auto;
    padding: var(--sp-1) var(--sp-3);
    border: 0;
    border-radius: var(--r-xs);
    background: none;
    color: var(--text-4);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    cursor: pointer;
}
.tasks-collapse:hover { background: var(--s3); color: var(--text-2); }

.tasks-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 var(--sp-4) var(--sp-8);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

/* The strip the panel becomes. Vertical text, so the label stays readable at
   34px rather than being clipped to "Ta". */
.tasks-strip {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-6) 0;
    border: 0;
    background: none;
    color: var(--text-4);
    cursor: pointer;
}
.tasks-strip[hidden] { display: none; }
.tasks-strip:hover { background: var(--s2); color: var(--text-2); }
/* The strip is one tall button, so the default ring draws a box the height of
   the window around it. Inset, it reads as the control being focused rather
   than as a second panel border. */
.tasks-strip:focus-visible { outline-offset: -3px; }
.tasks-strip-label {
    writing-mode: vertical-rl;
    font: 500 var(--fs-xs)/var(--lh-none) var(--sans);
}

/* One task. A `details`, like a tool call in the log, so the caret and the
   keyboard behaviour are the browser's rather than ours. */
.task {
    border: 1px solid var(--outline-soft);
    border-left: 2px solid var(--blue);
    border-radius: var(--r-xs);
    background: var(--s2);
}
.task[data-status="started"],
.task[data-status="completed"] { border-left-color: var(--green); }
.task[data-status="completed"] { opacity: 0.85; }
.task[data-status="dismissed"] { border-left-color: var(--outline-soft); opacity: 0.72; }
.task[data-status="dismissed"]:hover { opacity: 1; }

.task > summary {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    cursor: pointer;
    list-style: none;
    font: 400 var(--fs-md)/var(--lh-snug) var(--sans);
    color: var(--text-2);
}
.task > summary::-webkit-details-marker { display: none; }
.task > summary:hover { background: var(--s3); }
.task[open] > summary { border-bottom: 1px solid var(--outline-soft); }
.task > summary .caret {
    flex: none;
    margin-top: 1px;   /* optical: the glyph sits high in its box */
    font-size: var(--fs-2xs);
    color: var(--text-4);
    transition: transform var(--t-fast) var(--ease);
}
.task[open] > summary .caret { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .task > summary .caret { transition: none; } }
.task-name { min-width: 0; overflow-wrap: anywhere; flex: 1; }

/* Waiting on unfinished work: greyed, with what it waits on under the title.
   Still openable and startable — Start anyway — so only the ground goes quiet,
   not the controls. */
.task[data-blocked="true"] { border-left-color: var(--outline-soft); }
.task[data-blocked="true"] > summary { flex-wrap: wrap; color: var(--text-4); }
.task-wait {
    flex-basis: 100%;
    padding-left: calc(var(--sp-3) + 0.7em);   /* under the title, past the caret */
    font: 400 var(--fs-sm)/var(--lh-snug) var(--sans);
    color: var(--text-4);
    overflow-wrap: anywhere;
}
.task-wait[data-kind="cycle"], .task-dlg-wait[data-kind="cycle"], .tb-wait[data-kind="cycle"] { color: var(--red); }

/* What done means, as the agent that filed it wrote it. A list to read, not
   boxes to tick: the session that takes the task up is the one that checks. */
.task-accept {
    margin-top: var(--sp-4);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-3);
}
.task-accept-h {
    font: 500 var(--fs-xs)/var(--lh-tight) var(--sans);
    color: var(--text-4);
    margin-bottom: var(--sp-2);
}
.task-accept ul { margin: 0; padding: 0; list-style: none; }
.task-accept li {
    position: relative;
    padding-left: 1.4em;
    overflow-wrap: anywhere;
}
.task-accept li::before {
    content: "";
    position: absolute;
    left: 0.15em; top: 0.35em;
    width: 0.75em; height: 0.75em;
    border: 1.5px solid var(--text-4);
    border-radius: 3px;
}
.task-dlg-deps:empty { display: none; }
.task-dlg-deps { margin-top: var(--sp-5); }
.task-dlg-wait {
    display: block;
    font: 400 var(--fs-md)/var(--lh-base) var(--sans);
    color: var(--text-3);
}

/* Opens the task at a readable width. Faint until the row is under the cursor,
   because the summary's own job — folding — is the common one. */
.task-open {
    flex: none;
    padding: 0 var(--sp-1);
    border: 0;
    border-radius: var(--r-xs);
    background: none;
    color: var(--text-4);
    font-size: var(--fs-sm);
    line-height: var(--lh-tight);
    opacity: 0;
    cursor: pointer;
}
.task:hover .task-open,
.task-open:focus-visible { opacity: 1; }
.task-open:hover { color: var(--text-2); background: var(--s4); }

.task-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.task-why {
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-4);
    margin-bottom: var(--sp-3);
}
/* The prompt in full — it is the thing being offered, and the only way to judge
   the offer. Scrolls rather than stretching the panel to the height of an essay. */
.task-prompt {
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: var(--fs-md);
    color: var(--text-3);
}
.task-cwd {
    margin-top: var(--sp-3);
    font: 400 var(--fs-xs)/var(--lh-snug) var(--mono);
    color: var(--text-4);
    overflow-wrap: anywhere;
}
.task-btns {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-top: var(--sp-5);
}
.task-done {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
    margin-top: var(--sp-4);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-4);
}
.linky {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.linky:hover { color: var(--on-blue-cont); }

/* The same task, at a width you can actually read a briefing at. */
.task-dlg-why {
    margin-bottom: var(--sp-6);
    font: 400 var(--fs-md)/var(--lh-base) var(--sans);
    color: var(--text-4);
}
.task-dlg-why[hidden] { display: none; }
.task-dlg-prompt { font-size: var(--fs-base); line-height: var(--lh-prose); color: var(--text-2); }
.task-dlg-cwd {
    margin-top: var(--sp-6);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--outline-soft);
    font: 400 var(--fs-xs)/var(--lh-base) var(--mono);
    color: var(--text-4);
    overflow-wrap: anywhere;
}
.task-dlg-cwd[hidden] { display: none; }
/* The buttons keep the shape they have on the card, so the decision looks the
   same wherever it is taken. */
.task-dlg-acts { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }

/* a message from another session — somebody else's agent talking to yours.
   Coloured apart from both your turns and Claude's, because it is neither. */
.ev-peer-message .ev-body {
    border-left: 2px solid var(--peach);
    padding: var(--sp-2) 0 var(--sp-5) var(--sp-6);
    margin: var(--sp-3) 0;
}
.ev-peer-message .ev-label { color: var(--peach); }
.ev-peer-message .peer-sub {
    margin: var(--sp-1) 0 var(--sp-2);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-4);
}
.ev-peer-message .subagent-btns { margin-top: var(--sp-4); }

/* work handed to this session by another one, which is what started the turn
   under it. Purple rather than the peach above: a peer message is a session
   being talked to, this is a session being given something, and it borrows the
   colour of a plan because a plan is what it produces. */
.ev-handoff .ev-body {
    border-left: 2px solid var(--purple);
    padding: var(--sp-2) 0 var(--sp-5) var(--sp-6);
    margin: var(--sp-3) 0;
}
.ev-handoff .ev-label { color: var(--purple); }
.ev-handoff .peer-sub {
    margin: var(--sp-1) 0 var(--sp-2);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-4);
}
.ev-handoff .subagent-btns { margin-top: var(--sp-4); }

/* an orchestrator instructing this worker. The handoff card's shape, since it
   is the same act — another session telling this one what to do — in blue so a
   worker's log can tell its orchestrator apart from a one-off handoff. */
.ev-orchestrator-message .ev-body {
    border-left: 2px solid var(--blue);
    padding: var(--sp-2) 0 var(--sp-5) var(--sp-6);
    margin: var(--sp-3) 0;
}
.ev-orchestrator-message .ev-label { color: var(--blue); }
.ev-orchestrator-message .subagent-btns { margin-top: var(--sp-4); }

/* the bridge nudging an idle orchestrator: a line, not a card */
.ev-orchestrator-inbox .ev-body {
    margin: var(--sp-2) 0;
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-4);
}

/* system notices */
.ev-system .ev-body {
    background: var(--blue-tint);
    border-radius: var(--r);
    padding: var(--sp-6) var(--sp-7);
    margin: var(--sp-4) 0;
    font-size: var(--fs-base);
}
.ev-system[data-error="true"] .ev-body { background: var(--red-cont); }
.ev-system .ev-label { color: var(--yellow); }
.ev-system[data-error="true"] .ev-label { color: var(--red); }

/* compaction divider */
.ev-compact { grid-template-columns: 1fr; }
.ev-compact .ev-body {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
    margin: var(--sp-8) 0;
    font: 400 var(--fs-sm)/var(--lh-none) var(--sans);
    color: var(--text-4);
}
.ev-compact .ev-body::before,
.ev-compact .ev-body::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--outline-soft);
}

/* ── what this session changed ───────────────────────────────────────────
   The drawer carries `class="tasks changes"`, so the box, the strip and the
   narrow-window behaviour are the suggestions panel's — one aside styled once.
   Only what is different is here: two sections instead of a list of cards, and
   rows that are paths rather than prose, so monospace and clipped from the left
   where the interesting end of a path is. */

/* Each list scrolls on its own, rather than the drawer scrolling as one column.
   A session that changed seventy files would otherwise push the working tree —
   the whole point of there being two lists — several screens below the fold. */
.changes-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 var(--sp-4) var(--sp-4);
}

.ch-sec { display: flex; flex-direction: column; min-height: 0; }
/* The transcript's list gets whatever room there is; the tree takes what it
   needs up to a share of the drawer, so its heading is always in view. */
.ch-sec:first-child { flex: 1 1 auto; }
.ch-sec + .ch-sec {
    /* Takes what it needs up to a share of the drawer, and does not give it
       back: the list above is the one with room to yield, and a tree section
       squeezed to its heading would be a heading over nothing. */
    flex: 0 0 auto;
    max-height: 45%;
    margin-top: var(--sp-4);
    padding-top: var(--sp-1);
    border-top: 1px solid var(--outline-soft);
}

.ch-head {
    display: flex;
    align-items: baseline;
    gap: var(--sp-4);
    flex: none;
    padding: var(--sp-5) var(--sp-2) var(--sp-2);
}
.ch-title {
    font: 500 var(--fs-xs)/var(--lh-snug) var(--sans);
    letter-spacing: 0.04em;
    color: var(--text-3);
}
.ch-tally { margin-left: auto; font: 400 var(--fs-xs)/var(--lh-snug) var(--mono); color: var(--text-4); }
/* The whole-session total, in the heading rather than in a row. */
.ch-head .ch-nums { margin-left: auto; font: 400 var(--fs-xs)/var(--lh-snug) var(--mono); }
.ch-branch { flex: none; margin: 0 var(--sp-2) var(--sp-2); font: 400 var(--fs-xs)/var(--lh-base) var(--mono); color: var(--text-4); }
.ch-note { flex: none; margin: var(--sp-1) var(--sp-2) var(--sp-3); font: 400 var(--fs-sm)/var(--lh-base) var(--sans); color: var(--text-4); }
.ch-note.bad { color: var(--red); }

.ch-list {
    list-style: none;
    margin: 0;
    padding: 0 0 var(--sp-3);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* One file. A button where there is a diff behind it and a plain row where there
   is not — which since the diff viewer landed is the narrow case rather than a
   whole list: an untracked directory, which git will not diff, and a binary,
   which has nothing to render. Both lists are a way in now. */
.ch-row {
    display: flex;
    align-items: baseline;
    gap: var(--sp-4);
    width: 100%;
    padding: var(--sp-1) var(--sp-2);
    border: 0;
    border-radius: var(--r-xs);
    background: none;
    color: var(--text-2);
    font: 400 var(--fs-xs)/var(--lh-prose) var(--mono);
    text-align: left;
    cursor: pointer;
}
.ch-row.flat { cursor: default; }
.ch-row:not(.flat):hover { background: var(--s3); color: var(--text); }

/* A path is read from its right-hand end, and the drawer is narrow, so the
   directory is what gives way rather than the filename — two spans rather than
   one clipped string, which also lets the leading directories go quiet and the
   file stand out. Clipping with `direction: rtl` would do it in one, and does it
   wrong: an untracked directory ends in a slash, and bidi reordering moves that
   slash to the front. */
.ch-row .fpath { flex: 1; min-width: 0; display: flex; }
/* Both halves can give way, and the directories give way first — the shrink
   factors are that priority. Without one on the filename too, a long name
   pushed the line counts out of the row instead of clipping itself. */
.ch-row .fdir {
    flex: 0 999 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-4);
}
.ch-row .fbase {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Wide enough for the longest word statusWord produces — `modified`, `conflict`
   — and clipped rather than allowed to bleed into the path beside it. */
.ch-row .fstat { flex: none; width: 8ch; overflow: hidden; color: var(--text-4); }
.ch-row .fstat[data-s="??"] { color: var(--green); }
.ch-row .fstat[data-s="UU"] { color: var(--red); }

.ch-nums { flex: none; display: inline-flex; gap: var(--sp-2); }
.ch-add { color: var(--green); }
.ch-del { color: var(--red); }
.ch-meta { flex: none; min-width: 2.5ch; text-align: right; color: var(--text-4); }

/* The whole session, or since your last message — the diff dialog's segmented
   control, under its own class so the narrow-window rule that hides that one
   leaves this alone. */
.ch-scope {
    display: flex;
    flex: none;
    align-self: flex-start;
    margin: var(--sp-5) var(--sp-2) 0;
    padding: var(--sp-1);
    border-radius: var(--pill);
    background: var(--s1);
}
.ch-scope .diff-seg-btn { height: 22px; padding: 0 var(--sp-5); font-size: var(--fs-xs); }

/* A Viewed box beside each edited file. A viewed row goes quiet rather than
   away: the count beside the heading is what says how far through you are. */
.ch-viewable { display: flex; align-items: center; gap: var(--sp-2); }
.ch-viewable .ch-row { flex: 1; min-width: 0; }
.ch-viewed { flex: none; margin: 0 0 0 var(--sp-2); accent-color: var(--blue); cursor: pointer; }
.ch-viewable.viewed .ch-row { color: var(--text-4); }
.ch-viewable.viewed .ch-row .fbase { text-decoration: line-through; text-decoration-color: var(--text-4); }
.ch-viewed-tally { margin-top: 0; font-size: var(--fs-xs); }

/* Review comments waiting to be sent: chips, then Send and Clear. */
.ch-review {
    flex: none;
    margin: var(--sp-4) 0 0;
    padding: 0 0 var(--sp-4);
    border-bottom: 1px solid var(--outline-soft);
}
.dc-chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0 var(--sp-2) var(--sp-3); }
.dc-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: var(--pill);
    background: var(--yellow-cont);
}
.dc-chip button { border: 0; background: none; color: var(--text-2); cursor: pointer; }
.dc-chip-go {
    min-width: 0;
    padding: var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 400 var(--fs-xs)/var(--lh-snug) var(--mono);
}
.dc-chip-x { padding: var(--sp-1) var(--sp-4) var(--sp-1) var(--sp-2); font-size: var(--fs-sm); color: var(--text-4); }
.dc-chip:hover { background: var(--yellow-cont-hover); }
.dc-chip-x:hover { color: var(--text); }
.dc-actions { display: flex; gap: var(--sp-3); padding: 0 var(--sp-2); }

/* The scratchpad is the third list and the least asked-for, so it gets the
   smaller share; the tree above keeps the 45% it had with two. */
.ch-sec + .ch-sec + .ch-sec { max-height: 30%; }
/* Which worktree a run of scratchpad rows came from — only drawn when the
   session had more than one. */
.ch-group {
    padding: var(--sp-3) var(--sp-2) var(--sp-1);
    font: 400 var(--fs-xs)/var(--lh-snug) var(--sans);
    letter-spacing: 0.03em;
    color: var(--text-4);
}

/* ── the session's own task list ──────────────────────────────────────────
   `class="tasks checklist"`, so everything but the border side comes from the
   suggestions panel — including its two narrow-window rules, which is the whole
   point of sharing the class: a third column has to give way on a narrow window
   exactly as the other two do, and inheriting that is one rule less to keep in
   step. Only the differences are here. */

/* Leftmost, so the divider goes the other way. After `.tasks` in the file
   rather than by !important. */
.checklist { border-left: 0; border-right: 1px solid var(--outline-soft); }

.checklist-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 var(--sp-4) var(--sp-6);
}

/* The bar and the step it is on, above the list. `.tbar` is the board card's,
   so a session reads the same here as it does on a tile. */
.checklist-body .tbar { margin: var(--sp-1) var(--sp-2) var(--sp-4); }
.cl-current {
    margin: 0 var(--sp-2) var(--sp-4);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-3);
}
.cl-note { margin: var(--sp-3) var(--sp-2) 0; font: 400 var(--fs-sm)/var(--lh-base) var(--sans); color: var(--text-4); }

.cl-list { list-style: none; margin: 0; padding: 0; }

/* One task. A button because clicking jumps to the call that last touched it —
   the same affordance `.ch-row` carries, and a plain row would be a lie about
   it. `.flat` for an item no call in this conversation matches. */
.cl-row {
    display: flex;
    align-items: baseline;
    gap: var(--sp-3);
    width: 100%;
    padding: var(--sp-2) var(--sp-2);
    border: 0;
    border-radius: var(--r-xs);
    background: none;
    color: var(--text-2);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    text-align: left;
    cursor: pointer;
}
.cl-row.flat { cursor: default; }
.cl-row:not(.flat):hover { background: var(--s3); color: var(--text); }

/* The status is an attribute, so the mark is CSS rather than four inline style
   strings built per render — which is what todoView did before this existed. */
.cl-mark { flex: none; width: 1.1em; font: 400 var(--fs-sm)/var(--lh-base) var(--mono); }
.cl-name { flex: 1; min-width: 0; }
.cl-row[data-status="completed"] .cl-mark { color: var(--green); }
.cl-row[data-status="completed"] .cl-name { color: var(--text-4); }
.cl-row[data-status="in_progress"] .cl-mark { color: var(--yellow); }
.cl-row[data-status="in_progress"] .cl-name { color: var(--text); }
.cl-row[data-status="pending"] .cl-mark { color: var(--text-4); }

/* ── turn rail ───────────────────────────────────────────────────────── */
/* One tick per thing you said, down the right edge. Hover reads it back,
   clicking jumps to it. Deliberately mute: it is a map, not a second rail. */

.turns {
    position: relative;   /* ticks measure their offset against the rail */
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-1);
    /* A column in the row like the panels are, so it declares its width the same
       way and the composer is inset by it for the same reason. It used to be the
       one column the composer knew about, by hardcoding `--turns` into its
       padding — which then stayed subtracted on a session with no turns at all,
       where this rail is not there. */
    --pane-w: var(--turns);
    width: var(--pane-w);
    padding: var(--sp-4) 0 var(--sp-9);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
.turns::-webkit-scrollbar { display: none; }
.turns:empty { display: none; }
/* Holding its place while a conversation is being drawn.
 *
 * `beginOpen` empties the rail and the new transcript refills it, so for the
 * few frames in between `:empty` above took the column out — and the composer,
 * which counts this rail like any other column, stepped 30px sideways and back
 * in the middle of whatever else the switch was animating. A rail is genuinely
 * absent only for a conversation with no turns at all, which is a fact about
 * the session rather than about how far its render has got; `renderTurns` drops
 * the class once it knows which it is. */
.turns.holding:empty { display: flex; }
/* display:flex above would otherwise beat the hidden attribute. */
.turns[hidden] { display: none; }

.turn-tick {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 15px;
    border-radius: var(--pill);
    transition: background var(--t-fast) var(--ease);
}
.turn-tick::before {
    content: "";
    width: 11px;
    height: 2px;
    border-radius: var(--pill);
    background: var(--text-4);
    transition: width var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.turn-tick:hover { background: var(--s3); }
.turn-tick:hover::before { width: 16px; background: var(--text-2); }
.turn-tick[aria-current="true"]::before { width: 16px; background: var(--peach); }

/* A plan and a question are not turns, so they are not lines.
 *
 * The rail is 30px wide and everything in it is a few pixels across, which is
 * why the distinction is *shape* rather than colour alone: shape survives being
 * small, and it is there for people who cannot tell the colours apart. Colour
 * then carries the second fact, which is how the thing ended.
 *
 * These come after the hover and aria-current rules above because they match at
 * the same specificity, so order is what decides. The hover pair is restated
 * below for the same reason — inheriting it would stretch a diamond into a
 * lozenge on the way past. */
.turn-tick[data-kind="plan"]::before,
.turn-tick[data-kind="question"]::before {
    width: 9px;
    height: 9px;
    background: currentColor;
    transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
/* A square stood on its corner: a document, and the only angular thing here. */
.turn-tick[data-kind="plan"]::before { border-radius: var(--r-2xs); transform: rotate(45deg); }
/* A dot: one of a set. */
.turn-tick[data-kind="question"]::before { border-radius: 50%; }
.turn-tick[data-kind]:hover::before { transform: scale(1.25) rotate(0deg); }
.turn-tick[data-kind="plan"]:hover::before { transform: scale(1.25) rotate(45deg); }

/* Settled the way it was put forward. */
.turn-tick[data-kind][data-status="ok"] { color: var(--green); }
/* Came back — sent back for more planning, or dismissed unanswered. Hollow as
   well as grey, so it reads as "did not land" at a glance rather than only to
   someone comparing two ticks. */
.turn-tick[data-kind][data-status="error"] { color: var(--text-4); }
.turn-tick[data-kind][data-status="error"]::before {
    background: transparent;
    box-shadow: inset 0 0 0 1.5px currentColor;
}
/* Still open: the live plan pane or question dock is up, and this is its place
   in the rail. Peach is what the rail already uses for "this is where you are". */
.turn-tick[data-kind][data-status="pending"] { color: var(--peach); }

.turn-pop {
    position: fixed;
    z-index: var(--z-pop);
    width: 330px;
    padding: var(--sp-6) var(--sp-7);
    background: var(--s3);
    border-radius: var(--r);
    box-shadow: var(--shadow-pop);
    pointer-events: none;
}
.turn-pop[hidden] { display: none; }

.turn-pop .pop-head {
    display: flex;
    align-items: baseline;
    gap: var(--sp-4);
    font: 500 var(--fs-xs)/var(--lh-snug) var(--sans);
    letter-spacing: 0.03em;
    color: var(--peach);
}
.turn-pop .pop-head .when {
    margin-left: auto;
    font-family: var(--mono);
    color: var(--text-4);
    font-variant-numeric: tabular-nums;
}
.turn-pop .pop-text {
    margin-top: var(--sp-3);
    max-height: 190px;
    overflow: hidden;
    font: 400 var(--fs-md)/var(--lh-prose) var(--sans);
    color: var(--text-2);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.turn-pop .pop-text.cmd { font-family: var(--mono); font-size: var(--fs-sm); color: var(--peach); }

/* `#151` in a message - web/pr-refs.js. Plain text until it resolves to another
   chat's PR, because most `#N` do not: a mark that went nowhere drawn as a link
   is the one thing worse than no link.

   Colour alone, no underline: an agent that names the same PR ten times in a
   reply drew ten underlines, and the paragraph read as a row of links. The one
   under the pointer gets one, so it still shows it can be clicked. */
.prose a.pr-ref { color: inherit; text-decoration: none; cursor: text; }
.prose a.pr-ref.linked { color: var(--blue); cursor: pointer; }
.prose a.pr-ref.linked:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose a.pr-ref.linked:focus-visible { outline: var(--focus-w) solid var(--focus-colour); outline-offset: 1px; border-radius: var(--r-2xs); }

/* The card a linked mention shows. #turn-pop's surface and type, anchored under
   the mention, one section per project when the chat spans more than one. */
.pr-pop { width: auto; min-width: 220px; max-width: 360px; }
.pr-pop .pop-head { margin-bottom: var(--sp-2); }
.pr-pop-sec + .pr-pop-sec { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--outline); }
.pr-pop-proj {
    font: 500 var(--fs-xs)/var(--lh-snug) var(--sans);
    letter-spacing: 0.03em;
    color: var(--peach);
}
.pr-pop-pr {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin: var(--sp-1) 0;
    font: 400 var(--fs-md)/var(--lh-snug) var(--sans);
    color: var(--text-2);
    min-width: 0;
}
.pr-pop-pr .pr { display: grid; place-items: center; color: var(--pr-tint); opacity: var(--pr-fade); flex: none; }
.pr-pop-pr .num { font-family: var(--mono); font-size: var(--fs-sm); color: var(--text-3); flex: none; }
.pr-pop-pr .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-pop-chat {
    padding-left: var(--sp-6);
    font: 400 var(--fs-md)/var(--lh-base) var(--sans);
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pr-pop-chat::before { content: '└ '; color: var(--text-4); }
.pr-pop-chat.self { color: var(--text-4); }
.pr-pop-chat .note { color: var(--text-4); }
.pr-pop-foot { margin-top: var(--sp-4); font: 400 var(--fs-xs)/var(--lh-snug) var(--sans); color: var(--text-4); }

/* Where a jump landed, so the eye finds it without hunting.
 *
 * Two rules, because the keyframes have to end on the row's own resting
 * background and a user turn is the only kind that has one (`--s3`, above).
 * Dropping the `.ev-user` qualifier instead would leave an assistant or tool row
 * as an opaque grey box once the animation stopped. The second rule is not
 * theoretical: `editRow` and `takePendingJump` both jump to tool calls, and
 * until it existed they flashed nothing at all. */
.ev-user.flash .ev-body { animation: flash var(--dur-flash) var(--ease); }
@keyframes flash {
    0%, 55% { background: var(--blue-cont); }
    100% { background: var(--s3); }
}
.ev:not(.ev-user).flash .ev-body { animation: flash-row var(--dur-flash) var(--ease); }
@keyframes flash-row {
    0%, 55% { background: var(--blue-tint); }
    100% { background: transparent; }
}
/* A settings row whose value moved while the panel was open — Claude Code
 * writing its own settings file. Deliberately the transcript's flash rather
 * than a second idea about what "this just changed" looks like; both fade to
 * transparent, which is what a row with no resting background of its own
 * needs. See claudeFlash() in web/app.js. */
.settings-row.flash {
    border-radius: var(--r-sm);
    animation: flash-settings-row var(--dur-flash) var(--ease);
}
/* The transcript's `flash-row` timing exactly — hold, then fade — but the
 * highlight is carried out past the row by a spread `box-shadow` as well as
 * filling it. A settings row has `padding: 14px 0`, so background alone stops
 * dead at the text on both sides and reads as a clipped rectangle rather than
 * as this row. A shadow does it without taking part in layout, which a margin
 * would. */
@keyframes flash-settings-row {
    0%, 55% { background: var(--blue-tint); box-shadow: 0 0 0 8px var(--blue-tint); }
    100% { background: transparent; box-shadow: 0 0 0 8px transparent; }
}
/* A select the keyboard just moved. Ctrl+P and Ctrl+M cycle the composer's
 * Permissions and Model (Shift walks them backwards), and a value changing on its own is easy to miss in a
 * row of small pills — so the same "this just changed" vocabulary as the two
 * above, aimed at a control rather than a row.
 *
 * A ring and no background, which is the one thing it does differently. The
 * other three end on `transparent` because they highlight something with no
 * resting background of its own; a select has one, so ending there would leave
 * the pill flat until the next repaint. The spread `box-shadow` follows the
 * pill's own border-radius and takes no part in layout. */
select.flash { animation: flash-select var(--dur-flash) var(--ease); }
@keyframes flash-select {
    0%, 55% { box-shadow: 0 0 0 3px var(--blue-tint); }
    100% { box-shadow: 0 0 0 3px transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .ev-user.flash .ev-body,
    .ev:not(.ev-user).flash .ev-body,
    .settings-row.flash,
    select.flash { animation: none; }
}

/* ── find in conversation ────────────────────────────────────────────── */
/* Ctrl+F, over the transcript. Absolute inside `.conv-main`, which is a
   containing block already, and `z-index: 4` so the plan pane (5) covers it.
   `right` clears the turn rail (--turns, plus a little air). */

.find {
    position: absolute;
    top: var(--sp-4);
    right: calc(var(--turns) + var(--sp-4));
    z-index: 4;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-6);
    border-radius: var(--pill);
    background: var(--s2);
    box-shadow: var(--shadow-float);
}
/* display:flex above would otherwise beat the hidden attribute. */
.find[hidden] { display: none; }

#find-input {
    width: 230px;
    padding: var(--sp-2) 0;
    font: 400 var(--fs-md)/var(--lh-base) var(--sans);
    outline: none;
}
#find-input::placeholder { color: var(--text-4); }

/* Tabular so the count does not shuffle sideways as you cycle through it. */
.find-count {
    flex: none;
    min-width: 74px;
    text-align: right;
    font: 400 var(--fs-xs)/var(--lh-base) var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--text-4);
    white-space: nowrap;
}

.find-btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    color: var(--text-3);
    font-size: var(--fs-sm);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.find-btn:hover { background: var(--s4); color: var(--text); }
.find-btn:disabled { opacity: 0.35; cursor: default; background: none; }

.find-subs {
    flex: none;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-left: var(--sp-1);
    padding: var(--sp-1) var(--sp-4) var(--sp-1) var(--sp-3);
    border-radius: var(--pill);
    background: var(--s3);
    font: 400 var(--fs-sm)/var(--lh-base) var(--sans);
    color: var(--text-3);
    white-space: nowrap;
    cursor: pointer;
}
.find-subs[hidden] { display: none; }
.find-subs:hover { color: var(--text); }
.find-subs input { accent-color: var(--blue-deep); cursor: pointer; }
.find-subs:has(input:checked) { background: var(--blue-cont); color: var(--on-blue-cont); }

/* How many matches are hiding inside something you have not opened. Without it
   the count in the field and the marks on screen would not add up, and the gap
   would look like a bug rather than a closed tool call. */
.find-hits {
    margin-left: var(--sp-3);
    padding: 0 var(--sp-3);
    border-radius: var(--pill);
    background: var(--yellow);
    color: var(--on-yellow);
    font: 500 var(--fs-xs)/var(--lh-snug) var(--mono);
    font-variant-numeric: tabular-nums;
}

/* The marks themselves, painted through the Custom Highlight API rather than by
   wrapping matches in elements — see the find section of web/app.js for why.
   Only `color`, `background-color`, `text-decoration`, `text-shadow` and
   `-webkit-text-stroke` are honoured here, so the mark is a plain rectangle.
   Both set `color`: a match landing on a dim syntax token (`.tok-comment`) would
   otherwise be unreadable, and matches land on three different backgrounds — a
   user turn's `--s3`, the bare page, and the `--bg` of a code block. Amber, not
   the blue of `::selection`: a find mark that reads as a selection is a bug
   report waiting to happen. */
::highlight(cs-find) {
    background-color: var(--mark-bg);
    color: var(--mark-fg);
}
::highlight(cs-find-at) {
    background-color: var(--yellow);
    color: var(--on-yellow);
}


/* The skeleton on its way out, laid over the transcript arriving under it — see
   liftSkeleton in web/transcript/conversation.js. Placed over `.scroll` by the
   script, which knows where that is once the side columns have settled. */
.skel-veil {
    position: absolute;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

/* "codex · read-only" in the header of a session this bridge cannot run. */
.conv-sub .runtime-chip { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); }
